Re: .sort vs sort(): std.algorithm not up to the task?

2017-06-08 Thread 9il via Digitalmars-d-learn
On Thursday, 8 June 2017 at 01:57:47 UTC, Andrew Edwards wrote: Ranges may be finite or infinite but, while the destination may be unreachable, we can definitely tell how far we've traveled. So why doesn't this work? import std.traits; import std.range; void main() { string[string] aa;

Re: D for Web Development?

2017-06-08 Thread Nicholas Wilson via Digitalmars-d-learn
Welcome! On Thursday, 8 June 2017 at 07:32:44 UTC, Michael Reiland wrote: A few questions: - Is vibe.d the recommended way of doing web work? Yes. Adam D. Ruppe also has some easy to use libraries that may suit your need. - Is that book worth purchasing? Don't know. - Does D have a

Re: .sort vs sort(): std.algorithm not up to the task?

2017-06-08 Thread Russel Winder via Digitalmars-d-learn
On Thu, 2017-06-08 at 00:23 -0700, Jonathan M Davis via Digitalmars-d- learn wrote: > […] > > release is a member of SortedRange. You don't have to import it > separately. > You have it automatically by virtue of the fact that sort returns a > SortedRange. And unlike calling array, it doesn't

Re: The reason for SIGSEGV function pointer problem

2017-06-08 Thread Russel Winder via Digitalmars-d-learn
Thanks also to Paolo Invernizzi and ag0aep6g for answering with a similar response. Using Mike's response as it has extra detail. On Wed, 2017-06-07 at 20:00 +0200, Mike Wey via Digitalmars-d-learn wrote: > On 06/07/2017 06:50 PM, Russel Winder via Digitalmars-d-learn wrote: > > So why isn't a

Re: Concept proposal: Safely catching error

2017-06-08 Thread Olivier FAURE via Digitalmars-d
On Wednesday, 7 June 2017 at 19:45:05 UTC, ag0aep6g wrote: You gave the argument against catching out-of-bounds errors as: "it means an invariant is broken, which means the code surrounding it probably makes invalid assumptions and shouldn't be trusted." That line of reasoning applies to

SCons, Python 3, and D

2017-06-08 Thread Russel Winder via Digitalmars-d
In case anyone has missed recent news, SCons seems now to work without any problems using Python 3 (the one true Python – until Python 4, obviously). I am using Python 3 to run all my SCons D builds. Obviously this relates to using a checkout of the mainline Mercurial repository and using default

Ali's talk C++Now 2017: Competitive Advantage with D on Reddit!

2017-06-08 Thread Walter Bright via Digitalmars-d-announce
https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/

Re: sqlite3 vs. sqlite-d

2017-06-08 Thread Russel Winder via Digitalmars-d
On Wed, 2017-06-07 at 20:40 +, Stefan Koch via Digitalmars-d wrote: > On Wednesday, 7 June 2017 at 20:12:22 UTC, cym13 wrote: > > > It should be noted that the benchmark isn't fair, it favours  > > the sqlite3 implementation as parsing and preparing the  > > statement isn't measured. And yes,

Re: .sort vs sort(): std.algorithm not up to the task?

2017-06-08 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, June 08, 2017 04:07:22 Andrew Edwards via Digitalmars-d-learn wrote: > On Thursday, 8 June 2017 at 03:40:08 UTC, Jonathan M Davis wrote: > > On Thursday, June 08, 2017 03:15:11 Andrew Edwards via > > > > Digitalmars-d-learn wrote: > >> I completely understand the differences between

D for Web Development?

2017-06-08 Thread Michael Reiland via Digitalmars-d-learn
Hey guys, I'm looking for a web solution that's: 1. Supported on Linux 2. Statically typed, 3. Reasonably performant, 4. Reasonably productive. 5. Simplicity (in terms of infrastructure and the language itself). The contenders as I see them are .Net Core, Go, and D. I know next to nothing

Re: import statement placement

2017-06-08 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2017-06-07 at 10:08 -0700, H. S. Teoh via Digitalmars-d-learn wrote: > On Wed, Jun 07, 2017 at 01:17:39PM +, Nicholas Wilson via > Digitalmars-d-learn wrote: > > On Wednesday, 7 June 2017 at 12:39:07 UTC, Russel Winder wrote: > > > Are there any idiom rules as to where to put import

Re: D for Web Development?

2017-06-08 Thread Mike Parker via Digitalmars-d-learn
On Thursday, 8 June 2017 at 07:32:44 UTC, Michael Reiland wrote: - Is vibe.d the recommended way of doing web work? Yes - Is that book worth purchasing? Yes - Does D have a good library for accessing Postgres? I see several listed but I don't know what the most stable would be for

Re: .sort vs sort(): std.algorithm not up to the task?

2017-06-08 Thread Andrew Edwards via Digitalmars-d-learn
On Thursday, 8 June 2017 at 07:23:27 UTC, Jonathan M Davis wrote: release is a member of SortedRange. You don't have to import it separately. You have it automatically by virtue of the fact that sort returns a SortedRange. And unlike calling array, it doesn't copy the entire range or

Re: .sort vs sort(): std.algorithm not up to the task?

2017-06-08 Thread Russel Winder via Digitalmars-d-learn
On Wed, 2017-06-07 at 19:39 -0700, Jonathan M Davis via Digitalmars-d- learn wrote: > […] > Even better. I hadn't realized that such a function had been added. > Another import from Python. :-) -- Russel. = Dr Russel

[Issue 17483] New: std.numeric.gcd cannot inline function

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17483 Issue ID: 17483 Summary: std.numeric.gcd cannot inline function Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

[Issue 17484] New: high penalty for vbroadcastsd with -mcpu=avx

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17484 Issue ID: 17484 Summary: high penalty for vbroadcastsd with -mcpu=avx Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal

Re: Ali's talk C++Now 2017: Competitive Advantage with D on Reddit!

2017-06-08 Thread Stanislav Blinov via Digitalmars-d-announce
On Friday, 9 June 2017 at 05:07:37 UTC, Ali Çehreli wrote: On 06/08/2017 01:39 AM, Walter Bright wrote: https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/ Can someone verify and make corrections to my response to LordJebbs please:

Re: Compile-Time Sort in D

2017-06-08 Thread Stefan Koch via Digitalmars-d-announce
On Friday, 9 June 2017 at 01:34:14 UTC, Mike Parker wrote: On Thursday, 8 June 2017 at 19:07:50 UTC, cym13 wrote: Seeing that the one and only D example in the nim article is a broken one (using static instead of enum or static immutable for 'b') we should have started with a correct

[Issue 17482] New: [REG 2.074] comile error: Comparing Nullable!Variant with basic type

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17482 Issue ID: 17482 Summary: [REG 2.074] comile error: Comparing Nullable!Variant with basic type Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Compile-Time Sort in D

2017-06-08 Thread Mike Parker via Digitalmars-d-announce
On Thursday, 8 June 2017 at 19:07:50 UTC, cym13 wrote: Seeing that the one and only D example in the nim article is a broken one (using static instead of enum or static immutable for 'b') we should have started with a correct example before showing the broken one... Good to know for next

Re: CTFE Status 2

2017-06-08 Thread Stefan Koch via Digitalmars-d
On Thursday, 16 February 2017 at 21:05:51 UTC, Stefan Koch wrote: [ ... ] Hi there, I just pulled another all nighter. I found a bug in the code that was supposed to adjust the values of || and &&. As will as a mixup in the error messages for overlapping slice-assignment. Both are fixed. I

Re: D for Web Development?

2017-06-08 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 8 June 2017 at 08:36:38 UTC, Nicholas Wilson wrote: Yes. Adam D. Ruppe also has some easy to use libraries that may suit your need. Indeed, my cgi.d, database.d, and postgres.d would give a foundation. https://github.com/adamdruppe/arsd you download the individual files and

mysql-native v1.1.0 - small bugfix update

2017-06-08 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-announce
mysql-native is a native D client driver for MySQL/MariaDB. It works with or without Vibe.d. Small bugfix update: - Fixed: #99: Update dub.sdl to allow vibe-d 0.8.* releases. - Fixed: #111: NEWDECIMAL type returns the wrong value. Since this type is intended as arbitrary precision, the

Need way to compare classes, and primitive types in bst Template

2017-06-08 Thread Mark via Digitalmars-d-learn
Ok. So I have a BST template, and it passes my tests. However, if you look at how I insert the data into the BST, you'll quickly notice the problem I have. https://dpaste.dzfl.pl/ff58876ce213 Keep in mind I just pasted that stack in there because I use it in my last unittest at the bottom.

Re: Need way to compare classes, and primitive types in bst Template

2017-06-08 Thread ag0aep6g via Digitalmars-d-learn
On 06/09/2017 05:32 AM, Mark wrote: https://dpaste.dzfl.pl/ff58876ce213 [...] What Id like to do is this: auto tree = new BSTbase!int; ... tree.insert(7); and auto Tree2 = new BSTbase!Aclass; ... Tree2.insert(Aclassobject); What I have is: Tree.insert(7, cast(real) 7); and

[Issue 17478] Socket.select return a write status change, but no connection is established.

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17478 spring changed: What|Removed |Added Status|NEW |RESOLVED

Re: Ali's talk C++Now 2017: Competitive Advantage with D on Reddit!

2017-06-08 Thread Ali Çehreli via Digitalmars-d-announce
On 06/08/2017 01:39 AM, Walter Bright wrote: https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/ Can someone verify and make corrections to my response to LordJebbs please:

Re: DMD [-O flag] vs. [memory allocation in a synchronized class]

2017-06-08 Thread realhet via Digitalmars-d-learn
On Thursday, 8 June 2017 at 10:48:41 UTC, ketmar wrote: worksforme with -O, and with -O -inline. I forgot to mention, that I'm generating win32 output. DMD32 D Compiler v2.074.0

Re: Concept proposal: Safely catching error

2017-06-08 Thread Steven Schveighoffer via Digitalmars-d
On 6/7/17 12:20 PM, Olivier FAURE wrote: On Monday, 5 June 2017 at 14:05:27 UTC, Steven Schveighoffer wrote: I don't think this will work. Only throwing Error makes a function nothrow. A nothrow function may not properly clean up the stack while unwinding. Not because the stack unwinding code

[Issue 16615] std.process is missing functionality for child processes

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16615 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 17479] Public constructor for std.process.Pid

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17479 Vladimir Panteleev changed: What|Removed |Added See Also|

[Issue 17480] [Downloads]

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17480 --- Comment #2 from Martin Tschierschke --- Hmm, I tried curl -fsS https://dlang.org/install.sh | bash -s dmd But it seamed that no dub was included. So I used sudo dpkg -i dmd_2.074.1-0_amd64.deb after downloading it with

Re: Concept proposal: Safely catching error

2017-06-08 Thread Steven Schveighoffer via Digitalmars-d
On 6/8/17 9:42 AM, Olivier FAURE wrote: On Thursday, 8 June 2017 at 12:20:19 UTC, Steven Schveighoffer wrote: Hm... if you locked an object that was passed in on the stack, for instance, there is no guarantee the object gets unlocked. This wouldn't be allowed unless the object was duplicated

Re: sqlite3 vs. sqlite-d

2017-06-08 Thread Russel Winder via Digitalmars-d
On Thu, 2017-06-08 at 11:36 +, Stefan Koch via Digitalmars-d wrote: > […] > The Alternative is not doing SQL at all. > But building the queries inside your code. Exactly my point. Using SQLAlchemy made me actually enjoy writing database code. Which I did last year having avoided it since I

Re: Concept proposal: Safely catching error

2017-06-08 Thread Olivier FAURE via Digitalmars-d
On Thursday, 8 June 2017 at 12:20:19 UTC, Steven Schveighoffer wrote: Hm... if you locked an object that was passed in on the stack, for instance, there is no guarantee the object gets unlocked. This wouldn't be allowed unless the object was duplicated / created inside the try block.

Re: Concept proposal: Safely catching error

2017-06-08 Thread Olivier FAURE via Digitalmars-d
On Thursday, 8 June 2017 at 13:02:38 UTC, ag0aep6g wrote: Catching the resulting error is @safe when you throw the int* away. So if f is `pure` and you make sure that the arguments don't survive the `try` block, you're good, because f supposedly cannot have reached anything else. This is your

SCons and D

2017-06-08 Thread Russel Winder via Digitalmars-d
It seems I am on a bit of a roll getting changesets relating to D support for SCons into an appropriate state so that they get merged into the mainline SCons repository. So maybe now is a time to get any "pet peeves" with D support in SCons fixed. For myself, I am currently working on a new tool

Re: SCons and D

2017-06-08 Thread bachmeier via Digitalmars-d
On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote: It seems I am on a bit of a roll getting changesets relating to D support for SCons into an appropriate state so that they get merged into the mainline SCons repository. So maybe now is a time to get any "pet peeves" with D support

DMD [-O flag] vs. [memory allocation in a synchronized class]

2017-06-08 Thread realhet via Digitalmars-d-learn
Hi, This code works well with the unoptimized compilation with DMD. import std.array; synchronized class Obj{ private int[] arr; void trigger(){ arr.length += 1; } } void main(){ auto k = new shared Obj; k.trigger; } And when I use the -O option, it shows the following error in the

Re: DMD [-O flag] vs. [memory allocation in a synchronized class]

2017-06-08 Thread realhet via Digitalmars-d-learn
I've managed to narrow the problem even more: //win32 dmd -O class Obj{ synchronized void trigger(){ new ubyte[1]; } } void main(){ auto k = new shared Obj; k.trigger; } This time I got a more sophisticated error message: object.Error@(0): Access Violation 0x7272456D

[Issue 17479] Public constructor for std.process.Pid

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17479 Vladimir Panteleev changed: What|Removed |Added CC|

[Issue 17480] New: [Downloads]

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17480 Issue ID: 17480 Summary: [Downloads] Product: D Version: D2 Hardware: All URL: http://dlang.org/ OS: All Status: NEW Severity: enhancement

Re: sqlite3 vs. sqlite-d

2017-06-08 Thread Ozan (O/N/S) via Digitalmars-d
On Wednesday, 7 June 2017 at 19:16:07 UTC, Stefan Koch wrote: On Wednesday, 7 June 2017 at 19:10:26 UTC, Ozan wrote: On Wednesday, 7 June 2017 at 17:51:30 UTC, Stefan Koch wrote: Hi guys I made a small video. Mature and heavily optimized C library vs. young D upstart. See for yourself how it

[Issue 17479] Public constructor for std.process.Pid

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17479 Vladimir Panteleev changed: What|Removed |Added Keywords||pull ---

Re: DMD [-O flag] vs. [memory allocation in a synchronized class]

2017-06-08 Thread ketmar via Digitalmars-d-learn
realhet wrote: On Thursday, 8 June 2017 at 10:48:41 UTC, ketmar wrote: worksforme with -O, and with -O -inline. I forgot to mention, that I'm generating win32 output. DMD32 D Compiler v2.074.0 mine: GNU/Linux, 32 bit, dmd git HEAD.

[Issue 16615] std.process is missing functionality for child processes

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16615 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/71ca4c5b1428e6b4a9b2d89586cd8851c48619a6 Partial Fix For Issue 16615 - convert os pid to

Re: .sort vs sort(): std.algorithm not up to the task?

2017-06-08 Thread Steven Schveighoffer via Digitalmars-d-learn
On 6/7/17 9:57 PM, Andrew Edwards wrote: Ranges may be finite or infinite but, while the destination may be unreachable, we can definitely tell how far we've traveled. So why doesn't this work? import std.traits; import std.range; void main() { string[string] aa; // what others have

Re: vibe.d on Web Framework Benchmarks

2017-06-08 Thread Dominikus Dittes Scherkl via Digitalmars-d
On Wednesday, 7 June 2017 at 21:18:21 UTC, ketmar wrote: Ozan wrote: On Wednesday, 7 June 2017 at 09:44:55 UTC, Ali Çehreli wrote: Is there an issue with the tests? Surprised that vibe.d is not higher in the rating... https://www.techempower.com/benchmarks/#section=data-r14=ph=fortune

[Issue 17478] Socket.select return a write status change, but no connection is established.

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17478 Vladimir Panteleev changed: What|Removed |Added CC|

Re: D for Web Development?

2017-06-08 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-06-08 09:32, Michael Reiland wrote: A few questions: - Is vibe.d the recommended way of doing web work? Yes. - Is that book worth purchasing? Yes. - Does D have a good library for accessing Postgres? I see several listed but I don't know what the most stable would be for

Re: DMD [-O flag] vs. [memory allocation in a synchronized class]

2017-06-08 Thread ketmar via Digitalmars-d-learn
worksforme with -O, and with -O -inline.

[Issue 16615] std.process is missing functionality for child processes

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16615 github-bugzi...@puremagic.com changed: What|Removed |Added Status|ASSIGNED|RESOLVED

Re: sqlite3 vs. sqlite-d

2017-06-08 Thread Stefan Koch via Digitalmars-d
On Thursday, 8 June 2017 at 08:44:56 UTC, Russel Winder wrote: But what is D's equivalent to Python's SQLAlchemy? C++ now has sqlpp11. Anyone doing SQL code manipulation with strings in another language is doing it wrong. Internal DSLs FTW. The Alternative is not doing SQL at all. But

Re: Concept proposal: Safely catching error

2017-06-08 Thread ag0aep6g via Digitalmars-d
On 06/08/2017 11:27 AM, Olivier FAURE wrote: Contracts are made to preempt memory corruption, and to protect against *programming* errors; they're not recoverable because breaking a contract means that from now on the program is in a state that wasn't anticipated by the programmer. Which

[Issue 17480] [Downloads]

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17480 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 17399] core.checkedint.addu cannot inline function

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

Re: Concept proposal: Safely catching error

2017-06-08 Thread Jesse Phillips via Digitalmars-d
I want to start by stating that the discussion around being able to throw Error from nothrow functions and the compiler optimizations that follow is important to the thoughts below. The other aspect of array bounds checking is that those particular checks will not be added in -release. There

Re: Mutiple AliasSeq as input to template

2017-06-08 Thread jmh530 via Digitalmars-d-learn
On Wednesday, 7 June 2017 at 19:03:39 UTC, David Sanders wrote: You can use nested templates to process multiple AliasSeqs like so: [snip] Interesting approach also.

Re: Compile-Time Sort in D

2017-06-08 Thread cym13 via Digitalmars-d-announce
On Wednesday, 7 June 2017 at 21:47:58 UTC, John Carter wrote: On Monday, 5 June 2017 at 14:23:34 UTC, Mike Parker wrote: https://dlang.org/blog/2017/06/05/compile-time-sort-in-d/ Seems like you have inspired people... http://blog.zdsmith.com/posts/compiletime-sort-in-nim.html Seeing that

[Issue 17399] core.checkedint.addu cannot inline function

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17399 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/8ff0a0a185e0a7d0c04812cf916fbbe6615f792c fix Issue 17399 - core.checkedint.addu cannot inline function

Re: Compile-Time Sort in D

2017-06-08 Thread ag0aep6g via Digitalmars-d-announce
On 06/08/2017 09:07 PM, cym13 wrote: Seeing that the one and only D example in the nim article is a broken one (using static instead of enum or static immutable for 'b') we should have started with a correct example before showing the broken one... Good to know for next time. Broken? It

Re: sqlite3 vs. sqlite-d

2017-06-08 Thread Dejan Lekic via Digitalmars-d
On Thursday, 8 June 2017 at 13:37:41 UTC, Russel Winder wrote: Exactly my point. Using SQLAlchemy made me actually enjoy writing database code. Which I did last year having avoided it Using ORM like SQLAlchemy certainly has benefits but like any other ORM, it generates hideous SQL code,

Re: SCons and D

2017-06-08 Thread Russel Winder via Digitalmars-d
On Thu, 2017-06-08 at 14:37 +, bachmeier via Digitalmars-d wrote: > On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote: > > It seems I am on a bit of a roll getting changesets relating to  > > D support for SCons into an appropriate state so that they get  > > merged into the

Re: DMD [-O flag] vs. [memory allocation in a synchronized class]

2017-06-08 Thread Ivan Kazmenko via Digitalmars-d-learn
On Thursday, 8 June 2017 at 11:41:40 UTC, realhet wrote: I've managed to narrow the problem even more: //win32 dmd -O class Obj{ synchronized void trigger(){ new ubyte[1]; } } void main(){ auto k = new shared Obj; k.trigger; } This time I got a more sophisticated error message:

Re: Concept proposal: Safely catching error

2017-06-08 Thread Stanislav Blinov via Digitalmars-d
On Thursday, 8 June 2017 at 14:13:53 UTC, Steven Schveighoffer wrote: void foo(Mutex m, Data d) pure { synchronized(m) { // ... manipulate d } // no guarantee m gets unlocked } -Steve Isn't synchronized(m) not nothrow?

Re: Concept proposal: Safely catching error

2017-06-08 Thread ag0aep6g via Digitalmars-d
On 06/08/2017 04:02 PM, Olivier FAURE wrote: That's true. A "pure after cleanup" function is incompatible with catching Errors (unless we introduce a "scope(error)" keyword that also runs on errors, but that comes with other problems). Is pureMalloc supposed to be representative of pure

Re: sqlite3 vs. sqlite-d

2017-06-08 Thread Russel Winder via Digitalmars-d
On Thu, 2017-06-08 at 14:55 +, Dejan Lekic via Digitalmars-d wrote: > On Thursday, 8 June 2017 at 13:37:41 UTC, Russel Winder wrote: > > > Exactly my point. Using SQLAlchemy made me actually enjoy  > > writing database code. Which I did last year having avoided it > > Using ORM like

Re: sqlite3 vs. sqlite-d

2017-06-08 Thread Stefan Koch via Digitalmars-d
On Thursday, 8 June 2017 at 13:06:55 UTC, Ozan (O/N/S) wrote: Your sqlite-d solution would be complete if writing sqlite files are also possible. Ignore the SQL parsing stuff, it does not fit in a world of fast data processing. Writing or rather modifying sqlite-dbs is a bit harder then

Re: vibe.d on Web Framework Benchmarks

2017-06-08 Thread Ali Çehreli via Digitalmars-d
On 06/08/2017 05:09 AM, Dominikus Dittes Scherkl wrote: > Wow. Answer was actually visible before the OP. THAT is what I would > call fast. Did you use vibe.d? Your answer hasn't arrived yet. Using something other than vibe.d? :p Ali

Re: Concept proposal: Safely catching error

2017-06-08 Thread Steven Schveighoffer via Digitalmars-d
On 6/8/17 11:19 AM, Stanislav Blinov wrote: On Thursday, 8 June 2017 at 14:13:53 UTC, Steven Schveighoffer wrote: void foo(Mutex m, Data d) pure { synchronized(m) { // ... manipulate d } // no guarantee m gets unlocked } Isn't synchronized(m) not nothrow? You're right, it

Re: DMD [-O flag] vs. [memory allocation in a synchronized class]

2017-06-08 Thread Ivan Kazmenko via Digitalmars-d-learn
On Thursday, 8 June 2017 at 15:35:06 UTC, Ivan Kazmenko wrote: Perhaps a regression should be filed, or searched for, at issues.dlang.org. I can do it, but not right now, and would be glad if someone beats me to it. Reported: https://issues.dlang.org/show_bug.cgi?id=17481

[Issue 17481] New: [REG 2.069.0] synchronized: Access Violation with dmd -O on win32

2017-06-08 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17481 Issue ID: 17481 Summary: [REG 2.069.0] synchronized: Access Violation with dmd -O on win32 Product: D Version: D2 Hardware: x86 OS: Windows Status:

Re: .sort vs sort(): std.algorithm not up to the task?

2017-06-08 Thread Timon Gehr via Digitalmars-d-learn
On 08.06.2017 14:06, Steven Schveighoffer wrote: The issue here is that arrays are special. Arrays allow foreach(i, v; arr) and foreach(v; arr). Ranges in general do not. So there is no way to forward this capability via the range interface. Not only that, but foreach(i, v; arr) is much

Re: SCons, Python 3, and D

2017-06-08 Thread Nordlöw via Digitalmars-d
On Thursday, 8 June 2017 at 09:42:50 UTC, Russel Winder wrote: In case anyone has missed recent news, SCons seems now to work without any problems using Python 3 Nice. I am using Python 3 to run all my SCons D builds. Me too :)

Re: Ali's talk C++Now 2017: Competitive Advantage with D on Reddit!

2017-06-08 Thread Ali Çehreli via Digitalmars-d-announce
On 06/08/2017 01:29 PM, Wulfklaue wrote: On Thursday, 8 June 2017 at 08:39:58 UTC, Walter Bright wrote: https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/ Added to Hacker News ... https://news.ycombinator.com/item?id=14516927 That link doesn't work

Re: Ali's talk C++Now 2017: Competitive Advantage with D on Reddit!

2017-06-08 Thread Wulfklaue via Digitalmars-d-announce
On Thursday, 8 June 2017 at 08:39:58 UTC, Walter Bright wrote: https://www.reddit.com/r/programming/comments/6fz3yh/cnow_2017_competitive_advantage_with_d/ Added to Hacker News ... https://news.ycombinator.com/item?id=14516927

Re: SCons and D

2017-06-08 Thread bachmeier via Digitalmars-d
On Thursday, 8 June 2017 at 14:27:53 UTC, Russel Winder wrote: It seems I am on a bit of a roll getting changesets relating to D support for SCons into an appropriate state so that they get merged into the mainline SCons repository. So maybe now is a time to get any "pet peeves" with D support

Re: Ali's talk C++Now 2017: Competitive Advantage with D on Reddit!

2017-06-08 Thread Wulfklaue via Digitalmars-d-announce
On Thursday, 8 June 2017 at 20:38:33 UTC, Ali Çehreli wrote: On 06/08/2017 01:29 PM, Wulfklaue wrote: That link doesn't work for me. Besides, I've heard that it's better not to click through a link as HN either rates it lower or flags it as spam. Not sure though, I'm just contributing to

Re: Ali's talk C++Now 2017: Competitive Advantage with D on Reddit!

2017-06-08 Thread Wulfklaue via Digitalmars-d-announce
On Thursday, 8 June 2017 at 20:38:33 UTC, Ali Çehreli wrote: That link doesn't work for me. Besides, I've heard that it's better not to click through a link as HN either rates it lower or flags it as spam. Not sure though, I'm just contributing to cargo cult... :) Ali Removed the old one

Re: Ali's talk C++Now 2017: Competitive Advantage with D on Reddit!

2017-06-08 Thread Ali Çehreli via Digitalmars-d-announce
On 06/08/2017 02:03 PM, Wulfklaue wrote: Removed the old one and add new one with the full youtube link: That worked. Thanks. I recommend others not to click on the link but search for "competitive advantage with d" on the main page instead: https://news.ycombinator.com/news Ali

DList efficiency

2017-06-08 Thread Boris-Barboris via Digitalmars-d-learn
Good day to you reader! I have a couple questions about Phobos: 1). Do I understand correctly, that there is currently no way (aside from editing the sources of course) to efficiently (using one underlying iteration) remove all\first element(s) from DList based on a predicate? Can such

Re: Ali's talk C++Now 2017: Competitive Advantage with D on Reddit!

2017-06-08 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 6/8/17 5:03 PM, Wulfklaue wrote: On Thursday, 8 June 2017 at 20:38:33 UTC, Ali Çehreli wrote: That link doesn't work for me. Besides, I've heard that it's better not to click through a link as HN either rates it lower or flags it as spam. Not sure though, I'm just contributing to cargo

Re: DList efficiency

2017-06-08 Thread Boris-Barboris via Digitalmars-d-learn
On Thursday, 8 June 2017 at 22:42:14 UTC, Boris-Barboris wrote: 1). Do I understand correctly, that there is currently no way (aside from editing the sources of course) to efficiently (using one underlying iteration) remove all\first element(s) from DList based on a predicate? Oh, sorry, I

Vittorio Romeo comments on his D impressions at C++Now 2017

2017-06-08 Thread Ali Çehreli via Digitalmars-d-announce
Vittorio is a new friend who I met at C++Now 2017. He is also the author of a DIP on "Value closures": https://github.com/SuperV1234/DIPs/blob/master/DIPs/DIP.md I'm happy that he talks favorably of D during the following chat (you should continue watching him till the end until he