Re: Tango for D2: All user modules ported

2012-02-09 Thread HeiHon
On Saturday, 4 February 2012 at 10:56:14 UTC, bobef wrote: Great news. ... Same here! This is the number one thing I waited for to be ported to D2. I never considered moving to D2 without Tango. Big thanks to SiegeLord and all the other contributors. Just one example why I like Tango:

Re: I wrote A starting guide for Newbies

2012-02-09 Thread deadalnix
Le 08/02/2012 16:32, MattCodr a écrit : Hi guys, I decided to wrote a starting guide for newbies and newcomers with D Language. It's a really simple and basic introduction for those who may be a little lost like me when I started. It's a PDF file format and can be seen accessing the link

Re: I wrote A starting guide for Newbies

2012-02-09 Thread James Miller
I wish I had this when I begun. My first usage of D implyed a compilation of ldc, then gdc (the only one that worked at the time on my plateform) and patching phobos by myself (reminder, it was the first time I used that language, not to mention it was pretty harsh and I think most people

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-09 Thread bearophile
Some more comments about the conference. -- About Variadic Templates are Funadic by Andrei Alexandrescu fun talk: I have had to see it at only 1-1.1X speed, to understand the language. I can't see the laser spot in the video :-( Thank you to Walter for designing D

Re: GoingNative 2012 to be livestreamed tomorrow - part 2

2012-02-09 Thread Jacob Carlborg
On 2012-02-10 02:47, bearophile wrote: Some more comments about the conference. -- About Variadic Templates are Funadic by Andrei Alexandrescu fun talk: I have had to see it at only 1-1.1X speed, to understand the language. I can't see the laser spot in the video :-(

Re: Possible to pass a member function to spawn?

2012-02-09 Thread saxo123
Hello, I'm the guy that made the initial post in this thread. Well, some 100 or so replies ago :-). I must admit that I cannot always follow the discussion as I'm a real D newbie. As I understand one issue discussed is that the actor class is declared shared (see blow the solution I meanwhile

Re: OT Adam D Ruppe's web stuff

2012-02-09 Thread Jacob Carlborg
On 2012-02-08 15:51, Adam D. Ruppe wrote: On Wednesday, 8 February 2012 at 07:37:23 UTC, Jacob Carlborg wrote: Maybe Adam's code can be used as a base of implementing a library like Rack in D. http://rack.rubyforge.org/ That looks like it does the same job as cgi.d. cgi.d actually offers a

Re: Possible to pass a member function to spawn?

2012-02-09 Thread Oliver Plow
MyActor myActor = new MyActor(); auto tid = myActor.start(); myActor.run(i); // call from the parent thread! I was slow ... I now only made Actor.start() public and all other methods in the actor classes are protected or private and then we are fine. -- Oliver

Re: Mac OS X 10.5 support

2012-02-09 Thread Jacob Carlborg
On 2012-02-09 04:52, Walter Bright wrote: Lately, dmd seems to have broken support for OS X 10.5. Supporting that system is problematic for us, since we don't have 10.5 systems available for dev/test. Currently, the build/test farm is OS X 10.7. That's too bad. But the same must apply to 10.6

Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Nicolae Mihalache
Hello, I'm a complete newbie in D and trying to compare with Java. I implemented a simple test for measuring the throughput in message passing between threads. I see that Java can pass about 4mil messages/sec while D only achieves 1mil/sec. I thought that D should be faster. The messages are

Re: Mac OS X 10.5 support

2012-02-09 Thread Walter Bright
On 2/9/2012 12:55 AM, Jacob Carlborg wrote: That's too bad. But the same must apply to 10.6 as well, since the build/test farm runs Mac OS X 10.7. I mean it can cause problems as well since we don't have a build farm that runs 10.6. Yes, except that no problems have arisen (so far!) with 10.6.

Re: std.regex performance

2012-02-09 Thread Dmitry Olshansky
On 09.02.2012 3:35, Jesse Phillips wrote: On Wednesday, 8 February 2012 at 22:21:35 UTC, David Nadlinger wrote: On 2/8/12 10:44 PM, Jesse Phillips wrote: foreach(w; std.string.split(readText(name))) if(!match(w, regex(r\d)).empty) {} } Could it be that you are rebuilding the regex engine on

Re: Mac OS X 10.5 support

2012-02-09 Thread Brad Roberts
On 2/9/2012 12:55 AM, Jacob Carlborg wrote: That's too bad. But the same must apply to 10.6 as well, since the build/test farm runs Mac OS X 10.7. I mean it can cause problems as well since we don't have a build farm that runs 10.6. If anyone wants to give me a shell account on an osx

Re: Mac OS X 10.5 support

2012-02-09 Thread Sönke Ludwig
Am 09.02.2012 04:52, schrieb Walter Bright: Lately, dmd seems to have broken support for OS X 10.5. Supporting that system is problematic for us, since we don't have 10.5 systems available for dev/test. Currently, the build/test farm is OS X 10.7. I don't think this is like the Windows issue.

Re: How to save RAM in D programs (on zero initialized buffers)

2012-02-09 Thread Marco Leise
Am 09.02.2012, 03:56 Uhr, schrieb Manfred Nowak svv1...@hotmail.com: Marco Leise wrote: That sounds a bit vague. Andrei has written a paper on allocation: http://erdani.com/publications/cuj-2005-12.pdf -manfred Oh ok, that's farther than I ever digged into memory management. My

Re: std.uuid is ready for review

2012-02-09 Thread Johannes Pfau
Thanks for your feedback! Comments below: Am Wed, 08 Feb 2012 23:40:14 -0600 schrieb Robert Jacques sandf...@jhu.edu: Comments in order of generation, not importance: This is a port of boost.uuid from the boost project with some minor additions and API changes for a more D-like API.

Re: Mac OS X 10.5 support

2012-02-09 Thread Don Clugston
On 09/02/12 05:46, Brad Anderson wrote: On Wed, Feb 8, 2012 at 8:52 PM, Walter Bright newshou...@digitalmars.com mailto:newshou...@digitalmars.com wrote: Lately, dmd seems to have broken support for OS X 10.5. Supporting that system is problematic for us, since we don't have 10.5

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Marco Leise
Am 09.02.2012, 10:06 Uhr, schrieb Nicolae Mihalache xproma...@gmail.com: Hello, I'm a complete newbie in D and trying to compare with Java. I implemented a simple test for measuring the throughput in message passing between threads. I see that Java can pass about 4mil messages/sec while D

Re: How to save RAM in D programs (on zero initialized buffers)

2012-02-09 Thread Kagamin
I guess, calloc will reuse blocks too, so if you run the compressing function twice, it will reuse the memory block used and freed previously and zero it out honestly.

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Alex_Dovhal
Nicolae Mihalache xproma...@gmail.com wrote: Hello, I'm a complete newbie in D and trying to compare with Java. I implemented a simple test for measuring the throughput in message passing between threads. I see that Java can pass about 4mil messages/sec while D only achieves 1mil/sec. I

Re: std.xml and Adam D Ruppe's dom module

2012-02-09 Thread Johannes Pfau
Am Wed, 08 Feb 2012 20:49:48 -0600 schrieb Robert Jacques sandf...@jhu.edu: On Wed, 08 Feb 2012 02:12:57 -0600, Johannes Pfau nos...@example.com wrote: Am Tue, 07 Feb 2012 20:44:08 -0500 schrieb Jonathan M Davis jmdavisp...@gmx.com: On Tuesday, February 07, 2012 00:56:40 Adam D. Ruppe

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Nicolae Mihalache
That would be funny but it's not true. I tested with different values, that's why I ended up uploading different versions. The programs print the computed message rate and takes into account the number of messages. mache On Thu, Feb 9, 2012 at 11:57 AM, Alex_Dovhal alex_dov...@yahoo.com

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Alex_Dovhal
Sorry, my mistake. It's strange to have different 'n', but you measure speed as 1000*n/time, so it's doesn't matter if n is 10 times bigger.

Re: std.xml and Adam D Ruppe's dom module

2012-02-09 Thread Johannes Pfau
Am Wed, 08 Feb 2012 20:49:48 -0600 schrieb Robert Jacques sandf...@jhu.edu: Speaking as the one proposing said Json replacement, I'd like to point out that JSON strings != UTF strings: manual conversion is required some of the time. And I use appender as a dynamic buffer in exactly the

Re: Possible to pass a member function to spawn?

2012-02-09 Thread Artur Skawina
On 02/09/12 02:46, Timon Gehr wrote: On 02/09/2012 12:50 AM, Artur Skawina wrote: On 02/08/12 22:47, Timon Gehr wrote: On 02/08/2012 10:26 PM, Artur Skawina wrote: ... If we effectively passed ownership of our unique instance to another context, 'x' can no longer be unique. If it were to

Re: Mac OS X 10.5 support

2012-02-09 Thread Jacob Carlborg
On 2012-02-09 10:37, Sönke Ludwig wrote: Am 09.02.2012 04:52, schrieb Walter Bright: Lately, dmd seems to have broken support for OS X 10.5. Supporting that system is problematic for us, since we don't have 10.5 systems available for dev/test. Currently, the build/test farm is OS X 10.7. I

Re: How to save RAM in D programs (on zero initialized buffers)

2012-02-09 Thread Marco Leise
Am 09.02.2012, 11:55 Uhr, schrieb Kagamin s...@here.lot: I guess, calloc will reuse blocks too, so if you run the compressing function twice, it will reuse the memory block used and freed previously and zero it out honestly. You don't understand how it works. calloc gives you exactly 0 KB

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Gor Gyolchanyan
Generally, D's message passing is implemented in quite easy-to-use way, but far from being fast. I dislike the Variant structure, because it adds a huge overhead. I'd rather have a templated message passing system with type-safe message queue, so no Variant is necessary. In specific cases Messages

Re: OT Adam D Ruppe's web stuff

2012-02-09 Thread Adam D. Ruppe
On Thursday, 9 February 2012 at 08:26:25 UTC, Jacob Carlborg wrote: For example, ENV[REQUEST_URI] returns differently on different servers. Rails provides a method, request_uri on the request object that will return the same value on all different servers. I don't know if CGI already has

Re: OT Adam D Ruppe's web stuff

2012-02-09 Thread Jacob Carlborg
On 2012-02-09 15:56, Adam D. Ruppe wrote: On Thursday, 9 February 2012 at 08:26:25 UTC, Jacob Carlborg wrote: For example, ENV[REQUEST_URI] returns differently on different servers. Rails provides a method, request_uri on the request object that will return the same value on all different

Re: Why I don't want D to expand

2012-02-09 Thread Zachary Lund
On Wednesday, 8 February 2012 at 06:40:38 UTC, Bee wrote: Why don't you go GPL, bitch? That's where shit reigns. What are you, Richard Stallman? Also, you know there are various other solutions that use the DMD frontend with other solutions for backends (LDC, GDC) that you can contribute

Re: Link to D 2.0 language spec ebook is broken

2012-02-09 Thread Zachary Lund
On Monday, 6 February 2012 at 23:19:04 UTC, Brad Anderson wrote: It appears to be because of the redirect from http://digitalmars.com/d/2.0/*to http://www.d-programming-language.org and the D site doesn't have the actual ebook hosted. Regards, Brad Anderson I don't think the D2 language has

Re: std.xml and Adam D Ruppe's dom module

2012-02-09 Thread Sean Kelly
For XML, template the parser on char type so transcoding is unnecessary. Since JSON is UTF-8 I'd use char there, and at least for the event parser don't proactively decode strings--let the user do this. In fact, don't proactively decode anything. Give me the option of getting a number via its

Re: std.xml and Adam D Ruppe's dom module

2012-02-09 Thread Sean Kelly
This. And decoded JSON strings are always smaller than encoded strings--JSON uses escaping to encode non UTF-8 stuff, so in the case where someone sends a surrogate pair (legal in JSON) it's encoded as \u\u. In short, it's absolutely possible to create a pull parser that never

Re: Mac OS X 10.5 support

2012-02-09 Thread Sean Kelly
At this point, the only people on 10.4-5 should be those with PPC macs. I think 32-bit Intel owners may be stuck on 10.6. On Feb 8, 2012, at 9:13 PM, Nick Sabalausky a@a.a wrote: Walter Bright newshou...@digitalmars.com wrote in message news:jgvfu2$gmk$1...@digitalmars.com... Lately, dmd

Re: Mac OS X 10.5 support

2012-02-09 Thread Sean Kelly
You need 10.5 server. Apple doesn't allow desktop versions of OSX in a VM (I think 10.7 may be the first exception to this rule) and VM makers honor this. I may be able to sort out earlier OSX server versions somewhere for my own use, but I don't have the resources to make them accessible to

Re: Mac OS X 10.5 support

2012-02-09 Thread Walter Bright
On 2/9/2012 1:37 AM, Sönke Ludwig wrote: I have a project that we actually plan to use in production in the company for which I work. They still require 10.5 support for their products so removing that support would make for a very bad situation here. But it should be possible to get a 10.5

Re: std.xml and Adam D Ruppe's dom module

2012-02-09 Thread Johannes Pfau
Am Thu, 09 Feb 2012 08:18:15 -0600 schrieb Robert Jacques sandf...@jhu.edu: On Thu, 09 Feb 2012 05:13:52 -0600, Johannes Pfau nos...@example.com wrote: Am Wed, 08 Feb 2012 20:49:48 -0600 schrieb Robert Jacques sandf...@jhu.edu: Speaking as the one proposing said Json replacement, I'd

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread dsimcha
I wonder how much it helps to just optimize the GC a little. How much does the performance gap close when you use DMD 2.058 beta instead of 2.057? This upcoming release has several new garbage collector optimizations. If the GC is the bottleneck, then it's not surprising that anything that

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Brad Anderson
On Thu, Feb 9, 2012 at 9:22 AM, dsimcha dsim...@yahoo.com wrote: I wonder how much it helps to just optimize the GC a little. How much does the performance gap close when you use DMD 2.058 beta instead of 2.057? This upcoming release has several new garbage collector optimizations. If the

RedMonk rankings

2012-02-09 Thread Simen Kjærås
http://redmonk.com/sogrady/2012/02/08/language-rankings-2-2012/ Kinda interesting, but as with all these things, don't take it as the word of god. Nice to see D all the way up there, I'd honestly expect it be lower.

Re: std.regex performance

2012-02-09 Thread Jesse Phillips
I suggest to file this as an enhancement request, as new std.regex should have been backwards compatible. http://d.puremagic.com/issues/show_bug.cgi?id=7471 I redid the timings with mingw using time, and I find this strange $ time ./test2.058.exe real0m55.500s user0m0.031s sys

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Andrei Alexandrescu
On 2/9/12 6:10 AM, Gor Gyolchanyan wrote: Generally, D's message passing is implemented in quite easy-to-use way, but far from being fast. I dislike the Variant structure, because it adds a huge overhead. I'd rather have a templated message passing system with type-safe message queue, so no

Re: OT Adam D Ruppe's web stuff

2012-02-09 Thread Andrei Alexandrescu
On 2/9/12 6:56 AM, Adam D. Ruppe wrote: Here's the ddoc: http://arsdnet.net/web.d/cgi.html Cue the choir: Please submit to Phobos. Andrei

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Marco Leise
Am 09.02.2012, 17:22 Uhr, schrieb dsimcha dsim...@yahoo.com: I wonder how much it helps to just optimize the GC a little. How much does the performance gap close when you use DMD 2.058 beta instead of 2.057? This upcoming release has several new garbage collector optimizations. If the

Re: Mac OS X 10.5 support

2012-02-09 Thread Jacob Carlborg
On 2012-02-09 17:21, Sean Kelly wrote: You need 10.5 server. Apple doesn't allow desktop versions of OSX in a VM (I think 10.7 may be the first exception to this rule) and VM makers honor this. I may be able to sort out earlier OSX server versions somewhere for my own use, but I don't have

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Marco Leise
Am 09.02.2012, 18:35 Uhr, schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 2/9/12 6:10 AM, Gor Gyolchanyan wrote: Generally, D's message passing is implemented in quite easy-to-use way, but far from being fast. I dislike the Variant structure, because it adds a huge overhead.

Re: Output to console from DerivedThread class strange

2012-02-09 Thread kraybourne
I know neither Windows or D very well, but I've noticed in D on Windows, output seems to be held back sometimes until the app terminates. Maybe try this: On 2/7/12 11:28 PM, Oliver Puerto wrote: void run() { writeln(Derived thread running.);

Formating output of retro

2012-02-09 Thread Dmitry Olshansky
Finally getting to debug std.regex issues, I've found that it seems like import std.stdio, std.range; void main() { writefln(%s,retro(abcd)); } no longer works, can anyone on older version check if it's regression? -- Dmitry Olshansky

Named parameters workaround

2012-02-09 Thread Matthias Walter
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, named parameters have been discussed awhile ago and it seems to me that they won't get into the language soon. I came up with a workaround that makes it possible to use them with some extra typing. Suppose we have a function foo(int a, int b,

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Sean Kelly
On Feb 9, 2012, at 10:14 AM, Marco Leise wrote: Am 09.02.2012, 17:22 Uhr, schrieb dsimcha dsim...@yahoo.com: I wonder how much it helps to just optimize the GC a little. How much does the performance gap close when you use DMD 2.058 beta instead of 2.057? This upcoming release has

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Andrei Alexandrescu
On 2/9/12 10:31 AM, Marco Leise wrote: Am 09.02.2012, 18:35 Uhr, schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 2/9/12 6:10 AM, Gor Gyolchanyan wrote: Generally, D's message passing is implemented in quite easy-to-use way, but far from being fast. I dislike the Variant

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Timon Gehr
On 02/09/2012 08:27 PM, Sean Kelly wrote: On Feb 9, 2012, at 10:14 AM, Marco Leise wrote: Am 09.02.2012, 17:22 Uhr, schrieb dsimchadsim...@yahoo.com: I wonder how much it helps to just optimize the GC a little. How much does the performance gap close when you use DMD 2.058 beta instead of

Re: Formating output of retro

2012-02-09 Thread Jesse Phillips
On Thursday, 9 February 2012 at 18:59:47 UTC, Dmitry Olshansky wrote: Finally getting to debug std.regex issues, I've found that it seems like import std.stdio, std.range; void main() { writefln(%s,retro(abcd)); } no longer works, can anyone on older version check if it's

Re: Formating output of retro

2012-02-09 Thread Brad Anderson
On Thu, Feb 9, 2012 at 12:41 PM, Jesse Phillips jessekphillip...@gmail.comwrote: On Thursday, 9 February 2012 at 18:59:47 UTC, Dmitry Olshansky wrote: Finally getting to debug std.regex issues, I've found that it seems like import std.stdio, std.range; void main() {

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Marco Leise
Am 09.02.2012, 20:35 Uhr, schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: If we're doing one allocation per message passed, that might explain the 4x performance difference (I have no trouble figuring Java's allocator is this much faster than D's). Andrei Well, what does +1

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread bearophile
Marco Leise: Sean found another possible allocation in the other branch of this discussion. Maybe this is able to help Sean and similar situations: http://d.puremagic.com/issues/show_bug.cgi?id=5070 Bye, bearophile

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Martin Nowak
On Thu, 09 Feb 2012 16:44:46 +0100, Sean Kelly s...@invisibleduck.org wrote: So a queue per message type? How would ordering be preserved? Also, how would this work for interprocess messaging? An array-based queue is an option however (though it would mean memmoves on receive), as are

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Andrei Alexandrescu
On 2/9/12 11:49 AM, Marco Leise wrote: Am 09.02.2012, 20:35 Uhr, schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: If we're doing one allocation per message passed, that might explain the 4x performance difference (I have no trouble figuring Java's allocator is this much faster than

Re: Formating output of retro

2012-02-09 Thread Dmitry Olshansky
On 09.02.2012 23:50, Brad Anderson wrote: On Thu, Feb 9, 2012 at 12:41 PM, Jesse Phillips jessekphillip...@gmail.com mailto:jessekphillips%...@gmail.com wrote: On Thursday, 9 February 2012 at 18:59:47 UTC, Dmitry Olshansky wrote: Finally getting to debug std.regex issues, I've

Re: Mac OS X 10.5 support

2012-02-09 Thread Sönke Ludwig
Am 09.02.2012 17:20, schrieb Walter Bright: On 2/9/2012 1:37 AM, Sönke Ludwig wrote: I have a project that we actually plan to use in production in the company for which I work. They still require 10.5 support for their products so removing that support would make for a very bad situation here.

Re: Carmack about static analysis

2012-02-09 Thread Bruno Medeiros
On 24/12/2011 12:42, bearophile wrote: A new blog post by the very good John Carmack, I like how well readable this post is: http://altdevblogaday.com/2011/12/24/static-code-analysis/ Nice article! I particularly liked this comment: The classic hacker disdain for “bondage and discipline

Re: Carmack about static analysis

2012-02-09 Thread Bruno Medeiros
On 24/12/2011 23:27, Adam D. Ruppe wrote: On Saturday, 24 December 2011 at 23:12:27 UTC, bearophile wrote: I was talking about the abundance of (({}){()}) and not about identifiers length. It's the same fallacy. I can't read Carmack's mind, but I'm sure he's talking about shortening code the

Re: [OT] Programming language WATs

2012-02-09 Thread Bruno Medeiros
On 20/01/2012 15:40, Robert Clipsham wrote: Just came across this amusing 4 minute video: https://www.destroyallsoftware.com/talks/wat Anyone have any other WATs you can do in other languages? Bonus points for WATs you can do in D. LOL, that was good presentation! :) -- Bruno Medeiros -

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Sean Kelly
On Feb 9, 2012, at 10:31 AM, Marco Leise wrote: Am 09.02.2012, 18:35 Uhr, schrieb Andrei Alexandrescu seewebsiteforem...@erdani.org: On 2/9/12 6:10 AM, Gor Gyolchanyan wrote: Generally, D's message passing is implemented in quite easy-to-use way, but far from being fast. I dislike the

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Sean Kelly
On Feb 9, 2012, at 11:53 AM, bearophile wrote: Marco Leise: Sean found another possible allocation in the other branch of this discussion. Maybe this is able to help Sean and similar situations: http://d.puremagic.com/issues/show_bug.cgi?id=5070 This would be handy. I don't always

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Sean Kelly
On Feb 9, 2012, at 11:57 AM, Martin Nowak wrote: On Thu, 09 Feb 2012 16:44:46 +0100, Sean Kelly s...@invisibleduck.org wrote: So a queue per message type? How would ordering be preserved? Also, how would this work for interprocess messaging? An array-based queue is an option however

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Oliver Plow
Hi Nicolae, I don't know whether you are particularly interested in the case you presented. For performance comparison between D and other languages in general there is this article that I think is quite good:

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Graham St Jack
I suggest using a template-generated type that can contain any of the messages to be sent over a channel. It is reasonably straightforward to generate all the boilerplate code necessary to make this happen. My prototype (attached) still needs work to remove linux dependencies and tighten it

Re: Carmack about static analysis

2012-02-09 Thread bearophile
Bruno Medeiros: the needs of large, long-lived, multi-programmer projects are just different than the quick work you do for yourself. that throws a jab at a lot of the obsession with dynamic languages that goes on out there. It's something I've echoed in the past, especially when people

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Sean Kelly
On Feb 9, 2012, at 2:17 PM, Sean Kelly wrote: Best first order optimization would be to allocate the list node deterministically. Neat idea. I think I can make that change fairly trivially. $ time abc real0m0.556s user0m0.555s sys 0m0.001s So another 100ms improvement.

Re: OT Adam D Ruppe's web stuff

2012-02-09 Thread Adam D. Ruppe
On Thursday, 9 February 2012 at 17:36:01 UTC, Andrei Alexandrescu wrote: Cue the choir: Please submit to Phobos. Perhaps when I finish the URL struct in there. (It takes a url and breaks it down into parts you can edit, and can do rebasing. Currently, the handling of the Location: header is

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread David Nadlinger
On 2/9/12 11:17 PM, Sean Kelly wrote: On Feb 9, 2012, at 11:57 AM, Martin Nowak wrote: I didn't yet got around to polish my lock-free SList/DList implementations, but mutexes should only become a problem with high contention when you need to block. You'd also would need some kind of blocking

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Andrew Wiley
On Thu, Feb 9, 2012 at 3:06 AM, Nicolae Mihalache xproma...@gmail.com wrote: Hello, I'm a complete newbie in D and trying to compare with Java. I implemented  a simple test for measuring the throughput in message passing between threads. I see that Java can pass about 4mil messages/sec while

Re: OT Adam D Ruppe's web stuff

2012-02-09 Thread Adam D. Ruppe
On Tuesday, 7 February 2012 at 20:00:26 UTC, Adam D. Ruppe wrote: I'm taking this to an extreme with this: http://arsdnet.net:8080/ hehehe, I played with this a little bit more tonight. http://arsdnet.net/dcode/sse/ needs the bleeding edge dom.d from my github.

Re: Carmack about static analysis

2012-02-09 Thread Walter Bright
On 2/9/2012 12:09 PM, Bruno Medeiros wrote: Nice article! I particularly liked this comment: The classic hacker disdain for “bondage and discipline languages” is short sighted – the needs of large, long-lived, multi-programmer projects are just different than the quick work you do for yourself.

Re: RedMonk rankings

2012-02-09 Thread bcs
On 02/09/2012 09:28 AM, Simen Kjærås wrote: http://redmonk.com/sogrady/2012/02/08/language-rankings-2-2012/ Kinda interesting, but as with all these things, don't take it as the word of god. Nice to see D all the way up there, I'd honestly expect it be lower. D is neck-n0neck with Go (:D) and

Re: RedMonk rankings

2012-02-09 Thread Matt Soucy
On 02/09/2012 12:28 PM, Simen Kjærås wrote: http://redmonk.com/sogrady/2012/02/08/language-rankings-2-2012/ Kinda interesting, but as with all these things, don't take it as the word of god. Nice to see D all the way up there, I'd honestly expect it be lower. I noticed LinkedIn mentioned in the

Re: std.uuid is ready for review

2012-02-09 Thread Robert Jacques
On Thu, 09 Feb 2012 03:57:21 -0600, Johannes Pfau nos...@example.com wrote: Thanks for your feedback! Comments below: Am Wed, 08 Feb 2012 23:40:14 -0600 schrieb Robert Jacques sandf...@jhu.edu: [snip] All the generators have the function name [name]UUID. Instead, make these function static

Re: Message passing between threads: Java 4 times faster than D

2012-02-09 Thread Oliver Plow
I recently completed a message passing library in D that lets the messages be passed between actors that don't necessarily correspond to threads (as std.concurrency requires). I'll see how it does on your benchmark. Sounds quite interesting. You created some kind of thread pool for your

Re: D at work

2012-02-09 Thread Pedro Lacerda
DVM is great for this: https://bitbucket.org/doob/dvm DVM sounds well, thanks! As for use cases, command line is a good bet. I suggest starting with something that has a clear scope and isn't chosen based on a marketing feature. For example if you're going to build a server of some sort

Re: Arrays - Inserting and moving data

2012-02-09 Thread Pedro Lacerda
I __believe__ that insertInPlace doesn't shift the elements, but use an appender allocating another array instead. Maybe this function do what you want. int[] arr = [0,1,2,3,4,5,6,7,8,9]; void maybe(T)(T[] arr, size_t pos, T value) { size_t i; for (i = arr.length - 1; i

Re: Arrays - Inserting and moving data

2012-02-09 Thread MattCodr
On Thursday, 9 February 2012 at 12:51:09 UTC, Pedro Lacerda wrote: I __believe__ that insertInPlace doesn't shift the elements, Yes, It appears that it really doesn't shift the array, insertInPlace just returns a new array with a new element in n position. Maybe this function do what you

Re: Arrays - Inserting and moving data

2012-02-09 Thread Ali Çehreli
On 02/09/2012 03:47 AM, MattCodr wrote: I have a doubt about the best way to insert and move (not replace) some data on an array. For example, In some cases if I want to do action above, I do a loop moving the data until the point that I want and finally I insert the new data there. In D I

Re: A GUI library to begin with

2012-02-09 Thread Zachary Lund
On Wednesday, 8 February 2012 at 22:21:35 UTC, AaronP wrote: On 02/08/2012 09:24 AM, Jesse Phillips wrote: I think GtkD is stated to suck because it isn't native to Windows or Mac, both in look and availability. Hmm, perhaps. Incidentally, it looks great on Linux! :P GTK+ was created for

Re: Arrays - Inserting and moving data

2012-02-09 Thread H. S. Teoh
On Thu, Feb 09, 2012 at 10:30:22AM -0800, Ali Çehreli wrote: [...] But if you don't actually want to modify the data, you can merely access the elements in-place by std.range.chain: import std.stdio; import std.range; void main() { int[] arr = [0,1,2,3,4,5,6,7,8,9]; immutable

Compiler error with static vars/functions

2012-02-09 Thread Oliver Plow
Hello, I'm fighting with a strange compiler error. This here compiles and runs fine: -- main.d - class Foo { static int z = 4; static int bar() { return 6; } int foobar() { return 7; } } int main(string[] argv) { writeln(Foo.z); writeln(Foo.bar()); //

Re: Compiler error with static vars/functions

2012-02-09 Thread Jonathan M Davis
On Thursday, February 09, 2012 14:57:08 Oliver Plow wrote: Hello, I'm fighting with a strange compiler error. This here compiles and runs fine: [snip] This is a bit strange for me. Apparently, must be some kind of import problem importing Foo. But I don't see how ... It's because you

Re: Compiler error with static vars/functions

2012-02-09 Thread simendsjo
On 02/09/2012 02:57 PM, Oliver Plow wrote: Hello, I'm fighting with a strange compiler error. This here compiles and runs fine: -- main.d - class Foo { static int z = 4; static int bar() { return 6; } int foobar() { return 7; } } int main(string[] argv) {

Re: Arrays - Inserting and moving data

2012-02-09 Thread MattCodr
On Thursday, 9 February 2012 at 18:30:22 UTC, Ali Çehreli wrote: On 02/09/2012 03:47 AM, MattCodr wrote: I have a doubt about the best way to insert and move (not replace) some data on an array. For example, In some cases if I want to do action above, I do a loop moving the data until the

Re: Arrays - Inserting and moving data

2012-02-09 Thread Ali Çehreli
On 02/09/2012 11:03 AM, H. S. Teoh wrote: On Thu, Feb 09, 2012 at 10:30:22AM -0800, Ali Çehreli wrote: [...] But if you don't actually want to modify the data, you can merely access the elements in-place by std.range.chain: import std.stdio; import std.range; void main() { int[]

Re: Compiler error with static vars/functions

2012-02-09 Thread bearophile
Jonathan M Davis: Normally, it's considered good practice to give modules names which are all lowercase (particularly since some OSes aren't case-sensitive for file operations). That's just a fragile work-around for a module system design problem that I didn't like from the first day I've

Re: A GUI library to begin with

2012-02-09 Thread Denis Shelomovskij
08.02.2012 7:55, Mr. Anonymous пишет: Why does GTK suck (I read that a couple of times). GtkD (+OpenGL) worked stable in my rather big D1+Tango project 2 years ago (and do it now). Looks like it has lots of memory leaks (in almost every function call) but it didn't lead to crash after few

Re: A GUI library to begin with

2012-02-09 Thread Damian Ziemba
On Wednesday, 8 February 2012 at 03:55:41 UTC, Mr. Anonymous wrote: Hello, I want to start playing with D, and I'm looking at a GUI library to begin with. From what I see here: http://www.prowiki.org/wiki4d/wiki.cgi?GuiLibraries I have four choices: GtkD, DWT, DFL, DGui. Has anyone tried

Re: A GUI library to begin with

2012-02-09 Thread Damian Ziemba
Ach, and there is plugin for Windows Gtk+ runtime called WIMP which emulates Windows Native look, so situation with GtkD isn't so bad on Linux/FreeBSD and Windows. I guess the biggest problem is da Mac OSX platform. Monodevelop looks so f**cking ugly on Mac :D

Re: Arrays - Inserting and moving data

2012-02-09 Thread MattCodr
On Thursday, 9 February 2012 at 19:49:43 UTC, Timon Gehr wrote: Note that this code does the same, but is more efficient if you don't actually need the array: Yes I know, In fact I need re-think the way I code with this new features of D, like ranges for example. Thanks, Matheus.

Re: A GUI library to begin with

2012-02-09 Thread Jordi Sayol
Al 09/02/12 21:25, En/na Damian Ziemba ha escrit: GtkD seems to be the most mature and production ready for D. Although indeed, Gtk+ (and then GtkD) suffers from its lack of Native controls. The best solution would be QtD, but it looks like its abandoned. QtJambi isn't officially

Re: A GUI library to begin with

2012-02-09 Thread maarten van damme
I used gtkd, it worked perfectly. only downside is it isn't native on windows.

Re: Compiler error with static vars/functions

2012-02-09 Thread Jonathan M Davis
On Thursday, February 09, 2012 14:45:43 bearophile wrote: Jonathan M Davis: Normally, it's considered good practice to give modules names which are all lowercase (particularly since some OSes aren't case-sensitive for file operations). That's just a fragile work-around for a module

Re: Compiler error with static vars/functions

2012-02-09 Thread Jonathan M Davis
On Thursday, February 09, 2012 22:42:17 Oliver Plow wrote: Thanks for the answer. This means that all classes belonging to the same module must be in the same *.d file? I mean not one *.d file per class as in most languages? There is no connection between modules and classes other than the

  1   2   >