[Issue 15065] New: associative array has no keys property

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15065 Issue ID: 15065 Summary: associative array has no keys property Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement

[Issue 15066] std.net.curl.get should support IPv6 addresses on Windows

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15066 Luís Marques changed: What|Removed |Added Summary|std.net.curl.get should |std.net.curl.get should

[Issue 15066] New: std.net.curl.get should support IPv6 addresses

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15066 Issue ID: 15066 Summary: std.net.curl.get should support IPv6 addresses Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal

Re: Initalizing complex array types or some other problem ;/

2015-09-15 Thread Prudence via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 20:54:49 UTC, anonymous wrote: On Tuesday 15 September 2015 22:09, Prudence wrote: The code below doesn't work. Please be more specific in how it doesn't work. Mention the error message if there is one, or say how the code behaves differently from what

[Issue 15065] associative array has no keys property

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15065 --- Comment #1 from Kenji Hara --- Reduced test case: template partial(alias arg) {} struct X(int[int] x) { alias w = partial!(x.keys); } X!([1:2]) zzz; --

Another, is it a bug?

2015-09-15 Thread Random D user via Digitalmars-d-learn
I'm trying to make a base class with get property and a sub class with corresponding set property. The value for the base class is set via constructor. The intuitive way doesn't seem to work and workarounds are unnecessarily ugly (considering you'll sprinkle them all over the codebase).

Re: Another, is it a bug?

2015-09-15 Thread Meta via Digitalmars-d-learn
On Wednesday, 16 September 2015 at 02:59:06 UTC, Random D user wrote: I'm trying to make a base class with get property and a sub class with corresponding set property. The value for the base class is set via constructor. The intuitive way doesn't seem to work and workarounds are unnecessarily

Re: Another, is it a bug?

2015-09-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 16 September 2015 at 03:48:59 UTC, Random D user Given that, normally properties are just overloaded methods in D, it's pretty sad classes break this behavior/convention. The D behavior for overloading is different in general: http://dlang.org/hijack.html It basically never

Best Direction on Spawning Process Async

2015-09-15 Thread Mike McKee via Digitalmars-d-learn
What's the best direction from... http://dlang.org/phobos/std_process.html ...on spawning an async process and then peeking at it occasionally as it runs, and then get notified when it finishes? In other words, what std.process functions would you recommend I use? What I want to avoid is a

Re: Final templated interface method not found

2015-09-15 Thread anonymous via Digitalmars-d-learn
On Wednesday 16 September 2015 06:14, Andre wrote: > Hi, > > following coding shoud work, or? > It doesn't compile with v2.068.0. > > Kind regards > André > > interface IfStatement > { > void execute(); > > final void execute(T...)(T t) > { > execute(); >

Re: Implementing typestate

2015-09-15 Thread Freddy via Digitalmars-d
On Tuesday, 15 September 2015 at 21:44:25 UTC, Freddy wrote: On Tuesday, 15 September 2015 at 17:45:45 UTC, Freddy wrote: Rust style memory management in a library Wait nevermind about that part, it's harder than I thought. All hope might not be lost, something like this MIGHT work,but

Runtime error when calling a callback in a parallel Task

2015-09-15 Thread BBasile via Digitalmars-d-learn
Under Windows this works fine but under Linux I got a runtime error. this could be reduced to : --- import std.parallelism; alias CallBack = void function(void*); class Foo { CallBack clbck; void* param; void dotask() { // some heavy processing // tells the

[Issue 15064] [CTFE] std.range.enumerate is not CTFE-able

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15064 --- Comment #1 from Kenji Hara --- Please add a test case, at least. --

Re: Another, is it a bug?

2015-09-15 Thread Random D user via Digitalmars-d-learn
On Wednesday, 16 September 2015 at 03:17:05 UTC, Meta wrote: Considering Father defines the function `int eat()` and Daughter defines the completely different function `int eat(int)`, it doesn't surprise me. You're not using virtual dispatch when you do `return super.eat` or `d.Father.eat()`,

Re: chaining chain Result and underlying object of chain

2015-09-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/14/15 11:30 AM, Ali Çehreli wrote: On 09/14/2015 08:01 AM, Laeeth Isharc wrote: > I was trying to use the same variable eg > >auto chain1 = chain("foo", "bar"); >chain1 = chain(chain1, "baz"); [...] > It may be that the type of chain1 > and chain2 don't mix. Exactly.

Re: Implementing typestate

2015-09-15 Thread Tobias Müller via Digitalmars-d
Ola Fosheim Grøstad wrote: > On Tuesday, 15 September 2015 at 20:34:43 UTC, Tobias Müller wrote: >>> There's a Blog post somewhere but I can't find it atm. >> >> Ok found it: > http://pcwalton.github.io/blog/2012/12/26/typestate-is-dead/ > > But that is for

running code on the homepage

2015-09-15 Thread Andrei Amatuni via Digitalmars-d
maybe I'm doing something wrong...but the output of running the default code snippet on the dlang.org homepage is: "unable to fork: Cannot allocate memory" not a good look

Re: Load Qt UI XML File as GUI

2015-09-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/16/15 12:03 AM, Mike McKee wrote: Unfortunately, the http://dsource.org/forums/ doesn't appear to be active -- I can't login after I registered. This is where the QtD project has their forum. So, I'm asking this here. Seems to have moved here, but it doesn't look fresh:

Load Qt UI XML File as GUI

2015-09-15 Thread Mike McKee via Digitalmars-d-learn
Unfortunately, the http://dsource.org/forums/ doesn't appear to be active -- I can't login after I registered. This is where the QtD project has their forum. So, I'm asking this here. Is it possible with D and QtD to draw my GUI using QtCreator, and then take its UI XML file and load it

Final templated interface method not found

2015-09-15 Thread Andre via Digitalmars-d-learn
Hi, following coding shoud work, or? It doesn't compile with v2.068.0. Kind regards André interface IfStatement { void execute(); final void execute(T...)(T t) { execute(); } } class Statement: IfStatement { void execute(){} }

Re: Another, is it a bug?

2015-09-15 Thread Random D user via Digitalmars-d-learn
On Wednesday, 16 September 2015 at 03:54:34 UTC, Adam D. Ruppe wrote: On Wednesday, 16 September 2015 at 03:48:59 UTC, Random D user Given that, normally properties are just overloaded methods in D, it's pretty sad classes break this behavior/convention. The D behavior for overloading is

Re: Load Qt UI XML File as GUI

2015-09-15 Thread Mike McKee via Digitalmars-d-learn
On Wednesday, 16 September 2015 at 04:36:15 UTC, Steven Schveighoffer wrote: Seems to have moved here, but it doesn't look fresh: https://bitbucket.org/qtd/ Yep, but when I poke around in the source, I can't see anywhere that the QtD can read the .ui files that QtCreator creates.

Re: Initalizing complex array types or some other problem ;/

2015-09-15 Thread anonymous via Digitalmars-d-learn
On Wednesday 16 September 2015 03:46, Prudence wrote: > In any case, Maybe you are not as smart as you think you are if > you can't understand it? kthxbye

[Issue 15045] [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15045 Kenji Hara changed: What|Removed |Added CC||schue...@gmx.net ---

[Issue 15016] Structs with opDispatch cannot be emplaced

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15016 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15063] Template Instantiation Accepts Invalid Code

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15063 --- Comment #1 from Kenji Hara --- Reduced test case: void test1(alias pred = "a == b", T)(T a) { pragma(msg, 1); } void test1(int flag = 0, T)(T a) { pragma(msg, 2); } void main() { test1(1); } --

Re: dpaste web site

2015-09-15 Thread nazriel via Digitalmars-d
On Wednesday, 9 September 2015 at 23:55:27 UTC, Vladimir Panteleev wrote: On Wednesday, 9 September 2015 at 22:59:42 UTC, nazriel wrote: I really have no idea, I tried to copy and paste those links and indeed they trigger recaptcha... Not sure if recaptcha is so weak or indeed it is a human

[Issue 15045] [Reg 2.069-devel] hasElaborateCopyConstructor is true for struct with opDispatch

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15045 Kenji Hara changed: What|Removed |Added Component|phobos |dmd --- Comment #6 from

Nested classes question?

2015-09-15 Thread Dave Akers via Digitalmars-d-learn
When a program exits and D's memory management is cleaning up calling all of the ~this's is there a reason it calls the outer class's ~this before the inner class's ~this? I was recently exploring the possibility of using https://github.com/bheads/d-leveldb and the example in the readme seg

Re: Nested classes question?

2015-09-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 16 September 2015 at 01:12:58 UTC, Dave Akers wrote: When a program exits and D's memory management is cleaning up calling all of the ~this's is there a reason it calls the outer class's ~this before the inner class's ~this? All class destructors are called in an undefined

Re: dpaste web site

2015-09-15 Thread Steven Schveighoffer via Digitalmars-d
On 9/15/15 7:51 PM, nazriel wrote: Also @Vladimir, thanks for the pull request regarding examples and for making me a "watcher" in dpaste related issues on bugzilla. Thank YOU Damian for continuing to work on this, it's very important to the D community! -Steve

[Issue 15064] [CTFE] std.range.enumerate is not CTFE-able

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15064 --- Comment #3 from Kenji Hara --- Thanks. --

[Issue 15056] [REG2.068.1] Unstored RAII struct return yields bogus error: "cannot mix core.std.stdlib.alloca() and exception handling"

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15056 Walter Bright changed: What|Removed |Added CC|

[Issue 15067] New: Broken links on D1 web site

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15067 Issue ID: 15067 Summary: Broken links on D1 web site Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: minor Priority: P1

Re: Enumap -- a lightweight AA alternative when your keys are enums

2015-09-15 Thread SimonN via Digitalmars-d-announce
On Sunday, 13 September 2015 at 03:33:15 UTC, rcorre wrote: I've released v0.4.0, which implements foreach with ref, and (hopefully) atones for my crimes against const-correctness. You should be able to modify values in a loop and work with const/immutable Enumaps. Thanks for the feedback!

[Issue 15064] [CTFE] std.range.enumerate is not CTFE-able

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15064 --- Comment #2 from Jack Stouffer --- Sorry int test() { import std.range : enumerate; int[] a = [1]; foreach (i, e; a.enumerate) {} return 0; } void main() { enum res = test(); // fails int res =

[Issue 15062] ElementType Causes Abnormally Long Compile Time

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15062 Kenji Hara changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14886] [REG2.066] std.parallelism.parallel with large static array seems to hang compile

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14886 Kenji Hara changed: What|Removed |Added CC||monkeywork...@hotmail.com

Re: Implementing typestate

2015-09-15 Thread Freddy via Digitalmars-d
On Tuesday, 15 September 2015 at 17:45:45 UTC, Freddy wrote: Rust style memory management in a library Wait nevermind about that part, it's harder than I thought.

Re: Combining Unique type with concurrency module

2015-09-15 Thread Alex via Digitalmars-d-learn
On Monday, 14 September 2015 at 08:08:35 UTC, Ali Çehreli wrote: void main() { MultiThreadedUnique!S u1 = produce(); auto childTid2 = spawn(, thisTid); u1.giveTo(childTid2); send(childTid2, cast(shared(MultiThreadedUnique!S*))); import core.thread; thread_joinAll();

Re: Implement the "unum" representation in D ?

2015-09-15 Thread ponce via Digitalmars-d
On Tuesday, 15 September 2015 at 05:16:53 UTC, deadalnix wrote: The guy seems to have good credential. Why should I read that book ? The sample chapter dissipates a bit the marketing cloud. One of the ideas is that the imprecise bit encode an interval between 2 values, hence automatically

Re: Release D 2.068.1

2015-09-15 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-09-10 19:46, Jack Stouffer wrote: Well, it's a little too late, but the compiler outputs the wrong version: $ dmd --version DMD64 D Compiler v2.068 Copyright (c) 1999-2015 by Digital Mars written by Walter Bright Working fine here, installed using DVM. -- /Jacob Carlborg

Re: Implement the "unum" representation in D ?

2015-09-15 Thread deadalnix via Digitalmars-d
On Tuesday, 15 September 2015 at 07:07:20 UTC, ponce wrote: On Tuesday, 15 September 2015 at 05:16:53 UTC, deadalnix wrote: The guy seems to have good credential. Why should I read that book ? The sample chapter dissipates a bit the marketing cloud. One of the ideas is that the imprecise

Re: std.experimental.testing formal review

2015-09-15 Thread Atila Neves via Digitalmars-d
On Wednesday, 9 September 2015 at 15:20:41 UTC, Robert burner Schadek wrote: This post marks the start of the two week review process of std.experimental.testing. PR: https://github.com/D-Programming-Language/phobos/pull/3207 Dub: http://code.dlang.org/packages/unit-threaded Doc: See

Berlin D Meetup September 2015

2015-09-15 Thread Ben Palmer via Digitalmars-d-announce
Hi All, The next Berlin D Meetup will be happening at 19:30 on this Friday September the 18th at Berlin Co-Op (http://co-up.de/) on the fifth floor. This time Jens Mueller will be giving a talk on "Code tuning with D". A short introduction is below: "In this talk we optimize a very simple

Re: std.experimental.testing formal review

2015-09-15 Thread Atila Neves via Digitalmars-d
On Sunday, 13 September 2015 at 09:59:18 UTC, Dicebot wrote: On Saturday, 12 September 2015 at 14:50:32 UTC, Jacob Carlborg wrote: On 2015-09-12 15:34, Dicebot wrote: I also don't like mixing unittest and higher level functional tests (with setup and cleanup phases) into the same buckets -

Re: Implementing typestate

2015-09-15 Thread Freddy via Digitalmars-d
On Tuesday, 15 September 2015 at 17:45:45 UTC, Freddy wrote: ... I just thought of some corner cases and how to solve them. --- Disallow global variable with typestate (there might be a better solution down the line). The evaluated typestate of variables after going through branches

Re: foreach(line; f.byLine) produces core.exception.InvalidMemoryOperationError@(0) in 2.067 but not 2.066

2015-09-15 Thread Andrew Brown via Digitalmars-d-learn
Thanks very much for your help, it seemed to work a treat (I hope :))! Compiling ldc wasn't too bad, make the changes to runtime/phobos/std/stdio.d and then just building as normal was no problem. Unittests are passing and it handles that file perfectly. On Tuesday, 15 September 2015 at

Re: Type helpers instead of UFCS

2015-09-15 Thread BBasile via Digitalmars-d
On Tuesday, 15 September 2015 at 16:14:39 UTC, John Colvin wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: [...] How is this different to just having a specific type for the first argument? void writeln(Args...)(string s, Args args) { static import std.stdio;

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Sep 15, 2015 at 08:55:43AM +, Fredrik Boulund via Digitalmars-d-learn wrote: > On Monday, 14 September 2015 at 18:31:38 UTC, H. S. Teoh wrote: > >I tried implementing a crude version of this (see code below), and > >found that manually calling GC.collect() even as frequently as once >

Re: Implementing typestate

2015-09-15 Thread BBasile via Digitalmars-d
On Tuesday, 15 September 2015 at 18:15:46 UTC, Freddy wrote: On Tuesday, 15 September 2015 at 18:10:06 UTC, BBasile wrote: Ok, sorry I didn't know this concept so far. So there would be a kind of 'compile-time instance' of File with a modifiable member ? A simplified version of this:

Re: Implementing typestate

2015-09-15 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 15 September 2015 at 18:25:51 UTC, BBasile wrote: On Tuesday, 15 September 2015 at 18:15:46 UTC, Freddy wrote: On Tuesday, 15 September 2015 at 18:10:06 UTC, BBasile wrote: Ok, sorry I didn't know this concept so far. So there would be a kind of 'compile-time instance' of File

Re-named & Selective Imports

2015-09-15 Thread jmh530 via Digitalmars-d-learn
I combined a re-named import with a selective import and was surprised to find that it didn't do what I would have expected. In the code below, I would have expected only the "test2" line to have compiled, but it turned out that all three of these do. I'm guessing the logic is that it imports

Re: DUB release candidate 0.9.24-rc.3 ready for testing

2015-09-15 Thread Nick Sabalausky via Digitalmars-d
On 09/14/2015 07:45 AM, Sönke Ludwig wrote: SDLang [1] [...] [1]: http://sdl.ikayzo.org/display/SDL/Home That site is down at the moment (I've contacted the owner). But in the meantime, a mirror of the site is available at The Wayback Machine (web.archive.org):

Re: Checking for Homogeneous Tuples

2015-09-15 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 16:54:22 UTC, Nordlöw wrote: How do I check that all the elements of a std.typecons.Tuple all fulfil a specific predicate, in my case all have a specific type: Something like import std.typecons : isTuple; enum isTupleOf(T, E) = isTuple!T &&

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread Andrew Brown via Digitalmars-d-learn
I had some luck building a local copy of llvm in my home directory, using a linux version about as old as yours (llvm 3.5 i used) specifying: --configure --prefix=/home/andrew/llvm so make install would install it somewhere I had permissions. Then I changed the cmake command to: cmake -L

Re: Checking for Homogeneous Tuples

2015-09-15 Thread Adam D. Ruppe via Digitalmars-d-learn
If it is a tuple of values too, you could just try to form an array out of it: `static if (__traits(compiles, [your_tuple]))`. But allSatisfy might be better. For the predicate there, remember it needs to take a template argument.

[Issue 15062] New: ElementType Causes Abnormally Long Compile Time

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15062 Issue ID: 15062 Summary: ElementType Causes Abnormally Long Compile Time Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal

Re: Implementing typestate

2015-09-15 Thread Freddy via Digitalmars-d
On Tuesday, 15 September 2015 at 17:57:10 UTC, BBasile wrote: This won't work in D. Everything that's static is common to each instance. What's possible however is to use an immutable FState that's set in the ctor. --- struct File { immutable FState state, this(string fname, FState

Re: Implementing typestate

2015-09-15 Thread BBasile via Digitalmars-d
On Tuesday, 15 September 2015 at 17:45:45 UTC, Freddy wrote: Would it be worth implementing some kind of typestate into the language? By typestate I mean a modifiable enum. For example: --- enum FState { none, read, write } struct File { //maybe another keyword other than enum

Re: Implementing typestate

2015-09-15 Thread BBasile via Digitalmars-d
On Tuesday, 15 September 2015 at 17:59:19 UTC, Freddy wrote: On Tuesday, 15 September 2015 at 17:57:10 UTC, BBasile wrote: This won't work in D. Everything that's static is common to each instance. What's possible however is to use an immutable FState that's set in the ctor. --- struct

Re: No -v or -deps for gdc?

2015-09-15 Thread Johannes Pfau via Digitalmars-d-learn
Am Tue, 15 Sep 2015 12:19:34 + schrieb Atila Neves : > gdmd supports those options but gdc doesn't. Is that likely to > always be the case? > > Atila gdmd is just a wrapper around gdc. If something is supported by gdmd it must also be supported by gdc (the exact

Re: Implementing typestate

2015-09-15 Thread Freddy via Digitalmars-d
On Tuesday, 15 September 2015 at 18:10:06 UTC, BBasile wrote: Ok, sorry I didn't know this concept so far. So there would be a kind of 'compile-time instance' of File with a modifiable member ? A simplified version of this: https://en.wikipedia.org/wiki/Typestate_analysis Where types can

Re: std.experimental.testing formal review

2015-09-15 Thread Dicebot via Digitalmars-d
On Sunday, 13 September 2015 at 10:44:30 UTC, Atila Neves wrote: 2) being able to do weak ordering of tests (by defining strict sequence of groups so that parallelization/randomization only happens within such group) - I have used something as simple as numerical priority value so far for my

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread Rikki Cattermole via Digitalmars-d-learn
On 15/09/15 9:00 PM, Kagamin wrote: On Tuesday, 15 September 2015 at 08:51:02 UTC, Fredrik Boulund wrote: Using char[] all around might be a good idea, but it doesn't seem like the string conversions are really that taxing. What are the arguments for working on char[] arrays rather than

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 09:09:00 UTC, Kagamin wrote: On Tuesday, 15 September 2015 at 08:53:37 UTC, Fredrik Boulund wrote: my favourite for streaming a file: enum chunkSize = 4096; File(fileName).byChunk(chunkSize).map!"cast(char[])a".joiner() Is this an efficient way of reading this

Re: Release D 2.068.1

2015-09-15 Thread John Colvin via Digitalmars-d-announce
On Monday, 14 September 2015 at 23:53:16 UTC, Martin Nowak wrote: On Monday, 14 September 2015 at 20:14:45 UTC, Jack Stouffer wrote: On Monday, 14 September 2015 at 17:51:59 UTC, Martin Nowak wrote: What platform are you on? I'm on OS X, using the homebrew version of DMD. And homebrew is

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread Fredrik Boulund via Digitalmars-d-learn
On Monday, 14 September 2015 at 18:31:38 UTC, H. S. Teoh wrote: I tried implementing a crude version of this (see code below), and found that manually calling GC.collect() even as frequently as once every 5000 loop iterations (for a 500,000 line test input file) still gives about 15%

Re: Implement the "unum" representation in D ?

2015-09-15 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 15 September 2015 at 08:24:30 UTC, ponce wrote: However if unum aren't fast, they will be only for prototyping and the real algorithm would rely on IEEE floats with different precision characteristics, so yeah hardware is critical. I think he is looking into 32 bit floats for a

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread Fredrik Boulund via Digitalmars-d-learn
On Monday, 14 September 2015 at 16:13:14 UTC, Edwin van Leeuwen wrote: See this link for clarification on what the columns/numbers in the profile file mean http://forum.dlang.org/post/f9gjmo$2gce$1...@digitalmars.com It is still difficult to parse though. I myself often use sysprof (only

Compilation error

2015-09-15 Thread Loic via Digitalmars-d-learn
Hello, I hope it's the good place to ask my question. I'am trying an hello world program in D, unfortunately the compilation, doesn't work, and found nothing on google. when I do : dmd Hello.d, the error returned is Error: cannot find source code for runtime library file 'object.d' dmd

Re: Implement the "unum" representation in D ?

2015-09-15 Thread ponce via Digitalmars-d
On Tuesday, 15 September 2015 at 07:57:01 UTC, deadalnix wrote: On Tuesday, 15 September 2015 at 07:07:20 UTC, ponce wrote: On Tuesday, 15 September 2015 at 05:16:53 UTC, deadalnix wrote: The guy seems to have good credential. Why should I read that book ? The sample chapter dissipates a

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 08:53:37 UTC, Fredrik Boulund wrote: my favourite for streaming a file: enum chunkSize = 4096; File(fileName).byChunk(chunkSize).map!"cast(char[])a".joiner() Is this an efficient way of reading this type of file? What should one keep in mind when choosing

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread Fredrik Boulund via Digitalmars-d-learn
On Monday, 14 September 2015 at 15:04:12 UTC, John Colvin wrote: I've had nothing but trouble when using different versions of libc. It would be easier to do this instead: http://wiki.dlang.org/Building_LDC_from_source I'm running a build of LDC git HEAD right now on an old server with

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread Fredrik Boulund via Digitalmars-d-learn
On Monday, 14 September 2015 at 18:08:31 UTC, John Colvin wrote: On Monday, 14 September 2015 at 17:51:43 UTC, CraigDillabaugh wrote: On Monday, 14 September 2015 at 12:30:21 UTC, Fredrik Boulund wrote: [...] I am going to go off the beaten path here. If you really want speed for a file

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread Fredrik Boulund via Digitalmars-d-learn
On Monday, 14 September 2015 at 16:33:23 UTC, Rikki Cattermole wrote: A lot of this hasn't been covered I believe. http://dpaste.dzfl.pl/f7ab2915c3e1 1) You don't need to convert char[] to string via to. No. Too much. Cast it. 2) You don't need byKey, use foreach key, value syntax. That way

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread Kagamin via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 08:51:02 UTC, Fredrik Boulund wrote: Using char[] all around might be a good idea, but it doesn't seem like the string conversions are really that taxing. What are the arguments for working on char[] arrays rather than strings? No, casting to string would be

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 08:45:00 UTC, Fredrik Boulund wrote: On Monday, 14 September 2015 at 15:04:12 UTC, John Colvin wrote: [...] Thanks for the offer, but don't go out of your way for my sake. Maybe I'll just build this in a clean environment instead of on my work computer to

Re: foreach(line; f.byLine) produces core.exception.InvalidMemoryOperationError@(0) in 2.067 but not 2.066

2015-09-15 Thread Martin Krejcirik via Digitalmars-d-learn
For reference, it was this PR: https://github.com/D-Programming-Language/phobos/pull/3089 which fixed the same issue for me.

[Issue 15058] [VisualD] A way to specify Debugging Current Directory from within the .visualdproj

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15058 ponce changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: French translation of Ali Çehreli's "Programming in D" book : 53 chapter translated

2015-09-15 Thread Ali Çehreli via Digitalmars-d-announce
On 09/15/2015 05:20 AM, Andre Polykanine via Digitalmars-d-announce wrote: > I tried to contact Ali privately about Russian and possibly > Ukrainian translation That's wonderful! :) Thank you for considering that. > unfortunately got no response( That's horrible! :( The email must

Re: Type helpers instead of UFCS

2015-09-15 Thread John Colvin via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. - noobs, code is unreadable. That's why I propose the new keywords 'helper' and 'subject' that will allow to extend the properties

Re: foreach(line; f.byLine) produces core.exception.InvalidMemoryOperationError@(0) in 2.067 but not 2.066

2015-09-15 Thread Martin Krejcirik via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 15:28:23 UTC, Andrew Brown wrote: A very naive question: would it be possible in this case to backport it into gdc/ldc by copying the pull request and building the compiler from source, or would this get me into a world of pain? Cherry-picking should work and

Re: Speeding up text file parser (BLAST tabular format)

2015-09-15 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 13:49:04 UTC, Fredrik Boulund wrote: On Tuesday, 15 September 2015 at 10:01:30 UTC, John Colvin wrote: [...] Nope, :( [...] Oh well, worth a try I guess.

Re: Compilation error

2015-09-15 Thread Loic via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 12:37:46 UTC, Adam D. Ruppe wrote: On Tuesday, 15 September 2015 at 09:17:26 UTC, Loic wrote: Error: cannot find source code for runtime library file 'object.d' How did you install dmd? The installer exe or the zip both should have come with all these files

Re: foreach(line; f.byLine) produces core.exception.InvalidMemoryOperationError@(0) in 2.067 but not 2.066

2015-09-15 Thread Andrew Brown via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 14:55:42 UTC, Martin Krejcirik wrote: For reference, it was this PR: https://github.com/D-Programming-Language/phobos/pull/3089 which fixed the same issue for me. A very naive question: would it be possible in this case to backport it into gdc/ldc by copying

[Issue 14858] spurious "Error: overload alias 'foo' is not a variable" when overloading template and non-template via aliases

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14858 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/803da8f10c0c5d09da5b19274ba1a1b9763d5e03 fix Issue 14858 - spurious

[Issue 14858] spurious "Error: overload alias 'foo' is not a variable" when overloading template and non-template via aliases

2015-09-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14858 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: French translation of Ali Çehreli's "Programming in D" book : 53 chapter translated

2015-09-15 Thread Andre Polykanine via Digitalmars-d-announce
Hello Raphaël, Sorry for the off topic, but how do you translate the book? I tried to contact Ali privately about Russian and possibly Ukrainian translation (I'm interested in doing this just for the sake of spreading D and don't expect any revenue), but unfortunately got no

French translation of Ali Çehreli's "Programming in D" book : 53 chapter translated

2015-09-15 Thread Raphaël Jakse via Digitalmars-d-announce
Hello, A few words to the D community to give news about the French translation of Ali Çehreli's "Programming in D" book. Thanks to Oliver Pisano (translator) and Stéphane Goujet (proofreader), the translation is still alive. 53 chapters are translated and most have been proofread. Thanks

Re: Implement the "unum" representation in D ?

2015-09-15 Thread ponce via Digitalmars-d
On Tuesday, 15 September 2015 at 09:35:36 UTC, Ola Fosheim Grøstad wrote: http://sites.ieee.org/scv-cs/files/2013/03/Right-SizingPrecision1.pdf That's a pretty convincing case. Who does it :)?

Re: Implement the "unum" representation in D ?

2015-09-15 Thread Ola Fosheim Grøstad via Digitalmars-d
On Tuesday, 15 September 2015 at 10:38:23 UTC, ponce wrote: On Tuesday, 15 September 2015 at 09:35:36 UTC, Ola Fosheim Grøstad wrote: http://sites.ieee.org/scv-cs/files/2013/03/Right-SizingPrecision1.pdf That's a pretty convincing case. Who does it :)? You:9

No -v or -deps for gdc?

2015-09-15 Thread Atila Neves via Digitalmars-d-learn
gdmd supports those options but gdc doesn't. Is that likely to always be the case? Atila

Re: Beta D 2.068.2-b2

2015-09-15 Thread Meta via Digitalmars-d-announce
On Monday, 14 September 2015 at 21:05:42 UTC, Martin Nowak wrote: The second beta for the 2.068.2 point release fixes an regression with destroy that could result in a memory leak [¹]. http://downloads.dlang.org/pre-releases/2.x/2.068.2/ -Martin [¹]:

tkd not linking

2015-09-15 Thread karabuta via Digitalmars-d-learn
I have tried several times to compile tkd using dub but I keep getting this message: Linking... /usr/bin/ld: cannot find -ltcl /usr/bin/ld: cannot find -ltk collect2: error: ld returned 1 exit status --- errorlevel 1 FAIL

Re: Checking for Homogeneous Tuples

2015-09-15 Thread Meta via Digitalmars-d-learn
On Tuesday, 15 September 2015 at 16:54:22 UTC, Nordlöw wrote: How do I check that all the elements of a std.typecons.Tuple all fulfil a specific predicate, in my case all have a specific type: Something like import std.typecons : isTuple; enum isTupleOf(T, E) = isTuple!T &&

Re: Type helpers instead of UFCS

2015-09-15 Thread Tina via Digitalmars-d
On Saturday, 12 September 2015 at 20:50:01 UTC, BBasile wrote: On Saturday, 12 September 2015 at 20:40:35 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems

Re: Operator overloading or alternatives to expression templates

2015-09-15 Thread Andrei Alexandrescu via Digitalmars-d
On 09/14/2015 03:35 PM, Timon Gehr wrote: On 09/14/2015 08:09 PM, Andrei Alexandrescu wrote: On 09/13/2015 10:06 AM, Martin Nowak wrote: ... - language regularization It's surprising to find these "arbitrary" language limitations. The non-predictability of what's possible has always

Checking for Homogeneous Tuples

2015-09-15 Thread Nordlöw via Digitalmars-d-learn
How do I check that all the elements of a std.typecons.Tuple all fulfil a specific predicate, in my case all have a specific type: Something like import std.typecons : isTuple; enum isTupleOf(T, E) = isTuple!T && is(MAGIC(T, E));

Re: std.experimental.testing formal review

2015-09-15 Thread Atila Neves via Digitalmars-d
On Tuesday, 15 September 2015 at 08:27:29 UTC, Dicebot wrote: On Sunday, 13 September 2015 at 10:44:30 UTC, Atila Neves wrote: 2) being able to do weak ordering of tests (by defining strict sequence of groups so that parallelization/randomization only happens within such group) - I have used

  1   2   >