Re: Function pointer array slice?

2015-07-11 Thread ketmar via Digitalmars-d-learn
On Sat, 11 Jul 2015 09:54:40 +, tcak wrote: On Saturday, 11 July 2015 at 09:30:43 UTC, Tofu Ninja wrote: So simple syntax question, how do I make an array slice of function pointers? I just have no idea where to put the [] on something like void function() nothrow pure @nogc @safe

[Issue 14793] New: net.curl.download https broken - windows

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14793 Issue ID: 14793 Summary: net.curl.download https broken - windows Product: D Version: D2 Hardware: x86_64 OS: Windows Status: NEW Severity: enhancement

Re: std.concurrency: The fate of unmatched messages

2015-07-11 Thread E.S. Quinn via Digitalmars-d-learn
On Saturday, 11 July 2015 at 02:15:02 UTC, ketmar wrote: so simply don't receive the messages you don't need right now. as i said, `receive()` doesn't look to top message only, it scans the whole mailbox, trying to find a message that matches. you can use `receiveTimeout()` to do nothing if

Function pointer array slice?

2015-07-11 Thread Tofu Ninja via Digitalmars-d-learn
So simple syntax question, how do I make an array slice of function pointers? I just have no idea where to put the [] on something like void function() nothrow pure @nogc @safe arrayName; Or should I just alias it and make an array of the alias? alias f = void function() nothrow

Re: Function pointer array slice?

2015-07-11 Thread Tofu Ninja via Digitalmars-d-learn
On Saturday, 11 July 2015 at 10:54:45 UTC, ketmar wrote: On Sat, 11 Jul 2015 09:54:40 +, tcak wrote: On Saturday, 11 July 2015 at 09:30:43 UTC, Tofu Ninja wrote: So simple syntax question, how do I make an array slice of function pointers? I just have no idea where to put the [] on

Re: DUB 0.9.24 beta 2

2015-07-11 Thread extrawurst via Digitalmars-d
On Friday, 10 July 2015 at 15:19:50 UTC, Sönke Ludwig wrote: For anyone using Sublime Text, I've created a simple syntax highlighting module: https://packagecontrol.io/packages/SDLang For other editors, any C language family syntax highlighting also works pretty well as far as DUB's use of

[Issue 14793] net.curl.download https broken - windows

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14793 Ketmar Dark ket...@ketmar.no-ip.org changed: What|Removed |Added Severity|enhancement |normal --

Re: DUB Build Linker Library Search Path

2015-07-11 Thread via Digitalmars-d-learn
On Friday, 10 July 2015 at 12:26:02 UTC, Per Nordlöw wrote: On Friday, 10 July 2015 at 12:04:53 UTC, Nordlöw wrote: Should be LFLAGS=-L/usr/lib/llvm-3.6/lib dub build --compiler=/usr/bin/dmd but still fails I can't find any place in the DUB sources that reads `LFLAGS` from the

[Issue 14791] std.string.indexOf(char[], char) no longer compiles

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14791 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC|

A new look at rvalue references

2015-07-11 Thread via Digitalmars-d
bitwise and I had an interesting discussion about rvalue refs in the `auto ref` PR [1]. It revolved around whether the ABI [2] requires large structs to be passed as a pointer, as it happens to be the case with return values. The spec isn't clear on this, it merely says: Static arrays are

[Issue 14791] std.string.indexOf(char[], char) no longer compiles

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14791 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Component|phobos |dmd --- Comment #2

Re: why adding extern(C) cause a runtime error?

2015-07-11 Thread Dav1d via Digitalmars-d-learn
On Saturday, 11 July 2015 at 01:22:14 UTC, mzf wrote: win7 x86 dmd2.067.1 ok ubuntu x64 dmd2.067.1 error - import std.stdio; import std.socket; extern(C) void recv() { writeln(recv...); } extern(C) void send() { writeln(send...); } int

Re: New ldc2-0.15.2-beta2 Linux suitable for Travis-CI

2015-07-11 Thread extrawurst via Digitalmars-d-announce
On Friday, 10 July 2015 at 19:35:55 UTC, Kai Nacke wrote: Hi all! I re-created the Linux binaries. They should now work in Travis-CI again. 2457af89b39d89a237d9bda560c8b5a8 ldc2-0.15.2-beta2-linux-x86.tar.gz b5f1514d52082ac5e6220c23287f799b ldc2-0.15.2-beta2-linux-x86.tar.xz

Re: Function pointer array slice?

2015-07-11 Thread tcak via Digitalmars-d-learn
On Saturday, 11 July 2015 at 09:30:43 UTC, Tofu Ninja wrote: So simple syntax question, how do I make an array slice of function pointers? I just have no idea where to put the [] on something like void function() nothrow pure @nogc @safe arrayName; Or should I just alias it and make an

Re: Voting for std.experimental.allocator

2015-07-11 Thread Daniel Kozak via Digitalmars-d-announce
On Wed, 08 Jul 2015 11:33:01 + Dicebot via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Andrei is back online and thus it is time to make a decision about adding his allocator package (http://forum.dlang.org/post/vfipmwojmvseqxoiw...@forum.dlang.org) to Phobos

Re: Array operations with array of structs

2015-07-11 Thread Peter via Digitalmars-d-learn
On Wednesday, 8 July 2015 at 06:05:54 UTC, ketmar wrote: do you see the gotcha? if you uncomment postblit or assigns, this build function fails to compile, as that operations aren't pure nothrow @nogc @trusted, and they will be used for either assign or postblitting. So after looking into it

Re: Array operations with array of structs

2015-07-11 Thread anonymous via Digitalmars-d-learn
On Saturday, 11 July 2015 at 13:31:12 UTC, Peter wrote: The postblit can only not take @nogc due to the array duplication which is understandable. I think the postblit might be redundant anyway since the struct is built on a static array so there is no possibility of two different Vect3s

Re: Array operations with array of structs

2015-07-11 Thread Peter via Digitalmars-d-learn
On Saturday, 11 July 2015 at 13:31:12 UTC, Peter wrote: So after looking into it a little bit... So now I'm trying to multiply the array by a double but it's giving incompatible type errors. opBinary, opBinaryRight, and opOpAssign are defined. I have: struct Vector3 { public double[3]

Re: Implement the unum representation in D ?

2015-07-11 Thread Andrei Alexandrescu via Digitalmars-d
On 7/10/15 11:02 PM, Nick B wrote: John Gustafson book is now out: It can be found here: http://www.amazon.com/End-Error-Computing-Chapman-Computational/dp/1482239868/ref=sr_1_1?s=booksie=UTF8qid=1436582956sr=1-1keywords=John+Gustafsonpebp=1436583212284perid=093TDC82KFP9Y4S5PXPY Very

[Issue 14794] New: Add optional position parameter to std.file.read

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14794 Issue ID: 14794 Summary: Add optional position parameter to std.file.read Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

[Issue 14750] druntime/test/coverage was added to druntime, but not to the MANIFEST - zip file broken again

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14750 Jonathan M Davis issues.dl...@jmdavisprog.com changed: What|Removed |Added CC|

Re: Implement the unum representation in D ?

2015-07-11 Thread Timon Gehr via Digitalmars-d
On 07/11/2015 05:07 PM, Andrei Alexandrescu wrote: On 7/10/15 11:02 PM, Nick B wrote: John Gustafson book is now out: It can be found here:

DUB Different Library Name

2015-07-11 Thread serh via Digitalmars-d-learn
Hello, I am trying to use Derelict's Allegro 5 in my DUB project, however, when I try to run `dub build` it says it cannot find liballegro-5.0.11.so and liballegro-5.0.so. I have both libraries installed as liballegro.so.5.0.11 and liballegro.so.5.0 under my Arch system respectively. Is

Re: I'm getting NAN out of nowhere

2015-07-11 Thread flamencofantasy via Digitalmars-d-learn
On Thursday, 9 July 2015 at 15:14:43 UTC, Binarydepth wrote: This is my code : import std.stdio : writeln, readf; void main() { int[3] nums; float prom; foreach(nem; 0..2) { writeln(input a number : ); readf( %d, nums[nem]);

Re: N-dimensional slices is ready for comments!

2015-07-11 Thread Vlad Levenfeld via Digitalmars-d-announce
On Saturday, 20 June 2015 at 09:17:22 UTC, Ilya Yaroshenko wrote: autodata is hard to understand without HTML documentation. Automated documentation based on https://github.com/kiith-sa/harbored-mod can be found at http://ddocs.org/autodata/~master/index.html, and it is empty. You may want

Re: Implement the unum representation in D ?

2015-07-11 Thread Russel Winder via Digitalmars-d
On Sat, 2015-07-11 at 11:07 -0400, Andrei Alexandrescu via Digitalmars -d wrote: On 7/10/15 11:02 PM, Nick B wrote: John Gustafson book is now out: It can be found here: http://www.amazon.com/End-Error-Computing-Chapman

[Issue 14431] [REG 2.067.0] huge slowdown of compilation speed

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14431 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added See Also|

Re: Beta D 2.068.0-b1

2015-07-11 Thread Andrew Edwards via Digitalmars-d-announce
On Wednesday, 24 June 2015 at 23:14:05 UTC, Martin Nowak wrote: First beta for the 2.068.0 release. http://downloads.dlang.org/pre-releases/2.x/2.068.0/ http://ftp.digitalmars.com/ Also available on Travis-CI as dmd-2.068.0-b1. A changelog containing all the upcoming changes will be

Re: DUB Different Library Name

2015-07-11 Thread Mike Parker via Digitalmars-d-learn
On Saturday, 11 July 2015 at 16:43:39 UTC, serh wrote: Hello, I am trying to use Derelict's Allegro 5 in my DUB project, however, when I try to run `dub build` it says it cannot find liballegro-5.0.11.so and liballegro-5.0.so. I have both libraries installed as liballegro.so.5.0.11 and

Re: New ldc2-0.15.2-beta2 Linux suitable for Travis-CI

2015-07-11 Thread rsw0x via Digitalmars-d-announce
On Saturday, 11 July 2015 at 09:42:30 UTC, extrawurst wrote: On Friday, 10 July 2015 at 19:35:55 UTC, Kai Nacke wrote: Hi all! I re-created the Linux binaries. They should now work in Travis-CI again. 2457af89b39d89a237d9bda560c8b5a8 ldc2-0.15.2-beta2-linux-x86.tar.gz

Re: DUB Different Library Name

2015-07-11 Thread serh via Digitalmars-d-learn
On Sunday, 12 July 2015 at 01:17:27 UTC, Mike Parker wrote: No Derelict package has a compile-time or link-time dependency on the libraries they bind. The libraries are loaded at run time. DUB doesn't know anything about those libraries, so you shouldn't be seeing such an error with 'dub

socket server help

2015-07-11 Thread Adwelean via Digitalmars-d-learn
Hello, I have a project of updater for a game with few functions for administrate the game and for this i need a server to communicate with my client side (written in C#). I started to create the server but i have a problem with the async part, i tried std.concurrency for the receive thread

Re: Qt Creator and D

2015-07-11 Thread Max Klimov via Digitalmars-d
On Tuesday, 5 May 2015 at 10:48:41 UTC, David wrote: Hi. Is this project abondoned? Not really, it works with recent QtCreator. I'm going to continue implementing new features. Any suggestions or questions are appreciated. Max

[Issue 14744] std.range DDox page corrupted

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14744 --- Comment #7 from Vladimir Panteleev thecybersha...@gmail.com --- Sorry, yes. The underlying issue remains but the website problem is gone. --

Re: socket server help

2015-07-11 Thread Rikki Cattermole via Digitalmars-d-learn
On 12/07/2015 2:53 p.m., Adwelean wrote: Hello, I have a project of updater for a game with few functions for administrate the game and for this i need a server to communicate with my client side (written in C#). I started to create the server but i have a problem with the async part, i tried

[Issue 14564] [REG2.067] dmd -property -unittest combination causes compiler error

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14564 --- Comment #9 from Илья Ярошенко ilyayaroshe...@gmail.com --- (In reply to Walter Bright from comment #8) (In reply to Vladimir Panteleev from comment #3) -property is going away, but let's see what the maintainers say. Introduced in

Re: Firs step of D/Objective-C merged

2015-07-11 Thread Rikki Cattermole via Digitalmars-d-announce
On 12/07/2015 8:25 a.m., Jacob Carlborg wrote: I just manged to get all tests passing on all platforms. Now the first step of D/Objective-C has been merged [1][2]. The only thing that's supported for now is calling Objective-C instance methods from D. I want to give special thanks to Michel

Re: Implement the unum representation in D ?

2015-07-11 Thread jmh530 via Digitalmars-d
On Saturday, 11 July 2015 at 03:02:24 UTC, Nick B wrote: FYI John Gustafson book is now out: I was just thinking about overflow (more for my own interest than a practical reason). I wouldn't have known about this way to deal with it if you hadn't bumped this thread. So thanks, it's

Calling D Code from Assembly

2015-07-11 Thread John via Digitalmars-d-learn
Is there a way I can call D code from assembly without declaring functions as extern(C) and and doing it the C way?

Re: Calling D Code from Assembly

2015-07-11 Thread John via Digitalmars-d-learn
On Sunday, 12 July 2015 at 04:30:58 UTC, John wrote: Is there a way I can call D code from assembly without declaring functions as extern(C) and and doing it the C way? SOLVED: Found the calling convention description. http://dlang.org/abi.html

Re: Firs step of D/Objective-C merged

2015-07-11 Thread Jack Stouffer via Digitalmars-d-announce
On Saturday, 11 July 2015 at 20:25:47 UTC, Jacob Carlborg wrote: The only thing that's supported for now is calling Objective-C instance methods from D Is there any documentation available yet?

[Issue 14564] [REG2.067] dmd -property -unittest combination causes compiler error

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14564 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC|

Firs step of D/Objective-C merged

2015-07-11 Thread Jacob Carlborg via Digitalmars-d-announce
I just manged to get all tests passing on all platforms. Now the first step of D/Objective-C has been merged [1][2]. The only thing that's supported for now is calling Objective-C instance methods from D. I want to give special thanks to Michel Fortin who did the original implementation. I

Re: Announcing libasync, a cross-platform D event loop

2015-07-11 Thread Suliman via Digitalmars-d
There's a path in the DWFileChange change structure, you can access it with change.path. You'll have to put it in a path parser to access the filename, such as std.path Could you give an example of usage? And where DWFileChange structure is located? I do not see it in watcher.d

[Issue 14296] RDMD fails at building a lib when the source is in a subdir

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14296 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added CC|

[Issue 14750] druntime/test/coverage was added to druntime, but not to the MANIFEST - zip file broken again

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14750 --- Comment #10 from Walter Bright bugzi...@digitalmars.com --- (In reply to Jonathan M Davis from comment #9) But does it need to be generated on any systems without git? Yes. I do it all the time. That's how I find out when it breaks. --

Re: Implement the unum representation in D ?

2015-07-11 Thread ponce via Digitalmars-d
On Saturday, 11 July 2015 at 03:02:24 UTC, Nick B wrote: If you are at all interested in computer arithmetic or numerical methods, read this book. It is destined to be a classic. Sample chapter here: http://radiofreehpc.com/tmp/TheEndofErrorSampleChapter.pdf

[Issue 14744] std.range DDox page corrupted

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14744 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 14508] [REG2.067.0] compiling with -unittest instantiates templates in non-root modules

2015-07-11 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14508 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added See Also|

Inout unclearness

2015-07-11 Thread Max Klimov via Digitalmars-d
I have some questions about inout qualifier. I treated this qualifier as duplicated code reducer without using templates. But it is a real part of type system with its own casting rules. Inside an inout function we have special type inout(T) with several restrictions. So the first question is:

Re: socket server help

2015-07-11 Thread ketmar via Digitalmars-d-learn
On Sun, 12 Jul 2015 02:53:57 +, Adwelean wrote: Hello, I have a project of updater for a game with few functions for administrate the game and for this i need a server to communicate with my client side (written in C#). I started to create the server but i have a problem with the

Re: socket server help

2015-07-11 Thread ketmar via Digitalmars-d-learn
On Sun, 12 Jul 2015 15:44:44 +1200, Rikki Cattermole wrote: Perhaps try vibe.d? It does support what you want, automatically. most of the time vibe.d seems to be overkill. that's like building a space ship to visit Aunt Ellie, who lives in a town nearby. signature.asc Description: PGP

Re: DUB Different Library Name

2015-07-11 Thread Mike Parker via Digitalmars-d-learn
On Sunday, 12 July 2015 at 02:14:06 UTC, serh wrote: This is what I get when I run dub in the directory: http://codepad.org/BpnOHVSV As mentioned, I already have respective Allegro libs installed, but as liballegro.so.5.0 instead of liballegro-5.0.so and so on. The C++ linker sees them fine,

Re: DUB Different Library Name

2015-07-11 Thread ketmar via Digitalmars-d-learn
On Sun, 12 Jul 2015 02:14:04 +, serh wrote: As mentioned, I already have respective Allegro libs installed, but as liballegro.so.5.0 instead of liballegro-5.0.so and so on. The C++ linker sees them fine, but I am not sure how to make dmd/DUB see the correct libraries to link. Derelict

Re: Function pointer array slice?

2015-07-11 Thread ketmar via Digitalmars-d-learn
On Sat, 11 Jul 2015 11:37:03 +, Tofu Ninja wrote: void function() nothrow pure @nogc @safe [2]arrayName; is perfectly fine too. Ahh, guess that makes sense, I kept trying to put the [] over near function()... attributes are the parts of the type. and the rule is really simple: put

Re: Firs step of D/Objective-C merged

2015-07-11 Thread ketmar via Digitalmars-d-announce
congratulations! seems to be a necessity for apple platforms. signature.asc Description: PGP signature

Re: socket server help

2015-07-11 Thread Rikki Cattermole via Digitalmars-d-learn
On 12/07/2015 5:13 p.m., ketmar wrote: On Sun, 12 Jul 2015 15:44:44 +1200, Rikki Cattermole wrote: Perhaps try vibe.d? It does support what you want, automatically. most of the time vibe.d seems to be overkill. that's like building a space ship to visit Aunt Ellie, who lives in a town

Re: Firs step of D/Objective-C merged

2015-07-11 Thread Rikki Cattermole via Digitalmars-d-announce
On 12/07/2015 5:33 p.m., ketmar wrote: congratulations! seems to be a necessity for apple platforms. Extremely :/ https://github.com/Devisualization/window/blob/master/cocoa_library/project/dwc-osx/window_events.m

Re: socket server help

2015-07-11 Thread ketmar via Digitalmars-d-learn
On Sun, 12 Jul 2015 17:32:23 +1200, Rikki Cattermole wrote: But seriously, vibe.d is also pretty easy for most use cases. Hence why I'm saying it. that's until your operations are very-very fast, or your libraries have async API. hit the synchronous API, and everything will start turning to