Re: array of delegates

2016-04-13 Thread David Skluzacek via Digitalmars-d-learn
So, that message is a pretty cryptic, but the problem there is that map does its thing at runtime, but partial is a template and must be instantiated at compile time. Instead you can use std.meta.staticMap, by doing something like this: void main() { import std.stdio; import

Re: Getting the current module as a symbol

2016-04-13 Thread Mithun Hunsur via Digitalmars-d-learn
On Wednesday, 13 April 2016 at 16:58:34 UTC, Vladimir Panteleev wrote: On Wednesday, 13 April 2016 at 11:36:07 UTC, Mithun Hunsur wrote: Yeah, that also works; you have to define a symbol (if you don't have one you can already use) in order to get to it, so it's a little wasteful. Still useful

Re: Integer overflow checking

2016-04-13 Thread deadalnix via Digitalmars-d
On Thursday, 14 April 2016 at 04:52:12 UTC, Walter Bright wrote: On 4/13/2016 8:00 PM, deadalnix wrote: Also, just checked, on sandy bridge, the LEA has 3clock latency (but start earlier in the pipeline) and the add 1, so it is not as bad as it looks (it is still bad). The size is larger,

[Issue 15629] [REG2.066.0] wrong code with "-O -inline" but correct with "-O"

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15629 Walter Bright changed: What|Removed |Added CC|

Re: Integer overflow checking

2016-04-13 Thread Walter Bright via Digitalmars-d
On 4/13/2016 8:00 PM, deadalnix wrote: Also, just checked, on sandy bridge, the LEA has 3clock latency (but start earlier in the pipeline) and the add 1, so it is not as bad as it looks (it is still bad). The size is larger, too (not so cache friendly). Integer arithmetic is sort of the bread

[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624 --- Comment #10 from Vladimir Panteleev --- (In reply to Walter Bright from comment #8) > Works for me, but added the test case to the test suite. According to Digger, it was fixed by

[Issue 12507] SysTime.init.toString should not segfault

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12507 Issue 12507 depends on issue 12624, which changed state. Issue 12624 Summary: [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime https://issues.dlang.org/show_bug.cgi?id=12624 What

[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624 Walter Bright changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624 --- Comment #9 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/ebf5dfc90d00c7c693ba50c25e38bce15ddd7827 add test cases for issue

[Issue 15923] New: is expression qualifier matching does not work with multiple qualifiers

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15923 Issue ID: 15923 Summary: is expression qualifier matching does not work with multiple qualifiers Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: Integer overflow checking

2016-04-13 Thread deadalnix via Digitalmars-d
On Thursday, 14 April 2016 at 02:55:01 UTC, deadalnix wrote: On Wednesday, 13 April 2016 at 22:13:27 UTC, Walter Bright wrote: On 4/12/2016 5:06 AM, Andrei Alexandrescu wrote: Interesting: http://blog.regehr.org/archives/1384 -- Andrei Curiously never mentioned is the following optimization:

Re: Integer overflow checking

2016-04-13 Thread deadalnix via Digitalmars-d
On Wednesday, 13 April 2016 at 22:13:27 UTC, Walter Bright wrote: On 4/12/2016 5:06 AM, Andrei Alexandrescu wrote: Interesting: http://blog.regehr.org/archives/1384 -- Andrei Curiously never mentioned is the following optimization: return a+b*2+27; becomes: LEA EAX,27[ESI][EDI*2]

Re: Opportunity: Software Execution Time Determinism

2016-04-13 Thread Walter Bright via Digitalmars-d
On 4/13/2016 8:50 AM, Nordlöw wrote: I'm currenly in an industry with extremely high demands on software determinism, both in space and time (hard realtime). My conclusion so far is that most safety-critical industries today are in desperate need of better (any) language support for

Re: Opportunity: Software Execution Time Determinism

2016-04-13 Thread Walter Bright via Digitalmars-d
On 4/13/2016 6:13 PM, Andrei Alexandrescu wrote: Tarjan was among the first to study the problem: http://www.cs.princeton.edu/courses/archive/spr06/cos423/Handouts/Amortized.pdf. He assigned "computational credits" to functions and designed a type system in which functions cannot consume more

Re: Opportunity: Software Execution Time Determinism

2016-04-13 Thread Walter Bright via Digitalmars-d
On 4/13/2016 5:31 PM, Simen Kjaeraas wrote: On Wednesday, 13 April 2016 at 22:58:26 UTC, Walter Bright wrote: The compiler could be fairly easily compute cyclomatic complexity, but how that would be used to determine max time escapes me. For example, how many times would a particular loop be

Re: Fixed-Length Array Sorting

2016-04-13 Thread Andrei Alexandrescu via Digitalmars-d
On 4/13/16 7:20 PM, Temtaime wrote: If you want help std algorithm sorting, a better start is to fix bugs : a lot of functions can't work with swapstrategy stable and so on. Are these in bugzilla? -- Andrei

Re: Opportunity: Software Execution Time Determinism

2016-04-13 Thread Andrei Alexandrescu via Digitalmars-d
On 4/13/16 6:58 PM, Walter Bright wrote: The compiler could be fairly easily compute cyclomatic complexity, but how that would be used to determine max time escapes me. For example, how many times would a particular loop be executed? Isn't this the halting problem, i.e. not computable? Andrei

[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624 --- Comment #8 from Walter Bright --- Works for me, but added the test case to the test suite. --

[Issue 12624] [REG 2.064] Internal error: backend\cgobj.c 2313 with Rebindable!(immutable TimeZone) in std.datetime

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12624 Walter Bright changed: What|Removed |Added CC|

Re: Opportunity: Software Execution Time Determinism

2016-04-13 Thread Simen Kjaeraas via Digitalmars-d
On Wednesday, 13 April 2016 at 22:58:26 UTC, Walter Bright wrote: The compiler could be fairly easily compute cyclomatic complexity, but how that would be used to determine max time escapes me. For example, how many times would a particular loop be executed? Isn't this the halting problem,

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Puming via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 17:21:58 UTC, Jon D wrote: On Wednesday, 13 April 2016 at 17:01:33 UTC, Dicebot wrote: On Wednesday, 13 April 2016 at 16:34:16 UTC, Jon D wrote: [...] You don't need to put anything on path to run utils from dub packages. `dub run` will take care of setting

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Puming via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 16:34:16 UTC, Jon D wrote: Thanks Rory, Puming. I'll look into this and see how best to make it fit. I'm realizing also there's one additional capability it'd be nice to have in dub for tools like this, which in an option to install the executables somewhere

[Issue 15922] New: DMD segfault in functionParameters()

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15922 Issue ID: 15922 Summary: DMD segfault in functionParameters() Product: D Version: D2 Hardware: x86_64 URL: https://gist.github.com/Hackerpilot/ba992214296597698a

array of delegates

2016-04-13 Thread Alex via Digitalmars-d-learn
Hi at all! Having read this: http://forum.dlang.org/post/mailman.2415.1354291433.5162.digitalmars-d-le...@puremagic.com still have a problem... Lets begin with what works: enum Props{p1, p2} class AA { int[] arr1; int[] arr2; this() { //arbitrary values... arr1

Re: Fixed-Length Array Sorting

2016-04-13 Thread Temtaime via Digitalmars-d
On Wednesday, 13 April 2016 at 22:02:19 UTC, Nordlöw wrote: On Wednesday, 13 April 2016 at 19:58:49 UTC, Andrei Alexandrescu wrote: * Cut and paste error at https://github.com/nordlow/phobos-next/blob/master/src/sortn.d#L90 Fixed. * I see some sizes are not supported, we should not have

Re: Opportunity: Software Execution Time Determinism

2016-04-13 Thread Walter Bright via Digitalmars-d
The compiler could be fairly easily compute cyclomatic complexity, but how that would be used to determine max time escapes me. For example, how many times would a particular loop be executed? Isn't this the halting problem, i.e. not computable? Andrei has done some great work on determining

Re: Opportunity: Software Execution Time Determinism

2016-04-13 Thread Nick B via Digitalmars-d
On Wednesday, 13 April 2016 at 15:50:40 UTC, Nordlöw wrote: I'm currenly in an industry with extremely high demands on software determinism, both in space and time (hard realtime). I'm aware of the lack of absolute time-determinism in the CPU architectures of today. What is absolute

Re: Integer overflow checking

2016-04-13 Thread Walter Bright via Digitalmars-d
On 4/12/2016 5:06 AM, Andrei Alexandrescu wrote: Interesting: http://blog.regehr.org/archives/1384 -- Andrei Curiously never mentioned is the following optimization: return a+b*2+27; becomes: LEA EAX,27[ESI][EDI*2] To overflow check: ADD EDI,EDI JO overflow ADD EDI,27

Re: Fixed-Length Array Sorting

2016-04-13 Thread Nordlöw via Digitalmars-d
On Wednesday, 13 April 2016 at 19:58:49 UTC, Andrei Alexandrescu wrote: * Cut and paste error at https://github.com/nordlow/phobos-next/blob/master/src/sortn.d#L90 Fixed. * I see some sizes are not supported, we should not have holes. * Sometimes the sort routine gets too bulky. Suggestion:

[Issue 3410] std.stdio.File.tell() doesn't work for files >2GB

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3410 Andrei Alexandrescu changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Issue 3409] stdio.File.seek() doesn't work for files >2GB

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3409 Andrei Alexandrescu changed: What|Removed |Added Status|ASSIGNED|RESOLVED

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Ali Çehreli via Digitalmars-d-announce
On 04/13/2016 01:40 PM, Jon D wrote: > What do you mean by an "AMA"? It means "(I'm the author), Ask Me Anything". Ali

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Jon D via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 19:52:30 UTC, Walter Bright wrote: On 4/11/2016 5:50 PM, Jon D wrote: I'd welcome any feedback, either on the apps or the code. Intention is that the code be reasonable example programs. And, I may write a blog post about my D explorations at some point, they'd

[Issue 3409] stdio.File.seek() doesn't work for files >2GB

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3409 Simen Kjaeraas changed: What|Removed |Added CC|

[Issue 3410] std.stdio.File.tell() doesn't work for files >2GB

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3410 Simen Kjaeraas changed: What|Removed |Added CC|

Re: Fixed-Length Array Sorting

2016-04-13 Thread Andrei Alexandrescu via Digitalmars-d
On 04/13/2016 12:07 PM, Nordlöw wrote: On Tuesday, 12 April 2016 at 14:56:00 UTC, Andrei Alexandrescu wrote: Also to avoid cache line thrashing, sort parallel swaps by leftmost index. E.g. this line: 18,19, 20,21, 2,4, 1,3, 0,5, 6,8, 7,9, 10,12, 11,13, becomes: 0,5, 1,3, 2,4, 6,8, 7,9,

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Walter Bright via Digitalmars-d-announce
On 4/11/2016 5:50 PM, Jon D wrote: I'd welcome any feedback, either on the apps or the code. Intention is that the code be reasonable example programs. And, I may write a blog post about my D explorations at some point, they'd be referenced in such an article. You've got questions on:

Re: Any usable SIMD implementation?

2016-04-13 Thread Walter Bright via Digitalmars-d
On 4/13/2016 5:47 AM, Marco Leise wrote: Yes, they are all @property and a substitution with direct access to the globals will work around GDC's lack of cross-module inlining. Otherwise these feature checks which might be used in hot code, are more costly than they should be. I hate when things

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Dicebot via Digitalmars-d-announce
On 04/13/2016 09:48 PM, Jon D wrote: > Right. So, partly what I'm wondering is if during the normal dub > fetch/run cycle there might be an opportunity to print a message the > user with some info to help them add the tools to their path. I haven't > used dub much, so I'll have to look into it

Re: TTS Synthesis: D and vibe.d in Action

2016-04-13 Thread Andre Polykanine via Digitalmars-d-announce
Hello Chris, CvDda> Just to inform you that we successfully use D and vibe.d for two CvDda> things: This is just overwhelming! How do you make bindings to NVDA API which is in Python? I'm not an NVDA user (I'm using JAWS, if it matters), but I'm still very interested in the technology.

Re: DWT Cloning / Build fails

2016-04-13 Thread Jacob Carlborg via Digitalmars-d-learn
On 2016-04-13 17:23, Jesse Phillips wrote: Looks like your firewall is blocking the git protocol. Checkout dwt without --recursive Modify the .gitmodules file so that https:// urls are used instead of git Run the git submodule update --init Updated to use HTTPS for the submodules. --

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Jon D via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 18:22:21 UTC, Dicebot wrote: On Wednesday, 13 April 2016 at 17:21:58 UTC, Jon D wrote: You don't need to put anything on path to run utils from dub packages. `dub run` will take care of setting necessary envionment (without messing with the system): dub fetch

Re: Strange Loop Conference Call for Presentations

2016-04-13 Thread QAston via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 15:00:53 UTC, Joakim wrote: On Wednesday, 13 April 2016 at 14:33:01 UTC, Andrei That conference had a strange incident last year where they kicked a guy out for his political views, that had nothing to do with his technical talk:

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Dicebot via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 17:21:58 UTC, Jon D wrote: You don't need to put anything on path to run utils from dub packages. `dub run` will take care of setting necessary envionment (without messing with the system): dub fetch package_with_apps dub run package_with_apps:app1 --flags args

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 04/11/2016 08:50 PM, Jon D wrote: Hi all, I've open sourced a set of command line utilities for manipulating tab-separated value files. They are complementary to traditional unix tools like cut, grep, etc. They're useful for manipulating large data files. I use them when prepping files for R

[Issue 15920] std.traits.MemberFunctionsTuple gives a wrong result

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15920 Simen Kjaeraas changed: What|Removed |Added Keywords||pull

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Jon D via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 12:36:56 UTC, Dejan Lekic wrote: On Tuesday, 12 April 2016 at 00:50:24 UTC, Jon D wrote: I've open sourced a set of command line utilities for manipulating tab-separated value files. I rarely need TSV files, but I deal with CSV files every day. - It would be

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Dicebot via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 16:34:16 UTC, Jon D wrote: Thanks Rory, Puming. I'll look into this and see how best to make it fit. I'm realizing also there's one additional capability it'd be nice to have in dub for tools like this, which in an option to install the executables somewhere that

Re: Getting the current module as a symbol

2016-04-13 Thread Vladimir Panteleev via Digitalmars-d-learn
On Wednesday, 13 April 2016 at 11:36:07 UTC, Mithun Hunsur wrote: Yeah, that also works; you have to define a symbol (if you don't have one you can already use) in order to get to it, so it's a little wasteful. Still useful to know, though! No, it's not necessary. You should be able to walk

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Jon D via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 07:34:11 UTC, Rory McGuire wrote: On Wed, Apr 13, 2016 at 3:41 AM, Puming via Digitalmars-d-announce < digitalmars-d-announce@puremagic.com> wrote: On Tuesday, 12 April 2016 at 06:22:55 UTC, Puming wrote: Here is what I know of it, using subPackages: Just

Re: Fixed-Length Array Sorting

2016-04-13 Thread Nordlöw via Digitalmars-d
On Tuesday, 12 April 2016 at 14:56:00 UTC, Andrei Alexandrescu wrote: Also to avoid cache line thrashing, sort parallel swaps by leftmost index. E.g. this line: 18,19, 20,21, 2,4, 1,3, 0,5, 6,8, 7,9, 10,12, 11,13, becomes: 0,5, 1,3, 2,4, 6,8, 7,9, 10,12, 11,13, 18,19, 20,21, Andrei Done.

Opportunity: Software Execution Time Determinism

2016-04-13 Thread Nordlöw via Digitalmars-d
I'm currenly in an industry with extremely high demands on software determinism, both in space and time (hard realtime). My conclusion so far is that most safety-critical industries today are in desperate need of better (any) language support for guaranteeing determinism, especially time. The

[Issue 15921] Win64: wrong codegen with array of structs slicing

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15921 ag0ae...@gmail.com changed: What|Removed |Added Keywords||wrong-code CC|

Re: Weird array setting behaviour on Windows(-m64)

2016-04-13 Thread ref2401 via Digitalmars-d-learn
On Wednesday, 13 April 2016 at 15:07:09 UTC, rikki cattermole wrote: Verified that it is a codegen problem for Win64 and not *nix. Please file a bug report. https://issues.dlang.org/show_bug.cgi?id=15921 Done, Thanks

[Issue 15921] Win64: wrong codegen with array of structs slicing

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15921 ref2401 changed: What|Removed |Added CC||refacto...@gmail.com --

[Issue 15921] Win64: wrong codegen with array of structs slicing

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15921 ref2401 changed: What|Removed |Added Severity|enhancement |major --

[Issue 15921] New: Win64: wrong codegen with array of structs slicing

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15921 Issue ID: 15921 Summary: Win64: wrong codegen with array of structs slicing Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity:

Re: DWT Cloning / Build fails

2016-04-13 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 13 April 2016 at 09:01:47 UTC, Chris wrote: On Tuesday, 12 April 2016 at 19:20:44 UTC, Jacob Carlborg wrote: The error messages are below. If I do it step by step (without --recursive) and then "git submodule update --init", I get more or less the same error: Cloning into

Re: Weird array setting behaviour on Windows(-m64)

2016-04-13 Thread rikki cattermole via Digitalmars-d-learn
On 14/04/2016 2:49 AM, ref2401 wrote: Hello, I got stuck with a weird array setting behaviour and I need help. Just have a look at the example. OS: Win 8.1 Pro DMD: v2.071.0 Build-cmd: dmd main.d -ofconsole-app.exe -debug -unittest -g -wi -m64 module dmain; import std.stdio; struct Vec {

Re: Strange Loop Conference Call for Presentations

2016-04-13 Thread Joakim via Digitalmars-d-announce
On Wednesday, 13 April 2016 at 14:33:01 UTC, Andrei Alexandrescu wrote: http://thestrangeloop.com/cfp.html This edition seems to be a very good fit for us. From the page: "Frequently accepted topics: functional programming, logic programming, dynamic/scripting languages, new or emerging

Weird array setting behaviour on Windows(-m64)

2016-04-13 Thread ref2401 via Digitalmars-d-learn
Hello, I got stuck with a weird array setting behaviour and I need help. Just have a look at the example. OS: Win 8.1 Pro DMD: v2.071.0 Build-cmd: dmd main.d -ofconsole-app.exe -debug -unittest -g -wi -m64 module dmain; import std.stdio; struct Vec { float a; } void main(string[]

Re: I want this so badly, please implement

2016-04-13 Thread Kagamin via Digitalmars-d
On Wednesday, 13 April 2016 at 13:17:57 UTC, cym13 wrote: There's a world between exceptionnaly getting a user password in order to detect and solve a bug through an error message and knowingly logging every single user password, be it only on the legal side. The latter shouldn't be needed.

Strange Loop Conference Call for Presentations

2016-04-13 Thread Andrei Alexandrescu via Digitalmars-d-announce
http://thestrangeloop.com/cfp.html This edition seems to be a very good fit for us. From the page: "Frequently accepted topics: functional programming, logic programming, dynamic/scripting languages, new or emerging languages, data structures, concurrency, databases, distributed computing,

Re: Beta of D language online tour

2016-04-13 Thread André via Digitalmars-d
On Wednesday, 13 April 2016 at 12:45:21 UTC, Bubba wrote: One thing that you should try to run: https://developers.google.com/speed/pagespeed/insights/ on your page. that page shows where and how to fix your site for speed and better user experience. It even compress data like:

Re: byte[] to hex string

2016-04-13 Thread Suliman via Digitalmars-d
On Wednesday, 13 April 2016 at 14:22:39 UTC, WebFreak001 wrote: On Wednesday, 13 April 2016 at 14:15:21 UTC, Suliman wrote: Does anybody have any ready to use byte[] to hex convert method? I found only C# examples http://stackoverflow.com/questions/623104/byte-to-hex-string Could anybody

Re: byte[] to hex string

2016-04-13 Thread WebFreak001 via Digitalmars-d
On Wednesday, 13 April 2016 at 14:15:21 UTC, Suliman wrote: Does anybody have any ready to use byte[] to hex convert method? I found only C# examples http://stackoverflow.com/questions/623104/byte-to-hex-string Could anybody help me to convert any of this methods to D? The root of my problem

byte[] to hex string

2016-04-13 Thread Suliman via Digitalmars-d
Does anybody have any ready to use byte[] to hex convert method? I found only C# examples http://stackoverflow.com/questions/623104/byte-to-hex-string Could anybody help me to convert any of this methods to D? The root of my problem is from here

Re: Correct way to spawn many and stoping when one finishes ?

2016-04-13 Thread klimp via Digitalmars-d-learn
On Tuesday, 12 April 2016 at 12:12:19 UTC, Steven Schveighoffer wrote: On 4/10/16 4:59 AM, klimp wrote: On Sunday, 10 April 2016 at 07:48:51 UTC, klimp wrote: Is this corrrect ? Each task searches for the same thing so when once has found the others don't need to run anymore. It looks a bit

Re: I want this so badly, please implement

2016-04-13 Thread cym13 via Digitalmars-d
On Wednesday, 13 April 2016 at 08:48:56 UTC, Kagamin wrote: On Tuesday, 12 April 2016 at 08:51:23 UTC, Kapps wrote: Amongst other things, you'd log sensitive data like passwords, which should never be stored anywhere in plain text, including log files. This is one of the reasons to not use GET

Re: DConf 2016 registrations have now hit 128!

2016-04-13 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 04/12/2016 04:11 PM, WhatMeWorry wrote: On Friday, 8 April 2016 at 22:45:38 UTC, Walter Bright wrote: On 4/8/2016 2:07 PM, Andrei Alexandrescu wrote: On 4/7/16 7:45 PM, Walter Bright wrote: 132 today! There's been quite a surge of interest recently in two items: Tesla Model 3 and DConf

Re: Blog post: PGO: Optimizing D's virtual calls

2016-04-13 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 04/13/2016 07:34 AM, Johan Engelen wrote: Hi all, I've written an article about how I implemented profile-guided optimization (PGO) of virtual calls to direct calls (a micro-micro-optimization, expected performance gain of just a few percent if any!). I hope it's interesting for those of

Re: Any usable SIMD implementation?

2016-04-13 Thread Marco Leise via Digitalmars-d
Am Wed, 13 Apr 2016 04:14:48 -0700 schrieb Walter Bright : > On 4/13/2016 3:58 AM, Marco Leise wrote: > > How about this style as an alternative?: > > > > immutable bool mmx; > > immutable bool hasPopcnt; > > > > shared static this() > > { > > import gcc.builtins;

Re: Beta of D language online tour

2016-04-13 Thread Bubba via Digitalmars-d
On Saturday, 9 April 2016 at 17:12:44 UTC, André wrote: Hi, After months of hard work (okay exaggerated) I'd like to announce the beta version of the D language online tour: http://tour.dlang.io/ ... One thing that you should try to run:

Re: Command line utilities for tab-separated value files

2016-04-13 Thread Dejan Lekic via Digitalmars-d-announce
On Tuesday, 12 April 2016 at 00:50:24 UTC, Jon D wrote: Hi all, I've open sourced a set of command line utilities for manipulating tab-separated value files. They are complementary to traditional unix tools like cut, grep, etc. They're useful for manipulating large data files. I use them

Re: Dub and derelict-allegro5 "Could not find a valid dependency tree configuration"

2016-04-13 Thread Mike Parker via Digitalmars-d-learn
On Wednesday, 13 April 2016 at 11:21:25 UTC, Pedro Lopes wrote: In the second paragraph I meant to say: The first library that Derelict-Allegro (not dub) looks for is called: "liballegro_image-5.0.11.so" ... I know dub has nothing to do with this at this point it already compile and linked it

[Issue 15910] Prevent mismatch of VERSION information in dmd releases

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15910 --- Comment #3 from Joseph Rushton Wakeling --- Unfortunately, the proposed workaround didn't work for me when I tried it. If when trying to build phobos I use, make -f posix.mak VERSION=2.071 then I wind up with

Re: Getting the current module as a symbol

2016-04-13 Thread Mithun Hunsur via Digitalmars-d-learn
On Wednesday, 13 April 2016 at 05:30:27 UTC, Vladimir Panteleev wrote: On Tuesday, 12 April 2016 at 13:44:07 UTC, Mithun Hunsur wrote: Hi all, I'm looking for the equivalent of `typeof(this)` in module scope (so that it gets the current module). My use-case is iterating over the members of

Re: Dub and derelict-allegro5 "Could not find a valid dependency tree configuration"

2016-04-13 Thread Pedro Lopes via Digitalmars-d-learn
In the second paragraph I meant to say: The first library that Derelict-Allegro (not dub) looks for is called: "liballegro_image-5.0.11.so" ... I know dub has nothing to do with this at this point it already compile and linked it just couldn't execute for not finding the library.

Re: Dub and derelict-allegro5 "Could not find a valid dependency tree configuration"

2016-04-13 Thread Pedro Lopes via Digitalmars-d-learn
On Tuesday, 12 April 2016 at 13:01:59 UTC, Mike Parker wrote: On Tuesday, 12 April 2016 at 09:19:14 UTC, Pedro Lopes wrote: I changed the dub.sdl dependency to version 0.0.5, but dub cant recognize that version: "Root package allegrotest contains reference to invalid package derelict-allegro5

Re: Any usable SIMD implementation?

2016-04-13 Thread Walter Bright via Digitalmars-d
On 4/13/2016 3:58 AM, Marco Leise wrote: How about this style as an alternative?: immutable bool mmx; immutable bool hasPopcnt; shared static this() { import gcc.builtins; mmx = __builtin_cpu_supports("mmx" ) > 0; hasPopcnt = __builtin_cpu_supports("popcnt") > 0; }

Re: Release D 2.071.0

2016-04-13 Thread John Colvin via Digitalmars-d-announce
On Tuesday, 5 April 2016 at 22:43:05 UTC, Martin Nowak wrote: Glad to announce D 2.071.0. http://dlang.org/download.html This release fixes many long-standing issues with imports and the module system. See the changelog for more details. http://dlang.org/changelog/2.071.0.html -Martin

Re: Any usable SIMD implementation?

2016-04-13 Thread Marco Leise via Digitalmars-d
Am Wed, 13 Apr 2016 11:21:35 +0200 schrieb Iain Buclaw via Digitalmars-d : > Yes, cpu_supports is a good way to do it as we only need to invoke > __builtin_cpu_init once and cache all values when running 'shared > static this()'. I was under the assumption that GCC

Re: Dynamic library

2016-04-13 Thread Chris via Digitalmars-d-learn
On Tuesday, 12 April 2016 at 10:11:27 UTC, Russel Winder wrote: Did you solve this problem? Does it go away using a newer JDK, e.g. 8_77? Have you tried the Oracle or Azul builds? If you have a small project you can send me that exhibits the problem for you, I can take a look at it. I

Re: Any usable SIMD implementation?

2016-04-13 Thread Iain Buclaw via Digitalmars-d
On 13 April 2016 at 11:13, Marco Leise via Digitalmars-d wrote: > Am Wed, 13 Apr 2016 09:51:25 +0200 > schrieb Iain Buclaw via Digitalmars-d > : > >> On 13 April 2016 at 07:59, Walter Bright via Digitalmars-d >>

Re: Any usable SIMD implementation?

2016-04-13 Thread Marco Leise via Digitalmars-d
Am Wed, 13 Apr 2016 09:51:25 +0200 schrieb Iain Buclaw via Digitalmars-d : > On 13 April 2016 at 07:59, Walter Bright via Digitalmars-d > wrote: > > But core.cpuid needs to be made to work in GDC, whatever it takes to do so. > > > >

Re: DWT Cloning / Build fails

2016-04-13 Thread Chris via Digitalmars-d-learn
On Tuesday, 12 April 2016 at 19:20:44 UTC, Jacob Carlborg wrote: The error messages are below. If I do it step by step (without --recursive) and then "git submodule update --init", I get more or less the same error: Cloning into 'base'... fatal: unable to connect to github.com: github.com[0:

Re: I want this so badly, please implement

2016-04-13 Thread Kagamin via Digitalmars-d
On Tuesday, 12 April 2016 at 14:35:25 UTC, Adam D. Ruppe wrote: Of course, these can be filtered out of an error log... but with the file upload, wouldn't it be nice to know where the error occurred so you can filter around it? If you have the file, there's no need for overly smart logging

Re: I want this so badly, please implement

2016-04-13 Thread Kagamin via Digitalmars-d
On Tuesday, 12 April 2016 at 08:51:23 UTC, Kapps wrote: Amongst other things, you'd log sensitive data like passwords, which should never be stored anywhere in plain text, including log files. This is one of the reasons to not use GET for anything sensitive. With Adam's idea sensitive data

[Issue 15920] New: std.traits.MemberFunctionsTuple gives a wrong result

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15920 Issue ID: 15920 Summary: std.traits.MemberFunctionsTuple gives a wrong result Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal

[Issue 15919] Undetected spell miss in ndslice.selection.reshape()

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15919 greenify changed: What|Removed |Added CC||greeen...@gmail.com ---

[Issue 15898] [REG2.069] Internal error: backend\cgcod.c 1651

2016-04-13 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15898 Walter Bright changed: What|Removed |Added CC|

Re: Any usable SIMD implementation?

2016-04-13 Thread Iain Buclaw via Digitalmars-d
On 13 April 2016 at 08:22, Walter Bright via Digitalmars-d wrote: > On 4/12/2016 4:29 PM, Marco Leise wrote: >> In practice GDC will just replace the invokation with a single >> 'mul' instruction while DMD will emit a call to this 18 >> instructions long function. Now

Re: Any usable SIMD implementation?

2016-04-13 Thread Iain Buclaw via Digitalmars-d
On 13 April 2016 at 07:59, Walter Bright via Digitalmars-d wrote: > On 4/12/2016 4:35 PM, Iain Buclaw via Digitalmars-d wrote: >> - What dialect am I writing in? (Do I emit mul or mull? eax or %eax?) >> - Some opcodes in IASM have a different name in the assembler

Re: Swiss Ephemeris / Nelder-Mead simplex

2016-04-13 Thread alstonamos via Digitalmars-d-announce
very nice post.. waleeed

Re: Beta of D language online tour

2016-04-13 Thread André via Digitalmars-d
On Monday, 11 April 2016 at 20:27:38 UTC, Mark Isaacson wrote: Still awesome! Good work. An easy(?) suggestion that would make this easier to browse: make the left/right arrow keys control advancing to the next page. That should be fairly easy. Added an issue on GitHub for that:

Re: Any usable SIMD implementation?

2016-04-13 Thread Walter Bright via Digitalmars-d
On 4/12/2016 4:29 PM, Marco Leise wrote: Am Tue, 12 Apr 2016 13:22:12 -0700 schrieb Walter Bright : On 4/12/2016 9:53 AM, Marco Leise wrote: LDC implements InlineAsm_X86_Any (DMD style asm), so core.cpuid works. GDC is the only compiler that does not implement it.

Re: Any usable SIMD implementation?

2016-04-13 Thread Walter Bright via Digitalmars-d
On 4/12/2016 4:35 PM, Iain Buclaw via Digitalmars-d wrote: It's a step backwards because I can't just say "MUL EAX". I have to tell GCC what register the result gets put in. This is, to my mind, ridiculous. GCC's inline assembler apparently has no knowledge of what the opcodes actually do. asm