Re: LDC now supports Windows MSVC x86/x64 as first class targets

2016-03-21 Thread Manu via Digitalmars-d-announce
On 22 March 2016 at 03:12, Kagamin via Digitalmars-d-announce wrote: > On Sunday, 20 March 2016 at 14:15:19 UTC, Manu wrote: >> >> MSVC debuginfo is very good; it has data such that variables >> follow their registers around in fully optimised builds, making

[Issue 15819] array(x) is ok but not x.array, giving contradicting error

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15819 Timothee Cour changed: What|Removed |Added Summary|Error: cannot resolve type |array(x) is ok but

[Issue 15819] Error: cannot resolve type for temp.array(Range)(Range r) if (isIterable!Range && !isNarrowString!Range && !isInfinite!Range) //static assert(is(typeof(temp.array)));

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15819 --- Comment #1 from Timothee Cour --- update: the following passes, ie array(temp) is ok but temp.array is not; why is that? (again, self contained single file test example here:

[Issue 15819] New: Error: cannot resolve type for temp.array(Range)(Range r) if (isIterable!Range && !isNarrowString!Range && !isInfinite!Range) //static assert(is(typeof(temp.array)));

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15819 Issue ID: 15819 Summary: Error: cannot resolve type for temp.array(Range)(Range r) if (isIterable!Range && !isNarrowString!Range && !isInfinite!Range) //static

[Issue 15819] Error: cannot resolve type for temp.array(Range)(Range r) if (isIterable!Range && !isNarrowString!Range && !isInfinite!Range) //static assert(is(typeof(temp.array)));

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15819 Timothee Cour changed: What|Removed |Added CC|

[Issue 15573] -O -inline causes wrong code with idiv instruction

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15573 --- Comment #34 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/30ec03499244697e8c691c29e058c76d1571c4ec Merge pull request #5559

[Issue 15815] [REG2.071-devel] deprecation for aliased template instance not shown

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15815 --- 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/e9a67955f0d0d63b903423dd9a6f6aaa8f7d2470 fix Issue 15815 -

[Issue 15455] [REG v2.065] Compiler segfault for simple nested structure

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15455 --- 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/414e10b3e3f5ecfa58b5be24c5e490a43281510f fix Issue 15455 - [REG

[Issue 15729] [REG(master)] broken debug info for libraries

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15729 --- Comment #6 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/1737bea648d961dbc1a03dc0eb2babe2d66c322f fix Issue 15729 - broken

[Issue 15817] [REG2.068] ICE (with no stacktrace) instead of 'cannot index null array counts' with CTFE AA

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15817 --- 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/fd191357c47f33a1bbf061fef13de114ab4d0217 fix Issue 15817 - ICE (with

Re: "default" keyword as function attribute

2016-03-21 Thread Jonathan M Davis via Digitalmars-d
On Tuesday, 22 March 2016 at 02:05:20 UTC, Jakob Ovrum wrote: On Monday, 21 March 2016 at 22:58:35 UTC, Jonathan M Davis wrote: I'm inclined to think that folks should think twice before apply attributes en masse like that. Why? It makes it harder to know which attributes are actually being

Solid Wood Furniture Stores Ellesmere Port UK

2016-03-21 Thread yeyesnake via Digitalmars-d
F-i-n-d- -S-o-l-i-d- -W-o-o-d- -B-e-d- -s-u-p-p-l-i-e-r-s- -a-t- -w-w-w-.-s-o-l-i-d-w-o-o-d-b-e-d-s-.-c-o-.-u-k- - -s-o-l-i-d-w-o-o-d-b-e-d-s-.-c-o-.-u-k

Re: "default" keyword as function attribute

2016-03-21 Thread Jakob Ovrum via Digitalmars-d
On Monday, 21 March 2016 at 22:58:35 UTC, Jonathan M Davis wrote: I'm inclined to think that folks should think twice before apply attributes en masse like that. Why? It makes it _way_ too easy to miss that the attribute is being applied when it's somewhere else entirely in the file. This

Re: pass a struct by value/ref and size of the struct

2016-03-21 Thread tsbockman via Digitalmars-d-learn
On Monday, 21 March 2016 at 23:31:06 UTC, ref2401 wrote: I have got a plenty of structs in my project. Their size varies from 12 bytes to 128 bytes. Is there a rule of thumb that states which structs I pass by value and which I should pass by reference due to their size? Thanks. Not really.

way to warn about __traits(compiles , ...) that fail due to compile time interpretation lacking body ?

2016-03-21 Thread Nicholas Wilson via Digitalmars-d-learn
So I was recently trying to optimise a string substitution function by reserving capacity. however this was being used at compile time (mixin) and the body of arr.reserve(n) was not available causing a bug that was easy to observe but very difficult to determine why. As a result code was

[Issue 15658] isFile isn't a template

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15658 b2.t...@gmx.com changed: What|Removed |Added Status|NEW |ASSIGNED CC|

Re: Is C++ trying to be like D?

2016-03-21 Thread Walter Bright via Digitalmars-d
On 3/21/2016 9:51 AM, Bauss wrote: On Sunday, 20 March 2016 at 22:49:28 UTC, Walter Bright wrote: On 3/20/2016 3:48 PM, Walter Bright wrote: Walter was replaced by a D9000 computer years ago. He was jeopardizing the mission. Or was he. Too much Human Error.

Re: LDC now supports Windows MSVC x86/x64 as first class targets

2016-03-21 Thread deadalnix via Digitalmars-d-announce
Got the news first hand by David Majnemer first hand not so long ago. Congrats guys :)

Re: size_t index=-1;

2016-03-21 Thread tsbockman via Digitalmars-d-learn
On Tuesday, 22 March 2016 at 00:18:54 UTC, Steven Schveighoffer wrote: On 3/21/16 7:43 PM, tsbockman wrote: The false positive rate would certainly be *much* lower than your outlandish 10,000 : 1 estimate, given a good compiler implementation. I wouldn't say it's outlandish given my

Re: year to date pull statistics

2016-03-21 Thread tsbockman via Digitalmars-d
On Monday, 21 March 2016 at 21:25:18 UTC, H. S. Teoh wrote: Let X be the set not defined by this sentence... [OT] Your signature line is trying to make my brain explode. Last year Dicebot, myself, and a bunch of others managed to get the queue down to the high 30's / low 40's, or

Re: size_t index=-1;

2016-03-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/21/16 7:43 PM, tsbockman wrote: On Monday, 21 March 2016 at 22:29:46 UTC, Steven Schveighoffer wrote: It depends on the situation. foo may know that x is going to be short enough to fit in an int. The question becomes, if 99% of cases the user knows that he was converting to a signed

Re: Defer in D

2016-03-21 Thread Xinok via Digitalmars-d
On Monday, 21 March 2016 at 17:46:05 UTC, Dmitry Olshansky wrote: ... The main use case in Go that needs it specifically as a function level primitive is this: files := []File{} for i := paths { files[i], err := os.Open(paths[i]) if err != nil { return

Re: size_t index=-1;

2016-03-21 Thread tsbockman via Digitalmars-d-learn
On Monday, 21 March 2016 at 22:29:46 UTC, Steven Schveighoffer wrote: It depends on the situation. foo may know that x is going to be short enough to fit in an int. The question becomes, if 99% of cases the user knows that he was converting to a signed value intentionally, and in the

pass a struct by value/ref and size of the struct

2016-03-21 Thread ref2401 via Digitalmars-d-learn
I have got a plenty of structs in my project. Their size varies from 12 bytes to 128 bytes. Is there a rule of thumb that states which structs I pass by value and which I should pass by reference due to their size? Thanks.

Re: emit: generalizes map, filter, joiner [proposal + implementation]

2016-03-21 Thread Tamas via Digitalmars-d
On Monday, 21 March 2016 at 11:48:52 UTC, Seb wrote: Could you try to point out whats wrong with map & filter? It's hard to do stuff like this: assert(9.iota.emit!(int,(put,a){if(a%2) put(a*a); if(a%3==0) put(a);}).equal([1,9,3,25,6,49]));

Re: "default" keyword as function attribute

2016-03-21 Thread Jonathan M Davis via Digitalmars-d
On Saturday, 19 March 2016 at 14:55:00 UTC, Jakob Ovrum wrote: We often repeat advice to put `@safe:`, or some other function attribute, at the top of your modules to apply the attribute en masse. In practice this quickly becomes infeasible. Sooner or later, a generic function is introduced

dub coverage analysis weirdness

2016-03-21 Thread FreeSlave via Digitalmars-d
I made example and described issue in github repository: https://github.com/MyLittleRobo/dub-coverage-test

Re: size_t index=-1;

2016-03-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/21/16 4:27 PM, tsbockman wrote: On Monday, 21 March 2016 at 17:38:35 UTC, Steven Schveighoffer wrote: Your definition of when "implicit casting is really a bad idea" is almost certainly going to include cases where it really isn't a bad idea. This logic can be applied to pretty much any

Re: GSoC 2016

2016-03-21 Thread Craig Dillabaugh via Digitalmars-d
On Monday, 21 March 2016 at 21:12:30 UTC, Jacob Carlborg wrote: On 2016-03-21 14:54, Craig Dillabaugh wrote: Jacob Carlborg ... if you are reading this would you be able to lend a hand in advising on the proposals? I believe these projects a mostly related to C => D conversion tools. Maybe

Re: year to date pull statistics

2016-03-21 Thread H. S. Teoh via Digitalmars-d
On Mon, Mar 21, 2016 at 01:59:29PM -0700, Brad Roberts via Digitalmars-d wrote: > Another week, so another update to the pull statistics for the D-P-L > dmd, runtime, and phobos repositories. There's been a bit of progress > chipping away at the queue, though there's still a long way to go. > The

Re: Idea: std.build instead of dub and make-like tools

2016-03-21 Thread Atila Neves via Digitalmars-d
On Sunday, 20 March 2016 at 15:33:16 UTC, cym13 wrote: On Sunday, 20 March 2016 at 11:27:11 UTC, Atila Neves wrote: On Sunday, 20 March 2016 at 07:35:07 UTC, Piotrek wrote: I was thinking about simple declarative syntax plus fallback to imperative style for custom needs. That's exactly what

Re: GSoC 2016

2016-03-21 Thread Jacob Carlborg via Digitalmars-d
On 2016-03-21 14:54, Craig Dillabaugh wrote: Jacob Carlborg ... if you are reading this would you be able to lend a hand in advising on the proposals? I believe these projects a mostly related to C => D conversion tools. Maybe you can email russel or myself if you can: I'm not really sure

Re: Something wrong with GC

2016-03-21 Thread tsbockman via Digitalmars-d-learn
On Sunday, 20 March 2016 at 07:49:17 UTC, stunaep wrote: The gc throws invalid memory errors if I use Arrays from std.container. ... Not sure what to do here I don't know what your larger goal is, but maybe std.array.Appender would be a better fit?

Re: year to date pull statistics

2016-03-21 Thread Brad Roberts via Digitalmars-d
Another week, so another update to the pull statistics for the D-P-L dmd, runtime, and phobos repositories. There's been a bit of progress chipping away at the queue, though there's still a long way to go. The number of open phobos pulls has grown quite a bit over the last few weeks and

Re: OpenCV bindings for D

2016-03-21 Thread poliklosio via Digitalmars-d
On Monday, 21 March 2016 at 19:16:16 UTC, wobbles wrote: On Monday, 21 March 2016 at 16:01:59 UTC, Guillaume Piolat wrote: On Monday, 21 March 2016 at 15:45:36 UTC, wobbles wrote: Hi Folks, I have a project in mind that I'd like to run on my new Raspberry Pi 3. Essentially a security camera

Re: Question about version ( ) keyword

2016-03-21 Thread Daniel Kozak via Digitalmars-d
Dne 21.3.2016 v 15:51 Vincent R via Digitalmars-d napsal(a): Hi, When looking at core definitions like core.sys.posix.pthread I can see some "duplicated" code because it seems version doesn't support Or as we would do in C/C++ with #ifdefined. For instance if can read this: version(

Re: size_t index=-1;

2016-03-21 Thread tsbockman via Digitalmars-d-learn
On Monday, 21 March 2016 at 17:38:35 UTC, Steven Schveighoffer wrote: Your definition of when "implicit casting is really a bad idea" is almost certainly going to include cases where it really isn't a bad idea. This logic can be applied to pretty much any warning condition or

Re: Question about version ( ) keyword

2016-03-21 Thread Daniel Kozak via Digitalmars-d
Dne 21.3.2016 v 18:18 Kagamin via Digitalmars-d napsal(a): On Monday, 21 March 2016 at 14:51:48 UTC, Vincent R wrote: When I see this code I cannot help thinking of something like: version( CRuntime_Glibc ) || version( FreeBSD ) || version (Solaris) { if(version(Solaris)) enum

Re: Using ffmpeg in command line with D

2016-03-21 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 21 March 2016 at 17:26:09 UTC, Karabuta wrote: I am new to this kind of multimedia stuff and all this is currently theoretical. Will this work and is it the right approach used by video convertor front-ends? Eh, it is how I did it before, it works and is pretty easy to do.

Re: OpenCV bindings for D

2016-03-21 Thread wobbles via Digitalmars-d
On Monday, 21 March 2016 at 16:01:59 UTC, Guillaume Piolat wrote: On Monday, 21 March 2016 at 15:45:36 UTC, wobbles wrote: Hi Folks, I have a project in mind that I'd like to run on my new Raspberry Pi 3. Essentially a security camera that will only record when it detects changes between

[Issue 15817] [REG2.068] ICE (with no stacktrace) instead of 'cannot index null array counts' with CTFE AA

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15817 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/fd191357c47f33a1bbf061fef13de114ab4d0217 fix Issue 15817 - ICE (with

Re: OpenCV bindings for D

2016-03-21 Thread Suliman via Digitalmars-d
Try to look at https://github.com/ljubobratovicrelja/dcv

[Issue 15818] New: Multiple function declarations without definition cause ambiguity overloading error

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15818 Issue ID: 15818 Summary: Multiple function declarations without definition cause ambiguity overloading error Product: D Version: D2 Hardware: All OS: All

Re: No property error message

2016-03-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/19/16 2:36 PM, ric maicle wrote: I got an error message with the following code saying: Error: no property 'length' for type 'int[string]' Shouldn't the error message say 'length()'? No, it should say length is a property, not a function. a.length should work. Note the error

Re: Defer in D

2016-03-21 Thread Dmitry Olshansky via Digitalmars-d
On 20-Mar-2016 02:16, Xinok wrote: I stumbled upon an example demonstrating defer in Go which I thought was interesting. Defer is similar to scope in D except they're called at end of function rather than end of scope; you can queue multiple defer calls by writing them inside of a loop. This

Re: size_t index=-1;

2016-03-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/18/16 7:48 PM, tsbockman wrote: On Friday, 18 March 2016 at 14:51:34 UTC, Steven Schveighoffer wrote: Note, I have made these mistakes myself, and I understand what you are asking for and why you are asking for it. But these are bugs. The user is telling the compiler to do one thing, and

Using ffmpeg in command line with D

2016-03-21 Thread Karabuta via Digitalmars-d-learn
Hi all, I'm trying to convert an array of video filenames to another format using spawnProcess() from std.process. I want to convert all files in sequence with the command "ffmpeg -i filename.mp4 -o outputfile.webm" where process will be run one process after the other. I am new to this

Re: Question about version ( ) keyword

2016-03-21 Thread Kagamin via Digitalmars-d
On Monday, 21 March 2016 at 14:51:48 UTC, Vincent R wrote: When I see this code I cannot help thinking of something like: version( CRuntime_Glibc ) || version( FreeBSD ) || version (Solaris) { if(version(Solaris)) enum PTHREAD_BARRIER_SERIAL_THREAD = -2; else

Re: LDC now supports Windows MSVC x86/x64 as first class targets

2016-03-21 Thread Kagamin via Digitalmars-d-announce
On Sunday, 20 March 2016 at 14:15:19 UTC, Manu wrote: MSVC debuginfo is very good; it has data such that variables follow their registers around in fully optimised builds, making release build debugging fast and effortless. That's backend feature, there are (usually) no registers on the

Re: Is C++ trying to be like D?

2016-03-21 Thread Bauss via Digitalmars-d
On Sunday, 20 March 2016 at 22:49:28 UTC, Walter Bright wrote: On 3/20/2016 3:48 PM, Walter Bright wrote: Walter was replaced by a D9000 computer years ago. He was jeopardizing the mission. Or was he.

Re: LDC now supports Windows MSVC x86/x64 as first class targets

2016-03-21 Thread Guillaume Piolat via Digitalmars-d-announce
On Saturday, 19 March 2016 at 13:23:48 UTC, kinke wrote: Hey all, I'm proud to announce that MSVC is fully supported now for LDC trunk. Rainer Schuetze has implemented MSVC-compatible exception handling (available since brand-new LLVM 3.8) for LDC, so that we have fully working exception

mondo - a d library for mongodb

2016-03-21 Thread Andrea Fontana via Digitalmars-d-announce
I just released on behalf of the company I work for (http://lab.2night.it) "mondo", a library to work with mongodb. Mondo is a collection of classes (and struct) built over mongo-c-driver. Low-level bindings are generated automatically using dstep + a small script to patch some issues with

Re: OpenCV bindings for D

2016-03-21 Thread Guillaume Piolat via Digitalmars-d
On Monday, 21 March 2016 at 15:45:36 UTC, wobbles wrote: Hi Folks, I have a project in mind that I'd like to run on my new Raspberry Pi 3. Essentially a security camera that will only record when it detects changes between frames. Now, this is already a solved problem I believe, however in

Re: Enabling Only Top-Level Unittests

2016-03-21 Thread Adam D. Ruppe via Digitalmars-d-learn
On Monday, 21 March 2016 at 15:15:41 UTC, Nordlöw wrote: This is because my project has grown beyond 30klines of code and at that scale not even D's speed is enough for getting fast incremental builds through dmd. Note that lines of code isn't really important to build time... $ time dmd -c

On adding to the standard library

2016-03-21 Thread Andrei Alexandrescu via Digitalmars-d
I just asked for a stdlib addition to be pulled back at https://github.com/D-Programming-Language/phobos/pull/4025. Such decisions are difficult because the risk is them to be interpreted as stifling creativity. That is not the case. The only reason for all library additions to go through

[Issue 15817] [REG2.068] ICE (with no stacktrace) instead of 'cannot index null array counts' with CTFE AA

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15817 Kenji Hara changed: What|Removed |Added Keywords||pull

OpenCV bindings for D

2016-03-21 Thread wobbles via Digitalmars-d
Hi Folks, I have a project in mind that I'd like to run on my new Raspberry Pi 3. Essentially a security camera that will only record when it detects changes between frames. Now, this is already a solved problem I believe, however in the interest of learning I want to do it myself. Ideally,

Re: Enabling Only Top-Level Unittests

2016-03-21 Thread Nordlöw via Digitalmars-d-learn
On Monday, 21 March 2016 at 15:15:41 UTC, Nordlöw wrote: I don't see any other solution for really large projects. Except implementing memoized execution of unittests into dmd. Which I have discussed previously :)

[Issue 15817] ICE (with no stacktrace) instead of 'cannot index null array counts' with CTFE AA

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15817 Kenji Hara changed: What|Removed |Added Keywords||CTFE, ice

Re: Enabling Only Top-Level Unittests

2016-03-21 Thread Nordlöw via Digitalmars-d-learn
On Monday, 21 March 2016 at 15:11:31 UTC, Nordlöw wrote: On Monday, 21 March 2016 at 11:36:10 UTC, wobbles wrote: This is quite annoying I feel. There probably should be an option for the -unittest flag to only compile unittests for the source files I'm passing in, and not any of the tests

Re: Enabling Only Top-Level Unittests

2016-03-21 Thread Nordlöw via Digitalmars-d-learn
On Monday, 21 March 2016 at 11:36:10 UTC, wobbles wrote: This is quite annoying I feel. There probably should be an option for the -unittest flag to only compile unittests for the source files I'm passing in, and not any of the tests in the -I import paths. I very much agree.

Re: Question about version ( ) keyword

2016-03-21 Thread Joakim via Digitalmars-d
On Monday, 21 March 2016 at 14:51:48 UTC, Vincent R wrote: Hi, When looking at core definitions like core.sys.posix.pthread I can see some "duplicated" code because it seems version doesn't support Or as we would do in C/C++ with #ifdefined. For instance if can read this: [...] The

Re: Question about version ( ) keyword

2016-03-21 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 21 March 2016 at 14:51:48 UTC, Vincent R wrote: However I understand that this limitation allow a clear separation between different platforms... That's exactly why it is done this way, so the platforms are clearly separated from each other and always grouped together for

Question about version ( ) keyword

2016-03-21 Thread Vincent R via Digitalmars-d
Hi, When looking at core definitions like core.sys.posix.pthread I can see some "duplicated" code because it seems version doesn't support Or as we would do in C/C++ with #ifdefined. For instance if can read this: version( CRuntime_Glibc ) { enum PTHREAD_BARRIER_SERIAL_THREAD = -1;

Re: How can I report what I think a compiler's frontend bug

2016-03-21 Thread Vincent R via Digitalmars-d
On Monday, 21 March 2016 at 11:00:08 UTC, Vincent R wrote: On Monday, 21 March 2016 at 09:46:18 UTC, Vincent R wrote: On Monday, 21 March 2016 at 01:51:09 UTC, Marco Leise wrote: Am Sun, 20 Mar 2016 22:37:37 + schrieb Vincent R : [...] Thanks and you see I was right to

Re: GSoC 2016

2016-03-21 Thread Craig Dillabaugh via Digitalmars-d
On Sunday, 20 March 2016 at 15:03:16 UTC, Russel Winder wrote: Due to unforseen circumstances, I am well behind dealing wit GSoC email, an I doubt I will beable to get on top of it till Thursday. There are at least five peopl I should be having conversations with but I fear it is unlikely to

Re: Can't Compile Global Semaphores?

2016-03-21 Thread denizzzka via Digitalmars-d-learn
On Monday, 27 July 2015 at 20:12:10 UTC, John Colvin wrote: Yes, but then core.sync.semaphore doesn't support being shared, so... I don't really understand how https://github.com/D-Programming-Language/druntime/blob/master/src/core/sync/semaphore.d#L356 is managing to avoid this Since

Re: [Request] A way to extract all instance of X from a range

2016-03-21 Thread Timothee Cour via Digitalmars-d
On Mon, Mar 21, 2016 at 4:34 AM, Nick Treleaven via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On 14/03/2016 11:32, thedeemon wrote: > >> >> filter_map : ('a -> 'b option) -> 'a t -> 'b t >> >> "filter_map f e returns an enumeration over all elements x such as f y >> returns Some x,

Re: emit: generalizes map, filter, joiner [proposal + implementation]

2016-03-21 Thread Seb via Digitalmars-d
On Monday, 21 March 2016 at 11:35:49 UTC, Timothee Cour wrote: assert(9.iota.emit!(int,(put,a){if(a%2) put(a*a);}).equal([1, 9, 25, 49])) Could you try to point out whats wrong with map & filter? assert(9.iota.filter!"a%2".map!"a*a".equal([1, 9, 25, 49])

Re: Enabling Only Top-Level Unittests

2016-03-21 Thread wobbles via Digitalmars-d-learn
On Monday, 21 March 2016 at 10:37:31 UTC, ZombineDev wrote: On Monday, 21 March 2016 at 10:29:36 UTC, Nordlöw wrote: I want to enable unittests only at the top-level of a module compilation. If I have a module top.d that imports dep1.d dep2.d ... which all contain

emit: generalizes map, filter, joiner [proposal + implementation]

2016-03-21 Thread Timothee Cour via Digitalmars-d
given fun(put, a) a lambda that can call $put 0 or more times, some_range.emit!fun computes a range formed of all the calls to $put eg: assert(9.iota.emit!(int,(put,a){if(a%2) put(a*a);}).equal([1, 9, 25, 49])); in this case it can be done by combining map and filter but in other cases emit is

Re: [Request] A way to extract all instance of X from a range

2016-03-21 Thread Nick Treleaven via Digitalmars-d
On 14/03/2016 11:32, thedeemon wrote: filter_map : ('a -> 'b option) -> 'a t -> 'b t "filter_map f e returns an enumeration over all elements x such as f y returns Some x, where y is an element of e." It is really convenient and comes handy in many situations. However it requires some common

[Issue 15802] (SIGSEGV) CppMangleVisitor::source_name

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15802 --- 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/62aeb7fdb94bad8f07e9aab6e4858b9f93b00a1e Fix issue 15802

[Issue 15802] (SIGSEGV) CppMangleVisitor::source_name

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15802 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Defer in D

2016-03-21 Thread Nick Treleaven via Digitalmars-d
On 20/03/2016 16:57, Nick Treleaven wrote: void opCall(ARGS...)(void delegate(ARGS) call, ARGS args) { stack.put(() => call(args)); } Maybe this method would be nice (does the same thing): Deferrer d; ... d.capture!writeln("i = ", i); The name capture makes it clearer

Re: d-vulkan, automatically generated D bindings for Vulkan

2016-03-21 Thread Manuel Maier via Digitalmars-d-announce
On Monday, 21 March 2016 at 09:27:35 UTC, Manuel Maier wrote: On Saturday, 19 March 2016 at 01:12:08 UTC, Alex Parrill wrote: https://github.com/ColonelThirtyTwo/dvulkan [...] @Alex Parrill: Thanks for sharing! Looks nice. I was just wondering... why did you write the generator in python

Re: How can I report what I think a compiler's frontend bug

2016-03-21 Thread Vincent R via Digitalmars-d
On Monday, 21 March 2016 at 09:46:18 UTC, Vincent R wrote: On Monday, 21 March 2016 at 01:51:09 UTC, Marco Leise wrote: Am Sun, 20 Mar 2016 22:37:37 + schrieb Vincent R : [...] Thanks and you see I was right to post here since I finally found the problem and got an

Re: /usr/bin/ld: cannot find -lphobos2

2016-03-21 Thread ZombineDev via Digitalmars-d-learn
On Monday, 21 March 2016 at 10:46:27 UTC, ag0aep6g wrote: On 21.03.2016 11:19, ZombineDev wrote: DFLAGS=-I~/dev/repos/dlang/druntime/import -I~/dev/repos/dlang/phobos -L-L/home/zombinedev/dev/repos/dlang/phobos/generated/*/release/64 [...] Linking... ... /usr/bin/ld {other stuff...}

Re: /usr/bin/ld: cannot find -lphobos2

2016-03-21 Thread ag0aep6g via Digitalmars-d-learn
On 21.03.2016 11:19, ZombineDev wrote: DFLAGS=-I~/dev/repos/dlang/druntime/import -I~/dev/repos/dlang/phobos -L-L/home/zombinedev/dev/repos/dlang/phobos/generated/*/release/64 [...] Linking... ... /usr/bin/ld {other stuff...} -L/home/zombinedev/dev/repos/dlang/phobos/generated/*/release/64

Re: Enabling Only Top-Level Unittests

2016-03-21 Thread ZombineDev via Digitalmars-d-learn
On Monday, 21 March 2016 at 10:29:36 UTC, Nordlöw wrote: I want to enable unittests only at the top-level of a module compilation. If I have a module top.d that imports dep1.d dep2.d ... which all contain unittests, how do I compile top.d with only the unittests for top.d

Enabling Only Top-Level Unittests

2016-03-21 Thread Nordlöw via Digitalmars-d-learn
I want to enable unittests only at the top-level of a module compilation. If I have a module top.d that imports dep1.d dep2.d ... which all contain unittests, how do I compile top.d with only the unittests for top.d enabled?

/usr/bin/ld: cannot find -lphobos2

2016-03-21 Thread ZombineDev via Digitalmars-d-learn
I'm manually building dmd, druntime and phobos like so: $ cd ~/dev/repos/dlang $ git clone https://github.com/D-Programming-Language/dmd $ git clone https://github.com/D-Programming-Language/druntime $ git clone https://github.com/D-Programming-Language/phobos $ cd dmd && make -f make -f

Re: How can I report what I think a compiler's frontend bug

2016-03-21 Thread Vincent R via Digitalmars-d
On Monday, 21 March 2016 at 01:51:09 UTC, Marco Leise wrote: Am Sun, 20 Mar 2016 22:37:37 + schrieb Vincent R : [...] Thanks and you see I was right to post here since I finally found the problem and got an answer :-)

Re: Up-to-date DIPs list

2016-03-21 Thread Martin Tschierschke via Digitalmars-d
On Thursday, 17 March 2016 at 19:03:31 UTC, Seb wrote: On Thursday, 17 March 2016 at 10:11:14 UTC, Martin Tschierschke wrote: But you need both, the possibility to vote and an overview of threads and post with highest votes. Don't be offended, but I think we are a bit off-topic here - my

Re: d-vulkan, automatically generated D bindings for Vulkan

2016-03-21 Thread Manuel Maier via Digitalmars-d-announce
On Saturday, 19 March 2016 at 01:12:08 UTC, Alex Parrill wrote: https://github.com/ColonelThirtyTwo/dvulkan [...] @Alex Parrill: Thanks for sharing! Looks nice. I was just wondering... why did you write the generator in python and not in D? Just curious :)

Re: Defer in D

2016-03-21 Thread angel via Digitalmars-d
I would, actually, like to see it integrated with the core language syntax, kinda: scope(function) ... While your solution is viable from the technical point of view, having a consistent language syntax could also be nice.

Re: d-vulkan, automatically generated D bindings for Vulkan

2016-03-21 Thread burjui via Digitalmars-d-announce
On Sunday, 20 March 2016 at 00:52:48 UTC, Alex Parrill wrote: If I import a xcb_connection_t from some bindings, it ties d-vulkan to those bindings, which I'd rather not do. By the magic of D: version (Linux) { import xcb.xcb; } ... version (Linux) { xcb_connection_t* con; } Also

Re: Something wrong with GC

2016-03-21 Thread thedeemon via Digitalmars-d-learn
On Sunday, 20 March 2016 at 07:49:17 UTC, stunaep wrote: The gc throws invalid memory errors if I use Arrays from std.container. Those arrays are for RAII-style deterministic memory release, they shouldn't be freely mixed with GC-allocated things. What happens here is while initializing

[Issue 5944] Five ideas for the stacktrace

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=5944 Timothee Cour changed: What|Removed |Added CC|

[Issue 15817] New: ICE (with no stacktrace) instead of 'cannot index null array counts' with CTFE AA

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15817 Issue ID: 15817 Summary: ICE (with no stacktrace) instead of 'cannot index null array counts' with CTFE AA Product: D Version: D2 Hardware: x86 OS: Mac OS X

[Issue 15798] std.algorithm.mutation.copy takes target by value

2016-03-21 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15798 Ender KaShae changed: What|Removed |Added CC||astrotha...@gmail.com

Re: Event Dispatcher

2016-03-21 Thread Eugene Wissner via Digitalmars-d-announce
On Wednesday, 16 March 2016 at 15:14:57 UTC, Kagamin wrote: On Thursday, 10 March 2016 at 18:08:15 UTC, Eugene Wissner wrote: Why not just extend the HelloWorld class and override the hello()? Imagine you write an apllication that should support plugins. And two independent plugins extend the