Re: DMagick image processing with D.

2012-04-09 Thread Mike Wey
On 04/08/2012 06:19 PM, nrgyzer wrote: Thanks for DMagick... works great, except toBlob(). When I try the following: Image example = new Image(Geometry(100, 100), new ColorRGB(0, 255, 0)); example.toBlob(); I get an access violation. Do I anything wrong or is it a bug? (I'm using Imagick

Lang.NEXT panel on native languages

2012-04-09 Thread Andrei Alexandrescu
http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Panel-Native-Languages?format=html5 Andrei

Re: Mascot for D

2012-04-09 Thread H. S. Teoh
On Fri, Apr 06, 2012 at 02:59:27PM -0700, Walter Bright wrote: On 4/6/2012 8:05 AM, H. S. Teoh wrote: On Thu, Apr 05, 2012 at 10:08:07PM -0700, H. S. Teoh wrote: [...] Alright. It's time to introduce D-man version 2! (Or is that D2-man? :-P)

Re: malloc in core.memory.GC

2012-04-09 Thread H. S. Teoh
On Sun, Apr 08, 2012 at 10:48:53PM -0700, Sean Kelly wrote: [...] Really, I'd like to see all TypeInfo generated by template code in druntime. Will that also solve the current weirdness with TypeInfo_Aya and TypeInfo_Aa being used for string and char[], respectively, but TypeInfo_Array being

Re: A modest proposal: eliminate template code bloat

2012-04-09 Thread Somedude
Le 08/04/2012 16:18, H. S. Teoh a écrit : On Sun, Apr 08, 2012 at 03:01:56PM +0400, Dmitry Olshansky wrote: I think it's been ages since I meant to ask why nobody (as in compiler vendors) does what I think is rather simple optimization. In the short term the plan is to introduce a link-time

Re: Shared library in D on Linux

2012-04-09 Thread Timo Westkämper
On Sunday, 8 April 2012 at 17:59:28 UTC, Timo Westkämper wrote: Does someone know why the lib (.a) packaging instead of objects (.o) works better in this case? Didn't work after all with -lib. I mixed up outputs.

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Denis Shelomovskij
08.04.2012 21:31, Andrei Alexandrescu пишет: On 4/8/12 11:59 AM, Denis Shelomovskij wrote: Very good but minimum isn't a best guess. Personally I (and there will be a lot of such maniacs I suppose) will think that this (minimum) time can be significantly smaller than average time. I've

Re: A modest proposal: eliminate template code bloat

2012-04-09 Thread Dmitry Olshansky
On 09.04.2012 5:11, Daniel Murphy wrote: Dmitry Olshanskydmitry.o...@gmail.com wrote in message news:jlsmka$22ce$1...@digitalmars.com... The refinement is merging prefixes and suffixes of course. And for that one needs to calculate hashes for all of prefixes and all of suffixes. I will define

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Don
On 08.04.2012 07:56, Andrei Alexandrescu wrote: For this to happen, we need to start an effort of migrating built-in arrays into runtime, essentially making them templates that the compiler lowers to. So I have two questions: vote -= real.infinity. That would kill D.

Re: Discussion on Go and D

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

Re: Hitchikers Guide to Porting Phobos / D Runtime to other architectures

2012-04-09 Thread Johannes Pfau
Am Sun, 08 Apr 2012 21:08:52 +0200 schrieb Iain Buclaw ibuc...@ubuntu.com: I got asked whether there are any porting hints for phobos on other architectures the other day from the debian GCC maintainers. So I gathered this must be at least a dedicated wiki or article to be written up on

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Timon Gehr
On 04/09/2012 10:24 AM, Don wrote: On 08.04.2012 07:56, Andrei Alexandrescu wrote: For this to happen, we need to start an effort of migrating built-in arrays into runtime, essentially making them templates that the compiler lowers to. So I have two questions: vote -= real.infinity. That

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Manu
On 9 April 2012 11:24, Don nos...@nospam.com wrote: On 08.04.2012 07:56, Andrei Alexandrescu wrote: For this to happen, we need to start an effort of migrating built-in arrays into runtime, essentially making them templates that the compiler lowers to. So I have two questions: vote -=

Re: Discussion on Go and D

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

Re: Discussion on Go and D

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

Re: Hitchikers Guide to Porting Phobos / D Runtime to other architectures

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 11:05, Johannes Pfau wrote: * Adapting the core.stdc bindings to something different than the currently supported C libraries sucks: The version blocks are sometimes completely wrong. For example Android's bionic is a C library based on BSD code, but running on Linux. As

Re: Discussion on Go and D

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

Re: Foreach Closures?

2012-04-09 Thread Ary Manzana
On 4/9/12 7:26 AM, Kevin Cox wrote: I was wondering about the foreach statement and when you implement opApply() for a class it is implemented using closures. I was wondering if this is just how it is expressed or if it is actually syntatic sugar. The reason I aski is because if you have a

Re: Hitchikers Guide to Porting Phobos / D Runtime to other architectures

2012-04-09 Thread Iain Buclaw
On 9 April 2012 10:35, Jacob Carlborg d...@me.com wrote: On 2012-04-09 11:05, Johannes Pfau wrote: * Adapting the core.stdc bindings to something different than the   currently supported C libraries sucks: The version blocks are   sometimes completely wrong. For example Android's bionic is a

Re: A modest proposal: eliminate template code bloat

2012-04-09 Thread Artur Skawina
On 04/09/12 08:21, Somedude wrote: Le 08/04/2012 16:18, H. S. Teoh a écrit : On Sun, Apr 08, 2012 at 03:01:56PM +0400, Dmitry Olshansky wrote: I think it's been ages since I meant to ask why nobody (as in compiler vendors) does what I think is rather simple optimization. In the short term

Re: More ddoc complaints

2012-04-09 Thread Stewart Gordon
On 08/04/2012 02:08, Adam D. Ruppe wrote: I have a pull request up to remove the big misfeature of embedded html in ddoc, and it is pending action, from me, to answer some of Walter's concerns. What have you done - just made it convertin documentation comments to lt; gt; amp; before

Re: Foreach Closures?

2012-04-09 Thread Kevin Cox
On Apr 9, 2012 5:59 AM, Ary Manzana a...@esperanto.org.ar wrote: In this video you can see what foreach with opApply gets translated to (at about minute 1): http://www.youtube.com/watch?v=oAhrFQVnsrY Thanks, that's perfect. I'm definitely going to try out decent.

Re: DIP16: Transparently substitute module with package

2012-04-09 Thread Steven Schveighoffer
On Fri, 06 Apr 2012 20:25:23 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: DIP15 doesn't fix the explicit path problem though. You can't change std/algorithm.d into std/algorithm/ (with sorting.d, search.d, etc.) without breaking code. You could make std/algorithm.d publicly import

Re: custom attribute proposal (yeah, another one)

2012-04-09 Thread Steven Schveighoffer
On Sat, 07 Apr 2012 09:59:27 -0400, Jacob Carlborg d...@me.com wrote: On 2012-04-06 19:36, Steven Schveighoffer wrote: so now I must define a type for every attribute? I'd rather just define a function. What if I have 20 string attributes, I must define a new attribute type for each one? This

Re: A modest proposal: eliminate template code bloat

2012-04-09 Thread H. S. Teoh
On Mon, Apr 09, 2012 at 08:21:08AM +0200, Somedude wrote: Le 08/04/2012 16:18, H. S. Teoh a écrit : On Sun, Apr 08, 2012 at 03:01:56PM +0400, Dmitry Olshansky wrote: I think it's been ages since I meant to ask why nobody (as in compiler vendors) does what I think is rather simple

Re: custom attribute proposal (yeah, another one)

2012-04-09 Thread Steven Schveighoffer
On Fri, 06 Apr 2012 18:40:29 -0400, Piotr Szturmaj bncr...@jadamspam.pl wrote: Steven Schveighoffer wrote: Unused function do not make it into the EXE. Are unused structs compiled into EXE? Their TypeInfo_Struct is. If they are compiled in their own module, then I think it's

Re: custom attribute proposal (yeah, another one)

2012-04-09 Thread Steven Schveighoffer
On Sat, 07 Apr 2012 10:00:19 -0400, Jacob Carlborg d...@me.com wrote: On 2012-04-06 19:37, Steven Schveighoffer wrote: On Fri, 06 Apr 2012 12:53:51 -0400, Piotr Szturmaj struct Author { string name = empty; } // struct Author { string name; } - this works too I think the point is, we should

Re: custom attribute proposal (yeah, another one)

2012-04-09 Thread Steven Schveighoffer
On Sat, 07 Apr 2012 07:26:26 -0400, deadalnix deadal...@gmail.com wrote: Le 06/04/2012 22:46, Mafi a écrit : Also, if I see: @square(5) int foo(); How do I know that I have to use __traits(getAttribute, foo, Area)? Another possibility: @attribute Area area(int w, int h) { return Area(w,

Re: Foreach Closures?

2012-04-09 Thread Manu
OMG, DO WANT! :P Who wrote this? I wonder if they'd be interested in adapting it to VisualD + MonoDevelop? On 9 April 2012 12:56, Ary Manzana a...@esperanto.org.ar wrote: On 4/9/12 7:26 AM, Kevin Cox wrote: I was wondering about the foreach statement and when you implement opApply() for a

Re: custom attribute proposal (yeah, another one)

2012-04-09 Thread Steven Schveighoffer
On Sat, 07 Apr 2012 10:11:16 -0400, Jacob Carlborg d...@me.com wrote: On 2012-04-06 20:52, Steven Schveighoffer wrote: Also, if I see: @square(5) int foo(); How do I know that I have to use __traits(getAttribute, foo, Area)? Isn't square the name of the attribute? In that case you would

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Andrei Alexandrescu
On 4/9/12 2:06 AM, Denis Shelomovskij wrote: Why will recording the average produce so much noise? As I explained, the average takes noise and outliers (some very large, e.g. milliseconds in a benchmark that takes microseconds) into account. The minimum is shielded from this issue. In the

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Andrei Alexandrescu
On 4/9/12 3:24 AM, Don wrote: On 08.04.2012 07:56, Andrei Alexandrescu wrote: For this to happen, we need to start an effort of migrating built-in arrays into runtime, essentially making them templates that the compiler lowers to. So I have two questions: vote -= real.infinity. That would

Re: custom attribute proposal (yeah, another one)

2012-04-09 Thread Steven Schveighoffer
On Sat, 07 Apr 2012 12:48:00 -0400, Jacob Carlborg d...@me.com wrote: On 2012-04-07 05:29, Kapps wrote: I slightly prefer this function method over the struct method because: 1) No need to generate a custom struct for everything. Plenty of things are just a true or false, or a string. Saves a

Re: Foreach Closures?

2012-04-09 Thread Kevin Cox
On Apr 9, 2012 9:19 AM, Manu turkey...@gmail.com wrote: OMG, DO WANT! :P Who wrote this? I wonder if they'd be interested in adapting it to VisualD + MonoDevelop? On 9 April 2012 12:56, Ary Manzana a...@esperanto.org.ar wrote: On 4/9/12 7:26 AM, Kevin Cox wrote: I was wondering about the

Re: More ddoc complaints

2012-04-09 Thread Adam D. Ruppe
On Monday, 9 April 2012 at 11:05:10 UTC, Stewart Gordon wrote: What have you done - just made it convertin documentation comments to lt; gt; amp; before processing? In ddoc's source code, there was a macro called ESCAPES already, but it wasn't actually used. My patch enables the use of

Re: TickDuration.to's second template parameter

2012-04-09 Thread Steven Schveighoffer
On Sat, 07 Apr 2012 20:03:25 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On Saturday, April 07, 2012 15:59:57 Andrei Alexandrescu wrote: Whenever I use TickDuration.to, I need to add the pesky second argument, e.g. TickDuration.to!(nsecs, uint). Would a default make sense there?

Re: Foreach Closures?

2012-04-09 Thread Kapps
On Monday, 9 April 2012 at 13:19:32 UTC, Manu wrote: OMG, DO WANT! :P Who wrote this? I wonder if they'd be interested in adapting it to VisualD + MonoDevelop? On 9 April 2012 12:56, Ary Manzana a...@esperanto.org.ar wrote: On 4/9/12 7:26 AM, Kevin Cox wrote: I was wondering about the

Re: Precise GC

2012-04-09 Thread Steven Schveighoffer
On Sat, 07 Apr 2012 21:56:09 -0400, Walter Bright newshou...@digitalmars.com wrote: Of course, many of us have been thinking about this for a looong time, and what is the best way to go about it. The usual technique is for the compiler to emit some sort of table for each TypeInfo giving

Re: A modest proposal: eliminate template code bloat

2012-04-09 Thread Daniel Murphy
H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.1518.1333937643.4860.digitalmar...@puremagic.com... Why is it so important to have unique addresses for functions? Just because I can't think of a use case doesn't mean nobody is relying on it! But I guess there really isn't

Re: malloc in core.memory.GC

2012-04-09 Thread Steven Schveighoffer
On Sun, 08 Apr 2012 16:33:01 -0400, Alex Rønne Petersen xtzgzo...@gmail.com wrote: APPENDABLE is, IIRC, mostly an internal attribute used for the array append cache. You can ignore it entirely (we should document this). It's used to flag that the block of GC data is actually an appendable

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Manfred Nowak
Andrei Alexandrescu wrote: all noise is additive (there's no noise that may make a benchmark appear to run faster) This is in doubt, because you yourself wrote the machine itself has complex interactions. This complex interactions might lower the time needed for an operation of the

Re: Discussion on Go and D

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

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Steven Schveighoffer
Added to trello. -Steve

Re: custom attribute proposal (yeah, another one)

2012-04-09 Thread Marco Leise
Am Mon, 09 Apr 2012 09:13:51 -0400 schrieb Steven Schveighoffer schvei...@yahoo.com: On Sat, 07 Apr 2012 10:00:19 -0400, Jacob Carlborg d...@me.com wrote: On 2012-04-06 19:37, Steven Schveighoffer wrote: On Fri, 06 Apr 2012 12:53:51 -0400, Piotr Szturmaj struct Author { string name =

Re: A modest proposal: eliminate template code bloat

2012-04-09 Thread H. S. Teoh
On Mon, Apr 09, 2012 at 11:58:01PM +1000, Daniel Murphy wrote: H. S. Teoh hst...@quickfur.ath.cx wrote in message news:mailman.1518.1333937643.4860.digitalmar...@puremagic.com... Why is it so important to have unique addresses for functions? Just because I can't think of a use case

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Steven Schveighoffer
On Sun, 08 Apr 2012 01:56:38 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org wrote: Walter and I discussed today about using the small string optimization in string and other arrays of immutable small objects. On 64 bit machines, string occupies 16 bytes. We could use the first

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Andrei Alexandrescu
On 4/9/12 4:21 AM, Manu wrote: After thinking on it a bit, I'm becoming a little worried about this move for 2 rarely considered reasons: Using lowering to a template, debug(/unoptimised) performance will probably get a lot slower, which is really annoying. And debugging/stepping might become

Re: Foreach Closures?

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 15:19, Manu wrote: OMG, DO WANT! :P Who wrote this? I wonder if they'd be interested in adapting it to VisualD + MonoDevelop? That would be Ary Manzana. I think one of the reasons why he stopped working on this was that he ported the DMD frontend to Java and it's just a pain to

Re: custom attribute proposal (yeah, another one)

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 15:20, Steven Schveighoffer wrote: The argument was to use the name of the type returned as the attribute name instead of the function. That is not my proposal. The suggested case is to be able to use a different name to build the same attribute, to be more intuitive. i.e. both

Re: custom attribute proposal (yeah, another one)

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 15:29, Steven Schveighoffer wrote: I think the struct approach is fine for some attributes, and I think it should be doable to @attribute either functions or structs. I just want the most generic, basic feature possible. I think Timon has the best idea that any callable CTFE

Re: Documentation improvements

2012-04-09 Thread David Gileadi
On 4/8/12 7:41 AM, Jonas H. wrote: Hi everyone, I decided to give D a try yesterday and had quite some trouble with the documentation. I want to help improve the docs on dlang.org. I'm generally in favor of simplifying the sidebar navigation, since I already did a bunch of that under the

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Jakob Ovrum
On Monday, 9 April 2012 at 14:55:16 UTC, Andrei Alexandrescu wrote: 3. There are patterns that attempt to optimize by e.g. using .ptr, but end up pessimizing code because they trigger multiple memory allocations. Andrei It's important to note that this pattern is probably most common in

Re: Shared library in D on Linux

2012-04-09 Thread Ellery Newcomer
Well, if you're really hankering for a shared lib, try ldc. I have gotten it to compile working shared libs in the past. On 04/09/2012 01:24 AM, Timo Westkämper timo.westkam...@gmail.com wrote: On Sunday, 8 April 2012 at 17:59:28 UTC, Timo Westkämper wrote: Does someone know why the lib (.a)

Re: Foreach Closures?

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 15:44, Kapps wrote: That was Descent, a plugin for Eclipse. They did it by porting DMD, with changes, to Java. A horribly painful task I'd imagine. I wonder if it'd be easier by just creating bindings for DMD for the language of choice. That would be horribly painful as well.

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Francois Chabot
Why is there so much emphasis on printBenchmarks()? benchmark() and runBenchmarks() are clearly the core of this library, and yet they are relegated to second-class citizen: Oh, I guess you can use this. Normally, I wouldn't be so picky, but this is a standard library. Focus should be on

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Andrei Alexandrescu
On 4/9/12 10:23 AM, Francois Chabot wrote: Why is there so much emphasis on printBenchmarks()? benchmark() and runBenchmarks() are clearly the core of this library, and yet they are relegated to second-class citizen: Oh, I guess you can use this. Normally, I wouldn't be so picky, but this is a

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Andrej Mitrovic
On 4/9/12, Jakob Ovrum jakobov...@gmail.com wrote: It's also common to avoid the `toStringz` function for strings you know are zero-terminated, using `.ptr` directly instead. Yup. E.g. WinAPI text drawing functions take a wchar* and a length. I don't have to call toUTF16z but just pass a

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Andrei Alexandrescu
On 4/9/12 9:25 AM, Manfred Nowak wrote: Andrei Alexandrescu wrote: all noise is additive (there's no noise that may make a benchmark appear to run faster) This is in doubt, because you yourself wrote the machine itself has complex interactions. This complex interactions might lower the time

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Jakob Ovrum
On Monday, 9 April 2012 at 15:37:37 UTC, Andrej Mitrovic wrote: On 4/9/12, Jakob Ovrum jakobov...@gmail.com wrote: The one taking (const(char)[] s) does this, but not the other overload taking (string s). Whether or not that's safe I don't really know. I've had an argument over this on github,

Re: Discussion on Go and D

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

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Andrej Mitrovic
On 4/9/12, Jakob Ovrum jakobov...@gmail.com wrote: With all the focus on manual memory management and pluggable allocators going on, I think the optimization must be removed or the documentation for the `string` overload changed. Or add a compile-time argument: toStringz(bool ForceAllocate =

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Francois Chabot
Which is great, unless the program wants to measure the cache memory itself, in which case it would use special assembler instructions or large memset()s. (We do such at Facebook.) I disagree. If a regression suddenly causes a function to become heavily cache-bound, it should show up in

Windows 8 Metro support

2012-04-09 Thread Sönke Ludwig
(IMO) one of the biggest obstacles for truly broad adoption of D currently is the weak platform support on end user platforms. The two mobile platforms that came up recently (iOS and Android) are two examples. And indeed I think that support for mobile platforms could be a real stepping stone

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Somedude
Le 09/04/2012 17:23, Francois Chabot a écrit : Why is there so much emphasis on printBenchmarks()? benchmark() and runBenchmarks() are clearly the core of this library, and yet they are relegated to second-class citizen: Oh, I guess you can use this. Normally, I wouldn't be so picky, but

Re: TickDuration.to's second template parameter

2012-04-09 Thread Jonathan M Davis
On Monday, April 09, 2012 09:36:45 Steven Schveighoffer wrote: On Sat, 07 Apr 2012 20:03:25 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On Saturday, April 07, 2012 15:59:57 Andrei Alexandrescu wrote: Whenever I use TickDuration.to, I need to add the pesky second argument, e.g.

Re: DIP16: Transparently substitute module with package

2012-04-09 Thread Jonathan M Davis
On Monday, April 09, 2012 08:55:27 Steven Schveighoffer wrote: On Fri, 06 Apr 2012 20:25:23 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: DIP15 doesn't fix the explicit path problem though. You can't change std/algorithm.d into std/algorithm/ (with sorting.d, search.d, etc.) without

Re: Windows 8 Metro support

2012-04-09 Thread Dmitry Olshansky
On 09.04.2012 20:39, Sönke Ludwig wrote: (IMO) one of the biggest obstacles for truly broad adoption of D currently is the weak platform support on end user platforms. The two mobile platforms that came up recently (iOS and Android) are two examples. And indeed I think that support for mobile

Re: TickDuration.to's second template parameter

2012-04-09 Thread Steven Schveighoffer
On Mon, 09 Apr 2012 13:05:09 -0400, Jonathan M Davis jmdavisp...@gmx.com wrote: On Monday, April 09, 2012 09:36:45 Steven Schveighoffer wrote: I think what Andrei is asking for is to change this: T to(string units, T)() @safe const pure nothrow Into this: T to(string units, T = long)()

Re: TickDuration.to's second template parameter

2012-04-09 Thread Andrei Alexandrescu
On 4/9/12 12:05 PM, Jonathan M Davis wrote: We could add that, but why? td.msecs already does what td.to!msecs() would do if to defaulted to long. I don't see any reason to use to directly unless you're using something other than long. And if you use a type of than long, you're going to have to

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Andrei Alexandrescu
On 4/9/12 11:29 AM, Francois Chabot wrote: Which is great, unless the program wants to measure the cache memory itself, in which case it would use special assembler instructions or large memset()s. (We do such at Facebook.) I disagree. If a regression suddenly causes a function to become

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Andrei Alexandrescu
On 4/9/12 11:44 AM, Somedude wrote: It helps benchmarking being as standard as unit testing. We don't want to have to write again and again the same boilerplate code for such trivial uses. Yes, I had unittest in mind when writing the library. If one needs more than one statement to get an

Re: malloc in core.memory.GC

2012-04-09 Thread Alex Rønne Petersen
On 09-04-2012 16:16, Steven Schveighoffer wrote: On Sun, 08 Apr 2012 16:33:01 -0400, Alex Rønne Petersen xtzgzo...@gmail.com wrote: APPENDABLE is, IIRC, mostly an internal attribute used for the array append cache. You can ignore it entirely (we should document this). It's used to flag that

Re: malloc in core.memory.GC

2012-04-09 Thread Steven Schveighoffer
On Mon, 09 Apr 2012 13:39:10 -0400, Alex Rønne Petersen xtzgzo...@gmail.com wrote: In MCI, I can't provide finalization support when programs running in the VM use the D GC, because that *requires* me to use the Object layout for runtime objects. That's just not nice, since it adds (IIRC)

Re: Windows 8 Metro support

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 18:39, Sönke Ludwig wrote: (IMO) one of the biggest obstacles for truly broad adoption of D currently is the weak platform support on end user platforms. The two mobile platforms that came up recently (iOS and Android) are two examples. And indeed I think that support for mobile

Re: Precise GC

2012-04-09 Thread deadalnix
Le 08/04/2012 14:02, Alex Rønne Petersen a écrit : On 08-04-2012 11:42, Manu wrote: On 8 April 2012 11:56, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch wrote: On 04/08/2012 10:45 AM, Timon Gehr wrote: That actually sounds like a pretty awesome idea. Make sure that the compiler does

Re: Windows 8 Metro support

2012-04-09 Thread Nick Sabalausky
Sönke Ludwig slud...@outerproduct.org wrote in message news:jlv3c2$10rn$1...@digitalmars.com... (IMO) one of the biggest obstacles for truly broad adoption of D currently is the weak platform support on end user platforms. The two mobile platforms that came up recently (iOS and Android) are

Re: Precise GC

2012-04-09 Thread deadalnix
Le 08/04/2012 03:56, Walter Bright a écrit : Of course, many of us have been thinking about this for a looong time, and what is the best way to go about it. The usual technique is for the compiler to emit some sort of table for each TypeInfo giving the layout of the object, i.e. where the

Re: std.benchmark ready for review. Manager sought after

2012-04-09 Thread Manfred Nowak
Andrei Alexandrescu wrote: For example by running more than one instance of the benchmarked program in paralell and use the thereby gathered statistical routines to spread T into the additiv components A, Q and N. I disagree with running two benchmarks in parallel because that exposes them

Re: Precise GC

2012-04-09 Thread Manu
On 9 April 2012 21:20, deadalnix deadal...@gmail.com wrote: Le 08/04/2012 14:02, Alex Rønne Petersen a écrit : On 08-04-2012 11:42, Manu wrote: On 8 April 2012 11:56, Timon Gehr timon.g...@gmx.ch mailto:timon.g...@gmx.ch wrote: On 04/08/2012 10:45 AM, Timon Gehr wrote: That actually

Re: uploading with curl

2012-04-09 Thread Gleb
Woks perfectly! Thanks a lot!

Can't assign to static array in ctor?

2012-04-09 Thread H. S. Teoh
What's the reason the following code doesn't compile? struct S { const(int)[4] data; this(const(int)[4] d) { data = d; // this is line 4 } } void main() { S s; }

Re: More ddoc complaints

2012-04-09 Thread Stewart Gordon
On 09/04/2012 14:34, Adam D. Ruppe wrote: On Monday, 9 April 2012 at 11:05:10 UTC, Stewart Gordon wrote: snip Create LT, GT and AMP macros and use them in your code examples. There's two problems with that: 1) it is hideous and 2) what if the user wants some format other than html? Then

Re: Small Buffer Optimization for string and friends

2012-04-09 Thread Manu
On 9 April 2012 17:55, Andrei Alexandrescu seewebsiteforem...@erdani.orgwrote: On 4/9/12 4:21 AM, Manu wrote: After thinking on it a bit, I'm becoming a little worried about this move for 2 rarely considered reasons: Using lowering to a template, debug(/unoptimised) performance will

Re: Windows 8 Metro support

2012-04-09 Thread Sönke Ludwig
It's possible to use D with WinRT, as someone posted in an other thread: http://www.reddit.com/tb/ow7qc But that does not suffice to make a Metro app. For desktop apps there shouldn't be a problem, but the Metro side poses more restrictions on the app.

Re: Windows 8 Metro support

2012-04-09 Thread Sönke Ludwig
Am 09.04.2012 19:12, schrieb Dmitry Olshansky: Not true at all, in every talk I've seen on WinRT so far C++ CRT is still shipped side by side with WinRT. Basically every language has his own runtime. It wouldn't be Microsoft if they haven't got a solid reserve of backwards compatibility. Simply

Re: Windows 8 Metro support

2012-04-09 Thread Sönke Ludwig
Am 09.04.2012 20:21, schrieb Nick Sabalausky: Aside from the Win8 stuff (only because I have a hard time believing Win32 won't work on Win8), I strongly agree will all of this. No, sorry for the confusion, Win32 will work in general! Just Metro apps may not use Win32 and other libraries

Re: Shared library in D on Linux

2012-04-09 Thread Timo Westkämper
On Monday, 9 April 2012 at 15:14:45 UTC, Ellery Newcomer wrote: Well, if you're really hankering for a shared lib, try ldc. I have gotten it to compile working shared libs in the past. On 04/09/2012 01:24 AM, Timo Westkämper timo.westkam...@gmail.com wrote: On Sunday, 8 April 2012 at 17:59:28

Re: Windows 8 Metro support

2012-04-09 Thread Michel Fortin
On 2012-04-09 19:20:49 +, Sönke Ludwig slud...@outerproduct.org said: I've got my information directly from Microsoft Metro guys. Not totally sure how good their knowledge actually is, but for _Metro_ apps they said that because of sandboxing it is only allowed to access functions of the

Re: Can't assign to static array in ctor?

2012-04-09 Thread bearophile
H. S. Teoh: struct S { const(int)[4] data; this(const(int)[4] d) { data = d; // this is line 4 } } void main() { S s; } I think this used to work (do you have an

Re: Windows 8 Metro support

2012-04-09 Thread Michel Fortin
On 2012-04-09 16:39:30 +, Sönke Ludwig slud...@outerproduct.org said: Right now, if we don't catch up here, D will slowly degrade to a pure server and command line application language which surely wouldn't do it justice. I share your feeling. In fact, I'm not using D anywhere right now

Re: Shared library in D on Linux

2012-04-09 Thread Iain Buclaw
On 9 April 2012 20:37, Timo Westkämper\ timo.westkam...@gmail.com@puremagic.com wrote: On Monday, 9 April 2012 at 15:14:45 UTC, Ellery Newcomer wrote: Well, if you're really hankering for a shared lib, try ldc. I have gotten it to compile working shared libs in the past. On 04/09/2012 01:24

The Downfall of Imperative Programming

2012-04-09 Thread Mirko Pilger
i guess this might be of interest to some. http://fpcomplete.com/the-downfall-of-imperative-programming/ http://www.reddit.com/r/programming/comments/s112h/the_downfall_of_imperative_programming_functional/

Re: Shared library in D on Linux

2012-04-09 Thread Timo Westkämper
On Monday, 9 April 2012 at 19:59:18 UTC, Iain Buclaw wrote: On 9 April 2012 20:37, Timo Westkämper\ timo.westkam...@gmail.com@puremagic.com wrote: On Monday, 9 April 2012 at 15:14:45 UTC, Ellery Newcomer wrote: Well, if you're really hankering for a shared lib, try ldc. I have gotten it to

Re: Windows 8 Metro support

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 21:20, Sönke Ludwig wrote: I've got my information directly from Microsoft Metro guys. Not totally sure how good their knowledge actually is, but for _Metro_ apps they said that because of sandboxing it is only allowed to access functions of the WinRT - the C++ runtime is an

Re: Windows 8 Metro support

2012-04-09 Thread Jacob Carlborg
On 2012-04-09 21:23, Sönke Ludwig wrote: It's possible to use D with WinRT, as someone posted in an other thread: http://www.reddit.com/tb/ow7qc But that does not suffice to make a Metro app. For desktop apps there shouldn't be a problem, but the Metro side poses more restrictions on the

Re: Shared library in D on Linux

2012-04-09 Thread Timo Westkämper
On Monday, 9 April 2012 at 20:31:44 UTC, Timo Westkämper wrote: On Monday, 9 April 2012 at 19:59:18 UTC, Iain Buclaw wrote: On 9 April 2012 20:37, Timo Westkämper\ timo.westkam...@gmail.com@puremagic.com wrote: On Monday, 9 April 2012 at 15:14:45 UTC, Ellery Newcomer wrote: Well, if you're

Re: Precise GC

2012-04-09 Thread deadalnix
Le 09/04/2012 20:33, Manu a écrit : Eh? Not sure what you mean. The idea is the template would produce a struct/table of data instead of being a pointer to a function, this way the GC could work without calling anything. If the GC was written to assume GC info in a particular format/structure,

Re: The Downfall of Imperative Programming

2012-04-09 Thread Gour
On Mon, 09 Apr 2012 22:28:01 +0200 Mirko Pilger pil...@cymotec.de wrote: i guess this might be of interest to some. Yes, it is...and I wonder if D's FP features are good enough? Author mentions D, but says:...This is all good, but not enough... Sincerely, Gour -- Everyone is forced to act

Re: The Downfall of Imperative Programming

2012-04-09 Thread Sean Cavanaugh
On 4/9/2012 3:28 PM, Mirko Pilger wrote: i guess this might be of interest to some. http://fpcomplete.com/the-downfall-of-imperative-programming/ http://www.reddit.com/r/programming/comments/s112h/the_downfall_of_imperative_programming_functional/ I would counter a flow based programming

Re: Precise GC

2012-04-09 Thread Walter Bright
On 4/9/2012 11:30 AM, deadalnix wrote: In the other hand, TLS can be collected independently and only influence the thread that own the data. Both are every powerfull improvement, and the design you propose « as this » cannot provide any mean to handle that. Which is a big missed opportunity,

  1   2   3   >