Re: Reviving BulletD -- again

2013-05-28 Thread BLM768
On Monday, 15 April 2013 at 05:26:27 UTC, BLM768 wrote: If I can automate the generation of bindings to a satisfactory degree, expanding the bindings should be a very simple process, so I could just write bindings for the core functionality and have others expand the bindings as needed. That

Re: Reviving BulletD -- again

2013-05-28 Thread F i L
I know Bullet is the most noteworthy open-source physics library, but if you intent is to have a D-style physics lib for games/apps you might have a lot more success porting a C# physics engine like Jitter (http://jitter-physics.com/wordpress/) over to D first (then possibly adapt some stuff

Re: dmd 2.063 beta 5

2013-05-28 Thread F i L
Leandro Lucarella wrote: That's completely FALSE. You might need some bugfixes! That view of if you want to be up to date you have to be willing to update a lot of code is really hurting D's stability. Evolution was never pain-free. The idea that D can thrive without adapting to it's

Re: Reviving BulletD -- again

2013-05-28 Thread BLM768
On Tuesday, 28 May 2013 at 17:37:27 UTC, F i L wrote: I know Bullet is the most noteworthy open-source physics library, but if you intent is to have a D-style physics lib for games/apps you might have a lot more success porting a C# physics engine like Jitter

Re: Reviving BulletD -- again

2013-05-28 Thread Faux Amis
On 28-5-2013 21:22, BLM768 wrote: On Tuesday, 28 May 2013 at 17:37:27 UTC, F i L wrote: I know Bullet is the most noteworthy open-source physics library, but if you intent is to have a D-style physics lib for games/apps you might have a lot more success porting a C# physics engine like Jitter

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Manu
On 28 May 2013 14:38, Peter Williams pwil3...@bigpond.net.au wrote: On 28/05/13 13:22, David Eagen wrote: On Tuesday, 28 May 2013 at 01:38:22 UTC, Peter Williams wrote: So you're going to spell check them all to make sure that they're English? Or did you mean ASCII? Peter That's it.

Re: Walter: A small request for this upcoming release's installer

2013-05-28 Thread Brad Anderson
On Tuesday, 28 May 2013 at 04:12:06 UTC, Walter Bright wrote: On 5/27/2013 7:44 PM, Brad Anderson wrote: (Sorry for the NG noise, I would have just emailed you directly about this but I couldn't manage to find your email address) Could you use the AWS hosted URLs for the zip files in the

Re: Discussion of TypeTuple naming

2013-05-28 Thread Jonathan M Davis
On Tuesday, May 28, 2013 04:52:50 Diggory wrote: Are you really arguing that the existing system is easier to understand? I'm arguing that the only problem in the current design is the name. TypeTuple is a template for creating built-in tuples, and the built-in tuples deal with both

Re: Wondering about errors…

2013-05-28 Thread Rainer Schuetze
On 27.05.2013 13:51, Adam D. Ruppe wrote: Yeah, me too. I take a working program and add gf to the middle of it. Here's the errors: base.d(2143): Error: found '{' when expecting ';' following statement base.d(2168): Error: unexpected ( in declarator base.d(2168): Error: basic type expected,

Re: [article] Language Design Deal Breakers

2013-05-28 Thread Don
On Sunday, 26 May 2013 at 18:43:30 UTC, Walter Bright wrote: On 5/26/2013 8:43 AM, deadalnix wrote: On Sunday, 26 May 2013 at 14:10:44 UTC, Paulo Pinto wrote: Yeah, you are right. C and C++ stab themselves only to die a few hours later in a code section totally unrelated or just behave

Re: More on Component Programming

2013-05-28 Thread Sebastian Graf
On Tuesday, 28 May 2013 at 00:16:23 UTC, bearophile wrote: Sebastian Graf: Plus, the compiler is still able to optimize most of the delegate/range fluff away (as opposed to e.g. C#). There are several optimizations that D/DMD is not performing on those ranges and higher order functions. The

Re: Rust-based provocation :)

2013-05-28 Thread nazriel
On Tuesday, 28 May 2013 at 00:43:25 UTC, Adam D. Ruppe wrote: On Monday, 27 May 2013 at 17:51:33 UTC, Dicebot wrote: Looking at object.d source, it looks like you are generating TypeInfo stubs that can be optimized away, have I understood it right? I'm not sure if they can be optimized away,

Re: Wondering about errors…

2013-05-28 Thread Timothee Cour
I posted bugzilla entry: http://d.puremagic.com/issues/show_bug.cgi?id=10177a few days ago. In short, it says: 'why not just stop semantic3 passes at 1st error occurence' ? Other entries related to irrelevant error messages that I've recently reported:10169 , 10141, 10177. On Mon, May 27, 2013

Re: Rust-based provocation :)

2013-05-28 Thread Dicebot
On Tuesday, 28 May 2013 at 07:26:34 UTC, nazriel wrote: I tried to port your package to x86_64 but dozens of: /home/raz/.dvm/compilers/dmd-2.063/src/druntime/src/rt/typeinfo/ti_Acfloat.d(35): Error: cannot implicitly convert expression (s.length * 8LU) of type ulong to uint

Re: Rust-based provocation :)

2013-05-28 Thread Dicebot
On Tuesday, 28 May 2013 at 00:43:25 UTC, Adam D. Ruppe wrote: I think line 87 was one of the TypeInfos though, and dmd expects them to be a particular size, and it is slightly different on 64 bit. If it is TypeInfo_Struct, on 32 bit void*[13] stuff; is good enough for dmd to shut up. Ah

iota and BigInt

2013-05-28 Thread Russel Winder
Arising from a thread on the GoLangNuts email list, I wrote the following: import std.algorithm: reduce; import std.bigint; import std.range: iota; import std.stdio: writeln; int main(immutable string[] args) { foreach (int i; iota(10,

Re: [article] Language Design Deal Breakers

2013-05-28 Thread Walter Bright
On 5/28/2013 12:06 AM, Don wrote: On Sunday, 26 May 2013 at 18:43:30 UTC, Walter Bright wrote: Fibers should be implemented by mapping a 4K page with no access rights at the end of each stack. We do that in our code. Fibers are virtually unusable without it, it is incredibly easy to get a

using unaryFun in functions that take a comparator (eg sort etc): sort!a[0] = sort!a[0]b[0]

2013-05-28 Thread Timothee Cour
very often I would wish that sort (+ related functions) could take unaryFun arguments and convert them to binaryFun as follows: //pseudocode: template unaryToBinaryComp(alias foo) { bool unaryToBinaryComp(T)(T a, T b) if (__traits(compiles,foo(a) foo(b)) ) { return foo(a) foo(b); } } Using

Re: More on Component Programming

2013-05-28 Thread Paulo Pinto
On Monday, 27 May 2013 at 23:23:52 UTC, Sebastian Graf wrote: On Monday, 27 May 2013 at 21:36:12 UTC, bearophile wrote: snip Every time I see that kind of code, my heart makes a delightful jump. That code is what I enjoy most about D compared to C++. Plus, the compiler is still able to

Re: More on Component Programming

2013-05-28 Thread Paulo Pinto
On Tuesday, 28 May 2013 at 07:26:06 UTC, Sebastian Graf wrote: On Tuesday, 28 May 2013 at 00:16:23 UTC, bearophile wrote: Sebastian Graf: Plus, the compiler is still able to optimize most of the delegate/range fluff away (as opposed to e.g. C#). There are several optimizations that D/DMD is

Re: iota and BigInt

2013-05-28 Thread Jonathan M Davis
On Tuesday, May 28, 2013 08:55:10 Russel Winder wrote: Arising from a thread on the GoLangNuts email list, I wrote the following: import std.algorithm: reduce; import std.bigint; import std.range: iota; import std.stdio: writeln; int

Re: iota and BigInt

2013-05-28 Thread Walter Bright
On 5/28/2013 1:32 AM, Jonathan M Davis wrote: On Tuesday, May 28, 2013 08:55:10 Russel Winder wrote: Arising from a thread on the GoLangNuts email list, I wrote the following: import std.algorithm: reduce; import std.bigint; import std.range: iota; import

Re: More on Component Programming

2013-05-28 Thread Peter Alexander
On Tuesday, 28 May 2013 at 02:01:30 UTC, Andrei Alexandrescu wrote: I'm disappointed cartesianProduct works that way; I should have caught that during the code review. A better iteration order would have spanned the lower position in both ranges first, i.e. create squares of increasing side in

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Olivier Pisano
On Tuesday, 28 May 2013 at 00:11:18 UTC, Walter Bright wrote: Every time I've been to a programming shop in a foreign country, the developers speak english at work and code in english. Of course, that doesn't mean that everyone does, but as far as I can tell the overwhelming bulk is done in

Re: Long symbol names (Was: demangle doesn't work with...)

2013-05-28 Thread Timothee Cour
The way template are mangled in super redundant. Are you referring to the way that a template name is repeated twice in its mangled representation ? eg: template ABC(T){struct ABC{}} writeln(ABC!int.mangleof); // S5tests18main10__T3ABCTiZ3ABC = corresponding to ABC!(int).ABC How would we

Re: demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

2013-05-28 Thread Timothee Cour
ok, reported here: bugzilla:10189 On Sun, May 26, 2013 at 9:03 PM, Daniel Murphy yebbl...@nospamgmail.comwrote: Timothee Cour thelastmamm...@gmail.com wrote in message news:mailman.207.1369611513.13711.digitalmar...@puremagic.com... Is there any plan to support demangling of those:

Re: Transition for removing functions from Object [Compiler devs in particular, please read]

2013-05-28 Thread Jacob Carlborg
On 2013-05-28 04:28, Lionello Lunesu wrote: But yet, super should just work: it should be a variable of type C and treated as such. So super should work with UFCS? -- /Jacob Carlborg

Re: Transition for removing functions from Object [Compiler devs in particular, please read]

2013-05-28 Thread Jacob Carlborg
On 2013-05-28 04:28, Lionello Lunesu wrote: I think this works just fine, you just have to drop the writeln(). foo() doesn't return anything, but prints itself. But yet, super should just work: it should be a variable of type C and treated as such. What about this. -- /Jacob Carlborg

Re: demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

2013-05-28 Thread Jacob Carlborg
On 2013-05-27 18:18, David Nadlinger wrote: On Monday, 27 May 2013 at 15:22:21 UTC, Peter Alexander wrote: Am I the only person that worries greatly about the length of symbols in D? No, I do as well. My units of measurement project suffered from very non-negligible code bloat due to symbol

Re: Walter: htod on github?

2013-05-28 Thread Jacob Carlborg
On 2013-05-28 04:32, Lionello Lunesu wrote: Walter, Any chance we can get the source of htod? If found it a very useful little utility, although there are many issues with it. VisualD also include a similar utility to convert header files to D, but it is more tuned to Windows header files.

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Jacob Carlborg
On 2013-05-28 03:38, Peter Williams wrote: So you're going to spell check them all to make sure that they're English? Or did you mean ASCII? Don't you have a spell checker in your editor? If not, find a new one :) -- /Jacob Carlborg

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Jacob Carlborg
On 2013-05-28 08:00, Manu wrote: Is there anywhere other than America that doesn't? Canada, Jamaica, other countries in that region? -- /Jacob Carlborg

Re: Wondering about errors…

2013-05-28 Thread Jacob Carlborg
On 2013-05-27 22:32, Walter Bright wrote: The usual approach to handling errors in a compiler is to guess at what the user actually meant, repair the AST according to that guess, then continue on. Unfortunately, the guess is usually wrong and the result is cascaded errors, of which only the

Re: iota and BigInt

2013-05-28 Thread bearophile
Walter Bright: Please enter this into Bugzilla. My request is in Bugzilla: http://d.puremagic.com/issues/show_bug.cgi?id=6447 Bye, bearophile

Re: More on Component Programming

2013-05-28 Thread bearophile
Peter Alexander: This will be part of my combinatorics library, but is more general. pairWise is just a specific case of k-subsets (with k=2). Yes, that's what's written a bit lower in my post, in the combinations() of Python. Bye, bearophile

Re: More on Component Programming

2013-05-28 Thread bearophile
Timothee Cour: python uses itertools.product which is lexicographic_depth. Like you say, no-one can agrees what the order should be, so let's leave it up to user through a template. Sounds like a no-brainer to me. There are use cases for each order I mentioned. Different cases enjoy

Re: More on Component Programming

2013-05-28 Thread bearophile
Walter Bright: There are several optimizations that D/DMD is not performing on those ranges and higher order functions. The Haskell compiler GHC optimized that stuff using purity, library defined rewrite rules, stream fusion/deforestation and more. DMD does nothing of this, or very little. I

Re: iota and BigInt

2013-05-28 Thread Russel Winder
On Tue, 2013-05-28 at 11:27 +0200, bearophile wrote: Walter Bright: Please enter this into Bugzilla. My request is in Bugzilla: http://d.puremagic.com/issues/show_bug.cgi?id=6447 Bye, bearophile I have added myself to the cc list of this 2 year old problem. I don't have the time,

NoScopeStatement violates C compatibility principal.

2013-05-28 Thread monarch_dodra
I have created before two threads about the weird semantics of labeled block statements. In a word: putting a label before a block means that block does not create a scope, and the variables created inside that scope will leak to the outside of said scope. I've found this to be problematic on

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Oleg Kuporosov
On Tuesday, 28 May 2013 at 01:34:47 UTC, Walter Bright wrote: Why? You said previously that you'd love to support extended operators ;) Extended operators, yes. Non-ascii identifiers, no. BTW, this is one of big D advantage, take into account some day D could be used for teaching in schools

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread monarch_dodra
On Monday, 27 May 2013 at 23:46:17 UTC, H. S. Teoh wrote: On Tue, May 28, 2013 at 01:28:22AM +0200, Hans W. Uhlig wrote: On Monday, 27 May 2013 at 23:05:46 UTC, Walter Bright wrote: On 5/27/2013 3:18 PM, H. S. Teoh wrote: Well, D *does* support non-English identifiers, y'know... for example:

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread monarch_dodra
On Tuesday, 28 May 2013 at 00:11:18 UTC, Walter Bright wrote: Every time I've been to a programming shop in a foreign country, the developers speak english at work and code in english. Of course, that doesn't mean that everyone does, but as far as I can tell the overwhelming bulk is done in

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Mr. Anonymous
On Monday, 27 May 2013 at 22:20:16 UTC, H. S. Teoh wrote: On Tue, May 28, 2013 at 12:04:52AM +0200, Vladimir Panteleev wrote: On Monday, 27 May 2013 at 21:24:15 UTC, H. S. Teoh wrote: Besides, it's impractical to use compose key sequences to write large amounts of text in some given language;

Re: NoScopeStatement violates C compatibility principal.

2013-05-28 Thread bearophile
monarch_dodra: So basically, this is saying If your C code compiles in D, you'll get the same result. I guarantee it :) It's a general rule, but it has some exceptions, like C programs that rely on global floating point variables initialized to 0, or when you use a fixed-sized array, that D

Re: Walter: htod on github?

2013-05-28 Thread Lionello Lunesu
On 5/28/13 12:11, Walter Bright wrote: On 5/27/2013 8:35 PM, Lionello Lunesu wrote: On 5/28/13 11:08, Diggory wrote: On Tuesday, 28 May 2013 at 02:32:24 UTC, Lionello Lunesu wrote: Walter, Any chance we can get the source of htod? If found it a very useful little utility, although there are

Re: More on Component Programming

2013-05-28 Thread Jacob Carlborg
On 2013-05-28 02:16, bearophile wrote: My editor uses a single uniform color for the contents of normal strings, unlike quoted strings. Why not use proper lambdas instead of strings? -- /Jacob Carlborg

Re: More on Component Programming

2013-05-28 Thread bearophile
Jacob Carlborg: Why not use proper lambdas instead of strings? Mostly for personal reasons: quoted strings are sometimes a little shorter, and they require you to use arguments with default names (as a and b), this increased standardization makes me read them a little faster than lambdas

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Manu
On 28 May 2013 19:12, Jacob Carlborg d...@me.com wrote: On 2013-05-28 08:00, Manu wrote: Is there anywhere other than America that doesn't? Canada, Jamaica, other countries in that region? Yes, the region called America ;) Although there's a few British colonies in the Caribbean...

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Jacob Carlborg
On 2013-05-28 14:09, Manu wrote: Yes, the region called America ;) Although there's a few British colonies in the Caribbean... Oh, you meant the whole region and not the country. -- /Jacob Carlborg

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Simen Kjaeraas
On Tue, 28 May 2013 14:11:29 +0200, Jacob Carlborg d...@me.com wrote: On 2013-05-28 14:09, Manu wrote: Yes, the region called America ;) Although there's a few British colonies in the Caribbean... Oh, you meant the whole region and not the country. America is not a country. The country is

Re: Long symbol names (Was: demangle doesn't work with...)

2013-05-28 Thread Martin Nowak
On 05/27/2013 08:22 PM, deadalnix wrote: The way template are mangled in super redundant. This can probably be fixed easily, but this is a breakage. How would you mangle them instead?

Re: demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

2013-05-28 Thread Martin Nowak
On 05/27/2013 10:34 PM, Peter Alexander wrote: Surely a better solution would be to use a lossless compression? Yeah, I would hate to loose the ability to demangle a symbol.

Re: demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

2013-05-28 Thread Martin Nowak
On 05/27/2013 06:18 PM, David Nadlinger wrote: non-negligible code bloat I wouldn't really call this code bloat, as it only affects your object files, the linker and the runtime linker.

Re: Rvalue references - The resolution

2013-05-28 Thread Steven Schveighoffer
On Sun, 26 May 2013 18:56:58 -0400, Timothee Cour thelastmamm...@gmail.com wrote: In fact it's also possible to know that these don't return a reference to their parameter. Watch out for this: Struct S {double x;} ref double foo(ref S a){return a.x;} That case is covered by the proposal.

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Simen Kjaeraas
On Tue, 28 May 2013 01:05:46 +0200, Walter Bright newshou...@digitalmars.com wrote: On 5/27/2013 3:18 PM, H. S. Teoh wrote: Well, D *does* support non-English identifiers, y'know... for example: void main(string[] args) { int число = 1; foreach (и;

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Jacob Carlborg
On 2013-05-28 14:58, Simen Kjaeraas wrote: America is not a country. The country is called USA. I know that, but I get the impression that people usually say America and refer to USA. -- /Jacob Carlborg

Re: [article] Language Design Deal Breakers

2013-05-28 Thread Simen Kjaeraas
On Tue, 28 May 2013 05:35:22 +0200, deadalnix deadal...@gmail.com wrote: On Monday, 27 May 2013 at 21:55:00 UTC, Simen Kjaeraas wrote: Now, if we wanted to add compiler support for non-nullable references, many more things would need to be decided - how do they look? Do they assert

Re: demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

2013-05-28 Thread David Nadlinger
On Tuesday, 28 May 2013 at 13:06:01 UTC, Martin Nowak wrote: On 05/27/2013 06:18 PM, David Nadlinger wrote: non-negligible code bloat I wouldn't really call this code bloat, as it only affects your object files, the linker and the runtime linker. And unstripped executables. David

Re: using unaryFun in functions that take a comparator (eg sort etc): sort!a[0] = sort!a[0]b[0]

2013-05-28 Thread David Nadlinger
On Tuesday, 28 May 2013 at 08:16:47 UTC, Timothee Cour wrote: sort!foo(a) =sort!(unaryToBinaryComp!(unaryFun!foo(a))) = sort!foo(a) foo(a) sorting in reverse order is easy: just use sort!-foo(a) In this case, schwartzSort might actually be more appropriate. But in general, I see your point.

Re: Long symbol names (Was: demangle doesn't work with...)

2013-05-28 Thread deadalnix
On Tuesday, 28 May 2013 at 12:56:15 UTC, Martin Nowak wrote: On 05/27/2013 08:22 PM, deadalnix wrote: The way template are mangled in super redundant. This can probably be fixed easily, but this is a breakage. How would you mangle them instead? templateSymbolKKKtepplateArguments Where

Re: D on next-gen consoles and for game development

2013-05-28 Thread Steven Schveighoffer
On Sat, 25 May 2013 01:52:10 -0400, Manu turkey...@gmail.com wrote: What does ObjC do? It seems to work okay on embedded hardware (although not particularly memory-constrained hardware). Didn't ObjC recently reject GC in favour of refcounting? Having used ObjC for the last year or so

Re: [article] Language Design Deal Breakers

2013-05-28 Thread David Nadlinger
On Tuesday, 28 May 2013 at 08:02:46 UTC, Walter Bright wrote: On 5/28/2013 12:06 AM, Don wrote: On Sunday, 26 May 2013 at 18:43:30 UTC, Walter Bright wrote: Fibers should be implemented by mapping a 4K page with no access rights at the end of each stack. We do that in our code. Fibers are

Re: Transition for removing functions from Object [Compiler devs in particular, please read]

2013-05-28 Thread Idan Arye
On Tuesday, 28 May 2013 at 09:02:32 UTC, Jacob Carlborg wrote: On 2013-05-28 04:28, Lionello Lunesu wrote: I think this works just fine, you just have to drop the writeln(). foo() doesn't return anything, but prints itself. But yet, super should just work: it should be a variable of type C

Re: Best XML Library

2013-05-28 Thread Steven Schveighoffer
On Fri, 24 May 2013 10:18:37 -0400, Adam D. Ruppe destructiona...@gmail.com wrote: On Friday, 24 May 2013 at 12:56:54 UTC, Andrea Fontana wrote: On Thursday, 23 May 2013 at 22:22:26 UTC, Meta wrote: I'm thinking of starting on a small XMPP-based messaging You should give a try to dom.d

Template args to UDA's

2013-05-28 Thread Manu
So I've run into an expression I need to be able to implement std.simd properly for GDC/LDC. Doesn't work: @attribute(target, T) void func(string T)(...); In this case, currently, the UDA can't receive the template arg that was given to the function. I require that attributes on templates be

Re: Inability to dup/~ for const arrays of class objects

2013-05-28 Thread Steven Schveighoffer
On Sat, 25 May 2013 23:58:39 -0400, Peter Williams pwil3...@bigpond.net.au wrote: Is the inability to use dup and ~ with const arrays of class objects a deliberate design restriction? I couldn't find mention of it in the specification or Andrei's book and only discovered it the hard way.

Re: Template args to UDA's

2013-05-28 Thread Kenji Hara
2013/5/28 Manu turkey...@gmail.com So I've run into an expression I need to be able to implement std.simd properly for GDC/LDC. Doesn't work: @attribute(target, T) void func(string T)(...); In this case, currently, the UDA can't receive the template arg that was given to the function.

Re: D on next-gen consoles and for game development

2013-05-28 Thread David Nadlinger
On Tuesday, 28 May 2013 at 13:33:39 UTC, Steven Schveighoffer wrote: I asked David Nadlinger at the conference whether we could leverage this power in LDC, since LLVM is the compiler back-end used by Apple, but he said all those optimization passes are in the Objective-C front-end. Hm,

Re: D on next-gen consoles and for game development

2013-05-28 Thread Manu
On 28 May 2013 23:33, Steven Schveighoffer schvei...@yahoo.com wrote: On Sat, 25 May 2013 01:52:10 -0400, Manu turkey...@gmail.com wrote: What does ObjC do? It seems to work okay on embedded hardware (although not particularly memory-constrained hardware). Didn't ObjC recently reject GC in

Re: D on next-gen consoles and for game development

2013-05-28 Thread Steven Schveighoffer
On Tue, 28 May 2013 09:50:42 -0400, David Nadlinger s...@klickverbot.at wrote: On Tuesday, 28 May 2013 at 13:33:39 UTC, Steven Schveighoffer wrote: I asked David Nadlinger at the conference whether we could leverage this power in LDC, since LLVM is the compiler back-end used by Apple, but

Re: D on next-gen consoles and for game development

2013-05-28 Thread David Nadlinger
On Tuesday, 28 May 2013 at 13:56:03 UTC, Manu wrote: Yep, I can imagine it would work really well, if the front-end implemented the logic to factor out redundant inc/dec ref's. It isn't the best idea to do this sort of optimizations (entirely) in the front-end, because you really want to be

Re: Template args to UDA's

2013-05-28 Thread Manu
Indeed it does. It's a bit obtuse though having to wrap my function up in an outer template just to scope the template arg correctly. Do you think it's reasonable that an attribute should be scoped such that it can see the template args of the declaration it's bound to? It kinda makes sense, an

Re: D on next-gen consoles and for game development

2013-05-28 Thread Manu
On 29 May 2013 00:01, David Nadlinger s...@klickverbot.at wrote: On Tuesday, 28 May 2013 at 13:56:03 UTC, Manu wrote: Yep, I can imagine it would work really well, if the front-end implemented the logic to factor out redundant inc/dec ref's. It isn't the best idea to do this sort of

Re: Why UTF-8/16 character encodings?

2013-05-28 Thread Michel Fortin
On 2013-05-28 01:34:17 +, Walter Bright newshou...@digitalmars.com said: On 5/27/2013 6:06 PM, H. S. Teoh wrote: I don't find this a compelling reason to allow full Unicode on identifiers, though. For one thing, somebody maintaining your code may not know how to type said identifier

Re: using unaryFun in functions that take a comparator (eg sort etc): sort!a[0] = sort!a[0]b[0]

2013-05-28 Thread Andrei Alexandrescu
On 5/28/13 4:16 AM, Timothee Cour wrote: very often I would wish that sort (+ related functions) could take unaryFun arguments and convert them to binaryFun as follows: //pseudocode: template unaryToBinaryComp(alias foo) { bool unaryToBinaryComp(T)(T a, T b) if (__traits(compiles,foo(a)

Re: iota and BigInt

2013-05-28 Thread Andrei Alexandrescu
On 5/28/13 4:32 AM, Jonathan M Davis wrote: The problem is simple enough. iota doesn't currently try and work with any type that has addition (like it probably should). It specifically only works with integers, floating point values, and pointers. BigInt is not an integral type as far as

Re: [article] Language Design Deal Breakers

2013-05-28 Thread Regan Heath
On Sat, 25 May 2013 23:50:28 +0100, Klaim - Joël Lamotte mjkl...@gmail.com wrote: I think this have not been posted yet around here but might be interesting to the D community as it is actually criticizing several languages including D but with an interesting aproach:

Re: demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

2013-05-28 Thread Andrei Alexandrescu
On 5/28/13 8:57 AM, Martin Nowak wrote: On 05/27/2013 10:34 PM, Peter Alexander wrote: Surely a better solution would be to use a lossless compression? Yeah, I would hate to loose the ability to demangle a symbol. Well we'd need a scheme that compresses to text, e.g. binary compression

Re: iota and BigInt

2013-05-28 Thread monarch_dodra
On Tuesday, 28 May 2013 at 10:41:46 UTC, Russel Winder wrote: Is this a symptom of Phobos being predicated on hardware data types? If so there is a mass of applications out there that D cannot handle sensible (unlike Python (especially SciPy), Julia, R, Matlab, Mathematica, etc. I think it

Re: [article] Language Design Deal Breakers

2013-05-28 Thread deadalnix
On Tuesday, 28 May 2013 at 13:35:01 UTC, David Nadlinger wrote: On Tuesday, 28 May 2013 at 08:02:46 UTC, Walter Bright wrote: On 5/28/2013 12:06 AM, Don wrote: On Sunday, 26 May 2013 at 18:43:30 UTC, Walter Bright wrote: Fibers should be implemented by mapping a 4K page with no access rights

Re: [article] Language Design Deal Breakers

2013-05-28 Thread deadalnix
On Tuesday, 28 May 2013 at 13:17:37 UTC, Simen Kjaeraas wrote: On Tue, 28 May 2013 05:35:22 +0200, deadalnix deadal...@gmail.com wrote: On Monday, 27 May 2013 at 21:55:00 UTC, Simen Kjaeraas wrote: Now, if we wanted to add compiler support for non-nullable references, many more things would

Canonical/Idiomatic in memory files

2013-05-28 Thread Russel Winder
Hi, I think I am missing something very obvious… For unit tests I want a std.stdio.File object that is backed by an in memory string buffer rather than an actual file on disc, be it temporary or otherwise. I think I am missing where this is documented in the documentation. Or is it actually not

Re: New UTF-8 stride function

2013-05-28 Thread Dmitry Olshansky
28-May-2013 00:42, Martin Nowak пишет: On 05/27/2013 09:21 PM, Martin Nowak wrote: See unittest/benchmark here: https://gist.github.com/blackwhale/5653927 Looks promising. This will not detect 0xFF as invalid UTF-8 sequence. For sequences with 5 or 6 bytes, that aren't used for unicode,

Re: Template args to UDA's

2013-05-28 Thread Kenji Hara
It looks reasonable, but in general case it would introduce not trivial semantic issue. Based on the current D language spec, prefix attribute is just rewritten to blocked attribute. @attribute(target, T) void func(string T)() {} to: @attribute(target, T) { void func(string T)() {} } And

Re: [article] Language Design Deal Breakers

2013-05-28 Thread Simen Kjaeraas
On Tue, 28 May 2013 16:51:33 +0200, deadalnix deadal...@gmail.com wrote: On Tuesday, 28 May 2013 at 13:17:37 UTC, Simen Kjaeraas wrote: On Tue, 28 May 2013 05:35:22 +0200, deadalnix deadal...@gmail.com wrote: On Monday, 27 May 2013 at 21:55:00 UTC, Simen Kjaeraas wrote: Now, if we wanted

Re: NoScopeStatement violates C compatibility principal.

2013-05-28 Thread Kenji Hara
I think this is a corner case bug of current dmd parser. Kenji Hara 2013/5/28 monarch_dodra monarchdo...@gmail.com I have created before two threads about the weird semantics of labeled block statements. In a word: putting a label before a block means that block does not create a scope, and

Re: Template args to UDA's

2013-05-28 Thread Johannes Pfau
Am Tue, 28 May 2013 22:51:29 +0900 schrieb Kenji Hara k.hara...@gmail.com: 2013/5/28 Manu turkey...@gmail.com This code works. Interesting. I tried that as well but used writeln to print the output: writeln(__traits(getAttributes, func!a)); //Fails enum result = __traits(getAttributes,

Re: iota and BigInt

2013-05-28 Thread Walter Bright
On 5/28/2013 7:26 AM, Andrei Alexandrescu wrote: On 5/28/13 4:32 AM, Jonathan M Davis wrote: The problem is simple enough. iota doesn't currently try and work with any type that has addition (like it probably should). It specifically only works with integers, floating point values, and

Re: [article] Language Design Deal Breakers

2013-05-28 Thread Walter Bright
On 5/28/2013 7:48 AM, deadalnix wrote: On Tuesday, 28 May 2013 at 13:35:01 UTC, David Nadlinger wrote: On Tuesday, 28 May 2013 at 08:02:46 UTC, Walter Bright wrote: On 5/28/2013 12:06 AM, Don wrote: On Sunday, 26 May 2013 at 18:43:30 UTC, Walter Bright wrote: Fibers should be implemented by

Re: More on Component Programming

2013-05-28 Thread H. S. Teoh
On Tue, May 28, 2013 at 11:37:06AM +0200, bearophile wrote: Timothee Cour: python uses itertools.product which is lexicographic_depth. Like you say, no-one can agrees what the order should be, so let's leave it up to user through a template. Sounds like a no-brainer to me. There are use

Re: [article] Language Design Deal Breakers

2013-05-28 Thread Ziad Hatahet
On Tue, May 28, 2013 at 7:37 AM, Regan Heath re...@netmail.co.nz wrote: On Sat, 25 May 2013 23:50:28 +0100, Klaim - Joël Lamotte mjkl...@gmail.com wrote: /emphasis/ mine. Is it actually true that you can remove null pointer exceptions at no runtime cost? It's possible if you remove

Re: D on next-gen consoles and for game development

2013-05-28 Thread Paulo Pinto
Am 28.05.2013 15:33, schrieb Steven Schveighoffer: On Sat, 25 May 2013 01:52:10 -0400, Manu turkey...@gmail.com wrote: What does ObjC do? It seems to work okay on embedded hardware (although not particularly memory-constrained hardware). Didn't ObjC recently reject GC in favour of refcounting?

Re: iota and BigInt

2013-05-28 Thread Jonathan M Davis
On Tuesday, May 28, 2013 10:03:59 Walter Bright wrote: With iota, shouldn't it test for the existence of ++ and --, rather than being integer-like? It gets more complicated if you give a step argument, but yes, it really should be testing for the operations that it needs rather than that the

Re: Canonical/Idiomatic in memory files

2013-05-28 Thread Jonathan M Davis
On Tuesday, May 28, 2013 16:04:32 Russel Winder wrote: Hi, I think I am missing something very obvious… For unit tests I want a std.stdio.File object that is backed by an in memory string buffer rather than an actual file on disc, be it temporary or otherwise. I think I am missing where

Re: NoScopeStatement violates C compatibility principal.

2013-05-28 Thread monarch_dodra
On Tuesday, 28 May 2013 at 16:38:50 UTC, Kenji Hara wrote: I think this is a corner case bug of current dmd parser. Kenji Hara It's not a corner case. It's the spec. It's a LabeledStatement : NoScopeStatement http://dlang.org/statement.html#LabeledStatement I was finally able to track down

Re: Canonical/Idiomatic in memory files

2013-05-28 Thread Adam D. Ruppe
On Tuesday, 28 May 2013 at 17:46:36 UTC, Jonathan M Davis wrote: (and I honestly don't know what you'd be trying to do with it where it would make any sense for to operate on anything other than an actual file). That's easy! Suppose you have a nice library that's practically unchangeable:

Re: Canonical/Idiomatic in memory files

2013-05-28 Thread Martin Nowak
On 05/28/2013 05:04 PM, Russel Winder wrote: Hi, I think I am missing something very obvious… For unit tests I want a std.stdio.File object that is backed by an in memory string buffer rather than an actual file on disc, be it temporary or otherwise. I think I am missing where this is

Re: More on Component Programming

2013-05-28 Thread Peter Alexander
On Tuesday, 28 May 2013 at 09:54:35 UTC, bearophile wrote: The rewrite rules is a feature of the GHC compiler. It allows the library writers to define rules that in most (or many) cases are advantageous and lead to better optimization. As example one of such rules swap map and filter, putting

Re: NoScopeStatement violates C compatibility principal.

2013-05-28 Thread monarch_dodra
On Tuesday, 28 May 2013 at 17:54:32 UTC, monarch_dodra wrote: On Tuesday, 28 May 2013 at 16:38:50 UTC, Kenji Hara wrote: I think this is a corner case bug of current dmd parser. Kenji Hara It's not a corner case. It's the spec. EDIT: Well, that or I could be miss-interpreting the spec,

Re: More on Component Programming

2013-05-28 Thread Jonathan M Davis
On Tuesday, May 28, 2013 19:55:43 Peter Alexander wrote: Phobos does this a little bit in simple cases. For example, retro(retro(r)) returns r if I remember correctly. Yes. Phobos tries to optimize useless templates like that, and definitely does it in this particular case, though I don't know

  1   2   3   >