[Issue 14419] [CTFE] Need infinite loop detection?

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14419 --- Comment #11 from Ketmar Dark ket...@ketmar.no-ip.org --- (In reply to Jens Bauer from comment #10) (This particular web-browser actually *had* a loop detection on the Javascript, and it was impossible for me to trick it). it's very easy to

Re: UFCS and overloading

2015-04-06 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/6/15 12:23 PM, Szymon Gatner wrote: Hi, I am surprised that this doesn't work: class Foo { void bar(string) {} } void bar(Foo foo, int i) { } auto foo = new Foo(); foo.bar(123); // === error causing compilation error: main.d(24): Error: function main.Foo.bar (string _param_0) is

Re: fromStringz problem with gdc

2015-04-06 Thread Iain Buclaw via Digitalmars-d-learn
On Monday, 6 April 2015 at 17:47:27 UTC, chardetm wrote: Hello everyone, I have a problem with the fromStringz function (std.string.fromStringz) when I try to compile with the GDC compiler (it works fine with DMD). Here is a minimal code to see the error: import std.stdio, std.string,

Re: UFCS and overloading

2015-04-06 Thread Szymon Gatner via Digitalmars-d-learn
On Monday, 6 April 2015 at 17:53:13 UTC, Steven Schveighoffer wrote: On 4/6/15 12:23 PM, Szymon Gatner wrote: Hi, I am surprised that this doesn't work: class Foo { void bar(string) {} } void bar(Foo foo, int i) { } auto foo = new Foo(); foo.bar(123); // === error causing compilation

Re: Standardpaths library

2015-04-06 Thread Xavier Bigand via Digitalmars-d-announce
Le 05/04/2015 11:08, FreeSlave a écrit : I wrote small library for getting standard paths (like Pictures, Music) Here's dub package http://code.dlang.org/packages/standardpaths And github repo https://github.com/MyLittleRobo/standardpaths You can see open issues on github. Please, participate

[Issue 14419] [CTFE] Need infinite loop detection?

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14419 --- Comment #9 from Martin Nowak c...@dawg.eu --- For an AST interpreter this would mean you'd need to snapshot loop conditions to compare them, right? Sounds like slowing down interpretation and making a JITed interpreter much harder for a hacky fix

[Issue 14419] [CTFE] Need infinite loop detection?

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14419 --- Comment #10 from Jens Bauer jens-bugzi...@gpio.dk --- (In reply to Martin Nowak from comment #9) If you really think we should fix this, then a time limit for CTFE execution might be feasible. I think it would be a good thing to at least

[Issue 14416] .sizeof yields 1 for uninstantiated struct templates

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14416 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4d216e8922e94cf868a7c07ffbb1e941d5ae6060 fix Issue 14416 - .sizeof

Re: Mid-term vision review

2015-04-06 Thread deadalnix via Digitalmars-d
On Monday, 6 April 2015 at 12:45:48 UTC, Martin Nowak wrote: On 04/06/2015 03:39 AM, Dennis Ritchie wrote: Thanks. I hope that in the near future will be a powerful D macrosystem. Don't expect too much enthusiasm about adding macros. - D already has very good metaprogramming capabilities

Re: fromStringz problem with gdc

2015-04-06 Thread chardetm via Digitalmars-d-learn
On Monday, 6 April 2015 at 17:55:42 UTC, Iain Buclaw wrote: On Monday, 6 April 2015 at 17:47:27 UTC, chardetm wrote: Hello everyone, I have a problem with the fromStringz function (std.string.fromStringz) when I try to compile with the GDC compiler (it works fine with DMD). Here is a

[Issue 14419] [CTFE] Need infinite loop detection?

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14419 --- Comment #12 from Jens Bauer jens-bugzi...@gpio.dk --- (In reply to Ketmar Dark from comment #3) alias extern(C) immutable void function () VectorFunc; VectorFunc[3] g_pfnVectors = [ Reset_Handler, ]; extern(C) void Reset_Handler () {

[Issue 14415] globMatch should support recursive matching (**)

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14415 --- Comment #1 from Martin Nowak c...@dawg.eu --- In fact the existing * already matches across directories, which it shouldn't do. --

[Issue 14419] [CTFE] Need infinite loop detection?

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14419 --- Comment #8 from Ketmar Dark ket...@ketmar.no-ip.org --- determining finiteness of arbitrary algorithm is one of the greatest problems of current AI research. ;-) i believe that it's better to not start. the code for checking various cases will

fromStringz problem with gdc

2015-04-06 Thread chardetm via Digitalmars-d-learn
Hello everyone, I have a problem with the fromStringz function (std.string.fromStringz) when I try to compile with the GDC compiler (it works fine with DMD). Here is a minimal code to see the error: import std.stdio, std.string, std.c.stdlib; int main () { char* s; s = cast(char*)

Re: json parsing performance

2015-04-06 Thread cym13 via Digitalmars-d
On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote: I have read that std.json is pretty slow compared to other languages json parsers and I'm about to do a whole stack of json parsing and was wondering if anyone has got any benchmarks to indicate what slow means compared to other

D1 - D2 Code converter

2015-04-06 Thread jicman via Digitalmars-d-learn
Greetings! Has anyone written any quick program to convert d1 code to d2? I believe it will be a fine piece of program. :-) Thanks. josé

Re: Class Hierarchy Graphs

2015-04-06 Thread w0rp via Digitalmars-d
I have just updated my reposistory so instead of using a ClassHierarchyInfo type for class diagrams and a ModuleDependencyInfo type for module diagrams, now digraph types are used, coming from my container library. I had to update my container library a little to get it to work, as I had some

Re: Standardpaths library

2015-04-06 Thread Marco Leise via Digitalmars-d-announce
Am Sun, 05 Apr 2015 12:31:23 + schrieb FreeSlave freeslav...@gmail.com: On Sunday, 5 April 2015 at 11:42:42 UTC, Marco Leise wrote: On another note when I ran your 'printdirs' it didn't list a user Fonts or Applications directory. The Applications directory is ok, but I do have a

Re: D1 - D2 Code converter

2015-04-06 Thread Dicebot via Digitalmars-d-learn
On Monday, 6 April 2015 at 20:25:39 UTC, jicman wrote: Greetings! Has anyone written any quick program to convert d1 code to d2? I believe it will be a fine piece of program. :-) Thanks. josé It is surprisingly difficult, to the point of being almost impossible, to write such program.

Re: How to generate D binding with SWIG?

2015-04-06 Thread Suliman via Digitalmars-d-learn
some time ago I tried it, but without success http://forum.dlang.org/thread/hnlrhschfgumaxzgi...@forum.dlang.org

Static if to compare two types are the exact same

2015-04-06 Thread Jonathan via Digitalmars-d-learn
What's the best way to do this? I'm assuming this should be best practice: http://dlang.org/traits.html#isSame struct S { } writeln(__traits(isSame, S, S));

Re: Binary search in structs

2015-04-06 Thread FreeSlave via Digitalmars-d-learn
I think I found solution using opBinaryRight import std.range; struct S { int i; string s; int opCmp(int i) { return this.i - i; } int opCmp(ref const S s) { return this.i - s.i; } int opBinaryRight(string op)(int i) if (op == ) { return i

[Issue 14406] [REG2.068a] GIT HEAD ignores forward reference and generates wrong code

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14406 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14406] [REG2.068a] GIT HEAD ignores forward reference and generates wrong code

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14406 --- Comment #5 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4d91f33111d54ed09b9275b48bd65d243a3e3f05 fix Issue 14406 - GIT HEAD

Re: json parsing performance

2015-04-06 Thread Laeeth Isharc via Digitalmars-d
On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote: I have read that std.json is pretty slow compared to other languages json parsers and I'm about to do a whole stack of json parsing and was wondering if anyone has got any benchmarks to indicate what slow means compared to other

Re: Static if to compare two types are the exact same

2015-04-06 Thread ketmar via Digitalmars-d-learn
On Mon, 06 Apr 2015 19:16:33 +, Jonathan wrote: What's the best way to do this? I'm assuming this should be best practice: http://dlang.org/traits.html#isSame struct S { } writeln(__traits(isSame, S, S)); struct S {} auto s0 = S(); auto s1 = S(); static if (is(typeof(s0) ==

D1: Out of memory problems

2015-04-06 Thread jicman via Digitalmars-d-learn
Greetings. I am using, 15:32:35.63dmd Digital Mars D Compiler v1.046 Copyright (c) 1999-2009 by Digital Mars written by Walter Bright Documentation: http://www.digitalmars.com/d/1.0/index.html And I have a program that reads a file into UTF8 and does a series of string handling to create

json parsing performance

2015-04-06 Thread Kingsley via Digitalmars-d
I have read that std.json is pretty slow compared to other languages json parsers and I'm about to do a whole stack of json parsing and was wondering if anyone has got any benchmarks to indicate what slow means compared to other languages - particularly java, ruby, python? I want to know

Re: UFCS and overloading

2015-04-06 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/6/15 2:00 PM, Szymon Gatner wrote: On Monday, 6 April 2015 at 17:53:13 UTC, Steven Schveighoffer wrote: On 4/6/15 12:23 PM, Szymon Gatner wrote: Hi, I am surprised that this doesn't work: class Foo { void bar(string) {} } void bar(Foo foo, int i) { } auto foo = new Foo();

Re: Static if to compare two types are the exact same

2015-04-06 Thread Andrej Mitrovic via Digitalmars-d-learn
On 4/6/15, Jonathan via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: What's the best way to do this? I'm assuming this should be best practice: http://dlang.org/traits.html#isSame struct S { } writeln(__traits(isSame, S, S)); I'm not even sure when or why this trait was

[Issue 14419] [CTFE] Need infinite loop detection?

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14419 --- Comment #13 from Steven Schveighoffer schvei...@yahoo.com --- (In reply to Jens Bauer from comment #12) There is another detail here, which I just noticed: In the array, I do not give the function any arguments / parameters. -Shouldn't that

[Issue 14409] false positive Error: one path skips constructor

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14409 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a8bf624389f74d826d18e80d2140a1e7f6733470 fix Issue 14409 - false

[Issue 14376] [REG2.064] false positive Error: one path skips field

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14376 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8691c0c3579107b48e044e01ac340d86f00f885a fix Issue 14376 - false

[Issue 14409] false positive Error: one path skips constructor

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14409 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: fromStringz problem with gdc

2015-04-06 Thread bachmeier via Digitalmars-d-learn
On Monday, 6 April 2015 at 18:31:13 UTC, chardetm wrote: On Monday, 6 April 2015 at 17:55:42 UTC, Iain Buclaw wrote: On Monday, 6 April 2015 at 17:47:27 UTC, chardetm wrote: Hello everyone, I have a problem with the fromStringz function (std.string.fromStringz) when I try to compile with the

Re: Mid-term vision review

2015-04-06 Thread Dennis Ritchie via Digitalmars-d
On Monday, 6 April 2015 at 12:45:48 UTC, Martin Nowak wrote: On 04/06/2015 03:39 AM, Dennis Ritchie wrote: Thanks. I hope that in the near future will be a powerful D macrosystem. Don't expect too much enthusiasm about adding macros. Perhaps you're right. - D already has very good

Re: json parsing performance

2015-04-06 Thread Kingsley via Digitalmars-d
On Monday, 6 April 2015 at 20:26:15 UTC, cym13 wrote: On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote: I have read that std.json is pretty slow compared to other languages json parsers and I'm about to do a whole stack of json parsing and was wondering if anyone has got any benchmarks

Re: json parsing performance

2015-04-06 Thread Brad Anderson via Digitalmars-d
On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote: I have read that std.json is pretty slow compared to other languages json parsers and I'm about to do a whole stack of json parsing and was wondering if anyone has got any benchmarks to indicate what slow means compared to other

Re: Troubles with devisualization/window

2015-04-06 Thread ddos via Digitalmars-d-learn
On Monday, 6 April 2015 at 22:56:15 UTC, Rikki Cattermole wrote: On 7/04/2015 10:34 a.m., ddos wrote: it's getting warmer, window doesnt freeze anymore and opengl calls don't crash the window, but it's still all white after calling glClearColor(1,0,1,1); glClear(GL_COLOR_BUFFER_BIT |

getting started with std.csv

2015-04-06 Thread gjansen via Digitalmars-d-learn
Hi. I'm a D newbie(!) coming from a Fortran/C/Python background. I'm struggling with the many new concepts needed in order to make any sense out of the documentation or traceback messages (ranges/templates/...). For example, the std.csv documentation is great but all the examples read from a

Re: unittests are really part of the build, not a special run

2015-04-06 Thread Leandro Lucarella via Digitalmars-d
On Monday, 30 March 2015 at 23:26:38 UTC, Dicebot wrote: And if you suggest to build both test and normal build as part of single compiler call (building test version silently in the background) this is also very confusing addition hardly worth its gain. Making the format of unittest

Re: Troubles with devisualization/window

2015-04-06 Thread Rikki Cattermole via Digitalmars-d-learn
On 7/04/2015 10:34 a.m., ddos wrote: it's getting warmer, window doesnt freeze anymore and opengl calls don't crash the window, but it's still all white after calling glClearColor(1,0,1,1); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); updated src:

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: json parsing performance

2015-04-06 Thread Andrei Alexandrescu via Digitalmars-d
On 4/6/15 2:09 PM, Brad Anderson wrote: On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote: I have read that std.json is pretty slow compared to other languages json parsers and I'm about to do a whole stack of json parsing and was wondering if anyone has got any benchmarks to indicate

Re: Standardpaths library

2015-04-06 Thread Marco Leise via Digitalmars-d-announce
Am Sun, 05 Apr 2015 12:39:04 + schrieb FreeSlave freeslav...@gmail.com: On Sunday, 5 April 2015 at 11:42:42 UTC, Marco Leise wrote: is this Windows? return executable_path That depends on what do you understand by data. The data I was referring to is the stuff that is installed with

DConf: register now!

2015-04-06 Thread Andrei Alexandrescu via Digitalmars-d
Hello, We're gearing up for a great event this year! Check the conference programme at http://dconf.org/2015/schedule/index.html. We have quite a few registration slots opened, and we'll need to put a deadline to registration for catering planning purposes. We'll announce the date soon.

Re: unittests are really part of the build, not a special run

2015-04-06 Thread Andrei Alexandrescu via Digitalmars-d
On 4/6/15 3:16 PM, Leandro Lucarella wrote: On Monday, 30 March 2015 at 23:26:38 UTC, Dicebot wrote: And if you suggest to build both test and normal build as part of single compiler call (building test version silently in the background) this is also very confusing addition hardly worth its

Re: OpenVG bindings

2015-04-06 Thread ddos via Digitalmars-d-announce
On Saturday, 4 April 2015 at 02:47:46 UTC, Rikki Cattermole wrote: On 4/04/2015 11:53 a.m., ddos wrote: Hi folks, today i've created my first dlang library ^_^ a binding to the OpenVG library standard. The referenced implementation is ShivaVG which allows to draw vector graphics within an

Re: Troubles with devisualization/window

2015-04-06 Thread ddos via Digitalmars-d-learn
it's getting warmer, window doesnt freeze anymore and opengl calls don't crash the window, but it's still all white after calling glClearColor(1,0,1,1); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); updated src:

Re: Troubles with devisualization/window

2015-04-06 Thread Rikki Cattermole via Digitalmars-d-learn
On 7/04/2015 10:07 a.m., ddos wrote: Hi! i'm trying to get devisualization/window [1] working with some simple opengl calls. I have created a windows with opengl context using Window window = new Window(800, 600, My window!w, WindowContextType.Opengl); If i run writeln(type: , context.type);

Re: OpenVG bindings

2015-04-06 Thread ddos via Digitalmars-d-announce
On Saturday, 4 April 2015 at 09:24:29 UTC, Baz wrote: On Friday, 3 April 2015 at 22:53:51 UTC, ddos wrote: Hi folks, today i've created my first dlang library ^_^ a binding to the OpenVG library standard. The referenced implementation is ShivaVG which allows to draw vector graphics within an

Why I'm Excited about D

2015-04-06 Thread Adam Hawkins via Digitalmars-d
Hello everyone, this is my first post on the forum. I've been investigating the language for the past few weeks. I was able to complete my first useful program thanks to very helpful people in #d on IRC . The experience made me very interested in the language and improving the community around

Re: DConf: register now!

2015-04-06 Thread w0rp via Digitalmars-d
On Monday, 6 April 2015 at 23:01:36 UTC, Andrei Alexandrescu wrote: Hello, We're gearing up for a great event this year! Check the conference programme at http://dconf.org/2015/schedule/index.html. We have quite a few registration slots opened, and we'll need to put a deadline to

Troubles with devisualization/window

2015-04-06 Thread ddos via Digitalmars-d-learn
Hi! i'm trying to get devisualization/window [1] working with some simple opengl calls. I have created a windows with opengl context using Window window = new Window(800, 600, My window!w, WindowContextType.Opengl); If i run writeln(type: , context.type); writeln(toolkit version: ,

Re: Why I'm Excited about D

2015-04-06 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 7 April 2015 at 00:15:51 UTC, w0rp wrote: [...]and runtime templates. The last two haven't been written yet. Really? Runtime templates aren't even hard to implement What I do with my web libs is use a minimal templating system based on dom.d. Basic things are inserted with

Re: Why I'm Excited about D

2015-04-06 Thread Rikki Cattermole via Digitalmars-d
On 7/04/2015 11:51 a.m., Adam Hawkins wrote: Hello everyone, this is my first post on the forum. I've been investigating the language for the past few weeks. I was able to complete my first useful program thanks to very helpful people in #d on IRC . The experience made me very interested in the

Re: Why I'm Excited about D

2015-04-06 Thread Jens Bauer via Digitalmars-d
On Tuesday, 7 April 2015 at 00:28:11 UTC, Rikki Cattermole wrote: I was slightly surprised that you didn't mention CTFE in there as it is one of D's unique and powerful features. But only because I'm a little invested https://leanpub.com/ctfe in it. It is very cool, that you can generate

Boundaries - Gary Bernhardt

2015-04-06 Thread Brian Schott via Digitalmars-d
https://www.destroyallsoftware.com/talks/boundaries This is one of the best arguments for writing D-style code that I've seen. This is funny because it doesn't mention D at all.

Re: Why I'm Excited about D

2015-04-06 Thread Jens Bauer via Digitalmars-d
On Tuesday, 7 April 2015 at 00:57:09 UTC, Rikki Cattermole wrote: CTFE could have some pretty awesome applications for embedded I suspect. After all, you can pregenerate data structures ext. For faster execution. Yes, they're particularly useful for embedded devices. I've often used tables in

Re: Strange behavior std.range.takeNone

2015-04-06 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 7 April 2015 at 02:24:00 UTC, Dennis Ritchie wrote: Is it OK? Although, perhaps, everything is fine. I just thought that creates takeNone not string type string, and the string array of type string[]. import std.stdio : writeln; void main() { string s; s ~= 5;

Re: DIP76: Autodecode Should Not Throw

2015-04-06 Thread Vladimir Panteleev via Digitalmars-d
On Tuesday, 7 April 2015 at 04:05:38 UTC, Vladimir Panteleev wrote: On Tuesday, 7 April 2015 at 03:17:26 UTC, Walter Bright wrote: http://wiki.dlang.org/DIP76 I am against this. It can lead to silent irreversible data corruption. Instead, I would like to suggest promoting the use of

Re: DIP76: Autodecode Should Not Throw

2015-04-06 Thread Vladimir Panteleev via Digitalmars-d
On Tuesday, 7 April 2015 at 03:17:26 UTC, Walter Bright wrote: http://wiki.dlang.org/DIP76 I am against this. It can lead to silent irreversible data corruption.

Re: Troubles with devisualization/window

2015-04-06 Thread Rikki Cattermole via Digitalmars-d-learn
On 7/04/2015 12:10 p.m., ddos wrote: On Monday, 6 April 2015 at 22:56:15 UTC, Rikki Cattermole wrote: On 7/04/2015 10:34 a.m., ddos wrote: it's getting warmer, window doesnt freeze anymore and opengl calls don't crash the window, but it's still all white after calling glClearColor(1,0,1,1);

Re: json parsing performance

2015-04-06 Thread weaselcat via Digitalmars-d
On Monday, 6 April 2015 at 21:09:32 UTC, Brad Anderson wrote: On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote: I have read that std.json is pretty slow compared to other languages json parsers and I'm about to do a whole stack of json parsing and was wondering if anyone has got any

Re: Why I'm Excited about D

2015-04-06 Thread Rikki Cattermole via Digitalmars-d
On 7/04/2015 12:52 p.m., Jens Bauer wrote: On Tuesday, 7 April 2015 at 00:28:11 UTC, Rikki Cattermole wrote: I was slightly surprised that you didn't mention CTFE in there as it is one of D's unique and powerful features. But only because I'm a little invested https://leanpub.com/ctfe in it.

Re: D1 - D2 Code converter

2015-04-06 Thread jicman via Digitalmars-d-learn
On Monday, 6 April 2015 at 20:48:05 UTC, Dicebot wrote: On Monday, 6 April 2015 at 20:25:39 UTC, jicman wrote: Greetings! Has anyone written any quick program to convert d1 code to d2? I believe it will be a fine piece of program. :-) Thanks. josé It is surprisingly difficult, to the

Strange behavior std.range.takeNone

2015-04-06 Thread Dennis Ritchie via Digitalmars-d-learn
Hi, Is it OK? - import std.stdio : writeln; import std.range : takeNone; void main() { auto s = takeNone(test); s ~= 5; writeln(s); // prints ♣ } - Windows 8.1 x64, DMD 2.067.0

Re: Why I'm Excited about D

2015-04-06 Thread w0rp via Digitalmars-d
On Monday, 6 April 2015 at 23:51:17 UTC, Adam Hawkins wrote: Hello everyone, this is my first post on the forum. I've been investigating the language for the past few weeks. I was able to complete my first useful program thanks to very helpful people in #d on IRC . The experience made me very

Re: Why I'm Excited about D

2015-04-06 Thread Jens Bauer via Digitalmars-d
On Monday, 6 April 2015 at 23:51:17 UTC, Adam Hawkins wrote: Hello everyone, this is my first post on the forum. Then as a fellow newcomer to D, let me be the first to welcome you. :) I wrote a blog post on why I'm excited about D. You can read it here:

Re: Why I'm Excited about D

2015-04-06 Thread bachmeier via Digitalmars-d
On Monday, 6 April 2015 at 23:51:17 UTC, Adam Hawkins wrote: Hello everyone, this is my first post on the forum. I've been investigating the language for the past few weeks. I was able to complete my first useful program thanks to very helpful people in #d on IRC . The experience made me very

Re: Why I'm Excited about D

2015-04-06 Thread Meta via Digitalmars-d
On Monday, 6 April 2015 at 23:51:17 UTC, Adam Hawkins wrote: Hello everyone, this is my first post on the forum. I've been investigating the language for the past few weeks. I was able to complete my first useful program thanks to very helpful people in #d on IRC . The experience made me very

Re: Boundaries - Gary Bernhardt

2015-04-06 Thread deadalnix via Digitalmars-d
On Tuesday, 7 April 2015 at 00:51:36 UTC, Brian Schott wrote: https://www.destroyallsoftware.com/talks/boundaries This is one of the best arguments for writing D-style code that I've seen. This is funny because it doesn't mention D at all. Good talk, however, his plus example is a bad one.

DIP76: Autodecode Should Not Throw

2015-04-06 Thread Walter Bright via Digitalmars-d
http://wiki.dlang.org/DIP76

Re: Why I'm Excited about D

2015-04-06 Thread Rikki Cattermole via Digitalmars-d
On 7/04/2015 1:02 p.m., Jens Bauer wrote: On Tuesday, 7 April 2015 at 00:57:09 UTC, Rikki Cattermole wrote: CTFE could have some pretty awesome applications for embedded I suspect. After all, you can pregenerate data structures ext. For faster execution. Yes, they're particularly useful for

[Issue 12891] add atomicFetchAdd and atomicFetchSub to core.atomic

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12891 --- Comment #11 from Jonathan Dunlap jad...@gmail.com --- I've created a placeholder PR for this work below: https://github.com/D-Programming-Language/druntime/pull/1208 Again, my current GH branch for this is here:

Re: getting started with std.csv

2015-04-06 Thread yazd via Digitalmars-d-learn
On Tuesday, 7 April 2015 at 05:49:48 UTC, yazd wrote: I got this to work with: ``` import std.stdio, std.file, std.csv, std.range; void main() { std.file.write(test.csv, 0,1,abc\n2,3,def); scope(exit) std.file.remove(test.csv); static struct Rec { int a, b; char[] c; }

[Issue 12891] add atomicFetchAdd and atomicFetchSub to core.atomic

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12891 Jonathan Dunlap jad...@gmail.com changed: What|Removed |Added Assignee|nob...@puremagic.com|jad...@gmail.com ---

Re: json parsing performance

2015-04-06 Thread Brad Anderson via Digitalmars-d
On Tuesday, 7 April 2015 at 00:36:30 UTC, weaselcat wrote: On Monday, 6 April 2015 at 21:09:32 UTC, Brad Anderson wrote: On Monday, 6 April 2015 at 20:20:06 UTC, Kingsley wrote: I have read that std.json is pretty slow compared to other languages json parsers and I'm about to do a whole stack

[Issue 12891] add atomicFetchAdd and atomicFetchSub to core.atomic

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12891 Jonathan Dunlap jad...@gmail.com changed: What|Removed |Added Status|NEW |ASSIGNED --- Comment #9

Coedit - beta 1 released

2015-04-06 Thread Baz via Digitalmars-d-announce
I'm pleased to announce the first beta of Coedit, the small IDE for the D programming language, based on DMD. This version introduces: - the option editor. - metad, a meta GIT repository composed of static libraries easily buildable with Coedit. - DCD integration: call tips and DDoc comments

Re: getting started with std.csv

2015-04-06 Thread yazd via Digitalmars-d-learn
I got this to work with: ``` import std.stdio, std.file, std.csv, std.range; void main() { std.file.write(test.csv, 0,1,abc\n2,3,def); scope(exit) std.file.remove(test.csv); static struct Rec { int a, b; char[] c; } auto file = File(test.csv, r);

Re: DConf: register now!

2015-04-06 Thread Daniel Murphy via Digitalmars-d
w0rp wrote in message news:zynuvcoprfgplvboq...@forum.dlang.org... I spotted a typo in the schedule. Daniel Murphy's talk says Motivation for converting the project to C++. That should say to D. My secret plan is to convert it back to C++ after we've converted it to D.

Re: DUB 0.9.23 released

2015-04-06 Thread Martin Nowak via Digitalmars-d-announce
On Monday, 6 April 2015 at 08:21:46 UTC, Sönke Ludwig wrote: Apart from that, the major additions are: We also made dub a lot faster https://github.com/D-Programming-Language/dub/pull/388.

Re: What's the deal with -boundscheck?

2015-04-06 Thread Kagamin via Digitalmars-d
On Monday, 6 April 2015 at 06:25:14 UTC, Brad Anderson wrote: You made that change back in 2009. https://issues.dlang.org/show_bug.cgi?id=3407 -release used to turn off all bounds checking. Andrei wanted it to stay in safe code at least so you added -noboundscheck to appease those that

Re: What's the deal with -boundscheck?

2015-04-06 Thread Vladimir Panteleev via Digitalmars-d
On Monday, 6 April 2015 at 05:15:43 UTC, Walter Bright wrote: At some point, -release was changed so that bounds checking was turned off for all but @safe code. Not quite: https://issues.dlang.org/show_bug.cgi?id=3407

DUB 0.9.23 released

2015-04-06 Thread Sönke Ludwig via Digitalmars-d-announce
The new version contains some important bug fixes for sub modules and overridden string imports, as well as some other major fixes. Apart from that, the major additions are: - copyFiles now get hard linked instead of copied and whole directories can be copied in addition to individual

Re: DUB 0.9.23 released

2015-04-06 Thread Sönke Ludwig via Digitalmars-d-announce
Am 06.04.2015 um 11:03 schrieb Vladimir Panteleev: On Monday, 6 April 2015 at 08:21:46 UTC, Sönke Ludwig wrote: The new version contains some important bug fixes for sub modules and overridden string imports, as well as some other major fixes. Congratulations! So, 2.068 will include Dub,

Re: What's the deal with -boundscheck?

2015-04-06 Thread Brad Anderson via Digitalmars-d
On Monday, 6 April 2015 at 05:15:43 UTC, Walter Bright wrote: On 4/5/2015 7:13 PM, Andrei Alexandrescu wrote: I've spent the better part of yesterday and today debugging a complex matter involving pointers, reduced to this: ../dmd/src/dmd -conf= -I../druntime/import -w -dip25 -m64 -O

Re: What's the deal with -boundscheck?

2015-04-06 Thread Walter Bright via Digitalmars-d
On 4/5/2015 10:15 PM, Walter Bright wrote: I read the code to figure out what was happening. The logic in the code was pretty obtuse. https://github.com/D-Programming-Language/dmd/pull/4562

Re: DUB 0.9.23 released

2015-04-06 Thread Vladimir Panteleev via Digitalmars-d-announce
On Monday, 6 April 2015 at 08:21:46 UTC, Sönke Ludwig wrote: The new version contains some important bug fixes for sub modules and overridden string imports, as well as some other major fixes. Congratulations! So, 2.068 will include Dub, right?

Re: What's the deal with -boundscheck?

2015-04-06 Thread Walter Bright via Digitalmars-d
On 4/5/2015 11:08 PM, Vladimir Panteleev wrote: On Monday, 6 April 2015 at 05:15:43 UTC, Walter Bright wrote: At some point, -release was changed so that bounds checking was turned off for all but @safe code. Not quite: https://issues.dlang.org/show_bug.cgi?id=3407

Re: What's the deal with -boundscheck?

2015-04-06 Thread Walter Bright via Digitalmars-d
On 4/5/2015 11:25 PM, Brad Anderson wrote: On Monday, 6 April 2015 at 05:15:43 UTC, Walter Bright wrote: At some point, -release was changed so that bounds checking was turned off for all but @safe code. You made that change back in 2009. https://issues.dlang.org/show_bug.cgi?id=3407 I sure

How to generate D binding with SWIG?

2015-04-06 Thread Suliman via Digitalmars-d-learn
I am still trying to get GDAL[1] work with D. I found tool for automatic binding generation it's named SWIG[2]. I looked at gdal binding examples, and look like all of them are automatically generated with SWIG. I am not sure, but possible binding is generation by one few lines, like is

Re: Mid-term vision review

2015-04-06 Thread Benjamin Thaut via Digitalmars-d
On Monday, 6 April 2015 at 02:11:08 UTC, Daniel Murphy wrote: Yes, exactly. If I get my way, the conversion tool will be put into the dmd repository for a while, and it should be possible to automatically upgrade a pull request with rebase+convert+rebase. This method will be properly

Re: DUB 0.9.23 released

2015-04-06 Thread Sönke Ludwig via Digitalmars-d-announce
Am 06.04.2015 um 10:33 schrieb Martin Nowak: On Monday, 6 April 2015 at 08:21:46 UTC, Sönke Ludwig wrote: Apart from that, the major additions are: We also made dub a lot faster https://github.com/D-Programming-Language/dub/pull/388. Didn't realize that this didn't make it into the previous

Re: Benchmark of D against other languages

2015-04-06 Thread Manu via Digitalmars-d
On 3 April 2015 at 05:00, deadalnix via Digitalmars-d digitalmars-d@puremagic.com wrote: On Thursday, 2 April 2015 at 09:06:52 UTC, Manu wrote: virtual by default is completely wrong for D. And don't say 'speculative' devirtualisation. What an abomination! Just fix the problem; don't have

Re: DUB 0.9.23 released

2015-04-06 Thread Jordi Sayol via Digitalmars-d-announce
El 06/04/15 a les 10:21, Sönke Ludwig via Digitalmars-d-announce ha escrit: The new version contains some important bug fixes for sub modules and overridden string imports, as well as some other major fixes. Congratulations for this new release! Available for Debian/Ubuntu at

[Issue 14417] Wrong argument type for _d_cover_register2

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14417 --- Comment #1 from Johan Engelen goejenda...@zonnet.nl --- Created attachment 1509 -- https://issues.dlang.org/attachment.cgi?id=1509action=edit Patch for fix proposal 1 A patch explaining what I mean with option 1. --

[Issue 14416] .sizeof yields 1 for uninstantiated struct templates

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14416 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull Hardware|x86

[Issue 14381] It is too difficult to contribute to the auto-tester

2015-04-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14381 --- Comment #6 from Martin Nowak c...@dawg.eu --- We could move the build/test scripts into the DMD/druntime/phobos repos, that would help with things such as this. https://github.com/D-Programming-Language/druntime/pull/1206 --

  1   2   >