Re: OT: for (;;) {} vs while (true) {}

2016-11-25 Thread Dennis Ritchie via Digitalmars-d
I don't mean an infinite loop for (;;), and violation of the concepts of structured programming, which put forward Dijkstra. for (;;) { ... if (condition) { break; } ... } outer: for (;;) { ... if (condition) { goto outer; } ... } I.e. in system

Re: OT: for (;;) {} vs while (true) {}

2016-11-25 Thread Dennis Ritchie via Digitalmars-d
On Friday, 25 November 2016 at 12:59:07 UTC, Andrei Alexandrescu wrote: i.e. it's not relevant to users that the string version has a distinct implementation. In fact I suggest someone implements this. The problem is not the users, and the places where you will use your program. Because

Re: OT: for (;;) {} vs while (true) {}

2016-11-25 Thread Dennis Ritchie via Digitalmars-d
On Friday, 25 November 2016 at 11:20:24 UTC, Jonathan M Davis wrote: Probably the complete lack of a condition to test in for(;;). I confess that I was shocked when I found out that it was legal to have a for loop without a condition. That seems like doing while() or if(), which makes no

Re: OT: for (;;) {} vs while (true) {}

2016-11-24 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 24 November 2016 at 22:04:00 UTC, LiNbO3 wrote: As you can see [1] the `while (true)` is lowered into `for (;true;)` so it's all about what construct pleases you the most. [1] https://github.com/dlang/dmd/blob/cd451ceae40d04f7371e46df1c955fd914f3085f/src/statementsem.d#L357 OK,

OT: for (;;) {} vs while (true) {}

2016-11-24 Thread Dennis Ritchie via Digitalmars-d
Hi all, In the source code, written in D, is often used in the design of the `for (;;) { ... }` Maybe someone has specific examples of translation of code in asm, where `while (true) { ... }` or `for (;;) { ... }` affect the performance or cross-platform programs. It would be interesting

Re: Pattern matching in D?

2016-10-28 Thread Dennis Ritchie via Digitalmars-d
Someone may be, it will be interesting, in the C# 7 `switch` will be extended syntax for pattern matching: https://github.com/dotnet/roslyn/blob/features/patterns/docs/features/patterns.md Original post: https://github.com/dotnet/roslyn/issues/206

Re: Pattern matching in D?

2016-10-21 Thread Dennis Ritchie via Digitalmars-d
On Friday, 21 October 2016 at 12:17:30 UTC, default0 wrote: Unless you find a way to convince Walter and Andrei that its not gonna result in everyone defining their own sub-language within D, making D code harder to read for others and/or have good reasons for things they enable that currently

Re: Pattern matching in D?

2016-10-21 Thread Dennis Ritchie via Digitalmars-d
On Friday, 21 October 2016 at 02:16:44 UTC, Chris M. wrote: So I know you can do some pattern matching with templates in D, but has there been any discussion about implementing it as a language feature, maybe something similar to Rust's match keyword

Re: Pattern matching in D?

2016-10-21 Thread Dennis Ritchie via Digitalmars-d
On Friday, 21 October 2016 at 02:40:45 UTC, Stefan Koch wrote: How is this diffrent from "switch-case" ? A more laconic and convenient form of the recording conditions: * No need to constantly write "case", "break", "case", "break", ... * You can use the "|", it facilitates the matching also

Re: Comparing compilation time of random code in C++, D, Go, Pascal and Rust

2016-10-19 Thread Dennis Ritchie via Digitalmars-d-announce
On Wednesday, 19 October 2016 at 17:05:18 UTC, Gary Willoughby wrote: D was doing well but in the larger examples the D compiler crashed: "Error: more than 32767 symbols in object file". A bug of this series: https://issues.dlang.org/show_bug.cgi?id=14315

Re: Any relation?

2016-10-11 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 11 October 2016 at 19:43:07 UTC, cym13 wrote: On Tuesday, 11 October 2016 at 18:58:09 UTC, Dennis Ritchie wrote: On Tuesday, 11 October 2016 at 18:13:53 UTC, Andrei Alexandrescu wrote: http://indianautosblog.com/2016/10/most-powerful-suzuki-swift-produces-350-hp-25 -- Andrei

Re: Any relation?

2016-10-11 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 11 October 2016 at 18:13:53 UTC, Andrei Alexandrescu wrote: http://indianautosblog.com/2016/10/most-powerful-suzuki-swift-produces-350-hp-25 -- Andrei Yes, definitely. http://dlanguage-z.com/about.html

Re: ndslice: feature deprecation voting / discussion

2016-10-02 Thread Dennis Ritchie via Digitalmars-d
On Sunday, 2 October 2016 at 16:36:14 UTC, jmh530 wrote: On Sunday, 2 October 2016 at 15:26:00 UTC, John Colvin wrote: I'm not that fussed about template bloat, but future API flexibility seems important. Wouldn't it be more flexible to allow both ways? If D can handle the case without

Re: The removal of inactive forum groups

2016-09-21 Thread Dennis Ritchie via Digitalmars-d
I also want to add that GDC's forum has turned into some kind of bugtracker :D We must somehow share it, for example, at GDC General and GDC Bugtracker.

Re: Replace/Rename DWT forum with GUIs forum?

2016-09-19 Thread Dennis Ritchie via Digitalmars-d
On Monday, 19 September 2016 at 19:29:45 UTC, Karabuta wrote: +1. Someone once posted a thread about this some time ago. I think using "GUIs" is more useful and representative. +1

Re: The removal of inactive forum groups

2016-09-19 Thread Dennis Ritchie via Digitalmars-d
On Monday, 19 September 2016 at 09:55:16 UTC, Seb wrote: I tried a reorganization a couple of months ago: https://forum.dlang.org/post/gkunyofqycjkgepjz...@forum.dlang.org It didn't work out, because there are there busy people involved: Walter for the NNTP server, Brad for the mailing list

The removal of inactive forum groups

2016-09-18 Thread Dennis Ritchie via Digitalmars-d
Hi, all It seems to me that a group of `Beta` should be removed, because the last activity in this group dated November 30, 2015: https://forum.dlang.org/post/565bc28c.8080...@dawg.eu Group `Study` is also not very active, so it would be logical to move it higher than it is situated now, or

Improper display of Cyrillic in `pragma (msg, ...)` on Windows

2016-08-05 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, To view Cyrillic CMD on Windows can be used `std.process.executeShell("chcp 65001 ");` and it works. What should I use to change the encoding to UTF-8 to the compiler messages in `pragma(msg, ...)` on Visual D? // import std.stdio, std.process; void

Re: to auto or not to auto ( in foreach )

2016-07-16 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 16 July 2016 at 14:00:56 UTC, dom wrote: foreach(auto v; msg) writeln(v); gives an error that a basic type is expected foreach(v; msg) writeln(v); works .. but why? `Note: The ForeachTypeAttribute is implicit, and when a type is not specified, it is inferred. In that

Re: Voting For std.experimental.ndslice

2015-12-16 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 16 December 2015 at 11:21:13 UTC, John Colvin wrote: On Sunday, 13 December 2015 at 05:10:17 UTC, Jack Stouffer wrote: This is the voting thread to decide if the proposed addition to Phobos, std.experimental.ndslice, should be accepted. [...] Docs are hitting a server error.

Re: Higher Order Range Pattern

2015-06-22 Thread Dennis Ritchie via Digitalmars-d-learn
On Monday, 22 June 2015 at 15:25:12 UTC, Steven Schveighoffer wrote: On 6/22/15 11:04 AM, Dennis Ritchie wrote: Hi, I recently came across the following code: http://wiki.dlang.org/Higher_Order_Range_Pattern I can't understand why the properties and methods of the structure are called in

Higher Order Range Pattern

2015-06-22 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, I recently came across the following code: http://wiki.dlang.org/Higher_Order_Range_Pattern I can't understand why the properties and methods of the structure are called in the correct order. Why are the property `back()` and the method `popBack()` are not called even once? In general,

Re: auto ref is on the docket

2015-06-22 Thread Dennis Ritchie via Digitalmars-d
On Monday, 22 June 2015 at 04:11:41 UTC, Andrei Alexandrescu wrote: Walter and I discussed what auto ref for templates should look like and reached the conclusion that an approach based on lowering would be best. I added a proposed lowering to

Re: fast way to insert element at index 0

2015-06-22 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 23 June 2015 at 05:16:23 UTC, Assembly wrote: What's a fast way to insert an element at index 0 of array? now that the code is working I want to clean this: void push(T val) { T[] t = new T[buffer.length + 1]; t[0] = val; t[1

Re: We simply must implement this for D to stay competitive

2015-06-21 Thread Dennis Ritchie via Digitalmars-d
On Sunday, 21 June 2015 at 10:26:03 UTC, Iain Buclaw wrote: Fun fact using macros: #define SIX 1+5 #define NINE 8+1 printf(What do you get if you multiply six by nine? %d\n, SIX * NINE); Even I fell for this trick :) #define square(x) x * x square(5 + 1);

Slice patterns in Nightly Rust

2015-06-20 Thread Dennis Ritchie via Digitalmars-d
Recently published documentation Nightly Rust. I saw this: https://doc.rust-lang.org/nightly/book/slice-patterns.html What do you think about this: a terrible thing or a cool feature? fn is_symmetric(list: [u32]) - bool { match list { [] | [_] = true, [x, inside.., y] if x

Re: Martin Nowak is officially MIA

2015-06-18 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 18 June 2015 at 09:05:27 UTC, Marc Schütz wrote: On Wednesday, 17 June 2015 at 18:35:48 UTC, Andrei Alexandrescu wrote: With this we revoke Martin's role as release czar. His github access will remain the same for the time being. I'm speechless. +1 On Thursday, 18 June 2015 at

Re: Martin Nowak is officially MIA

2015-06-18 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 18 June 2015 at 14:43:15 UTC, Andrei Alexandrescu wrote: [...] Yes, D need more people, more sponsors, the most... Unfortunately, the development of language is carried out slowly enough bug fixes too slowly. I learn more D six months and I have to admit that whatever you do, it

Re: std.container: fork in the road

2015-06-17 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 17 June 2015 at 06:08:57 UTC, Andrei Alexandrescu wrote: Regarding compatibility, I see three possibilities: I believe that at this moment it is necessary to implement step 3, but... In the future, it is necessary to refine and revise std.container.

Re: version: multiple conditions

2015-06-16 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 16 June 2015 at 13:16:40 UTC, Ola Fosheim Grøstad wrote: Unfortunately not true, you're adding multiple alias this… Excuse me for what I am trying to avoid overquoting :) You probably refer to CLOS and not proper Lisp. CLOS was adopted as part of the standard ANSI Common Lisp.

Re: How to avoid multiple spelling `import`

2015-06-16 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 16 June 2015 at 12:41:14 UTC, Daniel Kozák wrote: On Tue, 16 Jun 2015 11:45:22 + Dennis Ritchie via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I just want to import individual features of these modules. mixin template include(w...) { mixin _include

How to avoid multiple spelling `import`

2015-06-16 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, I can write this: import std.range : chain, split; But I can not write this: import std.range : chain, split, std.algorithm : map, each; We have several times to write the word `import`: import std.range : chain, split; import std.algorithm : map, each; Does D something to solve this

Re: version: multiple conditions

2015-06-16 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 16 June 2015 at 10:05:05 UTC, Walter Bright wrote: It does not allow multiple inheritance. I have often heard from Lisp programmers that the rejection of multiple inheritance is a weakness. They believe that it's well implemented in Lisp, and developers of other languages can not

Re: How to avoid multiple spelling `import`

2015-06-16 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 16 June 2015 at 11:16:32 UTC, Idan Arye wrote: There is no problem to be solved here. Having to type `import` for each imported module is not big enough a burden to justify this additional syntax. No, I think it is a holdover from C++-times — to write `import` for each

Re: How to avoid multiple spelling `import`

2015-06-16 Thread Dennis Ritchie via Digitalmars-d-learn
Maybe not everyone needs these features. But, unfortunately, I often use a lot of imported modules. And use every time the word `import` very bad. version (none) { import std.math, std.conv, std.stdio, std.ascii, std.range, std.array, std.regex,

Re: DIP80: phobos additions

2015-06-15 Thread Dennis Ritchie via Digitalmars-d
On Monday, 15 June 2015 at 10:00:43 UTC, Ilya Yaroshenko wrote: N-dimensional slices is ready for comments! It seems to me that the properties of the matrix require `row` and `col` like this: import std.stdio, std.experimental.range.ndslice, std.range : iota; void main() { auto

Re: DIP80: phobos additions

2015-06-15 Thread Dennis Ritchie via Digitalmars-d
On Monday, 15 June 2015 at 14:32:20 UTC, Ilya Yaroshenko wrote: I am note sure that we need something like `height`/row and `width`/col for nd-slices. This kind of names can be used after casting to the future `std.container.matrix`. Here something similar implemented:

Re: appender!(dchar[]) put fail

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 13:32:19 UTC, kerdemdemir wrote: One more question I am asking those kind of questions to understand and not ask same stuff over and over, : auto totalStr = chain(stringB.replicate(bCount), stringC.replicate(cCount)); writeln(typeof(totalStr.array()).stringof);

Re: appender!(dchar[]) put fail

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 13:01:29 UTC, kerdemdemir wrote: Sorry to making the discussion longer and wasting your times. But I am looking for a way without for loops. Also looping every element one by one does not seems very efficient to me. Any advices for that? Maybe it fit? auto

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote: Please show an example of .dup you'd like to avoid. For example, if you need to create a five-dimensional array of strings :)

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 16:20:46 UTC, anonymous wrote: Do you like to write? char[][] strArray = [foo.dup, bar.dup, baz.dup]; Ok. That's all you're on about? Basically you'd like this: char[] s = foo; and this: char[][] a = [[foo]]; etc. Yes. That's right, and not otherwise :)

char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
Hello, everyone! I like to work with arrays of strings like `string[] strArray`, but unfortunately, they are immutable. I do not like to work with arrays of strings such as `char[][] strArray`, because it is necessary to apply the method .dup each substring to make them work :) I

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote: Before jumping to a solution, please elaborate on the perceived problem. I have a feeling that there is none. Do you like to write? char[][] strArray = [foo.dup, bar.dup, baz.dup]; I suggest that such an option: str[] strArray =

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:45:34 UTC, anonymous wrote: Huh? You mean with string literals? That would be a rather silly reason to avoid `char[]`. Please show an example of .dup you'd like to avoid. Yes, string literals. I understand that the type of `string[]` to D is a simple data

Re: std.(experimental.)logger voting manager wanted

2015-06-13 Thread Dennis Ritchie via Digitalmars-d
On Saturday, 13 June 2015 at 16:22:15 UTC, weaselcat wrote: proper reference counting would be trivial to implement with a real macro system. I have a suggestion. If so afraid of incorporating macros in D (macros can ruin almost any language, even very good), why not try to release a test

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 15:21:19 UTC, Dennis Ritchie wrote: I wish to propose the creation of new types of data D: str, wstr, dstr, which will be the analogs of C++ `std::vectorstd::string`. Ie str, wstr, dstr be mutable counterparts immutable strings respectively str (mutable(char[])),

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 18:15:30 UTC, Dennis Ritchie wrote: Actually, I will file issue `std.conv` in Phobos to add such specifications. It will suit me. *specializations

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 17:39:25 UTC, Kagamin wrote: Type is probably possible, though conversion method will be simpler. You can even try to write a specialization of `to` for multidimentional arrays if it doesn't work. It appears the problem can be solved by creating specifications

Re: char[][] to std::vectorstd::string - DIP or dmd-issue?

2015-06-13 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 13 June 2015 at 17:37:31 UTC, anonymous wrote: Please show how it is not. Seems to work just fine. OK. Still, this method works: char[][][][][][] strArr = [foo, baz], [bar, tor.to!(char[][][][][])]; But I don't want to write this `.to!(char[][][][][])`. On Saturday,

Re: DIP80: phobos additions

2015-06-13 Thread Dennis Ritchie via Digitalmars-d
Good start: http://code.dlang.org/packages/dip80-ndslice https://github.com/9il/dip80-ndslice/blob/master/source/std/experimental/range/ndslice.d I miss the function `sliced` in Phobos.

Re: Python's features, which requires D

2015-06-11 Thread Dennis Ritchie via Digitalmars-d-learn
On Saturday, 23 May 2015 at 10:58:33 UTC, Kagamin wrote: On Saturday, 23 May 2015 at 02:36:14 UTC, Dennis Ritchie wrote: For example, the code in Python looks quite natural: a = [[int(j) for j in input().split()] for i in range(n)] About D-code, I can not say: auto a = stdin .byLine

Re: Daily downloads in decline

2015-06-11 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 11 June 2015 at 13:35:25 UTC, QAston wrote: It's a matter of taste and I won't advocate for Rust on D forums. It is not required. But it would be nice if you could post a topic in DLearn like this just about Rust :)

Re: Daily downloads in decline

2015-06-11 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 11 June 2015 at 15:03:39 UTC, Dicebot wrote: Those are considerably less powerful: - can only have type arguments - no variadic argument list support - no arbitrary condition constraints (thus only partial duck typing support) On the other hand they have one important advantage:

Re: Daily downloads in decline

2015-06-11 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 11 June 2015 at 15:08:48 UTC, Dicebot wrote: My experience of explaining those concepts to other people indicates otherwise. D templates and mixins are dirty but also very simple concepts that pretty much any new programmers gets quickly and intuitively, learning how to do more

Re: Daily downloads in decline

2015-06-11 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 11 June 2015 at 17:41:49 UTC, Andrei Alexandrescu wrote: It is possible that Walter and Andrei against macro because of this: macro_rules! o_O { ( $( $x:expr; [ $( $y:expr ),* ] );* ) = { [ $($( $x + $y ),*),* ] } } fn main()

DConf 2015: Individual talk videos from the livestream

2015-06-11 Thread Dennis Ritchie via Digitalmars-d-announce
I sliced videos with DConf 2015 2 June, but the uploading lasted as you can see a very long time :) https://cloud.mail.ru/public/BSZs/PZDbRcGrH Video cut stamp-based John Colvin: http://forum.dlang.org/post/sujyaurgyfumoiimi...@forum.dlang.org

Re: Daily downloads in decline

2015-06-11 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 11 June 2015 at 08:54:54 UTC, Marc Schütz wrote: On Wednesday, 10 June 2015 at 22:01:22 UTC, Dennis Ritchie wrote: No bounds checking of arrays. Huh? Whatever gave you that impression? Oops. It turns out that bounds checking is really there. But I think that before this really

Re: Daily downloads in decline

2015-06-11 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 11 June 2015 at 08:59:18 UTC, weaselcat wrote: On Thursday, 11 June 2015 at 08:54:54 UTC, Marc Schütz wrote: Rust's macros make me wish mixins weren't so ugly to use, or we had proper AST macros. Perhaps much will change, if D is added to the symbol $ to replace values in the

Re: Daily downloads in decline

2015-06-11 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 11 June 2015 at 09:12:09 UTC, QAston wrote: I have seen and used lisp, still I think that Rust is innovative. Namely the combination of very good typesystem, best to date (because fully compiler-verified) resource management and AST macros is innovative. But what I like the most

Re: Reading array of integers readln performance issues

2015-06-11 Thread Dennis Ritchie via Digitalmars-d-learn
On Thursday, 11 June 2015 at 19:56:00 UTC, kerdemdemir wrote: Hi; To learn D better and challanging myself I am tring code computation's with D. There is a question which is about reading a line of integer which consist of 20 elements. My solution fails because Time limit exceeded, I

Re: Json

2015-06-11 Thread Dennis Ritchie via Digitalmars-d-learn
On Thursday, 11 June 2015 at 23:58:33 UTC, Cassio Butrico wrote: What does the .json file and how to use it? In D a file with the extension *.json is used to describe packets that are included in your project, the dependency manager DUB. For example, you can install Eclipse with DDT and

Re: Json

2015-06-11 Thread Dennis Ritchie via Digitalmars-d-learn
On Friday, 12 June 2015 at 00:35:35 UTC, Cassio Butrico wrote: Thank you for answering me so fast , where do I get the DUB for windows ? http://code.dlang.org/download

Re: DIP80: phobos additions

2015-06-11 Thread Dennis Ritchie via Digitalmars-d
On Friday, 12 June 2015 at 00:51:04 UTC, Manu wrote: Perhaps you've never worked with incompetent programmers (in my experience, 50% of the professional workforce). Programmers, on average, don't know maths. They literally have no idea how to simplify an algebraic expression. I think there are

Re: DIP80: phobos additions

2015-06-10 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 10 June 2015 at 08:39:12 UTC, ixid wrote: I suspect this is more about who the Mathematica and D users are as Project Euler is mostly mathematical rather than code optimization. More of the Mathematica users would have strong maths backgrounds. I haven't felt held back by D at

Re: DIP80: phobos additions

2015-06-10 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 10 June 2015 at 08:39:12 UTC, ixid wrote: I suspect this is more about who the Mathematica and D users are as Project Euler is mostly mathematical rather than code optimization. Here and I say that despite the fact that in D BigInt not optimized very well, it

Re: Is it possible to add items to the arrays and hashes at compile time?

2015-06-10 Thread Dennis Ritchie via Digitalmars-d-learn
On Wednesday, 10 June 2015 at 17:43:36 UTC, Ali Çehreli wrote: On the other hand, if it's a manifest constant (enum, const static, etc.) then by definition it cannot be mutated. If we allowed mutation of compile-time expressions, then we would have a complicated language. Unfortunately, the

Re: Is it possible to add items to the arrays and hashes at compile time?

2015-06-10 Thread Dennis Ritchie via Digitalmars-d-learn
On Wednesday, 10 June 2015 at 17:13:34 UTC, anonymous wrote: On Wednesday, 10 June 2015 at 17:00:34 UTC, Dennis Ritchie wrote: Isnt it possible to come up with the interpreter compile-time, which will determine the operating time of the program at runtime at compile time. Sounds like the

Re: Is it possible to add items to the arrays and hashes at compile time?

2015-06-10 Thread Dennis Ritchie via Digitalmars-d-learn
On Wednesday, 10 June 2015 at 07:15:26 UTC, Ali Çehreli wrote: My phrasing was off: By definition, initialization happens once. :) What I meant is, once initialized, a compile-time variable cannot be reassigned. The reason is, to effect compile time evaluation, one needs to use 'enum' (or

Re: Daily downloads in decline

2015-06-10 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 10 June 2015 at 11:36:56 UTC, Bruno Medeiros wrote: Thanks! (it already has more likes/stars in Github than DDT, even though it's nowhere near as feature full :S ) It seems to me that many still do not understand what the Rust :) Many have not seen Lisp, so they think that Rust

Re: Daily downloads in decline

2015-06-10 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 10 June 2015 at 17:20:12 UTC, Dicebot wrote: It is designed for large scale projects that need to combine high performance with maintainability and does that at cost of learning curve and rapid prototyping. High performance is a LDC, but the problem is that it is too little

Re: Daily downloads in decline

2015-06-10 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 10 June 2015 at 17:20:12 UTC, Dicebot wrote: On Wednesday, 10 June 2015 at 17:04:56 UTC, Dennis Ritchie wrote: It seems to me that many still do not understand what the Rust :) Many have not seen Lisp, so they think that Rust is something innovative. At least from the syndrome of

Re: DIP80: phobos additions

2015-06-10 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 10 June 2015 at 09:43:47 UTC, ixid wrote: You rarely need to use BigInt for heavy lifting though, often it's just summing, not that I would argue against optimization. I think speed is absolutely vital and one of the most powerful things we could do to promote D would be to run

Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?

2015-06-10 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 10 June 2015 at 09:23:54 UTC, Chris wrote: One big difference between the D community and other languages' communities is is that D people keep criticizing the language and see every little flaw in every little corner, which is good and which is why D is the way it is. Other

Re: DIP80: phobos additions

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 08:50:16 UTC, John Colvin wrote: I don't think this is quite the right approach. Multidimensional arrays and matrices are about accessing and iteration over data, not data structures themselves. The standard layouts are common special cases. Yes, I really want to D

Re: DIP80: phobos additions

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 15:26:43 UTC, Ilya Yaroshenko wrote: D definitely needs BLAS API support for matrix multiplication. Best BLAS libraries are written in assembler like openBLAS. Otherwise D will have last position in corresponding math benchmarks. Yes, those programs on D, is

Re: DIP80: phobos additions

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 16:14:24 UTC, Dennis Ritchie wrote: To solve these problems you need something like Blas. Perhaps BLAS - it's more practical way to enrich D techniques for working with matrices. Actually, that's what you need to realize in D:

Re: Right after allocators: containers or database connectivity?

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 17:12:53 UTC, Liam McSherry wrote: I think containers would be the better option. D sorely needs to have basics like (de)queues and stacks in the standard library, as well as any other popular and useful containers. And `set`.

Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 18:46:48 UTC, Israel wrote: Ruby that compiles? Yet Rust, Nim and Crystal is a very young languages. And alas, life is not eternal to wait five years of a flourishing language :) There are already ready to be used option. This is D.

Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 18:02:55 UTC, Ali Çehreli wrote: http://www.reddit.com/r/programming/comments/396c95/of_the_emerging_systems_languages_rust_d_go_nim/ I might've said D, but I don't think it qualifies as emerging since it's over a decade old. Well, it's just ridiculous, although

Re: forum.dlang.org, version 2 (BETA)

2015-06-09 Thread Dennis Ritchie via Digitalmars-d-announce
There is no possibility, as before to stretch the field for the bottom right corner: http://i.imgur.com/IEVjs6v.png

Re: Right after allocators: containers or database connectivity?

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 17:27:34 UTC, kinke wrote: On Tuesday, 9 June 2015 at 17:15:46 UTC, Dennis Ritchie wrote: And `set`. +1, I was just about to post this too. ;) You already ahead in DIP80: http://wiki.dlang.org/DIP80

Re: DIP80: phobos additions

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 17:19:28 UTC, Andrei Alexandrescu wrote: On 6/9/15 9:16 AM, Dennis Ritchie wrote: On Tuesday, 9 June 2015 at 16:14:24 UTC, Dennis Ritchie wrote: To solve these problems you need something like Blas. Perhaps BLAS - it's more practical way to enrich D techniques for

Re: DIP80: phobos additions

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 18:58:56 UTC, Andrei Alexandrescu wrote: On 6/9/15 11:42 AM, Dennis Ritchie wrote: And finally `std.bigint` offers good (but not outstanding) performance. BigInt should use reference counting. Its current approach to allocating new memory for everything is a

Re: Daily downloads in decline

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Tuesday, 9 June 2015 at 20:54:00 UTC, David Nadlinger wrote: That's not a full answer. I worked with Daniel to get LDC to successfully compile DDMD the Saturday after DConf, which is part of the reason why we can confidently make the 20% claim in the first place (i.e., be sure that is not a

Re: DevDocs.io: voting for D

2015-06-09 Thread Dennis Ritchie via Digitalmars-d-announce
On Tuesday, 9 June 2015 at 23:04:47 UTC, sigod wrote: On Tuesday, 2 June 2015 at 16:42:43 UTC, sigod wrote: Hi everyone. Please vote for D to be added to https://DevDocs.io: https://trello.com/c/bCgqhZ4s/123-d 80 votes! Nice. I voted for the second time :) 81

Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 10 June 2015 at 01:21:05 UTC, weaselcat wrote: D isn't an emerging language. And that's a good thing. Yes, of course. I just read the title of this topic: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why? And I do not read the name of the theme

Re: Coedit 1 gold released

2015-06-09 Thread Dennis Ritchie via Digitalmars-d-announce
On Wednesday, 10 June 2015 at 01:23:00 UTC, Basile Burg wrote: Coedit, the small IDE for the D DMD compiler goes gold Thanks!

Re: Is it possible to add items to the arrays and hashes at compile time?

2015-06-09 Thread Dennis Ritchie via Digitalmars-d-learn
On Sunday, 7 June 2015 at 15:20:17 UTC, Ali Çehreli wrote: /* Some function that generates an AA */ Thanks. Beautiful code, but I want a little more :) /* Some function that generates an AA */ int[][int][int] initHash(int i) { /* It is nice to see that this function is not called at run

Re: Asked on Reddit: Which of Rust, D, Go, Nim, and Crystal is the strongest and why?

2015-06-09 Thread Dennis Ritchie via Digitalmars-d
Why D can not be done, as in the Go: package main import fmt func main() { var a, b, c = 1, 2, 3 fmt.Printf(%d %d %d, a, b, c) // prints 1 2 3 } http://rextester.com/WICH50477

Re: Is it possible to add items to the arrays and hashes at compile time?

2015-06-09 Thread Dennis Ritchie via Digitalmars-d-learn
On Wednesday, 10 June 2015 at 03:38:32 UTC, Ali Çehreli wrote: The way I understand it and the way it makes sense to me, :) variables that are generated at compile time can be initialized only once. It is not possible after initialization. However, the initialization of the variable can be as

Re: [OT] Modules dropped out of C++17

2015-06-08 Thread Dennis Ritchie via Digitalmars-d
On Monday, 8 June 2015 at 18:17:13 UTC, Paulo Pinto wrote: Apparently modules have been pushed into a Technical Specification, and won't be ready on time for inclusion into ANSI C++ 17. https://botondballo.wordpress.com/2015/06/05/trip-report-c-standards-meeting-in-lenexa-may-2015/ So, here

Re: DIP80: phobos additions

2015-06-07 Thread Dennis Ritchie via Digitalmars-d
On Sunday, 7 June 2015 at 18:27:16 UTC, Robert burner Schadek wrote: Phobos is awesome, the libs of go, python and rust only have better marketing. As discussed on dconf, phobos needs to become big and blow the rest out of the sky. http://wiki.dlang.org/DIP80 lets get OT, please discuss

Re: Daily downloads in decline

2015-06-05 Thread Dennis Ritchie via Digitalmars-d
On Friday, 5 June 2015 at 20:41:39 UTC, Bruno Medeiros wrote: And toolchain always wins. If won't matter if the language is superior. Yes, official support for IOS and Android already in Rust, as far as I know. Toolchain for Rust created MUCH faster than D. D is a very good language, but

Re: DConf 2015 has ended. See you in Berlin at DConf 2016!

2015-05-30 Thread Dennis Ritchie via Digitalmars-d-announce
And please, put the missing slides Amaury Sechet, Adam Ruppe and unlock access to the slides Liran Zvibel: http://dconf.org/2015/talks/zvibel.pdf And also you need to correct a reference to Walter Bright's slides here: http://dconf.org/2015/talks/bright.html

Re: I won a school game-creation competition!

2015-05-30 Thread Dennis Ritchie via Digitalmars-d
On Saturday, 30 May 2015 at 20:42:14 UTC, extrawurst wrote: On Saturday, 30 May 2015 at 14:48:53 UTC, Vladde Nordholm wrote: So hey everyone! I am very happy to say that I won a game-creation contest, called LBS Game Awards 2015, where I entered with my console game DRPG, which is written in

Re: DConf 2015 has ended. See you in Berlin at DConf 2016!

2015-05-29 Thread Dennis Ritchie via Digitalmars-d-announce
On Friday, 29 May 2015 at 23:42:00 UTC, Andrei Alexandrescu wrote: DConf 2015 has been awesome, I'm taking a minute to post this that's been announced a short while ago. We're pleased to announce that DConf 2016 will take place in Berlin, sponsored by Sociomantic. We'll be back with

Mixin - to get to the content-type `MapResult!(__lambda1, int[]).MapResult`

2015-05-29 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, This code prints the arrays: [5] [6] [7] import std.stdio, std.algorithm; static int idx; void walk(R)(R range) { while (!range.empty) { range.front; range.popFront; ++idx; } } void main() { [5, 6, 7].map!(a = [a].writeln).walk; } How should I apply

Re: dmd makes D appear slow

2015-05-29 Thread Dennis Ritchie via Digitalmars-d
On Friday, 29 May 2015 at 20:02:49 UTC, Martin Krejcirik wrote: IMHO all what is needed is to update the download page with some description of deferences between the compilers, like: +1

Re: Why aren't you using D at work?

2015-05-29 Thread Dennis Ritchie via Digitalmars-d
On Friday, 29 May 2015 at 12:39:20 UTC, Jacob Carlborg wrote: On 2015-05-29 11:48, Daniel Kozák via Digitalmars-d wrote: We use D in our work a little. And we dont using it more because we do not need to ;). We have a quite big php codebase and bacause od facebook(hhvm) our code is fast

Re: RE: Why aren't you using D at work?

2015-05-29 Thread Dennis Ritchie via Digitalmars-d
On Friday, 29 May 2015 at 09:49:17 UTC, Daniel Kozák wrote: I expect I'm not alone. Please share the absolute blockers preventing you from adopting D in your offices. I wonder if there will be common themes emerge? Strong blockers are C/C++ coders who do not wish to learn a new language

  1   2   3   4   >