Re: literate programming in D

2014-08-29 Thread Chris Cain via Digitalmars-d-learn
On Tuesday, 26 August 2014 at 14:55:08 UTC, nikki wrote: I've been googling without luck, is there a way to do literate programming in D?, similar to how it's done in Coffeescript ? http://www.coffeescriptlove.com/2013/02/literate-coffeescript.html basically me writing comments around code and

Re: literate programming in D

2014-08-29 Thread nikki via Digitalmars-d-learn
On Friday, 29 August 2014 at 23:41:00 UTC, bearophile wrote: nikki: Are you going to add popups of the types as in the F# page I have linked? Bye, bearophile Now then you could remove the sortof from that sexy

Re: literate programming in D

2014-08-29 Thread bearophile via Digitalmars-d-learn
nikki: I use it to change my d sourcefile slightly (into valid markdown) then I use a node module (ghmd) to make sortof sexy html from that. Are you going to add popups of the types as in the F# page I have linked? Bye, bearophile

Re: literate programming in D

2014-08-29 Thread nikki via Digitalmars-d-learn
I wasn't too happy about it and I wrote my own little parse thingie and have a literate version nice and meta and small and sloppy ;) http://nikkikoole.github.io/docs/dokidokDOC.html I use it to change my d sourcefile slightly (into valid markdown) then I use a node module (ghmd) to make sorto

tried to use wstring in my terminal and see what happened.

2014-08-29 Thread Cassio Butrico via Digitalmars-d-learn
Anyone help me... I am using the version for the windows dmd v 2.066 to last I believe. tried to use wstring in my terminal and see what happened. wstring name; write("wstring - write a name: "); //readf("%s\n", &name); name = cast(wstring)chomp(readln()); //name = to!wstr

Re: Building library

2014-08-29 Thread papaboo via Digitalmars-d-learn
On Friday, 29 August 2014 at 09:02:05 UTC, yazd wrote: On Thursday, 28 August 2014 at 19:29:40 UTC, papaboo wrote: Hey I've just started getting into D and so far I'm just messing around with it in a small math library. However I've run into an issue while trying to build a library and linking

Re: DMD Compiler - lexer

2014-08-29 Thread Ary Borenszweig via Digitalmars-d-learn
On 8/29/14, 10:41 AM, Mike James wrote: Hi, Looking at the DMD Source Guide it says "The lexer transforms the file into an array of tokens." Why is this step taken instead of, say, just calling a function that returns the next token (or however many required for the look-ahead)? Regards, -=

Re: Strange segfault (Derelict/OpenGL)

2014-08-29 Thread Mike Parker via Digitalmars-d-learn
On 8/29/2014 9:16 PM, Robin Schroer wrote: On Friday, 29 August 2014 at 11:51:47 UTC, Marc Schütz wrote: display.Display.render() is what tries to render the triangle using a glBegin-block. Some code would be helpful. My first thought is that you aren't loading properly. DerelictGL3 does no

Re: Strange segfault (Derelict/OpenGL)

2014-08-29 Thread Mike Parker via Digitalmars-d-learn
On 8/29/2014 8:23 PM, Robin Schroer wrote: I'm not entirely sure where to post, so I will put it here. I'm playing around with D and Derelict 3 to make something with OpenGL As the README in Derelict 3 points out, that project is no longer updated. You should be using the binding from the Der

Re: sdlang-d can not link after updating to dmd 2.066

2014-08-29 Thread Uranuz via Digitalmars-d-learn
On Thursday, 28 August 2014 at 10:16:15 UTC, Puming wrote: I updated dub to 0.9.22 and still got the same error... THis is the output of `dub build --force`: --- output --- ## Warning for package sdlang-d ## The following compiler flags have been specified in the package description file. Th

Re: Both shared & local classes, method selection

2014-08-29 Thread Dicebot via Digitalmars-d-learn
On Friday, 29 August 2014 at 14:16:51 UTC, Etienne wrote: On 2014-08-29 9:39 AM, Dicebot wrote: based on shared qualified I'd call it a smart ass one and never accepted it through code review :) Such things really need to be explicit, magic is worst enemy of multi-threading The other option

Re: Both shared & local classes, method selection

2014-08-29 Thread Etienne via Digitalmars-d-learn
On 2014-08-29 9:39 AM, Dicebot wrote: based on shared qualified I'd call it a smart ass one and never accepted it through code review :) Such things really need to be explicit, magic is worst enemy of multi-threading The other option is to keep `__gshared ThreadSlot[Thread] gs_signals;` member

Re: DMD Compiler - lexer

2014-08-29 Thread ketmar via Digitalmars-d-learn
On Fri, 29 Aug 2014 13:41:20 + Mike James via Digitalmars-d-learn wrote: > Looking at the DMD Source Guide it says "The lexer transforms the > file into an array of tokens." > > Why is this step taken instead of, say, just calling a function > that returns the next token (or however many r

DMD Compiler - lexer

2014-08-29 Thread Mike James via Digitalmars-d-learn
Hi, Looking at the DMD Source Guide it says "The lexer transforms the file into an array of tokens." Why is this step taken instead of, say, just calling a function that returns the next token (or however many required for the look-ahead)? Regards, -=mike=-

Re: Both shared & local classes, method selection

2014-08-29 Thread Dicebot via Digitalmars-d-learn
http://dpaste.dzfl.pl/2a17662ce5b0 Doing completely separate implementation based on sharedness may be a bit more tricky. std.typecons.Proxy comes to my mind immediately but it does not allow proxying two objects with same method names. At the same time it does not sound like a good idea to

Re: Strange segfault (Derelict/OpenGL)

2014-08-29 Thread Andrej Mitrovic via Digitalmars-d-learn
On 8/29/14, Robin Schroer via Digitalmars-d-learn wrote: > I definitely reload after setting the context and before trying > to render. Typically these kinds of errors happen when a null function pointer is called. I'd add a few checks in some places to see what might have been left uninitialized

Re: Strange segfault (Derelict/OpenGL)

2014-08-29 Thread Robin Schroer via Digitalmars-d-learn
On Friday, 29 August 2014 at 12:41:38 UTC, ponce wrote: On Friday, 29 August 2014 at 11:23:34 UTC, Robin Schroer wrote: I'm not entirely sure where to post, so I will put it here. I'm playing around with D and Derelict 3 to make something with OpenGL (don't really know what yet). I managed to

Re: Strange segfault (Derelict/OpenGL)

2014-08-29 Thread ponce via Digitalmars-d-learn
On Friday, 29 August 2014 at 11:23:34 UTC, Robin Schroer wrote: I'm not entirely sure where to post, so I will put it here. I'm playing around with D and Derelict 3 to make something with OpenGL (don't really know what yet). I managed to open a window, add an OpenGL context, clear the screen a

Re: Strange segfault (Derelict/OpenGL)

2014-08-29 Thread Robin Schroer via Digitalmars-d-learn
On Friday, 29 August 2014 at 11:51:47 UTC, Marc Schütz wrote: On Friday, 29 August 2014 at 11:23:34 UTC, Robin Schroer wrote: Upon running with gdb, I get: Program received signal SIGSEGV, Segmentation fault. 0x in ?? () which is not really helpful to me. Can you still try to

Re: Strange segfault (Derelict/OpenGL)

2014-08-29 Thread via Digitalmars-d-learn
On Friday, 29 August 2014 at 11:23:34 UTC, Robin Schroer wrote: I'm not entirely sure where to post, so I will put it here. This is the right place. I'm playing around with D and Derelict 3 to make something with OpenGL (don't really know what yet). I managed to open a window, add an OpenG

Re: Strange segfault (Derelict/OpenGL)

2014-08-29 Thread John Colvin via Digitalmars-d-learn
On Friday, 29 August 2014 at 11:23:34 UTC, Robin Schroer wrote: I'm not entirely sure where to post, so I will put it here. I'm playing around with D and Derelict 3 to make something with OpenGL (don't really know what yet). I managed to open a window, add an OpenGL context, clear the screen a

Both shared & local classes, method selection

2014-08-29 Thread Etienne via Digitalmars-d-learn
Hey, I'm trying to build a driver for my native event implementation in vibe (https://github.com/etcimon/event.d/ and https://github.com/etcimon/vibe.d/blob/native-events/source/vibe/core/drivers/native.d) I currently have 2 ways of signaling an event loop to wake up, the AsyncNotifier (even

Strange segfault (Derelict/OpenGL)

2014-08-29 Thread Robin Schroer via Digitalmars-d-learn
I'm not entirely sure where to post, so I will put it here. I'm playing around with D and Derelict 3 to make something with OpenGL (don't really know what yet). I managed to open a window, add an OpenGL context, clear the screen and flip buffers. But as soon as I try to render a triangle, my p

Re: Building library

2014-08-29 Thread yazd via Digitalmars-d-learn
On Thursday, 28 August 2014 at 19:29:40 UTC, papaboo wrote: Hey I've just started getting into D and so far I'm just messing around with it in a small math library. However I've run into an issue while trying to build a library and linking it with my main file. My current file and module layout