C++ tooling build on flint's tokenizer

2014-08-03 Thread via Digitalmars-d-announce
Hi, I built a small C++ function sorter on top of flint's Tokenizer.d: https://github.com/kuettler/tooling This is a proof of concept implementation (only useful if you really want your functions to be sorted). The idea is that a simple scanning of the token array gives you enough structure

Re: SDC-32bit

2014-08-03 Thread Stefan Koch via Digitalmars-d-announce
On Saturday, 2 August 2014 at 22:48:35 UTC, Shammah Chancellor wrote: On 2014-08-01 05:00:53 +, deadalnix said: On Tuesday, 29 July 2014 at 13:36:39 UTC, Stefan Koch wrote: Hello, I am happy to announce that my 32bit version of sdc compiles the whole testsuite including mixins. the only

Re: SDC-32bit

2014-08-03 Thread ketmar via Digitalmars-d-announce
On Fri, 01 Aug 2014 15:49:09 + Stefan Koch via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: it must have a commit I have squashed. I do this quite often since sometimes I commit stuff that causes my build to fail :p btw, please, don't do that. just revert commits,

Re: SDC-32bit

2014-08-03 Thread John Colvin via Digitalmars-d-announce
On Sunday, 3 August 2014 at 11:19:01 UTC, Stefan Koch wrote: On Saturday, 2 August 2014 at 22:48:35 UTC, Shammah Chancellor wrote: On 2014-08-01 05:00:53 +, deadalnix said: On Tuesday, 29 July 2014 at 13:36:39 UTC, Stefan Koch wrote: Hello, I am happy to announce that my 32bit version of

Re: SDC-32bit

2014-08-03 Thread Stefan Koch via Digitalmars-d-announce
On Sunday, 3 August 2014 at 11:37:26 UTC, John Colvin wrote: On Sunday, 3 August 2014 at 11:19:01 UTC, Stefan Koch wrote: On Saturday, 2 August 2014 at 22:48:35 UTC, Shammah Chancellor wrote: On 2014-08-01 05:00:53 +, deadalnix said: On Tuesday, 29 July 2014 at 13:36:39 UTC, Stefan Koch

Re: SDC-32bit

2014-08-03 Thread Stefan Koch via Digitalmars-d-announce
On Sunday, 3 August 2014 at 11:31:10 UTC, ketmar via Digitalmars-d-announce wrote: On Fri, 01 Aug 2014 15:49:09 + Stefan Koch via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: it must have a commit I have squashed. I do this quite often since sometimes I commit stuff

Need a flyer design for a concert?

2014-08-03 Thread Emily Wilson via Digitalmars-d-announce
Hello you Need a flyer design for a concert, club night, sale, trade show, movie, or festival? These are just a small sample of the kinds of posters we can create for you. Twisted Palette provides Graphic Design solutions for businesses individuals with consistent high quality solutions to give

Re: DMD v2.066.0-rc1

2014-08-03 Thread Dicebot via Digitalmars-d-announce
On Thursday, 31 July 2014 at 12:51:53 UTC, Andrew Edwards wrote: DMD v2.066.0-rc1 binaries are available for testing: http://wiki.dlang.org/Beta_Testing Want to bring attention of wider audience that this release really needs all help it can get - regression count still stays high as

Re: DMD v2.066.0-rc1

2014-08-03 Thread Manu via Digitalmars-d-announce
This windiows installer went wrong on me. First, it tried to uninstall, it offered to uninstall from 'C:\D'. My DMD install is 'C:\dev\D'... The path was presented in a greyed out textbox that I couldn't type in to correct it, and no button to select the true install location. The uninstall step

Re: SDC-32bit

2014-08-03 Thread deadalnix via Digitalmars-d-announce
On Saturday, 2 August 2014 at 22:48:35 UTC, Shammah Chancellor wrote: Also, it looks by using your fiber based scheduler that you can naturally parallize compiling. Have you investigated that at all? Obviously, yes. But that is quite tricky to get a deterministic result due to compile time

Re: SDC-32bit

2014-08-03 Thread deadalnix via Digitalmars-d-announce
On Sunday, 3 August 2014 at 11:37:26 UTC, John Colvin wrote: Any idea what the significant bottlenecks are / what dmd is much faster at? No idea. I'd like to know, but ultimately, supporting more of D is more important than being fast right now.

Re: Associative Ranges

2014-08-03 Thread Freddy via Digitalmars-d
On Friday, 1 August 2014 at 23:57:37 UTC, Freddy wrote: I just curious, do Associative Ranges exist. If so where can i find them. I started thinking about them when i asked this question: http://forum.dlang.org/thread/vauuognmhvtjrktaz...@forum.dlang.org I started a phobos fork for this, what

std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
We need a better json library at Facebook. I'd discussed with Sönke the possibility of taking vibe.d's json to std but he said it needs some more work. So I took std.jgrandson to proof of concept state and hence ready for destruction: http://erdani.com/d/jgrandson.d

Short overview on D

2014-08-03 Thread Bayan Rafeh via Digitalmars-d
A small background on this: I'm a university student about to start my graduation project with two teammates, both of which have a C/Java/Python background and I suggested we use D for our project. They're not familiar with it, so I wrote a short tutorial for them here:

Re: std.jgrandson

2014-08-03 Thread Johannes Pfau via Digitalmars-d
Am Sun, 03 Aug 2014 00:16:04 -0700 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: We need a better json library at Facebook. I'd discussed with Sönke the possibility of taking vibe.d's json to std but he said it needs some more work. So I took std.jgrandson to proof of concept

Re: Short overview on D

2014-08-03 Thread Rikki Cattermole via Digitalmars-d
On 3/08/2014 7:36 p.m., Bayan Rafeh wrote: A small background on this: I'm a university student about to start my graduation project with two teammates, both of which have a C/Java/Python background and I suggested we use D for our project. They're not familiar with it, so I wrote a short

Re: Short overview on D

2014-08-03 Thread anonymous via Digitalmars-d
-- Functions -- Ref implies the type is a reference type, i.e. changes inside the functions will change the variable outside the function. in means immutable out is an alias for ref(preferably used for parameters) `ref` doesn't imply a reference, it declares or states or something. `in`

Re: std.jgrandson

2014-08-03 Thread bearophile via Digitalmars-d
Andrei Alexandrescu: * The representation is built on Algebraic, Good. But here I'd like a little more readable type: alias Payload = std.variant.VariantN!(16LU, typeof(null), bool, double, string, Value[], Value[string]).VariantN; Like: alias Payload =

Re: Voting: std.logger

2014-08-03 Thread Kagamin via Digitalmars-d
On Friday, 1 August 2014 at 20:20:00 UTC, Jeremy Powers via Digitalmars-d wrote: Can you tell, what `log(1)` does? Is there a irrefutable requirement to have a log function without explicit level? As I understand, it's a defensive feature. There are things one wants in the log

Re: std.jgrandson

2014-08-03 Thread ponce via Digitalmars-d
API looks great but I'd like to see some simple serialize/deserialize functions as in vibed: http://vibed.org/api/vibe.data.json/deserializeJson http://vibed.org/api/vibe.data.json/serializeToJson vibe uses UDAs to customize the serialization output. That's actually not json specific and

Re: Associative Ranges

2014-08-03 Thread via Digitalmars-d
On Sunday, 3 August 2014 at 06:19:12 UTC, Freddy wrote: On Friday, 1 August 2014 at 23:57:37 UTC, Freddy wrote: I just curious, do Associative Ranges exist. If so where can i find them. I started thinking about them when i asked this question:

Re: assume, assert, enforce, @safe

2014-08-03 Thread via Digitalmars-d
On Sunday, 3 August 2014 at 02:27:16 UTC, Jonathan M Davis wrote: On Saturday, 2 August 2014 at 09:46:57 UTC, Marc Schütz wrote: On Friday, 1 August 2014 at 21:50:59 UTC, Jonathan M Davis wrote: And why is that a problem? By definition, if an assertion fails, your code is in an invalid state,

Re: checkedint call removal

2014-08-03 Thread Paolo Invernizzi via Digitalmars-d
On Saturday, 2 August 2014 at 20:04:32 UTC, Johannes Pfau wrote: Am Sat, 02 Aug 2014 12:19:41 -0700 schrieb Walter Bright newshou...@digitalmars.com: On 8/2/2014 6:20 AM, Artur Skawina via Digitalmars-d wrote: The bug was _introduced_ by the assert, the code was 100% correct. Asserts are

Re: checkedint call removal

2014-08-03 Thread Paolo Invernizzi via Digitalmars-d
On Saturday, 2 August 2014 at 22:00:27 UTC, Andrew Godfrey wrote: On Saturday, 2 August 2014 at 21:36:11 UTC, Tobias Pankrath wrote: On Saturday, 2 August 2014 at 21:25:40 UTC, Ola Fosheim Grøstad wrote: On Saturday, 2 August 2014 at 20:27:09 UTC, Andrei Alexandrescu wrote: Hmmm... code that

Re: checkedint call removal

2014-08-03 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 3 August 2014 at 04:29:28 UTC, Kapps wrote: On Saturday, 2 August 2014 at 19:10:51 UTC, Walter Bright wrote: On 8/2/2014 4:12 AM, Artur Skawina via Digitalmars-d wrote: More importantly, it's a huge security flaw. Not all bugs are equal; an assertion being false means a bug

Re: std.jgrandson

2014-08-03 Thread Sönke Ludwig via Digitalmars-d
Am 03.08.2014 10:25, schrieb ponce: API looks great but I'd like to see some simple serialize/deserialize functions as in vibed: http://vibed.org/api/vibe.data.json/deserializeJson http://vibed.org/api/vibe.data.json/serializeToJson vibe uses UDAs to customize the serialization output. That's

Re: std.jgrandson

2014-08-03 Thread Sönke Ludwig via Digitalmars-d
A few thoughts based on my experience with vibe.data.json: 1. No decoding of strings appears to mean that Value also always contains encoded strings. This seems the be a leaky and also error prone leaky abstraction. For the token stream, performance should be top priority, so it's okay to not

Re: assume, assert, enforce, @safe

2014-08-03 Thread Kagamin via Digitalmars-d
On Friday, 1 August 2014 at 16:04:21 UTC, Daniel Murphy wrote: Johannes Pfau wrote in message news:lrgar7$1vrr$1...@digitalmars.com... Do you know if linkers actually guarantee that behaviour? AFAICS dmd doesn't do anything special, it always emits weak symbols and just calls gcc to link.

Re: Official PPA for dmd

2014-08-03 Thread Jordi Sayol via Digitalmars-d
El 01/08/14 21:34, Andrew Pennebaker via Digitalmars-d ha escrit: I'm happy to see an official .DEB for installing DMD! Could we please host this in a PPA, to make it easier for Debian/Ubuntu users to install? dmd backend license is not compatible with PPA. -- Jordi Sayol

Re: checkedint call removal

2014-08-03 Thread Artur Skawina via Digitalmars-d
On 08/03/14 06:29, Kapps via Digitalmars-d wrote: Not all bugs are equal; an assertion being false means a bug exists, but optimizing based off of this allows much more severe bugs to exist. Yes. Giving a new meaning to `assert` would also affect how it's used. Asserts would be used not only

And in the disruptive technologies section…

2014-08-03 Thread Russel Winder via Digitalmars-d
The numba package (and llvmpy below it) is rapidly getting to production use stage, this means all those people using Python for data analysis (and there are a lot of them) will no longer be searching for Cython/C/C ++/D to speed up their codes, they'll just @autojit their Python code to generate

Re: checkedint call removal

2014-08-03 Thread Timon Gehr via Digitalmars-d
On 08/02/2014 11:36 PM, Tobias Pankrath wrote: On Saturday, 2 August 2014 at 21:25:40 UTC, Ola Fosheim Grøstad wrote: On Saturday, 2 August 2014 at 20:27:09 UTC, Andrei Alexandrescu wrote: Hmmm... code that fails assertions is hardly working. -- Andrei It is not the code that fails the

Re: checkedint call removal

2014-08-03 Thread Timon Gehr via Digitalmars-d
On 08/03/2014 11:15 AM, Paolo Invernizzi wrote: because every few milliseconds an assert is triggered Right, and software does not have security holes because otherwise they would obviously be exploited every few milliseconds during in-house testing. the colleague reading the sources is

Re: Short overview on D

2014-08-03 Thread Gary Willoughby via Digitalmars-d
On Sunday, 3 August 2014 at 08:07:04 UTC, Rikki Cattermole wrote: Your introduction to templates is far too simplistic. You can use this[1] as a source to beef things up there. http://nomad.so/2013/07/templates-in-d-explained/

Re: Short overview on D

2014-08-03 Thread Bayan Rafeh via Digitalmars-d
Wow clearly I misunderstood a lot of stuff. On Sunday, 3 August 2014 at 08:07:04 UTC, Rikki Cattermole wrote: On 3/08/2014 7:36 p.m., Bayan Rafeh wrote: A small background on this: I'm a university student about to start my graduation project with two teammates, both of which have a

Re: Short overview on D

2014-08-03 Thread Nobody via Digitalmars-d
On Sunday, 3 August 2014 at 07:36:43 UTC, Bayan Rafeh wrote: A small background on this: I'm a university student about to start my graduation project with two teammates, both of which have a C/Java/Python background and I suggested we use D for our project. They're not familiar with it, so

Re: Short overview on D

2014-08-03 Thread Bayan Rafeh via Digitalmars-d
On Sunday, 3 August 2014 at 11:12:45 UTC, Nobody wrote: On Sunday, 3 August 2014 at 07:36:43 UTC, Bayan Rafeh wrote: A small background on this: I'm a university student about to start my graduation project with two teammates, both of which have a C/Java/Python background and I suggested we

Re: Short overview on D

2014-08-03 Thread anonymous via Digitalmars-d
On Sunday, 3 August 2014 at 10:57:26 UTC, Bayan Rafeh wrote: -- Functions -- Ref implies the type is a reference type [...] `ref` doesn't imply a reference, it declares or states or something. I'm basing this on the wiki: http://dlang.org/function.html ref parameter is passed by

Re: Short overview on D

2014-08-03 Thread Rikki Cattermole via Digitalmars-d
On 3/08/2014 10:57 p.m., Bayan Rafeh wrote: Wow clearly I misunderstood a lot of stuff. On Sunday, 3 August 2014 at 08:07:04 UTC, Rikki Cattermole wrote: On 3/08/2014 7:36 p.m., Bayan Rafeh wrote: A small background on this: I'm a university student about to start my graduation project with

Re: Short overview on D

2014-08-03 Thread Bayan Rafeh via Digitalmars-d
Small question. Can anyone give me an example of when one would use a parametrized block as opposed to a parameterized class or method?

Re: Short overview on D

2014-08-03 Thread Rikki Cattermole via Digitalmars-d
On 3/08/2014 11:53 p.m., Bayan Rafeh wrote: Small question. Can anyone give me an example of when one would use a parametrized block as opposed to a parameterized class or method? mixin templates take the context for which they are mixed in. Basically: mixin template FooT() { void

Re: Short overview on D

2014-08-03 Thread Bayan Rafeh via Digitalmars-d
On Sunday, 3 August 2014 at 11:56:32 UTC, Rikki Cattermole wrote: On 3/08/2014 11:53 p.m., Bayan Rafeh wrote: Small question. Can anyone give me an example of when one would use a parametrized block as opposed to a parameterized class or method? mixin templates take the context for which

Re: checkedint call removal

2014-08-03 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 3 August 2014 at 10:49:39 UTC, Timon Gehr wrote: On 08/03/2014 11:15 AM, Paolo Invernizzi wrote: because every few milliseconds an assert is triggered Right, and software does not have security holes because otherwise they would obviously be exploited every few milliseconds

Re: Short overview on D

2014-08-03 Thread Rikki Cattermole via Digitalmars-d
On 4/08/2014 12:30 a.m., Bayan Rafeh wrote: On Sunday, 3 August 2014 at 11:56:32 UTC, Rikki Cattermole wrote: On 3/08/2014 11:53 p.m., Bayan Rafeh wrote: Small question. Can anyone give me an example of when one would use a parametrized block as opposed to a parameterized class or method?

Re: checkedint call removal

2014-08-03 Thread Timon Gehr via Digitalmars-d
On 08/03/2014 03:01 PM, Paolo Invernizzi wrote: On Sunday, 3 August 2014 at 10:49:39 UTC, Timon Gehr wrote: On 08/03/2014 11:15 AM, Paolo Invernizzi wrote: because every few milliseconds an assert is triggered Right, and software does not have security holes because otherwise they would

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 1:19 AM, bearophile wrote: Andrei Alexandrescu: * The representation is built on Algebraic, Good. But here I'd like a little more readable type: alias Payload = std.variant.VariantN!(16LU, typeof(null), bool, double, string, Value[], Value[string]).VariantN; Like: alias

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 1:02 AM, Johannes Pfau wrote: API looks great but I'd like to see some simple serialize/deserialize functions as in vibed: http://vibed.org/api/vibe.data.json/deserializeJson http://vibed.org/api/vibe.data.json/serializeToJson Agreed. vibe uses UDAs to customize the serialization

Re: std.jgrandson

2014-08-03 Thread w0rp via Digitalmars-d
On Sunday, 3 August 2014 at 07:16:05 UTC, Andrei Alexandrescu wrote: We need a better json library at Facebook. I'd discussed with Sönke the possibility of taking vibe.d's json to std but he said it needs some more work. So I took std.jgrandson to proof of concept state and hence ready for

Re: checkedint call removal

2014-08-03 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 3 August 2014 at 14:10:29 UTC, Timon Gehr wrote: On 08/03/2014 03:01 PM, Paolo Invernizzi wrote: On Sunday, 3 August 2014 at 10:49:39 UTC, Timon Gehr wrote: On 08/03/2014 11:15 AM, Paolo Invernizzi wrote: because every few milliseconds an assert is triggered Right, and software

Re: checkedint call removal

2014-08-03 Thread Walter Bright via Digitalmars-d
On 8/2/2014 1:06 PM, Artur Skawina via Digitalmars-d wrote: There's nothing wrong with `assume`, it's very useful for optimizations. But it's too dangerous to tack `assume` onto `assert`. If they are kept separate then it's at least possible to carefully audit every 'assume'. People *will* use

Re: GDC UDA Attributes (was 'checkedint call removal')

2014-08-03 Thread Iain Buclaw via Digitalmars-d
On 2 August 2014 14:54, Artur Skawina via Digitalmars-d digitalmars-d@puremagic.com wrote: + +enum noinline = attribute(noinline); +enum inline = attribute(forceinline); +enum flatten = attribute(flatten); But I'm not sure if exposing `attribute` like that would be a good idea (until now I

Re: checkedint call removal

2014-08-03 Thread Walter Bright via Digitalmars-d
On 8/2/2014 1:23 PM, Andrei Alexandrescu wrote: Assume we choose that, there's still murky ground: @system fun(int[] p) { gun(p.ptr + p.length); } @safe gun(int* p) { if (p) *p = 42; } This passes semantic checking but is unsafe and unsafety is in the @safe code. Well, that's fine, we

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 2:38 AM, Sönke Ludwig wrote: A few thoughts based on my experience with vibe.data.json: 1. No decoding of strings appears to mean that Value also always contains encoded strings. This seems the be a leaky and also error prone leaky abstraction. For the token stream, performance

Re: checkedint call removal

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 8:10 AM, Walter Bright wrote: On 8/2/2014 1:23 PM, Andrei Alexandrescu wrote: Assume we choose that, there's still murky ground: @system fun(int[] p) { gun(p.ptr + p.length); } @safe gun(int* p) { if (p) *p = 42; } This passes semantic checking but is unsafe and unsafety

scope guards

2014-08-03 Thread Manu via Digitalmars-d
I'm trying to make better use of scope guards, but I find myself belting out try/catch statements almost everywhere. I'm rather disappointed, because scope guards are advertised to offer the promise of eliminating try/catch junk throughout your code, and I'm just not finding that to be the

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 2:38 AM, Sönke Ludwig wrote: [snip] We need to address the matter of std.jgrandson competing with vibe.data.json. Clearly at a point only one proposal will have to be accepted so the other would be wasted work. Following our email exchange I decided to work on this because (a) you

Re: std.jgrandson

2014-08-03 Thread Dicebot via Digitalmars-d
On Sunday, 3 August 2014 at 15:14:43 UTC, Andrei Alexandrescu wrote: 3. Use of opDispatch for an open set of members has been criticized for vibe.data.json before and I agree with that criticism. The only advantage is saving a few keystrokes (json.key instead of json[key]), but I came to the

Re: Short overview on D

2014-08-03 Thread Bayan Rafeh via Digitalmars-d
On Sunday, 3 August 2014 at 13:27:40 UTC, Rikki Cattermole wrote: On 4/08/2014 12:30 a.m., Bayan Rafeh wrote: On Sunday, 3 August 2014 at 11:56:32 UTC, Rikki Cattermole wrote: On 3/08/2014 11:53 p.m., Bayan Rafeh wrote: Small question. Can anyone give me an example of when one would use a

Any emacs expert in the house?

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
We need work on this: http://stackoverflow.com/questions/25089090/emacs-d-mode-cannot-handle-backquoted-backslashes Andrei

Re: std.jgrandson

2014-08-03 Thread Johannes Pfau via Digitalmars-d
Am Sun, 03 Aug 2014 08:34:20 -0700 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 8/3/14, 2:38 AM, Sönke Ludwig wrote: [snip] We need to address the matter of std.jgrandson competing with vibe.data.json. Clearly at a point only one proposal will have to be accepted so the

Re: checkedint call removal

2014-08-03 Thread Andrew Godfrey via Digitalmars-d
On Sunday, 3 August 2014 at 15:06:56 UTC, Walter Bright wrote: On 8/2/2014 1:06 PM, Artur Skawina via Digitalmars-d wrote: There's nothing wrong with `assume`, it's very useful for optimizations. But it's too dangerous to tack `assume` onto `assert`. If they are kept separate then it's at

Re: Official PPA for dmd

2014-08-03 Thread Andrew Pennebaker via Digitalmars-d
That's unfortunate. Anyone know why? On Sun, Aug 3, 2014 at 4:35 AM, Jordi Sayol via Digitalmars-d digitalmars-d@puremagic.com wrote: El 01/08/14 21:34, Andrew Pennebaker via Digitalmars-d ha escrit: I'm happy to see an official .DEB for installing DMD! Could we please host this in a PPA,

Re: checkedint call removal

2014-08-03 Thread David Nadlinger via Digitalmars-d
On Sunday, 3 August 2014 at 15:16:31 UTC, Andrei Alexandrescu wrote: On 8/3/14, 8:10 AM, Walter Bright wrote: We could establish a rule for @safe that function arguments that are pointers must be pointers to valid memory, not past the end. I think that's a good stance. -- Andrei Agreed,

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 8:51 AM, Johannes Pfau wrote: Am Sun, 03 Aug 2014 08:34:20 -0700 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 8/3/14, 2:38 AM, Sönke Ludwig wrote: [snip] We need to address the matter of std.jgrandson competing with vibe.data.json. Clearly at a point only one

Re: checkedint call removal

2014-08-03 Thread Timon Gehr via Digitalmars-d
On 08/03/2014 05:00 PM, Paolo Invernizzi wrote: On Sunday, 3 August 2014 at 14:10:29 UTC, Timon Gehr wrote: On 08/03/2014 03:01 PM, Paolo Invernizzi wrote: On Sunday, 3 August 2014 at 10:49:39 UTC, Timon Gehr wrote: On 08/03/2014 11:15 AM, Paolo Invernizzi wrote: because every few

Re: std.jgrandson

2014-08-03 Thread Daniel Gibson via Digitalmars-d
Am 03.08.2014 09:16, schrieb Andrei Alexandrescu: We need a better json library at Facebook. I'd discussed with Sönke the possibility of taking vibe.d's json to std but he said it needs some more work. So I took std.jgrandson to proof of concept state and hence ready for destruction:

Re: std.jgrandson

2014-08-03 Thread Sean Kelly via Digitalmars-d
I don't want to pay for anything I don't use. No allocations should occur within the parser and it should simply slice up the input. So the lowest layer should allow me to iterate across symbols in some way. When I've done this in the past it was SAX-style (ie. a callback per type) but with

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 9:49 AM, Daniel Gibson wrote: Am 03.08.2014 09:16, schrieb Andrei Alexandrescu: We need a better json library at Facebook. I'd discussed with Sönke the possibility of taking vibe.d's json to std but he said it needs some more work. So I took std.jgrandson to proof of concept state

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 10:19 AM, Sean Kelly wrote: I don't want to pay for anything I don't use. No allocations should occur within the parser and it should simply slice up the input. What to do about arrays and objects, which would naturally allocate arrays and associative arrays respectively? What

Re: checkedint call removal

2014-08-03 Thread Artur Skawina via Digitalmars-d
On 08/03/14 17:06, Walter Bright via Digitalmars-d wrote: On 8/2/2014 1:06 PM, Artur Skawina via Digitalmars-d wrote: There's nothing wrong with `assume`, it's very useful for optimizations. But it's too dangerous to tack `assume` onto `assert`. If they are kept separate then it's at least

Re: GDC UDA Attributes (was 'checkedint call removal')

2014-08-03 Thread Artur Skawina via Digitalmars-d
On 08/03/14 17:14, Iain Buclaw via Digitalmars-d wrote: On 2 August 2014 14:54, Artur Skawina via Digitalmars-d But I'm not sure if exposing `attribute` like that would be a good idea (until now I was always using a static import, so name clashes were not a problem); I'd probably rename it to

Re: std.jgrandson

2014-08-03 Thread Sönke Ludwig via Digitalmars-d
Am 03.08.2014 17:14, schrieb Andrei Alexandrescu: On 8/3/14, 2:38 AM, Sönke Ludwig wrote: A few thoughts based on my experience with vibe.data.json: 1. No decoding of strings appears to mean that Value also always contains encoded strings. This seems the be a leaky and also error prone leaky

Re: std.jgrandson

2014-08-03 Thread Johannes Pfau via Digitalmars-d
Am Sun, 03 Aug 2014 09:17:57 -0700 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 8/3/14, 8:51 AM, Johannes Pfau wrote: Variant uses TypeInfo internally, right? No. https://github.com/D-Programming-Language/phobos/blob/master/std/variant.d#L210

Re: Associative Ranges

2014-08-03 Thread Freddy via Digitalmars-d
On Sunday, 3 August 2014 at 08:50:47 UTC, Marc Schütz wrote: On Sunday, 3 August 2014 at 06:19:12 UTC, Freddy wrote: On Friday, 1 August 2014 at 23:57:37 UTC, Freddy wrote: I just curious, do Associative Ranges exist. If so where can i find them. I started thinking about them when i asked this

Re: std.jgrandson

2014-08-03 Thread Sönke Ludwig via Digitalmars-d
Am 03.08.2014 17:34, schrieb Andrei Alexandrescu: On 8/3/14, 2:38 AM, Sönke Ludwig wrote: [snip] We need to address the matter of std.jgrandson competing with vibe.data.json. Clearly at a point only one proposal will have to be accepted so the other would be wasted work. Following our email

Re: Associative Ranges

2014-08-03 Thread Freddy via Digitalmars-d
On Sunday, 3 August 2014 at 08:50:47 UTC, Marc Schütz wrote: On Sunday, 3 August 2014 at 06:19:12 UTC, Freddy wrote: On Friday, 1 August 2014 at 23:57:37 UTC, Freddy wrote: I just curious, do Associative Ranges exist. If so where can i find them. I started thinking about them when i asked this

Re: std.jgrandson

2014-08-03 Thread Dicebot via Digitalmars-d
On Sunday, 3 August 2014 at 08:04:40 UTC, Johannes Pfau wrote: API looks great but I'd like to see some simple serialize/deserialize functions as in vibed: http://vibed.org/api/vibe.data.json/deserializeJson http://vibed.org/api/vibe.data.json/serializeToJson Before going this route one needs

Re: assume, assert, enforce, @safe

2014-08-03 Thread Kagamin via Digitalmars-d
On Saturday, 2 August 2014 at 17:36:46 UTC, David Bregman wrote: OK, I'm done. It's clear now that you're just being intellectually dishonest in order to win what amounts to a trivial argument. So much for professionalism. Haha, this time it's not as bad as it was in catch syntax discussion.

Re: std.jgrandson

2014-08-03 Thread w0rp via Digitalmars-d
On Sunday, 3 August 2014 at 18:37:48 UTC, Sönke Ludwig wrote: Am 03.08.2014 17:34, schrieb Andrei Alexandrescu: 6. Address w0rp's issue with undefined. In fact std.Algebraic does have an uninitialized state :o). My requirements would be the same, except for 6. The undefined state in the

Re: checkedint call removal

2014-08-03 Thread via Digitalmars-d
On Saturday, 2 August 2014 at 21:36:11 UTC, Tobias Pankrath wrote: Don't you agree, that a program that throws AssertError in non -release* build is broken? * this is not the opposite of debug Let's go to the definitions: Total correctness: The program can be proved to always terminate

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 11:08 AM, Johannes Pfau wrote: Am Sun, 03 Aug 2014 09:17:57 -0700 schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 8/3/14, 8:51 AM, Johannes Pfau wrote: Variant uses TypeInfo internally, right? No.

Re: std.jgrandson

2014-08-03 Thread Sönke Ludwig via Digitalmars-d
Am 03.08.2014 20:44, schrieb Dicebot: On Sunday, 3 August 2014 at 08:04:40 UTC, Johannes Pfau wrote: API looks great but I'd like to see some simple serialize/deserialize functions as in vibed: http://vibed.org/api/vibe.data.json/deserializeJson

assert semantic change proposal

2014-08-03 Thread David Bregman via Digitalmars-d
I am creating this thread because I believe the other ones [1,6] have gotten too bogged down in minutiae and the big picture has gotten lost. Walter has proposed a change to D's assert function as follows [1]: The compiler can make use of assert expressions to improve optimization, even in

Re: std.jgrandson

2014-08-03 Thread Sönke Ludwig via Digitalmars-d
Am 03.08.2014 20:57, schrieb w0rp: On Sunday, 3 August 2014 at 18:37:48 UTC, Sönke Ludwig wrote: The undefined state in the vibe.d version was necessary due to early API decisions and it's more or less a prominent part of it (specifically because the API was designed to behave similar to

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 11:37 AM, Sönke Ludwig wrote: Am 03.08.2014 17:34, schrieb Andrei Alexandrescu: On 8/3/14, 2:38 AM, Sönke Ludwig wrote: [snip] We need to address the matter of std.jgrandson competing with vibe.data.json. Clearly at a point only one proposal will have to be accepted so the other

Re: std.jgrandson

2014-08-03 Thread Dmitry Olshansky via Digitalmars-d
03-Aug-2014 21:40, Andrei Alexandrescu пишет: On 8/3/14, 10:19 AM, Sean Kelly wrote: I don't want to pay for anything I don't use. No allocations should occur within the parser and it should simply slice up the input. What to do about arrays and objects, which would naturally allocate arrays

Re: std.jgrandson

2014-08-03 Thread Dmitry Olshansky via Digitalmars-d
03-Aug-2014 23:54, Dmitry Olshansky пишет: 03-Aug-2014 21:40, Andrei Alexandrescu пишет: A simplified pseudo-code of JSON-parser inner loop is then: if(cur == '[') startArray(); else if(cur == '{'){ Aw. Stray brace.. -- Dmitry Olshansky

Re: assert semantic change proposal

2014-08-03 Thread bachmeier via Digitalmars-d
Thanks for the summary. I apologize for the uninformed question, but is it possible to explain how the change wrt assert will break existing code? Those details are probably buried in the extensive threads you've referenced. I ask because my understanding of assert has always been that you

Re: std.jgrandson

2014-08-03 Thread Orvid King via Digitalmars-d
On 8/3/2014 2:16 AM, Andrei Alexandrescu wrote: We need a better json library at Facebook. I'd discussed with Sönke the possibility of taking vibe.d's json to std but he said it needs some more work. So I took std.jgrandson to proof of concept state and hence ready for destruction:

Re: std.jgrandson

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 11:03 AM, Sönke Ludwig wrote: Am 03.08.2014 17:14, schrieb Andrei Alexandrescu: [snip] Ah okay, *phew* ;) But in that case I'd actually think about leaving off the backslash decoding in the low level parser, so that slices could be used for immutable inputs in all cases - maybe with

Re: std.jgrandson

2014-08-03 Thread Sean Kelly via Digitalmars-d
On Sunday, 3 August 2014 at 17:40:48 UTC, Andrei Alexandrescu wrote: On 8/3/14, 10:19 AM, Sean Kelly wrote: I don't want to pay for anything I don't use. No allocations should occur within the parser and it should simply slice up the input. What to do about arrays and objects, which would

Re: checkedint call removal

2014-08-03 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 3 August 2014 at 16:29:18 UTC, Timon Gehr wrote: On 08/03/2014 05:00 PM, Paolo Invernizzi wrote: On Sunday, 3 August 2014 at 14:10:29 UTC, Timon Gehr wrote: On 08/03/2014 03:01 PM, Paolo Invernizzi wrote: On Sunday, 3 August 2014 at 10:49:39 UTC, Timon Gehr wrote: On 08/03/2014

Re: assert semantic change proposal

2014-08-03 Thread David Bregman via Digitalmars-d
On Sunday, 3 August 2014 at 20:05:22 UTC, bachmeier wrote: Thanks for the summary. I apologize for the uninformed question, but is it possible to explain how the change wrt assert will break existing code? Those details are probably buried in the extensive threads you've referenced. I ask

Re: checkedint call removal

2014-08-03 Thread Timon Gehr via Digitalmars-d
On 08/03/2014 11:03 PM, Paolo Invernizzi wrote: ... But most yes: to me, an undefined behaviour is the situation where I've developed the code for having 'a' in one place, and I have 'b'. If this is not, literally undefined behaviour, I donno how I should name it. ... You could name it a

Re: assert semantic change proposal

2014-08-03 Thread Daniel Gibson via Digitalmars-d
Am 03.08.2014 22:05, schrieb bachmeier: Thanks for the summary. I apologize for the uninformed question, but is it possible to explain how the change wrt assert will break existing code? Those details are probably buried in the extensive threads you've referenced. I ask because my understanding

Re: assert semantic change proposal

2014-08-03 Thread John Carter via Digitalmars-d
On Sunday, 3 August 2014 at 19:47:27 UTC, David Bregman wrote: Walter has proposed a change to D's assert function as follows [1]: The compiler can make use of assert expressions to improve optimization, even in -release mode. Hmm. I really really do like that idea. I suspect it is one of

Re: assert semantic change proposal

2014-08-03 Thread John Carter via Digitalmars-d
On Sunday, 3 August 2014 at 20:05:22 UTC, bachmeier wrote: 3. Undefined behavior. Actually I have had an extensive battle within my own workplace on this subject and I think I have a reasonable insight in to both points of view. It comes down to two opposing view of what we use asserts

Re: assert semantic change proposal

2014-08-03 Thread David Bregman via Digitalmars-d
On Sunday, 3 August 2014 at 21:57:08 UTC, John Carter wrote: One near term implication is to permit deeper static checking of the code. Both in terms of Well, actually there is a code path in which the assert expression could be false, flag it with a warning and in terms of There is a code

Re: assert semantic change proposal

2014-08-03 Thread via Digitalmars-d
On Sunday, 3 August 2014 at 21:57:08 UTC, John Carter wrote: consequences that reach further than anyone foresees. but that's OK, because it is fundamentally the correct course of action, it's implications foreseen and unforeseen will be correct. The implications are foreseen. Any

Re: assert semantic change proposal

2014-08-03 Thread Andrei Alexandrescu via Digitalmars-d
On 8/3/14, 2:57 PM, John Carter wrote: On Sunday, 3 August 2014 at 19:47:27 UTC, David Bregman wrote: Walter has proposed a change to D's assert function as follows [1]: The compiler can make use of assert expressions to improve optimization, even in -release mode. Hmm. I really really do

  1   2   3   >