Re: The worst Phobos template (in binderoo)

2016-09-14 Thread Pierre Krafft via Digitalmars-d
On Wednesday, 14 September 2016 at 20:24:13 UTC, Stefan Koch wrote: I would like to see users of fullyQualifiedName because apart from binderoo code which seems to work, I have none. I've had to use fullyQualifiedName in some string mixins. Take a look at

Re: Regex in ctfe?

2016-01-27 Thread Pierre Krafft via Digitalmars-d
On Tuesday, 26 January 2016 at 12:47:26 UTC, w0rp wrote: Unless I'm mistaken, I think the compiler for regex currently works at compile time, but not the matcher. Maybe someone who knows the module could add support for that. That's correct. I looked in to this a while ago and found out that

Re: Better lambdas!!!!!!!!!!

2015-09-12 Thread Pierre Krafft via Digitalmars-d
On Saturday, 12 September 2015 at 03:32:51 UTC, Prudence wrote: On Saturday, 12 September 2015 at 02:13:11 UTC, Pierre Krafft wrote: On Saturday, 12 September 2015 at 01:03:54 UTC, Prudence wrote: On Thursday, 10 September 2015 at 18:02:36 UTC, Ali Çehreli wrote: On 09/10/2015 10:55 AM,

Re: Better lambdas!!!!!!!!!!

2015-09-11 Thread Pierre Krafft via Digitalmars-d
On Saturday, 12 September 2015 at 01:03:54 UTC, Prudence wrote: On Thursday, 10 September 2015 at 18:02:36 UTC, Ali Çehreli wrote: On 09/10/2015 10:55 AM, Prudence wrote: > How bout this: > > void myfunc(double delegate(int i, int z, float f)) {} > > > myfunc((int i, int z, float f) {

Re: std.json questions

2015-04-27 Thread Pierre Krafft via Digitalmars-d-learn
On Saturday, 25 April 2015 at 18:30:33 UTC, Baz wrote: On Saturday, 25 April 2015 at 09:56:25 UTC, tired_eyes wrote: I think this is ugly and clunky approach, what is the beautiful one? What you clearly need is a serializer: look at these:

Re: Future of contract-based programming in D

2015-04-08 Thread Pierre Krafft via Digitalmars-d
On Wednesday, 8 April 2015 at 11:26:38 UTC, Kagamin wrote: BTW, what do you think about this problem: http://forum.dlang.org/post/cokicokwqnscaktxi...@forum.dlang.org ? That's a great feature! Don't inherit if it's not the right tool, and it almost never is. We have interfaces and alias this

Re: Which D IDE do you use?(survey)

2015-04-08 Thread Pierre Krafft via Digitalmars-d
Any editor using DCD will be great, and I think most D editors are. I use Sublime exclusively since it's easy to setup and effective for me to use.

Re: Future of contract-based programming in D

2015-04-08 Thread Pierre Krafft via Digitalmars-d
On Wednesday, 8 April 2015 at 12:13:00 UTC, Kagamin wrote: On Wednesday, 8 April 2015 at 12:07:18 UTC, Pierre Krafft wrote: Except for the syntax I can't come up with a problem that would be better solved using inheritance than using composition. How would you interate a collection of

Re: Mid-term vision review

2015-04-07 Thread Pierre Krafft via Digitalmars-d
On Tuesday, 7 April 2015 at 08:01:19 UTC, Dicebot wrote: On Monday, 6 April 2015 at 18:17:31 UTC, deadalnix wrote: On the other hand, many features in the language could be implementation as macro in object.d, reducing language complexity. Mixin has some severe limitation when you want to

Re: Making regex replace CTFE by removing malloc

2015-04-06 Thread Pierre Krafft via Digitalmars-d
I got some help from the IRC, poked the code a bit and have some details I can share. The code uses a reference counted memory pool, that's the part I linked. It's possible to avoid the malloc but that's not the hard part. For me it looks like memory pools aren't compatible with CTFE. This is

Re: Making regex replace CTFE by removing malloc

2015-04-03 Thread Pierre Krafft via Digitalmars-d
On Friday, 3 April 2015 at 03:58:33 UTC, ketmar wrote: On Thu, 02 Apr 2015 17:14:24 +, Pierre Krafft wrote: What can replace malloc that can run on compile time and won't make it slower at run time? this is actually two questions, so i'll answer to two questions. 1. What can replace

Re: Making regex replace CTFE by removing malloc

2015-04-03 Thread Pierre Krafft via Digitalmars-d
On Friday, 3 April 2015 at 03:58:33 UTC, ketmar wrote: On Thu, 02 Apr 2015 17:14:24 +, Pierre Krafft wrote: What can replace malloc that can run on compile time and won't make it slower at run time? this is actually two questions, so i'll answer to two questions. 1. What can replace

Re: How to POST data with net.curl

2015-04-02 Thread Pierre Krafft via Digitalmars-d-learn
On Thursday, 2 April 2015 at 07:45:16 UTC, Suliman wrote: I have next request, that work fine with curl: curl -X POST -F upload=@wgs84_latlon.zip http://ogre.adc4gis.com/convert I wrote next code: void main() { auto binfile = cast(ubyte[]) read(`D:\Apps\curl\wgs84_latlon.zip`);

Making regex replace CTFE by removing malloc

2015-04-02 Thread Pierre Krafft via Digitalmars-d
We have CTFE regex wich creates an optimized regex engine at compile time. I would want to expand on that and make the generated machine CTFE as well. I think the only thing that is stopping this from working is the use of malloc as seen at

Re: painlessjson released, looking for improvement advice

2015-02-01 Thread Pierre Krafft via Digitalmars-d-announce
On Sunday, 1 February 2015 at 06:08:35 UTC, Vladimir Panteleev wrote: On Thursday, 29 January 2015 at 20:04:51 UTC, Pierre Krafft wrote: It's fun to see that there are so many different solutions to working with JSON in D. jsvar seems to be for keeping your variables in JavaScript-land,

Re: painlessjson released, looking for improvement advice

2015-01-29 Thread Pierre Krafft via Digitalmars-d-announce
On Thursday, 29 January 2015 at 13:16:48 UTC, BlackEdder wrote: On Thursday, 29 January 2015 at 00:24:44 UTC, rlonstein wrote: Not quite the same, but I've been using dson (https://github.com/w0rp/dson). Have you looked it over? Did not know about that one. From looking through the source

Re: painlessjson released, looking for improvement advice

2015-01-29 Thread Pierre Krafft via Digitalmars-d-announce
On Thursday, 29 January 2015 at 18:47:37 UTC, Rory McGuire wrote: :) I use jsvar for any JSON work in D. Javascript is the only thing I've used that is possibly easier to work with JSON values. https://github.com/adamdruppe/arsd/blob/master/jsvar.d On Thu, Jan 29, 2015 at 5:18 PM, BlackEdder

painlessjson released, looking for improvement advice

2015-01-28 Thread Pierre Krafft via Digitalmars-d-announce
Hi, DUB lacked a package for going between D objects and JSON. painlessjson is a library just released on DUB looking to be the easy solution for converting D data to and from JSON. painlessjson uses templates and traits to generate code that converts to and from std.json. The goals of