Re: Evaluation order of index expressions

2015-05-27 Thread deadalnix via Digitalmars-d
On Tuesday, 26 May 2015 at 22:54:55 UTC, Timon Gehr wrote: On 05/26/2015 07:48 PM, deadalnix wrote: On Tuesday, 26 May 2015 at 12:51:20 UTC, Timon Gehr wrote: I guess overloaded operators could be made to cache the old value. (As they do in CTFE, apparently. :o)) However, this seems like over

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Kagamin via Digitalmars-d
On Wednesday, 27 May 2015 at 06:54:56 UTC, Jacob Carlborg wrote: I'm not sure how this is different for DIP50. I can see the obvious differences in the syntax how to declare a macro and so on. But otherwise they look very similar. I believe 78 allows a simpler implementation and requires less

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Kagamin via Digitalmars-d
On Tuesday, 26 May 2015 at 23:47:41 UTC, Dennis Ritchie wrote: If this proposal is considered, it is required to propose to look at the implementation of macros in Nemerle. Many believe that it is in Nemerle macros implemented the most successful compared to other modern languages. Of course, th

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Tuesday, 26 May 2015 at 21:22:38 UTC, Per Nordlöw wrote: No, DMD cannot currently handle scope on foreach elements. It errors as Error: basic type expected, not scope Quite possible, didn't test it. Anyway, my point was that it simply isn't necessary to ever mark a local variable as

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Wednesday, 27 May 2015 at 08:30:33 UTC, Marc Schütz wrote: See above. Conceptually, you can of course treat it as if it were marked with `scope`, but an actual annotation should not be necessary. But now you're talking about an upcoming feature in DMD, right? AFAIK, in current DMD, I can't

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Wednesday, 27 May 2015 at 08:38:48 UTC, Per Nordlöw wrote: AFAIK, in current DMD, I can't get any help in avoiding patterns such as char[] saved_line; foreach (line; File("foo.txt").byLine) { saved_line = line; // should give error } If I understand you correctly, a

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 27 May 2015 at 08:14:36 UTC, Kagamin wrote: The problem with declarative macro system is that you would need to learn yet another language. Possibly turing-complete. And a declarative turing-complete language is an overkill both for usage and implementation. Imperative macros get

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Kagamin via Digitalmars-d
On Wednesday, 27 May 2015 at 09:31:33 UTC, Dennis Ritchie wrote: Is not it possible to combine in the desired degree of declarative macros with imperative languages? The point is to streamline ast creation. I think, helper methods can be provided by phobos in, say, std.macros to simplify ast

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Wednesday, 27 May 2015 at 08:38:48 UTC, Per Nordlöw wrote: On Wednesday, 27 May 2015 at 08:30:33 UTC, Marc Schütz wrote: See above. Conceptually, you can of course treat it as if it were marked with `scope`, but an actual annotation should not be necessary. But now you're talking about an

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Wednesday, 27 May 2015 at 08:43:07 UTC, Per Nordlöw wrote: On Wednesday, 27 May 2015 at 08:38:48 UTC, Per Nordlöw wrote: AFAIK, in current DMD, I can't get any help in avoiding patterns such as char[] saved_line; foreach (line; File("foo.txt").byLine) { saved_line = line; //

Re: Uphill

2015-05-27 Thread Chris via Digitalmars-d
On Tuesday, 26 May 2015 at 17:13:18 UTC, ketmar wrote: On Tue, 26 May 2015 10:07:08 +, Chris wrote: With Go I have the sinking feeling that it won't be able to contend with C++ - or D for that matter. It took off due to Google and a fool-proof, easy-to-use infrastructure. But it is way too

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 27 May 2015 at 09:40:35 UTC, Kagamin wrote: The point is to streamline ast creation. I think, helper methods can be provided by phobos in, say, std.macros to simplify ast creation for common constructs. Well, in a way libraries are a form of DSL... std.macros it may, this is the

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread ZombineDev via Digitalmars-d
On Tuesday, 26 May 2015 at 20:23:11 UTC, Kagamin wrote: http://wiki.dlang.org/DIP78 - Proposal for a macro system without syntactical extensions to the language. Hence it doesn't allow arbitrary syntax. I really like how powerful and easy to use are AST macros in nim. IMO, if D gets such, it

DConf 2015 Livestreaming?

2015-05-27 Thread via Digitalmars-d
Isn't there any live-streaming of DConf this year?

Re: DConf 2015 Livestreaming?

2015-05-27 Thread Liam McSherry via Digitalmars-d
On Wednesday, 27 May 2015 at 10:20:04 UTC, Per Nordlöw wrote: Isn't there any live-streaming of DConf this year? Unfortunately, there doesn't seem to be any streaming this year: http://forum.dlang.org/thread/zpwxvgiaigdbweach...@forum.dlang.org

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Wednesday, 27 May 2015 at 09:54:33 UTC, Marc Schütz wrote: Yes. First of all, `File.byLine.front` is the function that needs to get annotated, like this: char[] front() return { // ... return buffer; } The `return` keyword here means the same thing as in DIP25, Is

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Wednesday, 27 May 2015 at 10:53:48 UTC, Per Nordlöw wrote: On Wednesday, 27 May 2015 at 09:54:33 UTC, Marc Schütz wrote: Yes. First of all, `File.byLine.front` is the function that needs to get annotated, like this: char[] front() return { // ... return buffer; } The `r

Re: Expanding asm.dlang.org

2015-05-27 Thread Mike via Digitalmars-d
I've updated explore.dgnu.org with gdc-4.9, along with ARM and ARMHF variants. ARM supports -mthumb code generation. http://goo.gl/NmdnU1 Iain I added a few platform flags and compared the output with my cross-compiler. They look identical. This is great! Thanks!

Re: Expanding asm.dlang.org

2015-05-27 Thread Vladimir Panteleev via Digitalmars-d
On Monday, 25 May 2015 at 16:45:26 UTC, Andrei Alexandrescu wrote: On 5/25/15 7:36 AM, Iain Buclaw via Digitalmars-d wrote: I can add any cross compilers hosted on gdcproject.org . You'd need to go through Godbolt to get it on his host. asm.dlang.org

Re: Expanding asm.dlang.org

2015-05-27 Thread Iain Buclaw via Digitalmars-d
On 27 May 2015 13:25, "Mike via Digitalmars-d" wrote: >> >> >> I've updated explore.dgnu.org with gdc-4.9, along with ARM and ARMHF >> variants. ARM supports -mthumb code generation. http://goo.gl/NmdnU1 >> >> Iain > > > I added a few platform flags and compared the output with my cross-compiler.

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-27 10:06, Kagamin wrote: I believe 78 allows a simpler implementation and requires less changes to the language, though I'm not sure if frontend can get it done on a purely semantical level: similar techniques like mixins and static if rely on syntax. DIP50 would require a minimal a

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 27 May 2015 at 11:53:00 UTC, Jacob Carlborg wrote: I have thought of that too. But I haven't been able to come up with a syntax that looks good and doesn't conflict with any existing syntax/symbol. The above syntax is already used for template instantiation. What if use the symb

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Kagamin via Digitalmars-d
On Wednesday, 27 May 2015 at 11:53:00 UTC, Jacob Carlborg wrote: DIP50 would require a minimal amount of syntax change, the only thing is prefixing a function with the "macro" keyword. DIP78 on the other hand, it's not so easy to see that a function declaration is actual a macro declaration.

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Daniel Kozák via Digitalmars-d
On Wed, 27 May 2015 12:07:09 + Dennis Ritchie via Digitalmars-d wrote: > On Wednesday, 27 May 2015 at 11:53:00 UTC, Jacob Carlborg wrote: > > I have thought of that too. But I haven't been able to come up > > with a syntax that looks good and doesn't conflict with any > > existing syntax/s

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread ixid via Digitalmars-d
On Wednesday, 27 May 2015 at 12:34:49 UTC, Daniel Kozák wrote: On Wed, 27 May 2015 12:07:09 + Dennis Ritchie via Digitalmars-d wrote: On Wednesday, 27 May 2015 at 11:53:00 UTC, Jacob Carlborg wrote: > I have thought of that too. But I haven't been able to come > up with a syntax that l

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Kagamin via Digitalmars-d
On Wednesday, 27 May 2015 at 12:34:49 UTC, Daniel Kozák wrote: What if use the symbol '#' ? Yep, I like this symbol for macro too. https://issues.dlang.org/show_bug.cgi?id=2660

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 27 May 2015 at 12:37:51 UTC, Kagamin wrote: On Wednesday, 27 May 2015 at 12:34:49 UTC, Daniel Kozák wrote: What if use the symbol '#' ? Yep, I like this symbol for macro too. https://issues.dlang.org/show_bug.cgi?id=2660 OK. This symbol is already used in a wrong place :) ht

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 27 May 2015 at 12:55:05 UTC, Dennis Ritchie wrote: Or apostrophes, too, somewhere involved in the D? Similarly, this option is no longer, as is used as: char c = 'c'; Though...

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Meta via Digitalmars-d
On Wednesday, 27 May 2015 at 12:55:05 UTC, Dennis Ritchie wrote: On Wednesday, 27 May 2015 at 12:37:51 UTC, Kagamin wrote: On Wednesday, 27 May 2015 at 12:34:49 UTC, Daniel Kozák wrote: What if use the symbol '#' ? Yep, I like this symbol for macro too. https://issues.dlang.org/show_bug.cgi

Re: Uphill

2015-05-27 Thread Paulo Pinto via Digitalmars-d
On Wednesday, 27 May 2015 at 10:01:35 UTC, Chris wrote: On Tuesday, 26 May 2015 at 17:13:18 UTC, ketmar wrote: On Tue, 26 May 2015 10:07:08 +, Chris wrote: With Go I have the sinking feeling that it won't be able to contend with C++ - or D for that matter. It took off due to Google and a

Re: Parallelism

2015-05-27 Thread Robbin via Digitalmars-d
Thank you, core.thread was exactly what I would have started with if I'd just seen the derived line in the example. My earlier careless reading led me to believe I needed to compose my own class, which felt more complicated than it should be.

Re: shared libs for OSX

2015-05-27 Thread Martin Nowak via Digitalmars-d
On Tuesday, 26 May 2015 at 16:25:52 UTC, bitwise wrote: Since all global functions and symbols are shared between images anyways, receiving the callback in the main image would be fine. So in this case, unregistering the callbacks is no longer needed. That only works when the host executable

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 27 May 2015 at 13:12:05 UTC, Meta wrote: As far as I know, the : and ' symbols in Lisp don't have anything to do with macros. : is for keyword arguments and ' is for creating AST literals. It makes sense that these would be heavily used with macros, of course, but they are not par

Re: shared libs for OSX

2015-05-27 Thread Martin Nowak via Digitalmars-d
On Wednesday, 27 May 2015 at 06:45:49 UTC, Jacob Carlborg wrote: I'm not sure. The ___tls_get_addr function [1] is used when accessing a TLS variable on OS X. In all native implementations, both on OS X and Linux, the parameter is not just a void* but struct containing the image header as well.

Signals

2015-05-27 Thread Robbin via Digitalmars-d
I'm writing a daemon in D on linux. I need to be able to stop (kill) it. The traditional C method is a signal handler. I can do this, but I can't figure out how to get the handler to do anything to tell the rest of the daemon to quit. In a C++ handler, I closed the files that were open, remo

Re: shared libs for OSX

2015-05-27 Thread Martin Nowak via Digitalmars-d
On Tuesday, 26 May 2015 at 16:25:52 UTC, bitwise wrote: Isn't it better to avoid private undocumented functions? Not only better, but mandatory, otherwise Apple will reject the app from the app store. Calling back into an unloaded image without proving a mean to deregister the callback is a b

Re: Proof of concept - library AA

2015-05-27 Thread Martin Nowak via Digitalmars-d
On Monday, 25 May 2015 at 23:39:18 UTC, IgorStepanov wrote: On Sunday, 24 May 2015 at 14:13:26 UTC, Martin Nowak wrote: Would be interesting to get some opinions on this. https://github.com/D-Programming-Language/druntime/pull/1282 BTW, I have one idea. We may declare the AA ABI: AA is a poin

Re: Signals

2015-05-27 Thread Adam D. Ruppe via Digitalmars-d
The way I do it is to set a global variable in the signal handler, then have the loop watch for it. So like __gshared bool terminated = false; extern(C) void handleSigTerm(int) { terminated = true; } void main() { while(!terminated) { if(select() < 0) if(errno == EINT

Re: Proof of concept - library AA

2015-05-27 Thread Martin Nowak via Digitalmars-d
On Sunday, 24 May 2015 at 15:13:41 UTC, Vladimir Panteleev wrote: Could you elaborate on what these magic semantics are? and no easy solution exists for the ++aa[key1][key2] case. Is this specific to the pre-increment? aa[key1][key2]++ is generally a useful pattern. This applies to pre/pos

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Wednesday, 27 May 2015 at 11:02:24 UTC, Per Nordlöw wrote: On Wednesday, 27 May 2015 at 10:53:48 UTC, Per Nordlöw wrote: On Wednesday, 27 May 2015 at 09:54:33 UTC, Marc Schütz wrote: Yes. First of all, `File.byLine.front` is the function that needs to get annotated, like this: char[] fro

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Wednesday, 27 May 2015 at 14:13:03 UTC, Marc Schütz wrote: I general, `return` is supposed to work (with -dip25), but only in combination with `ref`, not slices or pointers. DMD probably ignores it here instead of printing an error message. So, *should* it error for slices or not?

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread weaselcat via Digitalmars-d
On Wednesday, 27 May 2015 at 11:02:24 UTC, Per Nordlöw wrote: On Wednesday, 27 May 2015 at 10:53:48 UTC, Per Nordlöw wrote: On Wednesday, 27 May 2015 at 09:54:33 UTC, Marc Schütz wrote: Yes. First of all, `File.byLine.front` is the function that needs to get annotated, like this: char[] fro

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread weaselcat via Digitalmars-d
On Wednesday, 27 May 2015 at 12:39:52 UTC, ixid wrote: On Wednesday, 27 May 2015 at 12:34:49 UTC, Daniel Kozák wrote: On Wed, 27 May 2015 12:07:09 + Dennis Ritchie via Digitalmars-d wrote: On Wednesday, 27 May 2015 at 11:53:00 UTC, Jacob Carlborg wrote: > I have thought of that too. Bu

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Dennis Ritchie via Digitalmars-d
On Wednesday, 27 May 2015 at 15:20:38 UTC, weaselcat wrote: On Wednesday, 27 May 2015 at 12:39:52 UTC, ixid wrote: On Wednesday, 27 May 2015 at 12:34:49 UTC, Daniel Kozák wrote: On Wed, 27 May 2015 12:07:09 + Dennis Ritchie via Digitalmars-d wrote: On Wednesday, 27 May 2015 at 11:53:00

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Idan Arye via Digitalmars-d
On Wednesday, 27 May 2015 at 08:14:36 UTC, Kagamin wrote: On Tuesday, 26 May 2015 at 23:47:41 UTC, Dennis Ritchie wrote: If this proposal is considered, it is required to propose to look at the implementation of macros in Nemerle. Many believe that it is in Nemerle macros implemented the most s

Re: Signals

2015-05-27 Thread Robbin via Digitalmars-d
I'm using nanomsg to communicate between various components (actually distributed across a number of computers) and my main event loops are waiting for a message. The reads are encapsulated in a class, so I guess I'll change from a recv to a poll and add a second channel to communicate when it

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Artur Skawina via Digitalmars-d
On 05/27/15 17:47, Idan Arye via Digitalmars-d wrote: > On Wednesday, 27 May 2015 at 08:14:36 UTC, Kagamin wrote: >> On Tuesday, 26 May 2015 at 23:47:41 UTC, Dennis Ritchie wrote: >>> If this proposal is considered, it is required to propose to look >>> at the implementation of macros in Nemerle. M

Re: Proof of concept - library AA

2015-05-27 Thread IgorStepanov via Digitalmars-d
On Wednesday, 27 May 2015 at 14:12:02 UTC, Martin Nowak wrote: On Sunday, 24 May 2015 at 15:13:41 UTC, Vladimir Panteleev wrote: Could you elaborate on what these magic semantics are? and no easy solution exists for the ++aa[key1][key2] case. Is this specific to the pre-increment? aa[key1][k

Re: Signals

2015-05-27 Thread Gary Willoughby via Digitalmars-d
On Wednesday, 27 May 2015 at 13:52:33 UTC, Robbin wrote: I'm writing a daemon in D on linux. I need to be able to stop (kill) it. The traditional C method is a signal handler. I can do this, but I can't figure out how to get the handler to do anything to tell the rest of the daemon to quit.

Re: DConf 2015 Livestreaming?

2015-05-27 Thread Gary Willoughby via Digitalmars-d
On Wednesday, 27 May 2015 at 10:32:32 UTC, Liam McSherry wrote: On Wednesday, 27 May 2015 at 10:20:04 UTC, Per Nordlöw wrote: Isn't there any live-streaming of DConf this year? Unfortunately, there doesn't seem to be any streaming this year: http://forum.dlang.org/thread/zpwxvgiaigdbweach...

Re: DConf 2015 Livestreaming?

2015-05-27 Thread extrawurst via Digitalmars-d
On Wednesday, 27 May 2015 at 17:32:06 UTC, Gary Willoughby wrote: On Wednesday, 27 May 2015 at 10:32:32 UTC, Liam McSherry wrote: On Wednesday, 27 May 2015 at 10:20:04 UTC, Per Nordlöw wrote: Isn't there any live-streaming of DConf this year? Unfortunately, there doesn't seem to be any stream

Re: DConf 2015 Livestreaming?

2015-05-27 Thread Joakim via Digitalmars-d
On Wednesday, 27 May 2015 at 17:32:06 UTC, Gary Willoughby wrote: On Wednesday, 27 May 2015 at 10:32:32 UTC, Liam McSherry wrote: On Wednesday, 27 May 2015 at 10:20:04 UTC, Per Nordlöw wrote: Isn't there any live-streaming of DConf this year? Unfortunately, there doesn't seem to be any stream

Re: DConf 2015 Livestreaming?

2015-05-27 Thread weaselcat via Digitalmars-d
On Wednesday, 27 May 2015 at 18:06:31 UTC, extrawurst wrote: On Wednesday, 27 May 2015 at 17:32:06 UTC, Gary Willoughby wrote: On Wednesday, 27 May 2015 at 10:32:32 UTC, Liam McSherry wrote: On Wednesday, 27 May 2015 at 10:20:04 UTC, Per Nordlöw wrote: Isn't there any live-streaming of DConf t

Re: Proof of concept - library AA

2015-05-27 Thread H. S. Teoh via Digitalmars-d
On Wed, May 27, 2015 at 05:16:51PM +, IgorStepanov via Digitalmars-d wrote: > On Wednesday, 27 May 2015 at 14:12:02 UTC, Martin Nowak wrote: > >On Sunday, 24 May 2015 at 15:13:41 UTC, Vladimir Panteleev wrote: > >>Could you elaborate on what these magic semantics are? > >> > >>>and no easy solu

Re: DConf 2015 Livestreaming?

2015-05-27 Thread Dicebot via Digitalmars-d
Inofficial ad-hoc stream : https://www.youtube.com/watch?v=-OCl-jWyT9E (may randomly stop and get restarted) (thanks John Colvin)

Re: DConf 2015 Livestreaming?

2015-05-27 Thread Andrej Mitrovic via Digitalmars-d
On 5/27/15, Dicebot via Digitalmars-d wrote: > Inofficial ad-hoc stream : > https://www.youtube.com/watch?v=-OCl-jWyT9E > (may randomly stop and get restarted) > (thanks John Colvin) Nice! Btw, youtube preemptively blocks this in Germany, only because it is a live-stream and I guess they're just

Re: shared libs for OSX

2015-05-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-27 15:38, Martin Nowak wrote: On Linux you call it with an dso index and an offset. The DSO index is assigned by the runtime linker (there is a special relocation for that). Something similar could be done manually if not natively supported on OSX. It is natively support. -- /Jacob

Re: Expanding asm.dlang.org

2015-05-27 Thread Andrei Alexandrescu via Digitalmars-d
On 5/27/15 5:38 AM, Vladimir Panteleev wrote: On Monday, 25 May 2015 at 16:45:26 UTC, Andrei Alexandrescu wrote: On 5/25/15 7:36 AM, Iain Buclaw via Digitalmars-d wrote: I can add any cross compilers hosted on gdcproject.org . You'd need to go through Godbolt to get it on

Re: DConf 2015 Livestreaming?

2015-05-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-27 20:24, weaselcat wrote: Let me rephrase it for him, "I hope there is at least downloadable videos within the next month instead of last year's fiasco." 20 talks, one talk per week, that is five months for all talks. -- /Jacob Carlborg

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-27 14:17, Kagamin wrote: Well, that's the point: the function is a normal function, only some of its parameters require specially prepared arguments, this can't be missed as soon as arguments are passed to the respective parameters. I prefer to be more explicit in this case, especia

Re: Signals

2015-05-27 Thread ketmar via Digitalmars-d
On Wed, 27 May 2015 16:08:28 +, Robbin wrote: > I'm using nanomsg to communicate between various components (actually > distributed across a number of computers) and my main event loops are > waiting for a message. The reads are encapsulated in a class, so I > guess I'll change from a recv to

Re: DConf 2015 Livestreaming?

2015-05-27 Thread weaselcat via Digitalmars-d
On Wednesday, 27 May 2015 at 19:17:31 UTC, Jacob Carlborg wrote: On 2015-05-27 20:24, weaselcat wrote: Let me rephrase it for him, "I hope there is at least downloadable videos within the next month instead of last year's fiasco." 20 talks, one talk per week, that is five months for all tal

Re: Uphill

2015-05-27 Thread ketmar via Digitalmars-d
On Wed, 27 May 2015 13:23:16 +, Paulo Pinto wrote: > Only when I can sell D to customers that put money into this kind of > stuff if customers are deciding which technologies to use... ok then, they can do their work without my help, 'cause they are so knowledgeable. signature.asc Descript

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Idan Arye via Digitalmars-d
On Wednesday, 27 May 2015 at 19:15:34 UTC, Jacob Carlborg wrote: On 2015-05-27 14:17, Kagamin wrote: Well, that's the point: the function is a normal function, only some of its parameters require specially prepared arguments, this can't be missed as soon as arguments are passed to the respecti

Re: shared libs for OSX

2015-05-27 Thread bitwise via Digitalmars-d
On Wed, 27 May 2015 02:45:57 -0400, Jacob Carlborg wrote: What about using a D dynamic library in a C application? The C application would initialize the runtime which would register the callback. Then it would be undefined to unload druntime? Good point. I've come up another solution an

Re: DMD Symbol Reference Analysis Pass

2015-05-27 Thread via Digitalmars-d
On Wednesday, 27 May 2015 at 15:21:38 UTC, weaselcat wrote: I might be wrong, but I thought dip25 was only enabled in @safe annotated code? Does this mean that I have to @safe-qualify `ByLineFast.front()` or the function iterating over it or both? Or does it suffice to @trusted-qualify `ByLi

smart pointer for interior pointers

2015-05-27 Thread Steven Schveighoffer via Digitalmars-d
I just was working on a project, and I had a need for two members of a struct to share state. How could this work? A simple example: struct S { int x; int *y; // should refer to x this(int v) { x = v; y = &x; } } But this doesn't work on copying, because when you cop

Re: smart pointer for interior pointers

2015-05-27 Thread Artur Skawina via Digitalmars-d
On 05/28/15 01:31, Steven Schveighoffer via Digitalmars-d wrote: > I just was working on a project, and I had a need for two members of a struct > to share state. > > How could this work? A simple example: > > struct S > { >int x; >int *y; // should refer to x >this(int v) >{ >

Re: Expanding asm.dlang.org

2015-05-27 Thread Mike via Digitalmars-d
On Wednesday, 27 May 2015 at 11:38:36 UTC, Vladimir Panteleev wrote: We also have http://dpaste.dzfl.pl/ (which has GDC, LDC, and actually runs the code). It doesn't appear to have GDC, the DMD and LDC compilers look like they are 2 years old, and the disassembly doesn't work. Looking ar

DConf 2015 livestreaming day 1: post feedback here

2015-05-27 Thread Andrei Alexandrescu via Digitalmars-d
John Colvin's experiment is great and we want to make it a full success. Please post here feedback and suggestions for tomorrow's DConf streaming. Thanks! -- Andrei

Re: DConf 2015 livestreaming day 1: post feedback here

2015-05-27 Thread Ali Çehreli via Digitalmars-d
On 05/27/2015 05:54 PM, Andrei Alexandrescu wrote: John Colvin's experiment is great and we want to make it a full success. Please post here feedback and suggestions for tomorrow's DConf streaming. Thanks! -- Andrei Thank you for doing this! The slides will be easier to read if the camera can

Re: DConf 2015 livestreaming day 1: post feedback here

2015-05-27 Thread Meta via Digitalmars-d
On Thursday, 28 May 2015 at 01:00:26 UTC, Ali Çehreli wrote: On 05/27/2015 05:54 PM, Andrei Alexandrescu wrote: John Colvin's experiment is great and we want to make it a full success. Please post here feedback and suggestions for tomorrow's DConf streaming. Thanks! -- Andrei Thank you for do

Re: DConf 2015 livestreaming day 1: post feedback here

2015-05-27 Thread Meta via Digitalmars-d
On Thursday, 28 May 2015 at 01:09:42 UTC, Meta wrote: Does anyone have the links to Kenji's tuple pull and the fixes for the module system? https://github.com/D-Programming-Language/dmd/pull/3407 Can't find the tuple PR

Re: DConf 2015 livestreaming day 1: post feedback here

2015-05-27 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 28 May 2015 at 01:00:26 UTC, Ali Çehreli wrote: Thank you for doing this! The slides will be easier to read if the camera can be a little closer. +1 On Thursday, 28 May 2015 at 00:54:30 UTC, Andrei Alexandrescu wrote: John Colvin's experiment is great and we want to make it a ful

std.database

2015-05-27 Thread Erik Smith via Digitalmars-d
I'm working on a standards grade interface & implementation for database clients in D. It defines a common interface (the implicit kind) and allows for both native and polymorphic drivers. A key feature is a range interface to query results. Here's the project page with the design highlights

Re: DConf 2015 livestreaming day 1: post feedback here

2015-05-27 Thread weaselcat via Digitalmars-d
On Thursday, 28 May 2015 at 01:11:16 UTC, Meta wrote: On Thursday, 28 May 2015 at 01:09:42 UTC, Meta wrote: Does anyone have the links to Kenji's tuple pull and the fixes for the module system? https://github.com/D-Programming-Language/dmd/pull/3407 Can't find the tuple PR https://github.co

is there any reason to use SuperFastHash in druntime? (except speed)

2015-05-27 Thread ketmar via Digitalmars-d
SuperFastHash has known distribution problems[1]. there is fasthash[2] function, which is comparable to murmur, but requires one multiplication per 8 bytes (and it yields 64-bit hash values) and using ulongs. i think that there is some sense in trading some speed for better distribution. what d

Re: std.database

2015-05-27 Thread Rikki Cattermole via Digitalmars-d
On 28/05/2015 2:04 p.m., Erik Smith wrote: I'm working on a standards grade interface & implementation for database clients in D. It defines a common interface (the implicit kind) and allows for both native and polymorphic drivers. A key feature is a range interface to query results. Here's th

Re: smart pointer for interior pointers

2015-05-27 Thread ketmar via Digitalmars-d
On Wed, 27 May 2015 17:31:32 -0600, Steven Schveighoffer wrote: > But we can solve this with a postblit: seems that you forgot about "move" semantics for structs. under some conditions struct can be "moved", not "copied", so it `memcpy`ed and no postblit will be called. signature.asc Descripti

Re: DConf 2015 livestreaming day 1: post feedback here

2015-05-27 Thread Rikki Cattermole via Digitalmars-d
On 28/05/2015 12:54 p.m., Andrei Alexandrescu wrote: John Colvin's experiment is great and we want to make it a full success. Please post here feedback and suggestions for tomorrow's DConf streaming. Thanks! -- Andrei Just a thought, livecoding.tv would be interested in hosting a live stream f

Re: std.database

2015-05-27 Thread Robert burner Schadek via Digitalmars-d
I believe you're a aiming to low. If you have a struct you could use traits and ctfe to generate perfect sql statements. This would make it possible to a range of "struct Customers". That would be awesome

Re: std.database

2015-05-27 Thread Erik Smith via Digitalmars-d
On Thursday, 28 May 2015 at 03:40:36 UTC, Robert burner Schadek wrote: I believe you're a aiming to low. If you have a struct you could use traits and ctfe to generate perfect sql statements. This would make it possible to a range of "struct Customers". That would be awesome I agree that i

Re: std.database

2015-05-27 Thread Sebastiaan Koppe via Digitalmars-d
On Thursday, 28 May 2015 at 02:04:31 UTC, Erik Smith wrote: Shouldn't the statement be reusable? I.e. bind variables and run multiple times. From the code examples creating a statement and binding variables seemed to be coupled. Since one obvious use case would be running the behind a http s

Re: std.database

2015-05-27 Thread Erik Smith via Digitalmars-d
Shouldn't the statement be reusable? Yes it should. I added this use case: auto stmt = con.statement("insert into table values(?,?)"); stmt.execute("a",1); stmt.execute("b",2); stmt.execute("c",3); Since one obvious use case would be running the behind a http server - vibe.d - using fibers a

Re: std.database

2015-05-27 Thread Robert burner Schadek via Digitalmars-d
On Thursday, 28 May 2015 at 04:45:52 UTC, Erik Smith wrote: Shouldn't the statement be reusable? Yes it should. I added this use case: auto stmt = con.statement("insert into table values(?,?)"); stmt.execute("a",1); stmt.execute("b",2); stmt.execute("c",3); struct Table; Table a, b, c; c

Re: std.database

2015-05-27 Thread Rikki Cattermole via Digitalmars-d
On 28/05/2015 4:57 p.m., Robert burner Schadek wrote: On Thursday, 28 May 2015 at 04:45:52 UTC, Erik Smith wrote: Shouldn't the statement be reusable? Yes it should. I added this use case: auto stmt = con.statement("insert into table values(?,?)"); stmt.execute("a",1); stmt.execute("b",2); s

Re: std.database

2015-05-27 Thread Erik Smith via Digitalmars-d
Table a, b, c; con.insert!Table(a); ... if you use CTFE to create the statement string there is no reason to reuse it. it will be string literal, that's even better! Think Big. Think D the other code is Java not D The statement reuse with binding is primarily for performance and is import

Re: std.database

2015-05-27 Thread Vadim Lopatin via Digitalmars-d
On Thursday, 28 May 2015 at 05:00:30 UTC, Rikki Cattermole wrote: On 28/05/2015 4:57 p.m., Robert burner Schadek wrote: On Thursday, 28 May 2015 at 04:45:52 UTC, Erik Smith wrote: Shouldn't the statement be reusable? Yes it should. I added this use case: auto stmt = con.statement("insert in

Re: std.database

2015-05-27 Thread lobo via Digitalmars-d
On Thursday, 28 May 2015 at 05:00:30 UTC, Rikki Cattermole wrote: On 28/05/2015 4:57 p.m., Robert burner Schadek wrote: On Thursday, 28 May 2015 at 04:45:52 UTC, Erik Smith wrote: Shouldn't the statement be reusable? Yes it should. I added this use case: auto stmt = con.statement("insert in

Re: Expanding asm.dlang.org

2015-05-27 Thread Temtaime via Digitalmars-d
If we speak about ldc.acomirei.ru, then i'll add dmd and maybe gdc on this week :)

Re: shared libs for OSX

2015-05-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-27 23:24, bitwise wrote: Good point. I've come up another solution and posted it here: http://dpaste.com/0DXBSNQ BTW, I'm not sure what's the best solution but you can calculate the slide without iterating all images. Look at the first statements in "tlv_allocate_and_initialize_f

Re: Expanding asm.dlang.org

2015-05-27 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 28 May 2015 at 00:23:28 UTC, Mike wrote: On Wednesday, 27 May 2015 at 11:38:36 UTC, Vladimir Panteleev wrote: We also have http://dpaste.dzfl.pl/ (which has GDC, LDC, and actually runs the code). It doesn't appear to have GDC, the DMD and LDC compilers look like they are 2 ye

Re: DIP78 - macros without syntax extensions

2015-05-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-27 21:41, Idan Arye wrote: I think it's more important to be explicit in the macro invocation than in the macro declaration. You can tell from the macro declaration that it's a macro you are looking at, even without the `macro` keyword, It depends. As far as I can see, just looking

Re: std.database

2015-05-27 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-28 06:57, Robert burner Schadek wrote: struct Table; Table a, b, c; con.insert!Table(a); ... if you use CTFE to create the statement string there is no reason to reuse it. it will be string literal, that's even better! Think Big. Think D the other code is Java not D It still nee