Re: Early std.crypto

2011-11-25 Thread bcs
On 11/22/2011 08:16 AM, Piotr Szturmaj wrote: bcs wrote: How many people in the D community have the experience and know-how to review the security of an implementation? If there are less than 2 or 3 people who can do that, can we afford to include native kernels? We can't have just one and if

Re: D Parser in D

2011-11-25 Thread Bernard Helyer
On Sat, 26 Nov 2011 07:58:19 +1300, NMS wrote: Is there a D parser written in D? - C strings kill me. Thanks, NMS SDC[1] has one, but it's being lazy loaded in -- that is, it's not complete. [1]:http://github.com/bhelyer/SDC

Re: Discussion on D support in gdb

2011-11-25 Thread Jerry
Walter Bright writes: > On 11/22/2011 7:19 AM, Martin Nowak wrote: >> - Can we slowly start to acquire DWARF-3/4? > > Dwarf 2 is good enough, so why do 3/4? > >> - Why were extensions chosen over say representing an array as two field >> struct? > > Because it is presumably harder to get a debug

Re: Discussion on D support in gdb

2011-11-25 Thread Jerry
"Martin Nowak" writes: > On Tue, 22 Nov 2011 04:18:47 +0100, Andrei Alexandrescu > wrote: > >> Maybe someone knowledgeable could chime in: >> >> http://sourceware.org/ml/gdb/2011-11/msg00066.html >> >> >> >> Andrei > > I think we should follow Tom Tromney's proposal to add the extensions > under

Re: Website message overhaul, pass 2

2011-11-25 Thread Jerry
Andrei Alexandrescu writes: > On 11/20/11 7:09 AM, Robert Clipsham wrote: >> - The code sample at the top is terrible, the equivalent C is only a >> couple of lines longer and it doesn't show off any of what makes D >> better! Admittedly you're limited in what you can do here as the code >> needs

Re: Open MPI with D

2011-11-25 Thread Andrei Alexandrescu
On 11/25/11 11:30 AM, Max Samukha wrote: On 11/25/2011 06:52 PM, Andrei Alexandrescu wrote: As I wrote, on OSX the definitions do link so they exist. Andrei Are you defining the variables or referencing them? extern(C) int x; means definition and of course it will link because it is you who

D Parser in D

2011-11-25 Thread NMS
Is there a D parser written in D? - C strings kill me. Thanks, NMS

Re: using C++ classes from D

2011-11-25 Thread Martin Nowak
On Fri, 25 Nov 2011 08:22:34 +0100, Martin Nowak wrote: After going astray while doing C++ class bindings using smart_ptrs and ugly mixins I think I found a really neat way. It consists of a C++ header that defines a d_new template function. It will allocate it's types from the D GC while hoo

Prestate in Ada 2012

2011-11-25 Thread bearophile
There are several changes in Ada 2012, among them there is the introduction of Contract Programming, and one of its sub-features is the Old (prestate): http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai05s/ai05-0145-2.txt?rev=1.8 A general short introduction to the differences of Ada 2012: http://www

Re: Open MPI with D

2011-11-25 Thread Andrej Mitrovic
There's an edge-case here to be aware of, if you don't reference the symbol there won't be linker errors (at least with optlink, and this makes sense when you think about it): // no linker errors extern extern(C) int x; void main() { } // linker errors extern extern(C) int x; void main() { int z

Re: [std.database]

2011-11-25 Thread Kagamin
Steve Teale Wrote: > So one question is where should such implementations go? github? > Another questions relates to the definition of interfaces at module > level. We have interfaces that go hand-in-hand with classes built in > to the language. But if I wanted to say that two sql interface modu

Re: Open MPI with D

2011-11-25 Thread Max Samukha
On 11/25/2011 06:52 PM, Andrei Alexandrescu wrote: As I wrote, on OSX the definitions do link so they exist. Andrei Are you defining the variables or referencing them? extern(C) int x; means definition and of course it will link because it is you who defines the variable. extern extern(C)

Re: TDPL & D today?

2011-11-25 Thread Gour
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 25 Nov 2011 09:38:03 -0600 Jude Young <10equa...@gmail.com> wrote: > Please, learn the language as you go! OK. > And post random questions to D.learn that make you look like an idiot. Will do! > That's how REAL men learn a language! Thank

Re: Open MPI with D

2011-11-25 Thread Andrei Alexandrescu
On 11/25/11 10:00 AM, Max Samukha wrote: On 11/25/2011 05:27 PM, Andrei Alexandrescu wrote: On 11/25/11 8:55 AM, Max Samukha wrote: __gshared extern extern(C) int __argc; That doesn't link. Andrei It links correctly on windows for me and linux doesn't have the variables defined. Are you su

Re: TDPL & D today?

2011-11-25 Thread Gour
On Fri, 25 Nov 2011 09:28:27 -0600 Andrei Alexandrescu wrote: > Close and getting closer. So, some things are not implemented (yet), but no obsolete ones? > Here's the errata: > http://erdani.com/tdpl/errata/ Thank you. Sincerely, Gour -- When your intelligence has passed out of the dense

Re: Open MPI with D

2011-11-25 Thread Jacob Carlborg
On 2011-11-25 13:27, Andrei Alexandrescu wrote: On 11/25/11 2:13 AM, Jude Young wrote: Is there an easy way to turn D style (string[] args) into C style? Hm, I expected this would work: extern(C) int __argc; extern(C) char** __argv; The symbols do exist at least on OSX (no linker error) but

Re: Open MPI with D

2011-11-25 Thread Max Samukha
On 11/25/2011 05:27 PM, Andrei Alexandrescu wrote: On 11/25/11 8:55 AM, Max Samukha wrote: __gshared extern extern(C) int __argc; That doesn't link. Andrei It links correctly on windows for me and linux doesn't have the variables defined. Are you sure they are not windows-specific?

Re: TDPL & D today?

2011-11-25 Thread Jude Young
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/25/2011 09:17 AM, Gour wrote: > Hello! > > In order to be able to help in any way build D's ecosystem, I have > to learn the language. :-) > > Picked my TDPL copy from the shelf yesterday, went through the 1st > chapter, but wonder how does TD

Re: TDPL & D today?

2011-11-25 Thread Andrei Alexandrescu
On 11/25/11 9:17 AM, Gour wrote: Hello! In order to be able to help in any way build D's ecosystem, I have to learn the language. :-) Picked my TDPL copy from the shelf yesterday, went through the 1st chapter, but wonder how does TDPL stand in comparison with today's D (before jumping further)?

Re: Open MPI with D

2011-11-25 Thread Andrei Alexandrescu
On 11/25/11 8:55 AM, Max Samukha wrote: __gshared extern extern(C) int __argc; That doesn't link. Andrei

Re: Open MPI with D

2011-11-25 Thread Jude Young
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/25/2011 09:15 AM, Martin Nowak wrote: > On Fri, 25 Nov 2011 15:55:15 +0100, Max Samukha > wrote: > >> On 11/25/2011 02:27 PM, Andrei Alexandrescu wrote: >>> On 11/25/11 2:13 AM, Jude Young wrote: Is there an easy way to turn D style (strin

TDPL & D today?

2011-11-25 Thread Gour
Hello! In order to be able to help in any way build D's ecosystem, I have to learn the language. :-) Picked my TDPL copy from the shelf yesterday, went through the 1st chapter, but wonder how does TDPL stand in comparison with today's D (before jumping further)? Sincerely, Gour -- In the mat

Re: Open MPI with D

2011-11-25 Thread Martin Nowak
On Fri, 25 Nov 2011 15:55:15 +0100, Max Samukha wrote: On 11/25/2011 02:27 PM, Andrei Alexandrescu wrote: On 11/25/11 2:13 AM, Jude Young wrote: Is there an easy way to turn D style (string[] args) into C style? Hm, I expected this would work: extern(C) int __argc; extern(C) char** __argv;

Re: Open MPI with D

2011-11-25 Thread Max Samukha
On 11/25/2011 02:27 PM, Andrei Alexandrescu wrote: On 11/25/11 2:13 AM, Jude Young wrote: Is there an easy way to turn D style (string[] args) into C style? Hm, I expected this would work: extern(C) int __argc; extern(C) char** __argv; The symbols do exist at least on OSX (no linker error) b

Re: Open MPI with D

2011-11-25 Thread Jude Young
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/25/2011 06:27 AM, Andrei Alexandrescu wrote: > On 11/25/11 2:13 AM, Jude Young wrote: >> Is there an easy way to turn D style (string[] args) into C >> style? > > Hm, I expected this would work: > > extern(C) int __argc; extern(C) char** __argv

Re: Open MPI with D

2011-11-25 Thread Andrei Alexandrescu
On 11/25/11 2:13 AM, Jude Young wrote: Is there an easy way to turn D style (string[] args) into C style? Hm, I expected this would work: extern(C) int __argc; extern(C) char** __argv; The symbols do exist at least on OSX (no linker error) but they are both zero, so apparently druntime doesn

Re: moving wxd to github

2011-11-25 Thread Anders F Björklund
Gour wrote: So don't generate code, use XRC resources instead ? wxD can use XRC files? It would be great, then we can use some of the builders like DialogBlocks/wxForms... See the "Xrc" demo in Samples, for some example code. http://docs.wxwidgets.org/stable/wx_xrcoverview.html --anders

Re: moving wxd to github

2011-11-25 Thread Gour
On Fri, 25 Nov 2011 11:24:02 +0100 Anders F Björklund wrote: > Drop D1, drop Tango, and make DMD the default compiler syntax > (possibly using gdmd or ldmd behind the covers, where desired) +1 > It would just generate a Makefile anyway ? But if it could > generate the IDE projects, then maybe i

Re: moving wxd to github

2011-11-25 Thread Gour
On Fri, 25 Nov 2011 08:51:19 +0100 Andrej Mitrovic wrote: > On 11/25/11, Gour wrote: > > Huh, does it fall in the category of 'language bindings' ? :-) > > Or maybe I didn't get the joke? Hehe ;) Sincerely, Gour -- As the embodied soul continuously passes, in this body, from boyhood to y

Re: moving wxd to github

2011-11-25 Thread Gour
On Fri, 25 Nov 2011 11:07:45 +0100 Anders F Björklund wrote: > So don't generate code, use XRC resources instead ? wxD can use XRC files? It would be great, then we can use some of the builders like DialogBlocks/wxForms... Sincerely, Gour -- One who restrains his senses, keeping them under

Re: moving wxd to github

2011-11-25 Thread Anders F Björklund
Gour wrote: And pick one "make" (GNU). That's not fully clear to me. Instead of doing separate GNUmakefile and Makefile, and synching those ? There was even a build.brf and dsss.conf, while those were in fashion... Trying to support two languages, two libraries, two+ compilers, two+ buildt

Re: moving wxd to github

2011-11-25 Thread Andrej Mitrovic
On 11/25/11, Anders F Björklund wrote: > Andrej Mitrovic wrote: >> Well the cool thing is I can use wxGlide to generate C++ code, and >> convert that to D. I tried it just now and it seems to work, but >> converting everything by hand is a bit of a chore. > > So don't generate code, use XRC resour

Re: moving wxd to github

2011-11-25 Thread Anders F Björklund
Andrej Mitrovic wrote: Well the cool thing is I can use wxGlide to generate C++ code, and convert that to D. I tried it just now and it seems to work, but converting everything by hand is a bit of a chore. So don't generate code, use XRC resources instead ? However even though D is C++ inspir

Re: moving wxd to github

2011-11-25 Thread Anders F Björklund
Walter Bright wrote: Now that DMD has broken the ABI on x86_64, ?? ... compared with GDC, that was. Think we discussed this earlier, it's about the passing of structs as parameters compared with C++. The code is passing a D "string" to the C++ side, and then interpreting this C argument as

Re: Open MPI with D

2011-11-25 Thread Jude Young
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 also more success!! //This wouldn't work before... - -- time (mpirun -np 5 -v hello_d) Hello, world, I am 1 of 5 Hello, world, I am 4 of 5 Hello, world, I am 2 of 5 Hello, world, I am 5 of 5 Hello, world, I am 3 of 5 r

Re: Open MPI with D

2011-11-25 Thread Jude Young
On Fri 25 Nov 2011 03:12:34 AM CST, bearophile wrote: > Jude Young: > >> Is there an easy way to turn D style (string[] args) into C style? > > Maybe something like this (not tested)? > const int argc = args.length; > const char** argv = array(map!toStringz(args)).ptr; > > Bye, > bearophile > ...w

Re: Open MPI with D

2011-11-25 Thread Andrej Mitrovic
Also, execve/execvpe passes the environment as well. It should be cross-platform if I'm not mistaken.

Re: Open MPI with D

2011-11-25 Thread Andrej Mitrovic
Taken with modifications from std.process.execv: import core.stdc.stdlib; import std.string; import std.stdio; import std.conv; const(char)** argsToC(in string[] argv) { auto _argv = cast(const(char)**)malloc((char*).sizeof * (1 + argv.length)); toAStringz(argv, _argv); return _argv;

Re: Open MPI with D

2011-11-25 Thread Jacob Carlborg
On 2011-11-25 09:13, Jude Young wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ok, so I finally got mpi.h to compile and link with D. A few problems are left to fix, like the fact that I didn't realize that OpenMPI does not care about the types, unless you are building it... Anyways appl

Re: Open MPI with D

2011-11-25 Thread bearophile
Jude Young: > Is there an easy way to turn D style (string[] args) into C style? Maybe something like this (not tested)? const int argc = args.length; const char** argv = array(map!toStringz(args)).ptr; Bye, bearophile

Re: [std.database]

2011-11-25 Thread Steve Teale
As in the initial discussions on database interfaces, I am still of the view that such support should be provided at three levels. I also suggest that we adopt a proposal that was hinted at in the initial discussions, and think in the longer term of having components that are devoted to SQL, and th

Re: SQL/database server capabilities

2011-11-25 Thread Steve Teale
On Thu, 24 Nov 2011 13:09:41 -0500, Kagamin wrote: > > It seems this has no connection to columns whatsoever. Whatever data you > receive from server, it's type is encoded in the received data packet. > One may want to match types exactly or do sensible conversions like > round a float to int or p

Re: SQL/database server capabilities

2011-11-25 Thread Steve Teale
Sean, I accidentally deleted your post, and in Pan I don't know how to get it back. Yes, most of the API's support that nominal capability, but what they tell you may not be what you expect, especially with ODBC. Steve

Open MPI with D

2011-11-25 Thread Jude Young
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ok, so I finally got mpi.h to compile and link with D. A few problems are left to fix, like the fact that I didn't realize that OpenMPI does not care about the types, unless you are building it... Anyways applied a temp fix and got the first program