Re: [article] Language Design Deal Breakers

2013-05-25 Thread Paulo Pinto
Am 26.05.2013 08:12, schrieb Walter Bright: On 5/25/2013 10:58 PM, deadalnix wrote: Most ICE in DMD are cause by assert fail on null pointers. Even if that were true (and it isn't), it doesn't follow that having non-nullable pointers would have magically prevented them. Practically none of th

breaking changes: how gofix solved the problem of automated code transitions

2013-05-25 Thread Timothee Cour
There is a dilemma of having to choose between: A) getting stuck with bad names / apis / language issues forever B) making painful breaking changes that breaks existing code See recent D threads for all the polemics this creates on (in)stability of D. GO avoids this dilemma with the correct appro

Re: [article] Language Design Deal Breakers

2013-05-25 Thread H. S. Teoh
On Sun, May 26, 2013 at 01:27:55PM +1000, Peter Williams wrote: > On 26/05/13 11:59, Nick Sabalausky wrote: [...] > >Forget waiting for a huge improvement, I'd have been happy to > >ditch C++ even for a small improvement. C++ is such a pain IMO that > >using it has about as much inertia as ice skat

Re: DLang Spec rewrite (?)

2013-05-25 Thread H. S. Teoh
On Sat, May 25, 2013 at 08:28:06PM -0400, Andrei Alexandrescu wrote: [...] > My attitude on DDoc has evolved in threes: > > 3 minutes: "wtf is this crap" > 3 hours: "this sucks" > 3 days: "grumble I'll make do with this although it totally sucks" > 3 months: "this is pretty darn good" LOL... Thou

Re: D's limited template specialization abilities compared to C++

2013-05-25 Thread Ahuzhgairl
Kenji, thanks again for understanding exactly what I meant. I am a big fan of template features. I seriously hope D can do this in the future- the inability of the *template system* to deduce information about non-types is one of the big holes in C++: We can deduce information at function sco

Re: DLang Spec rewrite (?)

2013-05-25 Thread Jonathan M Davis
On Saturday, May 25, 2013 21:30:44 Walter Bright wrote: > On 5/25/2013 8:55 PM, Jonathan M Davis wrote: > >> 3) Again using LINK2, if I were to delete the LINK2= line from > >> doc.ddoc and forget to readd it, my experience is that dmd -D > >> will quietly drop instances of $(LINK2) without telling

Re: [article] Language Design Deal Breakers

2013-05-25 Thread deadalnix
On Sunday, 26 May 2013 at 06:12:55 UTC, Walter Bright wrote: On 5/25/2013 10:58 PM, deadalnix wrote: Most ICE in DMD are cause by assert fail on null pointers. Even if that were true (and it isn't), it doesn't follow that having non-nullable pointers would have magically prevented them.

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Walter Bright
On Sunday, May 26, 2013 00:50:28 Klaim - Joël Lamotte wrote: http://sebastiansylvan.wordpress.com/2013/05/25/language-design-deal-breaker s/ http://www.reddit.com/r/programming/comments/1f1uz3/sebastian_sylvans_language_design_deal_breakers/

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Walter Bright
On 5/25/2013 10:58 PM, deadalnix wrote: Most ICE in DMD are cause by assert fail on null pointers. Even if that were true (and it isn't), it doesn't follow that having non-nullable pointers would have magically prevented them. Practically none of them were "oops, I forgot to initialize the p

Re: [article] Language Design Deal Breakers

2013-05-25 Thread deadalnix
On Sunday, 26 May 2013 at 01:31:11 UTC, Timon Gehr wrote: scala> val s : String = null; s: String = null scala> s(0) java.lang.NullPointerException In scala, null must be scoped. In REPL, the scope is infinite, so is the appearance of null. Still, scala's null is more restrictive than what e

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Walter Bright
On 5/25/2013 9:48 PM, H. S. Teoh wrote: Then came along D with native Unicode support built right into the language. And not just UTF-16 shoved down your throat like Java does (or was it UTF-32?); UTF-8, UTF-16, and UTF-32 are all equally supported. You cannot imagine what a happy camper I was si

Re: [article] Language Design Deal Breakers

2013-05-25 Thread deadalnix
On Sunday, 26 May 2013 at 00:35:32 UTC, Walter Bright wrote: It was Hoare's engaging presentation on it that turned it into a cause celebre. Certainly not. But obviously, it become an important reference in it. Null pointers aren't even remotely the source of most programming bugs. If the

Re: DLang Spec rewrite (?)

2013-05-25 Thread Walter Bright
On 5/25/2013 9:59 PM, Borden wrote: On Sunday, 26 May 2013 at 04:57:12 UTC, Borden wrote: On Sunday, 26 May 2013 at 04:30:46 UTC, Walter Bright wrote: Again, this is deliberate. Macros are set up so that the last one overrides all the previous ones, enabling a hierarchy of them using ddoc files

go embeddings and "public alias x this;" on a private member x

2013-05-25 Thread timotheecour
I'd like public alias x this to reset protection attribute on a (private) member x: b.d: struct B(T){ private T x;// would normally prevent alias this from doing anything useful public alias x this; } a.d: void main(){ auto a=B!int(); a++;//should do a.x++; semantic change: ev

Re: [article] Language Design Deal Breakers

2013-05-25 Thread H. S. Teoh
On Sat, May 25, 2013 at 10:28:24PM -0400, Nick Sabalausky wrote: [...] > But, for much the same reason, I am somewhat with the author on > unittests. I definitely find them very important and worthwhile, but > my experience is in-line with "writing unit tests **for everything** > very frequently fa

Re: DMD under 64-bit Windows 7 HOWTO

2013-05-25 Thread Adam Wilson
On Sat, 25 May 2013 18:24:41 -0700, Manu wrote: FYI. DMD did not work out-of-the-box on a vanilla VS2012/Win8 install. The Windows 8 SDK no longer includes the C++ compilers and VS2012 doesn't setup the Environment Variables used in sc.ini. But the most annoying part is that using the Win8

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
On Sunday, 26 May 2013 at 04:57:12 UTC, Borden wrote: On Sunday, 26 May 2013 at 04:30:46 UTC, Walter Bright wrote: Again, this is deliberate. Macros are set up so that the last one overrides all the previous ones, enabling a hierarchy of them using ddoc files. It's a simple form of 'inheritance

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
On Sunday, 26 May 2013 at 04:30:46 UTC, Walter Bright wrote: Again, this is deliberate. Macros are set up so that the last one overrides all the previous ones, enabling a hierarchy of them using ddoc files. It's a simple form of 'inheritance'. And perhaps this point could be clarified (and, wh

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread H. S. Teoh
On Sat, May 25, 2013 at 04:14:34PM -0700, Jonathan M Davis wrote: > On Saturday, May 25, 2013 01:42:20 Walter Bright wrote: > > On 5/25/2013 12:33 AM, Joakim wrote: > > > At what cost? Most programmers completely punt on unicode, > > > because they just don't want to deal with the complexity. Perh

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
On Sunday, 26 May 2013 at 03:56:08 UTC, Jonathan M Davis wrote: AFAIK, your recent posts on ddoc are the first that anyone has complained about it in quite some time. There are plenty of folks who want various improvements to the online documentation, but doesn't necessarily require doing anythi

Re: DLang Spec rewrite (?)

2013-05-25 Thread Walter Bright
On 5/25/2013 8:55 PM, Jonathan M Davis wrote: 3) Again using LINK2, if I were to delete the LINK2= line from doc.ddoc and forget to readd it, my experience is that dmd -D will quietly drop instances of $(LINK2) without telling me. Then perhaps dmd should be fixed so that it complains. That's a

Re: DLang Spec rewrite (?)

2013-05-25 Thread Walter Bright
On 5/25/2013 9:15 PM, Borden wrote: 3) Consider, for example, this part from abi.dd: $(GRAMMAR $(I MangledName): $(B _D) $(I QualifiedName) $(I Type) $(B _D) $(I QualifiedName) $(B M) $(I Type) $(I QualifiedName): $(I SymbolName) $(I SymbolName) $(I QualifiedName) $(I Symbol

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
On Sunday, 26 May 2013 at 03:51:48 UTC, Walter Bright wrote: It's not totally random. I've designed one macro language before (ABEL), and have implemented 3 (ABEL, Make, and C preprocessor), so I knew what I wanted. Ddoc is very similar to Make's macro system. BTW, the C preprocessor takes th

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
Good evening, Professor, On Sunday, 26 May 2013 at 02:05:55 UTC, Andrei Alexandrescu wrote: What vexes me is that all the sugar you propose goes against what you opened with... I'm not trying to cause any offence, and I apologise if any of my phrasing or comments are construed that way. I kno

runtime vs compile-time ref safety: 20% overhead in my example

2013-05-25 Thread Timothee Cour
It has been proposed to introduce runtime bounds checking to insure ref safety (avoiding escaping references to local variables), enabled with a -checkboundsref flag (or similar). I was wondering what would be the cost of doing this, so ran a simple test, please see: https://github.com/timotheecou

Inability to dup/~ for const arrays of class objects

2013-05-25 Thread Peter Williams
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. Thanks Peter

Re: DLang Spec rewrite (?)

2013-05-25 Thread Jonathan M Davis
On Sunday, May 26, 2013 02:44:30 Borden wrote: > On Saturday, 25 May 2013 at 23:28:46 UTC, Jonathan M Davis wrote: > > aside from you, I'm not aware of anyone complaining about it > > any time recently. > > Good evening, Jonathan, > > I'm not sure whether you mean that nobody's complained recentl

Re: D's limited template specialization abilities compared to C++

2013-05-25 Thread Kenji Hara
2013/5/26 Ahuzhgairl > Kenji, > Thank you much for the '.C' alias support, Amazed to see there could be > some action so quick! > > > Could we please look at the nontype-as-primary-template? > > How can we deduce all of the dependent types from a non-type template > parameter, if it's the only pa

Re: DLang Spec rewrite (?)

2013-05-25 Thread Walter Bright
On 5/25/2013 5:28 PM, Andrei Alexandrescu wrote: My attitude on DDoc has evolved in threes: 3 minutes: "wtf is this crap" 3 hours: "this sucks" 3 days: "grumble I'll make do with this although it totally sucks" 3 months: "this is pretty darn good" Thanks for the chuckle! DDoc is simple for

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Peter Williams
On 26/05/13 11:59, Nick Sabalausky wrote: On Sun, 26 May 2013 00:50:28 +0200 Klaim - Joël Lamotte 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: ht

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Walter Bright
On 5/25/2013 7:28 PM, Nick Sabalausky wrote: In something nicely static-typed like D, most tests never end up failing, and actual applications do end up implicitly testing a heck of a lot anyway. Of course, this doesn't imply that unittests aren't extremely worthwhile (and I don't think even the

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Timon Gehr
On 05/26/2013 02:14 AM, Jonathan M Davis wrote: On Sunday, May 26, 2013 01:54:36 Timon Gehr wrote: On 05/26/2013 01:39 AM, Jonathan M Davis wrote: On Sunday, May 26, 2013 00:50:28 Klaim - Joël Lamotte wrote: I think this have not been posted yet around here but might be interesting to the D co

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Nick Sabalausky
On Sat, 25 May 2013 17:14:13 -0700 Jonathan M Davis wrote: > On Sunday, May 26, 2013 01:54:36 Timon Gehr wrote: > > On 05/26/2013 01:39 AM, Jonathan M Davis wrote: > > > On Sunday, May 26, 2013 00:50:28 Klaim - Joël Lamotte wrote: > > >> I think this have not been posted yet around here but might

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
On Sunday, 26 May 2013 at 01:57:16 UTC, Andrei Alexandrescu wrote: This is a worthy goal. We manage to generate mobi files for the spec (and Phobos in a pull request), is the ebook format very different? Andrei Good evening, Professor, I'm still working through the ePUB standard, but, from

Re: DLang Spec rewrite (?)

2013-05-25 Thread Andrei Alexandrescu
On 5/25/13 9:22 PM, Borden wrote: 1) Allowing sections to be defined using == Heading == or === Heading === instead of $(HEADING ) or variants. The advantage that Wiki syntax has over macro-syntax is that it automatically works out the section nesting (which is essential for building tables of co

Re: Out contracts: how to refer to objects' start state

2013-05-25 Thread Peter Williams
On 26/05/13 11:47, Andrei Alexandrescu wrote: On 5/25/13 9:18 PM, Adam D. Ruppe wrote: On Sunday, 26 May 2013 at 01:12:35 UTC, Andrei Alexandrescu wrote: On 5/25/13 9:03 PM, Andrej Mitrovic wrote: On 5/26/13, Andrei Alexandrescu in { auto oldLen = this.length; } out { assert(this.length == i

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Nick Sabalausky
On Sun, 26 May 2013 00:50:28 +0200 Klaim - Joël Lamotte 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: > > http://sebastiansylvan.wordpress.com/

Re: DLang Spec rewrite (?)

2013-05-25 Thread Andrei Alexandrescu
On 5/25/13 8:56 PM, Borden wrote: My contention is that, for the purposes of writing lengthy, non-code documentation like the DLang spec (I'm not referring to any other documentation or pages on the site), enclosing the entire exposition in macros has made the source too inflexible for me to work

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Timon Gehr
On 05/26/2013 03:37 AM, bearophile wrote: Timon Gehr: Even if it's not a big problem, in the end this problem is now "solved", because all new languages (Scala, scala> val s : String = null; s: String = null scala> s(0) java.lang.NullPointerException Thank you. Are nulls used in Scala outsi

Re: Out contracts: how to refer to objects' start state

2013-05-25 Thread Peter Williams
On 26/05/13 10:43, Andrei Alexandrescu wrote: On 5/25/13 8:38 PM, Peter Williams wrote: For some class methods, to express comprehensive out{} contracts it is necessary to be able to refer to the state of the class object before the operation as well as after it e.g. if the method adds something

Re: Out contracts: how to refer to objects' start state

2013-05-25 Thread Andrei Alexandrescu
On 5/25/13 9:18 PM, Adam D. Ruppe wrote: On Sunday, 26 May 2013 at 01:12:35 UTC, Andrei Alexandrescu wrote: On 5/25/13 9:03 PM, Andrej Mitrovic wrote: On 5/26/13, Andrei Alexandrescu in { auto oldLen = this.length; } out { assert(this.length == in.oldLen + 1); } Since every in.xyz expressi

Re: [article] Language Design Deal Breakers

2013-05-25 Thread bearophile
Timon Gehr: Even if it's not a big problem, in the end this problem is now "solved", because all new languages (Scala, scala> val s : String = null; s: String = null scala> s(0) java.lang.NullPointerException Thank you. Are nulls used in Scala outside the strict needs of interacting with J

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
On Sunday, 26 May 2013 at 01:22:17 UTC, Borden wrote: 2) Adopting Latex's rule that a double line break means a new paragraph. This will effectively make the $(P) macros rampant in the DLang spec documentation unnecessary. Oops. I realised that this has already been done. OK, so I guess the q

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Timon Gehr
On 05/26/2013 03:19 AM, bearophile wrote: Jonathan M Davis: and I think that null can be extremely useful. ""null"" values are extremely useful, no one disagrees on this. Good functional languages use even more ""null"" values compared to most (or all) D programs! W

Re: Vote for std.uni

2013-05-25 Thread Jesse Phillips
I'm voting yes.

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

2013-05-25 Thread Brad Roberts
On 5/25/13 6:28 PM, Manu wrote: On 25 May 2013 21:03, Benjamin Thaut mailto:c...@benjamin-thaut.de>> wrote: Am 25.05.2013 03:29, schrieb Manu: Win64 works for me out of the box... ? For me dmd produces type names like modulename.typename.__subtypename which will causes i

Re: Out contracts: how to refer to objects' start state

2013-05-25 Thread bearophile
Andrei Alexandrescu: The problem with this is well-defining it. Since every in.xyz expression could access an arbitrary method of the old object, that means the whole object would need to be somehow duplicated. Alternatively, all in.xyz expressions would need to be evaluated before the functi

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

2013-05-25 Thread Manu
On 25 May 2013 21:03, Benjamin Thaut wrote: > Am 25.05.2013 03:29, schrieb Manu: > >> >> >> Win64 works for me out of the box... ? >> > > For me dmd produces type names like modulename.typename.**subtypename > which will causes internal errors within the visual studio debugger in some > cases. Al

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
I want to keep this discussion focussed on the DLang spec source code. If we want to debate the features of DDoc, we should do it in another thread. However, as not to appear full of cricism but short of ideas, I'm going to break my own rule and suggest, at least for the purposes of solving s

Re: DMD under 64-bit Windows 7 HOWTO

2013-05-25 Thread Manu
I might just add, that if you have Visual Studio installed (which I presume many Windows dev's do), then you don't need to do ANYTHING. DMD64 just works if VS is present. I didn't do a single thing to get DMD-Win64 working. And it's working great. You should make sure this is clear at the top of

Re: [article] Language Design Deal Breakers

2013-05-25 Thread bearophile
Jonathan M Davis: and I think that null can be extremely useful. ""null"" values are extremely useful, no one disagrees on this. Good functional languages use even more ""null"" values compared to most (or all) D programs! Walter: It was Hoare's engaging presentat

Re: Out contracts: how to refer to objects' start state

2013-05-25 Thread Adam D. Ruppe
On Sunday, 26 May 2013 at 01:12:35 UTC, Andrei Alexandrescu wrote: On 5/25/13 9:03 PM, Andrej Mitrovic wrote: On 5/26/13, Andrei Alexandrescu in { auto oldLen = this.length; } out { assert(this.length == in.oldLen + 1); } Since every in.xyz expression could access an arbitrary method of

Re: Out contracts: how to refer to objects' start state

2013-05-25 Thread Andrei Alexandrescu
On 5/25/13 9:03 PM, Andrej Mitrovic wrote: On 5/26/13, Andrei Alexandrescu wrote: class A { void fun() in { auto oldLen = this.length; } out { assert(this.length == oldLen + 1); } body { ... } } That was technically difficult to do back then, and fell by the wayside. Today it w

Re: Out contracts: how to refer to objects' start state

2013-05-25 Thread bearophile
Andrei Alexandrescu: That was technically difficult to do back then, and fell by the wayside. Today it would break too much code to introduce even if feasible. The "prestate" is an important part of contract programming. So it's better to look for some other solution to implement it. -

Re: Are people using textmate for D programming?

2013-05-25 Thread TommiT
On Sunday, 26 May 2013 at 00:34:46 UTC, Timothee Cour wrote: what about for ST3? there's no ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/D According to: http://www.sublimetext.com/docs/3/packages.html ...you create a new folder called "D" under the: "~/Library/Application Suppor

Re: Out contracts: how to refer to objects' start state

2013-05-25 Thread Andrej Mitrovic
On 5/26/13, Andrei Alexandrescu wrote: > class A { >void fun() >in { auto oldLen = this.length; } >out { assert(this.length == oldLen + 1); } >body { ... } > } > > That was technically difficult to do back then, and fell by the wayside. > Today it would break too much code to intro

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
On Sunday, 26 May 2013 at 00:28:05 UTC, Andrei Alexandrescu wrote: To generate several formats from one source, a macro system is needed. One interesting thing I figured about macro systems is they're all dirty - they can't be really considered "languages" because they intermix the programming

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Jonathan M Davis
On Saturday, May 25, 2013 17:35:30 Walter Bright wrote: > Null pointers aren't even remotely the source of most programming bugs. If > they were, then languages that disallow them would be super-productive in > comparison. But they aren't. They're just an incremental step, and > elevating it into a

Re: DLang Spec rewrite (?)

2013-05-25 Thread Borden
On Saturday, 25 May 2013 at 23:28:46 UTC, Jonathan M Davis wrote: aside from you, I'm not aware of anyone complaining about it any time recently. Good evening, Jonathan, I'm not sure whether you mean that nobody's complained recently about the spec being in DDoc lately, because, as in my first

Re: Out contracts: how to refer to objects' start state

2013-05-25 Thread Andrei Alexandrescu
On 5/25/13 8:38 PM, Peter Williams wrote: For some class methods, to express comprehensive out{} contracts it is necessary to be able to refer to the state of the class object before the operation as well as after it e.g. if the method adds something to a container you need to be able to specify

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Walter Bright
On 5/25/2013 5:14 PM, Jonathan M Davis wrote: I completely disagree that null pointers are a problem. I don't even remember the last time that I dereferenced a null pointer in my code, and I think that null can be extremely useful. And yet for whatever reason, there are quite a few people who see

Help with the 'export' declaration and OpenSSL?

2013-05-25 Thread Reid Levenick
I'm trying to use the OpenSSL bindings from Deimos, but whenever I try to use the PEM_write_X509 function (among others), OpenSSL gives a fatal error of "no OPENSSL_Applink", because in OpenSSL's ms/uplink.c, the function OPENSSL_Uplink calls GetProcAddress on the application with the string "O

Out contracts: how to refer to objects' start state

2013-05-25 Thread Peter Williams
For some class methods, to express comprehensive out{} contracts it is necessary to be able to refer to the state of the class object before the operation as well as after it e.g. if the method adds something to a container you need to be able to specify that nothing was accidentally deleted fr

Re: Are people using textmate for D programming?

2013-05-25 Thread Andrei Alexandrescu
On 5/25/13 7:31 PM, TommiT wrote: I knew the config had updated due to the fact that keyword pure was colored like a keyword. In the default config file that was one of the keywords missing. Also you can check that ST -> View -> Syntax has 'D' checked when a d-file is open. Yay to that, looks l

Re: Are people using textmate for D programming?

2013-05-25 Thread Timothee Cour
what about for ST3? there's no ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/D On Sat, May 25, 2013 at 4:01 PM, TommiT wrote: > On Saturday, 25 May 2013 at 12:56:02 UTC, Andrei Alexandrescu wrote: > >> OK, you convinced me to try. But my SublimeText OSX installation does not >> contai

Re: DLang Spec rewrite (?)

2013-05-25 Thread Andrei Alexandrescu
On 5/25/13 2:16 PM, Borden wrote: I hasten to add that I don't mean to criticise the original writers of the DLang Spec for writing it in DDoc macros. So far, I've found the documentation fairly easy to follow (as plain text) and so I don't want to lose any of that should the spec be rewritten.

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Walter Bright
On 5/25/2013 4:54 PM, Timon Gehr wrote: On 05/26/2013 01:39 AM, Jonathan M Davis wrote: On Sunday, May 26, 2013 00:50:28 Klaim - Joël Lamotte 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 incl

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Jonathan M Davis
On Sunday, May 26, 2013 01:54:36 Timon Gehr wrote: > On 05/26/2013 01:39 AM, Jonathan M Davis wrote: > > On Sunday, May 26, 2013 00:50:28 Klaim - Joël Lamotte wrote: > >> I think this have not been posted yet around here but might be > >> interesting > >> to the D community as it is actually critic

Re: Are people using textmate for D programming?

2013-05-25 Thread TommiT
And, to make caseS and default of a switch indent to the same column as the switch, I made a small modification to the file "~/Library/Application Support/Sublime Text 2/Packages/D/Indentation Rules.tmPreferences" and, again deleted the "Indentation Rules.tmPreferences.cache" file and restarted

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Timon Gehr
On 05/26/2013 01:39 AM, Jonathan M Davis wrote: On Sunday, May 26, 2013 00:50:28 Klaim - Joël Lamotte 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: primitive value overflow

2013-05-25 Thread Timothee Cour
A) Requiring a construct such as Checked!int is too complicated for the user in general as it requires a lot of code change from the user. It may be useful in certain cases but overflow bugs will crop up in unexpected places. B) To help finding such bugs, introduce a special version identifier for

Re: [article] Language Design Deal Breakers

2013-05-25 Thread Jonathan M Davis
On Sunday, May 26, 2013 00:50:28 Klaim - Joël Lamotte 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: > > http://sebastiansylvan.wordpress.com/201

Re: Are people using textmate for D programming?

2013-05-25 Thread TommiT
On Saturday, 25 May 2013 at 23:18:22 UTC, Andrei Alexandrescu wrote: On 5/25/13 7:01 PM, TommiT wrote: On Saturday, 25 May 2013 at 12:56:02 UTC, Andrei Alexandrescu wrote: OK, you convinced me to try. But my SublimeText OSX installation does not contain the D.tmPackage file described at https:

Re: DLang Spec rewrite (?)

2013-05-25 Thread Jonathan M Davis
On Saturday, May 25, 2013 20:10:53 Borden wrote: > Good afternoon, all, > > I would still like to compile the D Lang Spec into EPUB (and > possibly other formats) but, as we discussed in these threads: > > http://forum.dlang.org/thread/bsbdpjyjubfxvmecw...@forum.dlang.org > http://forum.dlang.org

[article] Language Design Deal Breakers

2013-05-25 Thread Klaim - Joël Lamotte
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: http://sebastiansylvan.wordpress.com/2013/05/25/language-design-deal-breakers/ Joel Lamotte

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

2013-05-25 Thread Timon Gehr
On 05/24/2013 04:33 PM, Manu wrote: But anyway, after fixing the obvious Phobos offenders, another huge step would be to get TempAlloc into druntime and used wherever possible in Phobos. How does that work? One pattern I've used a lot is, since we have a regular 60hz timeslice and

Re: Are people using textmate for D programming?

2013-05-25 Thread Andrei Alexandrescu
On 5/25/13 7:01 PM, TommiT wrote: On Saturday, 25 May 2013 at 12:56:02 UTC, Andrei Alexandrescu wrote: OK, you convinced me to try. But my SublimeText OSX installation does not contain the D.tmPackage file described at https://github.com/alexrp/st2-d. Where do I put it? Thanks, Andrei I foun

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Jonathan M Davis
On Saturday, May 25, 2013 01:42:20 Walter Bright wrote: > On 5/25/2013 12:33 AM, Joakim wrote: > > At what cost? Most programmers completely punt on unicode, because they > > just don't want to deal with the complexity. Perhaps you can deal with it > > and don't mind the performance loss, but I su

Re: Are people using textmate for D programming?

2013-05-25 Thread TommiT
On Saturday, 25 May 2013 at 12:56:02 UTC, Andrei Alexandrescu wrote: OK, you convinced me to try. But my SublimeText OSX installation does not contain the D.tmPackage file described at https://github.com/alexrp/st2-d. Where do I put it? Thanks, Andrei I found it through: Sublime Text 2 -> P

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Diggory
On Saturday, 25 May 2013 at 20:03:59 UTC, Joakim wrote: I have noted from the beginning that these large alphabets have to be encoded to two bytes, so it is not a true constant-width encoding if you are mixing one of those languages into a single-byte encoded string. But this "variable length"

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Walter Bright
On 5/25/2013 2:51 PM, Walter Bright wrote: On 5/25/2013 12:51 PM, Joakim wrote: For a multi-language string encoding, the header would contain a single byte for every language used in the string, along with multiple index bytes to signify the start and finish of every run of single-language char

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Walter Bright
On 5/25/2013 12:51 PM, Joakim wrote: For a multi-language string encoding, the header would contain a single byte for every language used in the string, along with multiple index bytes to signify the start and finish of every run of single-language characters in the string. So, a list of language

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Walter Bright
On 5/25/2013 1:03 PM, Joakim wrote: On Saturday, 25 May 2013 at 19:30:25 UTC, Walter Bright wrote: On the other hand, Joakim even admits his single byte encoding is variable length, as otherwise he simply dismisses the rarely used (!) Chinese, Japanese, and Korean languages, as well as any text

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread H. S. Teoh
On Sat, May 25, 2013 at 09:51:42PM +0200, Joakim wrote: > On Saturday, 25 May 2013 at 19:03:53 UTC, Dmitry Olshansky wrote: > >If I take you right you propose to define string as a header that > >denotes a set of windows in code space? I still fail to see how > >that would scale see below. > > Some

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Peter Alexander
On Saturday, 25 May 2013 at 14:58:02 UTC, Joakim wrote: On Saturday, 25 May 2013 at 14:16:21 UTC, Peter Alexander wrote: I suggest you read up on UTF-8. You really don't understand it. There is no need to decode, you just treat the UTF-8 string as if it is an ASCII string. Not being aware of th

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread H. S. Teoh
On Sat, May 25, 2013 at 10:07:41AM +0200, Joakim wrote: [...] > The vast majority of non-english alphabets in UCS can be encoded in > a single byte. It is your exceptions that are not relevant. I'll have you know that Chinese, Korean, and Japanese account for a significant percentage of the world

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Juan Manuel Cabo
On Saturday, 25 May 2013 at 19:51:43 UTC, Joakim wrote: On Saturday, 25 May 2013 at 19:03:53 UTC, Dmitry Olshansky wrote: You can map a codepage to a subset of UCS :) That's what they do internally anyway. If I take you right you propose to define string as a header that denotes a set of window

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Joakim
On Saturday, 25 May 2013 at 19:30:25 UTC, Walter Bright wrote: On the other hand, Joakim even admits his single byte encoding is variable length, as otherwise he simply dismisses the rarely used (!) Chinese, Japanese, and Korean languages, as well as any text that contains words from more than

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Dmitry Olshansky
25-May-2013 23:51, Joakim пишет: On Saturday, 25 May 2013 at 19:03:53 UTC, Dmitry Olshansky wrote: You can map a codepage to a subset of UCS :) That's what they do internally anyway. If I take you right you propose to define string as a header that denotes a set of windows in code space? I still

Re: D's limited template specialization abilities compared to C++

2013-05-25 Thread Andrei Alexandrescu
On 5/25/13 12:27 PM, deadalnix wrote: Hi, I obviously don't know D that much, but I assume I do. I have this feature that I can't even show a working example that exists in C++. I also can't come up with any use case, but I know this is mandatory to have. As I assume I know D well enough, I ass

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Joakim
On Saturday, 25 May 2013 at 19:03:53 UTC, Dmitry Olshansky wrote: You can map a codepage to a subset of UCS :) That's what they do internally anyway. If I take you right you propose to define string as a header that denotes a set of windows in code space? I still fail to see how that would scal

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Diggory
On Saturday, 25 May 2013 at 19:02:43 UTC, Joakim wrote: On Saturday, 25 May 2013 at 18:09:26 UTC, Diggory wrote: On Saturday, 25 May 2013 at 08:07:42 UTC, Joakim wrote: On Saturday, 25 May 2013 at 07:48:05 UTC, Diggory wrote: I think you are a little confused about what unicode actually is...

Re: D's limited template specialization abilities compared to C++

2013-05-25 Thread Ahuzhgairl
Kenji, Thank you much for the '.C' alias support, Amazed to see there could be some action so quick! Could we please look at the nontype-as-primary-template? How can we deduce all of the dependent types from a non-type template parameter, if it's the only parameter of the primary template?

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Walter Bright
On 5/25/2013 1:07 AM, Joakim wrote: The vast majority of non-english alphabets in UCS can be encoded in a single byte. It is your exceptions that are not relevant. I suspect the Chinese, Koreans, and Japanese would take exception to being called irrelevant. Good luck with your scheme that c

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Walter Bright
On 5/25/2013 5:43 AM, Andrei Alexandrescu wrote: On 5/25/13 3:33 AM, Joakim wrote: On Saturday, 25 May 2013 at 01:58:41 UTC, Walter Bright wrote: This is more a problem with the algorithms taking the easy way than a problem with UTF-8. You can do all the string algorithms, including regex, by w

Re: std.concurrency doesn't like structs, classes?

2013-05-25 Thread Sean Kelly
On May 24, 2013, at 3:50 PM, "Luís.Marques" "@puremagic.com wrote: > On Friday, 24 May 2013 at 21:49:48 UTC, Sean Kelly wrote: >> It should work for any type that Variant can represent. I know Variant has >> trouble with immutable however. Have you tried shared? std.concurrency >> finds a ma

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Joakim
On Saturday, 25 May 2013 at 18:09:26 UTC, Diggory wrote: On Saturday, 25 May 2013 at 08:07:42 UTC, Joakim wrote: On Saturday, 25 May 2013 at 07:48:05 UTC, Diggory wrote: I think you are a little confused about what unicode actually is... Unicode has nothing to do with code pages and nobody use

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Dmitry Olshansky
25-May-2013 22:26, Joakim пишет: On Saturday, 25 May 2013 at 17:03:43 UTC, Dmitry Olshansky wrote: 25-May-2013 10:44, Joakim пишет: Yes, on the encoding, if it's a variable-length encoding like UTF-8, no, on the code space. I was originally going to title my post, "Why Unicode?" but I have no

Re: D's limited template specialization abilities compared to C++

2013-05-25 Thread Joshua Niehus
On Saturday, 25 May 2013 at 16:27:59 UTC, deadalnix wrote: Hi, I obviously don't know D that much, but I assume I do. [..snip..] +1

Re: Why UTF-8/16 character encodings?

2013-05-25 Thread Diggory
"limited success of UTF-8" Becoming the de-facto standard encoding EVERYWERE except for windows which uses UTF-16 is hardly a failure... I really don't understand your hatred for UTF-8 - it's simple to decode and encode, fast and space-efficient. Fixed width encodings are not inherently fast

  1   2   >