Re: Switch-case made less buggy, now with PATCH!

2009-11-22 Thread Ellery Newcomer
On 11/20/2009 07:51 PM, Chad J wrote: http://d.puremagic.com/issues/show_bug.cgi?id=3536 So Walter, with this you can keep your beloved fall-through. Now can the rest of us be spared the nasty fall-through bugs, please please please?? Also, about assert(0)... I'd be happy to change what I did i

Re: Switch-case made less buggy, now with PATCH!

2009-11-22 Thread Ellery Newcomer
On 11/22/2009 05:18 PM, Don wrote: I wasn't. Introducing case xxx!: is the problem. Ok, I'll bite, why is it a problem? Because it's a new syntax. Because fallthrough isn't a big enough issue to devote an entire lexical token to. Because it came out of the blue. Because instead of overhaul

Re: Short list with things to finish for D2

2009-11-25 Thread Ellery Newcomer
On 11/25/2009 10:46 AM, Don wrote: Denis Koroskin wrote: I recall that Visual Basic has UBound function that returns upper bound of a multi-dimensional array: Dim a(100, 5, 4) As Byte UBound(a, 1) -> 100 UBound(a, 2) -> 5 UBound(a, 3) -> 4 Works for single-dimensional arrays, too: Dim b(8) As By

Re: Short list with things to finish for D2

2009-11-25 Thread Ellery Newcomer
On 11/25/2009 01:40 PM, Denis Koroskin wrote: IIRC lower bound is 1 by default in VB and therefore b(0) is illegal. Nope. Dim b(8) as String is equivalent to Dim b(0 to 8) as String and therefore b(0) is very legal.

Re: Why not?

2009-11-29 Thread Ellery Newcomer
On 11/29/2009 03:45 AM, Matti Niemenmaa wrote: This feature already exists, you just need to declare append and foo a bit differently: public Foo append(Foo obj...) {} void foo(Foo obj...) {} You're supposed to assume that obj is allocated on the stack, though, which requires you to make a c

Re: switch case for constants-only?

2009-12-05 Thread Ellery Newcomer
On 12/05/2009 03:39 PM, Nick Sabalausky wrote: "Steven Schveighoffer" wrote in message news:op.u4hhjisgeav...@localhost.localdomain... On Sat, 05 Dec 2009 16:08:00 -0500, Nick Sabalausky wrote: I just noticed in D1 that the values for the cases in a switch must be known at compile-time (btw,

Re: switch case for constants-only?

2009-12-05 Thread Ellery Newcomer
On 12/05/2009 04:19 PM, Nick Sabalausky wrote: "Ellery Newcomer" wrote in message More so than remembering to type break after each case block? Good point, but that's really a separate issue. I don't know about that. The issue seems to be you want switch to behave

Re: [OT] Broken newsgroup threads in Thunderbird 3?

2009-12-05 Thread Ellery Newcomer
On 12/05/2009 08:21 PM, Lionello Lunesu wrote: Is anybody else here experiencing problems with Thunderbird 3 RC? On my laptop many post that are clearly replies to an existing thread appear as new top-level posts. When I first started using Thunderbird 3 beta this happened in my IMAP folder as w

Re: switch case for constants-only?

2009-12-05 Thread Ellery Newcomer
On 12/05/2009 09:20 PM, Don wrote: Nick Sabalausky wrote: I just noticed in D1 that the values for the cases in a switch must be known at compile-time (btw, the docs don't seem somewhat vague on that). Is this also true in D2? If so, I don't suppose we could get that changed before the book? It'

Re: switch case for constants-only?

2009-12-05 Thread Ellery Newcomer
On 12/05/2009 06:25 PM, Nick Sabalausky wrote: Also, I still don't see how there's any semantic difference between the current switch and the switch-like if-else chain other than just the fact that switch currently carries the restriction that the values being checked against must be unique and

Re: switch case for constants-only?

2009-12-06 Thread Ellery Newcomer
On 12/05/2009 11:17 PM, Don wrote: Ellery Newcomer wrote: On 12/05/2009 09:20 PM, Don wrote: Nick Sabalausky wrote: I just noticed in D1 that the values for the cases in a switch must be known at compile-time (btw, the docs don't seem somewhat vague on that). Is this also true in D2? If

Re: yank '>>>'?

2009-12-06 Thread Ellery Newcomer
On 12/06/2009 10:11 AM, Andrei Alexandrescu wrote: D has operator >>> which means "unsigned shift to the right", inherited from Java. But it doesn't need it because D has unsigned types, which can be used to effect unsigned shift. (Java, lacking unsigned types, had no other way around but to defi

Re: [OT] Broken newsgroup threads in Thunderbird 3?

2009-12-06 Thread Ellery Newcomer
On 12/05/2009 09:28 PM, Ellery Newcomer wrote: On 12/05/2009 08:21 PM, Lionello Lunesu wrote: Is anybody else here experiencing problems with Thunderbird 3 RC? On my laptop many post that are clearly replies to an existing thread appear as new top-level posts. When I first started using

Re: Short list with things to finish for D2

2009-12-07 Thread Ellery Newcomer
On 12/07/2009 08:33 PM, Stewart Gordon wrote: bearophile wrote: In Python you usually just omit the value: a[:5] === a[0 .. 5] a[5:] === a[5 .. $] Which doesn't accommodate anything equivalent to a[$-4 .. $-2]. you mean this? a[-4:-2] Or you can also use None, this can useful because y

Re: enhancing enums

2009-12-08 Thread Ellery Newcomer
On 12/08/2009 06:35 PM, Nick Sabalausky wrote: "bearophile" wrote in message news:hfmlkl$1ki...@digitalmars.com... hehe45: In c++ it is valid syntax to have trailing commas at the and of enum definitions: enum {a, b, c, }; This would be a useful addition to D too. I think that's already pos

Re: Is this a bug or a feature?

2010-01-07 Thread Ellery Newcomer
On 01/07/2010 07:04 AM, Daniel Murphy wrote: The following code compiles under dmd v2.037, no closing brace required. --- import std.stdio; void main() { while(true) writeln("Bug!"); --- Bug, or feature for the extremely lazy? in parse.c, Parse

Re: Sturcts with constructor (dmd1.x)

2010-01-11 Thread Ellery Newcomer
On 01/11/2010 04:06 PM, Nrgyzer wrote: Hello everyone, I currently try to create a structure with a construtor, but I always get the following messages: Error: Foo.this constructors are only for class definitions Error: constructor lisim.lsResult.lsResult.this special member functions not all

Re: What's left to do for a stable D2?

2010-01-24 Thread Ellery Newcomer
On 01/24/2010 08:59 PM, Walter Bright wrote: I'll have a big problem with the (nonexistent) 64 bit linker on Windows, and a lesser problem with the nonexistent debugger and librarian. That means that the first 64 bit dmd will be for Linux/OSX. Not that I know anything about GSoC, but do you th

Re: Google's Go

2010-01-31 Thread Ellery Newcomer
On 01/30/2010 11:46 PM, John D wrote: best one out there (IMO, until I implement my own, of course) << http://en.wikipedia.org/wiki/Lake_Wobegone_effect

Re: TDPL a bad idea?

2010-02-02 Thread Ellery Newcomer
On 02/02/2010 06:50 PM, Walter Bright wrote: Ary Borenszweig wrote: Walter Bright wrote: BCS wrote: I think both of them are smart enough to figure out that if nobody here disagree with them, then they shouldn't waste there time talking with us. Well, it is boring to talk to people who agree

Re: Array operation for computing the dot product?

2010-02-03 Thread Ellery Newcomer
On 02/03/2010 03:09 PM, Simen kjaeraas wrote: On Wed, 03 Feb 2010 21:19:57 +0100, Michiel Helvensteijn wrote: bearophile wrote: Indeed. The difficult question is, what would the syntax be? What about the simper: x.dot(y) I don't like symmetric operations with an asymmetric syntax. Bette

Re: A little project

2010-02-04 Thread Ellery Newcomer
I'll volunteer if no one else has On 02/03/2010 09:01 PM, Andrei Alexandrescu wrote: I'd like to propose a small project suggested by Walter. If anyone could take this up, it would be great. The project is a small utility program that could be a good complement to the likes of rdmd. The program

Re: Coverity tool

2010-02-09 Thread Ellery Newcomer
On 02/09/2010 02:18 PM, Walter Bright wrote: bearophile wrote: Walter Bright: From what I can infer from their various statements, the primary thing it does is pair functions that must be paired, like malloc/free, lock/unlock, fopen/fclose, etc. I have never used their program, and probably I

Re: LDC 0.9.2 release candidate

2010-02-13 Thread Ellery Newcomer
On 02/13/2010 04:28 AM, Christian Kamm wrote: I made a new package based on LDC trunk (DMDFE 1.056, LLVM 2.6) and Tango 0.99.9. It's only for x86-64 for now and available at: http://www.incasoftware.de/~kamm/ldc/ldc-0.9.2-x86_64-rc1.tbz2 Could everyone interested in this give it a spin and repo

Re: LDC 0.9.2 release candidate

2010-02-13 Thread Ellery Newcomer
On 02/13/2010 01:34 PM, Ellery Newcomer wrote: On 02/13/2010 04:28 AM, Christian Kamm wrote: I made a new package based on LDC trunk (DMDFE 1.056, LLVM 2.6) and Tango 0.99.9. It's only for x86-64 for now and available at: http://www.incasoftware.de/~kamm/ldc/ldc-0.9.2-x86_64-rc1.tbz2

Re: LDC 0.9.2 release candidate

2010-02-13 Thread Ellery Newcomer
On 02/13/2010 01:43 PM, bearophile wrote: Ellery Newcomer: Is it just me, or does ldc handle gratuitous use of ~= much more poorly than dmd? Yep. But Tango/LDC devs have ignored me about this so far. It isn't a tango problem; the latest dmd/tango bundle works fine. And I tried repl

Re: LDC 0.9.2 release candidate

2010-02-14 Thread Ellery Newcomer
On 02/14/2010 03:16 AM, Christian Kamm wrote: Ellery Newcomer wrote: Is it just me, or does ldc handle gratuitous use of ~= much more poorly than dmd? Yes, LDC did ~= by doing length += 1 and then assigning the last element. ;) I changed it to use the appropriate runtime function. Please try

Re: disabling unary "-" for unsigned types

2010-02-15 Thread Ellery Newcomer
On 02/15/2010 05:33 PM, Steven Schveighoffer wrote: i.e. uint a = -1; // error I can't say I would appreciate having to write uint a = 0x; or the equivalent for ulong. uint b = 5; uint c = -b; // error int d = -b; // ok auto e = -b; // e is type int In the case of literals, I thi

Re: disabling unary "-" for unsigned types

2010-02-15 Thread Ellery Newcomer
On 02/15/2010 09:17 PM, Steven Schveighoffer wrote: On Mon, 15 Feb 2010 21:32:21 -0500, Rainer Deyke wrote: Ellery Newcomer wrote: On 02/15/2010 05:33 PM, Steven Schveighoffer wrote: uint a = -1; // error I can't say I would appreciate having to write uint a = 0x; o

Re: disabling unary "-" for unsigned types

2010-02-15 Thread Ellery Newcomer
On 02/15/2010 11:35 PM, Ellery Newcomer wrote: On 02/15/2010 09:17 PM, Steven Schveighoffer wrote: On Mon, 15 Feb 2010 21:32:21 -0500, Rainer Deyke wrote: Ellery Newcomer wrote: On 02/15/2010 05:33 PM, Steven Schveighoffer wrote: uint a = -1; // error I can't say I would appre

Re: disabling unary "-" for unsigned types

2010-02-16 Thread Ellery Newcomer
On 02/15/2010 09:15 PM, Steven Schveighoffer wrote: For example, there is no possible way a person unfamiliar with computers (and most programmers who have not run into this) would believe that b = 5; a = -b; Tell any math major that fixnum arithmetic is really just arithmetic modulo 2^32 a

Re: disabling unary "-" for unsigned types

2010-02-16 Thread Ellery Newcomer
On 02/16/2010 09:36 AM, Daniel Keep wrote: Ellery Newcomer wrote: On 02/15/2010 09:15 PM, Steven Schveighoffer wrote: For example, there is no possible way a person unfamiliar with computers (and most programmers who have not run into this) would believe that b = 5; a = -b; Tell any

Re: disabling unary "-" for unsigned types

2010-02-16 Thread Ellery Newcomer
On 02/16/2010 12:03 PM, Adam D. Ruppe wrote: On Tue, Feb 16, 2010 at 11:26:37AM -0600, Ellery Newcomer wrote: OT: has anyone written a wrapper for int/long/etc that throws exceptions on overflow/underflow? Maybe such a thing should exist in the standard library? Something along these lines

Re: disabling unary "-" for unsigned types

2010-02-16 Thread Ellery Newcomer
On 02/16/2010 12:36 PM, bearophile wrote: Ellery Newcomer: OT: has anyone written a wrapper for int/long/etc that throws exceptions on overflow/underflow? Maybe such a thing should exist in the standard library? No, that idea is trash. Think about arrays, do you want to litter your code

Re: !in

2010-02-18 Thread Ellery Newcomer
On 02/18/2010 07:31 PM, Andrei Alexandrescu wrote: .. the other way around :o). Andrei with a stinky sock?

error of the day

2010-02-20 Thread Ellery Newcomer
object.Exception: Cyclic dependency in module dxl.biff.DataValidation for import dxl.biff.DataValidation well it made me laugh

Re: Line number of Exception instantiation

2010-03-04 Thread Ellery Newcomer
On 03/04/2010 02:49 PM, Fawzi Mohamed wrote: Bye, bearophile Doesn't tango's exception tracing do that? sure it does, just import TraceExceptions... The exception will contain the stacktrace at the throwing point (adresses)... and with printOut you can get a symbolic trace (if possible).

Re: Proposal: Multidimensional opSlice solution

2010-03-08 Thread Ellery Newcomer
On 03/08/2010 08:49 PM, bearophile wrote: Admitted, the last case does not work quite as nicely with ".." as it does with Python's ":". Still, the point should be clear. I have never understood why Walter has adopted .. for slices instead of the better : I'd like to know why. Bye, bearophil

Re: Proposal: Multidimensional opSlice solution

2010-03-09 Thread Ellery Newcomer
On 03/09/2010 04:49 AM, bearophile wrote: Ellery Newcomer: Ternary ?:, I suppose. But they seem acceptable for AA literals: auto aa = [1: 2, 3: 4]; Bye, bearophile Yeah, on second thought I don't think ?: poses any such problems.

Re: Web-News Reader Problems

2010-03-09 Thread Ellery Newcomer
On 03/09/2010 09:12 AM, Andrew Marlow wrote: er, I am looking for the newsgroups for the D programming language. You found them. Welcome. > I tried to find USENET groups using Google Groups but there don't seem to be any. Then I found these postings in www.digitalmars.com/pnews. I can read an

Re: any tool to at least partially convert C++ to D (htod for source

2010-03-09 Thread Ellery Newcomer
On 03/09/2010 03:35 PM, Justin Johansson wrote: #3 problems with circular module references. I forget some of the detail but think, if I recall correctly, that it was to do with static class members so had to pull a lot of source code into one big file .. then leading to problem #4 Justin Jo

Re: any tool to at least partially convert C++ to D (htod for source

2010-03-09 Thread Ellery Newcomer
On 03/09/2010 06:15 PM, Walter Bright wrote: Ellery Newcomer wrote: I hate the restriction on modules with static constructors and cyclic dependencies. IMO it's the most patronizing 'feature' D has. I understand, but the alternative is the essentially random order of executi

Re: Property rewriting; I feel it's important. Is there still time?

2010-03-10 Thread Ellery Newcomer
On 03/10/2010 10:48 AM, Andrei Alexandrescu wrote: On 03/10/2010 08:42 AM, Andrei Alexandrescu wrote: {auto t = foo.prop; auto t1 = t; ++t1; foo.prop = t1; return t;}() within an rvalue context, and into: {auto t = foo.prop; ++t; foo.prop = t; return t;}() within a void context. The latter

Re: Property rewriting; I feel it's important. Is there still time?

2010-03-10 Thread Ellery Newcomer
On 03/10/2010 11:10 AM, Andrei Alexandrescu wrote: On 03/10/2010 11:05 AM, Ellery Newcomer wrote: On 03/10/2010 10:48 AM, Andrei Alexandrescu wrote: On 03/10/2010 08:42 AM, Andrei Alexandrescu wrote: {auto t = foo.prop; auto t1 = t; ++t1; foo.prop = t1; return t;}() within an rvalue context

Re: any tool to at least partially convert C++ to D (htod for source

2010-03-10 Thread Ellery Newcomer
On 03/10/2010 12:14 PM, Walter Bright wrote: Jacob Carlborg wrote: I've always wonder why that is. I mean if I put an empty static constructor in two modules and they import each other I get a circular reference error. Usually when I use static constructors they don't depend on the order of each

Re: any tool to at least partially convert C++ to D (htod for source

2010-03-10 Thread Ellery Newcomer
On 03/10/2010 01:10 PM, Walter Bright wrote: Ellery Newcomer wrote: Maybe do a bit of analysis that can tell whether any static ctors in a module use symbols from any other module and use that to determine module dependencies? This is a transitive thing. Hmm. That would make things

Re: any tool to at least partially convert C++ to D (htod for source

2010-03-10 Thread Ellery Newcomer
On 03/10/2010 05:14 PM, grauzone wrote: You could move the static ctor into another module outside of the cycle (e.g. the module where your main() function is). Then you get the same effects as "platform" dependent initialization. most of my static ctors just set a logger object meant for use

dmdz

2010-03-11 Thread Ellery Newcomer
So I'm toying with a prototype, which is proving nice enough, but there be a few things that I'm not quite sure which way to go with. Currently I have the general pattern dmdz [global flags] foo1.zip [foo1 local flags] foo2.zip [foo2 local flags] ... although when given multiple zips it just

Re: dmdz

2010-03-11 Thread Ellery Newcomer
On 03/11/2010 12:29 PM, Andrei Alexandrescu wrote: For the more specific case dmdz [global flags] foo.zip [local flags] it expects all the relevant content in foo.zip to be located inside directory foo, and doesn't extract anything else unless you explicitly tell it to. I don't understand thi

Re: order of static constructor execution

2010-03-11 Thread Ellery Newcomer
On 03/11/2010 08:42 PM, Walter Bright wrote: 2. Trying to analyze the static constructors to see what the dependencies actually are is fraught with unsolvable problems. could you elucidate on this point? Is it definitely impossible to get a hold of a complete dag, even if at runtime?

Re: order of static constructor execution

2010-03-11 Thread Ellery Newcomer
On 03/11/2010 10:15 PM, Walter Bright wrote: Ellery Newcomer wrote: On 03/11/2010 08:42 PM, Walter Bright wrote: 2. Trying to analyze the static constructors to see what the dependencies actually are is fraught with unsolvable problems. could you elucidate on this point? Is it definitely

Re: dmdz

2010-03-12 Thread Ellery Newcomer
On 03/12/2010 06:15 AM, Lars T. Kyllingstad wrote: Ellery Newcomer wrote: So I'm toying with a prototype, which is proving nice enough, but there be a few things that I'm not quite sure which way to go with. Cool! Looking forward to using it. :) But can we please call it zdmd, s

Re: [OT] zip etiquette

2010-03-12 Thread Ellery Newcomer
On 03/11/2010 11:09 PM, Nick Sabalausky wrote: "Ellery Newcomer" wrote in message news:hnc4o3$2lm...@digitalmars.com... I suppose the name isn't so important, but I really hate zip files whose contents aren't contained inside a single directory. This is a bit of a "

Re: Built-in unsafety in D

2010-03-12 Thread Ellery Newcomer
On 03/12/2010 07:46 AM, bearophile wrote: The bug was caused by: typedef unsigned Signal; It would be very nice to be able to know where unsafe comparisons are happening in your program without having to modify and recompile dmd. Another thing that bit me is foreach(k; arr){ k = s

Re: Google opensources linear time, fixed space regex library

2010-03-12 Thread Ellery Newcomer
On 03/12/2010 02:27 PM, Andrei Alexandrescu wrote: http://google-opensource.blogspot.com/2010/03/re2-principled-approach-to-regular.html http://code.google.com/p/re2/ If the license allows, it would be great to translate that to D and make it work with arbitrary ranges of arbitrary data... An

Re: dmdz

2010-03-15 Thread Ellery Newcomer
Hello. I've run into a problem. dmd foo/bar/bizz.d bizz.d: module bar.bizz; ... dmd thinks it's looking at module foo.bar.bizz and generally gets confused unless supplied with -Ifoo. As a user, I'm not manually specifying that -Ifoo. So I need some bare-bones lexing capabilities. I have

Re: dmdz

2010-03-15 Thread Ellery Newcomer
On 03/15/2010 10:04 PM, Nick Sabalausky wrote: "Ellery Newcomer" wrote in message news:hnmbkl$2rs...@digitalmars.com... Hello. I've run into a problem. dmd foo/bar/bizz.d bizz.d: module bar.bizz; ... dmd thinks it's looking at module foo.bar.bizz and generally

Re: dmdz

2010-03-16 Thread Ellery Newcomer
Anyone want to play with dmdz, here it is: http://personal.utulsa.edu/~ellery-newcomer/dmdz.zip Haven't tested it much, especially on windows. Don't know what it will do with multiple zip files. piecemeal flag doesn't know how to stop when you tell it to. dmd's ru

Re: dmdz

2010-03-17 Thread Ellery Newcomer
On 03/16/2010 08:13 PM, Andrei Alexandrescu wrote: This is solid work, but I absolutely refuse to believe the solution must be as complicated as this. Recall that the baseline is a 30-lines script. I can't bring myself to believe that a four-modules, over thousand lines solution justifies the add

Re: dmdz

2010-03-17 Thread Ellery Newcomer
On 03/17/2010 03:53 PM, Andrei Alexandrescu wrote: Thanks for replying to this. I'd been afraid that I was coming off too critical. (I counted the ANTLR files as modules, and I think that's fair.) To give you an idea on where I come from, distributing dmdz with dmd is also a message to users on h

Re: dmdz

2010-03-18 Thread Ellery Newcomer
On 03/17/2010 08:49 PM, Andrei Alexandrescu wrote: Well that's generated. I counted what's needed to get things going. Unless you meant that ironically... Yes I was speaking in jest up to this point. should bump it up to 11 or 12 k. Arguably we can discount the import stuff, although I'd

Re: dmdz

2010-03-18 Thread Ellery Newcomer
On 03/18/2010 11:32 AM, Robert Clipsham wrote: On 18/03/10 01:17, Ellery Newcomer wrote: I was kind of hoping others would try it and give their opinions, but apparently nobody else cares. Or they're on vacation, like I should be. Or they're giving the infamous 'silent appro

Re: dmdz

2010-03-18 Thread Ellery Newcomer
On 03/18/2010 11:36 AM, Robert Clipsham wrote: On 18/03/10 16:28, Ellery Newcomer wrote: I still don't see why (other than lexd.g adds ~ 10k loc just to get the line 'module foo.bar;' out of a source file) That seems like a tad too much for it... Surely it would only take a fe

Re: Obfuscating function names and the like inside exe file

2010-03-20 Thread Ellery Newcomer
On 03/20/2010 11:24 AM, Robert Jacques wrote: On Sat, 20 Mar 2010 10:12:14 -0300, bobef <_asd_asd_asd_asdasd_...@asdasda___dasd.com> wrote: Hello all, I was wondering if someone know of way to obfuscate all the strings and function names and class names inside DMD Windows generated exe file. Op

Re: Implicit enum conversions are a stupid PITA

2010-03-25 Thread Ellery Newcomer
On 03/24/2010 11:40 PM, Walter Bright wrote: Nick Sabalausky wrote: In D1, is there any reason I should be getting an error on this?: // module A: enum FooA { fooA }; void bar(FooA x) {} // module B: import A; enum FooB { fooB }; void bar(FooB x) {} bar(FooB.fooB); // Error: A.bar conflicts w

Re: Implicit enum conversions are a stupid PITA

2010-03-25 Thread Ellery Newcomer
On 03/25/2010 02:00 PM, Walter Bright wrote: --- a.d --- enum FooA { fooA }; void bar(FooA x) {} --- test.d import a; mixin(` enum FooB { fooB }; void bar(FooB x) {} `); void test() { bar(FooA.fooA); //error bar(FooB.fooB); }

Re: Implicit enum conversions are a stupid PITA

2010-03-25 Thread Ellery Newcomer
On 03/25/2010 01:08 PM, Walter Bright wrote: There are thousands of languages out there. If I did due diligence researching them all, I'd never finish, as new languages get created faster than anyone could ever study them. At some point, you've gotta pick and choose what you're going to look at

Re: Implicit enum conversions are a stupid PITA

2010-03-25 Thread Ellery Newcomer
On 03/25/2010 05:26 PM, Nick Sabalausky wrote: "Walter Bright" wrote in message news:hogmgm$oc...@digitalmars.com... Ellery Newcomer wrote: I guess what I'm trying to say is it doesn't make sense that I can implicitly import FooA, an external symbol, but not bar(FooA)

Re: Implicit enum conversions are a stupid PITA

2010-03-25 Thread Ellery Newcomer
On 03/25/2010 06:21 PM, Walter Bright wrote: Ellery Newcomer wrote: What do you think of Erlang's bit syntax if you've looked at it, or could you if you haven't? I know nothing about it. I suppose you could think of it as sort of a regex-for-generic-data, but you can use

Re: Implicit enum conversions are a stupid PITA

2010-03-26 Thread Ellery Newcomer
On 03/26/2010 02:01 PM, Walter Bright wrote: Walter Bright wrote: I'm not sure why this error is happening, it definitely has something to do with the mixin. Let me look into it some more. Bug report and fix: http://d.puremagic.com/issues/show_bug.cgi?id=4011 Awesome!

data corruption

2010-04-05 Thread Ellery Newcomer
Hey folks, I've got this screwy problem with my old version of dmdz. One of the functions runs through a loop that appends to a string[] about four or five times. When it's chewing through a large amount of source code, maybe 1 call out of 200 the third element of the array gets corrupted jus

Re: opDispatch is grand!

2010-04-10 Thread Ellery Newcomer
On 04/10/2010 05:49 PM, so wrote: struct vector(T, uint N) { auto opDispatch(string s) const { static if(N>0 && ("x"==s || "r"==s)) return v_[0]; static if(N>1 && ("y"==s || "g"==s)) return v_[0]; static if(N>2 && ("z"==s || "b"==s)) return v_[0]; static if(N>3 && ("w"==s || "a"==s)) return v_[0

Re: Patches, bottlenecks, OpenSource

2010-04-10 Thread Ellery Newcomer
On 04/10/2010 07:09 AM, bearophile wrote: Currently ldc is a compiler much better than dmd (try it if you don't believe me!) Bye, bearophile I've tried it several times recently and I don't believe you as a result. I have yet to see it not crash AND generate faster code than dmd.

Re: opDispatch is grand!

2010-04-10 Thread Ellery Newcomer
On 04/10/2010 09:04 PM, BCS wrote: Hello Ellery, I think you might be able to do: ret!(T) opDispatch(string s, T)(T t) { ... } and then switch internally based on T. I don't think so; it looks like dmd rewrites invocations as opDispatch!("x")

Re: Change some keywords and enum manifests?

2010-04-27 Thread Ellery Newcomer
On 04/27/2010 10:32 AM, Aziz K. wrote: Hi, Since we've got the attribute syntax (@identifier), wouldn't it be good to convert certain keywords to use this syntax? E.g.: nothrow -> @nothrow pure -> @pure Bam! Two fewer keywords in the language. :-) One thing about D that appeals to me is the

Re: Clojure Protocols & expression problem

2010-04-28 Thread Ellery Newcomer
On 04/28/2010 01:15 PM, Lutger wrote: retard wrote: Wed, 28 Apr 2010 16:44:07 +, BCS wrote: Hello bearophile, By the way, you can see an example of the expression problem here, Could you elaborate on what exactly the expression problem is? Learning the use of a search engine would

Re: Clojure Protocols & expression problem

2010-04-29 Thread Ellery Newcomer
Walter, you shouldn't be apologizing to retard. These personal attacks are just not acceptable on a public forum and coming from an adult. Instead, I think you should be more like him. On 04/29/2010 03:25 PM, retard wrote: Thu, 29 Apr 2010 10:21:15 -0700, Walter Bright wrote: I'm sorry yo

Re: Improving Compiler Error Messages

2010-05-01 Thread Ellery Newcomer
On 05/01/2010 09:56 PM, Walter Bright wrote: http://www.drdobbs.com/blog/archives/2010/05/improving_compi.html The next dmd update is getting the fruits of this. I've noticed that dmd is a lot more disciplined wrt error messages. Very Nice. (I'd be enjoying this feature more, except dmd is

Re: Improving Compiler Error Messages

2010-05-01 Thread Ellery Newcomer
On 05/01/2010 11:09 PM, Ellery Newcomer wrote: (I'd be enjoying this feature more, except dmd is segfaulting on me for some odd reason) Downs, your ctfe code sucks.

Re: Improving Compiler Error Messages

2010-05-03 Thread Ellery Newcomer
On 05/03/2010 01:47 PM, Walter Bright wrote: bearophile wrote: Walter Bright: This is characterized as "smart" parsing, but I have a less kind word for it - "hack" That feature is handy, computer languages are designed for humans first. Python is now almost twenty years old (appeared in 1991

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-03 Thread Ellery Newcomer
On 05/03/2010 06:24 PM, Bernard Helyer wrote: On 04/05/10 11:01, Andrei Alexandrescu wrote: I think what we need for the standard library is to take a solid XML library licensed generously and adapt it to work with arbitrary ranges. Andrei Care to give an example? I was curious about this

Re: c++ vs lisp -- D perspective

2010-05-04 Thread Ellery Newcomer
On 05/04/2010 03:32 PM, Graham Fawcett wrote: Hi folks, I just read a provocative critique of a blog article comparing C++ to Lisp: http://funcall.blogspot.com/2010/05/c-vs-lisp.html I've enjoyed using Lisp languages in the past, and appreciate that D offers a lot of metaprogramming features t

Re: complement to $

2010-05-17 Thread Ellery Newcomer
On 05/14/2010 08:20 AM, Steven Schveighoffer wrote: Currently, D supports the special symbol $ to mean the end of a container/range. However, there is no analogous symbol to mean "beginning of a container/range". For arrays, there is none necessary, 0 is always the first element. But not all con

Re: complement to $

2010-05-17 Thread Ellery Newcomer
On 05/17/2010 10:15 AM, Steven Schveighoffer wrote: On Mon, 17 May 2010 11:02:05 -0400, Ellery Newcomer wrote: Does your collections library allow for code like coll[coll.begin + 1 .. coll.end] No. begin and end return cursors, which are essentially non-movable pointers. The only

Re: GWT clone

2010-05-22 Thread Ellery Newcomer
On 05/22/2010 01:19 PM, Mathias Laurenz Baumann wrote: Greetings, I want to write a web-library/framework, similar to [1]Webtoolkit or [2]GWT. For that I need to transform a sub portion of D code to javascript. Additionally, I dislike changing the toolchain, which means it has all to happen at t

Re: GWT clone

2010-05-22 Thread Ellery Newcomer
On 05/22/2010 09:15 PM, Mathias Laurenz Baumann wrote: Question: as someone who has never used either of the engines that you reference, do they actually perform impl language -> JS conversions? GWT does that for sure. Interesting. Maybe I'll have a look at it sometime. Do you think I ne

Re: dmd platform support - poll

2008-12-26 Thread Ellery Newcomer
Walter Bright wrote: What platforms for dmd would you be most interested in using? .net jvm mac osx 32 bit intel mac osx 64 bit intel linux 64 bit windows 64 bit freebsd 32 bit netbsd 32 bit other? Was going to say linux 64 bit until someone mentioned game consoles...

Re: Properties

2009-01-07 Thread Ellery Newcomer
BCS wrote: Reply to Vishaal, Properties, such as array.length, should return lvalues to allow: a.length += 8; or other similar statements. I think there is a (long standing) bug report about that one. Maybe if enough people gripe about it it will get fixed! (NOT said sarcastically!) Gri

cannot allocate memory in static TLS block

2014-06-05 Thread Ellery Newcomer via Digitalmars-d
I have a ubuntu 12.04 spin in which I am running dmd hello.d -shared -defaultlib=libphobos2.so -ofhello.so on an empty hello.d. attempting to use it (python) results in Traceback (most recent call last): File "test.py", line 1, in import hello ImportError: /usr/lib/i386-linux-gnu/libphob

Re: Fedora DMD package

2014-06-06 Thread Ellery Newcomer via Digitalmars-d
On Friday, 6 June 2014 at 15:24:20 UTC, Russel Winder via Digitalmars-d wrote: OK, I can perhaps see why glibc-devel, but the rest? And why i686 packages on an x86_64 machine? Thanks. to support -m32, probably

pyd - continuous integration

2014-06-09 Thread Ellery Newcomer via Digitalmars-d
So pyd is at the point where it really needs some sort of test suite runner. It's kind of complicated since I need to test against * multiple versions of dmd/ldc/gdc * multiple versions of python (2.4 - 3.4, but I'm thinking of dropping 2.4 and 2.5 this year) * redhat, ubuntu, osx, windows, e

Re: pyd - continuous integration

2014-06-10 Thread Ellery Newcomer via Digitalmars-d
On Tuesday, 10 June 2014 at 14:39:25 UTC, Atila Neves wrote: If you can spare the time / HW resources, I'd probably go with Vagrant and Buildbot, but then again I would since I'm familiar with both. Atila I stumbled on vagrant a few months ago but haven't had a chance to play with it yet. I

Re: readln for tango with d2?

2014-06-23 Thread Ellery Newcomer via Digitalmars-d
On Monday, 23 June 2014 at 10:52:32 UTC, seany wrote: Doese tango come with a readline fucntion for d2? from this site, i was unable to find anything in my search : http://siegelord.github.io/Tango-D2/ tango.io.Console, maybe?

Re: Future(s) for D.

2015-06-20 Thread Ellery Newcomer via Digitalmars-d
On 06/20/2015 07:00 AM, Etienne wrote: On Saturday, 20 June 2015 at 13:33:34 UTC, Dragos Carp wrote: On Saturday, 20 June 2015 at 12:35:11 UTC, weaselcat wrote: I recently read this facebook post on their future implementation in their Folly library. https://code.facebook.com/posts/16619820973

<    1   2   3   4