Re: compile-time test against dmd/phobos version number

2017-01-06 Thread Jon Degenhardt via Digitalmars-d-learn
On Saturday, 7 January 2017 at 02:41:54 UTC, ketmar wrote: On Saturday, 7 January 2017 at 02:30:53 UTC, Jon Degenhardt wrote: Is there a way to make a compile time check against the dmd/phobos version number? Functionally, what I'd like to achieve would be equivalent to: version(dmdVersio

Re: compile-time test against dmd/phobos version number

2017-01-06 Thread ketmar via Digitalmars-d-learn
On Saturday, 7 January 2017 at 02:30:53 UTC, Jon Degenhardt wrote: Is there a way to make a compile time check against the dmd/phobos version number? Functionally, what I'd like to achieve would be equivalent to: version(dmdVersion >= 2.070.1) { } else {

compile-time test against dmd/phobos version number

2017-01-06 Thread Jon Degenhardt via Digitalmars-d-learn
Is there a way to make a compile time check against the dmd/phobos version number? Functionally, what I'd like to achieve would be equivalent to: version(dmdVersion >= 2.070.1) { } else { ... } I think I've seen something like this, probably using '

Re: Missing functionality in std.process?

2017-01-06 Thread Eduard Staniloiu via Digitalmars-d-learn
On Friday, 14 October 2016 at 16:33:51 UTC, Andre Pany wrote: What I miss is s.th. to get the child Pids of a parent Pid. Again I can use OS dependent functionality to retrieve the processIDs of the children, but how to convert these processIDs to Pids for usage with kill/wait functions? On U

Re: Sorting with unaryFun predicate

2017-01-06 Thread Nordlöw via Digitalmars-d-learn
On Friday, 6 January 2017 at 15:36:42 UTC, Nordlöw wrote: Why isn't there an overload for `std.algorithm.sorting.sort` that takes a `unaryFun` lambda? x[].sort!"a.m < b.m"; Oops, http://forum.dlang.org/post/nxdsmdimnfssqmeyb...@forum.dlang.org https://github.com/nordlow/phobos-next/blob/

Re: Stack Space & Ackermann

2017-01-06 Thread H. S. Teoh via Digitalmars-d-learn
On Thu, Jan 05, 2017 at 08:11:58AM +, Era Scarecrow via Digitalmars-d-learn wrote: > On Thursday, 5 January 2017 at 07:30:02 UTC, H. S. Teoh wrote: > > Nonetheless, even if you optimize said code paths, you still won't > > be able to get any sane results for m>4 or anything beyond the first >

Re: Sorting with unaryFun predicate

2017-01-06 Thread Nordlöw via Digitalmars-d-learn
On Friday, 6 January 2017 at 15:36:42 UTC, Nordlöw wrote: Something like x[].sort!"a.m"; Perhaps under a different name `sortBy` x[].sortBy!"a.m";

Sorting with unaryFun predicate

2017-01-06 Thread Nordlöw via Digitalmars-d-learn
Why isn't there an overload for `std.algorithm.sorting.sort` that takes a `unaryFun` lambda? Something like x[].sort!"a.m"; sorting elements in `x` according to the value of element member `m` compared to the longer x[].sort!"a.m < b.m";

Re: D bindings for TensorFlow

2017-01-06 Thread RazvanN via Digitalmars-d-learn
On Friday, 6 January 2017 at 13:22:28 UTC, llaine wrote: Did anyone used Tensorflow with D ? I would be really interesting to know if some libs allows it right now. I read an old thread about TS on the forum, but since then nothing ... At the moment there is no support in D to use TensorFlow

Re: Conditional Compilation Multiple Versions

2017-01-06 Thread Claude via Digitalmars-d-learn
On Friday, 6 January 2017 at 13:27:06 UTC, Mike Parker wrote: version(Windows) enum bool WindowsSupported = true; else enum bool WindowsSupported = false; Well, yes, that was a bad example. I thought to change it before sending my post but I could find any other meaningful alternative.

Re: Conditional Compilation Multiple Versions

2017-01-06 Thread Mike Parker via Digitalmars-d-learn
Glad hear it's working for you! On Friday, 6 January 2017 at 10:25:26 UTC, Claude wrote: So I had a stream of: version (Win32) enum bool WindowsSupported = true; else enum bool WindowsSupported = false; version (Win64) enum bool WindowsSupported = true; //Ooops else enum bool Windows

D bindings for TensorFlow

2017-01-06 Thread llaine via Digitalmars-d-learn
Did anyone used Tensorflow with D ? I would be really interesting to know if some libs allows it right now. I read an old thread about TS on the forum, but since then nothing ...

Re: Parsing a UTF-16LE file line by line, BUG?

2017-01-06 Thread Mike Wey via Digitalmars-d-learn
On 01/06/2017 11:33 AM, pineapple wrote: On Friday, 6 January 2017 at 06:24:12 UTC, rumbu wrote: I'm not sure if this works quite as intended, but I was at least able to produce a UTF-16 decode error rather than a UTF-8 decode error by setting the file orientation before reading it. import

Re: Parsing a UTF-16LE file line by line, BUG?

2017-01-06 Thread pineapple via Digitalmars-d-learn
On Friday, 6 January 2017 at 06:24:12 UTC, rumbu wrote: I'm not sure if this works quite as intended, but I was at least able to produce a UTF-16 decode error rather than a UTF-8 decode error by setting the file orientation before reading it. import std.stdio; import core.stdc.wchar

Re: Conditional Compilation Multiple Versions

2017-01-06 Thread Claude via Digitalmars-d-learn
On Thursday, 20 October 2016 at 09:58:07 UTC, Claude wrote: I'm digging up that thread, as I want to do some multiple conditional compilation a well. Well I'm digging up that thread again, but to post some positive experience feedback this time as I've found an answer to my own questions, and

Re: code.dlang.org package readme.md

2017-01-06 Thread ZombineDev via Digitalmars-d-learn
On Tuesday, 3 January 2017 at 11:51:56 UTC, Alexandru Ermicioi wrote: Hi all. How it is possible to show readme.md from github repository in code.dlang.org for a particular project? Thanks. Yes, code.dlang.org will display the readme file of the package if and only if it is named "README.m