[Issue 16215] Nested class unable to resolve outer class variables in certain scenarios

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16215 ag0ae...@gmail.com changed: What|Removed |Added Keywords||rejects-valid CC|

I have a problem with D

2016-06-27 Thread Adam Sansier via Digitalmars-d
Hi, I have designed a class based system that involves self-delegation instead of override. It is similar to event based programming. I have defined an event as a container type that holds functions(or possibly delegates, but the desire is to avoid them). class Base { alias

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Bauss via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 03:58:23 UTC, Jay Norwood wrote: On Tuesday, 28 June 2016 at 03:11:26 UTC, Jay Norwood wrote: On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote: If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?" oops. I see ...

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 03:11:26 UTC, Jay Norwood wrote: On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote: If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?" oops. I see ... need to test for empty string. nothrow pure size_t

Re: Where is the D deep learning library?

2016-06-27 Thread jmh530 via Digitalmars-d
On Monday, 27 June 2016 at 22:17:55 UTC, Martin Nowak wrote: On 06/27/2016 08:13 PM, Guillaume Piolat wrote: Not yet, but it could be useful for new types of audio effects and specific tasks like voiced/unvoiced detection. There are many simpler solutions for that than using machine

Re: Get return type statically

2016-06-27 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, Jun 28, 2016 at 01:41:03AM +, Smoke Adams via Digitalmars-d-learn wrote: > I have a type > > public class SuperFunction(T) > { > T t; > return(T) Do() { return t(); } > } > > where T is a delegate or function. First, I would like to be able to > specify that this must be the

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Tuesday, 28 June 2016 at 01:53:22 UTC, deadalnix wrote: If we were in interview, I'd ask you "what does this returns if you pass it an empty string ?" I'd say use this one instead, to avoid negative size_t. It is also a little faster for the same measurement. nothrow pure size_t

Re: Registration-free COM client

2016-06-27 Thread thedeemon via Digitalmars-d-learn
On Monday, 27 June 2016 at 21:17:52 UTC, Thalamus wrote: Hi everyone, I've succeeded in using D as a client for regular (registered) COM servers in the past, but in this case, I'm building the server as well. I would like to avoid registering it if possible so XCOPY-like deployment remains

Re: Get return type statically

2016-06-27 Thread Ali Çehreli via Digitalmars-d-learn
On 06/27/2016 06:41 PM, Smoke Adams wrote: I have a type public class SuperFunction(T) { T t; return(T) Do() { return t(); } } where T is a delegate or function. First, I would like to be able to specify that this must be the case for SuperFunction so we can't pass non-function/delegates

Re: Where is the D deep learning library?

2016-06-27 Thread bachmeier via Digitalmars-d
On Monday, 27 June 2016 at 22:41:16 UTC, jmh530 wrote: On Monday, 27 June 2016 at 22:24:00 UTC, Martin Nowak wrote: normal to wait a whole day for Matlab. Why I started learning D... Me too, but then I found out that I could write correct code much faster in D. Quite different from C and

Re: Get return type statically

2016-06-27 Thread Smoke Adams via Digitalmars-d-learn
I should point out also that this should be inheritable. Eventually I would like to create an algebra of SuperFunctions. e.g., SF3 = SF1 + SF2 is a new super function that combines the parameter list of SF1 and SF2 and unionizes their return type. Both functions are called by Do(which will

Re: Local fixed sized arrays

2016-06-27 Thread Ali Çehreli via Digitalmars-d-learn
On 06/27/2016 04:02 PM, Smoke Adams wrote: > On Monday, 27 June 2016 at 22:56:35 UTC, Ali Çehreli wrote: >> On 06/27/2016 02:58 PM, Smoke Adams wrote: >>> I'm in need of a way to create a local array that isn't GC'ed. It must >>> be dynamic in the sense of setting the size at compile time but it

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread deadalnix via Digitalmars-d-announce
On Sunday, 26 June 2016 at 16:40:08 UTC, Jay Norwood wrote: After watching Andre's sentinel thing, I'm playing with strlen on char strings with 4 terminating 0s instead of a single one. Seems to work and is 4x faster compared to the runtime version. nothrow pure size_t strlen2(const(char)*

Re: Get return type statically

2016-06-27 Thread Smoke Adams via Digitalmars-d-learn
On Tuesday, 28 June 2016 at 01:41:03 UTC, "Smoke" Adams wrote: I have a type public class SuperFunction(T) { T t; return(T) Do() { return t(); } } where T is a delegate or function. First, I would like to be able to specify that this must be the case for SuperFunction so we can't pass

Get return type statically

2016-06-27 Thread Smoke Adams via Digitalmars-d-learn
I have a type public class SuperFunction(T) { T t; return(T) Do() { return t(); } } where T is a delegate or function. First, I would like to be able to specify that this must be the case for SuperFunction so we can't pass non-function/delegates for T. Second, How to specify the return

[Issue 16215] New: Nested class unable to resolve outer class variables in certain scenarios

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16215 Issue ID: 16215 Summary: Nested class unable to resolve outer class variables in certain scenarios Product: D Version: D2 Hardware: x86_64 OS: Linux

Re: AWS SDK

2016-06-27 Thread Brad Roberts via Digitalmars-d
On 6/27/16 10:53 AM, Brad Roberts via Digitalmars-d wrote: On 6/26/2016 4:06 PM, Jadbox via Digitalmars-d wrote: Is there an AWS library in the works for D? It's seriously the main blocker for me to push adoption of the language internally. If not, I can try to invest time into making one, but

Re: Fiber local GC

2016-06-27 Thread Martin Nowak via Digitalmars-d
On Monday, 27 June 2016 at 22:55:39 UTC, deadalnix wrote: Yeah, but you can blast the whole heap in between reuse, and that is great :) Right, and you can already reset a fiber local allocator today, just put a reference to it in your Fiber subclass.

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Mike Parker via Digitalmars-d-announce
On Monday, 27 June 2016 at 19:51:48 UTC, Jay Norwood wrote: I also found it strange, the non-zero initialization values for char, dchar, wchar. I suppose there's some reason? int [100] to zeros. char [100] to 0xff; dchar [100] to 0x; wchar [100] to 0x; The same reason float

Re: Release D 2.071.1

2016-06-27 Thread Jack Stouffer via Digitalmars-d-announce
On Monday, 27 June 2016 at 22:11:53 UTC, Martin Nowak wrote: Glad to announce D 2.071.1. http://dlang.org/download.html This point release fixes a few issues over 2.071.0, see the changelog for more details. http://dlang.org/changelog/2.071.1.html -Martin Glad to see this out :)

Re: Release D 2.071.1

2016-06-27 Thread Jack Stouffer via Digitalmars-d-announce
On Monday, 27 June 2016 at 23:15:06 UTC, Robert burner Schadek wrote: Awesome, releases are becoming more and more boring. I like it! I wouldn't call 1.0 * -1.0 == 1.0 boring!

Re: Release D 2.071.1

2016-06-27 Thread Robert burner Schadek via Digitalmars-d-announce
Awesome, releases are becoming more and more boring. I like it!

Re: static if enhancement

2016-06-27 Thread Stefan Koch via Digitalmars-d
On Monday, 27 June 2016 at 22:56:41 UTC, Jonathan M Davis wrote: On Monday, June 27, 2016 18:55:48 deadalnix via Digitalmars-d wrote: On Monday, 27 June 2016 at 18:14:26 UTC, Timon Gehr wrote: > [...] Alright, I have to range myself with most here. While I'm all for not warning about

Re: Local fixed sized arrays

2016-06-27 Thread Smoke Adams via Digitalmars-d-learn
On Monday, 27 June 2016 at 22:56:35 UTC, Ali Çehreli wrote: On 06/27/2016 02:58 PM, Smoke Adams wrote: I'm in need of a way to create a local array that isn't GC'ed. It must be dynamic in the sense of setting the size at compile time but it will be used only in scope and only on structs.

Re: Local fixed sized arrays

2016-06-27 Thread Ali Çehreli via Digitalmars-d-learn
On 06/27/2016 02:58 PM, Smoke Adams wrote: I'm in need of a way to create a local array that isn't GC'ed. It must be dynamic in the sense of setting the size at compile time but it will be used only in scope and only on structs. function x(int y) { bool[y] arr; arr ~= 3; } I care

Re: Fiber local GC

2016-06-27 Thread deadalnix via Digitalmars-d
On Monday, 27 June 2016 at 22:51:05 UTC, Martin Nowak wrote: On 06/25/2016 12:33 PM, Ola Fosheim Grøstad wrote: It takes the same viewpoint. A go-routine (fiber) that is short-lived (like a HTTP request handler) can release everything in one swipe without collection. Simple as don't

Re: static if enhancement

2016-06-27 Thread Jonathan M Davis via Digitalmars-d
On Monday, June 27, 2016 18:55:48 deadalnix via Digitalmars-d wrote: > On Monday, 27 June 2016 at 18:14:26 UTC, Timon Gehr wrote: > > Me, because that's what it means to evaluate the condition at > > compile time and only compiling in the appropriate branch. This > > is additional and special

Re: Fiber local GC

2016-06-27 Thread Martin Nowak via Digitalmars-d
On 06/25/2016 12:33 PM, Ola Fosheim Grøstad wrote: > > It takes the same viewpoint. A go-routine (fiber) that is short-lived > (like a HTTP request handler) can release everything in one swipe > without collection. Simple as don't allocate on a per-request basis if you want a fast program. It

Re: Where is the D deep learning library?

2016-06-27 Thread jmh530 via Digitalmars-d
On Monday, 27 June 2016 at 22:24:00 UTC, Martin Nowak wrote: normal to wait a whole day for Matlab. Why I started learning D...

Re: GSoC 2016 - std.experimental.xml after a month

2016-06-27 Thread Martin Nowak via Digitalmars-d
On 06/25/2016 10:33 PM, Lodovico Giaretta wrote: > > But my implementation does not maintain the state of the parents, so you > can't get any info about the parent from the children, unless you use > exit() (in which case, you can get the parent's name from the closing tag). > > But your idea

Re: Where is the D deep learning library?

2016-06-27 Thread Martin Nowak via Digitalmars-d
On 06/27/2016 05:31 PM, Guillaume Piolat wrote: > You don't need to match the manpower and stability of the established > solution to make something useful. Perhaps there could be something > distinctive enough to make it attractive? Much faster turnaround times are a very distinctive feature.

Re: Where is the D deep learning library?

2016-06-27 Thread Martin Nowak via Digitalmars-d
On 06/27/2016 08:13 PM, Guillaume Piolat wrote: > Not yet, but it could be useful for new types of audio effects and > specific tasks like voiced/unvoiced detection. There are many simpler solutions for that than using machine learning. Writing a simple neural network with backpropagation is

Re: static if enhancement

2016-06-27 Thread ketmar via Digitalmars-d
On Monday, 27 June 2016 at 11:05:49 UTC, cym13 wrote: What's unintuitive about it (real question)? It would make it behave more like a standard if and early returns are very common, well understood and good practice: void func(int* somepointer) { if (somepointer == null) return;

Release D 2.071.1

2016-06-27 Thread Martin Nowak via Digitalmars-d-announce
Glad to announce D 2.071.1. http://dlang.org/download.html This point release fixes a few issues over 2.071.0, see the changelog for more details. http://dlang.org/changelog/2.071.1.html -Martin

Re: Dynamic array of objects

2016-06-27 Thread Alex Parrill via Digitalmars-d-learn
On Monday, 27 June 2016 at 22:00:15 UTC, gummybears wrote: Hi, Today thought lets learn D. I am writing a compiler for a language and read D compiles very fast. Switched my compiler from C++ to D and ran my test suite to use D. Doing somethin wrong as creating array of objects gives me a

Dynamic array of objects

2016-06-27 Thread gummybears via Digitalmars-d-learn
Hi, Today thought lets learn D. I am writing a compiler for a language and read D compiles very fast. Switched my compiler from C++ to D and ran my test suite to use D. Doing somethin wrong as creating array of objects gives me a segmentation fault Example import std.stdio; class Pair {

Local fixed sized arrays

2016-06-27 Thread Smoke Adams via Digitalmars-d-learn
I'm in need of a way to create a local array that isn't GC'ed. It must be dynamic in the sense of setting the size at compile time but it will be used only in scope and only on structs. function x(int y) { bool[y] arr; arr ~= 3; } I care about slicing or anything but appending,

Forward References

2016-06-27 Thread Jonathan Marler via Digitalmars-d-learn
Do the various D compilers use multiple passes to handle forward references or some other technique?

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 27 June 2016 at 21:41:57 UTC, Jay Norwood wrote: measurements. I'm using a 100KB char array terminated by four zeros, and doing strlen on substring pointers into it incremented by 1 for 100K times. But this is a rather atypical use case for zero terminated strings? It would make

Re: dmd (>2.068) compiler error

2016-06-27 Thread ag0aep6g via Digitalmars-d
On 06/26/2016 09:01 AM, ted wrote: Compilation of https://github.com/dcarp/asynchronous. [...] /usr/bin/dmd -ofbuild/events.d.o -debug -g -w -version=CryptoSafe -version=Have_asynchronous -version=Have_libasync -version=Have_memutils -Isrc -

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 27 June 2016 at 20:43:40 UTC, Ola Fosheim Grøstad wrote: Just keep in mind that the major bottleneck now is loading 64 bytes from memory into cache. So if you test performance you have to make sure to invalidate the caches before you test and test with spurious reads over a very

[Issue 16214] New: [REG2.069] ICE: Assertion `fd->semanticRun == PASSsemantic3done' failed.

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16214 Issue ID: 16214 Summary: [REG2.069] ICE: Assertion `fd->semanticRun == PASSsemantic3done' failed. Product: D Version: D2 Hardware: x86_64 OS: Linux

Registration-free COM client

2016-06-27 Thread Thalamus via Digitalmars-d-learn
Hi everyone, I've succeeded in using D as a client for regular (registered) COM servers in the past, but in this case, I'm building the server as well. I would like to avoid registering it if possible so XCOPY-like deployment remains an option. Can a registration-free COM client be built in

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 27 June 2016 at 06:31:49 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 05:27:12 UTC, chmike wrote: Ending strings with a single null byte/char is to save space. It was critical in the 70´s when C was created and memory space was very limited. That's not the case anymore

Re: Another audio plugin in D

2016-06-27 Thread Jacob Carlborg via Digitalmars-d-announce
On 27/06/16 21:22, Guillaume Piolat wrote: My wording was a bit strong. As you may remember, the workaround involved "leaking" the dynlib. On OS X I keep having a lingering crash which is a bit random, happens with multiple instantiation/closing of a dynlib. It is a bit hard to reproduce and

[Issue 16213] New: CTFE internal error with static array $ as template argument

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16213 Issue ID: 16213 Summary: CTFE internal error with static array $ as template argument Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 27 June 2016 at 19:51:48 UTC, Jay Norwood wrote: Your link's use of padding pads out with a variable number of zeros, so that a larger data type can be used for the compare operations. This isn't the same as my example, which is simpler due to not having to fiddle with alignment

[Issue 16212] New: Segfault using "with" for field access inside switch statement

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16212 Issue ID: 16212 Summary: Segfault using "with" for field access inside switch statement Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW

[Issue 16211] New: [REG 2.058] Cyclic dependencies broken again

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16211 Issue ID: 16211 Summary: [REG 2.058] Cyclic dependencies broken again Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression

Re: Getting the template name of a template instantiation

2016-06-27 Thread Nordlöw via Digitalmars-d-learn
On Monday, 27 June 2016 at 17:17:19 UTC, John wrote: import std.traits; __traits(identifier, TemplateOf!(S!int)); Scratch that, this is what you want: import std.traits; static assert(__traits(isSame, TemplateOf!(S!int), S)); I believe this is what import std.traits : isInstanceOf; is

Re: static if enhancement

2016-06-27 Thread Claude via Digitalmars-d
On Monday, 27 June 2016 at 11:05:49 UTC, cym13 wrote: What's unintuitive about it (real question)? It would make it behave more like a standard if and early returns are very common, well understood and good practice: void func(int* somepointer) { if (somepointer == null) return;

[Issue 10291] formattedWrite() to an Appender fails silently after Appender.clear()

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10291 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

Re: Diff between function and delegate

2016-06-27 Thread Mathias Lang via Digitalmars-d-learn
On Monday, 27 June 2016 at 19:34:06 UTC, "Smoke" Adams wrote: I have alias fnc = void function(Object); alias del = void delegate(); Does func avoid the GC? I am passing in this to Object so I don't technically need a delegate or a "context". I want to be sure that I'm actually gaining

[Issue 6409] std.array.empty for associative arrays too

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

[Issue 13256] Update std.array.front to support all strings uniformly

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13256 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 27 June 2016 at 16:38:58 UTC, Ola Fosheim Grøstad wrote: Yes, and the idea of speeding up strings by padding out with zeros is not new. ;-) I recall suggesting it back in 1999 when discussing the benefits of having a big endian cpu when sorting strings. If it is big endian you can

Re: Beta D 2.071.1-b2

2016-06-27 Thread Martin Nowak via Digitalmars-d-announce
On 06/16/2016 08:43 PM, Jack Stouffer wrote: > On Sunday, 29 May 2016 at 21:53:23 UTC, Martin Nowak wrote: >> Second beta for the 2.071.1 release. >> >> http://dlang.org/download.html#dmd_beta >> http://dlang.org/changelog/2.071.1.html >> >> Please report any bugs at https://issues.dlang.org >> >>

Re: Beta D 2.071.1-b2

2016-06-27 Thread Martin Nowak via Digitalmars-d-announce
On 06/16/2016 09:47 PM, deadalnix wrote: > 196418a8b3ec1c5f284da5009b4bb18e3f70d99f still not in after 3 month. > This is typesystem breaking. While I understand it wasn't picked for > 2.071 , I'm not sure why it wasn't for 2.071.1 . Because it didn't target stable.

[Issue 12916] std.array index based insert

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12916 Jack Stouffer changed: What|Removed |Added Status|NEW |RESOLVED

Re: C++17 is feature complete

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 27 June 2016 at 19:39:20 UTC, luminousone wrote: OpenCL is for micro threading, not simd. What is your point? Clang++ vector extensions use OpenCL semantics, so you need to look up the OpenCL spec to figure out what it supports. It is not well-documented in the Clang

[Issue 16210] New: std.utf.byUTF can be made into a bidirectional range

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16210 Issue ID: 16210 Summary: std.utf.byUTF can be made into a bidirectional range Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: C++17 is feature complete

2016-06-27 Thread luminousone via Digitalmars-d
On Monday, 27 June 2016 at 19:34:18 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 19:32:39 UTC, luminousone wrote: Its the nature of being compatible with C, it might not be explicitly stated in the spec, but the only place to put the vtable pointer and stay compatible with C

Re: static if enhancement

2016-06-27 Thread cym13 via Digitalmars-d
On Monday, 27 June 2016 at 18:55:48 UTC, deadalnix wrote: On Monday, 27 June 2016 at 18:14:26 UTC, Timon Gehr wrote: Me, because that's what it means to evaluate the condition at compile time and only compiling in the appropriate branch. This is additional and special behaviour and it destroys

[Issue 16209] New: std.string.isNumeric can work with forward ranges

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16209 Issue ID: 16209 Summary: std.string.isNumeric can work with forward ranges Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement

Re: C++17 is feature complete

2016-06-27 Thread luminousone via Digitalmars-d
On Monday, 27 June 2016 at 18:58:25 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 18:23:11 UTC, default0 wrote: Regarding C++ I found this to be a fun read: http://yosefk.com/c++fqa/ :-) A lot of it makes sense... C++ is what happens when you evolve, evolve, evolve and evolve a

Re: C++17 is feature complete

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 27 June 2016 at 19:32:39 UTC, luminousone wrote: Its the nature of being compatible with C, it might not be explicitly stated in the spec, but the only place to put the vtable pointer and stay compatible with C structs is at the end. No... You are making way too many assumptions.

Diff between function and delegate

2016-06-27 Thread Smoke Adams via Digitalmars-d-learn
I have alias fnc = void function(Object); alias del = void delegate(); Does func avoid the GC? I am passing in this to Object so I don't technically need a delegate or a "context". I want to be sure that I'm actually gaining something here by doing this. I read somewhere that delegates only

Re: Call to Action: making Phobos @safe

2016-06-27 Thread Walter Bright via Digitalmars-d
On 6/27/2016 8:14 AM, Robert burner Schadek wrote: On Sunday, 26 June 2016 at 22:38:54 UTC, Walter Bright wrote: It's a wiki, feel free to add it. I have to say that reply really makes me angry. I created that list so Andrei and you have an easy to find spot where you can write down tasks so

Re: C++17 is feature complete

2016-06-27 Thread luminousone via Digitalmars-d
On Monday, 27 June 2016 at 16:48:16 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 16:38:07 UTC, luminousone wrote: easy to implement. In C++ the exact position of the vtable depends on what is in the base most class, it might be 8bytes in, maybe 20, maybe 200, you just don't know,

Re: executeShell doesn't work but system does

2016-06-27 Thread Smoke Adams via Digitalmars-d-learn
On Sunday, 26 June 2016 at 16:02:18 UTC, ag0aep6g wrote: On 06/26/2016 05:37 PM, Smoke Adams wrote: [...] Unsolicited spelling correction: no 'i' in "deprecated". [...] `system` directly prints its output, `executeShell` returns it in a tuple with the status code. Maybe cls works by

Re: Another audio plugin in D

2016-06-27 Thread Guillaume Piolat via Digitalmars-d-announce
On Monday, 27 June 2016 at 18:59:35 UTC, Jacob Carlborg wrote: On 27/06/16 13:02, Guillaume Piolat wrote: Unloading of shared libraries on OS X continues to be a problem though, it would be nice if it worked in 64-bit. I know the current situation is not ideal, but does it cause any

Re: C++17 is feature complete

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 27 June 2016 at 18:23:11 UTC, default0 wrote: Regarding C++ I found this to be a fun read: http://yosefk.com/c++fqa/ :-) A lot of it makes sense... C++ is what happens when you evolve, evolve, evolve and evolve a language from a starting-point that was not a high level language,

Re: static if enhancement

2016-06-27 Thread deadalnix via Digitalmars-d
On Monday, 27 June 2016 at 18:14:26 UTC, Timon Gehr wrote: Me, because that's what it means to evaluate the condition at compile time and only compiling in the appropriate branch. This is additional and special behaviour and it destroys the orthogonality of 'static if' and 'return'. (I don't

Re: Another audio plugin in D

2016-06-27 Thread Jacob Carlborg via Digitalmars-d-announce
On 27/06/16 13:02, Guillaume Piolat wrote: Unloading of shared libraries on OS X continues to be a problem though, it would be nice if it worked in 64-bit. I know the current situation is not ideal, but does it cause any problems? -- /Jacob Carlborg

C++17 is feature complete

2016-06-27 Thread default0 via Digitalmars-d
Regarding C++ I found this to be a fun read: http://yosefk.com/c++fqa/ :-)

Re: AWS SDK

2016-06-27 Thread jadbox via Digitalmars-d
On Monday, 27 June 2016 at 17:53:32 UTC, Brad Roberts wrote: https://github.com/braddr/downloads.dlang.org/tree/master/src It has sig v2 signing and some s3 object related code. Super minimal and sig v2 is out of date (though still very usable, in most aws regions). Ideally, someone would

Re: static if enhancement

2016-06-27 Thread Timon Gehr via Digitalmars-d
On 27.06.2016 13:05, cym13 wrote: On Monday, 27 June 2016 at 08:16:18 UTC, Claude wrote: On Saturday, 25 June 2016 at 11:27:01 UTC, cym13 wrote: We are talking about early returns (checking for something and returning as soon as possible) which are a well-known and efficient way to reduce

Re: Where is the D deep learning library?

2016-06-27 Thread Guillaume Piolat via Digitalmars-d
On Monday, 27 June 2016 at 16:41:15 UTC, jmh530 wrote: On Monday, 27 June 2016 at 15:31:07 UTC, Guillaume Piolat wrote: Well I get the manpower thing, everything we do is quite labour-intensive. I'm just curious nobody started such an effort (but there was with DlangScience, gamedev,

Re: Where is the D deep learning library?

2016-06-27 Thread Jack Stouffer via Digitalmars-d
On Monday, 27 June 2016 at 15:31:07 UTC, Guillaume Piolat wrote: Well I get the manpower thing, everything we do is quite labour-intensive. I'm just curious nobody started such an effort (but there was with DlangScience, gamedev, web...). D doesn't even have the building blocks in D code.

Re: AWS SDK

2016-06-27 Thread Brad Roberts via Digitalmars-d
On 6/26/2016 4:06 PM, Jadbox via Digitalmars-d wrote: Is there an AWS library in the works for D? It's seriously the main blocker for me to push adoption of the language internally. If not, I can try to invest time into making one, but I could use help. (fyi, there's one in the works for Rust:

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Brad Roberts via Digitalmars-d-announce
On 6/26/2016 11:47 AM, Jay Norwood via Digitalmars-d-announce wrote: On Sunday, 26 June 2016 at 16:59:54 UTC, David Nadlinger wrote: Please keep general discussions like this off the announce list, which would e.g. be suitable for announcing a fleshed out collection of high-performance string

[Issue 16208] New: moduleinfo importedModules contains needless duplicates

2016-06-27 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=16208 Issue ID: 16208 Summary: moduleinfo importedModules contains needless duplicates Product: D Version: D2 Hardware: All OS: All Status: NEW

Re: Getting the template name of a template instantiation

2016-06-27 Thread John via Digitalmars-d-learn
On Monday, 27 June 2016 at 17:14:23 UTC, John wrote: On Monday, 27 June 2016 at 16:40:09 UTC, Nordlöw wrote: If I have a template parameter E = S!int where struct S(T) { S x; } how can I extract the template name part `S` from E`? Something like: static

Re: Getting the template name of a template instantiation

2016-06-27 Thread Ali Çehreli via Digitalmars-d-learn
On 06/27/2016 09:54 AM, Lodovico Giaretta wrote: On Monday, 27 June 2016 at 16:40:09 UTC, Nordlöw wrote: If I have a template parameter E = S!int where struct S(T) { S x; } how can I extract the template name part `S` from E`? Something like: static

Re: [Semi OT] About code review

2016-06-27 Thread Johan Engelen via Digitalmars-d-announce
On Monday, 27 June 2016 at 00:01:34 UTC, deadalnix wrote: Several people during DConf asked abut tips and tricks on code review. So I wrote an article about it: http://www.deadalnix.me/2016/06/27/on-code-review/ It's a nice read. One comment: perhaps the balance has tipped a bit much to

Re: Getting the template name of a template instantiation

2016-06-27 Thread John via Digitalmars-d-learn
On Monday, 27 June 2016 at 16:40:09 UTC, Nordlöw wrote: If I have a template parameter E = S!int where struct S(T) { S x; } how can I extract the template name part `S` from E`? Something like: static assert(is(templateName!(S!int) == S)); Is this already in Phobos somewhere?

Re: Getting the template name of a template instantiation

2016-06-27 Thread Lodovico Giaretta via Digitalmars-d-learn
On Monday, 27 June 2016 at 16:40:09 UTC, Nordlöw wrote: If I have a template parameter E = S!int where struct S(T) { S x; } how can I extract the template name part `S` from E`? Something like: static assert(is(templateName!(S!int) == S)); Is this already in Phobos somewhere?

Re: Where is the D deep learning library?

2016-06-27 Thread jmh530 via Digitalmars-d
On Monday, 27 June 2016 at 15:31:07 UTC, Guillaume Piolat wrote: Well I get the manpower thing, everything we do is quite labour-intensive. I'm just curious nobody started such an effort (but there was with DlangScience, gamedev, web...). And with such a hyped area, getting successful is a

Re: C++17 is feature complete

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 27 June 2016 at 16:38:07 UTC, luminousone wrote: easy to implement. In C++ the exact position of the vtable depends on what is in the base most class, it might be 8bytes in, maybe 20, maybe 200, you just don't know, And certainly the runtime can't know. I know what the usual

Re: C++17 is feature complete

2016-06-27 Thread luminousone via Digitalmars-d
On Monday, 27 June 2016 at 16:10:13 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 16:03:44 UTC, luminousone wrote: C++ post pended vtable pointers, Are not implementation dependent. I don't know what «post pended vtable pointers» means. Which section of the C++ spec are you

Re: static if enhancement

2016-06-27 Thread QAston via Digitalmars-d
On Monday, 27 June 2016 at 00:31:39 UTC, Jonathan M Davis wrote: On Friday, June 24, 2016 13:54:21 Andrei Alexandrescu via Digitalmars-d wrote: I would think that it's highly unintuitive to think that code outside of a static if would be treated as part of an else of a static if just because

Getting the template name of a template instantiation

2016-06-27 Thread Nordlöw via Digitalmars-d-learn
If I have a template parameter E = S!int where struct S(T) { S x; } how can I extract the template name part `S` from E`? Something like: static assert(is(templateName!(S!int) == S)); Is this already in Phobos somewhere?

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d-announce
On Monday, 27 June 2016 at 16:22:56 UTC, Jay Norwood wrote: This strlen2 doesn't require special alignment or casting of char pointer types to some larger type. That keeps the strlen2 implementation fairly simple. Yes, and the idea of speeding up strings by padding out with zeros is not new.

Logical location of template instantiations

2016-06-27 Thread Lodovico Giaretta via Digitalmars-d
import std.conv, core.memory; struct S { int x; private this(int val) { x = val; } } void main() { auto ptr = cast(S*)GC.malloc(S.sizeof); auto s = ptr.emplace(3); } This code does not work, as the call `ptr.emplace(3)` creates a

Re: 4x faster strlen with 4 char sentinel

2016-06-27 Thread Jay Norwood via Digitalmars-d-announce
On Monday, 27 June 2016 at 06:31:49 UTC, Ola Fosheim Grøstad wrote: Besides there are plenty of other advantages to using a terminating sentinel depending on the use scenario. E.g. if you want many versions of the same tail or if you are splitting a string at white space (overwrite a white

Re: C++17 is feature complete

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 27 June 2016 at 16:03:44 UTC, luminousone wrote: C++ post pended vtable pointers, Are not implementation dependent. I don't know what «post pended vtable pointers» means. Which section of the C++ spec are you referring to?

Re: C++17 is feature complete

2016-06-27 Thread luminousone via Digitalmars-d
On Monday, 27 June 2016 at 15:59:30 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 15:54:16 UTC, luminousone wrote: C++ has post pended vtable pointers on class objects, its unlikely good reflection can ever be added to the language, as the vtable may be in a different place in

Re: C++17 is feature complete

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 27 June 2016 at 15:54:16 UTC, luminousone wrote: C++ has post pended vtable pointers on class objects, its unlikely good reflection can ever be added to the language, as the vtable may be in a different place in every object their is no way to access it universally for object type

Re: C++17 is feature complete

2016-06-27 Thread luminousone via Digitalmars-d
On Monday, 27 June 2016 at 06:16:57 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 05:33:24 UTC, luminousone wrote: On Sunday, 26 June 2016 at 22:32:55 UTC, Walter Bright wrote: On 6/26/2016 10:18 AM, Enamex wrote: - template arguments that accept constant values of any type

Re: C++17 is feature complete

2016-06-27 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 27 June 2016 at 15:49:20 UTC, Ola Fosheim Grøstad wrote: On Monday, 27 June 2016 at 15:43:03 UTC, luminousone wrote: Modern C++ is a train-wreck, I don't think we should consider D features around the flaws of another language. RAII is the same in C++, but actually better supported

  1   2   >