Re: import in mixin template

2016-05-25 Thread Era Scarecrow via Digitalmars-d-learn
On Thursday, 26 May 2016 at 05:20:25 UTC, vitus wrote: Why 'alias wln1 = writeln;' doesnt't work but 'alias wln2 = std.stdio.writeln;' work when import is not static? Why 'wln2("test");' work but 'std.stdio.writeln("test");' doesn't? (changing import to static import doesn't change anything)

Re: Is there a way to clear an OutBuffer?

2016-05-25 Thread Jon Degenhardt via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 19:42:43 UTC, Gary Willoughby wrote: On Monday, 23 May 2016 at 03:03:12 UTC, Jon Degenhardt wrote: Currently not possible. Enhancement request perhaps? Looking at the implementation, setting its 'offset' member seems to work. Based on example from documentation:

import in mixin template

2016-05-25 Thread vitus via Digitalmars-d-learn
Code: mixin template MIXIN(){ import std.stdio; alias m = writeln; //OK } class CLASS{ mixin MIXIN; alias wln1 = writeln; //Error: 'writeln' is not defined, perhaps you need to import std.stdio; ? alias wln2 = std.stdio.writeln; //OK void test(){

[Issue 16075] Compiler rejects basic mixin template

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16075 Max Samukha changed: What|Removed |Added Status|REOPENED|RESOLVED

[Issue 16075] Compiler rejects basic mixin template

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16075 --- Comment #2 from Max Samukha --- (In reply to b2.temp from comment #1) > > Hi, there is an error in your code, the correct way to write your template > is: > > > > mixin template Foo(A...) > { > static if (A.length)

Re: Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread Vladimir Panteleev via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 22:19:28 UTC, Seb wrote: A bit off-topic, but I can't help to say it. I know that writing your own library is fun, but something that I see quite often when looking at e.g. https://github.com/adamdruppe/arsd https://github.com/CyberShadow/ae

Re: Idea: swap with multiple arguments

2016-05-25 Thread Observer via Digitalmars-d
On Wednesday, 25 May 2016 at 17:08:02 UTC, Martin Tschierschke wrote: A newbee question about language design: When I looked first time at Ruby I liked the simple a,b = b,a syntax, so swap. Would it be theoretically possible to allow this? And if not, where does it breaks the general language

Re: Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 23:21:09 UTC, Seb wrote: Yes, and they are great. However now we have dub and a "serious" standard library ;-) I've looked into two options to join the dub bandwagon, and both aren't really any good (and the fact that I don't use it myself means it'd probably be

[Issue 16076] New: auto-deploy on every merged PR

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16076 Issue ID: 16076 Summary: auto-deploy on every merged PR Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority:

Re: Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread bachmeier via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 23:21:09 UTC, Seb wrote: On Wednesday, 25 May 2016 at 22:52:44 UTC, Adam D. Ruppe wrote: On Wednesday, 25 May 2016 at 22:19:28 UTC, Seb wrote: is that people love to collect and build their own ecosystem, but it would be a lot better if for a specific use-case

Re: Operator overloading through UFCS doesn't work

2016-05-25 Thread Elie Morisse via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 21:50:06 UTC, Jonathan M Davis wrote: It's not an overloaded operator anymore at that point, and that definitely fails to work for generic code, since not all operators are overloaded operators. Free functions don't have that problem. Sorry to reiterate the

Re: Better Voldemort types

2016-05-25 Thread Georgi D via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 12:19:33 UTC, Steven Schveighoffer wrote: On 5/25/16 4:22 AM, Atila Neves wrote: On Tuesday, 24 May 2016 at 01:29:53 UTC, Steven Schveighoffer wrote: Blog post on making Voldemort types without the disk-space issues:

Re: Could forum.dlang.org remember how many captchas I filled out?

2016-05-25 Thread Joakim via Digitalmars-d
On Wednesday, 25 May 2016 at 21:52:40 UTC, cy wrote: On Wednesday, 25 May 2016 at 20:24:50 UTC, Joakim wrote: It's run by the company behind Wordpress, which has less than 500 employees. Okay fine, maybe it's not Proctor and Gamble. But do you want to face up against 500 people and tell them

Re: Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread Seb via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 22:52:44 UTC, Adam D. Ruppe wrote: On Wednesday, 25 May 2016 at 22:19:28 UTC, Seb wrote: is that people love to collect and build their own ecosystem, but it would be a lot better if for a specific use-case there's a great dub package or it's part of Phobos. I,

Re: Phobos uses opSlice and opDollar without checking for it

2016-05-25 Thread Era Scarecrow via Digitalmars-d
On Wednesday, 25 May 2016 at 21:43:19 UTC, Jonathan M Davis wrote: Unfortunately, it's never been implemented (IIRC due to issues related to AAs having length but not being ranges; the implementation likely needs to check for the range-based functions in addition to length). And as long as

Re: Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread Craig Dillabaugh via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 20:31:34 UTC, pineapple wrote: clip My focus currently is on developing mach.sdl, a wrapper for SDL2 and OpenGL, since ultimately I'd like to use D primarily for game development. I hope the library proves useful! Hey, have you looked at: http://dgame-dev.de/

Re: Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread Adam D. Ruppe via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 22:19:28 UTC, Seb wrote: is that people love to collect and build their own ecosystem, but it would be a lot better if for a specific use-case there's a great dub package or it's part of Phobos. I, and I'm pretty sure Vladimir too, have been writing these libs

Re: SQLite-D alpha is here

2016-05-25 Thread Stefan Koch via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 03:48:48 UTC, Stefan Koch wrote: This project is currently on the back burner. However in the next days there will be another significant performance improvement :) A 20% performance improvement has landed in master! It is possible that there are more places in

Re: Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread pineapple via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 22:29:38 UTC, pineapple wrote: I will do that ...I'm honestly having second thoughts because reading the style guide for phobos was like a watching a B horror movie. All the code in the mach.d repo is very permissively licensed and anyone with the patience to

Re: A language comparison (seeking productivity-enhancing, well-designed, and concise languages)

2016-05-25 Thread Seb via Digitalmars-d-announce
On Tuesday, 24 May 2016 at 04:57:34 UTC, Bauss wrote: On Monday, 23 May 2016 at 05:37:10 UTC, Ali Çehreli wrote: Found on Reddit: https://www.reddit.com/r/programming/comments/4kmfp6/the_best_quality_programming_languages/ The list:

Re: A technique to mock "static interfaces" (e.g. isInputRange)

2016-05-25 Thread Robert burner Schadek via Digitalmars-d
+1 having a look at AutoImplement For testing ranges, I usually use https://github.com/dlang/phobos/blob/master/std/internal/test/dummyrange.d even though its internal ;-) anyway, more and better testing always good. p.s. I think at some point we have to build some (the perfect) mocking

Re: Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread pineapple via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 22:19:28 UTC, Seb wrote: I know that writing your own library is fun, but something that I see quite often when looking at e.g. Yep, I saw a couple of those before I got started on mine. For some of us it's a sense of ownership, I think. It feels good to be

Re: Phobos uses opSlice and opDollar without checking for it

2016-05-25 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, May 25, 2016 15:05:33 qznc via Digitalmars-d wrote: > Today I learned [0] that opDollar must be explicitly implemented > and might not be available by some ranges. Likewise slicing. If > you think it further, there are lots of functions in Phobos (I'm > currently looking into

Re: Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread Seb via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 20:31:34 UTC, pineapple wrote: A few weeks ago I made a github repo for D modules. I'm adding to this as I learn the language, and as I find myself writing modules to support other code. https://github.com/pineapplemachine/mach.d It hasn't got a lot at the

Re: Could forum.dlang.org remember how many captchas I filled out?

2016-05-25 Thread cy via Digitalmars-d
On Wednesday, 25 May 2016 at 20:24:50 UTC, Joakim wrote: It's run by the company behind Wordpress, which has less than 500 employees. Okay fine, maybe it's not Proctor and Gamble. But do you want to face up against 500 people and tell them to stop doing what they want? Maybe they could

Re: A technique to mock "static interfaces" (e.g. isInputRange)

2016-05-25 Thread Alex Parrill via Digitalmars-d
On Wednesday, 25 May 2016 at 21:38:23 UTC, Atila Neves wrote: There was talk in the forum of making it easier to come up instantiations of say, an input range for testing purposes. That got me thinking of how mocking frameworks make it easy to pass in dependencies without having to write a

Re: Operator overloading through UFCS doesn't work

2016-05-25 Thread Jonathan M Davis via Digitalmars-d-learn
On Wednesday, May 25, 2016 15:46:23 Elie Morisse via Digitalmars-d-learn wrote: > On Tuesday, 24 May 2016 at 23:43:46 UTC, Jonathan M Davis wrote: > > On Tuesday, May 24, 2016 23:19:32 Elie Morisse via > > > > Digitalmars-d-learn wrote: > >> On Saturday, 13 October 2012 at 22:58:56 UTC, Timon

A technique to mock "static interfaces" (e.g. isInputRange)

2016-05-25 Thread Atila Neves via Digitalmars-d
There was talk in the forum of making it easier to come up instantiations of say, an input range for testing purposes. That got me thinking of how mocking frameworks make it easy to pass in dependencies without having to write a whole new "test double" type oneself. How would one do that for

Re: Does D supports REPL

2016-05-25 Thread Seb via Digitalmars-d
On Wednesday, 25 May 2016 at 18:03:49 UTC, Carl Vogel wrote: It seems to me that both drepl and dabble are unsupported. It's not clear to me which one at this point is a better basis for a stable repl (I kind of prefer drepl, since the code is clearer to me, and I can mostly compile it.) If

[Issue 16075] Compiler rejects basic mixin template

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

Re: Could forum.dlang.org remember how many captchas I filled out?

2016-05-25 Thread Joakim via Digitalmars-d
On Monday, 23 May 2016 at 20:46:01 UTC, cy wrote: On Monday, 23 May 2016 at 18:54:47 UTC, Joakim wrote: Hmm, I almost never get that CAPTCHA, and I don't log in to the forum. Could be something else about your profile that Akismet flags: have you tried taking it up with them? I login here,

Introducing mach.d, the github repo where I put whatever modules I happen to write

2016-05-25 Thread pineapple via Digitalmars-d-announce
A few weeks ago I made a github repo for D modules. I'm adding to this as I learn the language, and as I find myself writing modules to support other code. https://github.com/pineapplemachine/mach.d It hasn't got a lot at the moment, but it will grow for as long as I'm writing D. I suspect

Re: Does D supports REPL

2016-05-25 Thread Carl Vogel via Digitalmars-d
On Wednesday, 25 May 2016 at 19:38:42 UTC, jmh530 wrote: On Wednesday, 25 May 2016 at 00:55:52 UTC, Carl wrote: It's worth noting that some of those Jupyter kernels are pretty quirky/limited. For example in the C kernel, every cell is an isolated program with a main function. Which is not

Re: aliasing expressions and identifiers

2016-05-25 Thread Nick Treleaven via Digitalmars-d
On 24/05/2016 14:48, Nick Treleaven wrote: On Monday, 23 May 2016 at 17:03:32 UTC, Marc Schütz wrote: On Monday, 23 May 2016 at 15:18:51 UTC, Nick Treleaven wrote: I think the reason D doesn't support local refs is because it would make it harder to design @safe, particularly with the planned

[Issue 9149] Disallow converting delegates to const

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9149 --- Comment #14 from Steven Schveighoffer --- (In reply to timon.gehr from comment #13) > Do you have an example where conversion to immutable for a strongly pure > constructor leads to problems? Basically, the example in

Re: Does D supports REPL

2016-05-25 Thread jmh530 via Digitalmars-d
On Wednesday, 25 May 2016 at 00:55:52 UTC, Carl wrote: It's worth noting that some of those Jupyter kernels are pretty quirky/limited. For example in the C kernel, every cell is an isolated program with a main function. Which is not to say it wouldn't be great to have D integration, just

[Issue 16075] New: Compiler rejects basic mixin template

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16075 Issue ID: 16075 Summary: Compiler rejects basic mixin template Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1

[Issue 9149] Disallow converting delegates to const

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9149 --- Comment #13 from timon.g...@gmx.ch --- (In reply to Steven Schveighoffer from comment #12) > Yes I see. > > The issue is the conversion of the delegate type, when the context pointer > is changed to const (but you didn't change the function

Re: Is there a way to clear an OutBuffer?

2016-05-25 Thread Gary Willoughby via Digitalmars-d-learn
On Monday, 23 May 2016 at 03:03:12 UTC, Jon Degenhardt wrote: Currently not possible. Enhancement request perhaps? Looking at the implementation, setting its 'offset' member seems to work. Based on example from documentation: import std.outbuffer; void main() { OutBuffer b = new

Re: The D language online tour - tour.dlang.org

2016-05-25 Thread Ali Çehreli via Digitalmars-d-announce
On 05/25/2016 10:46 AM, Steven Schveighoffer wrote: http://ddili.org/ders/d.en/if.html#ix_if.else%20if "Have coffee at neighbor's" Thank you, fixed. Ali

[Issue 9149] Disallow converting delegates to const

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9149 --- Comment #12 from Steven Schveighoffer --- Yes I see. The issue is the conversion of the delegate type, when the context pointer is changed to const (but you didn't change the function pointer, so it still assumes it's

Re: Phobos uses opSlice and opDollar without checking for it

2016-05-25 Thread qznc via Digitalmars-d
On Wednesday, 25 May 2016 at 16:21:07 UTC, H. S. Teoh wrote: On Wed, May 25, 2016 at 03:05:33PM +, qznc via Also, std.range.primitives should have a predicate for opDollar similar to hasSlicing. It's hard to imagine having much use for a range that has slicing but not opDollar. For

Re: What's wrong with my usage of std.algorithm.map in this code example?

2016-05-25 Thread Era Scarecrow via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 13:27:28 UTC, Chris wrote: Why can the tuple be iterated with foreach, as in my quick fix, and indexed with tuple[0..], but is not accepted as a range? What are the differences? Is there a way to rangify a tuple? The tuple is identified/used at compile-time, as

Re: std.conv.parse not accepting ByCodeUnitImpl

2016-05-25 Thread Jack Stouffer via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 18:43:05 UTC, Steven Schveighoffer wrote: If parse can do it, to should as well. I think it's a question of how the template constraints are done. Please file an issue. Found this: https://issues.dlang.org/show_bug.cgi?id=15800

[Issue 15800] std.conv.to!int does not work with ranges of any char type

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15800 Jack Stouffer changed: What|Removed |Added Summary|std.conv.to!int does not|std.conv.to!int does

[Issue 15800] std.conv.to!int does not work with ranges of char or wchar

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15800 Jack Stouffer changed: What|Removed |Added CC||j...@jackstouffer.com

[Issue 9149] Disallow converting delegates to const

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9149 --- Comment #11 from timon.g...@gmx.ch --- (In reply to Steven Schveighoffer from comment #10) > I think the delegate assignment should be legal. The auto-conversion from > pure ctor to immutable should be illegal (note that converting to const is >

Re: Idea: swap with multiple arguments

2016-05-25 Thread Andrei Alexandrescu via Digitalmars-d
On 05/25/2016 01:08 PM, Martin Tschierschke wrote: On Monday, 23 May 2016 at 20:01:08 UTC, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such that a1 gets an, a2 gets

Re: foo => "bar" key/value literals in D!

2016-05-25 Thread Meta via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 11:22:41 UTC, Jacob Carlborg wrote: I don't think this is the right approach. I think the correct approach is to allow introspection of template parameters [1]. That would allow to get the parameter names without having to instantiate the template. Is that true?

Re: Idea: swap with multiple arguments

2016-05-25 Thread Brian Schott via Digitalmars-d
On Wednesday, 25 May 2016 at 17:08:02 UTC, Martin Tschierschke wrote: And if not, where does it breaks the general language design? Here: https://en.wikipedia.org/wiki/Comma_operator

Re: std.conv.parse not accepting ByCodeUnitImpl

2016-05-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/25/16 2:23 PM, Jack Stouffer wrote: On Wednesday, 25 May 2016 at 16:53:30 UTC, Steven Schveighoffer wrote: to should work wherever parse works (in fact, whenever you call to!someType(someString), I believe it just forwards to parse). This is not the case; to doesn't work with ranges:

[Issue 16065] Provide digitally signed binaries for Windows

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16065 --- Comment #2 from James King <1...@lwshost.com> --- It would be nice if there was something akin to a "D Language Foundation" certificate issued by VeriSign or equivalent. The difficulty and effort required to compromise (or "compromise") both the

Re: Does D supports REPL

2016-05-25 Thread Carl Vogel via Digitalmars-d
On Wednesday, 25 May 2016 at 00:12:24 UTC, Seb wrote: On Tuesday, 24 May 2016 at 23:26:27 UTC, jmh530 wrote: On Tuesday, 24 May 2016 at 20:44:57 UTC, Seb wrote: Maybe we just need to move it to the dlang github namespace, s.t. it gets properly maintained and maybe even released with dmd/dub?

Re: std.conv.parse not accepting ByCodeUnitImpl

2016-05-25 Thread Jack Stouffer via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 16:53:30 UTC, Steven Schveighoffer wrote: to should work wherever parse works (in fact, whenever you call to!someType(someString), I believe it just forwards to parse). This is not the case; to doesn't work with ranges: auto str = "1234567".byCodeUnit;

Re: stdout.flush

2016-05-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/25/16 2:09 PM, Charles Hixson via Digitalmars-d-learn wrote: Using: dmd --version DMD64 D Compiler v2.071.0 on debian Linux, and importing: importstd.stdio; the line: flush(); causes: nt.d(29): Error: undefined identifier 'flush', did you mean function 'fflush'? This appears

stdout.flush

2016-05-25 Thread Charles Hixson via Digitalmars-d-learn
Using: dmd --version DMD64 D Compiler v2.071.0 on debian Linux, and importing: importstd.stdio; the line: flush(); causes: nt.d(29): Error: undefined identifier 'flush', did you mean function 'fflush'? This appears solved by doing stdout.flush; (compiles, but I'm still writing the

[OT] Re: The D language online tour - tour.dlang.org

2016-05-25 Thread Ali Çehreli via Digitalmars-d-announce
On 05/25/2016 10:46 AM, Steven Schveighoffer wrote: On 5/25/16 1:22 PM, Ali Çehreli wrote: On 05/25/2016 08:18 AM, Steven Schveighoffer wrote: IMO, just say "if and else are your friends", as "else if" is really not it's own construct. I like my own description of "else if" here: :)

Re: The D language online tour - tour.dlang.org

2016-05-25 Thread Steven Schveighoffer via Digitalmars-d-announce
On 5/25/16 1:22 PM, Ali Çehreli wrote: On 05/25/2016 08:18 AM, Steven Schveighoffer wrote: IMO, just say "if and else are your friends", as "else if" is really not it's own construct. I like my own description of "else if" here: :) http://ddili.org/ders/d.en/if.html#ix_if.else%20if

[Issue 16074] std.concurrency receive wont work

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16074 --- Comment #4 from Steven Schveighoffer --- No worries! Welcome to D :) --

Re: SQLite-D alpha is here

2016-05-25 Thread jmh530 via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 03:48:48 UTC, Stefan Koch wrote: Well not much has changed since I made this announcement. By fixing a really jarring bug I had a slight performance regression. But this is still the fastest SQLite reader I know of. This project is currently on the back burner.

Re: Dynamic Bindings to libui (x-platform GUI)

2016-05-25 Thread extrawurst via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 16:47:30 UTC, Nick Sabalausky wrote: On 05/24/2016 04:52 PM, extrawurst wrote: So here are the inofficial Derelict Bindings to it: https://github.com/Extrawurst/DerelictLibui Some D-oriented docs and example code would be nice. There is a plain conversion of

Re: The D language online tour - tour.dlang.org

2016-05-25 Thread Ali Çehreli via Digitalmars-d-announce
On 05/25/2016 08:18 AM, Steven Schveighoffer wrote: IMO, just say "if and else are your friends", as "else if" is really not it's own construct. I like my own description of "else if" here: :) http://ddili.org/ders/d.en/if.html#ix_if.else%20if Ali

[Issue 16074] std.concurrency receive wont work

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16074 --- Comment #3 from Emily82 --- Ehehee yes, you are right, i made a noob report, sorry guys. --

Re: Idea: swap with multiple arguments

2016-05-25 Thread Martin Tschierschke via Digitalmars-d
On Monday, 23 May 2016 at 20:01:08 UTC, Andrei Alexandrescu wrote: So swap(a, b) swaps the contents of a and b. This could be easily generalized to multiple arguments such that swap(a1, a2, ..., an) arranges things such that a1 gets an, a2 gets a1, a3 gets a2, etc. I do know applications for

[Issue 16074] std.concurrency receive wont work

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16074 --- Comment #2 from Steven Schveighoffer --- (In reply to Steven Schveighoffer from comment #1) > You can work around by renaming the import: > > import std.concurrency: spawn, con_recv = receive; Alternatively: import con =

[Issue 16074] std.concurrency receive wont work

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16074 Steven Schveighoffer changed: What|Removed |Added Status|NEW |RESOLVED

Re: std.conv.parse not accepting ByCodeUnitImpl

2016-05-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/25/16 12:10 PM, Jack Stouffer wrote: On Wednesday, 25 May 2016 at 15:34:45 UTC, Steven Schveighoffer wrote: parse consumes data from the string as it goes. I know that, I'm asking why. This disallows the natural range chaining and forces you to save to a variable before calling parse

Re: Dynamic Bindings to libui (x-platform GUI)

2016-05-25 Thread Nick Sabalausky via Digitalmars-d-announce
On 05/24/2016 04:52 PM, extrawurst wrote: So here are the inofficial Derelict Bindings to it: https://github.com/Extrawurst/DerelictLibui Some D-oriented docs and example code would be nice. > > find libui on github: > https://github.com/andlabs/libui Hmm: > uses the native GUI

Re: foo => "bar" key/value literals in D!

2016-05-25 Thread Jacob Carlborg via Digitalmars-d-announce
On 2016-05-25 13:57, Daniel N wrote: Issue9608 is good too, but insufficient. import std.traits; static assert(__traits(isTemplate, a => 0)); static assert(!__traits(isTemplate, (int a) => 0)); The 2nd case can't be solved by 9608 since it's about introspecting templates and "(int a) => 0)"

Re: Phobos uses opSlice and opDollar without checking for it

2016-05-25 Thread H. S. Teoh via Digitalmars-d
On Wed, May 25, 2016 at 03:05:33PM +, qznc via Digitalmars-d wrote: [...] > Can we provide opSlice and opDollar implicitly for random access ranges? [...] P.S. If you're talking about using UFCS to provide fallback implementations of opSlice / opDollar, I don't think that's possible because

Re: Phobos uses opSlice and opDollar without checking for it

2016-05-25 Thread H. S. Teoh via Digitalmars-d
On Wed, May 25, 2016 at 03:05:33PM +, qznc via Digitalmars-d wrote: > Today I learned [0] that opDollar must be explicitly implemented and > might not be available by some ranges. Likewise slicing. If you think > it further, there are lots of functions in Phobos (I'm currently > looking into

Re: std.conv.parse not accepting ByCodeUnitImpl

2016-05-25 Thread Jack Stouffer via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 15:34:45 UTC, Steven Schveighoffer wrote: parse consumes data from the string as it goes. I know that, I'm asking why. This disallows the natural range chaining and forces you to save to a variable before calling parse even though the function works just as well

Re: Could forum.dlang.org remember how many captchas I filled out?

2016-05-25 Thread Basile B. via Digitalmars-d
On Tuesday, 24 May 2016 at 16:36:36 UTC, cy wrote: On Tuesday, 24 May 2016 at 12:59:39 UTC, Basile B. wrote: One thing that could be done is to disable the spam checker when the user is registered. As a counter part registering must be very strong: image capcha + text capcha + guess the code

[Issue 16074] std.concurrency receive wont work

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16074 Emily82 changed: What|Removed |Added Assignee|nob...@puremagic.com|fiorent...@gmail.com --

[Issue 16074] New: std.concurrency receive wont work

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16074 Issue ID: 16074 Summary: std.concurrency receive wont work Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression

Re: Operator overloading through UFCS doesn't work

2016-05-25 Thread Elie Morisse via Digitalmars-d-learn
On Tuesday, 24 May 2016 at 23:43:46 UTC, Jonathan M Davis wrote: On Tuesday, May 24, 2016 23:19:32 Elie Morisse via Digitalmars-d-learn wrote: On Saturday, 13 October 2012 at 22:58:56 UTC, Timon Gehr wrote: > Afaik free-function operator overloads (but not in the > context of UFCS) were

Re: full copies on assignment

2016-05-25 Thread Marc Schütz via Digitalmars-d-learn
On Tuesday, 24 May 2016 at 20:58:11 UTC, John Nixon wrote: On Tuesday, 24 May 2016 at 15:17:37 UTC, Adam D. Ruppe wrote: On Tuesday, 24 May 2016 at 14:29:53 UTC, John Nixon wrote: This naively doesn’t seem right because the RHS of an assignment should not be altered by it. It's because the

Re: Could forum.dlang.org remember how many captchas I filled out?

2016-05-25 Thread Vladimir Panteleev via Digitalmars-d
On Monday, 23 May 2016 at 17:56:17 UTC, cy wrote: Akismet thinks your post looks like spam. Please solve a CAPTCHA to continue. I've filled out one of these for every post I've made here. Yet I'm logged in, with a persistent state on the server side. Could something be implemented along the

Re: How are you enjoying DConf? And where to go next?

2016-05-25 Thread Chris via Digitalmars-d
On Wednesday, 25 May 2016 at 11:30:14 UTC, Ozan wrote: Hi What about Munich? - More sun, more IT companies, more beergardens, ... Maybe we can ask "Funkwerk Aktiengesellschaft" for sponsering? If you calling for papers, what about using video conferencing tools? Not everybody is willing to

Re: Dynamic Bindings to libui (x-platform GUI)

2016-05-25 Thread extrawurst via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 02:34:03 UTC, Mike Parker wrote: On Tuesday, 24 May 2016 at 20:52:54 UTC, extrawurst wrote: Hey folks, So here are the inofficial Derelict Bindings to it: https://github.com/Extrawurst/DerelictLibui I tested them on both windows and mac osx so far. Any linux

Re: The D language online tour - tour.dlang.org

2016-05-25 Thread Ali Çehreli via Digitalmars-d-announce
On 05/17/2016 02:00 AM, André wrote: > Another more fundamental question: Is a translation really needed for > the tour? Definitely. > I am not a native speaker but I still prefer reading technical > stuff in English especially when English is the language of the > original. It's hard for me

Re: std.conv.parse not accepting ByCodeUnitImpl

2016-05-25 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/25/16 11:15 AM, Jack Stouffer wrote: On Tuesday, 24 May 2016 at 05:01:39 UTC, ag0aep6g wrote: You're missing that `parse`'s parameter is `ref`. Do you what the rationale behind this is? I just removed the ref from the floating point from input range overload and it works fine for

[Issue 9149] Disallow converting delegates to const

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9149 Steven Schveighoffer changed: What|Removed |Added CC|

Re: std.conv.parse not accepting ByCodeUnitImpl

2016-05-25 Thread Jack Stouffer via Digitalmars-d-learn
On Tuesday, 24 May 2016 at 05:01:39 UTC, ag0aep6g wrote: You're missing that `parse`'s parameter is `ref`. Do you what the rationale behind this is? I just removed the ref from the floating point from input range overload and it works fine for strings.

Re: The D language online tour - tour.dlang.org

2016-05-25 Thread Steven Schveighoffer via Digitalmars-d-announce
On 5/25/16 9:42 AM, Seb wrote: On Wednesday, 25 May 2016 at 11:46:55 UTC, marcpmichel wrote: I think it's "if, else and else if are tour friends". Hmm that doesn't make sense to me either. How can "if" be a "tour friend". That being said I agree the current wording isn't optimal - do you want

Phobos uses opSlice and opDollar without checking for it

2016-05-25 Thread qznc via Digitalmars-d
Today I learned [0] that opDollar must be explicitly implemented and might not be available by some ranges. Likewise slicing. If you think it further, there are lots of functions in Phobos (I'm currently looking into std.algorithm.searching) which use more features than they check capabilities

Re: Newbie to D, first impressions and feedback on the 5 (and more) first minutes.

2016-05-25 Thread Seb via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 11:24:44 UTC, Russel Winder wrote: […] [...] I thought DMD and Phobos were separate. Given proper versioning (which I think we have) there should be no problem. The problem are parts like std.math which contain compiler-specific optimizations. That being said

Re: What's wrong with my usage of std.algorithm.map in this code example?

2016-05-25 Thread Chris via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 14:48:14 UTC, ag0aep6g wrote: On 05/25/2016 04:39 PM, Chris wrote: I see. Maybe it would be worth adding a wrapper to typecons.Tuple or std.range that helps to rangify tuples. std.range.only is that wrapper. Duh! Of course! :-) I cannot think of any use case

Re: OpenGL with D tutorials

2016-05-25 Thread Seb via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 03:09:02 UTC, dvrein wrote: On Sunday, 22 May 2016 at 21:21:33 UTC, Rishub Nagpal wrote: On Sunday, 22 May 2016 at 12:13:07 UTC, ixid wrote: What is the best OpenGL tutorial with D to use? I've tried to use d-gamedev-intro and opengl-tutorials and seem to get

[Issue 7147] [CTFE] typeid() should be supported in CTFE

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7147 Andre changed: What|Removed |Added CC||an...@s-e-a-p.de --

Re: What's wrong with my usage of std.algorithm.map in this code example?

2016-05-25 Thread ag0aep6g via Digitalmars-d-learn
On 05/25/2016 04:39 PM, Chris wrote: I see. Maybe it would be worth adding a wrapper to typecons.Tuple or std.range that helps to rangify tuples. std.range.only is that wrapper. I cannot think of any use case right now. I never needed this and in the example that started this thread, it

[Issue 16073] Ranges without opDollar not supported

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16073 Jack Stouffer changed: What|Removed |Added CC||j...@jackstouffer.com

Re: What's wrong with my usage of std.algorithm.map in this code example?

2016-05-25 Thread ag0aep6g via Digitalmars-d-learn
On 05/25/2016 03:27 PM, Chris wrote: Why can the tuple be iterated with foreach, as in my quick fix, and indexed with tuple[0..], but is not accepted as a range? What are the differences? popFront doesn't make sense with a tuple (aka expression list). When you remove the first element of a

Re: What's wrong with my usage of std.algorithm.map in this code example?

2016-05-25 Thread Chris via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 14:32:11 UTC, ag0aep6g wrote: On 05/25/2016 03:27 PM, Chris wrote: Why can the tuple be iterated with foreach, as in my quick fix, and indexed with tuple[0..], but is not accepted as a range? What are the differences? popFront doesn't make sense with a tuple

[Issue 16073] New: Ranges without opDollar not supported

2016-05-25 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16073 Issue ID: 16073 Summary: Ranges without opDollar not supported Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1

Re: SQLite-D alpha is here

2016-05-25 Thread Stefan Koch via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 06:52:22 UTC, Suliman wrote: Even faster then official version? What about futures, would it possible to make it's 100% compatibility with C version? Not really. The reason why it is faster is because there is no indirection in working with the data. If I had

Re: What's wrong with my usage of std.algorithm.map in this code example?

2016-05-25 Thread Chris via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 13:27:28 UTC, Chris wrote: On Wednesday, 25 May 2016 at 12:08:20 UTC, Steven Schveighoffer wrote: On 5/25/16 6:24 AM, pineapple wrote: On Tuesday, 24 May 2016 at 20:18:34 UTC, Steven Schveighoffer wrote: Slice assignment from range to array is not supported. In

Re: Preprocessing CSS

2016-05-25 Thread Andrei Alexandrescu via Digitalmars-d
On 05/25/2016 09:36 AM, Adam D. Ruppe wrote: On Wednesday, 25 May 2016 at 12:53:10 UTC, Andrei Alexandrescu wrote: Did you consider simply fixing some of that crap? I did! The result is at dpldocs.info A few minor changes also went through Phobos too:

Re: Diamond - MVC / Template engine

2016-05-25 Thread Bauss via Digitalmars-d-announce
On Wednesday, 25 May 2016 at 12:29:03 UTC, Kagamin wrote: On Tuesday, 24 May 2016 at 14:57:03 UTC, Bauss wrote: Note: If you have a better suggestion, feel free to come with one :) I'd say do what razor does: raw output should require extra syntax. Weren't templates created in order to not

Re: Newbie to D, first impressions and feedback on the 5 (and more) first minutes.

2016-05-25 Thread qznc via Digitalmars-d-learn
On Wednesday, 25 May 2016 at 09:41:10 UTC, Russel Winder wrote: I do not really have the proper resources to host such a repository and because of this I have not built one. I know I should rather than just moan, but Debian is my main platform and that is covered. Yes, this is the core

  1   2   >