Re: OT: What's your favorite codeline?

2009-09-01 Thread Robert Fraser
downs wrote: downs foo.betweens(src=\, \) /select/ (string s) { return s.find(criteria) != -1; } Heh, I love that infix expression syntax. Too abd it ends up with a completely useless wrapper struct 2 function calls, but hopefully LDC can inline that out. downs auto videocon =

Re: D should disallow forward references

2009-08-25 Thread Robert Fraser
Stewart Gordon wrote: Have you written a compiler for a superset of C in which arbitrary forward references are allowed? How did you do with overcoming the difficulty that is C's context-sensitive grammar? C (minus preprocessor, of course) is only context-sensitive with regards to casts

Re: escaping pointer to scope local array: bug or not?

2009-08-19 Thread Robert Fraser
Steven Schveighoffer wrote: It also says that Java 6, a language compiled as I proposed D could be, has escape analysis. Java's escape analysis is done at runtime (during JIT compilation) AFAIK. LDC can compile to bitcode and link-time codegen could be used to deal with escape analysis...

Re: escaping pointer to scope local array: bug or not?

2009-08-18 Thread Robert Fraser
Robert Jacques wrote: ship/sell D libraries in binary format. Does anyone sell static libraries anymore? There are too many problems with static linking for that to be very viable. Most libraries I've seen are sold as DLLs.

Re: std2.xml and std2.encoding for D 1.0 available at D source

2009-08-12 Thread Robert Fraser
On Tue, Aug 11, 2009 at 11:03 PM, Michael Rynnmichaelr...@optushome.com.au wrote: I took away all the safety features of const, immutable and any other things that dmd 1.0 complains about, as recommended for the std2. Well, different people feel differently about these things. IMO, the

Re: Memory allocation problem

2009-08-10 Thread Robert Fraser
bearophile wrote: grauzone: Then what is there to complain? I have paid for 2 GB RAM, so I am allowed to desire a 1800 MB array :-) I agree it's a bug, and probably a rather major one. However in a real use case, any program that needs 1800+ MB arrays should be 64-bit only.

Re: SSE, AVX, and beyond

2009-08-10 Thread Robert Fraser
Eljay wrote: As cent/ucent, should a keyword be reserved for 256? 512? 1024? - - - - - - - - - - - - - - - Most programming languages are loathe to add new keywords, because that has the chance to impact existing code. So the time to add keywords for D 2.0(alpha) is now, since the language

Re: Memory allocation problem

2009-08-09 Thread Robert Fraser
bearophile wrote: I don't think so, I am running a 32 bit GCC on a 32 bit XP operating system. I think the bug is elsewhere (in DMD). Have you tried with DMC?

Re: proposed syntax change

2009-08-06 Thread Robert Fraser
Paul D. Anderson wrote: I was browsing the Python spec yesterday and came across this interesting and useful syntax: / (one slash) means floating point division, e.g. 5/2 = 2.5 even though 5 and 2 are integers // (two slashes) means integer (floor) division, e.g. 5.0//2.0 = 2.0 even though

Re: Contextualizing keywords

2009-08-05 Thread Robert Fraser
Daniel Keep wrote: function-declaration puretrue/pure returnTypeSomeType/returnType namefoo/name parameters/ body comment ... /comment /body /function-declaration Ah, you saw the announcement for Microsoft's new .NET language?

Re: Naming things in Phobos - std.algorithm and writefln

2009-08-05 Thread Robert Fraser
Michel Fortin wrote: As you know, I tried to write some guidelines[1] for naming things in D. Those guidelines looks well at first glance, but then you look at Phobos and you see that half of it use some arbitrary naming rules. Take writefln for instance: following my guidelines (as they are

Re: reddit.com: first Chapter of TDPL available for free

2009-08-03 Thread Robert Fraser
Nick Sabalausky wrote: One little niggle though: At the end of the paragraph that explains the hello world's import statement, it says Repeated imports of the same file are of no import. Sounds like a typo snuck in there. Or a pun ;-P.

Re: property syntax strawman

2009-08-02 Thread Robert Fraser
Walter Bright wrote: Having optional parentheses does lead to unresolvable ambiguities. How much of a problem that really is is debatable, but let's assume it should be resolved. To resolve it, a property must be distinguishable from a regular function. One way is to simply add a property

Contextualizing keywords

2009-08-02 Thread Robert Fraser
Hi, hope you're all enjoying the properties debate. I've been seeing the too many keywords argument a lot lately, and I think it's definitely a valid argument. shared and body in particular are rather annoying keywords since I frequently use them in code. And if users are deciding not to use

Re: Contextualizing keywords

2009-08-02 Thread Robert Fraser
Walter Bright wrote: Chad J wrote: This makes things more difficult for syntax highlighters. A number of them will just not work correctly because they don't actually parse the code. That's true. Another thing keywords provide are anchors that enable better error recovery. Read Herb's

Re: Contextualizing keywords

2009-08-02 Thread Robert Fraser
Oliver Hoog wrote: And requiring try/catch to have braces introduces inconsistency. That was probably a bad idea. However note that D is actually the inconsistency here -- C++, Java, and C# all require the braces.

Re: Contextualizing keywords

2009-08-02 Thread Robert Fraser
Chad J wrote: This makes things more difficult for syntax highlighters. A number of them will just not work correctly because they don't actually parse the code. That's all I've got. Ehhh How often will you actually use the identifiers? The point isn't to make them free for use, it's

Re: Reading bool as the string true or false

2009-08-01 Thread Robert Fraser
Ali Cehreli wrote: If the default behavior for dout.writefln is to print bool values as the true and false strings, then the opposite should be available and arguably be the default: // true and false should be acceptable inputs: bool b; din.readf(b); Am I wrong? Thanks, Ali P.S.

Re: DIP6: Attributes

2009-08-01 Thread Robert Fraser
Tim Matthews wrote: On Sat, 01 Aug 2009 16:29:28 -0300 Ary Borenszweig a...@esperanto.org.ar wrote: http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel/DIPs/DIP6 Are pragmas not already here for this? Nope, they're for compiler-specific extensions

Re: YAPP - yet another properties poll

2009-07-31 Thread Robert Fraser
aarti_pl wrote: Please add another syntax proposals (max. 2 best proposals - with example code) and correct mistakes in questions (if any): I like the C# style: int size { get { return _size; } set { _size = value; } } get, set and value are only keywords within a property

Re: Descent, now with Open Type Hierarchy

2009-07-30 Thread Robert Fraser
BCS wrote: will it find it if I ask out of order? Say, QDL? No... what's the use case there? JDT does have auto-corrections for misspellings of variables, though (I think based on Levishien distance, so it's dictionary-independent)... this might be intersting to add to autocomplete. So if

Re: Some things to fix

2009-07-30 Thread Robert Fraser
Ary Borenszweig wrote: 2. modifiers that don't make sense should be disallowed. There's been wars about this one. IMO, this is a good thing for writing templated/generic code -- if a modifier only makes sense in one instance of a template, all the others should not be marked as errors. I

Re: A simple rule

2009-07-30 Thread Robert Fraser
Walter Bright wrote: Compare your car with a Model T. The T is simple, easily repaired, easily understood. But who wants to drive a T these days compared with driving a modern car? It would be the _ultimate_ pimpmobile.

Re: A simple rule

2009-07-30 Thread Robert Fraser
downs wrote: 1) If it's a word, put it in the standard library. 2) Otherwise, put it in the compiler. for - compiler. foreach - library. But for is a word, while foreach isn't! ;-P

Re: Yet a new properties proposal

2009-07-29 Thread Robert Fraser
Dimitar Kolev wrote: Steven Schveighoffer Wrote: I don't see what advantages this has over other proposals. What is wrong with a.a such that we have to resort to a#a? -Steve People are crying over compilers not know which is a property and which is not. Actually, one of the major

Re: poll for properties

2009-07-28 Thread Robert Fraser
Steven Schveighoffer wrote: ... The number of people taking this seriously worries me.

Re: The empty statement ; - when is it useful?

2009-07-26 Thread Robert Fraser
BCS wrote: for({} false; 42) {} Eww...

Re: Can enum and immutable be unified?

2009-07-25 Thread Robert Fraser
Don wrote: Robert Fraser wrote: Don wrote: Ary Borenszweig wrote: Michiel Helvensteijn escribió: Walter Bright wrote: immutable - data that cannot change or be changed (imagine it is stored in ROM) const - read only view of data, you cannot change it but others can enum

Re: Can enum and immutable be unified?

2009-07-23 Thread Robert Fraser
Don wrote: Ary Borenszweig wrote: Michiel Helvensteijn escribió: Walter Bright wrote: immutable - data that cannot change or be changed (imagine it is stored in ROM) const - read only view of data, you cannot change it but others can enum - compile time constant, has no

Re: (Non) Nesting block comments

2009-07-21 Thread Robert Fraser
Michel Fortin wrote: On 2009-07-21 05:31:13 -0400, Michiel Helvensteijn m.helvensteijn.rem...@gmail.com said: Robert Jacques wrote: Well /* */ are excellent for toggling code sections. I tend to use constructs such as // */ or //* or /*/ which allows me to turn on of off blocks with

Re: stack trace hack for recent Phobos?

2009-07-16 Thread Robert Fraser
Trass3r wrote: Robert Fraser schrieb: Windows or Unix? Currently I only need Windoze, but knowing the linux situation wouldn't be bad either. There's no Windows stack trace that works with the newest Phobos AFAIK, however if you're using D2, you could probably copy Tango's stacktrace

Re: need help convert c code

2009-07-16 Thread Robert Fraser
D. Reeds wrote: can anybody help me translate this c code into d, im using D1+tango combo. i'm new to D and got stucked on multi-dimension array part. int levenshtein_distance(char *s,char*t) //Compute levenshtein distance between s and t { //Step 1 int k,i,j,n,m,cost,*d,distance;

Re: All this talk about finalising D2 makes me worried

2009-07-15 Thread Robert Fraser
Stewart Gordon wrote: With apologies to Bruno Medeiros All this talk about getting D2 finished (and other things like what comes next) makes me worried. People talk as if D2 is nearing completion: there are even threads about the coming or even requesting the release of the finished

Re: C compatibility

2009-07-14 Thread Robert Fraser
BCS wrote: One thing Walter is adement about is that copy-n-paste C code must run correctly (i.e the same) in D or not compile. As for the C style type syntax, I'd be willing to see that go en-total. It's useful if you have a .h that you both include in a C/C++ file and run through a

Re: dmd crashes with out of memory error

2009-07-14 Thread Robert Fraser
File is probably too big. Remember that for every byte in your binary, DMD is likely allocating several hundred for the literal xpression object + codegen for the expression, etc., and frees very little dynamically allocated memory. Trass3r wrote: Here are the files, if you want to try out:

Re: C++0x Concepts - Dead?

2009-07-13 Thread Robert Fraser
Andrei Alexandrescu wrote: Jarrett Billingsley wrote: On Mon, Jul 13, 2009 at 5:59 PM, Andrei Alexandrescuseewebsiteforem...@erdani.org wrote: Jarrett Billingsley wrote: On Mon, Jul 13, 2009 at 5:46 PM, Jarrett Billingsleyjarrett.billings...@gmail.com wrote: On Mon, Jul 13, 2009 at 5:33 PM,

Re: Descent generated documentation

2009-07-10 Thread Robert Fraser
Daniel Keep wrote: But this is quite cool; always nice to have another alternative. :) What are the other alternatives? The interlinks are all but necessary for larger/OO projects.

Re: Descent generated documentation

2009-07-09 Thread Robert Fraser
Ary Borenszweig wrote: phobos: http://downloads.dsource.org/projects/descent/ddoc/phobos/ Tango: http://downloads.dsource.org/projects/descent/ddoc/tango/ *drool* I agree about the source code -- it's probably the main reason the Tango docs are so slow and it's useless 95% of the time.

Re: Regex

2009-07-09 Thread Robert Fraser
BLS wrote: Vladimir Voinkov wrote: std.regex can't be used in compile time function call. It's quite frustrating... see dsource.org .. afaik there is a compile time regex project. hth http://www.dsource.org/projects/scregexp But the generated functions aren't CTFE-compatible AFAIK. A CTFE

Re: The proper case for D.

2009-06-21 Thread Robert Fraser
Walter Bright wrote: Optlink does not discard unreference symbols, it just doesn't pull them in from the library. If it did always pull in everything from the library, then the minimum D executable size will be the size of Phobos. Since that isn't happening, something else is happening with

Re: The proper case for D.

2009-06-21 Thread Robert Fraser
Walter Bright wrote: Robert Fraser wrote: Hmmm... well, I built a 3rd-party library (Platinum UPnP + Neptune) into two static libraries (with VS). I then wrote a C wrapper function around one, just to test out the functionality I needed (a fraction of what was available). Originally, I wanted

Re: The proper case for D.

2009-06-21 Thread robert fraser
Walter Bright Wrote: Robert Fraser wrote: Your explanation sounds likely, however it seems VS is discriminating on the per-symbol level...? Let's say the C++ source file looks like: int foo() { ... } int bar

Re: Ranges

2009-06-19 Thread Robert Fraser
bearophile wrote: (P.S.: Is Walter around still? He's pretty silent lately. Talking when he's not around looks quite academic). He gave a D talk on Wednesday night. I get the feeling the next release is going to be something big.

Re: Ranges

2009-06-18 Thread Robert Fraser
Steve Teale wrote: template isInputRange(R) { enum bool isInputRange = is(typeof( { R r; // can define a range object if (r.empty) {} // can test for empty r.popFront; // can invoke next auto h = r.front; // can get the front of the

Re: Ranges

2009-06-18 Thread robert fraser
grauzone Wrote: Your example doesn't compile right now. The @@@ was meant as an example to be replaced with any code. Yeah, you probably knew that. But if you use a string mixin, the code doesn't even have to be syntactically/lexically valid: is(typeof({ mixin(@@@); })) True -- both

Re: Ranges

2009-06-18 Thread Robert Fraser
bearophile wrote: template isInputRange(R) { enum bool isInputRange = __traits(compiles, { R r; // can define a range object if (r.empty) {} // can test for empty r.popFront; // can invoke next auto h = r.front; // can get the front of the

Re: MiniD 2 - Might as well be done

2009-06-16 Thread Robert Fraser
Jarrett Billingsley wrote: I'm bad at meeting deadlines. Partly because I mismanage my time, but a large part of it is also because being a perfectionist, I never know when to _stop working on something_. After nearly two years in development, I think I'm ready to call MiniD 2 gold.

Re: Andrei writes The Case for D

2009-06-16 Thread Robert Fraser
Tim Matthews wrote: Anders F Björklund wrote: Last but definitely not least, two windowing libraries complete the language's offering quite spectacularly. The mature library DWT is a direct port of Java's SWT. A newer development is that the immensely popular Qt Software windowing library

Re: EnumBaseType conversion

2009-06-16 Thread Robert Fraser
dsimcha wrote: It has bitten me several times when I have a named enum type next to an integer type or something that an integer can be implicitly converted to in a function param list: enum MyEnum { FOO, BAR } Try... typedef int _MyEnum; enum MyEnum : _MyEnum { FOO,

Linking to MinGW-generated library woes

2009-06-15 Thread Robert Fraser
Has anyone been able to successfully link (statically) to a library generated by MinGW? I compiled the libraries in question (FFMpeg avutil, avformat, and avcodec) under MinGW, ran objconv on it to convert it to OMF (no errors) and passed it to optlink along with MinGW's libgcc. At this point

Re: [Issue 3070] New: Implicitly conversion on function call

2009-06-15 Thread Robert Fraser
d-bugm...@puremagic.com wrote: http://d.puremagic.com/issues/show_bug.cgi?id=3070 Summary: Implicitly conversion on function call Product: D Version: 2.030 Platform: x86 OS/Version: Windows Status: NEW Severity: trivial

Automatic translation from .h - .d using nothing but CTFE!

2009-06-12 Thread Robert Fraser
); } /** * Mime on Fire (mime) -- Simple UPnP server for XBOX360 * Copyright (C) 2009 Robert Fraser * * This program is free software; you can redistribute it andor * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2

Re: Automatic translation from .h - .d using nothing but CTFE!

2009-06-12 Thread Robert Fraser
Robert Fraser wrote: [...] BTW, the code is D1+Tango... it shouldn't be overly hard to port, though, since the only part of Tango it uses is tango.sys.SharedLibrary. As for D2, change char[] to string, and all should be good.

Re: runtime vararg can easily be broken

2009-06-12 Thread Robert Fraser
davidl wrote: Also the whole paradigm of coding a runtime vararg func is so troublesome and even much complex compared to the compile time vararg. Maybe we should borrow something from compiletime to aid the runtime vararg programming. Got my vote!

Re: __FUNCTION__ implemented with mixins and mangles

2009-06-12 Thread Robert Fraser
Jarrett Billingsley wrote: It's not foolproof, but I found it useful enough; maybe others will too. // Parsing mangles for fun and profit. char[] _getJustName(char[] mangle) { size_t idx = 1; size_t start = idx; size_t len = 0; while(idx mangle.length mangle[idx] = '0'

Re: D_Version2 problem

2009-06-11 Thread Robert Fraser
David Ferenczi wrote: == Quote from Sergey Gromov (snake.sc...@gmail.com)'s article Sun, 18 Jan 2009 22:28:12 +0100, Hoenir wrote: The D_Version2 version identifier doesn't work properly for me. Tried compiling with dmd 1.039. D_Version2 is set even if I pass -v1 to it. Is this a bug or am I

Re: C#4 Covariance/Contravariance

2009-06-09 Thread Robert Fraser
Lionello Lunesu wrote: bearophile bearophileh...@lycos.com wrote in message news:h0ggl7$60...@digitalmars.com... From the last C#: http://codepad.org/kQgbwAqJ Bye, bearophile Lionello likes this In D if you want to treat a Template!(SomeClass) as a Template!(Object), it's as easy as

Re: C#4 Covariance/Contravariance

2009-06-09 Thread Robert Fraser
bearophile wrote: Robert Fraser: In D if you want to treat a Template!(SomeClass) as a Template!(Object), it's as easy as cast(Template!(Object)) cast(void*) x How is this related to Covariance/Contravariance and in/out keywords, as shown in C#4? Bye, bearophile Errr... isn't

Re: D Wiki

2009-06-09 Thread Robert Fraser
Jarrett Billingsley wrote: On Tue, Jun 9, 2009 at 10:40 AM, Daniel Keepdaniel.keep.li...@gmail.com wrote: I hate in-browser rich text editors; every single one I've ever used sucked massively. For example, when I was posting on Blogger, I had to write every post manually because their rich

Re: LDC predefined identifiers

2009-06-08 Thread Robert Fraser
Robert Clipsham wrote: Dunno if anyone else thinks this, but the operating system looks very confusing with all the LDC only identifiers mixed in. I think it'd be a good idea to find out which of them are deprecated and remove them, eg only keeping one of either solaris or Solaris etc.

Re: Fractal

2009-06-08 Thread Robert Fraser
Frits van Bommel wrote: Fractal wrote: Jarrett Billingsley Wrote: Because those are the three string encodings D supports, and only supporting one is a dumb idea. Why? wchar is full compatible with all languages (if it is not please tell me)... also when I have many strings in different

Re: Fractal

2009-06-08 Thread Robert Fraser
Fractal wrote: Thanks for the correction... then adding a String struct to simplify it? Fractal Why? char[] _is_ a string. wchar[] and dchar[] are basically there for compatibility with libraries that want them. That being said, tango.text.Text is a string struct of a sort, although it's

Re: Creating a dynamic link library

2009-06-08 Thread Robert Fraser
Fractal wrote: Hello Using Windows, I created a DLL with D, and when I try to create my test executable (also with D), the ImpLib program displays an error saying that there is no any exported function. The DLL source only contains a class with the export attribute like: export class Foo {

Re: DMD + nedmalloc?

2009-06-05 Thread Robert Fraser
Brad Roberts wrote: davidl wrote: I will attach a compilable nedmalloc source, corresponding compile batch, and a simple test app. In two post of this thread because of the attachment size limitation of 51k. In the future, please, a website.. or bugzilla, or anything but sending a bunch of

Re: GIS and D

2009-06-05 Thread Robert Fraser
Sjoerd van Leent wrote: User application - An application with custom windows, dialogs and menus to interact with the GIS database(s) There are like 20 of these for D, most of which work reasonably well. I'd recommend DWT, which is cross-platform, and the newest branch is stable on D1+Tango

Re: Operator overloading, structs

2009-06-04 Thread Robert Fraser
BCS wrote: If you can assume that any FPU will be designed to work with IEEE 754 (would that be valid now days?) Not at all! IIRC, some of the PS2's CPUs don't implement NaN or Infinity (just check out the Advanced page of PCSX2, you can set how accurately the various PS2 CPUs FP

Re: Generic Class Alias Syntax

2009-06-04 Thread Robert Fraser
eris wrote: bearophile Wrote: eris: Is there any way to get around including the exclamation point? !(int) tells the template what type is T. Somewhere you have to tell it what type of items you want to put inside it. The alternative is like the old Java, where your collections contain

Re: Garbage collection in D

2009-06-04 Thread Robert Fraser
bearophile wrote: Yes, for such tiny benchmarks I have seen several times 10-12 higher allocation performance in Java compared to D1-DMD. But real programs don't use all their time allocating and freeing memory... Bye, bearophile For the compiler I'm working on now (in D), I wanted to check

Re: [Issue 3050] New: Allow exception in CTFE (patch)

2009-06-04 Thread Robert Fraser
d-bugm...@puremagic.com wrote: http://d.puremagic.com/issues/show_bug.cgi?id=3050 Summary: Allow exception in CTFE (patch) Product: D Version: 2.030 Platform: x86 OS/Version: All Status: NEW Keywords: patch

Re: Functions with package protection

2009-06-03 Thread Robert Fraser
grauzone wrote: Sorry to dig up this old post, but I still don't understand why 'package' functions cannot be virtual? Is there a good reason for this? I can't see why we can't use polymorphism on 'package' functions! Is there way to make it virtual without making it public? (e.g. a

Re: Garbage collection in D

2009-06-03 Thread Robert Fraser
What's the difference between: D 1: 40.20 DMD D 2: 21.83 DMD D 2: 18.80 DMD, struct + scope and: D 1: 8.47 DMD D 2: 7.41 DMD + scope ...?

Re: Garbage collection in D

2009-06-03 Thread Robert Fraser
Sam Hu wrote: bearophile Wrote: I have tried the new JavaVM on Win, that optionally performs escape analysis, and the results are nice: Timings, N=100_000_000, Windows, seconds: D 1: 40.20 DMD D 2: 21.83 DMD D 2: 18.80 DMD, struct + scope C++: 18.06 D 1: 8.47 DMD D 2:

Re: Source control for all dmd source (Git propaganda =)

2009-06-02 Thread Robert Fraser
Vladimir Panteleev wrote: On Tue, 02 Jun 2009 22:29:28 +0300, Jérôme M. Berger jeber...@free.fr wrote: Leandro Lucarella wrote: You have a good command-line support. Maybe you do, but that's not the impression the Git fans here were giving: - Robert Fraser on win32 support: git's

Re: visualization of language benchmarks

2009-06-01 Thread Robert Fraser
Jérôme M. Berger wrote: Nick Sabalausky wrote: Denis Koroskin 2kor...@gmail.com wrote in message news:op.uuthxivwo7c...@soldat.creatstudio.intranet... On Mon, 01 Jun 2009 03:21:42 +0400, Tim Matthews tim.matthe...@gmail.com wrote: Knud Soerensen wrote: Tim Matthews wrote: It's things like

Re: Source control for all dmd source (Git propaganda =)

2009-06-01 Thread Robert Fraser
Jérôme M. Berger wrote: - Here's the same for Mozilla: http://weblogs.mozillazine.org/preed/2007/04/version_control_system_shootou_1.html From the article: While they've made recent progress, Git was lacking in Win32 support and it was unclear that this would ever change and if it did

Re: legal identifier check

2009-05-31 Thread Robert Fraser
BCS wrote: Hello Saaa, You have to write it yourself. Here's a good starting point: http://www.digitalmars.com/d/1.0/lex.html#identifier Yes, that was my starting point and it seemed quite complex, thus my question :) I think I'll stay with my simple check for now as it isn't really

Re: the semi-resident thread pool

2009-05-30 Thread Robert Fraser
zsxxsz wrote: Hi, I written one thread pool in which each thread is semi-resident. The thread-pool is different from the Tango's one. Any thread of the thread-pool will exit when it is idle for the timeout. That is to say, all threads for jobs, and no job no thread. The thread-pool was from my C

Re: Cuda for C++

2009-05-29 Thread Robert Fraser
Trass3r wrote: bearophile schrieb: Thrust is a CUDA library of parallel algorithms with an interface resembling the C++ Standard Template Library (STL). Thrust provides a flexible high-level interface for GPU programming: http://code.google.com/p/thrust/ Something like this (but OpenCL) for

Re: ldc 0.9.1 released

2009-05-28 Thread Robert Fraser
Walter Bright wrote: The D compiler source doesn't use any templates, rtti, or clever macro hacks. Whether it's well designed or not, I'll let others decide. It is written in a D-ish style. I ported part of the DMDFE to Java, and found it quite well-designed (with the exception of the

Re: static this sucks, we should deprecate it

2009-05-28 Thread Robert Fraser
BCS wrote: Hello Steven, On Thu, 28 May 2009 11:39:28 -0400, Matti Niemenmaa see_signat...@for.real.address wrote: Steven Schveighoffer wrote: If we were importing compiled files (or even generated files), then the compiled file could have annotated the static this with the dependencies it

Re: [OT] Convention of Communication

2009-05-28 Thread Robert Fraser
Nick Sabalausky wrote: Frits van Bommel fvbom...@remwovexcapss.nl wrote in message news:gvlsjc$188...@digitalmars.com... Denis Koroskin wrote: FWIW, NNTP (which is used in newsgroups like this) falls into Usenet category: Wikipedia quote

Re: static this sucks, we should deprecate it

2009-05-28 Thread Robert Fraser
Steven Schveighoffer wrote: On Thu, 28 May 2009 08:14:45 -0400, Frank Benoit keinfarb...@googlemail.com wrote: Unknown W. Brackets schrieb: Probably a silly idea, but what about (or similar): static this: mod.name, mod.name2, mod.name3 { } For a dependency list. I may be wrong, but afaik

Re: static this sucks, we should deprecate it

2009-05-28 Thread Robert Fraser
Unknown W. Brackets wrote: Because you've never tried to use data initialized circularly. I wonder what would happen in Java if you did? -[Unknown] Frank Benoit wrote: Unknown W. Brackets schrieb: Probably a silly idea, but what about (or similar): static this: mod.name, mod.name2,

Re: Encoding problems...

2009-05-28 Thread Robert Fraser
grauzone wrote: Robert Fraser wrote: Jarrett Billingsley wrote: On Wed, May 27, 2009 at 8:55 PM, Robert Fraser fraseroftheni...@gmail.com wrote: Hi all, Quick question: I want to use some unicode identifiers, but I get unsupported char 0xe2, both with using and not using a BOM

Re: Encoding problems...

2009-05-28 Thread Robert Fraser
BCS wrote: Reply to Robert, Hmm... I'd say x.⊆(y) is preferable x.isSubsetOf(y), but it's not a huge deal. Only until you have to type it. I think universal alpha includes only the union of things that can be easily typed on standard keyboards. I don't think any keyboard (ok maybe an APL

Re: Encoding problems...

2009-05-27 Thread Robert Fraser
Jarrett Billingsley wrote: On Wed, May 27, 2009 at 8:55 PM, Robert Fraser fraseroftheni...@gmail.com wrote: Hi all, Quick question: I want to use some unicode identifiers, but I get unsupported char 0xe2, both with using and not using a BOM. The characters in question are the superset

[OT] Language design question

2009-05-26 Thread Robert Fraser
Hey all, Without revealing too much I'm currently working on a programming language for a research project (it's implemented in D, of course!). I'm trying to figure out a good syntax for type annotations. I realized that under my current scheme the fun keyword in my language now serves three

Re: [OT] Language design question

2009-05-26 Thread Robert Fraser
Robert Fraser wrote: fun fun $a() lazyApply(fun $a($b) f, $b x) = fun $a() = f(x); And don't forget to take your fun fun (a banger in the mouth if you get the reference :-)).

Re: Taunting

2009-05-22 Thread Robert Fraser
Nick Sabalausky wrote: Saaa em...@needmail.com wrote in message news:gv6qcj$2ck...@digitalmars.com... If I could get that in a super fast, light programming editor, I'd use that instead. But I can't. Wasn't there an effort somewhere to port eclipse to D ? I have no idea, but that does

Re: OT: Flash (Was: Re: Taunting)

2009-05-22 Thread Robert Fraser
Daniel Keep wrote: The only way Flash will die if if at least the following happen: ... 5. Silverlight replaces it (and then we're all doomed).

Re: Descent 0.5.5 released

2009-05-21 Thread Robert Fraser
Saaa wrote: Is the executable name any of bud or bud.exe? I think that's what the process name is for Eclipse, and the links are associated to the process name (not to the name you choose for the external tool). :) May I suggest adjusting the filter to bud*.exe or add a note on dsource as I

Re: why allocation of large amount of small objects so slow (x10) in D?

2009-05-21 Thread Robert Fraser
nobody wrote: $ g++ alloc.cpp -o alloc $ time ./alloc real0m1.946s user0m1.688s sys 0m0.256s $ dmd -O -release allocd.d $ time ./allocd real0m22.734s user0m22.353s sys 0m0.360s $ cat alloc.cpp #include vector typedef std::vectorint intvec; typedef intvec*

Re: why allocation of large amount of small objects so slow (x10) in D?

2009-05-21 Thread Robert Fraser
Robert Fraser wrote: nobody wrote: $ g++ alloc.cpp -o alloc $ time ./alloc real0m1.946s user0m1.688s sys 0m0.256s $ dmd -O -release allocd.d $ time ./allocd real0m22.734s user0m22.353s sys 0m0.360s $ cat alloc.cpp #include vector typedef std::vectorint intvec

Re: Class allocation from tuple

2009-05-21 Thread Robert Fraser
bearophile wrote: I have a tuple of classes (D1 language), I'd like to instantiate one of them directly with new, but it seems I can't: template Tuple(T...) { alias T Tuple; } class Foo { static void foo(){} } class Bar {} alias Tuple!(Foo, Bar) ClassTuple; void main() { alias

Re: the last change for ranges

2009-05-20 Thread Robert Fraser
dsimcha wrote: Also, while we're fine tuning input ranges vs. forward ranges, I think the concept of iterables as a catch-all for ranges, opApply, builtins, etc. needs to be introduced and fine tuned, too. We've shown on this NG previously that, while ranges are usually preferable for the

Re: the last change for ranges

2009-05-20 Thread Robert Fraser
Andrei Alexandrescu wrote: struct R { bool empty(); ref int front(); void popFront(); } ref int popNext(ref R fwdRange) { auto result = fwdRange.front(); fwdRange.popFront; return *result; } void main() { R r; int x = r.popNext; } This should work, I just

Re: any html parser with d binding

2009-05-20 Thread Robert Fraser
reimi gibbons wrote: 2) how reliable is bcd to create binding for c libraries? C? Very reliable (unless it uses weird compiler directives). C++ is a bit trickier.

Re: with still sucks + removing features + adding features

2009-05-19 Thread Robert Fraser
Frank Benoit wrote: Alexander Pánek schrieb: Andrei Alexandrescu wrote: bearophile wrote: Andrei Alexandrescu: Thank you for bringing a real example that gives something to work on. Awful! Well, one of your cases was wrong. Using the +1 at the end one of those cases become: case 'A' ..

Re: with still sucks + removing features + adding features

2009-05-19 Thread Robert Fraser
Andrei Alexandrescu wrote: Let me add one more, although more than sure someone will find a remedy for it, too. a...b vs. a.. .b and of course the beauty ab Oh, and this speaks more about the .b syntax than anything else. Does anyone actually use this...? If it was removed, b could

Re: with still sucks + removing features + adding features

2009-05-19 Thread Robert Fraser
Ary Borenszweig wrote: Oh, and this speaks more about the .b syntax than anything else. Does anyone actually use this...? If it was removed, b could still be accessed by its fully-qualified name, so its' removal not a huge loss. But that will make porting C code harder Guess who'll say that.

  1   2   3   >