Re: strange bug with unions?

2015-05-29 Thread deadalnix via Digitalmars-d
On Friday, 29 May 2015 at 07:55:55 UTC, seen wrote: I don't know why but when using a template union with a static ubyte array i get bizarre results! module main; import std.stdio; private union ByteConverter(T) { ubyte[T.sizeof] bytes; T value; } ubyte[] toBytes(T)(T from)

Re: drastic slowdown for copies

2015-05-29 Thread Momo via Digitalmars-d-learn
On Friday, 29 May 2015 at 07:51:31 UTC, thedeemon wrote: On Thursday, 28 May 2015 at 21:23:11 UTC, Momo wrote: Ah, actually it's more complicated, as it depends on inlining a lot. Yes. And real functions are more complex and inlining is no reliable option. Indeed, without -O and -inline I was

Re: Windows Universal/Store apps support

2015-05-29 Thread Paulo Pinto via Digitalmars-d-learn
On Friday, 29 May 2015 at 03:23:39 UTC, Rikki Cattermole wrote: On 29/05/2015 3:57 a.m., Olivier Prince wrote: I searched the forum to find if there is some support for new Windows development technologies and I didn't find anything related (except some rants about WinRT 3 years ago). - Is

strange bug with unions?

2015-05-29 Thread seen via Digitalmars-d
I don't know why but when using a template union with a static ubyte array i get bizarre results! module main; import std.stdio; private union ByteConverter(T) { ubyte[T.sizeof] bytes; T value; } ubyte[] toBytes(T)(T from) if (!is(T == const)) { ByteConverter!T

Re: drastic slowdown for copies

2015-05-29 Thread thedeemon via Digitalmars-d-learn
On Friday, 29 May 2015 at 07:51:31 UTC, thedeemon wrote: Above was on Core 2 Quad, here's for Core i3: 4 ints 5 ints -release by ref: 67 by ref: 66 by copy: 44 by copy: 142 by move: 45 by move: 137 -release -O by ref: 29 by ref: 29 by copy: 41 by copy: 141 by

[Issue 9279] Static array return value implicitly converted to immutable dynamic array

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9279 Martin Nowak c...@dawg.eu changed: What|Removed |Added Priority|P2 |P3 CC|

[Issue 9279] [REG2.055/2.063] Static array return value implicitly converted to immutable dynamic array

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9279 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added Summary|Static array return value |[REG2.055/2.063]

Re: Windows Universal/Store apps support

2015-05-29 Thread Rikki Cattermole via Digitalmars-d-learn
On 29/05/2015 7:03 p.m., Paulo Pinto wrote: On Friday, 29 May 2015 at 03:23:39 UTC, Rikki Cattermole wrote: On 29/05/2015 3:57 a.m., Olivier Prince wrote: I searched the forum to find if there is some support for new Windows development technologies and I didn't find anything related (except

Re: drastic slowdown for copies

2015-05-29 Thread thedeemon via Digitalmars-d-learn
On Thursday, 28 May 2015 at 21:23:11 UTC, Momo wrote: Ah, actually it's more complicated, as it depends on inlining a lot. Indeed, without -O and -inline I was able to get by_ref to be slightly slower than by_copy for struct of 4 ints. But when inlining turns on, the numbers change in

Re: strange bug with unions?

2015-05-29 Thread seen via Digitalmars-d
On Friday, 29 May 2015 at 08:00:54 UTC, deadalnix wrote: On Friday, 29 May 2015 at 07:55:55 UTC, seen wrote: I don't know why but when using a template union with a static ubyte array i get bizarre results! module main; import std.stdio; private union ByteConverter(T) {

Re: Why aren't you using D at work?

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Thursday, 28 May 2015 at 17:22:21 UTC, Andrei Alexandrescu wrote: On 5/28/15 8:38 AM, Manu via Digitalmars-d wrote: * Forceinline. Thanks for initiating this! The lack of a means to force inlining has been unpleasant at Facebook as well. It would be great if we got this (and of course

Re: drastic slowdown for copies

2015-05-29 Thread thedeemon via Digitalmars-d-learn
On Thursday, 28 May 2015 at 21:23:11 UTC, Momo wrote: I'm currently investigating the difference of speed between references and copies. And it seems that copies got a immense slowdown if they reach a size of = 20 bytes. This is processor-specific, on different models of CPUs you might get

Re: strange bug with unions?

2015-05-29 Thread Ali Çehreli via Digitalmars-d
On 05/29/2015 12:55 AM, seen wrote: I don't know why but when using a template union with a static ubyte array i get bizarre results! module main; import std.stdio; private union ByteConverter(T) { ubyte[T.sizeof] bytes; That's a fixed-length array (aka static array), which has value

Re: strange bug with unions?

2015-05-29 Thread Vladimir Panteleev via Digitalmars-d
On Friday, 29 May 2015 at 07:55:55 UTC, seen wrote: ubyte[] toBytes(T)(T from) if (!is(T == const)) { ByteConverter!T converter; converter.value = from; return converter.bytes; } This function is incorrect: it is returning a slice (dynamic array) of a static array,

Re: DMD Symbol Reference Analysis Pass

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Thursday, 28 May 2015 at 21:23:59 UTC, Per Nordlöw wrote: https://github.com/nordlow/justd/blob/79cc8bf0766282368f05314d00566e7d234988bd/bylinefast.d#L207 which is currently deactivated. It has worked flawlessly in my applications, so none AFAIK. Could this replace the stuck

[Issue 14628] VisualD fails with Visual Studio 2015 RC

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14628 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: Laptop volunteer wanted for tomorrows live-stream

2015-05-29 Thread Mattcoder via Digitalmars-d-announce
On Friday, 29 May 2015 at 04:00:22 UTC, John Colvin wrote: At the very least, I will need to use my laptop for my own talk. I would also really like to be able to use it during the day beforehand. Or you could borrow another laptop for the presentation/slides and let your own for the live

Re: DMD Symbol Reference Analysis Pass

2015-05-29 Thread via Digitalmars-d
On Thursday, 28 May 2015 at 21:27:06 UTC, Per Nordlöw wrote: Speed-up varies between 2.0 and 2.7 according to recent experiments done using new unittest at The test file http://downloads.dbpedia.org/3.9/en/instance_types_en.nt.bz2 contains 15.9 Mlines :) /Per

[Issue 14630] New: Std.algorithm splitter segfault on large file with mmfile, seems GC related.

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14630 Issue ID: 14630 Summary: Std.algorithm splitter segfault on large file with mmfile, seems GC related. Product: D Version: D2 Hardware: x86 OS: Linux

[Issue 7753] Support opIndexCreate as part of index operator overloading in user-defined types

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7753 Martin Nowak c...@dawg.eu changed: What|Removed |Added CC||c...@dawg.eu --- Comment #6 from

Re: Proof of concept - library AA

2015-05-29 Thread IgorStepanov via Digitalmars-d
On Friday, 29 May 2015 at 11:17:00 UTC, Martin Nowak wrote: On Wednesday, 27 May 2015 at 17:16:53 UTC, IgorStepanov wrote: Foo f; f[5][3] = Foo(42); translates to f.opIndex!(true)(5).opIndex!(true)(3) = Foo(42); auto x = f[5][4]; translates to auto x =

Re: Proof of concept - library AA

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Friday, 29 May 2015 at 11:16:27 UTC, Mike wrote: But, if you'll forgive my ignorance, what is the primary motivation for migrating to a library AA? - The current implementation uses runtime type information (TypeInfo) to compute hashes and compare keys. That's at least 2 virtual

Re: Windows Universal/Store apps support

2015-05-29 Thread Paulo Pinto via Digitalmars-d-learn
On Friday, 29 May 2015 at 10:01:53 UTC, Rikki Cattermole wrote: On 29/05/2015 9:55 p.m., Paulo Pinto wrote: On Friday, 29 May 2015 at 07:41:14 UTC, Rikki Cattermole wrote: On 29/05/2015 7:03 p.m., Paulo Pinto wrote: On Friday, 29 May 2015 at 03:23:39 UTC, Rikki Cattermole wrote: On

Mutable reference for immutable AA

2015-05-29 Thread Jack Applegame via Digitalmars-d-learn
I need mutable storage for immutable associative array. Just create new immutable AA and store it for future passing it between threads/fibers. First attempt: just immutable AA immutable aa = [1:1, 2:1]; aa = [1:1, 2:1]; // fail, can't assign a new AA Second attempt: mutable AA with immutable

Re: Mutable reference for immutable AA

2015-05-29 Thread Jack Applegame via Digitalmars-d-learn
I made trivial pull request - https://github.com/D-Programming-Language/phobos/pull/3341 RebindableAA!(immutable int[string]) aa = [a: 1, b: 2]; // works assert(aa[a] == 1); // cool aa = [a: 3, b: 4]; // nice auto bb = aa; // yes bb = [a: 4, b: 5]; // super aa[a] = 2; //

Re: Why aren't you using D at work?

2015-05-29 Thread Chris via Digitalmars-d
On Friday, 29 May 2015 at 10:40:22 UTC, Ola Fosheim Grøstad wrote: On Thursday, 28 May 2015 at 14:38:51 UTC, Manu wrote: The trick is getting something (anything) to shift to D in the office, giving other programmers some exposure, and give us a context to experiment with D in application to

Re: Why aren't you using D at work?

2015-05-29 Thread rumbu via Digitalmars-d
On Friday, 29 May 2015 at 09:22:56 UTC, Martin Nowak wrote: On Thursday, 28 May 2015 at 20:22:44 UTC, rumbu wrote: - lack of a decimal data type - you cannot perform monetary calculation using floating point. http://dlang.org/phobos/std_bigint.html? No. There is no scale in BigInt. 1 / 2

Re: Windows Universal/Store apps support

2015-05-29 Thread Rikki Cattermole via Digitalmars-d-learn
On 29/05/2015 9:55 p.m., Paulo Pinto wrote: On Friday, 29 May 2015 at 07:41:14 UTC, Rikki Cattermole wrote: On 29/05/2015 7:03 p.m., Paulo Pinto wrote: On Friday, 29 May 2015 at 03:23:39 UTC, Rikki Cattermole wrote: On 29/05/2015 3:57 a.m., Olivier Prince wrote: I searched the forum to find

Re: Why aren't you using D at work?

2015-05-29 Thread Paulo Pinto via Digitalmars-d
On Friday, 29 May 2015 at 09:33:25 UTC, Kagamin wrote: On Thursday, 28 May 2015 at 14:38:51 UTC, Manu wrote: I expect I'm not alone. Please share the absolute blockers preventing you from adopting D in your offices. I wonder if there will be common themes emerge? If you're interested in

Re: Why aren't you using D at work?

2015-05-29 Thread Chris via Digitalmars-d
On Friday, 29 May 2015 at 10:05:08 UTC, Paulo Pinto wrote: On Friday, 29 May 2015 at 09:33:25 UTC, Kagamin wrote: On Thursday, 28 May 2015 at 14:38:51 UTC, Manu wrote: I expect I'm not alone. Please share the absolute blockers preventing you from adopting D in your offices. I wonder if there

Re: Proof of concept - library AA

2015-05-29 Thread Mike via Digitalmars-d
On Sunday, 24 May 2015 at 14:13:26 UTC, Martin Nowak wrote: Would be interesting to get some opinions on this. https://github.com/D-Programming-Language/druntime/pull/1282 For my own reasons, a library AA is most welcome: * separating library features from language features * making features

Re: Proof of concept - library AA

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Wednesday, 27 May 2015 at 17:16:53 UTC, IgorStepanov wrote: Foo f; f[5][3] = Foo(42); translates to f.opIndex!(true)(5).opIndex!(true)(3) = Foo(42); auto x = f[5][4]; translates to auto x = f.opIndex!(false)(5).opIndex!(false)(3); We shouldn't replace opIndexAssign though, b/c

Re: DMD Symbol Reference Analysis Pass

2015-05-29 Thread via Digitalmars-d
On Friday, 29 May 2015 at 08:48:59 UTC, Martin Nowak wrote: https://github.com/D-Programming-Language/phobos/pull/2794? That's a massive discussion. Is it possible to describe in shorter terms what the problem is and how it relates to byLine? Please.

Re: Why aren't you using D at work?

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Thursday, 28 May 2015 at 14:38:51 UTC, Manu wrote: I expect I'm not alone. Please share the absolute blockers preventing you from adopting D in your offices. I wonder if there will be common themes emerge? - Quality of ecosystem. It's relatively simple to run into an issue, that requires

Re: DMD Symbol Reference Analysis Pass

2015-05-29 Thread via Digitalmars-d
On Friday, 29 May 2015 at 09:17:17 UTC, Per Nordlöw wrote: That's a massive discussion. Is it possible to describe in shorter terms what the problem is and how it relates to byLine? Would the problem be solved if `byLine` was changed to not use `readln()`?

Re: is there any reason to use SuperFastHash in druntime? (except speed)

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Thursday, 28 May 2015 at 03:09:07 UTC, ketmar wrote: i think that there is some sense in trading some speed for better distribution. what do you think? We discussed most part of this already. http://forum.dlang.org/post/mff4id$hj8$1...@digitalmars.com And we're already using MurmurHash3

RE: Why aren't you using D at work?

2015-05-29 Thread Daniel Kozák via Digitalmars-d
We use D in our work a little. And we dont using it more because we do not need to ;). We have a quite big php codebase and bacause od facebook(hhvm) our code is fast enought. - Původní zpráva - Od:Manu via Digitalmars-d digitalmars-d@puremagic.com Odesláno:‎28. ‎5. ‎2015 16:40

Re: Why aren't you using D at work?

2015-05-29 Thread weaselcat via Digitalmars-d
On Friday, 29 May 2015 at 08:57:46 UTC, Martin Nowak wrote: On Thursday, 28 May 2015 at 17:22:21 UTC, Andrei Alexandrescu wrote: On 5/28/15 8:38 AM, Manu via Digitalmars-d wrote: * Forceinline. Thanks for initiating this! The lack of a means to force inlining has been unpleasant at Facebook

[Issue 9279] [REG2.055/2.063] Static array return value implicitly converted to immutable dynamic array

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9279 --- Comment #8 from Vladimir Panteleev thecybersha...@gmail.com --- (In reply to Kenji Hara from comment #7) I'm not sure it should be called regression. Yes, the two enhancement PRs appended the cases of original wrong-code bug, caused by the

Re: Windows Universal/Store apps support

2015-05-29 Thread Olivier Prince via Digitalmars-d-learn
On Friday, 29 May 2015 at 03:23:39 UTC, Rikki Cattermole wrote: On 29/05/2015 3:57 a.m., Olivier Prince wrote: I searched the forum to find if there is some support for new Windows development technologies and I didn't find anything related (except some rants about WinRT 3 years ago). - Is

Re: Why aren't you using D at work?

2015-05-29 Thread via Digitalmars-d
On Thursday, 28 May 2015 at 14:38:51 UTC, Manu wrote: The trick is getting something (anything) to shift to D in the office, giving other programmers some exposure, and give us a context to experiment with D in application to our particular workload; that is, realtime processing and rendering

Re: shared libs for OSX

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Wednesday, 27 May 2015 at 21:24:25 UTC, bitwise wrote: Basically, I've gone back to the idea of using the dylib ctor/dtors. I don't think we really even need the image-added callback, at least not for dylibs. Looks good. The compiler could add a simple ctor/dtor to any D object.

Re: Why aren't you using D at work?

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Thursday, 28 May 2015 at 20:22:44 UTC, rumbu wrote: - lack of a decimal data type - you cannot perform monetary calculation using floating point. http://dlang.org/phobos/std_bigint.html? - lack of a chinese or japanese calendar in the std.datetime module; - missing of overflow checks for

RE: is there any reason to use SuperFastHash in druntime? (exceptspeed)

2015-05-29 Thread Daniel Kozák via Digitalmars-d
A little bit faster than murnurhash3 in my scenerio. But I prefer farmhash. http://code.google.com/p/farmhash/ - Původní zpráva - Od:Martin Nowak via Digitalmars-d digitalmars-d@puremagic.com Odesláno:‎29. ‎5. ‎2015 11:41 Komu:digitalmars-d@puremagic.com digitalmars-d@puremagic.com

Re: Windows Universal/Store apps support

2015-05-29 Thread Paulo Pinto via Digitalmars-d-learn
On Friday, 29 May 2015 at 07:41:14 UTC, Rikki Cattermole wrote: On 29/05/2015 7:03 p.m., Paulo Pinto wrote: On Friday, 29 May 2015 at 03:23:39 UTC, Rikki Cattermole wrote: On 29/05/2015 3:57 a.m., Olivier Prince wrote: I searched the forum to find if there is some support for new Windows

[Issue 9279] [REG2.055/2.063] Static array return value implicitly converted to immutable dynamic array

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9279 --- Comment #9 from Kenji Hara k.hara...@gmail.com --- (In reply to Vladimir Panteleev from comment #8) You can call it whatever you like, but ultimately the effect is that something works as expected in version N and then doesn't in version N+1.

Re: Why aren't you using D at work?

2015-05-29 Thread ixid via Digitalmars-d
On Thursday, 28 May 2015 at 17:22:21 UTC, Andrei Alexandrescu wrote: On 5/28/15 8:38 AM, Manu via Digitalmars-d wrote: * Forceinline. Thanks for initiating this! The lack of a means to force inlining has been unpleasant at Facebook as well. It would be great if we got this (and of course

[Issue 14614] PDB File Not Generated

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14614 Vladimir Panteleev thecybersha...@gmail.com changed: What|Removed |Added CC|

Re: Why aren't you using D at work?

2015-05-29 Thread Kagamin via Digitalmars-d
On Thursday, 28 May 2015 at 14:38:51 UTC, Manu wrote: I expect I'm not alone. Please share the absolute blockers preventing you from adopting D in your offices. I wonder if there will be common themes emerge? If you're interested in enterprise point of view, our ecosystem is build around

[Issue 9279] [REG2.055/2.063] Static array return value implicitly converted to immutable dynamic array

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9279 --- Comment #7 from Kenji Hara k.hara...@gmail.com --- (In reply to Vladimir Panteleev from comment #6) (In reply to Vladimir Panteleev from comment #2) I guess that makes it a regression. I'm not sure it should be called regression. Yes, the two

Re: Why aren't you using D at work?

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Friday, 29 May 2015 at 09:50:29 UTC, weaselcat wrote: Walter said likely/unlikely won't be implemented as the compiler already assumes the first condition is the more likely one the last time this was brought up. That is not what he said

Re: Why aren't you using D at work?

2015-05-29 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-29 11:48, Daniel Kozák via Digitalmars-d wrote: We use D in our work a little. And we dont using it more because we do not need to ;). We have a quite big php codebase and bacause od facebook(hhvm) our code is fast enought. You're using PHP? Then that's reason enough to switch :)

Re: sockaddr_in and InternetAddress

2015-05-29 Thread Andre Kostur via Digitalmars-d
On 2015-05-28 11:10 PM, Vladimir Panteleev wrote: On Friday, 29 May 2015 at 00:08:10 UTC, Andre Kostur wrote: I'm looking for one of two things: 1) If I have a sockaddr_in, how do I get it into an InternetAddress? First of all, you may not actually need an InternetAddress. Modern code

Re: Proof of concept - library AA

2015-05-29 Thread IgorStepanov via Digitalmars-d
On Friday, 29 May 2015 at 12:52:29 UTC, Martin Nowak wrote: On Friday, 29 May 2015 at 11:22:53 UTC, IgorStepanov wrote: Sorry, I meant f.opIndex!(true)(5).opIndexAssign(Foo(42), 3); Added to the ER. https://issues.dlang.org/show_bug.cgi?id=7753#c6 Thanks, but unfortunately, writing

[Issue 9279] [REG2.055/2.063] Static array return value implicitly converted to immutable dynamic array

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9279 Kenji Hara k.hara...@gmail.com changed: What|Removed |Added Keywords||pull --- Comment #10 from

Re: shared libs for OSX

2015-05-29 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-27 23:24, bitwise wrote: Good point. I've come up another solution and posted it here: http://dpaste.com/0DXBSNQ Will dladdr return different values (mach_header) for different dynamic libraries? Won't there only be one init function, as you said earlier. Or does it work somehow

Re: Why aren't you using D at work?

2015-05-29 Thread Chris via Digitalmars-d
On Friday, 29 May 2015 at 12:23:14 UTC, rumbu wrote: On Friday, 29 May 2015 at 09:22:56 UTC, Martin Nowak wrote: On Thursday, 28 May 2015 at 20:22:44 UTC, rumbu wrote: - lack of a decimal data type - you cannot perform monetary calculation using floating point.

Re: As discussed in DConf2015: Python-like keyword arguments

2015-05-29 Thread Michael Coulombe via Digitalmars-d
I know some people don't like abusing opDollar, but here's my implementation: import std.traits, std.algorithm, std.conv; private struct Named(string n, T) { enum name = n; T value; } private auto makeNameIndex(NamedList...)(string[] names) { auto indices = new

Re: As discussed in DConf2015: Python-like keyword arguments

2015-05-29 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-29 00:35, Atila Neves wrote: I might do a blog post on this, but here's some POC code: import std.stdio; import std.range; import std.typetuple; import std.traits; import std.conv; struct Foo { int i; } struct Bar { int i; } struct Baz { int i; } void func(Foo foo, Bar bar, Baz

Re: Why aren't you using D at work?

2015-05-29 Thread Jacob Carlborg via Digitalmars-d
On 2015-05-28 22:22, rumbu wrote: - lack of a chinese or japanese calendar in the std.datetime module; What about Tango [1]? [1] http://dsource.org/projects/tango/docs/current/tango.time.chrono.Japanese.html -- /Jacob Carlborg

Re: Proof of concept - library AA

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Friday, 29 May 2015 at 11:22:53 UTC, IgorStepanov wrote: Sorry, I meant f.opIndex!(true)(5).opIndexAssign(Foo(42), 3); Added to the ER. https://issues.dlang.org/show_bug.cgi?id=7753#c6

Re: drastic slowdown for copies

2015-05-29 Thread Momo via Digitalmars-d-learn
Perhaps you can give me another detailed answer. I get a slowdown for all parts (ref, copy and move) if I use uninitialized floats. I got these results from the following code: by ref: 2369 by copy: 2335 by move: 2341 Code: struct vec2f { float x; float y; } But if I assign 0 to

Re: Why aren't you using D at work?

2015-05-29 Thread rumbu via Digitalmars-d
On Friday, 29 May 2015 at 12:52:12 UTC, Jacob Carlborg wrote: On 2015-05-28 22:22, rumbu wrote: - lack of a chinese or japanese calendar in the std.datetime module; What about Tango [1]? [1] http://dsource.org/projects/tango/docs/current/tango.time.chrono.Japanese.html The Japanese

Re: Why aren't you using D at work?

2015-05-29 Thread via Digitalmars-d
On Friday, 29 May 2015 at 11:29:13 UTC, Chris wrote: This is very interesting. It kinda defeats the D is too complicated argument I often hear. I don't know what is typical, but I am dealing with Python, Javascript, Dart, C++ and Objective-C for commercial use, and plan on adding Swift.

Re: Get index of string in array at compile time

2015-05-29 Thread Timon Gehr via Digitalmars-d-learn
On 05/29/2015 06:43 PM, tcak wrote: I have define an immutable string array: [code] immutable string[] placeHolderDefinitionList = [ !-- fullname --, !-- list item -- ]; [/code] I need to get index of a string at compile time. So I have written a function as below: [code] public

Re: shared libs for OSX

2015-05-29 Thread bitwise via Digitalmars-d
On Friday, 29 May 2015 at 12:46:43 UTC, Jacob Carlborg wrote: On 2015-05-27 23:24, bitwise wrote: Good point. I've come up another solution and posted it here: http://dpaste.com/0DXBSNQ Will dladdr return different values (mach_header) for different dynamic libraries? Won't there only be

Re: Why aren't you using D at work?

2015-05-29 Thread Jesse Phillips via Digitalmars-d
On Thursday, 28 May 2015 at 14:38:51 UTC, Manu wrote: I expect I'm not alone. Please share the absolute blockers preventing you from adopting D in your offices. I wonder if there will be common themes emerge? I do use it at work, but I also don't really have a collaborative codebase. These

Re: Laptop volunteer wanted for tomorrows live-stream

2015-05-29 Thread Ali Çehreli via Digitalmars-d-announce
On 05/29/2015 08:04 AM, Dicebot wrote: https://www.youtube.com/watch?v=oA1exjdEIWw Yay! :D Ali

Get index of string in array at compile time

2015-05-29 Thread tcak via Digitalmars-d-learn
I have define an immutable string array: [code] immutable string[] placeHolderDefinitionList = [ !-- fullname --, !-- list item -- ]; [/code] I need to get index of a string at compile time. So I have written a function as below: [code] public size_t

Re: Why aren't you using D at work?

2015-05-29 Thread via Digitalmars-d
On Friday, 29 May 2015 at 14:22:58 UTC, Chris wrote: However, for a constantly growing long-term code base, D is my language of choice. It's clean (i.e. maintainable), flexible (many ways to tackle new problems), easily unit-testable and, of course, compiles to native machine code. It also

Re: Laptop volunteer wanted for tomorrows live-stream

2015-05-29 Thread Dicebot via Digitalmars-d-announce
https://www.youtube.com/watch?v=oA1exjdEIWw

Re: DConf 2015 day 2 is livestreaming

2015-05-29 Thread Dicebot via Digitalmars-d-announce
On Thursday, 28 May 2015 at 15:02:45 UTC, Joseph Rushton Wakeling wrote: https://www.youtube.com/watch?v=AH35IxWkx8M :-) day 3 : https://www.youtube.com/watch?v=oA1exjdEIWw

Re: DIP78 - macros without syntax extensions

2015-05-29 Thread Kagamin via Digitalmars-d
On Thursday, 28 May 2015 at 13:34:24 UTC, Steven Schveighoffer wrote: Quote from dconf WA ask me anything: Q: Will we get a macro system Both Walter and Andrei: no It's safe to close the corresponding DIPs?

Re: As discussed in DConf2015: Python-like keyword arguments

2015-05-29 Thread Atila Neves via Digitalmars-d
On Thursday, 28 May 2015 at 22:35:14 UTC, Atila Neves wrote: I might do a blog post on this, but here's some POC code: Now with default values! import std.stdio; import std.range; import std.typetuple; import std.traits; import std.conv; struct Foo { int i; } struct Bar { int i; } struct

Re: Why aren't you using D at work?

2015-05-29 Thread Wyatt via Digitalmars-d
On Thursday, 28 May 2015 at 14:38:51 UTC, Manu wrote: I expect I'm not alone. Please share the absolute blockers preventing you from adopting D in your offices. If awareness of its existence weren't a problem, it wouldn't be a long list. Mostly SPARC/Solaris and Politics (including inertia

Re: Why aren't you using D at work?

2015-05-29 Thread Kagamin via Digitalmars-d
On Friday, 29 May 2015 at 13:45:56 UTC, rumbu wrote: Tahngo was nice but not supported anymore Two months ago it had an update that bumped tested version to 2.067.

Re: Why aren't you using D at work?

2015-05-29 Thread Chris via Digitalmars-d
On Friday, 29 May 2015 at 14:46:06 UTC, Ola Fosheim Grøstad wrote: On Friday, 29 May 2015 at 14:22:58 UTC, Chris wrote: However, for a constantly growing long-term code base, D is my language of choice. It's clean (i.e. maintainable), flexible (many ways to tackle new problems), easily

Re: Why aren't you using D at work?

2015-05-29 Thread Daniel Kozak via Digitalmars-d
On Friday, 29 May 2015 at 12:39:20 UTC, Jacob Carlborg wrote: On 2015-05-29 11:48, Daniel Kozák via Digitalmars-d wrote: We use D in our work a little. And we dont using it more because we do not need to ;). We have a quite big php codebase and bacause od facebook(hhvm) our code is fast

Re: As discussed in DConf2015: Python-like keyword arguments

2015-05-29 Thread Jonathan Crapuchettes via Digitalmars-d
Two other ways to implement the concept. The first works with optional arguments and the other requires all arguments. /** * Optional arguments and no default values; might not compile if all args * not passed. */ --- /**

Re: As discussed in DConf2015: Python-like keyword arguments

2015-05-29 Thread Liran Zvibel via Digitalmars-d
On Friday, 29 May 2015 at 15:16:56 UTC, Jonathan Crapuchettes wrote: Two other ways to implement the concept. The first works with optional arguments and the other requires all arguments. unittest { alias arg1 = namedArguments!(arg1, string); alias arg2 = namedArguments!(arg2, int);

Re: Proof of concept - library AA

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Friday, 29 May 2015 at 13:12:58 UTC, IgorStepanov wrote: Thanks, but unfortunately, writing enhacement request to bugzilla is equals to writing to /dev/null :) No it's not, it keeps us from rediscussing the same stuff over and over. I'll create a DIP about this, when I'll have a free

Re: Why aren't you using D at work?

2015-05-29 Thread weaselcat via Digitalmars-d
On Friday, 29 May 2015 at 10:32:50 UTC, Martin Nowak wrote: On Friday, 29 May 2015 at 09:50:29 UTC, weaselcat wrote: Walter said likely/unlikely won't be implemented as the compiler already assumes the first condition is the more likely one the last time this was brought up. That is not what

Re: Proof of concept - library AA

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Friday, 29 May 2015 at 13:12:58 UTC, IgorStepanov wrote: What do you want about this syntax? Maybe you may suggest a better solution? The discussion drifts a little OT, if we have opIndexCreate, then the library AA can be more compatible, but it still won't be a drop-in replacement.

[Issue 7753] Support opIndexCreate as part of index operator overloading in user-defined types

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=7753 --- Comment #7 from Martin Nowak c...@dawg.eu --- (In reply to Martin Nowak from comment #6) Igor Stepanov suggested [¹] an opIndex extension. ref Foo opIndex(bool lvalue)(size_t idx) A separate opIndexCreate might be better, b/c it allows you to

dmd makes D appear slow

2015-05-29 Thread weaselcat via Digitalmars-d
In nearly every benchmark I see D in, the default compiler used is dmd which runs computationally intense tasks 4-5x+ slower than GDC/LDC example of a random blog post I found: http://vaskir.blogspot.com/2015/04/computing-cryptography-hashes-rust-vs-f.html D is up to 10x(!) slower than Rust.

Re: Windows Universal/Store apps support

2015-05-29 Thread Jesse Phillips via Digitalmars-d-learn
On Thursday, 28 May 2015 at 15:57:42 UTC, Olivier Prince wrote: I searched the forum to find if there is some support for new Windows development technologies and I didn't find anything related (except some rants about WinRT 3 years ago). - Is there any support in D or phobos for developping

Re: dmd makes D appear slow

2015-05-29 Thread Dicebot via Digitalmars-d
On Friday, 29 May 2015 at 18:38:20 UTC, H. S. Teoh wrote: This will probably offend some people, but I think LDC/GDC should be the default download on dlang.org, and dmd should be provided as an alternative for those who want the latest language version and don't mind the speed compromise.

Re: Proof of concept - library AA

2015-05-29 Thread Martin Nowak via Digitalmars-d
On Friday, 29 May 2015 at 21:58:16 UTC, IgorStepanov wrote: I suggest you to answer to the following two question: 1. What way to transit to the new AA would be acceptable? One that doesn't break any code, carefully deprecates necessary semantic changes, and provides an improved

Re: dmd makes D appear slow

2015-05-29 Thread ketmar via Digitalmars-d
On Fri, 29 May 2015 11:58:09 -0700, H. S. Teoh via Digitalmars-d wrote: On Fri, May 29, 2015 at 06:50:02PM +, Dicebot via Digitalmars-d wrote: On Friday, 29 May 2015 at 18:38:20 UTC, H. S. Teoh wrote: This will probably offend some people, but I think LDC/GDC should be the default

Re: dmd makes D appear slow

2015-05-29 Thread ketmar via Digitalmars-d
On Fri, 29 May 2015 23:29:39 +, weaselcat wrote: On Friday, 29 May 2015 at 23:19:36 UTC, ketmar wrote: On Fri, 29 May 2015 20:02:47 +, Martin Krejcirik wrote: dmd - reference compiler, Digital Mars backend - best for latest dlang features, fast compile times gdc - GNU

Re: dlang.org build broken

2015-05-29 Thread Steven Schveighoffer via Digitalmars-d
On 5/29/15 3:35 PM, Andrei Alexandrescu wrote: Folks, looks like there are multiple breakages in the Phobos documentation build for dlang.org. Could someone look into this pronto? -- Andrei I'm working on the UnixAddress issues, will have a PR after I verify it passes the normal tests.

Re: dlang.org build broken

2015-05-29 Thread Steven Schveighoffer via Digitalmars-d
On 5/29/15 3:47 PM, Steven Schveighoffer wrote: On 5/29/15 3:35 PM, Andrei Alexandrescu wrote: Folks, looks like there are multiple breakages in the Phobos documentation build for dlang.org. Could someone look into this pronto? -- Andrei I'm working on the UnixAddress issues, will have a PR

Re: dlang.org build broken

2015-05-29 Thread H. S. Teoh via Digitalmars-d
On Fri, May 29, 2015 at 03:56:43PM -0600, Steven Schveighoffer via Digitalmars-d wrote: On 5/29/15 3:47 PM, Steven Schveighoffer wrote: On 5/29/15 3:35 PM, Andrei Alexandrescu wrote: Folks, looks like there are multiple breakages in the Phobos documentation build for dlang.org. Could someone

Re: DConf 2015 has ended. See you in Berlin at DConf 2016!

2015-05-29 Thread Dennis Ritchie via Digitalmars-d-announce
On Friday, 29 May 2015 at 23:42:00 UTC, Andrei Alexandrescu wrote: DConf 2015 has been awesome, I'm taking a minute to post this that's been announced a short while ago. We're pleased to announce that DConf 2016 will take place in Berlin, sponsored by Sociomantic. We'll be back with

Re: DConf 2015 has ended. See you in Berlin at DConf 2016!

2015-05-29 Thread Andre Kostur via Digitalmars-d-announce
On 2015-05-29 5:42 PM, Andrei Alexandrescu wrote: DConf 2015 has been awesome, I'm taking a minute to post this that's been announced a short while ago. We're pleased to announce that DConf 2016 will take place in Berlin, sponsored by Sociomantic. We'll be back with details. See you there!

[Issue 14631] New: Hide deprecated modules

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14631 Issue ID: 14631 Summary: Hide deprecated modules Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P1

Re: Proof of concept - library AA

2015-05-29 Thread IgorStepanov via Digitalmars-d
On Friday, 29 May 2015 at 17:52:58 UTC, Martin Nowak wrote: On Friday, 29 May 2015 at 13:12:58 UTC, IgorStepanov wrote: What do you want about this syntax? Maybe you may suggest a better solution? The discussion drifts a little OT, if we have opIndexCreate, then the library AA can be more

[Issue 13015] std.json.JSONValue's toString is not const

2015-05-29 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13015 Brad Roberts bra...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

Re: dlang.org build broken

2015-05-29 Thread Brad Roberts via Digitalmars-d
On 5/29/15 4:02 PM, Andrei Alexandrescu via Digitalmars-d wrote: On 5/29/15 3:56 PM, Steven Schveighoffer wrote: PR: https://github.com/D-Programming-Language/phobos/pull/3344 And BTW, how can we get the ddoc build to be part of the auto tester? It's kind of important. Luckily, it's only

Re: is there any reason to use SuperFastHash in druntime? (except speed)

2015-05-29 Thread ketmar via Digitalmars-d
On Fri, 29 May 2015 09:36:22 +, Martin Nowak wrote: On Thursday, 28 May 2015 at 03:09:07 UTC, ketmar wrote: i think that there is some sense in trading some speed for better distribution. what do you think? We discussed most part of this already.

  1   2   >