Re: const as default for variables

2015-03-17 Thread Zach the Mystic via Digitalmars-d
On Tuesday, 17 March 2015 at 22:53:20 UTC, deadalnix wrote: On Tuesday, 17 March 2015 at 22:25:30 UTC, Zach the Mystic wrote: The real devil against safe reference counting is in the assignment operators, when they do destructive moves. I think those have to be the focus of any effort here. I

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Laeeth Isharc via Digitalmars-d
On Wednesday, 18 March 2015 at 02:02:27 UTC, bachmeier wrote: On Wednesday, 18 March 2015 at 01:52:00 UTC, Laeeth Isharc wrote: PyD is pretty nice, although one wouldn't want to call it from an inner loop. Why wouldn't you want to call it from an inner loop? See benchmark someone did a while

Re: calling C variadic arguments with no 'argc' and only variadic arguments

2015-03-17 Thread Laeeth Isharc via Digitalmars-d
On Wednesday, 18 March 2015 at 03:14:30 UTC, Daniel Murphy wrote: "Laeeth Isharc" wrote in message news:jmlgralvzaqperfkn...@forum.dlang.org... DMD gave me an error message for the following declarations: double mgl_rnd (...); double mgl_rnd_ (...); It says I need at least one fixed argumen

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Walter Bright via Digitalmars-d
On 3/17/2015 9:39 AM, Baz wrote: On Sunday, 15 March 2015 at 21:40:02 UTC, Walter Bright wrote: On 3/15/2015 2:34 PM, Walter Bright wrote: P.S. Also need to include all the examples in the dlang reference as unittest cases. Also, HexStrings can handle w and d postfixes. Use the lexer.c code f

Phobos Documentation - call to action

2015-03-17 Thread Walter Bright via Digitalmars-d
The bad news: the Phobos documentation sux. The good news: we can make things a lot better by just filling in blanks. For example, picking a function largely at random: http://dlang.org/phobos/std_uni.html#sicmp There is no Params section, no Returns: section, and no See_Also section. Hence

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Daniel Murphy via Digitalmars-d
"weaselcat" wrote in message news:cfxrrvjnhlofsxpxx...@forum.dlang.org... as an addendum, vibe.d reimplements huge amounts of phobos, is there a reason none of this is ever getting upstreamed? Some of it is blocked waiting on other parts to be implemented, the rest is waiting for someone to

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Daniel Murphy via Digitalmars-d
"weaselcat" wrote in message news:vlrwhuvaxxhsvvtdz...@forum.dlang.org... what is the point of having a half-assed version in the _standard_ library??? It predates vibe.d's version by many many years, and nobody has fixed or replaced it. As Andrei said, nobody has even bothered documenting

Re: calling C variadic arguments with no 'argc' and only variadic arguments

2015-03-17 Thread Daniel Murphy via Digitalmars-d
"Laeeth Isharc" wrote in message news:jmlgralvzaqperfkn...@forum.dlang.org... DMD gave me an error message for the following declarations: double mgl_rnd (...); double mgl_rnd_ (...); It says I need at least one fixed argument first. But the C headers are as they are. I could work around

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread bachmeier via Digitalmars-d
On Tuesday, 17 March 2015 at 22:04:08 UTC, jmh530 wrote: Nevertheless, I think that there would be a lot of value in writing up what you have done with R and D. That sounds very interesting. I posted a link elsewhere in this thread, but it's buried in all these posts, so here it is again: h

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread bachmeier via Digitalmars-d
On Wednesday, 18 March 2015 at 01:52:00 UTC, Laeeth Isharc wrote: PyD is pretty nice, although one wouldn't want to call it from an inner loop. Why wouldn't you want to call it from an inner loop?

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 17 March 2015 at 21:00:11 UTC, bachmeier wrote: On Tuesday, 17 March 2015 at 19:00:06 UTC, jmh530 wrote: In addition, further development of the ability to call D from R or Python* or Julia (or vice-versa) would also be a positive. What do you have in mind? I no longer work much wi

Re: Replace core language HexStrings with library entity

2015-03-17 Thread weaselcat via Digitalmars-d
On Wednesday, 18 March 2015 at 00:45:56 UTC, weaselcat wrote: On Wednesday, 18 March 2015 at 00:34:06 UTC, Daniel Murphy wrote: "Andrei Alexandrescu" wrote in message news:me9s2m$308v$1...@digitalmars.com... It pains me to no end to see energy going in all the wrong places. Just now I was re

Re: calling C variadic arguments with no 'argc' and only variadic arguments

2015-03-17 Thread Laeeth Isharc via Digitalmars-d
sorry - posted in wrong forum On Wednesday, 18 March 2015 at 00:54:07 UTC, Laeeth Isharc wrote: So I ported the C API for MathGL to D, and it is up at code.dlang.org (under dmathgl). MathGL is a nice plotting library. http://mathgl.sourceforge.net/doc_en/Pictures.html#Pictures Later I will

calling C variadic arguments with no 'argc' and only variadic arguments

2015-03-17 Thread Laeeth Isharc via Digitalmars-d
So I ported the C API for MathGL to D, and it is up at code.dlang.org (under dmathgl). MathGL is a nice plotting library. http://mathgl.sourceforge.net/doc_en/Pictures.html#Pictures Later I will work on porting the C++ interface, but so far it at least works for the simplest sample. (Not tr

Re: Replace core language HexStrings with library entity

2015-03-17 Thread weaselcat via Digitalmars-d
On Wednesday, 18 March 2015 at 00:34:06 UTC, Daniel Murphy wrote: "Andrei Alexandrescu" wrote in message news:me9s2m$308v$1...@digitalmars.com... It pains me to no end to see energy going in all the wrong places. Just now I was reviewing some code using std.json. Most everybody admits that l

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread amber via Digitalmars-d
On Wednesday, 18 March 2015 at 00:04:26 UTC, Andrei Alexandrescu wrote: On 3/17/15 3:58 PM, amber wrote: On Tuesday, 17 March 2015 at 18:32:10 UTC, Almighty Bob wrote: On Tuesday, 17 March 2015 at 12:52:01 UTC, Atila Neves wrote: On Tuesday, 17 March 2015 at 10:31:06 UTC, Almighty Bob wrote:

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Daniel Murphy via Digitalmars-d
"Andrei Alexandrescu" wrote in message news:me9s2m$308v$1...@digitalmars.com... It pains me to no end to see energy going in all the wrong places. Just now I was reviewing some code using std.json. Most everybody admits that library could be improved or rewritten. There's been some work on th

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Andrei Alexandrescu via Digitalmars-d
On 3/17/15 3:58 PM, amber wrote: On Tuesday, 17 March 2015 at 18:32:10 UTC, Almighty Bob wrote: On Tuesday, 17 March 2015 at 12:52:01 UTC, Atila Neves wrote: On Tuesday, 17 March 2015 at 10:31:06 UTC, Almighty Bob wrote: This discussion happens often when discussing C++'s or D's `auto`. It doe

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread amber via Digitalmars-d
On Tuesday, 17 March 2015 at 22:58:42 UTC, amber wrote: I had to take it all out again and in the end implemented my own iota with my original approach (as above). I'm not doing that again. bye, amber On a side note, to implement iota I copied it from Phobos with minor changes. I was re

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread amber via Digitalmars-d
On Tuesday, 17 March 2015 at 18:32:10 UTC, Almighty Bob wrote: On Tuesday, 17 March 2015 at 12:52:01 UTC, Atila Neves wrote: On Tuesday, 17 March 2015 at 10:31:06 UTC, Almighty Bob wrote: This discussion happens often when discussing C++'s or D's `auto`. It doesn't matter what the type is, wha

Re: const as default for variables

2015-03-17 Thread deadalnix via Digitalmars-d
On Tuesday, 17 March 2015 at 22:25:30 UTC, Zach the Mystic wrote: The real devil against safe reference counting is in the assignment operators, when they do destructive moves. I think those have to be the focus of any effort here. I'm trying to imagine a parameter attribute `@destroy`, for e

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread deadalnix via Digitalmars-d
On Tuesday, 17 March 2015 at 22:30:37 UTC, Andrei Alexandrescu wrote: On 3/17/15 1:50 PM, Bienlein wrote: Go is only a CSP-like, it isn't CSP. cf Python-CSP and PyCSP, not to mention JCSP and GPars. I'm not really sure whether this can be put exactly that way. On a machine with 4 GB RAM yo

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Andrei Alexandrescu via Digitalmars-d
On 3/17/15 1:50 PM, Bienlein wrote: Go is only a CSP-like, it isn't CSP. cf Python-CSP and PyCSP, not to mention JCSP and GPars. I'm not really sure whether this can be put exactly that way. On a machine with 4 GB RAM you can spawn about 80.000 goroutines (aka green threads). Let's say each t

Re: const as default for variables

2015-03-17 Thread Zach the Mystic via Digitalmars-d
On Tuesday, 17 March 2015 at 19:53:14 UTC, deadalnix wrote: On Tuesday, 17 March 2015 at 13:55:36 UTC, Dejan Lekic wrote: I definitely think this is a good idea. And if someone wants mutable variable, we simply use proposed 'var' storage class. Brilliant! This is going to break pretty much a

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread jmh530 via Digitalmars-d
On Tuesday, 17 March 2015 at 21:00:11 UTC, bachmeier wrote: What do you have in mind? I no longer work much with Python so my knowledge is limited, but calling D from R or Julia should be no different from calling C from those languages, as you normally compile your C code into a shared library

Re: `return const` parameters make `inout` obsolete

2015-03-17 Thread Zach the Mystic via Digitalmars-d
On Tuesday, 17 March 2015 at 18:27:01 UTC, ixid wrote: To be fully viable, `return` would have to be secretly recorded as part of the `x's type, so that the compiler could forgive returning it to a non-const. But the compiler should probably track that `x` is copied from `t` anyway, so that it

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Baz via Digitalmars-d
On Tuesday, 17 March 2015 at 21:31:58 UTC, Artur Skawina wrote: On 03/17/15 22:18, Baz via Digitalmars-d wrote: On Tuesday, 17 March 2015 at 21:06:04 UTC, Artur Skawina wrote: On 03/17/15 20:47, deadalnix via Digitalmars-d wrote: Not that much. But q{ string are a pain in the ass. Why? I'm

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Artur Skawina via Digitalmars-d
On 03/17/15 22:18, Baz via Digitalmars-d wrote: > On Tuesday, 17 March 2015 at 21:06:04 UTC, Artur Skawina wrote: >> On 03/17/15 20:47, deadalnix via Digitalmars-d wrote: >>> >>> Not that much. But q{ string are a pain in the ass. >> >> Why? I'm not sure if you're referring to using or parsing them

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Carl Sturtivant via Digitalmars-d
Characterizing the problem as "Go versus D" is framing it to D's disadvantage. Broadly speaking Go is one thing & D is many things. The whole difficulty with D encountered by a person choosing which of (e.g.) Go and D to use lies in this difference. D as a whole is overwhelming in this situ

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Baz via Digitalmars-d
On Tuesday, 17 March 2015 at 21:06:04 UTC, Artur Skawina wrote: On 03/17/15 20:47, deadalnix via Digitalmars-d wrote: Not that much. But q{ string are a pain in the ass. Why? I'm not sure if you're referring to using or parsing them. The only problem with the former is the lack of a non-brac

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Artur Skawina via Digitalmars-d
On 03/17/15 20:47, deadalnix via Digitalmars-d wrote: > > Not that much. But q{ string are a pain in the ass. Why? I'm not sure if you're referring to using or parsing them. The only problem with the former is the lack of a non-brace-nesting variant. Lexing is quite trivial, as long as the lexer

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread bachmeier via Digitalmars-d
On Tuesday, 17 March 2015 at 19:00:06 UTC, jmh530 wrote: In addition, further development of the ability to call D from R or Python* or Julia (or vice-versa) would also be a positive. What do you have in mind? I no longer work much with Python so my knowledge is limited, but calling D from R o

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Bienlein via Digitalmars-d
Go is only a CSP-like, it isn't CSP. cf Python-CSP and PyCSP, not to mention JCSP and GPars. I'm not really sure whether this can be put exactly that way. On a machine with 4 GB RAM you can spawn about 80.000 goroutines (aka green threads). Let's say each threads calculates a large fibonac

Re: const as default for variables

2015-03-17 Thread deadalnix via Digitalmars-d
On Tuesday, 17 March 2015 at 13:55:36 UTC, Dejan Lekic wrote: I definitely think this is a good idea. And if someone wants mutable variable, we simply use proposed 'var' storage class. Brilliant! This is going to break pretty much all the code that use auto. The benefice for the compiler is

Re: Replace core language HexStrings with library entity

2015-03-17 Thread H. S. Teoh via Digitalmars-d
On Tue, Mar 17, 2015 at 07:47:05PM +, deadalnix via Digitalmars-d wrote: > On Tuesday, 17 March 2015 at 14:14:59 UTC, Daniel Murphy wrote: > >"Nick Treleaven" wrote in message news:me98hl$2erf$1...@digitalmars.com... > > > >>They add complexity to tools such as ctags (written in C, the > >>fis

Re: Replace core language HexStrings with library entity

2015-03-17 Thread deadalnix via Digitalmars-d
On Tuesday, 17 March 2015 at 14:14:59 UTC, Daniel Murphy wrote: "Nick Treleaven" wrote in message news:me98hl$2erf$1...@digitalmars.com... They add complexity to tools such as ctags (written in C, the fishman fork supports D but not D-specific strings). Yes, but only a very little bit. How

Re: Question about opSlice

2015-03-17 Thread Ilya Ivanov via Digitalmars-d
On Tuesday, 17 March 2015 at 17:36:22 UTC, Ali Çehreli wrote: On 03/17/2015 09:29 AM, John Colvin wrote: On Tuesday, 17 March 2015 at 13:57:18 UTC, Ilya Ivanov wrote: [snip] I recently did a full Array2D with slicing and non-contiguous views etc and found that it was quite a nightmare getting

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread jmh530 via Digitalmars-d
I thoroughly enjoyed reading this thread. I don't have much experience with Go, but for a quick project, my goto language is typically Python. However, there are definitely areas that Python can be frustrating (where you have to have a loop, parallel processing). I would view D as an ideal lang

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Almighty Bob via Digitalmars-d
On Tuesday, 17 March 2015 at 12:52:01 UTC, Atila Neves wrote: On Tuesday, 17 March 2015 at 10:31:06 UTC, Almighty Bob wrote: This discussion happens often when discussing C++'s or D's `auto`. It doesn't matter what the type is, what matters is in the interface. As for storing it: auto foo =

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Andrei Alexandrescu via Digitalmars-d
On 3/17/15 10:33 AM, Artur Skawina via Digitalmars-d wrote: On 03/17/15 15:15, Daniel Murphy via Digitalmars-d wrote: "Nick Treleaven" wrote in message news:me98hl$2erf$1...@digitalmars.com... They add complexity to tools such as ctags (written in C, the fishman fork supports D but not D-spe

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Almighty Bob via Digitalmars-d
On Tuesday, 17 March 2015 at 11:48:15 UTC, Nick Treleaven wrote: On 17/03/2015 10:31, Almighty Bob wrote: It's far more useful for csvReader to return a type I know and can use than it is to obscure the return type for the sake of some philosophical ideal of increasing encapsulation. Part of t

Re: `return const` parameters make `inout` obsolete

2015-03-17 Thread ixid via Digitalmars-d
To be fully viable, `return` would have to be secretly recorded as part of the `x's type, so that the compiler could forgive returning it to a non-const. But the compiler should probably track that `x` is copied from `t` anyway, so that it can verify `return t` when it returns `x`, and the same

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Artur Skawina via Digitalmars-d
On 03/17/15 15:15, Daniel Murphy via Digitalmars-d wrote: > "Nick Treleaven" wrote in message news:me98hl$2erf$1...@digitalmars.com... > >> They add complexity to tools such as ctags (written in C, the fishman fork >> supports D but not D-specific strings). > > Yes, but only a very little bit.

Re: Question about opSlice

2015-03-17 Thread Ali Çehreli via Digitalmars-d
On 03/17/2015 09:29 AM, John Colvin wrote: On Tuesday, 17 March 2015 at 13:57:18 UTC, Ilya Ivanov wrote: [snip] I recently did a full Array2D with slicing and non-contiguous views etc and found that it was quite a nightmare getting all this stuff correct. I think your mistake is that opSlice ne

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Baz via Digitalmars-d
On Tuesday, 17 March 2015 at 16:55:53 UTC, bearophile wrote: Baz: https://github.com/D-Programming-Language/phobos/pull/3058 I suggest to replace "litteral" with "literal", as in computer science: http://en.wikipedia.org/wiki/Literal_%28computer_programming%29 Bye, bearophile Thx, fixed.

Re: Replace core language HexStrings with library entity

2015-03-17 Thread bearophile via Digitalmars-d
Baz: https://github.com/D-Programming-Language/phobos/pull/3058 I suggest to replace "litteral" with "literal", as in computer science: http://en.wikipedia.org/wiki/Literal_%28computer_programming%29 Bye, bearophile

Re: Question about opSlice

2015-03-17 Thread John Colvin via Digitalmars-d
On Tuesday, 17 March 2015 at 16:29:38 UTC, John Colvin wrote: On Tuesday, 17 March 2015 at 13:57:18 UTC, Ilya Ivanov wrote: [snip] I recently did a full Array2D with slicing and non-contiguous views etc and found that it was quite a nightmare getting all this stuff correct. I think your mist

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Baz via Digitalmars-d
On Sunday, 15 March 2015 at 21:40:02 UTC, Walter Bright wrote: On 3/15/2015 2:34 PM, Walter Bright wrote: P.S. Also need to include all the examples in the dlang reference as unittest cases. Also, HexStrings can handle w and d postfixes. Use the lexer.c code for TOK::hexStringConstant() as a

Re: Question about opSlice

2015-03-17 Thread John Colvin via Digitalmars-d
On Tuesday, 17 March 2015 at 13:57:18 UTC, Ilya Ivanov wrote: [snip] I recently did a full Array2D with slicing and non-contiguous views etc and found that it was quite a nightmare getting all this stuff correct. I think your mistake is that opSlice needs to be a template to trigger the new-

Re: `return const` parameters make `inout` obsolete

2015-03-17 Thread Zach the Mystic via Digitalmars-d
On Tuesday, 17 March 2015 at 12:02:15 UTC, Nick Treleaven wrote: On 16/03/2015 14:17, Zach the Mystic wrote: char* fun(return const char* x); Compiler has enough information to adjust the return type of `fun()` to that of input `x`. This assumes return parameters have been generalized to all

Re: The next iteration of scope

2015-03-17 Thread via Digitalmars-d
On Tuesday, 17 March 2015 at 01:13:41 UTC, Zach the Mystic wrote: On Monday, 16 March 2015 at 20:50:46 UTC, Marc Schütz wrote: It works just the same: struct S { private int* payload_; ref int* payload() return { return payload_; } } ref int* payload(scope ref S __this) return

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Baz via Digitalmars-d
On Monday, 16 March 2015 at 21:32:45 UTC, Baz wrote: On Monday, 16 March 2015 at 16:45:25 UTC, Andrei Alexandrescu wrote: On 3/16/15 9:29 AM, Baz wrote: On Sunday, 15 March 2015 at 21:41:06 UTC, bearophile wrote: Walter Bright: Unfortunately, it needs to be a dropin replacement for x"...", w

Re: Question about opSlice

2015-03-17 Thread via Digitalmars-d
On Tuesday, 17 March 2015 at 15:10:22 UTC, Ilya Ivanov wrote: Tried with 2.067.0-rc1 - doesn't work. Did you compile with -unittest option? I hadn't, and indeed I get the errors now for both compiler versions. Sorry...

Re: Question about opSlice

2015-03-17 Thread Ilya Ivanov via Digitalmars-d
Tried with 2.067.0-rc1 - doesn't work. Did you compile with -unittest option?

Re: Question about opSlice

2015-03-17 Thread via Digitalmars-d
On Tuesday, 17 March 2015 at 13:57:18 UTC, Ilya Ivanov wrote: Can please someone tell me what is wrong with my code or is it a bug? The compilation errors are: D:\DLang\test.d(184): Error: vector[0..2] is not an lvalue D:\DLang\test.d(186): Error: vector[0..2] is not an lvalue D:\DLang\test.d(188

Re: Question about opSlice

2015-03-17 Thread ketmar via Digitalmars-d
On Tue, 17 Mar 2015 13:57:16 +, Ilya Ivanov wrote: tl;dr. please, have some mercy! the less unnecessary code you post, the easier to answer. signature.asc Description: PGP signature

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Daniel Murphy via Digitalmars-d
"Nick Treleaven" wrote in message news:me98hl$2erf$1...@digitalmars.com... They add complexity to tools such as ctags (written in C, the fishman fork supports D but not D-specific strings). Yes, but only a very little bit. How much code could you delete from a D lexer if they were removed?

Question about opSlice

2015-03-17 Thread Ilya Ivanov via Digitalmars-d
Can please someone tell me what is wrong with my code or is it a bug? The compilation errors are: D:\DLang\test.d(184): Error: vector[0..2] is not an lvalue D:\DLang\test.d(186): Error: vector[0..2] is not an lvalue D:\DLang\test.d(188): Error: vector.opSlice(0u, 2u) is not an lvalue D:\DLang\test

Re: const as default for variables

2015-03-17 Thread Dejan Lekic via Digitalmars-d
On Saturday, 14 March 2015 at 20:15:30 UTC, Walter Bright wrote: I've often thought, as do many others here, that immutability should be the default for variables. [This is a long term issue. Just thought maybe it's time for a conversation about it.] Because immutable is transitive, declarin

Re: dfmt options

2015-03-17 Thread ketmar via Digitalmars-d
On Tue, 17 Mar 2015 10:36:47 +0100, Jacob Carlborg wrote: > On 2015-03-16 01:13, Rikki Cattermole wrote: > >> Its just a real pain to create these stubs by hand. Atleast this way, >> people will moan about documentation being empty and it'll seem less >> work to do. > > This should be done by th

Re: Replace core language HexStrings with library entity

2015-03-17 Thread ketmar via Digitalmars-d
On Tue, 17 Mar 2015 11:34:27 +, Biotronic wrote: > On Monday, 16 March 2015 at 12:53:24 UTC, Nick Treleaven wrote: >> 0b1010 binary literals (even though C++11 supports them) >> 0xABCD hex literals (but useful for porting C) > > And while we're at it, why not remove those pesky base-10 litera

Re: Replace core language HexStrings with library entity

2015-03-17 Thread ketmar via Digitalmars-d
On Tue, 17 Mar 2015 12:00:09 +, Nick Treleaven wrote: > On 17/03/2015 03:28, Andrei Alexandrescu wrote: >> On a higher level: there's no subset of the language that's at the same >> time sufficiently complex and sufficiently obscure to make its removal >> a net positive. > > q"" delimited str

Re: Replace core language HexStrings with library entity

2015-03-17 Thread ketmar via Digitalmars-d
On Tue, 17 Mar 2015 13:16:58 +, ketmar wrote: > On Tue, 17 Mar 2015 12:00:09 +, Nick Treleaven wrote: > >> On 17/03/2015 03:28, Andrei Alexandrescu wrote: >>> On a higher level: there's no subset of the language that's at the >>> same time sufficiently complex and sufficiently obscure to

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Nick Treleaven via Digitalmars-d
On 17/03/2015 12:42, Daniel Murphy wrote: "Nick Treleaven" wrote in message news:me950a$2boc$1...@digitalmars.com... On 17/03/2015 03:28, Andrei Alexandrescu wrote: > On a higher level: there's no subset of the language that's at the same > time sufficiently complex and sufficiently obscure to

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Atila Neves via Digitalmars-d
On Tuesday, 17 March 2015 at 10:31:06 UTC, Almighty Bob wrote: On Tuesday, 17 March 2015 at 09:25:57 UTC, Panke wrote: How do you keep it around if you cant declare a member to hold it? It's all well and good explaining the reason for them but it doesnt void the fact that they are a PITA if y

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Daniel Murphy via Digitalmars-d
"Nick Treleaven" wrote in message news:me950a$2boc$1...@digitalmars.com... On 17/03/2015 03:28, Andrei Alexandrescu wrote: > On a higher level: there's no subset of the language that's at the same > time sufficiently complex and sufficiently obscure to make its removal a > net positive. q"" de

Re: Situation with D on iOS, Android, and WP8?

2015-03-17 Thread Rishub Nagpal via Digitalmars-d
On Tuesday, 17 March 2015 at 07:12:07 UTC, Mitchell wrote: Hi Mitchell - For iOS, if you are willing to build the LLVM + LDC compiler chain, then please try: https://github.com/smolt/ldc-iphone-dev The readme lists the current state of things. You can build and run phobos hello world, and

Re: `return const` parameters make `inout` obsolete

2015-03-17 Thread Nick Treleaven via Digitalmars-d
On 16/03/2015 14:17, Zach the Mystic wrote: char* fun(return const char* x); Compiler has enough information to adjust the return type of `fun()` to that of input `x`. This assumes return parameters have been generalized to all reference types. Destroy. inout can be used for local variables to

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Nick Treleaven via Digitalmars-d
On 17/03/2015 03:28, Andrei Alexandrescu wrote: On a higher level: there's no subset of the language that's at the same time sufficiently complex and sufficiently obscure to make its removal a net positive. q"" delimited strings. No one uses them (used once in all of Phobos). They are obscure

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Nick Treleaven via Digitalmars-d
On 17/03/2015 11:34, Biotronic wrote: On Monday, 16 March 2015 at 12:53:24 UTC, Nick Treleaven wrote: 0b1010 binary literals (even though C++11 supports them) 0xABCD hex literals (but useful for porting C) And while we're at it, why not remove those pesky base-10 literals as well? Shouldn't be

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Nick Treleaven via Digitalmars-d
On 17/03/2015 01:45, Daniel Murphy wrote: "Nick Treleaven" wrote in message news:me6jo4$ca$1...@digitalmars.com... 0b1010 binary literals (even though C++11 supports them) 0xABCD hex literals (but useful for porting C) You can take them when you pry them from my cold, dead hands. These are

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Nick Treleaven via Digitalmars-d
On 17/03/2015 10:31, Almighty Bob wrote: It's far more useful for csvReader to return a type I know and can use than it is to obscure the return type for the sake of some philosophical ideal of increasing encapsulation. Part of the art of API design is to hide implementation where it's not nec

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread John Colvin via Digitalmars-d
On Tuesday, 17 March 2015 at 11:39:04 UTC, John Colvin wrote: On Tuesday, 17 March 2015 at 08:46:52 UTC, Almighty Bob wrote: On Tuesday, 17 March 2015 at 07:15:17 UTC, Walter Bright wrote: On 3/16/2015 4:29 AM, ninja wrote: This. Figuring out the return types in the examples was a daily strugg

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread John Colvin via Digitalmars-d
On Tuesday, 17 March 2015 at 08:46:52 UTC, Almighty Bob wrote: On Tuesday, 17 March 2015 at 07:15:17 UTC, Walter Bright wrote: On 3/16/2015 4:29 AM, ninja wrote: This. Figuring out the return types in the examples was a daily struggle in the first few weeks. When Voldemort types are returned

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Biotronic via Digitalmars-d
On Monday, 16 March 2015 at 12:53:24 UTC, Nick Treleaven wrote: 0b1010 binary literals (even though C++11 supports them) 0xABCD hex literals (but useful for porting C) And while we're at it, why not remove those pesky base-10 literals as well? Shouldn't be too hard to write dec!"123456" instead

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Almighty Bob via Digitalmars-d
On Tuesday, 17 March 2015 at 09:25:57 UTC, Panke wrote: How do you keep it around if you cant declare a member to hold it? It's all well and good explaining the reason for them but it doesnt void the fact that they are a PITA if you say want to use cvsReader to parse some records and keep the

Re: Replace core language HexStrings with library entity

2015-03-17 Thread Daniel Murphy via Digitalmars-d
"Andrei Alexandrescu" wrote in message news:me870h$1fnc$1...@digitalmars.com... On a higher level: there's no subset of the language that's at the same time sufficiently complex and sufficiently obscure to make its removal a net positive. Associative arrays come close, but only because of t

Re: [WORK] [IMPORTANT] [URGENT] ddox generation

2015-03-17 Thread Vladimir Panteleev via Digitalmars-d
On Wednesday, 11 March 2015 at 05:27:58 UTC, Vladimir Panteleev wrote: On Wednesday, 11 March 2015 at 05:21:27 UTC, Vladimir Panteleev wrote: On Wednesday, 11 March 2015 at 05:15:08 UTC, Andrei Alexandrescu wrote: Hey folks, a while ago I raised the point about the bad rendering of ddox-generat

Re: sudo apt-get install dmd

2015-03-17 Thread Jacob Carlborg via Digitalmars-d
On 2015-03-16 12:01, Leandro Lucarella wrote: I'm not sure Ubuntu allows hosting non-FLOSS in their PPAs. How are proprietary drivers installed, from other sources? -- /Jacob Carlborg

Re: dfmt options

2015-03-17 Thread Dragos Carp via Digitalmars-d
On Saturday, 14 March 2015 at 23:49:00 UTC, Walter Bright wrote: On 3/14/2015 4:15 PM, Brian Schott wrote: What am I missing? I suggest defining "The One True Way" and have no configuration options. +1

Re: dfmt options

2015-03-17 Thread Jacob Carlborg via Digitalmars-d
On 2015-03-16 01:13, Rikki Cattermole wrote: Its just a real pain to create these stubs by hand. Atleast this way, people will moan about documentation being empty and it'll seem less work to do. This should be done by the editor. -- /Jacob Carlborg

Re: dfmt options

2015-03-17 Thread Jacob Carlborg via Digitalmars-d
On 2015-03-15 06:54, Dicebot wrote: On actual topic : having look at Eclipse C++ codestyle options may give many useful hints. And for Eclipse Java formatting options. -- /Jacob Carlborg

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Panke via Digitalmars-d
How do you keep it around if you cant declare a member to hold it? It's all well and good explaining the reason for them but it doesnt void the fact that they are a PITA if you say want to use cvsReader to parse some records and keep the results as a class member. I don't think csvReader su

Re: dfmt options

2015-03-17 Thread Jacob Carlborg via Digitalmars-d
On 2015-03-15 00:15, Brian Schott wrote: What am I missing? * Ideally, any space that is optional in the language should be configurable * Newlines between functions/structs/classes and so on * Preserve grouping of variable declarations, i.e. int a; int b; int foo; int bar; -- /Jacob Carl

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Almighty Bob via Digitalmars-d
On Tuesday, 17 March 2015 at 07:15:17 UTC, Walter Bright wrote: On 3/16/2015 4:29 AM, ninja wrote: This. Figuring out the return types in the examples was a daily struggle in the first few weeks. When Voldemort types are returned, they must be by auto. The user isn't supposed to know what th

Re: Situation with D on iOS, Android, and WP8?

2015-03-17 Thread Nick Sabalausky via Digitalmars-d
On 03/17/2015 03:12 AM, Mitchell wrote: That looks awesome. I really hope iOS and Android support make it into LDC, that would make picking the language for my next cross platform app very easy indeed :) Indeed. For some of my recent indie dabblings, Unreal Engine 4 has recently started tempt

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Nick Sabalausky via Digitalmars-d
On 03/17/2015 03:45 AM, "Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= " wrote: Yes, the scroll-scroll-scroll-scroll-where-did-they-hide-the-info-design is annoying and probably the result of using generic templates. Looks cheap. Funny thing is, I've seen a LOT of generic-template sites that look & f

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Russel Winder via Digitalmars-d
On Sun, 2015-03-15 at 14:13 +, Laeeth Isharc via Digitalmars-d wrote: […] > [I am by no means expert in Python, but python 3 does not seem to > be an improvement if you want to be able to accomplish tasks > involving simple processing of ASCII files] Not entirely true, this is a "belief" bei

Re: Additional type information

2015-03-17 Thread Volodymyr via Digitalmars-d
On Monday, 16 March 2015 at 19:52:07 UTC, Marc Schütz wrote: `const` does, but `ref` doesn't. You can check that by inserting `pragma(msg, typeof(x));` into the functions in your example. But there's nevertheless overloading for `ref`. Yeah... You are right, it is unclear and bad example :) A

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Nick Sabalausky via Digitalmars-d
On 03/17/2015 02:51 AM, Russel Winder via Digitalmars-d wrote: I have had this debate about "all websites looking the same, and so there is no branding" with a couple of new website owners, but to no avail. It seems the fashion has been encoded into the rules of webpage design. The fact that it l

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread via Digitalmars-d
On Tuesday, 17 March 2015 at 06:31:32 UTC, Nick Sabalausky wrote: On 03/14/2015 08:49 PM, Xavier Bigand wrote: Take a look to the new Qt web site : http://www.qt.io/ While I personally think the latest D homepage redesign looks stylistically inconsistent and a bit cluttered and messy (I do

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Russel Winder via Digitalmars-d
On Sat, 2015-03-14 at 22:18 +, deadalnix via Digitalmars-d wrote: […] > So now we are going from Go is safe, to well, it is obviously not > safe (then, why were you so eager to have a proof ?) but nobody > in their right mind would do something like this. It is usually Andrei that catches me

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Russel Winder via Digitalmars-d
On Sat, 2015-03-14 at 12:54 -0700, Andrei Alexandrescu via Digitalmars-d wrote: > On 3/14/15 11:24 AM, Russel Winder via Digitalmars-d wrote: > > But yes, it certainly shows you can create shared-memory > > "multi-threading" this way, > > So your affirmation has been refuted. It appears so, I gro

Re: A few notes on choosing between Go and D for a quick project

2015-03-17 Thread Walter Bright via Digitalmars-d
On 3/16/2015 4:29 AM, ninja wrote: This. Figuring out the return types in the examples was a daily struggle in the first few weeks. When Voldemort types are returned, they must be by auto. The user isn't supposed to know what the return type is, just how to use it.

Re: Situation with D on iOS, Android, and WP8?

2015-03-17 Thread Mitchell via Digitalmars-d
Hi Mitchell - For iOS, if you are willing to build the LLVM + LDC compiler chain, then please try: https://github.com/smolt/ldc-iphone-dev The readme lists the current state of things. You can build and run phobos hello world, and much more. I am trying to decide weather to cleanup and po

Re: Defining a single opCast disables explicit cast to base interfaces

2015-03-17 Thread jkpl via Digitalmars-d
On Tuesday, 17 March 2015 at 05:27:38 UTC, Ali Çehreli wrote: The following program compiles fine: interface I {} class B : I {} class C : B { int i; } void main() { auto c = new C; auto i = cast(I)c;// compiles auto b = cast(B)c;// compiles } Let's add an unrelated

Re: enabling persistent state for the REPL?

2015-03-17 Thread Russel Winder via Digitalmars-d
On Tue, 2015-03-17 at 00:55 +, Laeeth Isharc via Digitalmars-d wrote: […] > What do you/others think about having the REPL serialize any > variables (optionally only those that are declared in a certain > way, or part of a particular struct) to RAM disk or SSD and > reload them at each stage