Re: [article] Language Design Deal Breakers

2013-05-26 Thread Jonathan M Davis
On Monday, May 27, 2013 08:49:37 Rob T wrote: > So will introducing non-nullable references make things worse or > have no practical effect? We're going to add non-nullable references as a library type (NotNull!T or NonNullable!T or somesuch). That will allow you to type references as being non-

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Rob T
I really don't understand the reasoning for not removing as many known sources of bugs as is reasonably possible *provided* that doing so makes the situation incrementally better (rather than worse or to no effect). So will introducing non-nullable references make things worse or have no prac

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Paulo Pinto
On Sunday, 26 May 2013 at 19:49:44 UTC, Nick Sabalausky wrote: On Sun, 26 May 2013 13:18:32 +0200 Paulo Pinto wrote: Did you had the pleasure to write portable C or C++ code across multiple operating systems and vendors in the mid 90's? Luckily, no. For me it was just Win9x and DOS (using t

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Paulo Pinto
On Monday, 27 May 2013 at 01:29:12 UTC, H. S. Teoh wrote: On Sun, May 26, 2013 at 05:20:59PM -0700, Ali Çehreli wrote: On 05/26/2013 01:04 PM, Walter Bright wrote: >Yeah, I did the 'Soccer' one. http://www.handheldmuseum.com/Mattel/Soccer.htm That's before my time. :) I have played with one

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Joakim
On Sunday, 26 May 2013 at 21:08:40 UTC, Marcin Mstowski wrote: On Sun, May 26, 2013 at 9:42 PM, Joakim wrote: Also, one of the first pages talks about representations of floating point and integer numbers, which are outside the purview of the text encodings we're talking about. They are ou

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Nick Sabalausky
On Sun, 26 May 2013 13:03:49 +0200 Paulo Pinto wrote: > > Well at least for Android, yes there is a proof. > > http://blog.bugsense.com/post/49924755479/bigdata-in-motion-building-a-real-time-android > > http://www.bugsense.com/live > > Just watch NullPointerExceptions fly by. > Pet peeve #

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Nick Sabalausky
On Sun, 26 May 2013 17:38:21 -0700 Jonathan M Davis wrote: > On Sunday, May 26, 2013 11:46:53 Walter Bright wrote: > > Making non-nullable pointers is just plugging one hole in a cheese > > grater. > > LOL. That is highly quotable. > As a person who very much enjoys a quality cheese, I find th

Re: DLang Spec rewrite (?)

2013-05-26 Thread Andrei Alexandrescu
On 5/27/13 12:09 AM, Borden wrote: On Monday, 27 May 2013 at 03:32:54 UTC, Andrei Alexandrescu wrote: doc.ddoc is the general skeleton file for defining the online documentation. html.ddoc contains HTML-specific macros only, without having anything to do with our site's specific format. For gr

Re: demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

2013-05-26 Thread deadalnix
On Sunday, 26 May 2013 at 23:38:33 UTC, Timothee Cour wrote: Is there any plan to support demangling of those: __ModuleInfoZ __initZ __arrayZ ? I have a lot of stuff that do not demangle properly with any tools. I give you one, just for fun :D D1d6parser9statement308__T14parseStatementTS1d8

Re: DLang Spec rewrite (?)

2013-05-26 Thread Borden
On Monday, 27 May 2013 at 03:32:54 UTC, Andrei Alexandrescu wrote: doc.ddoc is the general skeleton file for defining the online documentation. html.ddoc contains HTML-specific macros only, without having anything to do with our site's specific format. For greater clarity, html.ddoc will produ

Re: DLang Spec rewrite (?)

2013-05-26 Thread Borden
On Monday, 27 May 2013 at 03:32:54 UTC, Andrei Alexandrescu wrote: Yup, you got your work cut for you. Then again, wait til that diff is merged. It fixes a bunch of problems. That's OK. As long as I have some guidance on what to do I should manage. This effort isn't entirely selfless - part of

Re: demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

2013-05-26 Thread Daniel Murphy
"Timothee Cour" wrote in message news:mailman.207.1369611513.13711.digitalmar...@puremagic.com... > Is there any plan to support demangling of those: __ModuleInfoZ __initZ > __arrayZ ? > http://d.puremagic.com/issues/

Re: DLang Spec rewrite (?)

2013-05-26 Thread Andrei Alexandrescu
On 5/26/13 10:45 PM, Borden wrote: 1) doc.ddoc and html.ddoc define many of the macros that I need, but some of them I'll need to redefine for HTML5. Walter's response to how dmd resolves 'macro inheritence' doesn't clarify for me whether I should override the non-HTML5-compliant macros or rewrit

Re: Tuples

2013-05-26 Thread deadalnix
On Monday, 27 May 2013 at 02:31:50 UTC, Jonathan M Davis wrote: On Monday, May 27, 2013 04:24:51 Diggory wrote: It also shouldn't break any code since the only addition to TypeTuple is a check to make sure that the undocumented behaviour of using it with non-types is disallowed, and in the cas

Re: Tuples

2013-05-26 Thread Diggory
On Monday, 27 May 2013 at 02:31:50 UTC, Jonathan M Davis wrote: On Monday, May 27, 2013 04:24:51 Diggory wrote: It also shouldn't break any code since the only addition to TypeTuple is a check to make sure that the undocumented behaviour of using it with non-types is disallowed, and in the cas

Re: primitive value overflow

2013-05-26 Thread Marco Leise
Good that we talked about it. -- Marco

Re: DLang Spec rewrite (?)

2013-05-26 Thread Borden
On Monday, 27 May 2013 at 02:11:00 UTC, Andrei Alexandrescu wrote: I think it would be great. In particular, an ebook format would be good. You may want to wait until https://github.com/D-Programming-Language/dlang.org/pull/271 is in. It systematizes macros a lot and it may offer answers to

Re: Tuples

2013-05-26 Thread Jonathan M Davis
On Monday, May 27, 2013 04:24:51 Diggory wrote: > It also shouldn't break any code since the only addition to > TypeTuple is a check to make sure that the undocumented behaviour > of using it with non-types is disallowed, and in the case that > this undocumented feature is used the code can simply

Re: Tuples

2013-05-26 Thread Diggory
On Monday, 27 May 2013 at 01:36:58 UTC, Jonathan M Davis wrote: On Monday, May 27, 2013 11:21:08 Manu wrote: I have certainly been confused by the term 'tuple' used in D countless times. It seems to exist in a variety of different contexts, and every time I think I understood it, I realise I'm

Re: DLang Spec rewrite (?)

2013-05-26 Thread Jonathan M Davis
On Sunday, May 26, 2013 22:10:58 Andrei Alexandrescu wrote: > On 5/26/13 9:04 PM, Borden wrote: > > Before we get too off topic in this thread, is there demand for an > > xhtml5.ddoc file? If so, I'd like to make some changes to the other DDoc > > files as to minimise code reuse and minimise ambigu

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Wyatt
On Sunday, 26 May 2013 at 21:23:44 UTC, H. S. Teoh wrote: I have been thinking about this idea of a "reprogrammable keyboard", in that the keys are either a fixed layout with LCD labels on each key, or perhaps the whole thing is a long touchscreen, that allows arbitrary relabelling of keys (or

Re: DLang Spec rewrite (?)

2013-05-26 Thread Andrei Alexandrescu
On 5/26/13 10:12 PM, Jonathan M Davis wrote: On Sunday, May 26, 2013 22:08:44 Andrei Alexandrescu wrote: On 5/26/13 8:33 PM, Jonathan M Davis wrote: But we can't have a general ddoc solution for this without changing how ddoc works in a way that makes it so that it's not just a macro system any

Re: DLang Spec rewrite (?)

2013-05-26 Thread Andrei Alexandrescu
On 5/26/13 9:04 PM, Borden wrote: Before we get too off topic in this thread, is there demand for an xhtml5.ddoc file? If so, I'd like to make some changes to the other DDoc files as to minimise code reuse and minimise ambiguity in 'inherited' macro definitions. I'm willing to put in the time but

Re: DLang Spec rewrite (?)

2013-05-26 Thread Jonathan M Davis
On Sunday, May 26, 2013 22:08:44 Andrei Alexandrescu wrote: > On 5/26/13 8:33 PM, Jonathan M Davis wrote: > > But we can't have a general > > ddoc solution for this without changing how ddoc works in a way that makes > > it so that it's not just a macro system anymore. > > I totally think we can.

Re: DLang Spec rewrite (?)

2013-05-26 Thread Andrei Alexandrescu
On 5/26/13 8:33 PM, Jonathan M Davis wrote: But we can't have a general ddoc solution for this without changing how ddoc works in a way that makes it so that it's not just a macro system anymore. I totally think we can. All ddoc has to do is insert some macro call automatically under certain c

Re: DLang Spec rewrite (?)

2013-05-26 Thread Jonathan M Davis
On Sunday, May 26, 2013 18:21:50 H. S. Teoh wrote: > But right now, Ddoc already translates blank lines to $(BLANKLINE) (or > something like that). I'm just saying that paragraphs in the input > should be recognized as such, and automatically wrapped in $(P ...). > Then you can either define P=$0 f

Re: Tuples

2013-05-26 Thread Jonathan M Davis
On Monday, May 27, 2013 11:21:08 Manu wrote: > I have certainly been confused by the term 'tuple' used in D countless > times. > It seems to exist in a variety of different contexts, and every time I > think I understood it, I realise I'm probably wrong some time later. > There seems to be poor/no

Re: [article] Language Design Deal Breakers

2013-05-26 Thread H. S. Teoh
On Sun, May 26, 2013 at 05:20:59PM -0700, Ali Çehreli wrote: > On 05/26/2013 01:04 PM, Walter Bright wrote: > > >Yeah, I did the 'Soccer' one. > > http://www.handheldmuseum.com/Mattel/Soccer.htm > > That's before my time. :) I have played with ones similar to this though: > > http://www.han

Re: DLang Spec rewrite (?)

2013-05-26 Thread H. S. Teoh
On Mon, May 27, 2013 at 03:04:44AM +0200, Borden wrote: > Before we get too off topic in this thread, is there demand for an > xhtml5.ddoc file? If so, I'd like to make some changes to the other > DDoc files as to minimise code reuse and minimise ambiguity in > 'inherited' macro definitions. I'm wi

Re: DLang Spec rewrite (?)

2013-05-26 Thread H. S. Teoh
On Sun, May 26, 2013 at 05:33:58PM -0700, Jonathan M Davis wrote: > On Sunday, May 26, 2013 13:20:41 H. S. Teoh wrote: > > On Sat, May 25, 2013 at 10:34:30PM -0700, Jonathan M Davis wrote: > > [...] > > > > > My main complaint about ddoc is actually not a complaint about > > > ddoc but about html.

Re: Tuples

2013-05-26 Thread Manu
I have certainly been confused by the term 'tuple' used in D countless times. It seems to exist in a variety of different contexts, and every time I think I understood it, I realise I'm probably wrong some time later. There seems to be poor/no documentation comparing/distinguishing various D tuples

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

2013-05-26 Thread Jonathan M Davis
A few months back, we agreed that we'd be better of if we removed toString, toHash, opEquals, and opCmp from Object. They don't need to be there, and they're causing us havoc with attributes like const, pure, nothrow, and @safe, because every class object in all of D has to follow the attributes

Re: DLang Spec rewrite (?)

2013-05-26 Thread Borden
Before we get too off topic in this thread, is there demand for an xhtml5.ddoc file? If so, I'd like to make some changes to the other DDoc files as to minimise code reuse and minimise ambiguity in 'inherited' macro definitions. I'm willing to put in the time but I can't do it alone. If there

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Jonathan M Davis
On Sunday, May 26, 2013 11:46:53 Walter Bright wrote: > Making non-nullable pointers is just plugging one hole in a cheese grater. LOL. That is highly quotable. - Jonathan M Davis

Re: DLang Spec rewrite (?)

2013-05-26 Thread Jonathan M Davis
On Sunday, May 26, 2013 13:20:41 H. S. Teoh wrote: > On Sat, May 25, 2013 at 10:34:30PM -0700, Jonathan M Davis wrote: > [...] > > > My main complaint about ddoc is actually not a complaint about ddoc > > but about html. I find it very annoying to have to put $(P ) around > > every paragraph. Stuf

Re: Tuples

2013-05-26 Thread Jonathan M Davis
On Sunday, May 26, 2013 22:38:24 Diggory wrote: > On Sunday, 26 May 2013 at 15:48:00 UTC, Russel Winder wrote: > > I wonder if people coming to D, looking for information about > > tuples, > > will get confused by http://dlang.org/tuple.html which seems to > > tell > > people they have to "roll the

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Ali Çehreli
On 05/26/2013 01:04 PM, Walter Bright wrote: Yeah, I did the 'Soccer' one. http://www.handheldmuseum.com/Mattel/Soccer.htm That's before my time. :) I have played with ones similar to this though: http://www.handheldmuseum.com/Nintendo/Octopus.htm Ali

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread H. S. Teoh
On Mon, May 27, 2013 at 12:30:02AM +0200, Torje Digernes wrote: > On Sunday, 26 May 2013 at 21:46:38 UTC, H. S. Teoh wrote: > >On Sun, May 26, 2013 at 11:25:09PM +0200, Kiith-Sa wrote: > >>You mean like > >>http://en.wikipedia.org/wiki/Optimus_Maximus_keyboard > >>? > > > >Whoa! That is exactly wha

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Peter Williams
On 26/05/13 21:13, Paulo Pinto wrote: Am 26.05.2013 09:36, schrieb Walter Bright: On 5/26/2013 12:03 AM, Paulo Pinto wrote: After being a Turbo Pascal heavy user, C always felt backwards to me with its weak types, lack of proper strings, modules and namespaces. I had the opposite experience.

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Peter Williams
On 26/05/13 15:44, H. S. Teoh wrote: 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 ab

demangle doesn't work with __ModuleInfoZ __initZ __arrayZ

2013-05-26 Thread Timothee Cour
Is there any plan to support demangling of those: __ModuleInfoZ __initZ __arrayZ ?

Re: DMD under 64-bit Windows 7 HOWTO

2013-05-26 Thread Adam Wilson
On Sun, 26 May 2013 16:22:54 -0700, Manu wrote: On 26 May 2013 15:03, Adam Wilson wrote: 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 setu

Re: Skiping whitespace

2013-05-26 Thread Ali Çehreli
On 05/26/2013 05:03 AM, matovitch wrote: I am writting a simple parser for .obj file (mesh) and I would like to read 3 floats like this : 1.1 2.2 3.3 So I tried file.readf("%*[ \n\t]%f%*[ \n\t]%f%*[ \n\t]%f",&x, &y, &z); who works with C function scanf but doesn't work here. Is the

Re: DMD under 64-bit Windows 7 HOWTO

2013-05-26 Thread Adam Wilson
On Sun, 26 May 2013 07:12:32 -0700, Paulo Pinto wrote: Am 26.05.2013 07:03, schrieb 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

Re: DMD under 64-bit Windows 7 HOWTO

2013-05-26 Thread Adam Wilson
On Sun, 26 May 2013 00:41:46 -0700, Walter Bright wrote: On 5/25/2013 10:03 PM, Adam Wilson wrote: 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 does

Re: DMD under 64-bit Windows 7 HOWTO

2013-05-26 Thread Manu
On 26 May 2013 15:03, Adam Wilson wrote: > 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. > A

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Ziad Hatahet
On Sun, May 26, 2013 at 3:48 PM, Timon Gehr wrote: > IIRC the damage done by software bugs to US economy alone is estimated to > be around 60 billion a year. One billion damage done by dereferenceable > null pointers appears to be an optimistic estimate. > > > Interesting. Source? :) -- Ziad

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

2013-05-26 Thread Manu
On 26 May 2013 16:41, Ahuzhgairl wrote: > 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

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Walter Bright
On 5/26/2013 3:48 PM, Timon Gehr wrote: On 05/26/2013 08:46 PM, Walter Bright wrote: On 5/26/2013 7:26 AM, Peter Alexander wrote: A language that statically enforces the programmer to check for null would help here. I'm not arguing it won't help. I've been working in the background on a NotNu

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

2013-05-26 Thread Timon Gehr
On 05/26/2013 03:04 PM, Andrej Mitrovic wrote: On 5/26/13, Kenji Hara wrote: Hmm. Currently D can specify specType for alias template parameter. struct X(alias int x) {} // matches only when the symbol x has the type int This feature is news to me! Pretty cool. I'm about 3/4 through a D

Re: Rvalue references - The resolution

2013-05-26 Thread Timothee Cour
> 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;} This sounds hacky. I've proposed a general solution here: http://wiki.dlang.org/DIP38 either with user annotations of ref-retu

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Timon Gehr
On 05/26/2013 08:46 PM, Walter Bright wrote: On 5/26/2013 7:26 AM, Peter Alexander wrote: A language that statically enforces the programmer to check for null would help here. I'm not arguing it won't help. I've been working in the background on a NotNull!T template. I'm arguing that the bene

Re: DLang Spec rewrite (?)

2013-05-26 Thread Andrei Alexandrescu
On 5/26/13 4:20 PM, H. S. Teoh wrote: Wait, why not just make DDoc wrap it in $(P ) instead of? That way, output formats that don't care can simply define $(P) to be the text followed by a line break, and you're done. I thought it already does that. git grep -i '' **/*.{c,h} src/doc.c:P =

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Torje Digernes
On Sunday, 26 May 2013 at 21:46:38 UTC, H. S. Teoh wrote: On Sun, May 26, 2013 at 11:25:09PM +0200, Kiith-Sa wrote: You mean like http://en.wikipedia.org/wiki/Optimus_Maximus_keyboard ? Whoa! That is exactly what I had in mind!! Pity they don't appear to support Linux, though. :-( T If y

Re: Skiping whitespace

2013-05-26 Thread Mr. Anonymous
On Sunday, 26 May 2013 at 22:07:29 UTC, matovitch wrote: up ? I think you'd better repost it on digitalmars.D.learn.

Re: New UTF-8 stride function

2013-05-26 Thread Juan Manuel Cabo
And these are the results for the same linux 64bit system but compiling with -m32: $ dmd -m32 -O -inline -release -noboundscheck fast_stride.d $ for a in *wiki*; do echo ; echo $a: ; ./fast_stride $a; done arwiki-latest-all-titles-in-ns0: stride 89362 myStride 49974 myStride 51140 stride 88308

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread H. S. Teoh
On Sun, May 26, 2013 at 11:25:09PM +0200, Kiith-Sa wrote: > You mean like http://en.wikipedia.org/wiki/Optimus_Maximus_keyboard > ? Whoa! That is exactly what I had in mind!! Pity they don't appear to support Linux, though. :-( T -- MACINTOSH: Most Applications Crash, If Not, The Operating Sy

Re: New UTF-8 stride function

2013-05-26 Thread Juan Manuel Cabo
On Sunday, 26 May 2013 at 20:49:36 UTC, Dmitry Olshansky wrote: [..] Thus I encourage curious folks to measure/analyze it and report back (don't forget to include your processor model). [..] Ok, I just tested on my old trusty linux 64bit (Ubuntu 12.04). I had to download those *wiki* files f

Re: New UTF-8 stride function

2013-05-26 Thread Vladimir Panteleev
On Sunday, 26 May 2013 at 21:19:12 UTC, Kiith-Sa wrote: You don't need any instrumentation for perf and can get similar output (even in real time). (Don't intend to start a profiler war, but recommend looking at perf before messings with DLLs and the like) (although perf is is Linux-only) I thi

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Kiith-Sa
You mean like http://en.wikipedia.org/wiki/Optimus_Maximus_keyboard ?

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread H. S. Teoh
On Sun, May 26, 2013 at 02:14:17PM -0700, Walter Bright wrote: > On 5/26/2013 1:44 PM, Hans W. Uhlig wrote: > >Using those characters would be wonderful and while we do have > >unicode software support we don't really have unicode hardware > >support. I am still on my 102 key keyboard and I haven't

Re: New UTF-8 stride function

2013-05-26 Thread Kiith-Sa
You don't need any instrumentation for perf and can get similar output (even in real time). (Don't intend to start a profiler war, but recommend looking at perf before messings with DLLs and the like) (although perf is is Linux-only) I think the Windows version of AMD CodeAnalyst might have simi

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Walter Bright
On 5/26/2013 1:44 PM, Hans W. Uhlig wrote: Using those characters would be wonderful and while we do have unicode software support we don't really have unicode hardware support. I am still on my 102 key keyboard and I haven't really seen a good expanded character keyboard come along. I have a

Re: New UTF-8 stride function

2013-05-26 Thread Vladimir Panteleev
On Sunday, 26 May 2013 at 20:49:36 UTC, Dmitry Olshansky wrote: It's the kind of thing that is tremendously hard to measure accurately since it depends on the workload, architecture and the time spent is very small. So don't take it by word I'm almost certain that something is amiss (compiler s

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Diggory
Bugs occur when two parts of the program make slightly different assumptions about the interface between them. Semantically checking those assumptions will always help, but it will also always be limited. The idea that code will always branch on nullable types and handle both cases is wishful

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Marcin Mstowski
On Sun, May 26, 2013 at 9:42 PM, Joakim wrote: > On Sunday, 26 May 2013 at 19:20:15 UTC, Marcin Mstowski wrote: > >> Character Data Representation >> Architecture >> >by >> >> IBM. It is wha

Re: New UTF-8 stride function

2013-05-26 Thread Kiith-Sa
WRT to the worse Linux64 case: I recommend infinite-cycling it and testing in perf top. (If you're on Ubuntu/derivative or maybe Debian, just type "perf top", it will tell you what package to install, and once installed, "perf top" again, while the benchmark is running) You'll get a precise

New UTF-8 stride function

2013-05-26 Thread Dmitry Olshansky
If there is anything that come out of UTF-8 discussion is that I decided to dust off my experimental implementation of UTF-8 stride function. Just for fun. The key difference vs std is in handling non-ASCII case. I'm replacing bsr intrinsic with a what I call an "in-register lookup table" (nea

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Walter Bright
On 5/26/2013 1:21 PM, Nick Sabalausky wrote: Cool. I did a couple of indie/budget games back in late high school, early college (roughly 1998-2002) for royalties that probably ended up working out to much less than minimum wage. But it still beat the hell out of McDonald's! ;) That's true. I le

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Hans W. Uhlig
On Saturday, 25 May 2013 at 03:46:23 UTC, Walter Bright wrote: On 5/24/2013 7:16 PM, Manu wrote: So when we define operators for u × v and a · b, or maybe n²? ;) Oh, how I want to do that. But I still think the world hasn't completely caught up with Unicode yet. Using those characters would

Re: Tuples

2013-05-26 Thread Diggory
On Sunday, 26 May 2013 at 15:48:00 UTC, Russel Winder wrote: I wonder if people coming to D, looking for information about tuples, will get confused by http://dlang.org/tuple.html which seems to tell people they have to "roll their own", and http://dlang.org/phobos/std_typecons.html which tells

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

2013-05-26 Thread Mr. Anonymous
On Sunday, 26 May 2013 at 20:23:45 UTC, Martin Nowak wrote: On 05/26/2013 06:12 AM, Timothee Cour wrote: > Which means that the extra check to make sure the output reference > doesn't escape a local incurs a 20% cost in my example. > > Is there a better implementation (i have a single pointer com

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

2013-05-26 Thread Martin Nowak
On 05/26/2013 06:12 AM, Timothee Cour wrote: > Which means that the extra check to make sure the output reference > doesn't escape a local incurs a 20% cost in my example. > > Is there a better implementation (i have a single pointer comparison > though so I'm not sure how that would be optimized)

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Nick Sabalausky
On Sun, 26 May 2013 13:04:50 -0700 Walter Bright wrote: > On 5/26/2013 12:56 PM, Nick Sabalausky wrote: > > On Sun, 26 May 2013 11:51:24 -0700 > > Walter Bright wrote: > >> > >> (Don't dismiss this out of hand - I've seen this sort of thing done > >> before. Back when I was programming hand-held

Re: Rvalue references - The resolution

2013-05-26 Thread Martin Nowak
On 05/05/2013 12:30 AM, Walter Bright wrote: > On 5/4/2013 3:03 PM, deadalnix wrote: >>> Where you miss the point, is that these annotations may be omitted >>> (and they >>> are most of the time). When nothing is specified, the lifetime of the >>> returned >>> reference is considered to be the uni

Re: DLang Spec rewrite (?)

2013-05-26 Thread H. S. Teoh
On Sat, May 25, 2013 at 10:34:30PM -0700, Jonathan M Davis wrote: [...] > My main complaint about ddoc is actually not a complaint about ddoc > but about html. I find it very annoying to have to put $(P ) around > every paragraph. Stuff like LaTeX does that automatically based on > blank lines, whi

Re: DLang Spec rewrite (?)

2013-05-26 Thread Andrei Alexandrescu
On 5/26/13 4:02 PM, H. S. Teoh wrote: On Sun, May 26, 2013 at 03:03:30AM -0400, Andrei Alexandrescu wrote: ESCAPES has been recently defined to partially fix that. Is it working now? Yes. Oh? I thought TeX already had the capability. Well, at least, you could redefine the default escape ch

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Nick Sabalausky
On Sun, 26 May 2013 08:18:11 -0700 "H. S. Teoh" wrote: > Back then there was a lot of pressure to minimalize the > language; nowadays we know better... No we don't. Some of us do, like those of us here in D-land. But from what I've seen there's still a *lot* of belief in keeping languages minimal

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Walter Bright
On 5/26/2013 12:56 PM, Nick Sabalausky wrote: On Sun, 26 May 2013 11:51:24 -0700 Walter Bright wrote: On 5/26/2013 7:48 AM, H. S. Teoh wrote: Ah, if only this code were written in D... :-P One possibility is to write the code in D, debug it, then recode the result in C to satisfy your custo

Re: DLang Spec rewrite (?)

2013-05-26 Thread H. S. Teoh
On Sun, May 26, 2013 at 03:03:30AM -0400, Andrei Alexandrescu wrote: > On 5/26/13 2:03 AM, H. S. Teoh wrote: > >I don't know, to me DDoc is still lacking a major feature: a > >mechanism for per-character translation. The problem is that many > >output formats have a different scheme of metacharacte

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Nick Sabalausky
On Sun, 26 May 2013 11:51:24 -0700 Walter Bright wrote: > On 5/26/2013 7:48 AM, H. S. Teoh wrote: > > Ah, if only this code were written in D... :-P > > One possibility is to write the code in D, debug it, then recode the > result in C to satisfy your customer. > > (Don't dismiss this out of ha

Re: Help with the 'export' declaration and OpenSSL?

2013-05-26 Thread Reid Levenick
On Sunday, 26 May 2013 at 00:38:23 UTC, Reid Levenick wrote: 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_Upli

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Joakim
On Sunday, 26 May 2013 at 19:38:21 UTC, Mr. Anonymous wrote: On Sunday, 26 May 2013 at 19:25:37 UTC, Joakim wrote: I'm not sure if you were trying to make my point, but you just did. There are only 19 results for that search string. If UTF-8 were such a rousing success and most developers fou

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Nick Sabalausky
On Sun, 26 May 2013 13:18:32 +0200 Paulo Pinto wrote: > > Did you had the pleasure to write portable C or C++ code across > multiple operating systems and vendors in the mid 90's? > Luckily, no. For me it was just Win9x and DOS (using that awesome 32-bit extender DOOM and every other game of th

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Joakim
On Sunday, 26 May 2013 at 19:20:15 UTC, Marcin Mstowski wrote: Character Data Representation Architectureby IBM. It is what you want to do with additions and it is available since 1995. When you come up with an inventive idea, i suggest you to

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Mr. Anonymous
On Sunday, 26 May 2013 at 19:25:37 UTC, Joakim wrote: On Sunday, 26 May 2013 at 19:11:42 UTC, Mr. Anonymous wrote: On Sunday, 26 May 2013 at 19:05:32 UTC, Joakim wrote: On Sunday, 26 May 2013 at 18:29:38 UTC, Andrei Alexandrescu wrote: On 5/26/13 1:45 PM, Joakim wrote: What is extraordinary ab

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Joakim
On Sunday, 26 May 2013 at 19:11:42 UTC, Mr. Anonymous wrote: On Sunday, 26 May 2013 at 19:05:32 UTC, Joakim wrote: On Sunday, 26 May 2013 at 18:29:38 UTC, Andrei Alexandrescu wrote: On 5/26/13 1:45 PM, Joakim wrote: What is extraordinary about "UTF-8 is shit?" It is obviously so. Congratulat

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Marcin Mstowski
Character Data Representation Architectureby IBM. It is what you want to do with additions and it is available since 1995. When you come up with an inventive idea, i suggest you to first check what was already done in that area and then rethink th

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Mr. Anonymous
On Sunday, 26 May 2013 at 19:05:32 UTC, Joakim wrote: On Sunday, 26 May 2013 at 18:29:38 UTC, Andrei Alexandrescu wrote: On 5/26/13 1:45 PM, Joakim wrote: What is extraordinary about "UTF-8 is shit?" It is obviously so. Congratulations, you are literally the only person on the Internet who s

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Joakim
On Sunday, 26 May 2013 at 18:29:38 UTC, Andrei Alexandrescu wrote: On 5/26/13 1:45 PM, Joakim wrote: What is extraordinary about "UTF-8 is shit?" It is obviously so. Congratulations, you are literally the only person on the Internet who said so: http://goo.gl/TFhUO Haha, that is funny, :D tho

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Walter Bright
On 5/26/2013 7:48 AM, H. S. Teoh wrote: Ah, if only this code were written in D... :-P One possibility is to write the code in D, debug it, then recode the result in C to satisfy your customer. (Don't dismiss this out of hand - I've seen this sort of thing done before. Back when I was progr

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Walter Bright
On 5/26/2013 7:26 AM, Peter Alexander wrote: A language that statically enforces the programmer to check for null would help here. I'm not arguing it won't help. I've been working in the background on a NotNull!T template. I'm arguing that the benefits are being oversold. It's like saying nu

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Walter Bright
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 strangely. Ha, I spent the day on an issue like that in D. Stackove

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Andrei Alexandrescu
On 5/26/13 1:45 PM, Joakim wrote: What is extraordinary about "UTF-8 is shit?" It is obviously so. Congratulations, you are literally the only person on the Internet who said so: http://goo.gl/TFhUO On 5/26/13 1:45 PM, Joakim wrote: Or it could just be that I'm much smarter than everybody e

Re: [article] Language Design Deal Breakers

2013-05-26 Thread Paulo Pinto
Am 26.05.2013 17:18, schrieb H. S. Teoh: On Sun, May 26, 2013 at 01:13:30PM +0200, Paulo Pinto wrote: [...] Now it is too late for it, but at the time C could have stayed as powerful as it is while offering: - proper modules, or at least namespaces - no automatic conversions between arrays and

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Joakim
On Sunday, 26 May 2013 at 16:54:53 UTC, Vladimir Panteleev wrote: 1. Make extraordinary claims What is extraordinary about "UTF-8 is shit?" It is obviously so. 2. Refuse to back up said claims with small examples because "I don't write toy code" I never refused small examples. I have provide

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Dmitry Olshansky
26-May-2013 20:54, Vladimir Panteleev пишет: On Sunday, 26 May 2013 at 15:23:33 UTC, Joakim wrote: On Sunday, 26 May 2013 at 14:37:27 UTC, H. S. Teoh wrote: IHBT. I've made my position clear: I don't write toy code. 1. Make extraordinary claims 2. Refuse to back up said claims with small e

Re: DLang Spec rewrite (?)

2013-05-26 Thread Borden
Thank you for the suggestions, Juan. For the purposes of generating a single set of XHTML5 documents, your advice would work. What I'm trying to do, however, is update the makefiles for the website source so that ePUB files become a target. I worry, therefore, that pumping the DLang spec thr

Re: Why UTF-8/16 character encodings?

2013-05-26 Thread Vladimir Panteleev
On Sunday, 26 May 2013 at 15:23:33 UTC, Joakim wrote: On Sunday, 26 May 2013 at 14:37:27 UTC, H. S. Teoh wrote: IHBT. I've made my position clear: I don't write toy code. 1. Make extraordinary claims 2. Refuse to back up said claims with small examples because "I don't write toy code" 3. R

Re: DLang Spec rewrite (?)

2013-05-26 Thread Juan Manuel Cabo
On Sunday, 26 May 2013 at 08:09:16 UTC, Borden wrote: [...] My 'complaint' - although I would prefer to have my observations about difficulties working with a markup system be called 'observations' - is that the current body of text files which comprise the DLang spec source cannot be easily c

  1   2   >