Re: D at University of Minnesota

2013-08-18 Thread Ali Çehreli
What a wonderful report! :) On 08/17/2013 08:22 AM, Carl Sturtivant wrote: Ali Çehreli's tutorial played a central role supporting students especially during the first half of the course --- without it the course simply would not have worked, so many thanks Ali --- and an important part of

Re: SIMD implementation of dot-product. Benchmarks

2013-08-18 Thread Andrei Alexandrescu
On 8/17/13 11:50 AM, Ilya Yaroshenko wrote: http://spiceandmath.blogspot.ru/2013/08/simd-implementation-of-dot-product_17.html Ilya The images never load for me, all I see is some Request timed out stripes after the text. Typo: Ununtu Andrei

Re: SIMD implementation of dot-product. Benchmarks

2013-08-18 Thread Ilya Yaroshenko
On Sunday, 18 August 2013 at 16:32:33 UTC, Andrei Alexandrescu wrote: On 8/17/13 11:50 AM, Ilya Yaroshenko wrote: http://spiceandmath.blogspot.ru/2013/08/simd-implementation-of-dot-product_17.html Ilya The images never load for me, all I see is some Request timed out stripes after the

Re: SIMD implementation of dot-product. Benchmarks

2013-08-18 Thread Iain Buclaw
On 17 August 2013 19:50, Ilya Yaroshenko ilyayaroshe...@gmail.com wrote: http://spiceandmath.blogspot.ru/2013/08/simd-implementation-of-dot-product_17.html Ilya Having a quick flick through the simd.d source, I see LDC's and GDC's implementation couldn't be any more wildly different...

Re: SIMD implementation of dot-product. Benchmarks

2013-08-18 Thread Andrei Alexandrescu
On 8/18/13 10:24 AM, Ilya Yaroshenko wrote: On Sunday, 18 August 2013 at 16:32:33 UTC, Andrei Alexandrescu wrote: On 8/17/13 11:50 AM, Ilya Yaroshenko wrote: http://spiceandmath.blogspot.ru/2013/08/simd-implementation-of-dot-product_17.html Ilya The images never load for me, all I see is

Gumbo-d - D binding for Gumbo HTML 5 Parser

2013-08-18 Thread Christopher Bertels
Hey everyone, I started using D recently and have enjoyed the experience so far. I've used vibe.d for a web service I wrote for work and I've recently started working on a D binding for Google's new Gumbo HTML 5 parser library that was recently released [1]. Here's a comparison of one of the

Re: DDT 0.7.0 released

2013-08-18 Thread Jacob Carlborg
On 2013-08-17 14:49, Bruno Medeiros wrote: Someone else had a similar problem, a good guess is that you're running with a 1.6 JVM, you need a 1.7 JVM. I did install a 1.7 JVM, although I never verified that it's actually 1.7 that is used. I'll have to check that. -- /Jacob Carlborg

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread John Joyus
On 08/11/2013 04:22 AM, Walter Bright wrote: http://elrond.informatik.tu-freiberg.de/papers/WorldComp2012/PDP3426.pdf This article claims the Performance [of D] is equivalent to C. Is that true? I mean even if D reaches 90% of C's performance, I still consider it great because of its

Re: GPGPUs

2013-08-18 Thread luminousone
On Sunday, 18 August 2013 at 05:05:48 UTC, Atash wrote: On Sunday, 18 August 2013 at 03:55:58 UTC, luminousone wrote: You do have limited Atomics, but you don't really have any sort of complex messages, or anything like that. I said 'point 11', not 'point 10'. You also dodged points 1 and

Re: GPGPUs

2013-08-18 Thread Atash
On Sunday, 18 August 2013 at 06:22:30 UTC, luminousone wrote: The Xeon Phi is interesting in so far as taking generic programming to a more parallel environment. However it has some serious limitations that will heavily damage its potential performance. AVX2 is completely the wrong path to

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread David Nadlinger
On Saturday, 17 August 2013 at 08:29:37 UTC, glycerine wrote: On Wednesday, 14 August 2013 at 13:43:50 UTC, Dicebot wrote: On Wednesday, 14 August 2013 at 13:28:42 UTC, glycerine wrote: Wishful thinking aside, they are competitors. They are not. `std.serialization` does not and should not

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread David Nadlinger
On Saturday, 17 August 2013 at 11:20:17 UTC, Dicebot wrote: 1) Having bindings in standard library is discouraged, we have Deimos for that. There is only curl stuff and it is considered a bad solution as far as I am aware of. The D implementation of Thrift is actually not a binding and does

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread David Nadlinger
On Saturday, 17 August 2013 at 10:15:34 UTC, BS wrote: I'd rather that was left for a separate module (or two or three) built on top of std.serialization. In an ideal world, Thrift could maybe be built on std.serialization, but in the current form that's not true (regardless of e.g.

Re: GPGPUs

2013-08-18 Thread luminousone
On Sunday, 18 August 2013 at 07:28:02 UTC, Atash wrote: On Sunday, 18 August 2013 at 06:22:30 UTC, luminousone wrote: The Xeon Phi is interesting in so far as taking generic programming to a more parallel environment. However it has some serious limitations that will heavily damage its

Re: GPGPUs

2013-08-18 Thread luminousone
I chose the term aggregate, because it is the term used in the description of the foreach syntax. foreach( value, key ; aggregate ) aggregate being an array or range, it seems to fit as even when the aggregate is an array, as you still implicitly have a range being 0 .. array.length, and

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread Russel Winder
On Sun, 2013-08-18 at 01:59 -0400, John Joyus wrote: On 08/11/2013 04:22 AM, Walter Bright wrote: http://elrond.informatik.tu-freiberg.de/papers/WorldComp2012/PDP3426.pdf This article claims the Performance [of D] is equivalent to C. Is that true? I mean even if D reaches 90% of C's

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread ilya-stromberg
On Wednesday, 14 August 2013 at 16:25:21 UTC, Andrei Alexandrescu wrote: On 8/14/13 1:48 AM, Jacob Carlborg wrote: On 2013-08-14 10:19, Tyler Jameson Little wrote: - I would to serialize to a range (file?) and deserialize from a range (file?) The serialized data is returned as an array,

GPGPU and D

2013-08-18 Thread Russel Winder
Luminousone, Atash, John, Thanks for the email exchanges on this, there is a lot of good stuff in there that needs to be extracted from the mail threads and turned into a manifesto type document that can be used to drive getting a design and realization together. The question is what

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Marek Janukowicz
ilya-stromberg wrote: The serialized data is returned as an array, so that is compatible with the range interface, it just won't be lazy. This seems like a major limitation. (Disclaimer: I haven't read the documentation yet.) Andrei Shall we fix it before accept the std.serialization?

Any cryptographically secure pseudo-random number generator (CSPRNG) for D?

2013-08-18 Thread ilya-stromberg
Hi, Do you know any cryptographically secure pseudo-random number generator (CSPRNG) for D? I know that we have std.random, but it is NOT cryptographically secure. Thanks.

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread Jeff Nowakowski
On 08/18/2013 01:59 AM, John Joyus wrote: On 08/11/2013 04:22 AM, Walter Bright wrote: http://elrond.informatik.tu-freiberg.de/papers/WorldComp2012/PDP3426.pdf This article claims the Performance [of D] is equivalent to C. Is that true? I mean even if D reaches 90% of C's performance, I

Re: blocks with attributes vs inlined lambda

2013-08-18 Thread monarch_dodra
On Tuesday, 18 June 2013 at 07:58:06 UTC, Kenji Hara wrote: Inlining should remove performance penalty. Nobody holds the immediately called lambda, so it should be treated as a 'scope delegate'. For that, we would need to add a section in language spec to support it. Kenji: I've been doing

Re: Experiments with emscripten and D

2013-08-18 Thread Gambler
On 8/18/2013 12:52 AM, deadalnix wrote: On Saturday, 17 August 2013 at 16:43:14 UTC, Piotr Szturmaj wrote: What happens when you forget a semicolon or a comma? Or make some typos? It silently breaks. I don't care if there are tools to help with it. It's still a mess. Did you see WAT

Re: Experiments with emscripten and D

2013-08-18 Thread John Colvin
On Sunday, 18 August 2013 at 04:52:16 UTC, deadalnix wrote: I feel pretty confident I can do a wat speech for D. I can't think of many wats. There are questionable design decisions, annoying things that look like they should compile but don't (local variable alias to non-global template

Re: Experiments with emscripten and D

2013-08-18 Thread Gambler
On 8/17/2013 5:16 PM, John Colvin wrote: On Saturday, 17 August 2013 at 20:58:09 UTC, Dicebot wrote: On Saturday, 17 August 2013 at 20:42:33 UTC, H. S. Teoh wrote: And you'd have to sandbox the code since arbitrary D code running wild on the user's computer is a Bad Thing(tm). Which runs into

Re: Experiments with emscripten and D

2013-08-18 Thread deadalnix
On Sunday, 18 August 2013 at 11:21:52 UTC, John Colvin wrote: On Sunday, 18 August 2013 at 04:52:16 UTC, deadalnix wrote: I feel pretty confident I can do a wat speech for D. I can't think of many wats. There are questionable design decisions, annoying things that look like they should

Re: Experiments with emscripten and D

2013-08-18 Thread John Colvin
On Sunday, 18 August 2013 at 12:48:49 UTC, deadalnix wrote: On Sunday, 18 August 2013 at 11:21:52 UTC, John Colvin wrote: On Sunday, 18 August 2013 at 04:52:16 UTC, deadalnix wrote: I feel pretty confident I can do a wat speech for D. I can't think of many wats. There are questionable design

Re: Possible codegen bug when using Tcl/Tk (related to DMC and DMD)

2013-08-18 Thread Andrej Mitrovic
On 8/18/13, yaz yazan.dab...@gmail.com wrote: I think this is the same issue as https://github.com/aldacron/Derelict3/issues/143 I remember seeing that! I also tried -L/SUBSYSTEM:WINDOWS at first (without the number), but it didnt' make a difference. However using -L/SUBSYSTEM:WINDOWS:5.01

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Andrej Mitrovic
On 8/18/13, Marek Janukowicz ma...@janukowicz.net wrote: I recently needed some way to serialize a data structure (in order by save the state of the app and restore it later) and was quite disappointed there is nothing like that in Phobos. FWIW you could try out msgpack-d:

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Tobias Pankrath
On Sunday, 18 August 2013 at 08:38:53 UTC, ilya-stromberg wrote: As I can see, we have a few options: - accept std.serialization as is. If users can't use std.serialization due memory limitation, they should find another way. - hold std.serialization until we will have new std.xml module with

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Andrej Mitrovic
On 8/18/13, David Nadlinger c...@klickverbot.at wrote: On Saturday, 17 August 2013 at 08:29:37 UTC, glycerine wrote: If you are going to standardize something, standardize the Thrift bindings so that the compiler doesn't introduce regressions that break them, like happened from dmd 2.062 -

windows .lib files (dmc has them, dmd doesn't)

2013-08-18 Thread Adam D. Ruppe
Can we get some more .lib files with the dmd distribution? Specifically, I'd really like to have opengl32.lib and glu32.lib included. My copy of dmc has them, but my dmd doesn't. Together they are only 43 K; I say that's well worth adding to the dmd zip. On a tangential note, if we do ever

Re: windows .lib files (dmc has them, dmd doesn't)

2013-08-18 Thread Andrej Mitrovic
On Sunday, 18 August 2013 at 14:51:52 UTC, Adam D. Ruppe wrote: Can we get some more .lib files with the dmd distribution? And also update the old ones: http://d.puremagic.com/issues/show_bug.cgi?id=6625

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Tyler Jameson Little
On Sunday, 18 August 2013 at 14:24:38 UTC, Tobias Pankrath wrote: On Sunday, 18 August 2013 at 08:38:53 UTC, ilya-stromberg wrote: As I can see, we have a few options: - accept std.serialization as is. If users can't use std.serialization due memory limitation, they should find another way. -

When compiling multiple source files

2013-08-18 Thread ProgrammingGhost
How does the compiler do static typing of multiple source files? I heard D malloc memory and doesn't free to speed up compilation but I am guessing every instance doesn't compile just one source file? My question is if I have a function in this file and another in a different file what does the

Re: Static unittests?

2013-08-18 Thread Borislav Kosharov
On Saturday, 17 August 2013 at 17:48:04 UTC, Andrej Mitrovic wrote: On 8/17/13, Borislav Kosharov boby_...@abv.bg wrote: I really think that this should be added to the language, because it doesn't break stuff and it is useful. And the 'static' keyword is already used in many places like

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread David Nadlinger
On Sunday, 18 August 2013 at 14:52:04 UTC, Andrej Mitrovic wrote: Normally the project maintainers would do this themselves, but it's easy to run out of time or just to forget to test things, and then it's too late (well we have fixup DMD releases now so it's not too bad). The big problem

Re: Static unittests?

2013-08-18 Thread monarch_dodra
On Sunday, 18 August 2013 at 16:15:30 UTC, Borislav Kosharov wrote: On Saturday, 17 August 2013 at 17:48:04 UTC, Andrej Mitrovic wrote: On 8/17/13, Borislav Kosharov boby_...@abv.bg wrote: I really think that this should be added to the language, because it doesn't break stuff and it is

Re: windows .lib files (dmc has them, dmd doesn't)

2013-08-18 Thread evilrat
On Sunday, 18 August 2013 at 14:51:52 UTC, Adam D. Ruppe wrote: Can we get some more .lib files with the dmd distribution? Specifically, I'd really like to have opengl32.lib and glu32.lib included. My copy of dmc has them, but my dmd doesn't. Together they are only 43 K; I say that's well

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread Nick Sabalausky
On Sun, 18 Aug 2013 06:35:30 -0400 Jeff Nowakowski j...@dilacero.org wrote: On 08/18/2013 01:59 AM, John Joyus wrote: On 08/11/2013 04:22 AM, Walter Bright wrote: http://elrond.informatik.tu-freiberg.de/papers/WorldComp2012/PDP3426.pdf This article claims the Performance [of D] is

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread ProgrammingGhost
On Sunday, 11 August 2013 at 18:25:02 UTC, Andrei Alexandrescu wrote: For a column of text to be readable it should have not much more than 10 words per line. Going beyond that forces eyes to scan too jerkily and causes difficulty in following line breaks. This. Also some people can read a

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread Iain Buclaw
On 18 August 2013 18:24, ProgrammingGhost dsioafiseghvfawklncfskz...@sdifjsdiovgfdisjcisj.com wrote: On Sunday, 11 August 2013 at 18:25:02 UTC, Andrei Alexandrescu wrote: For a column of text to be readable it should have not much more than 10 words per line. Going beyond that forces eyes to

Re: GPGPU and D

2013-08-18 Thread John Colvin
On Sunday, 18 August 2013 at 08:40:33 UTC, Russel Winder wrote: Luminousone, Atash, John, Thanks for the email exchanges on this, there is a lot of good stuff in there that needs to be extracted from the mail threads and turned into a manifesto type document that can be used to drive getting

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread Dicebot
Yes, in limited circumstances if you write D like you would write C, you can get comparative performance. I'd say in all cases when you mimic C behavior in D one should expect same or better performance with ldc/gdc unless you hit a bug.

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Dicebot
On Sunday, 18 August 2013 at 16:33:51 UTC, David Nadlinger wrote: ... Please, don't move too far from review topic ;) It is a separate issue to discuss.

Re: GPGPUs

2013-08-18 Thread Dejan Lekic
On Tuesday, 13 August 2013 at 18:21:12 UTC, eles wrote: On Tuesday, 13 August 2013 at 16:27:46 UTC, Russel Winder wrote: The entry point would be if D had a way of creating GPGPU kernels that is better than the current C/C++ + tooling. You mean an alternative to OpenCL language? Because, I

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread John Colvin
On Sunday, 18 August 2013 at 18:08:58 UTC, Dicebot wrote: Yes, in limited circumstances if you write D like you would write C, you can get comparative performance. I'd say in all cases when you mimic C behavior in D one should expect same or better performance with ldc/gdc unless you hit a

Re: GPGPUs

2013-08-18 Thread John Colvin
On Sunday, 18 August 2013 at 18:19:06 UTC, Dejan Lekic wrote: On Tuesday, 13 August 2013 at 18:21:12 UTC, eles wrote: On Tuesday, 13 August 2013 at 16:27:46 UTC, Russel Winder wrote: The entry point would be if D had a way of creating GPGPU kernels that is better than the current C/C++ +

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Dicebot
On Monday, 12 August 2013 at 13:27:45 UTC, Dicebot wrote: Stepping up to act as a Review Manager for Jacob Carlborg std.serialization Input Code: https://github.com/jacob-carlborg/phobos/tree/serialization Documentation:

Re: GPGPU and D

2013-08-18 Thread Russel Winder
On Sun, 2013-08-18 at 19:46 +0200, John Colvin wrote: A github group could be a good idea, for sure. A simple wiki page with some sketched out goals would be good too, which I guess would draw on the content of the previous thread. If I remember correctly in order to make a GitHub group you

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread Timon Gehr
On 08/18/2013 08:26 PM, John Colvin wrote: On Sunday, 18 August 2013 at 18:08:58 UTC, Dicebot wrote: Yes, in limited circumstances if you write D like you would write C, you can get comparative performance. I'd say in all cases when you mimic C behavior in D one should expect same or better

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread Dicebot
On Sunday, 18 August 2013 at 18:31:17 UTC, Timon Gehr wrote: I guess that's debatably mimicking C behaviour. What behavior do you refer to?

Re: GPGPUs

2013-08-18 Thread Russel Winder
On Sun, 2013-08-18 at 20:27 +0200, John Colvin wrote: On Sunday, 18 August 2013 at 18:19:06 UTC, Dejan Lekic wrote: On Tuesday, 13 August 2013 at 18:21:12 UTC, eles wrote: On Tuesday, 13 August 2013 at 16:27:46 UTC, Russel Winder wrote: The entry point would be if D had a way of creating

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread Dicebot
On Sunday, 18 August 2013 at 18:26:13 UTC, John Colvin wrote: On Sunday, 18 August 2013 at 18:08:58 UTC, Dicebot wrote: Yes, in limited circumstances if you write D like you would write C, you can get comparative performance. I'd say in all cases when you mimic C behavior in D one should

Re: GPGPUs

2013-08-18 Thread Atash
I'm not sure if 'problem space' is the industry standard term (in fact I doubt it), but it's certainly a term I've used over the years by taking a leaf out of math books and whatever my professors had touted. :-D I wish I knew what the standard term was, but for now I'm latching onto that

Re: windows .lib files (dmc has them, dmd doesn't)

2013-08-18 Thread Adam D. Ruppe
On Sunday, 18 August 2013 at 17:11:53 UTC, evilrat wrote: maybe also coffimplib too? Yeah, I'd be for it, though coffimplib is part of the paid extended utility package so Walter might not be as keen on putting it in the free download. Though I would guess that having a comprehensive

Re: GPGPU and D

2013-08-18 Thread luminousone
On Sunday, 18 August 2013 at 08:40:33 UTC, Russel Winder wrote: Luminousone, Atash, John, Thanks for the email exchanges on this, there is a lot of good stuff in there that needs to be extracted from the mail threads and turned into a manifesto type document that can be used to drive getting

Re: Any cryptographically secure pseudo-random number generator (CSPRNG) for D?

2013-08-18 Thread QAston
On Sunday, 18 August 2013 at 10:14:29 UTC, ilya-stromberg wrote: Hi, Do you know any cryptographically secure pseudo-random number generator (CSPRNG) for D? I know that we have std.random, but it is NOT cryptographically secure. Thanks. You may be interested in

Re: windows .lib files (dmc has them, dmd doesn't)

2013-08-18 Thread Nick Sabalausky
On Sun, 18 Aug 2013 20:59:17 +0200 Adam D. Ruppe destructiona...@gmail.com wrote: On Sunday, 18 August 2013 at 17:11:53 UTC, evilrat wrote: maybe also coffimplib too? Yeah, I'd be for it, though coffimplib is part of the paid extended utility package so Walter might not be as keen on

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Jacob Carlborg
On 2013-08-18 10:38, ilya-stromberg wrote: - use another xml library, for example from Tango. The XML module from Tango excepts the content being in memory as well, at least the Document module. -- /Jacob Carlborg

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Jacob Carlborg
On 2013-08-17 10:29, glycerine wrote: Huh? Do you know what thrift does? Summary: Everything that Orange/std.serialization does and more. To the point: Thrift provides data versioning, std.serialization does not. In my book: end of story, game over. Thrift is preffered choice. If you are going

Re: windows .lib files (dmc has them, dmd doesn't)

2013-08-18 Thread Adam D. Ruppe
On Sunday, 18 August 2013 at 14:51:52 UTC, Adam D. Ruppe wrote: Specifically, I'd really like to have opengl32.lib and glu32.lib included. in related news, my simpledisplay.d now supports the creation of OpenGL windows on both Windows and Linux/X11. But it is opt-in on Windows since without

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Marek Janukowicz
Andrej Mitrovic wrote: I recently needed some way to serialize a data structure (in order by save the state of the app and restore it later) and was quite disappointed there is nothing like that in Phobos. FWIW you could try out msgpack-d: https://github.com/msgpack/msgpack-d#usage It's

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Jonathan M Davis
On Sunday, August 18, 2013 21:45:59 Jacob Carlborg wrote: If versioning is crucial it can be added. I don't know if it's crucial or not, but I know that the Java guys didn't have it initially but ended up adding it later, which would imply that they ran into problems that made them decide that

Re: std.serialization: pre-voting review / discussion

2013-08-18 Thread Walter Bright
On 8/18/2013 11:26 AM, Dicebot wrote: So as a review manager, I think voting should be delayed until API is ready to address lazy range-based work model. I agree. Ranges are a very big deal for D, and libraries that can conceivably support it must do so.

Re: Static unittests?

2013-08-18 Thread Walter Bright
On 8/5/2013 11:27 AM, monarch_dodra wrote: What about, for example: assertCTFEable!({ int i = 5; string s; while (i--) s ~= 'a'; assert(s == a); }); I don't believe that is a valid use case because the code being tested is not accessible from anything other

Re: GPGPU and D

2013-08-18 Thread John Colvin
On Sunday, 18 August 2013 at 18:30:29 UTC, Russel Winder wrote: On Sun, 2013-08-18 at 19:46 +0200, John Colvin wrote: A github group could be a good idea, for sure. A simple wiki page with some sketched out goals would be good too, which I guess would draw on the content of the previous

Re: Any cryptographically secure pseudo-random number generator (CSPRNG) for D?

2013-08-18 Thread Walter Bright
On 8/18/2013 12:32 PM, QAston wrote: On Sunday, 18 August 2013 at 10:14:29 UTC, ilya-stromberg wrote: Hi, Do you know any cryptographically secure pseudo-random number generator (CSPRNG) for D? I know that we have std.random, but it is NOT cryptographically secure. Thanks. You may be

Re: Experiments with emscripten and D

2013-08-18 Thread H. S. Teoh
On Sun, Aug 18, 2013 at 06:52:14AM +0200, deadalnix wrote: [...] I feel pretty confident I can do a wat speech for D. [...] Please do, I'm curious to hear it. :) I can't think of any major WATs in D that come from the language itself. Compiler bugs, OTOH, often elicits a wat?! from me, one

Re: blocks with attributes vs inlined lambda

2013-08-18 Thread Kenji Hara
2013/8/18 monarch_dodra monarchdo...@gmail.com On Tuesday, 18 June 2013 at 07:58:06 UTC, Kenji Hara wrote: Inlining should remove performance penalty. Nobody holds the immediately called lambda, so it should be treated as a 'scope delegate'. For that, we would need to add a section in

Actor model D

2013-08-18 Thread Luís.Marques
Can anyone please explain me what it means for the D language to follow the Actor model, as the relevant Wikipedia page says it does? [1] [1] http://en.wikipedia.org/wiki/Actor_model#Later_Actor_programming_languages

Re: Experiments with emscripten and D

2013-08-18 Thread Daniel Murphy
H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.186.1376878962.1719.digitalmar...@puremagic.com... On Sun, Aug 18, 2013 at 06:52:14AM +0200, deadalnix wrote: [...] I feel pretty confident I can do a wat speech for D. [...] Please do, I'm curious to hear it. :) import

Re: DMD under 64-bit Windows 7 HOWTO

2013-08-18 Thread Yongwei Wu
I recently install DMD, and encountered this page while Googling. It gave me some hints, but my changes to make it work on 64-bit Windows 7 + MSVC 2012 is really much less drastic. After adding C:\dmd2\windows\bin to PATH, I only need to edit the LIB line in sc.ini to the following effect:

Re: Is D the Answer to the One vs. Two Language High ,Performance Computing Dilemma?

2013-08-18 Thread H. S. Teoh
On Sun, Aug 18, 2013 at 09:26:45AM +0100, Russel Winder wrote: On Sun, 2013-08-18 at 01:59 -0400, John Joyus wrote: On 08/11/2013 04:22 AM, Walter Bright wrote: http://elrond.informatik.tu-freiberg.de/papers/WorldComp2012/PDP3426.pdf This article claims the Performance [of D] is

Re: Actor model D

2013-08-18 Thread Tyler Jameson Little
On Monday, 19 August 2013 at 03:11:00 UTC, Luís Marques wrote: Can anyone please explain me what it means for the D language to follow the Actor model, as the relevant Wikipedia page says it does? [1] [1] http://en.wikipedia.org/wiki/Actor_model#Later_Actor_programming_languages I assume

Language and library reference pages very slow to load

2013-08-18 Thread finalpatch
Apparently the javascript that's responsible for creating hyperlinks runs very slowly, usually several seconds or longer. eg. http://dlang.org/phobos/core_memory.html is so slow it causes Mozilla Firefox to pop up the page not responding box. I have also tried Internet Explorer 10 on Windows

Re: Language and library reference pages very slow to load

2013-08-18 Thread H. S. Teoh
On Mon, Aug 19, 2013 at 06:42:04AM +0200, finalpatch wrote: Apparently the javascript that's responsible for creating hyperlinks runs very slowly, usually several seconds or longer. eg. http://dlang.org/phobos/core_memory.html is so slow it causes Mozilla Firefox to pop up the page not

Re: how to get enclosing function as symbol ? (eg: __function__.stringof ==__FUNCTION__)

2013-08-18 Thread Nicolas Sicard
On Sunday, 18 August 2013 at 02:50:32 UTC, JS wrote: On Sunday, 18 August 2013 at 01:52:50 UTC, Timothee Cour wrote: Is there any way to get the enclosing function as symbol ? I'd like something like that: alternative names would be: __function__ __context__ auto fun(alias

how do I get the ith field of a std.typecons.Tuple ?

2013-08-18 Thread Timothee Cour
A) how do I get the ith field of a std.typecons.Tuple ? ideally, it should be as simple as: auto t=Tuple!(int,name,double,name2)(1); static assert(t.fields[0] == name); It seems the necessary items are private, so how do I get the ith field of a std.typecons.Tuple ? I really don't want to parse

Re: how do I get the ith field of a std.typecons.Tuple ?

2013-08-18 Thread John Colvin
On Sunday, 18 August 2013 at 08:46:17 UTC, Timothee Cour wrote: A) how do I get the ith field of a std.typecons.Tuple ? ideally, it should be as simple as: auto t=Tuple!(int,name,double,name2)(1); static assert(t.fields[0] == name); field is the old name for expand, retained for

Re: how do I get the ith field of a std.typecons.Tuple ?

2013-08-18 Thread Timothee Cour
On Sun, Aug 18, 2013 at 2:15 AM, John Colvin john.loughran.col...@gmail.com wrote: On Sunday, 18 August 2013 at 08:46:17 UTC, Timothee Cour wrote: A) how do I get the ith field of a std.typecons.Tuple ? ideally, it should be as simple as: auto t=Tuple!(int,name,double,**name2)(1); static

Re: scoped imports

2013-08-18 Thread Joseph Rushton Wakeling
On Sunday, 18 August 2013 at 01:33:51 UTC, Timothee Cour wrote: that's not DRY: in my use case, a group of functions use certain imports, it would be annoying and not DRY to do that. What I suggest (allowing {} grouping at module scope) seems simple and intuitive; any reason it can't be done?

Re: how do I get the ith field of a std.typecons.Tuple ?

2013-08-18 Thread Timothee Cour
and this: auto tupleFields(T)()if(isTuple!T){ string[T.length]ret; foreach(i;Iota!(T.length)) ret[i]=tupleField!(T,i); return ret; } unittest{ import std.typecons; auto t=Tuple!(int,foo,double,bar)(2,3.4); alias T=typeof(t); static assert(tupleFields!T==[foo,bar]); } On Sun,

Re: scoped imports

2013-08-18 Thread Timothee Cour
On Sun, Aug 18, 2013 at 2:31 AM, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: On Sunday, 18 August 2013 at 01:33:51 UTC, Timothee Cour wrote: that's not DRY: in my use case, a group of functions use certain imports, it would be annoying and not DRY to do that. What I suggest

Re: Getting core.exception.OutOfMemoryError error on allocating large arrays

2013-08-18 Thread zorran
on my machine (core i7, 16 gb ram, win7/64) next code written core.exception.OutOfMemoryError: enum long size= 1300_000_000; auto arr = new byte[size]; but next code work fine: enum long size= 1300_000_000; byte * p = cast(byte *) malloc(size); i compiled in 64

Re: Getting core.exception.OutOfMemoryError error on allocating large arrays

2013-08-18 Thread John Colvin
On Sunday, 18 August 2013 at 12:07:02 UTC, zorran wrote: on my machine (core i7, 16 gb ram, win7/64) next code written core.exception.OutOfMemoryError: enum long size= 1300_000_000; auto arr = new byte[size]; but next code work fine: enum long size= 1300_000_000; byte * p =

Re: Getting core.exception.OutOfMemoryError error on allocating large arrays

2013-08-18 Thread zorran
Interesting... What happens if you use core.memory.GC.malloc? enum long size= 1300_000_000; byte * p = cast(byte *) malloc(size); for(int i=0; isize; i++) p[i]=1; ulong sum=0; for(int i=0; isize; i++) sum += p[i]; writef(%d , sum);

Re: Getting core.exception.OutOfMemoryError error on allocating large arrays

2013-08-18 Thread zorran
On Sunday, 18 August 2013 at 12:40:42 UTC, zorran wrote: Interesting... What happens if you use core.memory.GC.malloc? i am using in sample import std.c.stdlib; GC.malloc also written core.exception.OutOfMemoryError

Re: Getting core.exception.OutOfMemoryError error on allocating large arrays

2013-08-18 Thread John Colvin
On Sunday, 18 August 2013 at 12:40:42 UTC, zorran wrote: Interesting... What happens if you use core.memory.GC.malloc? enum long size= 1300_000_000; byte * p = cast(byte *) malloc(size); for(int i=0; isize; i++) p[i]=1; ulong sum=0; for(int i=0; isize; i++)

Win32: How to get the stack trace when compiling with a windows subsystem?

2013-08-18 Thread Andrej Mitrovic
When you compile with -L/SUBSYSTEM:WINDOWS you're essentially building an app without a console, so if you want to print out messages you'd have to log them to a file. For example: - import core.sys.windows.windows; import std.stdio; extern(Windows) HWND GetConsoleWindow(); void main() {

Re: Win32: How to get the stack trace when compiling with a windows subsystem?

2013-08-18 Thread Andrej Mitrovic
On 8/18/13, Andrej Mitrovic andrej.mitrov...@gmail.com wrote: if (!GetConsoleWindow()) Actually it would be even better if I could create a console window when building with subsystem:windows, for debugging purposes. I'll have a look at MSDN on ways to do this, unless someone already knows

Re: Win32: How to get the stack trace when compiling with a windows subsystem?

2013-08-18 Thread Adam D. Ruppe
On Sunday, 18 August 2013 at 14:10:07 UTC, Andrej Mitrovic wrote: Actually it would be even better if I could create a console window when building with subsystem:windows, for debugging purposes. extern(Windows) void AllocConsole(); // not sure if that's the perfect signature but it works

static / global operator overload

2013-08-18 Thread Namespace
I can't find anything so I ask here: what was the decision to disallow static or global operator overloads? In C++ you can declare operator overloads inside and outside of classes (the latter is more popular), so why wasn't this introduced in D also? Thanks in advance. :)

Re: Win32: How to get the stack trace when compiling with a windows subsystem?

2013-08-18 Thread Andrej Mitrovic
On 8/18/13, Adam D. Ruppe destructiona...@gmail.com wrote: extern(Windows) void AllocConsole(); // not sure if that's the perfect signature but it works void main() { debug AllocConsole(); throw new Exception(test); } The problem is the console will close before you can actually

Re: scoped imports

2013-08-18 Thread Joseph Rushton Wakeling
On Sunday, 18 August 2013 at 09:52:29 UTC, Timothee Cour wrote: On Sun, Aug 18, 2013 at 2:31 AM, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: On Sunday, 18 August 2013 at 01:33:51 UTC, Timothee Cour wrote: granted, that's not ideal. How about the other points I mentioned?

Re: static / global operator overload

2013-08-18 Thread Ali Çehreli
On 08/18/2013 07:34 AM, Namespace wrote: In C++ you can declare operator overloads inside and outside of classes (the latter is more popular) The latter is popular because a global operator takes advantage of implicit type conversions. A global operator+ allows using an int even on the

Re: static / global operator overload

2013-08-18 Thread monarch_dodra
On Sunday, 18 August 2013 at 15:29:26 UTC, Ali Çehreli wrote: On 08/18/2013 07:34 AM, Namespace wrote: In C++ you can declare operator overloads inside and outside of classes (the latter is more popular) The latter is popular because a global operator takes advantage of implicit type

Re: scoped imports

2013-08-18 Thread monarch_dodra
On Sunday, 18 August 2013 at 14:52:04 UTC, Joseph Rushton Wakeling wrote: On Sunday, 18 August 2013 at 09:52:29 UTC, Timothee Cour wrote: On Sun, Aug 18, 2013 at 2:31 AM, Joseph Rushton Wakeling joseph.wakel...@webdrake.net wrote: On Sunday, 18 August 2013 at 01:33:51 UTC, Timothee Cour

Re: Win32: How to get the stack trace when compiling with a windows subsystem?

2013-08-18 Thread Nick Sabalausky
On Sun, 18 Aug 2013 16:07:20 +0200 Andrej Mitrovic andrej.mitrov...@gmail.com wrote: catch (Throwable thr) { stderr.writeln(thr.msg); stderr.writeln(thr.msg); // No trace stderr.writeln(thr); // Includes trace However, I'm guessing it probably doesn't solve the other

Re: how do I get the ith field of a std.typecons.Tuple ?

2013-08-18 Thread Dicebot
Looking at Tuple implementation, this information gets lost at template instatiation time. I think it is worth a pull request to store properly ordered tuple of field aliases in Tuple type.

  1   2   >