Re: Discussion on Go and D

2012-04-06 Thread deadalnix
Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : A few more samples of people's perception of the two languages: http://news.ycombinator.com/item?id=3805302 Andrei I did some measurement on that point for D lately : http://www.deadalnix.me/2012/03/05/impact-of-64bits-vs-32bits-when-using-

Re: Discussion on Go and D

2012-04-06 Thread Andrei Alexandrescu
On 4/6/12 11:20 AM, deadalnix wrote: I did some measurement on that point for D lately : http://www.deadalnix.me/2012/03/05/impact-of-64bits-vs-32bits-when-using-non-precise-gc/ Sweet, will take a look when I'll get better. Found a typo when skimming: Mesure. Andrei

Re: Discussion on Go and D

2012-04-06 Thread Andrei Alexandrescu
On 4/6/12 11:20 AM, deadalnix wrote: I did some measurement on that point for D lately : http://www.deadalnix.me/2012/03/05/impact-of-64bits-vs-32bits-when-using-non-precise-gc/ Also "Lets". You may want to just pass the text through a spellchecker, the impact of typos on perception is higher

Re: Discussion on Go and D

2012-04-06 Thread Rainer Schuetze
On 4/6/2012 6:20 PM, deadalnix wrote: Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : A few more samples of people's perception of the two languages: http://news.ycombinator.com/item?id=3805302 Andrei I did some measurement on that point for D lately : http://www.deadalnix.me/2012/03/05

Re: Discussion on Go and D

2012-04-06 Thread Walter Bright
On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could give me some hints to avoid the memory bloat and the application stalls. A couple of things you can try (they are workarounds, not solutions): 1. Actively delete memory you no lon

Re: Discussion on Go and D

2012-04-06 Thread deadalnix
Le 06/04/2012 20:01, Walter Bright a écrit : On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could give me some hints to avoid the memory bloat and the application stalls. A couple of things you can try (they are workarounds, not sol

Re: Discussion on Go and D

2012-04-06 Thread bearophile
Andrei Alexandrescu: > A few more samples of people's perception of the two languages: > > http://news.ycombinator.com/item?id=3805302 Some of the comments in that ycombinator thread are a bit unnerving. There is a similar thread on Reddit too: http://www.reddit.com/r/programming/comments/rvwj0

Re: Discussion on Go and D

2012-04-06 Thread Rainer Schuetze
On 4/6/2012 8:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could give me some hints to avoid the memory bloat and the application stalls. A couple of things you can try (they are workarounds, not solu

Re: Discussion on Go and D

2012-04-06 Thread Manu
On 7 April 2012 01:08, Rainer Schuetze wrote: > > > On 4/6/2012 8:01 PM, Walter Bright wrote: > >> On 4/6/2012 10:37 AM, Rainer Schuetze wrote: >> >>> I hope there is something wrong with my reasoning, and that you could >>> give me >>> some hints to avoid the memory bloat and the application sta

Re: Discussion on Go and D

2012-04-06 Thread Sean Kelly
It shouldn't be hard to retrofit the Boehm collector into D if anyone cares to make a comparison. On Apr 6, 2012, at 11:36 AM, bearophile wrote: > Andrei Alexandrescu: > >> A few more samples of people's perception of the two languages: >> >> http://news.ycombinator.com/item?id=3805302 > >

Re: Discussion on Go and D

2012-04-06 Thread bearophile
In the Reddit thread they have also linked this paper, "Precise Garbage Collection for C", by Jon Rafkind, Adam Wick, John Regehr and Matthew Flatt: http://www.cs.utah.edu/~regehr/papers/ismm15-rafkind.pdf It contains some ideas (and it seems my idea of a standard optioanl onGC() method for un

Re: Discussion on Go and D

2012-04-06 Thread Dmitry Olshansky
On 07.04.2012 2:08, Rainer Schuetze wrote: On 4/6/2012 8:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could give me some hints to avoid the memory bloat and the application stalls. A couple of things

Re: Discussion on Go and D

2012-04-07 Thread Jacob Carlborg
On 2012-04-06 19:37, Rainer Schuetze wrote: GC issues like this are currently blocking development of Visual D (a Win32 project): when just adding spaces to a file, parsing the new file every other second often needs 10 or more parsings until an equal amount of memory is collected compared to th

Re: Discussion on Go and D

2012-04-07 Thread Rainer Schuetze
On 4/7/2012 12:44 AM, Manu wrote: On 7 April 2012 01:08, Rainer Schuetze mailto:r.sagita...@gmx.de>> wrote: I don't think there are many places in the code where these hints might apply. Are there known ways of hunting down false references? Still, my main concern are the slow col

Re: Discussion on Go and D

2012-04-07 Thread Rainer Schuetze
On 4/7/2012 8:24 AM, Dmitry Olshansky wrote: On 07.04.2012 2:08, Rainer Schuetze wrote: On 4/6/2012 8:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could give me some hints to avoid the memory bloat

Re: Discussion on Go and D

2012-04-07 Thread Manu
On 7 April 2012 17:03, Jacob Carlborg wrote: > On 2012-04-06 19:37, Rainer Schuetze wrote: > >> >> GC issues like this are currently blocking development of Visual D (a >> Win32 project): when just adding spaces to a file, parsing the new file >> every other second often needs 10 or more parsings

Re: Discussion on Go and D

2012-04-07 Thread Manu
On 7 April 2012 17:38, Rainer Schuetze wrote: > > > On 4/7/2012 12:44 AM, Manu wrote: > >> On 7 April 2012 01:08, Rainer Schuetze > > wrote: >> >>I don't think there are many places in the code where these hints >>might apply. Are there known ways of hunting dow

Re: Discussion on Go and D

2012-04-07 Thread Dmitry Olshansky
On 07.04.2012 18:43, Rainer Schuetze wrote: On 4/7/2012 8:24 AM, Dmitry Olshansky wrote: On 07.04.2012 2:08, Rainer Schuetze wrote: On 4/6/2012 8:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could

Re: Discussion on Go and D

2012-04-07 Thread Rainer Schuetze
On 4/6/2012 6:20 PM, deadalnix wrote: Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : A few more samples of people's perception of the two languages: http://news.ycombinator.com/item?id=3805302 Andrei I did some measurement on that point for D lately : http://www.deadalnix.me/2012/03/0

Re: Discussion on Go and D

2012-04-07 Thread Manu
On 7 April 2012 19:04, Dmitry Olshansky wrote: > On 07.04.2012 18:43, Rainer Schuetze wrote: > >> >> >> On 4/7/2012 8:24 AM, Dmitry Olshansky wrote: >> >>> On 07.04.2012 2:08, Rainer Schuetze wrote: >>> On 4/6/2012 8:01 PM, Walter Bright wrote: > On 4/6/2012 10:37 AM, Rain

Re: Discussion on Go and D

2012-04-07 Thread Jacob Carlborg
On 2012-04-07 17:41, Manu wrote: On 7 April 2012 17:03, Jacob Carlborg mailto:d...@me.com>> wrote: On 2012-04-06 19:37, Rainer Schuetze wrote: GC issues like this are currently blocking development of Visual D (a Win32 project): when just adding spaces to a file, pa

Re: Discussion on Go and D

2012-04-07 Thread Dmitry Olshansky
On 07.04.2012 20:51, Manu wrote: [snip] I totally understand this sentiment, and unless GC improves by an order of magnitude it is not going to work well with large to medium-scale apps. Particularly long running ones, I once had been running VisualD for about 16 hours straight (b

Re: Discussion on Go and D

2012-04-07 Thread Walter Bright
On 4/7/2012 7:43 AM, Rainer Schuetze wrote: I'm rather unhappy to sell D with the hint "Go back to manual memory management if you need more than 64MB of memory and want your application to be responsive." Sure, that's why I said it was a workaround, not a solution.

Re: Discussion on Go and D

2012-04-07 Thread Sean Kelly
On Apr 7, 2012, at 9:04 AM, Dmitry Olshansky wrote: > > I totally understand this sentiment, and unless GC improves by an order of > magnitude it is not going to work well with large to medium-scale apps. > Particularly long running ones, I once had been running VisualD for about 16 > hours st

Re: Discussion on Go and D

2012-04-07 Thread Sean Kelly
On Apr 7, 2012, at 9:45 AM, Rainer Schuetze wrote: > > > On 4/6/2012 6:20 PM, deadalnix wrote: >> Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : >>> A few more samples of people's perception of the two languages: >>> >>> http://news.ycombinator.com/item?id=3805302 >>> >>> >>> Andrei >>

Re: Discussion on Go and D

2012-04-07 Thread Rainer Schuetze
On 4/7/2012 8:26 PM, Sean Kelly wrote: On Apr 7, 2012, at 9:45 AM, Rainer Schuetze wrote: On 4/6/2012 6:20 PM, deadalnix wrote: Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : A few more samples of people's perception of the two languages: http://news.ycombinator.com/item?id=3805302

Re: Discussion on Go and D

2012-04-07 Thread Chad J
On 04/06/2012 02:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you could give me some hints to avoid the memory bloat and the application stalls. A couple of things you can try (they are workarounds, not sol

Re: Discussion on Go and D

2012-04-07 Thread Andrei Alexandrescu
On 4/7/12 4:26 PM, Chad J wrote: I keep reading that 'delete' is going to go away. Is this even future-proof, or is code written in this fashion going to suffer a reckoning later on? Biggest confusions in the history of humankind: 1. Pyramids have been built by aliens; 2. Flying with a device

Re: Discussion on Go and D

2012-04-07 Thread Timon Gehr
On 04/07/2012 04:43 PM, Rainer Schuetze wrote: On 4/7/2012 8:24 AM, Dmitry Olshansky wrote: On 07.04.2012 2:08, Rainer Schuetze wrote: On 4/6/2012 8:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is something wrong with my reasoning, and that you cou

Re: Discussion on Go and D

2012-04-07 Thread Chad J
On 04/07/2012 05:42 PM, Andrei Alexandrescu wrote: On 4/7/12 4:26 PM, Chad J wrote: I keep reading that 'delete' is going to go away. Is this even future-proof, or is code written in this fashion going to suffer a reckoning later on? Biggest confusions in the history of humankind: 1. Pyramids

Re: Discussion on Go and D

2012-04-07 Thread Sean Kelly
On Apr 7, 2012, at 12:37 PM, Rainer Schuetze wrote: > > > On 4/7/2012 8:26 PM, Sean Kelly wrote: >> On Apr 7, 2012, at 9:45 AM, Rainer Schuetze wrote: >> >>> >>> >>> On 4/6/2012 6:20 PM, deadalnix wrote: Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : > A few more samples of peo

Re: Discussion on Go and D

2012-04-08 Thread Andrej Mitrovic
On 4/7/12, Andrei Alexandrescu wrote: > 3. The ability to dispose of memory will disappear along with the delete > keyword. Pull this and hopefully that myth will come to an end: https://github.com/D-Programming-Language/d-programming-language.org/pull/112

Re: Discussion on Go and D

2012-04-08 Thread Rainer Schuetze
On 4/8/2012 12:04 AM, Timon Gehr wrote: On 04/07/2012 04:43 PM, Rainer Schuetze wrote: On 4/7/2012 8:24 AM, Dmitry Olshansky wrote: On 07.04.2012 2:08, Rainer Schuetze wrote: On 4/6/2012 8:01 PM, Walter Bright wrote: On 4/6/2012 10:37 AM, Rainer Schuetze wrote: I hope there is somethin

Re: Discussion on Go and D

2012-04-08 Thread Andrei Alexandrescu
On 4/8/12 4:20 AM, Andrej Mitrovic wrote: On 4/7/12, Andrei Alexandrescu wrote: 3. The ability to dispose of memory will disappear along with the delete keyword. Pull this and hopefully that myth will come to an end: https://github.com/D-Programming-Language/d-programming-language.org/pull/11

Re: Discussion on Go and D

2012-04-08 Thread Walter Bright
On 4/6/2012 9:07 AM, Andrei Alexandrescu wrote: A few more samples of people's perception of the two languages: http://news.ycombinator.com/item?id=3805302 At least we don't have this issue: http://news.ycombinator.com/item?id=3814020 The D gc allocates smallish "chunks" as required, not one

Re: Discussion on Go and D

2012-04-08 Thread H. S. Teoh
On Sun, Apr 08, 2012 at 09:42:42AM -0500, Andrei Alexandrescu wrote: > On 4/8/12 4:20 AM, Andrej Mitrovic wrote: > >On 4/7/12, Andrei Alexandrescu wrote: > >>3. The ability to dispose of memory will disappear along with the > >>delete keyword. > > > >Pull this and hopefully that myth will come to

Re: Discussion on Go and D

2012-04-08 Thread Andrei Alexandrescu
On 4/8/12 12:21 PM, Walter Bright wrote: On 4/6/2012 9:07 AM, Andrei Alexandrescu wrote: A few more samples of people's perception of the two languages: http://news.ycombinator.com/item?id=3805302 At least we don't have this issue: http://news.ycombinator.com/item?id=3814020 The D gc alloca

Re: Discussion on Go and D

2012-04-08 Thread Manu
On 8 April 2012 23:44, Andrei Alexandrescu wrote: > On 4/8/12 12:21 PM, Walter Bright wrote: > >> On 4/6/2012 9:07 AM, Andrei Alexandrescu wrote: >> >>> A few more samples of people's perception of the two languages: >>> >>> http://news.ycombinator.com/**item?id=3805302

Re: Discussion on Go and D

2012-04-08 Thread Walter Bright
On 4/8/2012 3:57 PM, Manu wrote: What do you base that statistic on? I'm not arguing that fact, just that I haven't seen any evidence one way or the other. What causes Go to create significantly more garbage than D? Are there benchmarks or test cases I should be aware of on the topic? The first

Re: Discussion on Go and D

2012-04-08 Thread bearophile
Walter: Anyhow, D has a lot of facilities for putting things on the stack rather than the heap, In a system language heap allocations are often among the spots where the program is slower. So a good system language must offer good ways to use the stack as much as possible. D offers some way

Re: Discussion on Go and D

2012-04-08 Thread Andrei Alexandrescu
On 4/8/12 5:57 PM, Manu wrote: On 8 April 2012 23:44, Andrei Alexandrescu mailto:seewebsiteforem...@erdani.org>> wrote: Anyhow, the recent discussions on Go clarify that we need to improve our collector's precision, and pronto. The only thing that didn't yet make the problem more pain

Re: Discussion on Go and D

2012-04-08 Thread Manu
On 9 April 2012 02:24, Walter Bright wrote: > On 4/8/2012 3:57 PM, Manu wrote: > >> What do you base that statistic on? I'm not arguing that fact, just that I >> haven't seen any evidence one way or the other. What causes Go to create >> significantly more garbage than D? Are there benchmarks or

Re: Discussion on Go and D

2012-04-08 Thread Andrej Mitrovic
On 4/9/12, Andrei Alexandrescu wrote: > and pass-by-alias Speaking of alias, one killer feature would be to enable using alias for expressions. E.g.: struct Window { struct Point { int x, y; } Point point; } void test() { Window window; alias window.point.x x; // use 'x' here which i

Re: Discussion on Go and D

2012-04-08 Thread Alex Rønne Petersen
On 09-04-2012 02:18, Manu wrote: On 9 April 2012 02:24, Walter Bright mailto:newshou...@digitalmars.com>> wrote: On 4/8/2012 3:57 PM, Manu wrote: What do you base that statistic on? I'm not arguing that fact, just that I haven't seen any evidence one way or the other

Re: Discussion on Go and D

2012-04-08 Thread Andrei Alexandrescu
On 4/8/12 7:21 PM, Andrej Mitrovic wrote: On 4/9/12, Andrei Alexandrescu wrote: and pass-by-alias Speaking of alias, one killer feature would be to enable using alias for expressions. E.g.: struct Window { struct Point { int x, y; } Point point; } void test() { Window window; alias

Re: Discussion on Go and D

2012-04-08 Thread Manu
On 9 April 2012 03:21, Andrej Mitrovic wrote: > On 4/9/12, Andrei Alexandrescu wrote: > > and pass-by-alias > > Speaking of alias, one killer feature would be to enable using alias > for expressions. E.g.: > > struct Window { struct Point { int x, y; } Point point; } > void test() { >Window

Re: Discussion on Go and D

2012-04-08 Thread Manu
On 9 April 2012 03:25, Andrei Alexandrescu wrote: > On 4/8/12 7:21 PM, Andrej Mitrovic wrote: > >> On 4/9/12, Andrei >> Alexandrescu> >> wrote: >> >>> and pass-by-alias >>> >> >> Speaking of alias, one killer feature would be to enable using alias >> for expressions. E.g.: >> >> struct Window {

Re: Discussion on Go and D

2012-04-08 Thread Andrej Mitrovic
On 4/9/12, Manu wrote: > (...why can't you use 'ref' in regular declarations? I frequently find > myself wanting to use ref locally for this exact reason.) I think the reason for this was because references are supposed to be hidden from the user. But if you look it from a safety angle you can e

Re: Discussion on Go and D

2012-04-08 Thread Manu
On 9 April 2012 03:46, Andrej Mitrovic wrote: > On 4/9/12, Manu wrote: > > (...why can't you use 'ref' in regular declarations? I frequently find > > myself wanting to use ref locally for this exact reason.) > > I think the reason for this was because references are supposed to be > hidden from

Re: Discussion on Go and D

2012-04-08 Thread Andrej Mitrovic
On 4/9/12, Manu wrote: > I don't follow. Can you give an example that shows this insecurity? I mean escaping references to locals: ref int xref; void foo() { int x; xref = x; } or ref int foo() { int x; ref int xref = x; return xref; } I mean a ref would basically be a pointer

Re: Discussion on Go and D

2012-04-08 Thread Marco Leise
Am Mon, 9 Apr 2012 03:38:15 +0300 schrieb Manu : > On 9 April 2012 03:25, Andrei Alexandrescu > wrote: > > > On 4/8/12 7:21 PM, Andrej Mitrovic wrote: > > > >> On 4/9/12, Andrei > >> Alexandrescu> > >> wrote: > >> > >>> and pass-by-alias > >>> > >> > >> Speaking of alias, one killer feature wo

Re: Discussion on Go and D

2012-04-09 Thread Manu
On 9 April 2012 04:09, Andrej Mitrovic wrote: > On 4/9/12, Manu wrote: > > I don't follow. Can you give an example that shows this insecurity? > > I mean escaping references to locals: > > ref int xref; > void foo() { > int x; > xref = x; > } > > or > > ref int foo() { > int x; > ref int

Re: Discussion on Go and D

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 02:21, Andrej Mitrovic wrote: On 4/9/12, Andrei Alexandrescu wrote: and pass-by-alias Speaking of alias, one killer feature would be to enable using alias for expressions. E.g.: struct Window { struct Point { int x, y; } Point point; } void test() { Window window; ali

Re: Discussion on Go and D

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 02:24, Alex Rønne Petersen wrote: Google likes to invent random useless languages. See: Dart. Both languages are solutions looking for problems. ;) Actually I like the idea behind Dart, to replace JavaScript. But that's basically the only think I like about it. -- /Jacob Carlb

Re: Discussion on Go and D

2012-04-09 Thread Artur Skawina
On 04/09/12 02:21, Andrej Mitrovic wrote: > On 4/9/12, Andrei Alexandrescu wrote: >> and pass-by-alias > > Speaking of alias, one killer feature would be to enable using alias > for expressions. E.g.: > > struct Window { struct Point { int x, y; } Point point; } > void test() { > Window wind

Re: Discussion on Go and D

2012-04-09 Thread Steven Schveighoffer
On Sat, 07 Apr 2012 12:45:44 -0400, Rainer Schuetze wrote: On 4/6/2012 6:20 PM, deadalnix wrote: Le 06/04/2012 18:07, Andrei Alexandrescu a écrit : A few more samples of people's perception of the two languages: http://news.ycombinator.com/item?id=3805302 Andrei I did some measuremen

Re: Discussion on Go and D

2012-04-09 Thread deadalnix
Le 09/04/2012 02:24, Alex Rønne Petersen a écrit : On 09-04-2012 02:18, Manu wrote: On 9 April 2012 02:24, Walter Bright mailto:newshou...@digitalmars.com>> wrote: On 4/8/2012 3:57 PM, Manu wrote: What do you base that statistic on? I'm not arguing that fact, just that I haven't seen any evide

Re: Discussion on Go and D

2012-04-09 Thread SomeDude
On Monday, 9 April 2012 at 00:18:22 UTC, Manu wrote: On 9 April 2012 02:24, Walter Bright wrote: still clearly isn't there yet when it comes to the GC either, and I'm amazed Google thing Go is production ready if that guys findings are true! They use it on 64 bits servers with tons of RAM.