Re: GC + malloc/free = deadlock

2012-04-22 Thread David
Am 23.04.2012 08:41, schrieb Benjamin Thaut: I wrote a small "bad example" program for a presentation. It calls malloc/free very frequently and I wanted to profile the impact of this compared to a pool allocator solution. Unfortunately I had to notice that the program only runs for a fraction of

GC + malloc/free = deadlock

2012-04-22 Thread Benjamin Thaut
I wrote a small "bad example" program for a presentation. It calls malloc/free very frequently and I wanted to profile the impact of this compared to a pool allocator solution. Unfortunately I had to notice that the program only runs for a fraction of a second before deadlocking. As it seems th

Re: Random D geekout

2012-04-22 Thread Nick Sabalausky
"H. S. Teoh" wrote in message news:mailman.2061.1335131543.4860.digitalmar...@puremagic.com... > > It's my fault. I really should be using module globals for those > regexes, and a module ctor (static this) for initializing them. > In most cases, I've come to prefer lazy initalization (via a mod

Alias Expressions

2012-04-22 Thread Xinok
I know this has probably been asked for a hundred times before, but I don't understand why D doesn't support this. Template alias parameters can accept nearly anything as an argument that standard aliases don't. I think standard aliases should be equally as powerful as their template counterpar

Re: comma operator causes hard to spot bugs

2012-04-22 Thread Andrej Mitrovic
On 4/21/12, Timon Gehr wrote: > those could be replaced by ( , )[$-1]. Also known as indexOpRightButtCheek().

Re: comma operator causes hard to spot bugs

2012-04-22 Thread deadalnix
Le 21/04/2012 20:25, Timon Gehr a écrit : On 04/21/2012 06:54 PM, bearophile wrote: Jonathan M Davis: There have been discussions about the comma operator before. I don't expect that it's going anywhere, Maybe there are intermediate solutions between keeping wild commas in D and disallowing

Re: comma operator causes hard to spot bugs

2012-04-22 Thread deadalnix
Le 21/04/2012 18:54, bearophile a écrit : Jonathan M Davis: There have been discussions about the comma operator before. I don't expect that it's going anywhere, Maybe there are intermediate solutions between keeping wild commas in D and disallowing them fully. I think most of my bugs caused

Re: [off-topic] Sony releases PS Vita SDK

2012-04-22 Thread Manu
On 22 April 2012 22:43, Victor Vicente de Carvalho < victor.v.carva...@gmail.com> wrote: > On Thursday, 19 April 2012 at 18:21:30 UTC, Paulo Pinto wrote: > >> Hi, >> >> just wanted to announce that Sony has finally made the new Playstation >> Vita SDK available, as we were discussing some months a

Re: Random D geekout

2012-04-22 Thread H. S. Teoh
On Sun, Apr 22, 2012 at 12:31:16PM +0200, SomeDude wrote: > On Saturday, 21 April 2012 at 14:40:00 UTC, H. S. Teoh wrote: [...] > >Hmph. I should've checked dmd memory usage when I wrote that. :-( > > > >But anyway, even on my souped up AMD hexacore system, the ctRegex > >version takes significantl

Re: Windows: Throwing Exceptions from Fibers in D2.059: Access Violation

2012-04-22 Thread Andrew Lauritzen
On Friday, 20 April 2012 at 18:08:48 UTC, Sean Kelly wrote: Okay, here's the talk: http://petermodzelewski.blogspot.com/2008/10/tango-conference-2008-fibers-talk-video.html Finally got a chance to read through the slides here - great stuff! This describes precisely what we're talking about an

Re: a pretty exciting result for parallel D lang rmd following defrag by name

2012-04-22 Thread Jay Norwood
Table 5.1 in this article, and some surrounding description, indicate that ntfs converts to upper case when doing directory inserts, so if you want to optimize the disk order for the order processed by directory entry it seems toUpper would be a better choice. http://members.fortunecity.com/c

Re: [off-topic] Sony releases PS Vita SDK

2012-04-22 Thread Victor Vicente de Carvalho
On Thursday, 19 April 2012 at 18:21:30 UTC, Paulo Pinto wrote: Hi, just wanted to announce that Sony has finally made the new Playstation Vita SDK available, as we were discussing some months ago. http://www.playstation.com/pss/index_e.html The gamming industry seems to be slowing moving to

Re: Let's give a honor to dead giants!

2012-04-22 Thread dnewbie
On Sunday, 22 April 2012 at 00:58:58 UTC, Brian Schott wrote: On Friday, 20 April 2012 at 03:33:43 UTC, H. S. Teoh wrote: One thing I miss, though, is ctags support for D. 1. It seems that everything can understand Ctags 2. The format's not complicated at all. I just committed support for a -

Re: Voldemort command structures

2012-04-22 Thread Brad Anderson
On Sun, Apr 22, 2012 at 4:24 AM, Gor Gyolchanyan < gor.f.gyolchan...@gmail.com> wrote: > Voldemort types (coined by Andrei Alexandrescu) are types, which can't > be named. Like so: > > auto getMisteriousData(int i) > { >struct Mysterious >{ >int i; >} > >return Mysterious(i

Re: D to C converter?

2012-04-22 Thread Manu
Just use GDC or LDC. On 22 April 2012 21:26, Craig Black wrote: > I had tried to start using D a while back and did some performance > comparisons with Visual C++. D's back end doesn't seem to optimize very > well when I tested it. I had a huge performance delta. How hard would it be > to make

Re: GTK and D

2012-04-22 Thread Russel Winder
Mike, On Sun, 2012-04-22 at 20:07 +0200, Mike Wey wrote: [...] > Odd trying to download http://d-apt.googlecode.com/files/./Packages with > a browser or wget completes without any errors. Hummm... here too. Perhaps browser and wget look for Packages and then Packages.txt whereas aptitude/apt-get

D to C converter?

2012-04-22 Thread Craig Black
I had tried to start using D a while back and did some performance comparisons with Visual C++. D's back end doesn't seem to optimize very well when I tested it. I had a huge performance delta. How hard would it be to make the D compiler emit C code that could be compiled by another C compiler

Re: a pretty exciting result for parallel D lang rmd following defrag by name

2012-04-22 Thread Jay Norwood
On Sunday, 22 April 2012 at 09:33:59 UTC, Marco Leise wrote: So when you did your first measurements, with 160 seconds for rmd, did you wait for the I/O to complete? Sorry if that's a stupid question :p but that's the obvious difference when using write-through from what the documentation says.

Re: GTK and D

2012-04-22 Thread Mike Wey
On 04/22/2012 05:45 PM, Russel Winder wrote: What is the way of checking access if not via a browser? Using the source.list entry: deb http://d-apt.googlecode.com/files ./ I get the result: Failed to fetch http://d-apt.googlecode.com/files/./Packages 404 Not Found Odd trying to download

Re: Voldemort command structures

2012-04-22 Thread Gor Gyolchanyan
Sorry. In any case this allows to effectively specify the parameters before the method being called. On Sun, Apr 22, 2012 at 5:23 PM, Andrei Alexandrescu wrote: > On 4/22/12 5:24 AM, Gor Gyolchanyan wrote: >> >> Voldemort types (coined by Andrei Alexandrescu) > > > Walter did. > > Andrei > --

Re: GTK and D

2012-04-22 Thread Russel Winder
Mike, On Sun, 2012-04-22 at 16:32 +0200, Mike Wey wrote: [...] > Git/svn currently binds GTK 2.24. > But 3.0 and up is indeed not supported jet. OK. For now I'll stick with PyGObject, and the dreaded gtkmm. [...] > Up untill the GTK 3.0 release using GtkD with an newer release didn't > cause a

Re: GTK and D

2012-04-22 Thread Mike Wey
On 04/22/2012 04:51 AM, Russel Winder wrote: I guess a heads up for folk working on D bindings to GTK+: http://www.gtk.org/language-bindings.php Indicates D has bindings to 2.12, 2.14, 2.16, 2.18, 2.20 and 2.22, but not 2.24 and, most problematically, not 3.0. Git/svn currently binds GTK 2.24

Re: Voldemort command structures

2012-04-22 Thread Andrei Alexandrescu
On 4/22/12 5:24 AM, Gor Gyolchanyan wrote: Voldemort types (coined by Andrei Alexandrescu) Walter did. Andrei

Re: Deterministic life-time storage type

2012-04-22 Thread Christophe
Michel Fortin , dans le message (digitalmars.D:164837), a écrit : > You might find this a good read: > > Thanks, I'll have a look.

Re: Deterministic life-time storage type

2012-04-22 Thread Michel Fortin
On 2012-04-22 06:41:46 +, trav...@phare.normalesup.org (Christophe Travert) said: Michel Fortin , dans le message (digitalmars.D:164824), a écrit : So with your system, how do you write the swap function? I've thought about that. The scope(label) is the key. void T swap(T)(scope T a, sc

Re: Random D geekout

2012-04-22 Thread SomeDude
On Saturday, 21 April 2012 at 14:40:00 UTC, H. S. Teoh wrote: On Sat, Apr 21, 2012 at 03:12:05PM +0400, Dmitry Olshansky wrote: On 21.04.2012 14:48, SomeDude wrote: >On Saturday, 21 April 2012 at 10:21:49 UTC, Dmitry Olshansky >wrote: >>Just stop using ctRegex for now... it's experimental. >>

Voldemort command structures

2012-04-22 Thread Gor Gyolchanyan
Voldemort types (coined by Andrei Alexandrescu) are types, which can't be named. Like so: auto getMisteriousData(int i) { struct Mysterious { int i; } return Mysterious(i); } The only way to use mysterious structure is to either do this: auto m = getMysteriousData(12);

Re: a pretty exciting result for parallel D lang rmd following defrag by name

2012-04-22 Thread Marco Leise
Am Sun, 22 Apr 2012 01:10:18 +0200 schrieb "Jay Norwood" : > I was able to achieve similar efficiency to the defrag result on > ntfs by using a modified version of std.file.write that uses > FILE_FLAG_WRITE_THROUGH. The ntfs rmdir of the 2GB layout takes 6 > sec vs 161 sec when removing the unz

Re: Docs: Section on local variables

2012-04-22 Thread Nick Sabalausky
"H. S. Teoh" wrote in message news:mailman.2018.1335019794.4860.digitalmar...@puremagic.com... > On Sat, Apr 21, 2012 at 02:14:14AM -0700, Jonathan M Davis wrote: >> >> init solves the larger problem of uninitialized variables being >> garbage and resulting in non-deterministic behavior. And it s

Re: Docs: Section on local variables

2012-04-22 Thread Nick Sabalausky
"Jakob Ovrum" wrote in message news:tavnewhepsyaqfsyn...@forum.dlang.org... > > I've used C# a fair bit too, and this has never even happened to me (not > in Java either using Eclipse). Of course, this is just a personal > anecdote, but if anyone has had problems with the CFG approach in these

Re: Docs: Section on local variables

2012-04-22 Thread Nick Sabalausky
"Andrej Mitrovic" wrote in message news:mailman.2024.1335025462.4860.digitalmar...@puremagic.com... > On 4/21/12, Nick Sabalausky wrote: >> Yes, it's initialized to .init by default. But .init may not be what the >> programmer intended it to be initialized to. > > Well, we could introduce a new

Re: version 8.52 & console app code size

2012-04-22 Thread Alex Rønne Petersen
On 22-04-2012 07:31, eMyListsDDg wrote: OS= Win XP i dl'd version 8.52 and tested a simple "hello.c" it compiled fine with the -mn flag: dmc hello.c -mn however, i tried the "-ms" flag for small code& data and it wouldn't compile returning, Warning 2: file not found SDS.lib is the "ms"