Re: Adding pointers to GC with destructers

2015-04-20 Thread Ali Çehreli via Digitalmars-d-learn
On 04/20/2015 02:48 PM, Freddy wrote: On Monday, 20 April 2015 at 02:56:35 UTC, Ali Çehreli wrote: Not automatically. Check out addRange and addRoot: http://dlang.org/phobos/core_memory.html Ali The destructor doesn't seem to be running Sorry, I misunderstood you. You can use a RAII

[Issue 14462] cannot instantiate redBlackTree!int(); anymore

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14462 Martin Nowak c...@dawg.eu changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 14468] [Reg 2.068.0-devel] overload mismatch for template instance with typesafe variadic parameter

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14468 Martin Nowak c...@dawg.eu changed: What|Removed |Added CC||r.sagita...@gmx.de --- Comment

Re: Reuse object memory?

2015-04-20 Thread Ali Çehreli via Digitalmars-d-learn
On 04/20/2015 02:44 PM, Namespace wrote: Thank you. Do you mean this is worth a PR, to add this functionality to Phobos? I am not familiar with such a need so I don't have a strong opinion. However, if an object needs to be emplaced on top of an existing one, I can imagine that the original

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread rumbu via Digitalmars-d
On Monday, 20 April 2015 at 21:22:53 UTC, deadalnix wrote: On Monday, 20 April 2015 at 20:09:59 UTC, rumbu wrote: .. I fail to understand Atila example. Just to be sure: C#: var roleName = userManager.CurrentUser?.GetRole()?.Name; D (Jakob): auto roleName =

Re: Trial migration of Dsource bindings project to Github

2015-04-20 Thread Stewart Gordon via Digitalmars-d-announce
On 20/04/2015 00:37, Vladimir Panteleev wrote: On Sunday, 19 April 2015 at 23:14:13 UTC, Stewart Gordon wrote: For those of you who are still unfamiliar with GitHub, Stewart, I haven't seen an active D project that WASN'T hosted on GitHub for years now. That doesn't mean absolutely none of

Re: dsource.org moved

2015-04-20 Thread Stewart Gordon via Digitalmars-d-announce
On 20/04/2015 00:25, Vladimir Panteleev wrote: snip Even if he had, what would be the point? It would greatly slow down the whole process. We have SVN repositories so that people can just put their updates straight in, Only those who have access can do that. Getting patches into the bindings

Re: Excluding symbols

2015-04-20 Thread H. S. Teoh via Digitalmars-d
On Mon, Apr 20, 2015 at 09:00:34PM +, extrawurst via Digitalmars-d wrote: On Monday, 20 April 2015 at 20:36:06 UTC, ketmar wrote: On Mon, 20 Apr 2015 20:31:36 +, extrawurst wrote: static if(__ctfe){} small fix: simply `if (__ctfe)`, `static if (__ctfe)` is error. ;-) __ctfe is

Re: Reuse object memory?

2015-04-20 Thread Namespace via Digitalmars-d-learn
Thank you. Do you mean this is worth a PR, to add this functionality to Phobos? My current code looks like this: http://dpaste.dzfl.pl/19b78a600b6c

Re: Vectorization examples

2015-04-20 Thread Panke via Digitalmars-d
No that's not true. On modern x86 processors using unaligned loading instructions on aligned data does not incur additional overhead, therefore you can always use unaligned load for everything, but loading unaligned data is still slower than aligned data. Thanks for clarifying.

Re: SDC needs you -- redux

2015-04-20 Thread Brian Schott via Digitalmars-d
On Sunday, 19 April 2015 at 06:01:14 UTC, weaselcat wrote: gofmt, much like python's standardized formatting, made contributing to go projects much easier IMO. While the same can't be done for D, hopefully dfmt becomes a standard tool and each dub project can just include a dfmt.conf or

[Issue 14463] [REG2.067] DMD crashes compiling module level immutable struct that takes an array in ctor

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14463 Martin Krejcirik m...@krej.cz changed: What|Removed |Added CC||m...@krej.cz

Re: Trial migration of Dsource bindings project to Github

2015-04-20 Thread Vladimir Panteleev via Digitalmars-d-announce
On Monday, 20 April 2015 at 22:57:51 UTC, Stewart Gordon wrote: I committed some updates the other day and they seem they have gone straight into the online repository. Committing is a local (non-network) operation in git, so you must have pushed them afterwards, or your GUI has done this for

Re: Excluding symbols

2015-04-20 Thread Dicebot via Digitalmars-d
On Monday, 20 April 2015 at 20:04:04 UTC, Sönke Ludwig wrote: Am 20.04.2015 um 15:22 schrieb Etienne: I've been using a lot of CTFE in my libraries and this has had the side effect of increasing my link time beyond 13 seconds. There's a pretty big chunk of those symbols being exported that are

Re: dsource.org moved

2015-04-20 Thread Vladimir Panteleev via Digitalmars-d-announce
On Monday, 20 April 2015 at 23:27:58 UTC, Stewart Gordon wrote: On 21/04/2015 00:19, Stewart Gordon wrote: snip ?? When I worked on the project on dsource, until it stopped working recently I generally had no trouble just committing my updates using SVN. I didn't have to create patches at

[Issue 14474] New: Use UTF-8 encoding for @cmdfile

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14474 Issue ID: 14474 Summary: Use UTF-8 encoding for @cmdfile Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW Severity: normal Priority: P1

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread deadalnix via Digitalmars-d
On Monday, 20 April 2015 at 22:18:31 UTC, rumbu wrote: On Monday, 20 April 2015 at 21:22:53 UTC, deadalnix wrote: On Monday, 20 April 2015 at 20:09:59 UTC, rumbu wrote: .. I fail to understand Atila example. Just to be sure: C#: var roleName = userManager.CurrentUser?.GetRole()?.Name; D

Re: User defined properties signatures

2015-04-20 Thread dvic via Digitalmars-d-learn
On Monday, 20 April 2015 at 20:22:40 UTC, Jonathan M Davis wrote: On Monday, April 20, 2015 19:42:30 dvic via Digitalmars-d-learn wrote: Thanks for your answer Jonathan. But does the return type part of a method signature? I don't know what theory is claiming about that, but for me they are 2

Re: Adding pointers to GC with destructers

2015-04-20 Thread Freddy via Digitalmars-d-learn
On Monday, 20 April 2015 at 02:56:35 UTC, Ali Çehreli wrote: Not automatically. Check out addRange and addRoot: http://dlang.org/phobos/core_memory.html Ali The destructor doesn't seem to be running import std.stdio; import std.c.stdlib; import core.memory; struct Test{

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

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14431 --- Comment #9 from Martin Nowak c...@dawg.eu --- (In reply to Iain Buclaw from comment #8) Maybe the speculative devirtualization in gcc-4.9 is in some part responsible for that. Just thinking out loud... We should probably update the compilers

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread Ali Çehreli via Digitalmars-d
On 04/20/2015 03:18 PM, rumbu wrote: On Monday, 20 April 2015 at 21:22:53 UTC, deadalnix wrote: On Monday, 20 April 2015 at 20:09:59 UTC, rumbu wrote: .. I fail to understand Atila example. Just to be sure: C#: var roleName = userManager.CurrentUser?.GetRole()?.Name; D (Jakob): auto

Re: Vectorization examples

2015-04-20 Thread Walter Bright via Digitalmars-d
On 4/20/2015 1:09 PM, bearophile wrote: Walter Bright: Use arrays of double2, float4, int4, etc., declared in core.simd. Those will be aligned appropriately. Is the GC able to give memory aligned to 32 bytes for new architectures with 512 bits wide SIMD? When the CPU requires 32 byte

Re: Excluding symbols

2015-04-20 Thread ketmar via Digitalmars-d
On Mon, 20 Apr 2015 20:31:36 +, extrawurst wrote: static if(__ctfe){} small fix: simply `if (__ctfe)`, `static if (__ctfe)` is error. ;-) signature.asc Description: PGP signature

Re: Today's programming challenge - How's your Range-Fu ?

2015-04-20 Thread rumbu via Digitalmars-d
On Monday, 20 April 2015 at 19:24:01 UTC, Panke wrote: On Monday, 20 April 2015 at 18:03:50 UTC, John Colvin wrote: On Monday, 20 April 2015 at 17:48:17 UTC, Panke wrote: To measure the columns needed to print a string, you'll need the number of graphemes. (d|)?string.length gives you the

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread Daniel N via Digitalmars-d
On Monday, 20 April 2015 at 14:19:06 UTC, Meta wrote: On Monday, 20 April 2015 at 08:24:08 UTC, weaselcat wrote: http://www.reddit.com/r/programming/comments/335b1s/the_new_operator_in_c_6/ of interesting note was the nim sample on how to implement the same thing in nim in 2 lines of code

Re: Reuse object memory?

2015-04-20 Thread Ali Çehreli via Digitalmars-d-learn
On 04/20/2015 12:05 PM, Namespace wrote: I'm sorry if I annoy you Not at all! :) Sorry for not responding earlier. , but I would really like to know how you would reuse already instantiated storage of an existing object. Example code: final class Foo { uint id; @nogc

[Issue 14474] Use UTF-8 encoding for @cmdfile

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14474 --- Comment #1 from Dāvis davis...@gmail.com --- Created a quick PR https://github.com/D-Programming-Language/dmd/pull/4602 --

[Issue 14468] [Reg 2.068.0-devel] overload mismatch for template instance with typesafe variadic parameter

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14468 --- Comment #2 from Martin Nowak c...@dawg.eu --- Temporary workaround is to explicitly pass null as typesafe variadic argument. --

Re: [hackathon] One week left to the first D Hackathon!

2015-04-20 Thread Darkfeign via Digitalmars-d-announce
On Monday, 20 April 2015 at 12:17:13 UTC, Andrei Alexandrescu wrote: On 4/19/15 9:03 AM, ANtlord wrote: Good day! May be it is silly question, but I can't understand. Can I take a part in hackaton remotely? Yes! The hackathon is exclusively online and distributed! And second question. Will

Re: Duplicate another function's parameters in a template function

2015-04-20 Thread Tofu Ninja via Digitalmars-d-learn
On Monday, 20 April 2015 at 23:20:07 UTC, Justin Whear wrote: See std.functional.forward: http://dlang.org/phobos/std_functional.html#.forward Sweet beans, thanks

Re: dfmt 0.3.0

2015-04-20 Thread Idan Arye via Digitalmars-d-announce
On Monday, 20 April 2015 at 17:40:48 UTC, Brian Schott wrote: https://github.com/Hackerpilot/dfmt https://github.com/Hackerpilot/dfmt/releases/tag/v0.3.0 dfmt is a D source code formatter. Version 0.3.0 fixes several bugs and introduces the ability to place configuration options in your

Re: dfmt 0.3.0

2015-04-20 Thread Brian Schott via Digitalmars-d-announce
On Monday, 20 April 2015 at 20:59:43 UTC, Idan Arye wrote: Looks nice. BTW, it looks like the editorconfig format has something called Domain-Specific Properties I didn't use those because they're not standardized. Anything prefixed with dfmt_ is a domain-specific property. I'm also

Re: Reuse object memory?

2015-04-20 Thread Namespace via Digitalmars-d-learn
On Monday, 20 April 2015 at 21:58:59 UTC, Ali Çehreli wrote: On 04/20/2015 02:44 PM, Namespace wrote: Thank you. Do you mean this is worth a PR, to add this functionality to Phobos? I am not familiar with such a need so I don't have a strong opinion. However, if an object needs to be

Re: Adding pointers to GC with destructers

2015-04-20 Thread Freddy via Digitalmars-d-learn
On Monday, 20 April 2015 at 22:24:53 UTC, Ali Çehreli wrote: On 04/20/2015 02:48 PM, Freddy wrote: On Monday, 20 April 2015 at 02:56:35 UTC, Ali Çehreli wrote: Not automatically. Check out addRange and addRoot: http://dlang.org/phobos/core_memory.html Ali The destructor doesn't seem to be

Re: Duplicate another function's parameters in a template function

2015-04-20 Thread Justin Whear via Digitalmars-d-learn
On Mon, 20 Apr 2015 22:50:52 +, Tofu Ninja wrote: I am trying to write a template function that can take another function as an alias template argument and duplicate its parameters for it self. I tried.. auto pass(alias f, T...)(T t) { // other stuff... return f(t); } but

Re: Excluding symbols

2015-04-20 Thread extrawurst via Digitalmars-d
On Monday, 20 April 2015 at 13:22:15 UTC, Etienne wrote: I've been using a lot of CTFE in my libraries and this has had the side effect of increasing my link time beyond 13 seconds. There's a pretty big chunk of those symbols being exported that are used only for evaluating mixins. Would

Re: druntime unit test failures on FreeBSD

2015-04-20 Thread Dan Olson via Digitalmars-d
On Sunday, 19 April 2015 at 07:36:13 UTC, Jonathan M Davis wrote: I am consistently seeing this when I try and run druntime's unit tests on FreeBSD for either 2.067 or master: 0.000s PASS release64 object 0.000s PASS release64 core.atomic 0.008s PASS release64 core.bitop 0.000s PASS release64

Re: Excluding symbols

2015-04-20 Thread extrawurst via Digitalmars-d
On Monday, 20 April 2015 at 20:36:06 UTC, ketmar wrote: On Mon, 20 Apr 2015 20:31:36 +, extrawurst wrote: static if(__ctfe){} small fix: simply `if (__ctfe)`, `static if (__ctfe)` is error. ;-) __ctfe is not readable at compile time ? thats unfortunate..

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread deadalnix via Digitalmars-d
On Monday, 20 April 2015 at 20:09:59 UTC, rumbu wrote: On Monday, 20 April 2015 at 15:37:02 UTC, Atila Neves wrote: On Monday, 20 April 2015 at 12:16:21 UTC, Jakob Ovrum wrote: On Monday, 20 April 2015 at 08:24:08 UTC, weaselcat wrote:

Re: Excluding symbols

2015-04-20 Thread ketmar via Digitalmars-d
On Mon, 20 Apr 2015 21:00:34 +, extrawurst wrote: On Monday, 20 April 2015 at 20:36:06 UTC, ketmar wrote: On Mon, 20 Apr 2015 20:31:36 +, extrawurst wrote: static if(__ctfe){} small fix: simply `if (__ctfe)`, `static if (__ctfe)` is error. ;-) __ctfe is not readable at compile

Duplicate another function's parameters in a template function

2015-04-20 Thread Tofu Ninja via Digitalmars-d-learn
I am trying to write a template function that can take another function as an alias template argument and duplicate its parameters for it self. For example, something like this... void foo(ref int x){x = 7;} auto pass(alias f)(/* ??? */) { // other stuff... return f( /* ??? */ ); }

Re: [hackathon] One week left to the first D Hackathon!

2015-04-20 Thread Darkfeign via Digitalmars-d
On Monday, 20 April 2015 at 12:17:13 UTC, Andrei Alexandrescu wrote: On 4/19/15 9:03 AM, ANtlord wrote: Good day! May be it is silly question, but I can't understand. Can I take a part in hackaton remotely? Yes! The hackathon is exclusively online and distributed! And second question. Will

Re: dsource.org moved

2015-04-20 Thread Stewart Gordon via Digitalmars-d-announce
On 21/04/2015 00:19, Stewart Gordon wrote: snip ?? When I worked on the project on dsource, until it stopped working recently I generally had no trouble just committing my updates using SVN. I didn't have to create patches at all. As I understood it, neither did anybody else who helped out

[Issue 14475] New: man page is outdated

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14475 Issue ID: 14475 Summary: man page is outdated Product: D Version: unspecified Hardware: x86_64 OS: Linux Status: NEW Severity: trivial Priority: P1

Re: Valgrind

2015-04-20 Thread Vladimir Panteleev via Digitalmars-d-learn
On Monday, 20 April 2015 at 13:29:58 UTC, John Colvin wrote: On Monday, 20 April 2015 at 13:28:57 UTC, John Colvin wrote: On Monday, 20 April 2015 at 13:16:23 UTC, Robert M. Münch wrote: Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state

Re: Reading whitespace separated strings from stdin?

2015-04-20 Thread weaselcat via Digitalmars-d-learn
On Tuesday, 21 April 2015 at 01:31:58 UTC, TheGag96 wrote: Hi guys! I had this homework assignment for data structures that has a pretty easy solution in C++. Reading input like this... 1 2 3 # $ 4 3 * ! # 20 3 / # $ # 62 # $ 2 3 8 * + # 4 48 4 2 + / # SUM # $ 1 2 3 4 5 # R # @ ...where @

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread thedeemon via Digitalmars-d
On Tuesday, 21 April 2015 at 03:35:49 UTC, Vladimir Panteleev wrote: On Monday, 20 April 2015 at 12:16:21 UTC, Jakob Ovrum wrote: Mine: http://dump.thecybershadow.net/f8a172455ca239c35146f5dafdc7d1bc/test.d And we have a winner!

Reading whitespace separated strings from stdin?

2015-04-20 Thread TheGag96 via Digitalmars-d-learn
Hi guys! I had this homework assignment for data structures that has a pretty easy solution in C++. Reading input like this... 1 2 3 # $ 4 3 * ! # 20 3 / # $ # 62 # $ 2 3 8 * + # 4 48 4 2 + / # SUM # $ 1 2 3 4 5 # R # @ ...where @ denotes the end of input is fairly simple in C++: string token

Re: 64bit linking on Windows without Visual Studio

2015-04-20 Thread Joakim via Digitalmars-d
On Monday, 20 April 2015 at 18:26:16 UTC, Jeremiah DeHaan wrote: Oh, huh. For some reason I thought that DMD was doing its own code generation and only needed a linker for putting it all together. I didn't know that it needed another compiler to work. It looks like I have more to learn about the

Re: SDC needs you -- redux

2015-04-20 Thread Shammah Chancellor via Digitalmars-d
On 2015-04-20 22:40:10 +, Brian Schott said: On Sunday, 19 April 2015 at 06:01:14 UTC, weaselcat wrote: gofmt, much like python's standardized formatting, made contributing to go projects much easier IMO. While the same can't be done for D, hopefully dfmt becomes a standard tool and each

Re: SDC needs you -- redux

2015-04-20 Thread Shammah Chancellor via Digitalmars-d
On 2015-04-18 20:39:55 +, weaselcat said: On Saturday, 18 April 2015 at 17:21:28 UTC, Shammah Chancellor wrote: ... Are there any plans for the LDC and SDC team to work together once SDC matures? I have not had an opportunity to speak with them, but LDC is written in C++. But, I'm

Re: Valgrind

2015-04-20 Thread Nick B via Digitalmars-d-learn
On Monday, 20 April 2015 at 17:25:55 UTC, John Colvin wrote: On Monday, 20 April 2015 at 16:58:18 UTC, Robert M. Münch wrote: On 2015-04-20 13:29:57 +, John Colvin said: Were the causes ever analyzed? I'm a bit wondering why it happens on floating point stuff... valgrind doesn't

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread Vladimir Panteleev via Digitalmars-d
On Monday, 20 April 2015 at 12:16:21 UTC, Jakob Ovrum wrote: On Monday, 20 April 2015 at 08:24:08 UTC, weaselcat wrote: http://www.reddit.com/r/programming/comments/335b1s/the_new_operator_in_c_6/ of interesting note was the nim sample on how to implement the same thing in nim in 2 lines of

[Issue 13972] Make scoped, Unique, and RefCounted @nogc

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13972 --- Comment #6 from weaselcat r9shacklef...@gmail.com --- RefCounted almost done. https://github.com/D-Programming-Language/phobos/pull/3171 made it possible to make @nogc refcounted types, but destroy still doesn't infer attributes as per

Re: druntime unit test failures on FreeBSD

2015-04-20 Thread Jonathan M Davis via Digitalmars-d
On Monday, April 20, 2015 20:44:48 Dan Olson via Digitalmars-d wrote: On Sunday, 19 April 2015 at 07:36:13 UTC, Jonathan M Davis wrote: I am consistently seeing this when I try and run druntime's unit tests on FreeBSD for either 2.067 or master: 0.000s PASS release64 object 0.000s

Re: Reading whitespace separated strings from stdin?

2015-04-20 Thread Adam D. Ruppe via Digitalmars-d-learn
I think this should work: import std.stdio; void main() { string token; while(readf(%s , token)) writeln(token); } Have you tried that? What is wrong with it if you have?

Re: druntime unit test failures on FreeBSD

2015-04-20 Thread Jonathan M Davis via Digitalmars-d
On Monday, April 20, 2015 22:33:00 Brad Roberts via Digitalmars-d wrote: On 4/20/2015 10:24 PM, Jonathan M Davis via Digitalmars-d wrote: No idea whether that's related or not. But regardless, that does narrow down the problem some. Still, given how consistent it is on my box (I've _never_

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread JT via Digitalmars-d
On Monday, 20 April 2015 at 21:22:53 UTC, deadalnix wrote: ... maybe(userManager).CurrentUser.GetRole().Name ? ... Where can I find this maybe monad implementation?

Re: Reading whitespace separated strings from stdin?

2015-04-20 Thread TheGag96 via Digitalmars-d-learn
On Tuesday, 21 April 2015 at 01:46:53 UTC, Adam D. Ruppe wrote: I think this should work: import std.stdio; void main() { string token; while(readf(%s , token)) writeln(token); } Have you tried that? What is wrong with it if you have? It'll just leave some

Re: Reading whitespace separated strings from stdin?

2015-04-20 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 21 April 2015 at 02:04:24 UTC, TheGag96 wrote: It'll just leave some trailing whitespace, which I don't want. oh it also keeps the newlines attached. Blargh. Well, forget the D functions, just use the C functions: import core.stdc.stdio; void main() { char[16] token;

Re: Valgrind

2015-04-20 Thread Martin Nowak via Digitalmars-d-learn
On Monday, 20 April 2015 at 13:28:57 UTC, John Colvin wrote: The only special thing to take in to account is that valgrind will choke on DMD generated floating point code I actually fixed this problem a while ago. https://github.com/D-Programming-Language/dmd/pull/4368 An actual problem with

[Issue 14461] Header generation fails for definitions of string,wstring and dstring

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14461 --- Comment #2 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/be8f360dce82e5619625296183d74bb7d0e69892 Merge pull request #4594

Re: Valgrind

2015-04-20 Thread Brad Roberts via Digitalmars-d-learn
Valgrind has a mechanism for teaching it how to ignore certain patterns. A long time ago I setup suppressions for the gc, but the code has changed out from under that version so the work would need to be redone. On 4/20/2015 7:23 PM, Martin Nowak via Digitalmars-d-learn wrote: On Monday, 20

Re: Adding pointers to GC with destructers

2015-04-20 Thread Martin Nowak via Digitalmars-d-learn
On Sunday, 19 April 2015 at 23:38:49 UTC, Freddy wrote: C libraries have a pattern of HiddenType* getObj(); void freeObj(HiddenType*); Is there any way I can make the GC search for a HiddenType* and run freeObj when the pointer is not found. You can't turn an arbitrary pointer into

Re: This week in D #14: job opening, Silicon Valley meetup, Dsource on GitHub

2015-04-20 Thread Meta via Digitalmars-d-announce
On Monday, 20 April 2015 at 06:39:00 UTC, weaselcat wrote: On Monday, 20 April 2015 at 06:23:36 UTC, ketmar wrote: as Adam didn't post announce for current TWiD, i'll try to do that instead, as i like to see that announcements here. http://arsdnet.net/this-week-in-d/apr-19.html the notable

Re: druntime unit test failures on FreeBSD

2015-04-20 Thread Brad Roberts via Digitalmars-d
On 4/20/2015 10:24 PM, Jonathan M Davis via Digitalmars-d wrote: No idea whether that's related or not. But regardless, that does narrow down the problem some. Still, given how consistent it is on my box (I've _never_ seen it succeed on 2.067 or master), I really have to wonder what the

Re: Formatted output ranges

2015-04-20 Thread Dennis Ritchie via Digitalmars-d-learn
On Monday, 20 April 2015 at 17:16:21 UTC, Ivan Kazmenko wrote: writeln(wrap(a, 30, ;; , ;; )); Works with dmd 2.066.1 and 2.067.0. Thanks.

Re: Vectorization examples

2015-04-20 Thread bearophile via Digitalmars-d
Walter Bright: Use arrays of double2, float4, int4, etc., declared in core.simd. Those will be aligned appropriately. Is the GC able to give memory aligned to 32 bytes for new architectures with 512 bits wide SIMD? and a way to tell the type system that some array slices are fully

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread rumbu via Digitalmars-d
On Monday, 20 April 2015 at 15:37:02 UTC, Atila Neves wrote: On Monday, 20 April 2015 at 12:16:21 UTC, Jakob Ovrum wrote: On Monday, 20 April 2015 at 08:24:08 UTC, weaselcat wrote: http://www.reddit.com/r/programming/comments/335b1s/the_new_operator_in_c_6/ of interesting note was the nim

Re: User defined properties signatures

2015-04-20 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, April 20, 2015 19:42:30 dvic via Digitalmars-d-learn wrote: Thanks for your answer Jonathan. But does the return type part of a method signature? I don't know what theory is claiming about that, but for me they are 2 different methods. So contextually, the best fit should prevail.

Re: [hackathon] One week left to the first D Hackathon!

2015-04-20 Thread Andrei Alexandrescu via Digitalmars-d
On 4/19/15 9:03 AM, ANtlord wrote: Good day! May be it is silly question, but I can't understand. Can I take a part in hackaton remotely? Yes! The hackathon is exclusively online and distributed! And second question. Will hackaton's projects be published? It's the choice of each author! My

Valgrind

2015-04-20 Thread Robert M. Münch via Digitalmars-d-learn
Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take into account. Thanks a lot. -- Robert M. Münch http://www.saphirion.com smarter | better | faster

Re: Valgrind

2015-04-20 Thread John Colvin via Digitalmars-d-learn
On Monday, 20 April 2015 at 13:28:57 UTC, John Colvin wrote: On Monday, 20 April 2015 at 13:16:23 UTC, Robert M. Münch wrote: Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take

Re: Valgrind

2015-04-20 Thread John Colvin via Digitalmars-d-learn
On Monday, 20 April 2015 at 13:16:23 UTC, Robert M. Münch wrote: Hi, I just found quite old posts about Valgrind and D. Can someone give me a short update, what the state of support for D is and if there is anythings special to take into account. Thanks a lot. The only special thing to take

[Issue 14432] move construction for RefCounted

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14432 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/a6a6870beb69537f2ccd3d50289594ebae30ad15 fix Issue 14432 -

Re: build vibe-d-0.7.23 error on win7 x86?

2015-04-20 Thread Etienne via Digitalmars-d-learn
On Monday, 20 April 2015 at 07:58:40 UTC, mzf wrote: win 7 x86,3GB ram: 1. dmd 2.066 vibe-d-0.7.23, it's ok. 2. dmd 2.067 vibe-d-0.7.23, show error msg out of memory why? http://forum.dlang.org/thread/mghqlf$10l2$1...@digitalmars.com#post-ybrtcxrcmrrsoaaksdbj:40forum.dlang.org

Re: [hackathon] One week left to the first D Hackathon!

2015-04-20 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 4/19/15 9:03 AM, ANtlord wrote: Good day! May be it is silly question, but I can't understand. Can I take a part in hackaton remotely? Yes! The hackathon is exclusively online and distributed! And second question. Will hackaton's projects be published? It's the choice of each author! My

[Issue 14467] arr.capacity sometimes erroneously returns 0

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14467 --- Comment #6 from Steven Schveighoffer schvei...@yahoo.com --- PR: https://github.com/D-Programming-Language/druntime/pull/1226 Note, the issue is strictly with the bits retrieved. The other aspects of the info block are correct, just the bits

Re: [OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread Jakob Ovrum via Digitalmars-d
On Monday, 20 April 2015 at 08:24:08 UTC, weaselcat wrote: http://www.reddit.com/r/programming/comments/335b1s/the_new_operator_in_c_6/ of interesting note was the nim sample on how to implement the same thing in nim in 2 lines of code template `?.`(a, b): expr = if a != nil: a.b else: nil

std.experimental.testing PR review

2015-04-20 Thread Atila Neves via Digitalmars-d
Original library: http://code.dlang.org/packages/unit-threaded PR: https://github.com/D-Programming-Language/phobos/pull/3207 It's my first Phobos PR, I tried reading the wiki and doing what's required but bear with me if I've screwed up somehow. I wasn't sure whether or not to split the PR.

[Issue 14418] D-style Variadic Function example does not compile

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14418 Gary Willoughby d...@nomad.so changed: What|Removed |Added Keywords||pull CC|

Re: SysTime.toISOExtString with timezone offset

2015-04-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 4/20/15 4:47 AM, Jonathan M Davis via Digitalmars-d-learn wrote: Perhaps, LocalTime should be changed so that it prints the time zone out (and just make it so that the lack of time zone is read in as local time rather than treating it that way in both directions), but that's not how it works

[Issue 14399] std.json cannot parse its own output for nan

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14399 bb.t...@gmx.com changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Excluding symbols

2015-04-20 Thread Etienne via Digitalmars-d
I've been using a lot of CTFE in my libraries and this has had the side effect of increasing my link time beyond 13 seconds. There's a pretty big chunk of those symbols being exported that are used only for evaluating mixins. Would there be a way to specify something in the lines of `extern

Re: Excluding symbols

2015-04-20 Thread ketmar via Digitalmars-d
On Mon, 20 Apr 2015 09:22:17 -0400, Etienne wrote: I've been using a lot of CTFE in my libraries and this has had the side effect of increasing my link time beyond 13 seconds. There's a pretty big chunk of those symbols being exported that are used only for evaluating mixins. Would there

[Issue 14432] move construction for RefCounted

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

Re: Vectorization examples

2015-04-20 Thread finalpatch via Digitalmars-d
On Monday, 20 April 2015 at 11:01:28 UTC, Panke wrote: On Monday, 20 April 2015 at 09:41:09 UTC, bearophile wrote: Utilizing the other 80% of your system's performance: Starting with Vectorization by Ulrich Drepper: https://www.youtube.com/watch?v=DXPfE2jGqg0 It shows two still missing parts

[Issue 14467] arr.capacity sometimes erroneously returns 0

2015-04-20 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14467 --- Comment #5 from Steven Schveighoffer schvei...@yahoo.com --- Thank you, that is indeed the root cause. I have to investigate why that change was made, as most of the lifetime.d assumes GC.query will get the correct block info. Doing a

Re: Excluding symbols

2015-04-20 Thread ketmar via Digitalmars-d
On Mon, 20 Apr 2015 13:34:47 +, ketmar wrote: On Mon, 20 Apr 2015 09:22:17 -0400, Etienne wrote: I've been using a lot of CTFE in my libraries and this has had the side effect of increasing my link time beyond 13 seconds. There's a pretty big chunk of those symbols being exported that

[OT] C# 6.0 ?. null propagation operator

2015-04-20 Thread weaselcat via Digitalmars-d
http://www.reddit.com/r/programming/comments/335b1s/the_new_operator_in_c_6/ of interesting note was the nim sample on how to implement the same thing in nim in 2 lines of code template `?.`(a, b): expr = if a != nil: a.b else: nil template `??`(a, b): expr = if a != nil: a else: b

Re: Today's programming challenge - How's your Range-Fu ?

2015-04-20 Thread Jacob Carlborg via Digitalmars-d
On 2015-04-20 08:04, Nick B wrote: Perhaps a new Unicode standard, could start that way as well ? https://xkcd.com/927/ -- /Jacob Carlborg

Re: D vs nim

2015-04-20 Thread bearophile via Digitalmars-d
Russel Winder: it is all part of guerilla marketing undertaken by anyone with anything to market. It's still not a correct behavour, regardless how many do it. Bye, bearophile

Re: Templates: Array slices not recognized

2015-04-20 Thread via Digitalmars-d-learn
On Monday, 20 April 2015 at 09:07:54 UTC, Chris wrote: On Saturday, 18 April 2015 at 17:59:19 UTC, ketmar wrote: On Sat, 18 Apr 2015 17:50:56 +, Chris wrote: Doh! You're right! My bad. However, this makes the function less generic, but it doesn't matter here. maybe `auto ref` can help

Re: Templates: Array slices not recognized

2015-04-20 Thread Chris via Digitalmars-d-learn
On Saturday, 18 April 2015 at 17:59:19 UTC, ketmar wrote: On Sat, 18 Apr 2015 17:50:56 +, Chris wrote: Doh! You're right! My bad. However, this makes the function less generic, but it doesn't matter here. maybe `auto ref` can help here? Yes, auto ref does the trick. I prefer it to

Re: Today's programming challenge - How's your Range-Fu ?

2015-04-20 Thread Chris via Digitalmars-d
On Saturday, 18 April 2015 at 17:04:54 UTC, Tobias Pankrath wrote: Isn't this solved commonly with a normalization pass? We should have a normalizeUTF() that can be inserted in a pipeline. Yes. Then the rest of Phobos doesn't need to mind these combining characters. -- Andrei I don't

Re: Trial migration of Dsource bindings project to Github

2015-04-20 Thread John Colvin via Digitalmars-d-announce
On Sunday, 19 April 2015 at 23:37:58 UTC, Vladimir Panteleev wrote: On Sunday, 19 April 2015 at 23:14:13 UTC, Stewart Gordon wrote: For those of you who are still unfamiliar with GitHub, Stewart, I haven't seen an active D project that WASN'T hosted on GitHub for years now. There's a few

Re: Templates: Array slices not recognized

2015-04-20 Thread ketmar via Digitalmars-d-learn
On Mon, 20 Apr 2015 10:14:25 +, Chris wrote: string a = bla; string b = blub; auto res = doSomething(a, b); If I didn't use auto ref or ref, string would get copied, wouldn't it? no, it wont -- not unless you'll append something to it. slicing arrays (and string is array too) will

Re: Request for testers: GDC-5.1 Release Candidate branched

2015-04-20 Thread Iain Buclaw via Digitalmars-d
On 19 April 2015 at 20:39, Brian via Digitalmars-d digitalmars-d@puremagic.com wrote: On Sunday, 19 April 2015 at 12:04:19 UTC, Stefan Frijters wrote: On Sunday, 19 April 2015 at 07:13:16 UTC, Iain Buclaw wrote: Hi, GCC-5.1 has hit RC, and so it's all rush again to get bug fixes in quick

Nissan recalls 76,000 Rogues

2015-04-20 Thread Allen Scott via Digitalmars-d-announce
Nissan has issued a recall of the 2014 model Rogue manufactured between June 11, 2013 and June 7, 2014 due to a problem with the fuel pump. In all, the recall affects 76,242 vehicles. According to the National Highway Traffic Safety Administration, the nickel plating on the fuel pump can come

Re: Input ranges

2015-04-20 Thread Jonathan M Davis via Digitalmars-d
On Monday, April 20, 2015 07:54:32 via Digitalmars-d wrote: Hi, I tried to learn about input ranges and got some anonymous advice http://forum.dlang.org/thread/dezlxxygufocmafvl...@forum.dlang.org , still the topic seems to warrant broader attention. The question is how pure input ranges

  1   2   >