Re: Notes for DLang maintainers

2017-02-28 Thread Jacob Carlborg via Digitalmars-d
On 2017-02-28 17:37, Nick Sabalausky (Abscissa) wrote: Maybe they should be, but with the basic git interface, or any front-end I've seen, they're terribly convoluted. Particularly squashing. Well, either that, or the docs are just really, REALLY bad. There's no reason either one of those

Re: Calling python script from a d program

2017-02-28 Thread Seb via Digitalmars-d
On Wednesday, 1 March 2017 at 06:56:03 UTC, Aayush wrote: Hi, I want to call a python script from a d program. Can someone please help me? Thanks. If you simply want to call your script, have a look at std.process https://dlang.org/phobos/std_process.html For more interoperability between

Re: DConf 2017 Early Bird Registration expires Monday!

2017-02-28 Thread Jacob Carlborg via Digitalmars-d-announce
On 2017-02-28 15:58, Andrei Alexandrescu wrote: It has been fixed on 2/25. Apologies for the annoyance. -- Andrei I can see that it works now, thanks. -- /Jacob Carlborg

How do I get names of regex captures during iteration? Populate AAs with captures?

2017-02-28 Thread Chad Joan via Digitalmars-d-learn
Is there a way to get the name of a named capture when iterating over captures from a regular expression match? I've looked at the std.regex code and it seems like "no" to my eyes, but I wonder if others here have... a way. My original problem is this: I need to populate an associative

Re: dpldocs: xlinking and Documented destructors and postblits

2017-02-28 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 03/01/2017 01:56 AM, Nick Sabalausky (Abscissa) wrote: On 03/01/2017 12:18 AM, Adam D. Ruppe wrote: Or better yet, surrender to me! D is gaining features that ddoc doesn't even know how to handle but I do... http://www.youtube.com/watch?v=lBEn3a4TIUw=0m11s But seriously though, nice

Re: dpldocs: xlinking and Documented destructors and postblits

2017-02-28 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 03/01/2017 12:18 AM, Adam D. Ruppe wrote: Or better yet, surrender to me! D is gaining features that ddoc doesn't even know how to handle but I do... http://www.youtube.com/watch?v=lBEn3a4TIUw=0m11s But seriously though, nice job!

Calling python script from a d program

2017-02-28 Thread Aayush via Digitalmars-d
Hi, I want to call a python script from a d program. Can someone please help me? Thanks.

Re: Fast hashtable

2017-02-28 Thread Cecil Ward via Digitalmars-d
On Tuesday, 28 February 2017 at 21:00:05 UTC, H. S. Teoh wrote: On Tue, Feb 28, 2017 at 12:57:14PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: This is of possible interest: https://probablydance.com/2017/02/26/i-wrote-the-fastest-hashtable/ -- Related to this, recently I found some

Re: dpldocs: xlinking and Documented destructors and postblits

2017-02-28 Thread rikki cattermole via Digitalmars-d
On 01/03/2017 7:19 PM, lobo wrote: On Wednesday, 1 March 2017 at 05:18:59 UTC, Adam D. Ruppe wrote: I stumbled across std.typecons.Unique in my doc website today and realized there was a postblit in the source, but I didn't display the documentation comment. [...] Is it possible to use your

Re: dpldocs: xlinking and Documented destructors and postblits

2017-02-28 Thread lobo via Digitalmars-d
On Wednesday, 1 March 2017 at 05:18:59 UTC, Adam D. Ruppe wrote: I stumbled across std.typecons.Unique in my doc website today and realized there was a postblit in the source, but I didn't display the documentation comment. [...] Is it possible to use your tool to generate the docs for my

Alignment of struct containing SIMD field - GDC

2017-02-28 Thread Cecil Ward via Digitalmars-d-learn
struct vec_struct { alias field this; bool b; int8 field; } In this code when you look at the generated x64 code output by GDC it seems to be doing a nice job, because it has got the offset right for the 256-bit YMM 'field' correct. Does D automatically propagate the

dpldocs: xlinking and Documented destructors and postblits

2017-02-28 Thread Adam D. Ruppe via Digitalmars-d
I stumbled across std.typecons.Unique in my doc website today and realized there was a postblit in the source, but I didn't display the documentation comment. Aghast at my awful bug, I immediately set out to fix it. Behold:

Re: WebAssembly design is done?

2017-02-28 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 02/28/2017 11:26 PM, Nick Sabalausky (Abscissa) wrote: On 02/28/2017 10:28 PM, Joakim wrote: What is the alternative you prefer: javascript and its myriad vulnerabilities? Probably shipping binaries in a sandboxed environment...but, you know, *without* the browser community badly

Re: WebAssembly design is done?

2017-02-28 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 02/28/2017 10:28 PM, Joakim wrote: On Tuesday, 28 February 2017 at 21:50:11 UTC, Jack Stouffer wrote: On Tuesday, 28 February 2017 at 18:04:39 UTC, Ola Fosheim Grøstad wrote: [...] What a long, roundabout path we've taken to end up back where we started: shipping binaries in a sandboxed

Re: WebAssembly design is done?

2017-02-28 Thread Joakim via Digitalmars-d
On Tuesday, 28 February 2017 at 21:50:11 UTC, Jack Stouffer wrote: On Tuesday, 28 February 2017 at 18:04:39 UTC, Ola Fosheim Grøstad wrote: [...] What a long, roundabout path we've taken to end up back where we started: shipping binaries in a sandboxed environment. What is the alternative

Re: Notes for DLang maintainers

2017-02-28 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 02/28/2017 12:18 PM, H. S. Teoh via Digitalmars-d wrote: Whut...? What can be easier than: git checkout my_bug_fix git rebase -i master # Editor pops up, change "pick" to "squash" (or "s" for short) # for every commit you wish to squash. git push -f

Re: Mixing libraries

2017-02-28 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 20:08:25 UTC, Jordan Wilson wrote: Hello, Been trying to learn the Simple Fast Multimedia Library (SFML) using the Derelict bindings, and noticed some functionality is offered by both SFML and the std library (for example, sfClock and sfMutex). Is there a

Why don't you advertise more your language on Quora etc ?

2017-02-28 Thread Jared Jeffries via Digitalmars-d
I've read the answer to questions like "Which is the best programming language to learn in 2017?". Nobody was telling anything about D, which is really sad, because in my opinion D could be one of the best answers to this question. I've answered this question. Better late than never. I

Re: How to enforce compile time evaluation (and test if it was done at compile time)

2017-02-28 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 00:22:28 UTC, sarn wrote: If you ever have doubts, you can always use something like this to check: assert (__ctfe); Sorry, "enforce" would more appropriate if you're really checking. if (!__ctfe) assert(false); ... might be the best option. That

Re: Getting underlying struct for parseJSON

2017-02-28 Thread Seb via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 20:48:33 UTC, Petar Kirov [ZombineDev] wrote: On Tuesday, 28 February 2017 at 20:27:25 UTC, Alexey H wrote: [...] If you really care about performance, have a look this: http://forum.dlang.org/post/20151014090114.60780ad6@marco-toshiba std.json is not tuned

[Issue 17235] Compile error inout member function, out-of-order semantic

2017-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17235 Johan Engelen changed: What|Removed |Added Keywords||industry --

[Issue 17235] New: Compile error inout member function, out-of-order semantic

2017-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17235 Issue ID: 17235 Summary: Compile error inout member function, out-of-order semantic Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: WebAssembly design is done?

2017-02-28 Thread Jack Stouffer via Digitalmars-d
On Tuesday, 28 February 2017 at 18:04:39 UTC, Ola Fosheim Grøstad wrote: «WebAssembly CG members representing four browsers, Chrome, Edge, Firefox, and WebKit, have reached consensus that the design of the initial (MVP [1]) WebAssembly API and binary format is complete to the extent that no

Re: Getting underlying struct for parseJSON

2017-02-28 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 20:27:25 UTC, Alexey H wrote: So, my real question is: can i actually, by any change, get the description of an underlying struct that the call to parseJSON generates? It doesn't actually generate one, it just returns a tagged union (a kind of dynamic type).

Re: code D'ish enough? - ignore previous post with same subject

2017-02-28 Thread Jordan Wilson via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 20:49:39 UTC, crimaniak wrote: On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote: .map!(a => a.to!double) If lambda just calls another function you can pass it directly: == .map!(to!double) Learn something new everyday, thanks :-)

Re: Getting underlying struct for parseJSON

2017-02-28 Thread Alexey H via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 20:48:33 UTC, Petar Kirov [ZombineDev] wrote: On Tuesday, 28 February 2017 at 20:27:25 UTC, Alexey H wrote: Hello, guys! I'm working on a project that involves parsing of huge JSON datasets in real-time. Just an example of what i'm dealing with is here:

Re: Fast hashtable

2017-02-28 Thread H. S. Teoh via Digitalmars-d
On Tue, Feb 28, 2017 at 12:57:14PM -0500, Andrei Alexandrescu via Digitalmars-d wrote: > This is of possible interest: > https://probablydance.com/2017/02/26/i-wrote-the-fastest-hashtable/ -- Related to this, recently I found some interesting papers for large external (i.e., on-disk) hash

Re: code D'ish enough? - ignore previous post with same subject

2017-02-28 Thread crimaniak via Digitalmars-d-learn
On Sunday, 26 February 2017 at 21:50:38 UTC, Jordan Wilson wrote: .map!(a => a.to!double) If lambda just calls another function you can pass it directly: == .map!(to!double)

Re: Getting underlying struct for parseJSON

2017-02-28 Thread via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 20:27:25 UTC, Alexey H wrote: Hello, guys! I'm working on a project that involves parsing of huge JSON datasets in real-time. Just an example of what i'm dealing with is here:

[Issue 15616] missing candidate in error message

2017-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15616 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/d91eec61f604e7c70450527ba88f1701a5d8c793 Fix Issue 15616 - missing candidate in error message (#6525)

Getting underlying struct for parseJSON

2017-02-28 Thread Alexey H via Digitalmars-d-learn
Hello, guys! I'm working on a project that involves parsing of huge JSON datasets in real-time. Just an example of what i'm dealing with is here: https://gist.githubusercontent.com/gdmka/125014058bb7d7f01b867fac56300a61/raw/f0c6b5be5fb01b16dd83f07c577b72f76f72c855/data.json Can't think of

[Issue 15616] missing candidate in error message

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

Mixing libraries

2017-02-28 Thread Jordan Wilson via Digitalmars-d-learn
Hello, Been trying to learn the Simple Fast Multimedia Library (SFML) using the Derelict bindings, and noticed some functionality is offered by both SFML and the std library (for example, sfClock and sfMutex). Is there a general design principle of, say, use the std library whenever

Re: Notes for DLang maintainers

2017-02-28 Thread H. S. Teoh via Digitalmars-d
On Tue, Feb 28, 2017 at 06:24:45PM +, Russel Winder via Digitalmars-d wrote: > On Tue, 2017-02-28 at 09:18 -0800, H. S. Teoh via Digitalmars-d wrote: > > […] > > > 30-year-old typographical infelicities like 'grep'.) > > Surely typing grep is far easier than get_regular_expression_print It

Re: Fast hashtable

2017-02-28 Thread deadalnix via Digitalmars-d
On Tuesday, 28 February 2017 at 17:57:14 UTC, Andrei Alexandrescu wrote: This is of possible interest: https://probablydance.com/2017/02/26/i-wrote-the-fastest-hashtable/ -- Andrei But let’s say you know that your hash function returns numbers that are well distributed and that you’re rarely

Re: Notes for DLang maintainers

2017-02-28 Thread Russel Winder via Digitalmars-d
On Tue, 2017-02-28 at 09:18 -0800, H. S. Teoh via Digitalmars-d wrote: > […] > 30-year-old typographical infelicities like 'grep'.) Surely typing grep is far easier than get_regular_expression_print > […] > Curious to see what you come up with.  AIUI, git is already providing > the 'porcelain'

Re: foreach for string[string]AA

2017-02-28 Thread Anton Pastukhov via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 17:16:43 UTC, Daniel Kozák wrote: V Tue, 28 Feb 2017 15:15:00 + Anton Pastukhov via Digitalmars-d-learn napsáno: I can't see the logic in AA foreach order. Consider this code: ... Output: three two one four I was sure

WebAssembly design is done?

2017-02-28 Thread Ola Fosheim Grøstad via Digitalmars-d
«WebAssembly CG members representing four browsers, Chrome, Edge, Firefox, and WebKit, have reached consensus that the design of the initial (MVP [1]) WebAssembly API and binary format is complete to the extent that no further design work is possible without implementation experience and

Re: Fast hashtable

2017-02-28 Thread bauss via Digitalmars-d
On Tuesday, 28 February 2017 at 17:57:14 UTC, Andrei Alexandrescu wrote: This is of possible interest: https://probablydance.com/2017/02/26/i-wrote-the-fastest-hashtable/ -- Andrei That's really interesting.

Fast hashtable

2017-02-28 Thread Andrei Alexandrescu via Digitalmars-d
This is of possible interest: https://probablydance.com/2017/02/26/i-wrote-the-fastest-hashtable/ -- Andrei

[Issue 17232] The index page for std.algorithm looks bad on mobile

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

Re: Notes for DLang maintainers

2017-02-28 Thread H. S. Teoh via Digitalmars-d
On Tue, Feb 28, 2017 at 11:37:45AM -0500, Nick Sabalausky (Abscissa) via Digitalmars-d wrote: > On 02/28/2017 02:37 AM, Jacob Carlborg wrote: > > On 2017-02-28 00:42, Nick Sabalausky (Abscissa) wrote: > > > > > Contributors shouldn't have to know as much about git as a > > > project's

Re: foreach for string[string]AA

2017-02-28 Thread Daniel Kozák via Digitalmars-d-learn
V Tue, 28 Feb 2017 15:15:00 + Anton Pastukhov via Digitalmars-d-learn napsáno: > I can't see the logic in AA foreach order. Consider this code: > ... > Output: > three > two > one > four > > I was sure output should be > one > two > three > four

Building a project with CMAKE

2017-02-28 Thread berni via Digitalmars-d-learn
I'm using CMAKE to build my project. With https://github.com/dcarp/cmake-d this works almost. The only thing I do not manage to get working is running cmake in release mode. When I use -DCMAKE_BUILD_TYPE=Release I get some linker errors, which I do not get, when compiling manually. (In both

Re: Notes for DLang maintainers

2017-02-28 Thread Vladimir Panteleev via Digitalmars-d
On Tuesday, 28 February 2017 at 15:49:56 UTC, Andrei Alexandrescu wrote: There can be any amount of discussion about this, to no conclusive results, and any argument may be responded with "I don't buy that". That's simply because, again, there's some subjective factor and there is no perfect

[Issue 17229] File.byChunk w/ stdout.lockingTextWriter is very slow

2017-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17229 Steven Schveighoffer changed: What|Removed |Added CC|

Re: CTFE Status 2

2017-02-28 Thread Nordlöw via Digitalmars-d
On Monday, 27 February 2017 at 23:48:13 UTC, Stefan Koch wrote: Simple ref calls work now. Meaning the following code will compile :) Great work.

Re: Notes for DLang maintainers

2017-02-28 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 02/28/2017 02:37 AM, Jacob Carlborg wrote: On 2017-02-28 00:42, Nick Sabalausky (Abscissa) wrote: Contributors shouldn't have to know as much about git as a project's maintainers. So these features, if used, are AWESOME. Squashing and rebasing is part of the basic git, in my opinion.

Re: foreach for string[string]AA

2017-02-28 Thread Anton Pastukhov via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 15:44:46 UTC, bachmeier wrote: On Tuesday, 28 February 2017 at 15:33:46 UTC, ikod wrote: AA implemented as hash table, so it doesn't preserve insertion order. You have to sort keys when you need: import std.algorithm; import std.stdio; void main() {

[Issue 16590] Wrong di generation for ref methods

2017-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16590 --- Comment #16 from Satoshi --- alias foo = (a, b) => less(b, a); is rewritten asi: alias foo = (__T42, __T43)(a, b) { return less(b, a); } Variable types are missing --

Re: Notes for DLang maintainers

2017-02-28 Thread Andrei Alexandrescu via Digitalmars-d
On 02/28/2017 11:03 AM, Seb wrote: On Tuesday, 28 February 2017 at 14:52:36 UTC, Andrei Alexandrescu wrote: Thanks. I'd replace "changes should be split into as many commits as is reasonable" with "changes should be split into as many pull requests as is reasonable", which is a natural

Re: Notes for DLang maintainers

2017-02-28 Thread Seb via Digitalmars-d
On Tuesday, 28 February 2017 at 14:52:36 UTC, Andrei Alexandrescu wrote: Thanks. I'd replace "changes should be split into as many commits as is reasonable" with "changes should be split into as many pull requests as is reasonable", which is a natural consequence of "most pull requests should

Re: Notes for DLang maintainers

2017-02-28 Thread Andrei Alexandrescu via Digitalmars-d
On 02/28/2017 10:04 AM, Vladimir Panteleev wrote: On Tuesday, 28 February 2017 at 14:52:36 UTC, Andrei Alexandrescu wrote: Thanks. I'd replace "changes should be split into as many commits as is reasonable" with "changes should be split into as many pull requests as is reasonable", which is a

Re: foreach for string[string]AA

2017-02-28 Thread bachmeier via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 15:33:46 UTC, ikod wrote: AA implemented as hash table, so it doesn't preserve insertion order. You have to sort keys when you need: import std.algorithm; import std.stdio; void main() { auto aa = ["one":1, "two":2

Re: foreach for string[string]AA

2017-02-28 Thread ikod via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 15:15:00 UTC, Anton Pastukhov wrote: I can't see the logic in AA foreach order. Consider this code: ``` void main() { string[string] test = [ "one": "1", "two": "2", "three": "3", "four": "4" ]; import

foreach for string[string]AA

2017-02-28 Thread Anton Pastukhov via Digitalmars-d-learn
I can't see the logic in AA foreach order. Consider this code: ``` void main() { string[string] test = [ "one": "1", "two": "2", "three": "3", "four": "4" ]; import std.stdio:writeln; foreach(k, v; test) { writeln(k); } } Output:

Re: Notes for DLang maintainers

2017-02-28 Thread Vladimir Panteleev via Digitalmars-d
On Tuesday, 28 February 2017 at 14:52:36 UTC, Andrei Alexandrescu wrote: Thanks. I'd replace "changes should be split into as many commits as is reasonable" with "changes should be split into as many pull requests as is reasonable", which is a natural consequence of "most pull requests should

Re: DConf 2017 Early Bird Registration expires Monday!

2017-02-28 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 02/28/2017 02:34 AM, Jacob Carlborg wrote: On 2017-02-28 07:08, Walter Bright wrote: I had sent a confirmation email. Unfortunately, there are often problems with this, as the emails get put in the recipient's spam folder. Could we please just fix the problem. It has been fixed on 2/25.

Re: Notes for DLang maintainers

2017-02-28 Thread Andrei Alexandrescu via Digitalmars-d
On 02/28/2017 08:48 AM, Vladimir Panteleev wrote: On Tuesday, 28 February 2017 at 13:10:17 UTC, Andrei Alexandrescu wrote: This would be the overwhelmingly frequent case. ... This indicates a problem with the PR more often than not. It is unfortunate that these two seem to be true right now,

Re: Notes for DLang maintainers

2017-02-28 Thread Vladimir Panteleev via Digitalmars-d
On Tuesday, 28 February 2017 at 13:10:17 UTC, Andrei Alexandrescu wrote: This would be the overwhelmingly frequent case. ... This indicates a problem with the PR more often than not. It is unfortunate that these two seem to be true right now, so given that, I'll agree with you. Currently a

Re: Notes for DLang maintainers

2017-02-28 Thread Andrei Alexandrescu via Digitalmars-d
On 02/28/2017 01:07 AM, Vladimir Panteleev wrote: On Sunday, 26 February 2017 at 14:38:03 UTC, Seb wrote: 1) Commit squashing Reminder: please only do this only when it makes sense to (one commit with significant changes followed by fixup commits that have no significance on their own).

Re: Calling destroy on struct pointer

2017-02-28 Thread Radu via Digitalmars-d-learn
On Saturday, 25 February 2017 at 16:39:18 UTC, Moritz Maxeiner wrote: On Saturday, 25 February 2017 at 15:13:27 UTC, Radu wrote: [...] Thanks for the example. [...] Hm, that's an issue you'd best take up to the bugtracker, I think. Maybe there's a way around that, but I don't know.

[Issue 17234] New: access to registered thread names

2017-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17234 Issue ID: 17234 Summary: access to registered thread names Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: enhancement

[Issue 17233] New: getSymbolsByUDA toSymbols error instantiating if parent has same UDA field

2017-02-28 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17233 Issue ID: 17233 Summary: getSymbolsByUDA toSymbols error instantiating if parent has same UDA field Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: How to enforce compile time evaluation (and test if it was done at compile time)

2017-02-28 Thread sarn via Digitalmars-d-learn
On Tuesday, 28 February 2017 at 07:41:36 UTC, Christian Köstlin wrote: As I understand the only difference between assert and enforce is, that assert is not compiled into releases? Thanks! Christian Pretty much so. The intention is that assert means something that's supposed to be true