Robert Schadek's Distributed Multithreaded Caching D Compiler

2012-05-23 Thread Walter Bright
presentation has been accepted for the D Conference 2012. Congratulations, Robert! http://astoriaseminar.com/sessions.html

Re: Robert Schadek's Distributed Multithreaded Caching D Compiler

2012-05-23 Thread Marco Leise
Am Wed, 23 May 2012 16:26:23 -0700 schrieb Walter Bright newshou...@digitalmars.com: presentation has been accepted for the D Conference 2012. Congratulations, Robert! http://astoriaseminar.com/sessions.html What, still no caching at finer granularity than modules? Meh. :p Besides my

Re: Robert Schadek's Distributed Multithreaded Caching D Compiler

2012-05-23 Thread Walter Bright
On 5/23/2012 10:43 PM, Marco Leise wrote: Am Wed, 23 May 2012 16:26:23 -0700 schrieb Walter Brightnewshou...@digitalmars.com: presentation has been accepted for the D Conference 2012. Congratulations, Robert! http://astoriaseminar.com/sessions.html What, still no caching at finer

Re: Who said that Node.js scales ?

2012-05-23 Thread Sönke Ludwig
I keep hearing about this popular node.js thing, so I finally looked it up just now. JavaScript on the server-side?!? WTF?!?! Like having PHP on a server isn't *enough* pain, now they gotta add in the second-worst language, too? That's a great article, though. Interesting, intelligent and very

Re: Interested in being abreast of the GSoC 2012 projects? Here's how

2012-05-23 Thread Jacob Carlborg
On 2012-05-22 21:45, Andrew Wiley wrote: On Tue, May 22, 2012 at 3:57 AM, Jacob Carlborg d...@me.com mailto:d...@me.com wrote: On 2012-05-21 21:48, Andrew Wiley wrote: Gee, thanks for your enthusiastic support for GSOC projects that will greatly forward the D

Re: GitHub for Windows

2012-05-23 Thread Jacob Carlborg
On 2012-05-22 21:52, Nick Sabalausky wrote: Jacob Carlborgd...@me.com wrote in message news:jpg2tq$140c$1...@digitalmars.com... The Apple mouses has always been a joke. I started with Mac OS X on a laptop, if you then mostly use the track pad it's not as bad. When I made the full move to Mac

Re: why D matters for Bioinformatics

2012-05-23 Thread Christophe Travert
bearophile , dans le message (digitalmars.D:168160), a écrit : deadalnix: http://blog.thebird.nl/?p=93 ... I spreaded the word. This article is great and I 100% agree with it :D The article says: There are a few things I miss in D. For example pattern recognition on unpacking data,

Re: Who said that Node.js scales ?

2012-05-23 Thread deadalnix
Le 23/05/2012 08:35, Sönke Ludwig a écrit : I keep hearing about this popular node.js thing, so I finally looked it up just now. JavaScript on the server-side?!? WTF?!?! Like having PHP on a server isn't *enough* pain, now they gotta add in the second-worst language, too? That's a great

Re: Interested in being abreast of the GSoC 2012 projects? Here's how

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 06:38:54 UTC, Jacob Carlborg wrote: On the other hand if you have a compiler library you can build a tool based on the library that translates D code to Java, C# or perhaps their byte code equivalents. Then you can automatically translate the compiler library to

Re: forcing weak purity

2012-05-23 Thread Don Clugston
On 23/05/12 07:05, Mehrdad wrote: We should make 'pure' mean strongly pure. For weakly pure, we could introduce the 'doped' keyword :-D No, the keyword should be more like @noglobal I wish people would stop using this weak purity / strong purity terminology, it's very unhelpful. (And it's

Re: why D matters for Bioinformatics

2012-05-23 Thread bearophile
Christophe Travert: This little example raises a question if tuples becomes part of the langage. Should static array have tuple capabilities ? Why not? Fixed-sized arrays are similar to tuples with uniform types. Unpacking short arrays in the same way you unpack tuples *very handy* and it's

Re: why D matters for Bioinformatics

2012-05-23 Thread Dmitry Olshansky
On 23.05.2012 14:10, bearophile wrote: Why not? Fixed-sized arrays are similar to tuples with uniform types. Unpacking short arrays in the same way you unpack tuples *very handy* and it's commonly done in both Python and Haskell (and probably in other languages too): I'd rather see common

Towards better integration of struct/tuple/array

2012-05-23 Thread Dmitry Olshansky
My proposal the is following using a.{ ... } syntax to unpack: In short: I think the original proposal of https://github.com/D-Programming-Language/dmd/pull/341 could be enhanced with introduction expr.{ spec } selectors allowing to cherry pick fields and array elements easily. If we go

Re: forcing weak purity

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 06:00:11 -0400, Don Clugston d...@nospam.com wrote: On 23/05/12 07:05, Mehrdad wrote: We should make 'pure' mean strongly pure. For weakly pure, we could introduce the 'doped' keyword :-D No, the keyword should be more like @noglobal Well, it's actually

Re: Towards better integration of struct/tuple/array

2012-05-23 Thread Gor Gyolchanyan
On Wed, May 23, 2012 at 3:00 PM, Dmitry Olshansky dmitry.o...@gmail.comwrote: My proposal the is following using a.{ ... } syntax to unpack: In short: I think the original proposal of

Re: forcing weak purity

2012-05-23 Thread Steven Schveighoffer
On Tue, 22 May 2012 23:31:59 -0400, Alex Rønne Petersen a...@lycus.org wrote: On 23-05-2012 05:22, Steven Schveighoffer wrote: This solution looks crappy to me: void gc_collect(void *unused = null); BTW, any compiler with alias analysis and LTO might even decide to remove the call even

Re: forcing weak purity

2012-05-23 Thread Artur Skawina
On 05/23/12 05:22, Steven Schveighoffer wrote: it has no parameters and no return, marking it as pure makes it strong pure, and an optimizing compiler can effectively remove the call completely! Arguably a pure function not returning a value doesn't make sense... D's definition of pure makes

Re: forcing weak purity

2012-05-23 Thread Artur Skawina
On 05/23/12 13:45, Steven Schveighoffer wrote: On Tue, 22 May 2012 23:31:59 -0400, Alex Rønne Petersen a...@lycus.org wrote: On 23-05-2012 05:22, Steven Schveighoffer wrote: This solution looks crappy to me: void gc_collect(void *unused = null); BTW, any compiler with alias analysis

Re: why D matters for Bioinformatics

2012-05-23 Thread Christophe Travert
bearophile , dans le message (digitalmars.D:168206), a écrit : Besides that, it is easy to emulate your example with a little library solution. Maybe something like that should be added to std.range. What syntax do you suggest? foreach (immutable sx, sy; unpack(s)) {...} doing something

Re: forcing weak purity

2012-05-23 Thread deadalnix
Le 23/05/2012 05:22, Steven Schveighoffer a écrit : I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure, because it could technically run on any memory allocation (which is already allowed in pure

Re: forcing weak purity

2012-05-23 Thread Alex Rønne Petersen
On 23-05-2012 13:48, Artur Skawina wrote: On 05/23/12 05:22, Steven Schveighoffer wrote: it has no parameters and no return, marking it as pure makes it strong pure, and an optimizing compiler can effectively remove the call completely! Arguably a pure function not returning a value doesn't

Re: forcing weak purity

2012-05-23 Thread Alex Rønne Petersen
On 23-05-2012 14:21, deadalnix wrote: Le 23/05/2012 05:22, Steven Schveighoffer a écrit : I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure, because it could technically run on any memory

Re: forcing weak purity

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 08:21:42 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 05:22, Steven Schveighoffer a écrit : I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure, because it could

Re: forcing weak purity

2012-05-23 Thread Don Clugston
On 23/05/12 05:22, Steven Schveighoffer wrote: I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure, because it could technically run on any memory allocation (which is already allowed in pure

Re: forcing weak purity

2012-05-23 Thread bearophile
Don Clugston: The real question being asked is, do we need something for logical purity? You mean something like @trusted_pure? Note that we need the same thing for caching. Regarding caching, memoization, weak references, and related things, I prefer a more principled approach, like

Re: Who said that Node.js scales ?

2012-05-23 Thread Sönke Ludwig
Am 22.05.2012 22:38, schrieb Pragmatix: Am 22.05.2012 21:59, schrieb Nick Sabalausky: I'm very curious how the vibe.d author would respond to the argument against embedded HTTP servers. Ask him on : news.rejectedsoftware.com Just wanted to note that posting on the DFeed forum was not

Re: forcing weak purity

2012-05-23 Thread Alex Rønne Petersen
On 23-05-2012 15:46, deadalnix wrote: Le 23/05/2012 14:32, Alex Rønne Petersen a écrit : On 23-05-2012 14:21, deadalnix wrote: Le 23/05/2012 05:22, Steven Schveighoffer a écrit : I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I

Re: forcing weak purity

2012-05-23 Thread deadalnix
Le 23/05/2012 14:32, Alex Rønne Petersen a écrit : On 23-05-2012 14:21, deadalnix wrote: Le 23/05/2012 05:22, Steven Schveighoffer a écrit : I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure,

Does D have structural sharing of immutable collections?

2012-05-23 Thread Chris Dew
Just some beginner questions... Does D have structural sharing of its immutable collections? i.e. Can I make a copy of an immutable Map or List collection with an extra (or mutated) member, and will the returned (new) collection share most of it's structure with the earlier collection.

Re: forcing weak purity

2012-05-23 Thread deadalnix
Le 23/05/2012 14:35, Steven Schveighoffer a écrit : On Wed, 23 May 2012 08:21:42 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 05:22, Steven Schveighoffer a écrit : I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I

Re: forcing weak purity

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 09:17:43 -0400, Don Clugston d...@nospam.com wrote: On 23/05/12 05:22, Steven Schveighoffer wrote: I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure, because it could

Re: forcing weak purity

2012-05-23 Thread deadalnix
Le 23/05/2012 15:47, Alex Rønne Petersen a écrit : On 23-05-2012 15:46, deadalnix wrote: Le 23/05/2012 14:32, Alex Rønne Petersen a écrit : On 23-05-2012 14:21, deadalnix wrote: Le 23/05/2012 05:22, Steven Schveighoffer a écrit : I have come across a dilemma. Alex Rønne Petersen has a pull

Re: forcing weak purity

2012-05-23 Thread deadalnix
Le 23/05/2012 15:52, Steven Schveighoffer a écrit : What if memory is tight, and the only way to get memory for this new allocation is to collect from the main heap? This seems an odd limitation, since strong-pure functions would not be affected by collecting in the main heap *at all*. -Steve

Re: forcing weak purity

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 14:35, Steven Schveighoffer a écrit : Yes. Memory allocation and deallocation from a global heap is by definition an impure operation (it affects global state). However, we must make exceptions because

Re: forcing weak purity

2012-05-23 Thread Alex Rønne Petersen
On 23-05-2012 15:17, Don Clugston wrote: On 23/05/12 05:22, Steven Schveighoffer wrote: I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure, because it could technically run on any memory

Re: forcing weak purity

2012-05-23 Thread deadalnix
Le 23/05/2012 15:57, Steven Schveighoffer a écrit : On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 14:35, Steven Schveighoffer a écrit : Yes. Memory allocation and deallocation from a global heap is by definition an impure operation (it affects global

Re: forcing weak purity

2012-05-23 Thread Alex Rønne Petersen
On 23-05-2012 15:55, deadalnix wrote: Le 23/05/2012 15:47, Alex Rønne Petersen a écrit : On 23-05-2012 15:46, deadalnix wrote: Le 23/05/2012 14:32, Alex Rønne Petersen a écrit : On 23-05-2012 14:21, deadalnix wrote: Le 23/05/2012 05:22, Steven Schveighoffer a écrit : I have come across a

Re: forcing weak purity

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 09:56:58 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 15:52, Steven Schveighoffer a écrit : What if memory is tight, and the only way to get memory for this new allocation is to collect from the main heap? This seems an odd limitation, since strong-pure

Re: forcing weak purity

2012-05-23 Thread Alex Rønne Petersen
On 23-05-2012 16:03, deadalnix wrote: Le 23/05/2012 15:57, Steven Schveighoffer a écrit : On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 14:35, Steven Schveighoffer a écrit : Yes. Memory allocation and deallocation from a global heap is by definition

Sparse matrix solver libraries

2012-05-23 Thread Vic Kelson
Hi All. OK. I'm sold on using D to develop an experimental hydrologic modeling code, but I need a sparse linear algebra package. Has anyone either developed such a package in D or linked to an existing C or C++ library? There are a number of existing free libraries out there, and I hate to

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-23 Thread Kagamin
On Wednesday, 23 May 2012 at 04:01:05 UTC, Mehrdad wrote: I hope this includes SNN.lib, which also uses ANSI functions... Well, you can't fix C because C explicitly ignores string encoding and thoughtlessly passes strings around without any transcoding. Though, D bindings suggest that C

Re: forcing weak purity

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 10:03:01 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 15:57, Steven Schveighoffer a écrit : On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 14:35, Steven Schveighoffer a écrit : Yes. Memory allocation and deallocation

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread bearophile
Chris Dew: Does D have structural sharing of its immutable collections? i.e. Can I make a copy of an immutable Map or List collection with an extra (or mutated) member, and will the returned (new) collection share most of it's structure with the earlier collection. Currently Phobos

Re: forcing weak purity

2012-05-23 Thread deadalnix
Le 23/05/2012 16:03, deadalnix a écrit : Le 23/05/2012 15:57, Steven Schveighoffer a écrit : On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 14:35, Steven Schveighoffer a écrit : Yes. Memory allocation and deallocation from a global heap is by

Re: Who said that Node.js scales ?

2012-05-23 Thread Kagamin
On Wednesday, 23 May 2012 at 13:42:34 UTC, Sönke Ludwig wrote: http://news.rejectedsoftware.com/ Looks like it runs on Node.js :) Why so slow?

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread Chris Dew
Thanks for your answer, Chris. On Wednesday, 23 May 2012 at 14:35:31 UTC, bearophile wrote: Chris Dew: Does D have structural sharing of its immutable collections? i.e. Can I make a copy of an immutable Map or List collection with an extra (or mutated) member, and will the returned (new)

Re: forcing weak purity

2012-05-23 Thread Alex Rønne Petersen
On 23-05-2012 16:42, deadalnix wrote: Le 23/05/2012 16:03, deadalnix a écrit : Le 23/05/2012 15:57, Steven Schveighoffer a écrit : On Wed, 23 May 2012 09:52:31 -0400, deadalnix deadal...@gmail.com wrote: Le 23/05/2012 14:35, Steven Schveighoffer a écrit : Yes. Memory allocation and

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 14:35:31 UTC, bearophile wrote: Chris Dew: Does D have structural sharing of its immutable collections? i.e. Can I make a copy of an immutable Map or List collection with an extra (or mutated) member, and will the returned (new) collection share most of it's

Pegged and DMD Compilation Memory

2012-05-23 Thread d coder
Greetings I am trying to use Pegged for compile time parsing. The only issue I am facing is with the compile time memory. I have a rather simple grammar, mostly derived from the arithmetic.d example that comes bundled with Pegged. I am wondering if the memory could be optimized by fine-tuning

Re: Sparse matrix solver libraries

2012-05-23 Thread Trass3r
You might want to check out https://github.com/cristicbz/scid

Re: forcing weak purity

2012-05-23 Thread Don Clugston
On 23/05/12 15:56, Alex Rønne Petersen wrote: On 23-05-2012 15:17, Don Clugston wrote: On 23/05/12 05:22, Steven Schveighoffer wrote: I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think gc_collect() should be weak-pure, because

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread Trass3r
I am trying to use Pegged for compile time parsing. The only issue I am facing is with the compile time memory dmd simply never frees any memory it allocates.

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread Artur Skawina
On 05/23/12 17:17, d coder wrote: I am trying to use Pegged for compile time parsing. The only issue I am facing is with the compile time memory. I have a rather simple grammar, mostly derived from the arithmetic.d example that comes bundled with Pegged. I am wondering if the memory could

Re: forcing weak purity

2012-05-23 Thread Alex Rønne Petersen
On 23-05-2012 17:29, Don Clugston wrote: On 23/05/12 15:56, Alex Rønne Petersen wrote: On 23-05-2012 15:17, Don Clugston wrote: On 23/05/12 05:22, Steven Schveighoffer wrote: I have come across a dilemma. Alex Rønne Petersen has a pull request changing some things in the GC to pure. I think

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread d coder
dmd simply never frees any memory it allocates. Since GDC uses DMD front-end, I do not think I can get any relief by using that too. Right?

Re: forcing weak purity

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 11:41:00 -0400, Alex Rønne Petersen a...@lycus.org wrote: On 23-05-2012 17:29, Don Clugston wrote: Not so. It's impossible for anything outside of a strongly pure function to hold a pointer to memory allocated by the pure function. Not sure I follow: immutable(int)*

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread Iain Buclaw
On 23 May 2012 16:55, d coder dlang.co...@gmail.com wrote: dmd simply never frees any memory it allocates. Since GDC uses DMD front-end, I do not think I can get any relief by using that too. Right? No relief am afraid. I do know of someone in the past using the Boehm GC with GDC, which

Re: Sparse matrix solver libraries

2012-05-23 Thread Justin Whear
On Wed, 23 May 2012 16:16:19 +0200, Vic Kelson wrote: Hi All. OK. I'm sold on using D to develop an experimental hydrologic modeling code, but I need a sparse linear algebra package. Has anyone either developed such a package in D or linked to an existing C or C++ library? There are a

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread Artur Skawina
On 05/23/12 17:50, d coder wrote: and it got disqualified before i even had a chance to try it... Are you using some alternative? :-) I gave up on the idea of parsing at compile time. I was using GDC, and recompiling any file that imported that module was so slow that it made no

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread Trass3r
No relief am afraid. I do know of someone in the past using the Boehm GC with GDC, which vastly improved memory consumption. Didn't they try to enable the GC in dmd recently but it was a little disaster?

Re: forcing weak purity

2012-05-23 Thread Alex Rønne Petersen
On 23-05-2012 17:56, Steven Schveighoffer wrote: On Wed, 23 May 2012 11:41:00 -0400, Alex Rønne Petersen a...@lycus..org wrote: On 23-05-2012 17:29, Don Clugston wrote: Not so. It's impossible for anything outside of a strongly pure function to hold a pointer to memory allocated by the pure

Re: forcing weak purity

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 12:22:39 -0400, Alex Rønne Petersen a...@lycus.org wrote: On 23-05-2012 17:56, Steven Schveighoffer wrote: On Wed, 23 May 2012 11:41:00 -0400, Alex Rønne Petersen a...@lycus..org wrote: On 23-05-2012 17:29, Don Clugston wrote: Not so. It's impossible for anything

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread Andrej Mitrovic
On 5/23/12, Artur Skawina art.08...@gmail.com wrote: I was using GDC, and recompiling any file that imported that module was so slow that it made no sense to do things like that Have you guys tried to use asModule? https://github.com/PhilippeSigaud/Pegged/wiki/Grammars-as-D-Modules

Re: Interested in being abreast of the GSoC 2012 projects? Here's how

2012-05-23 Thread Andrew Wiley
On Wed, May 23, 2012 at 1:38 AM, Jacob Carlborg d...@me.com wrote: On 2012-05-22 21:45, Andrew Wiley wrote: On Tue, May 22, 2012 at 3:57 AM, Jacob Carlborg d...@me.com mailto:d...@me.com wrote: On 2012-05-21 21:48, Andrew Wiley wrote: Gee, thanks for your enthusiastic support

Re: forcing weak purity

2012-05-23 Thread deadalnix
Le 23/05/2012 17:29, Don Clugston a écrit : There's a huge difference between a global collection *may* be performed from a pure function vs it *must* be possible to force a global collection from a pure function. Thank you !

Re: forcing weak purity

2012-05-23 Thread deadalnix
Le 23/05/2012 18:22, Alex Rønne Petersen a écrit : On 23-05-2012 17:56, Steven Schveighoffer wrote: On Wed, 23 May 2012 11:41:00 -0400, Alex Rønne Petersen a...@lycus..org wrote: On 23-05-2012 17:29, Don Clugston wrote: Not so. It's impossible for anything outside of a strongly pure

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread d coder
Have you guys tried to use asModule? https://github.com/PhilippeSigaud/Pegged/wiki/Grammars-as-D-Modules Thanks for the idea. I just gave it a try and the memory came down by about 50%. Additionally the compilation became much faster. But that might still not be enough :-( I will try to

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread d coder
But that might still not be enough Some 50-100MB additional memory is getting consumed by the compiler each time I parse a simple expression like foo 32;. In the end, if I parse 20 such expressions, the memory usage tops 2GB even while using asModule. Regards - Puneet

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread simendsjo
On Wed, 23 May 2012 17:05:21 +0200, Roman D. Boiko r...@d-coding.com wrote: I need some immutable collections for my D Compiler Tools project, namely linked list, red-black tree, and possibly some others. So I'm going to create them for my use, and later generalize. I've created a project

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread Dmitry Olshansky
On 23.05.2012 22:18, simendsjo wrote: On Wed, 23 May 2012 17:05:21 +0200, Roman D. Boiko r...@d-coding.com wrote: I need some immutable collections for my D Compiler Tools project, namely linked list, red-black tree, and possibly some others. So I'm going to create them for my use, and later

Re: Issue with module destructor order

2012-05-23 Thread Martin Nowak
mixin template logIt() { static shared this() { log(typeof(this).stringof ~ init); } static shared ~this() { log(typeof(this).stringof ~ deinit); } } Try shared static this() and it won't run as a class constructor. http://dlang.org/class.html#StaticConstructor

Re: Issue with module destructor order

2012-05-23 Thread Martin Nowak
mixin template logIt() { static shared this() { log(typeof(this).stringof ~ init); } static shared ~this() { log(typeof(this).stringof ~ deinit); } } Try shared static this() and it won't run as a class constructor. http://dlang.org/class.html#StaticConstructor

Re: Who said that Node.js scales ?

2012-05-23 Thread Martin Nowak
On Tue, 22 May 2012 20:47:33 +0200, deadalnix deadal...@gmail.com wrote: Ha yes, it is on the website. You'll find here an article about that, and how Go do much better because of goroutines : http://blog.bitcartel.com/2012/05/nodejs-cpu-blocking-thing.html I'd be very interested to know

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread simendsjo
On Wed, 23 May 2012 20:18:54 +0200, simendsjo simend...@gmail.com wrote: On Wed, 23 May 2012 17:05:21 +0200, Roman D. Boiko r...@d-coding.com wrote: I need some immutable collections for my D Compiler Tools project, namely linked list, red-black tree, and possibly some others. So I'm

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 18:18:55 UTC, simendsjo wrote: On Wed, 23 May 2012 17:05:21 +0200, Roman D. Boiko r...@d-coding.com wrote: I need some immutable collections for my D Compiler Tools project, namely linked list, red-black tree, and possibly some others. So I'm going to create them

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 18:24:28 UTC, simendsjo wrote: On Wed, 23 May 2012 20:18:54 +0200, simendsjo simend...@gmail.com wrote: On Wed, 23 May 2012 17:05:21 +0200, Roman D. Boiko r...@d-coding.com wrote: I need some immutable collections for my D Compiler Tools project, namely linked

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread Jonathan M Davis
On Wednesday, May 23, 2012 18:21:42 Trass3r wrote: No relief am afraid. I do know of someone in the past using the Boehm GC with GDC, which vastly improved memory consumption. Didn't they try to enable the GC in dmd recently but it was a little disaster? Yeah. It hurt compile times

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-23 Thread Stewart Gordon
On 23/05/2012 15:16, Kagamin wrote: snip Well, you can't fix C because C explicitly ignores string encoding and thoughtlessly passes strings around without any transcoding. Though, D bindings suggest that C functions accept utf-8 strings A lot of C functions do. Indeed, this is one of the

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread Stewart Gordon
On 23/05/2012 16:05, Roman D. Boiko wrote: snip I need some immutable collections for my D Compiler Tools project, namely linked list, red-black tree, and possibly some others. snip What's the point of an immutable red-black tree? The whole point of a red-black tree is to facilitate fast

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-23 Thread Stewart Gordon
On 22/05/2012 19:24, Dmitry Olshansky wrote: snip * in D it's too easy to make a mistake by passing UTF-8 string pointer to such function That's just as easy in almost any language. It's part of why so many websites have character encoding bugs. snip And last but not least: - *W were

Re: Sparse matrix solver libraries

2012-05-23 Thread Vic Kelson
On Wednesday, 23 May 2012 at 15:27:54 UTC, Trass3r wrote: You might want to check out https://github.com/cristicbz/scid I had found scid. For some of my work, BLAS and LAPACK are fine (full matrices), and I can use it for small problems on this project. But for large problems, I need a

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 18:39:02 UTC, Stewart Gordon wrote: On 23/05/2012 16:05, Roman D. Boiko wrote: snip I need some immutable collections for my D Compiler Tools project, namely linked list, red-black tree, and possibly some others. snip What's the point of an immutable red-black

Re: Sparse matrix solver libraries

2012-05-23 Thread Vic Kelson
On Wednesday, 23 May 2012 at 16:12:40 UTC, Justin Whear wrote: On Wed, 23 May 2012 16:16:19 +0200, Vic Kelson wrote: Hi All. OK. I'm sold on using D to develop an experimental hydrologic modeling code, but I need a sparse linear algebra package. Has anyone either developed such a package in

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread David Nadlinger
On Wednesday, 23 May 2012 at 18:39:02 UTC, Stewart Gordon wrote: When the tree is immutable, only lookup speed is of any real relevance, so you might as well create a perfectly balanced binary tree. Or even better, an array. An array does not facilitate sharing common subsets between

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread Roman D. Boiko
On Wednesday, 23 May 2012 at 18:51:32 UTC, Roman D. Boiko wrote: Immutable collections in most cases have the same performance characteristics as mutable ones. Space consumption may be higher, but not necessarily. Instead of mutating a collection, a new one is returned each time you add or

Re: Pegged and DMD Compilation Memory

2012-05-23 Thread Trass3r
Didn't they try to enable the GC in dmd recently but it was a little disaster? Yeah. It hurt compile times considerably. I'm not sure what the current plan is, other than leaving it like it is for now. What about good old properly managing the memory manually? At least for new code and

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-23 Thread Michael
In WinAPI we have: LoadLibraryA/W, but not GetProcAddressA/W because PE COFF limitations exists. Walter Bright The user can decide what to use or not use from it. +1. For me LoadLibraryA works well. 256 max path It's FS limitation.

Re: Sparse matrix solver libraries

2012-05-23 Thread Trass3r
I agree that a D implementation would be cool, but perhaps I'll just bite the bullet and try to convert headers for an existing library. Never done that before... It's not that hard to convert C headers. Just put an extern(C): at the top of the module, run some regex's to convert common

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-23 Thread Dmitry Olshansky
On 23.05.2012 23:29, Michael wrote: In WinAPI we have: LoadLibraryA/W, but not GetProcAddressA/W because PE COFF limitations exists. Walter Bright The user can decide what to use or not use from it. +1. For me LoadLibraryA works well. 256 max path It's FS limitation. Nope. Quoting random

Re: DCT use cases - draft

2012-05-23 Thread Jacob Carlborg
On 2012-05-23 17:36, Roman D. Boiko wrote: On Tuesday, 22 May 2012 at 18:33:38 UTC, Roman D. Boiko wrote: I'm reviewing text right now Posted an updated version, but it is still a draft: http://d-coding.com/2012/05/23/dct-use-cases-revised.html That's a lot better :) -- /Jacob Carlborg

Re: Does D have structural sharing of immutable collections?

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 14:32:57 -0400, Roman D. Boiko r...@d-coding.com wrote: On Wednesday, 23 May 2012 at 18:24:28 UTC, simendsjo wrote: On Wed, 23 May 2012 20:18:54 +0200, simendsjo simend...@gmail.com wrote: On Wed, 23 May 2012 17:05:21 +0200, Roman D. Boiko r...@d-coding.com wrote: I

Re: Interested in being abreast of the GSoC 2012 projects? Here's how

2012-05-23 Thread Jacob Carlborg
On 2012-05-23 19:11, Andrew Wiley wrote: Ultimately, it doesn't really change the number of steps required: (Foo - Bar means a compiler that runs on Foo and outputs binaries that run on Bar) Standard cross compiler sequence: 1. Compile DC (Foo - Bar) on Foo using the existing DC (Foo - Foo) 2.

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-23 Thread Jacob Carlborg
On 2012-05-23 20:34, Stewart Gordon wrote: What is C encoding? Since C doesn't really have a concept of encodings it would be whatever a given application/library decides it is. -- /Jacob Carlborg

Re: GitHub for Windows

2012-05-23 Thread Walter Bright
On 5/22/2012 9:13 AM, Andrei Alexandrescu wrote: Macs computers are the first laptops reliable enough to be handled as an appliance - e.g. the sleep mode works well enough that I can casually lift the laptop off the couch while watching TV, open it, google for something, and close it, all within

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-23 Thread Michael
approximately 32,000 characters... I know it ;) But it's platform specific kung-fu.

Re: Let's schedule WinAPI ASCII functions for deprecation!

2012-05-23 Thread Dmitry Olshansky
On 24.05.2012 0:13, Michael wrote: approximately 32,000 characters... I know it ;) But it's platform specific kung-fu. It's the only game in M$ town ;) -- Dmitry Olshansky

Re: GitHub for Windows

2012-05-23 Thread Sean Kelly
On May 23, 2012, at 1:04 PM, Walter Bright newshou...@digitalmars.com wrote: 3. erratic issues with sharing directories. Sharing was simple with XP - one click to share, another to unshare. Win7 has a maze of dialog boxes and alternate ways of doing it, some work, some don't, and no

Re: GitHub for Windows

2012-05-23 Thread Steven Schveighoffer
On Wed, 23 May 2012 16:04:30 -0400, Walter Bright newshou...@digitalmars.com wrote: Win7 has enough problems that I'm forced to keep my old WinXP machine operating: 1. can't run 16 bit programs Really, have no sympathy there :) -Steve

Re: GitHub for Windows

2012-05-23 Thread Steven Schveighoffer
On Tue, 22 May 2012 06:54:23 -0400, Nick Sabalausky seewebsitetocontac...@semitwist.com wrote: Oh, so it's that time of the week again already? Time for MS to change their minds once again on which is cool and uncool: straight vs curved? Egads, it's like they're spinning their wheels just

Re: Can't run 'masm386'

2012-05-23 Thread Martin Nowak
On Thursday, 17 May 2012 at 15:54:05 UTC, Walter Bright wrote: On 5/17/2012 6:38 AM, Steven Schveighoffer wrote: Any chance this asm file can be written in D with asm block? No. What's the 'official' tool that was used to compile the checked-in obj?

  1   2   3   >