[Issue 6004] std.range.unzip()

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6004 weaselcat r9shacklef...@gmail.com changed: What|Removed |Added CC||r9shacklef...@gmail.com

Re: Dynamic / resizable array type, and a crash problem

2015-05-14 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 14 May 2015 at 13:26:27 UTC, ivoras wrote: Is it resizable? You can append with the ~= operator and size down by slicing it. Apparently it doesn't even have an insert method: http://dlang.org/phobos/std_array.html . http://dlang.org/phobos/std_array.html#insertInPlace is the

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 14 May 2015 at 14:37:03 UTC, weaselcat wrote: On Thursday, 14 May 2015 at 14:33:13 UTC, Vladimir Panteleev wrote: http://wiki.dlang.org/Jobs I think EMSI is in Moscow, Idaho. Err, fixed.

[OT] Slogan for this Forum

2015-05-14 Thread Chris via Digitalmars-d
Arguing with an engineer is a lot like wrestling in the mud with a pig. After a few hours, you realize that he likes it. :-)

Re: Dynamic / resizable array type, and a crash problem

2015-05-14 Thread ivoras via Digitalmars-d-learn
On Thursday, 14 May 2015 at 12:46:48 UTC, Adam D. Ruppe wrote: I would just use a regular `string[]` array... Is it resizable? Somehow I didn't get that impression from the docs. Apparently it doesn't even have an insert method: http://dlang.org/phobos/std_array.html .

Re: Dynamic / resizable array type, and a crash problem

2015-05-14 Thread Namespace via Digitalmars-d-learn
On Thursday, 14 May 2015 at 13:26:27 UTC, ivoras wrote: On Thursday, 14 May 2015 at 12:46:48 UTC, Adam D. Ruppe wrote: I would just use a regular `string[]` array... Is it resizable? Somehow I didn't get that impression from the docs. Apparently it doesn't even have an insert method:

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Vladimir Panteleev via Digitalmars-d
On Thursday, 14 May 2015 at 14:02:38 UTC, Liran Zvibel wrote: On Wednesday, 13 May 2015 at 16:24:12 UTC, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted on the wiki? That would be a good idea generally though it opens

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread weaselcat via Digitalmars-d
On Thursday, 14 May 2015 at 14:33:13 UTC, Vladimir Panteleev wrote: On Thursday, 14 May 2015 at 14:02:38 UTC, Liran Zvibel wrote: On Wednesday, 13 May 2015 at 16:24:12 UTC, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted

Re: Let's improve D's exceptions

2015-05-14 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 14 May 2015 at 10:24:45 UTC, Ola Fosheim Grøstad wrote: Using alias like this makes code hard to read. Error types should be humanly deducible at the failure site. Perhaps, I don't hate it too much here though because the alias is fairly local. Without it, you'd probably write

Re: Let's improve D's exceptions

2015-05-14 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 14 May 2015 at 10:29:57 UTC, Kagamin wrote: Maybe also replace file name with ModuleInfo similar to how assert works? Those bug me because all it really wants from it is the name and then you need all the moduleinfo even in bare metal. Exception support requires some RTTI

Re: Breaking changes in Visual C++ 2015

2015-05-14 Thread Kagamin via Digitalmars-d
On Thursday, 14 May 2015 at 13:22:21 UTC, Chris wrote: However, the data comes from somewhere outside the program, and although you can IoC most parts of a program _after_ it's been fed the data, the initial input section is not easily unit tested (i.e. unit test in D). Gathering parts

Re: Let's improve D's exceptions

2015-05-14 Thread Kagamin via Digitalmars-d
On Thursday, 14 May 2015 at 12:39:59 UTC, Adam D. Ruppe wrote: On Thursday, 14 May 2015 at 10:29:57 UTC, Kagamin wrote: Maybe also replace file name with ModuleInfo similar to how assert works? Those bug me because all it really wants from it is the name and then you need all the moduleinfo

Dynamic / resizable array type, and a crash problem

2015-05-14 Thread ivoras via Digitalmars-d-learn
What is the recommended dynamic array type in D? So far I found Array (specifically Array!string, as I need a dynamic array of strings), but my example program crashes: https://gist.github.com/ivoras/2d7737c214c3dc937c28 The crash is at line 20:

Re: Let's improve D's exceptions

2015-05-14 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 14 May 2015 at 12:26:45 UTC, w0rp wrote: I wonder if enforce should throw an Error instead, if it exists at all. Because it's designed to throw an exception you shouldn't catch. Is it really? My thought of enforce was it iwas just a lazy way to throw on cases like file not

Re: Returning an empty range of a given type

2015-05-14 Thread rcorre via Digitalmars-d-learn
So I thought this might work: struct MaybeEmpty(R) if (isInputRange!R) { private bool _isEmpty; private R_input; alias _input this; this(bool isEmpty, R input) { _input = input; _isEmpty = isEmpty; } @property bool empty() { return _isEmpty || _input.empty; } }

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Liran Zvibel via Digitalmars-d
On Wednesday, 13 May 2015 at 16:24:12 UTC, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted on the wiki? That would be a good idea generally though it opens the site for vandalism. I'd say we start with a wiki page and

Re: D needs...

2015-05-14 Thread Jack Applegame via Digitalmars-d-announce
What about mutable references to immutable/shared/const classes? class A {} immutable(A)[int] aa; aa[1] = new immutable A;// doesn't compile Rebindable!(immutable(A))[int]; // looks like ugly shamefull workaround.

Re: Dynamic / resizable array type, and a crash problem

2015-05-14 Thread anonymous via Digitalmars-d-learn
On Thursday, 14 May 2015 at 12:42:01 UTC, ivoras wrote: https://gist.github.com/ivoras/2d7737c214c3dc937c28 The crash is at line 20: core.exception.AssertError@/usr/include/dmd/phobos/std/container/array.d(334): [...] This is on DMD32 D Compiler v2.067.1 Seems to be fixed in git head.

Re: Let's improve D's exceptions

2015-05-14 Thread w0rp via Digitalmars-d
I wonder if enforce should throw an Error instead, if it exists at all. Because it's designed to throw an exception you shouldn't catch. If you are going to have it throw an Exception subclass, then it should take the exception type, like enforce!WhateverException(...), or something.

Re: Let's improve D's exceptions

2015-05-14 Thread Adam D. Ruppe via Digitalmars-d
On Thursday, 14 May 2015 at 10:08:36 UTC, Jacob Carlborg wrote: It was a while since I looked at that DIP, but I'm mostly interested in the hierarchy. I think hierarchies will get better too if there were more incentive to use them - data members instead of string concat encourages new

Re: Dynamic / resizable array type, and a crash problem

2015-05-14 Thread Adam D. Ruppe via Digitalmars-d-learn
I would just use a regular `string[]` array...

Re: Breaking changes in Visual C++ 2015

2015-05-14 Thread Chris via Digitalmars-d
On Wednesday, 13 May 2015 at 08:26:35 UTC, Kagamin wrote: On Monday, 11 May 2015 at 09:31:34 UTC, Chris wrote: Hm, I was thinking of something like that, however, it gets more and more complicated if you have e.g. a class that uses another class etc. class Data // A singleton { // stores

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Andrei Alexandrescu via Digitalmars-d
On 5/14/15 7:02 AM, Liran Zvibel wrote: On Wednesday, 13 May 2015 at 16:24:12 UTC, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted on the wiki? That would be a good idea generally though it opens the site for vandalism.

[Issue 14582] bigEndianToNative buffer slice allows only literals

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

Re: rvalue references

2015-05-14 Thread bitwise via Digitalmars-d
On Thu, 14 May 2015 02:56:46 -0400, Namespace rswhi...@gmail.com wrote: On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote: Side note: DIP36 seems to be missing the table with the authors, status, etc. Bit Huh, DIP36? DIP36 was rejected, but the authors (me and Dicebot) are

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Walter Bright via Digitalmars-d
On 5/13/2015 9:24 AM, Andrei Alexandrescu wrote: On 5/13/15 8:26 AM, Vladimir Panteleev wrote: So do we want a front page widget that's hosted on the wiki? That would be a good idea generally though it opens the site for vandalism. I'd say we start with a wiki page and work from there. --

Re: Cannot Qualify Variadic Functions with Lazy Arguments as nothrow

2015-05-14 Thread via Digitalmars-d-learn
On Thursday, 14 May 2015 at 10:18:13 UTC, Maxim Fomin wrote: On Thursday, 14 May 2015 at 09:53:20 UTC, Per Nordlöw wrote: At https://github.com/nordlow/justd/blob/master/algorithm_ex.d#L43 I've implemented a function either() with behaviour similar to the `or` function/operator in dynamic

[Issue 14573] [REG2.067] Extreme memory usage when `synchronized( object )` is used

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14573 --- Comment #6 from Martin Nowak c...@dawg.eu --- (In reply to safety0ff.bugz from comment #5) The first idea that came to mind was to add FINALIZE in _d_monitor_create, not sure if it'll work. Interesting idea. --

Re: Need a JQuery plugin for D

2015-05-14 Thread Wyatt via Digitalmars-d
On Thursday, 14 May 2015 at 18:09:06 UTC, extrawurst wrote: On Tuesday, 12 May 2015 at 15:53:53 UTC, Walter Bright wrote: https://i.stack.imgur.com/ssRUr.gif I hope this is fake!? Look at the sidebar stuff. It's clearly a joke. (From about two years ago, I think?)

Re: A few thoughts on std.allocator

2015-05-14 Thread Steven Schveighoffer via Digitalmars-d
On 5/13/15 8:00 PM, Jakob Ovrum wrote: On Wednesday, 13 May 2015 at 17:49:38 UTC, Steven Schveighoffer wrote: OK, then consider that this: void main() { string x; x ~= hello; x ~= world; } would require locking. That's unacceptable. Nobody would append with strings if this all

[Issue 14573] [REG2.067] Extreme memory usage when `synchronized( object )` is used

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14573 --- Comment #5 from safety0ff.bugz safety0ff.b...@gmail.com --- (In reply to Martin Nowak from comment #4) I'm so tired of this reverting business, let's just fix the bug. We have 2 options - introduce a finalizeMonitor flag that tells the GC

[Issue 14535] std.net.curl.CurlException should include status line

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14535 --- Comment #2 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/81b4dcd17521ffdfbf39deb7dcd0a76686da3c44 fix Issue 14535 -

Re: problem with parallel foreach

2015-05-14 Thread John Colvin via Digitalmars-d-learn
On Thursday, 14 May 2015 at 10:46:53 UTC, Gerald Jansen wrote: John Colvin's improvements to my D program seem to have resolved the problem. (http://forum.dlang.org/post/ydgmzhlspvvvrbeem...@forum.dlang.org and http://dpaste.dzfl.pl/114d5a6086b7). I have rerun my tests and now the picture is a

Re: Clean way to tell whether a destructor is called by the GC

2015-05-14 Thread ponce via Digitalmars-d-learn
On Wednesday, 13 May 2015 at 11:24:10 UTC, Kagamin wrote: On Tuesday, 12 May 2015 at 12:53:59 UTC, ponce wrote: I already have such a dispose() function. The problem is that to support Unique! and scoped! and friends, the destructor must call dispose(). Thus my need for a way to separate the

Re: rvalue references

2015-05-14 Thread Namespace via Digitalmars-d
On Thursday, 14 May 2015 at 17:50:35 UTC, Andrei Alexandrescu wrote: On 5/14/15 10:15 AM, Namespace wrote: But interesting question, what will happen with scope, now that we have return ref. Evaluate its merit once we have everything else in. -- Andrei Short and meaningful. Thank you.

Re: Thoughts about the ideal programming language

2015-05-14 Thread HaraldZealot via Digitalmars-d
On Thursday, 14 May 2015 at 06:02:37 UTC, thedeemon wrote: On Wednesday, 13 May 2015 at 18:59:42 UTC, Dennis Ritchie wrote: http%3A%2F%2Fhabrahabr.ru%2Fpost%2F257875%2F Just some usual C++ critique and very vague basic principles about having a core language with some extensions and library

[Issue 14573] [REG2.067] Extreme memory usage when `synchronized( object )` is used

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14573 Martin Nowak c...@dawg.eu changed: What|Removed |Added Assignee|nob...@puremagic.com|c...@dawg.eu --

How to simulate a new type

2015-05-14 Thread Charles Hixson via Digitalmars-d-learn
What are the downsides to simulating a new type with a struct. What I have in mind is something along the lines of: struct myType { uint64_t value; } The goal of this type is to prevent accidental conversions from myType into ints, uint64_ts, etc.

[Issue 14573] [REG2.067] Extreme memory usage when `synchronized( object )` is used

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14573 Martin Nowak c...@dawg.eu changed: What|Removed |Added Keywords||pull --- Comment #8 from Martin

Re: Let's improve D's exceptions

2015-05-14 Thread Steven Schveighoffer via Digitalmars-d
On 5/14/15 6:12 AM, Jacob Carlborg wrote: On 2015-05-14 00:55, Steven Schveighoffer wrote: enforce is one of the most needless pieces of phobos: enforce(cond, message); vs. if(!cond) throw new Exception(message); And the second doesn't mess up inlining. I think enforce could be

[Issue 14573] [REG2.067] Extreme memory usage when `synchronized( object )` is used

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14573 --- Comment #4 from Martin Nowak c...@dawg.eu --- (In reply to safety0ff.bugz from comment #3) Probably best just to revert the commit in question for now and leave a comment in _d_newclass explaining why classes need the FINALIZE flag regardless.

Re: rvalue references

2015-05-14 Thread Namespace via Digitalmars-d
On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote: On Thu, 14 May 2015 02:56:46 -0400, Namespace rswhi...@gmail.com wrote: On Thursday, 14 May 2015 at 00:12:05 UTC, bitwise wrote: Side note: DIP36 seems to be missing the table with the authors, status, etc. Bit Huh, DIP36?

Re: rvalue references

2015-05-14 Thread Andrei Alexandrescu via Digitalmars-d
On 5/14/15 10:15 AM, Namespace wrote: But interesting question, what will happen with scope, now that we have return ref. Evaluate its merit once we have everything else in. -- Andrei

[Issue 14573] [REG2.067] Extreme memory usage when `synchronized( object )` is used

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14573 --- Comment #7 from Martin Nowak c...@dawg.eu --- (In reply to Martin Nowak from comment #6) Interesting idea. Even better would be to pick up the old explicit @monitor idea and finally implement it.

Re: Need a JQuery plugin for D

2015-05-14 Thread extrawurst via Digitalmars-d
On Tuesday, 12 May 2015 at 15:53:53 UTC, Walter Bright wrote: https://i.stack.imgur.com/ssRUr.gif I hope this is fake!?

Re: Cannot Qualify Variadic Functions with Lazy Arguments as nothrow

2015-05-14 Thread anonymous via Digitalmars-d-learn
On Thursday, 14 May 2015 at 09:53:20 UTC, Per Nordlöw wrote: I'm almost satisified with it except that the lazy evaluation at https://github.com/nordlow/justd/blob/master/algorithm_ex.d#L45 cannot be made nothrow. If I qualify the function as nothrow DMD complains as algorithm_ex.d(45,16):

Re: Returning an empty range of a given type

2015-05-14 Thread Steven Schveighoffer via Digitalmars-d-learn
On 5/13/15 10:58 PM, rcorre wrote: Actually, this doesn't even seem to work with a custom range: import std.range; import std.stdio; import std.algorithm; struct MyContainer { @nogc auto opSlice() { struct Range { @property bool empty() { return true; }

Re: Need a JQuery plugin for D

2015-05-14 Thread Nick Sabalausky via Digitalmars-d
On 05/12/2015 11:54 AM, Walter Bright wrote: https://i.stack.imgur.com/ssRUr.gif That is hilarious. And disturbing ;)

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Chris via Digitalmars-d
On Thursday, 14 May 2015 at 15:14:25 UTC, Dragos Carp wrote: On Wednesday, 13 May 2015 at 15:24:02 UTC, Andrei Alexandrescu wrote: It should be easy to update by the community, so a wiki might be a good start. So I saw three links, any others? -- Andrei My company have 2-3 positions open in

[Issue 14539] +508KB (684KB - 1191KB) filesize increase Hello, world binary

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

Re: Breaking changes in Visual C++ 2015

2015-05-14 Thread Victor via Digitalmars-d
I think that besides all problems D have, the only one that mattered most and never was fixed was proper ARM support. Since dmd 1 I'm dreaming to ditch C++ for D on game development but this day never comes as it seems that there's always priorities(mostly justified) that postpone this. So I

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Dragos Carp via Digitalmars-d
On Wednesday, 13 May 2015 at 15:24:02 UTC, Andrei Alexandrescu wrote: It should be easy to update by the community, so a wiki might be a good start. So I saw three links, any others? -- Andrei My company have 2-3 positions open in Munich, unfortunately the current job listing is just in

Re: Calypso: Direct and full interfacing to C++

2015-05-14 Thread Elie Morisse via Digitalmars-d-announce
On Wednesday, 13 May 2015 at 15:54:47 UTC, John Colvin wrote: That's great! I'm looking forward to being able to easily make direct use of some of the great C++ code out there. Are there are performance pitfalls to watch out for that are unique to the way calypso interfaces between D and C++?

Re: Breaking changes in Visual C++ 2015

2015-05-14 Thread Johannes Pfau via Digitalmars-d
Am Thu, 14 May 2015 15:00:32 + schrieb Victor victor.v.carva...@gmail.com: I think that besides all problems D have, the only one that mattered most and never was fixed was proper ARM support. proper arm support depends on your definition of arm support. GDC supports ARM/GLibc/Linux just

[Issue 14583] New: std.typecons.Rebindable works incorrectly with classes in which there is an 'alias this' to AA member.

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14583 Issue ID: 14583 Summary: std.typecons.Rebindable works incorrectly with classes in which there is an 'alias this' to AA member. Product: D Version: D2 Hardware: x86_64

Re: std.parallelism equivalents for posix fork and multi-machine processing

2015-05-14 Thread John Colvin via Digitalmars-d
On Wednesday, 13 May 2015 at 20:34:24 UTC, weaselcat wrote: On Wednesday, 13 May 2015 at 20:28:02 UTC, Laeeth Isharc wrote: Is there value to having equivalents to the std.parallelism approach that works with processes rather than threads, and makes it easy to manage tasks over multiple

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Andrei Alexandrescu via Digitalmars-d
On 5/14/15 8:14 AM, Dragos Carp wrote: On Wednesday, 13 May 2015 at 15:24:02 UTC, Andrei Alexandrescu wrote: It should be easy to update by the community, so a wiki might be a good start. So I saw three links, any others? -- Andrei My company have 2-3 positions open in Munich, unfortunately

Re: Returning an empty range of a given type

2015-05-14 Thread Idan Arye via Digitalmars-d-learn
On Thursday, 14 May 2015 at 12:40:57 UTC, rcorre wrote: So I thought this might work: struct MaybeEmpty(R) if (isInputRange!R) { private bool _isEmpty; private R_input; alias _input this; this(bool isEmpty, R input) { _input = input; _isEmpty = isEmpty; } @property

[Issue 14539] +508KB (684KB - 1191KB) filesize increase Hello, world binary

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14539 --- Comment #4 from Martin Nowak c...@dawg.eu --- (In reply to Martin Nowak from comment #3) Would be helpful to share any findings instead of just treating symptoms. Is the reason for the size increase some added imports?

Re: Breaking changes in Visual C++ 2015

2015-05-14 Thread Iain Buclaw via Digitalmars-d
On 14 May 2015 at 17:40, Johannes Pfau via Digitalmars-d digitalmars-d@puremagic.com wrote: Am Thu, 14 May 2015 15:00:32 + schrieb Victor victor.v.carva...@gmail.com: I think that besides all problems D have, the only one that mattered most and never was fixed was proper ARM support.

Re: Array of objects and their inheritance

2015-05-14 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 14 May 2015 at 19:00:16 UTC, tired_eyes wrote: First, I don't understand why we see array[2] as 'Child'. While it is a 'Child', shouldn't it be shown as a 'Parent' due to we explicitly create an array of 'Parents'? It is getting the name through a virtual interface (a hidden one

Re: rvalue references

2015-05-14 Thread Namespace via Digitalmars-d
Don't ask me, I'm just a little light here. But I think it's because 'in' means 'const scope' and as you said, scope is out. ;)

Re: Dynamic / resizable array type, and a crash problem

2015-05-14 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 14 May 2015 at 20:03:16 UTC, ivoras wrote: Where would I look for documentation on the ~= operator? http://dlang.org/arrays.html under the heading array concatenation What would be the difference between Array!string and string[] ? Array!string takes ownership of its own

Re: std.parallelism equivalents for posix fork and multi-machine processing

2015-05-14 Thread Laeeth Isharc via Digitalmars-d
On Thursday, 14 May 2015 at 20:15:38 UTC, Ola Fosheim Grøstad wrote: On Thursday, 14 May 2015 at 20:06:55 UTC, Laeeth Isharc wrote: To start the process off (because small beginnings are better than no beginning): what are the key features of processes vs threads one would need to bear in mind

Re: How to simulate a new type

2015-05-14 Thread Laeeth Isharc via Digitalmars-d-learn
On Thursday, 14 May 2015 at 18:42:56 UTC, Charles Hixson wrote: What are the downsides to simulating a new type with a struct. What I have in mind is something along the lines of: struct myType { uint64_t value; } The goal of this type is to prevent accidental conversions from myType into

Re: Dynamic / resizable array type, and a crash problem

2015-05-14 Thread ivoras via Digitalmars-d-learn
On Thursday, 14 May 2015 at 20:32:28 UTC, rumbu wrote: On Thursday, 14 May 2015 at 20:03:16 UTC, ivoras wrote: What would be the difference between Array!string and string[] ? std.array is used to manipulate or create built-in arrays from various sources (ranges). For basic needs, you

Re: std.parallelism equivalents for posix fork and multi-machine processing

2015-05-14 Thread via Digitalmars-d
On Thursday, 14 May 2015 at 20:06:55 UTC, Laeeth Isharc wrote: To start the process off (because small beginnings are better than no beginning): what are the key features of processes vs threads one would need to bear in mind when designing such a thing? Because I spent the past couple of

Re: Calypso: Direct and full interfacing to C++

2015-05-14 Thread Laeeth Isharc via Digitalmars-d-announce
Elie, Congratulations on this very impressive work. Out of curiosity, how far away do you think it is from being at a beta stage that one can use to write non-critical work in ? One open source library that might not be too tough but would have high value in the financial domain is

Re: Thoughts about the ideal programming language

2015-05-14 Thread Maxim Fomin via Digitalmars-d
On Wednesday, 13 May 2015 at 18:59:42 UTC, Dennis Ritchie wrote: Hi, I think that many will find something interesting in this article: - https://translate.google.ru/translate?hl=rusl=rutl=enu=http%3A%2F%2Fhabrahabr.ru%2Fpost%2F257875%2F - Sorry translated using google translate. Can

Re: std.parallelism equivalents for posix fork and multi-machine processing

2015-05-14 Thread via Digitalmars-d
On Thursday, 14 May 2015 at 20:28:20 UTC, Laeeth Isharc wrote: My own is a pragmatic commercial one. I have some problems which perhaps scale quite well, and rather than write it using fork directly, I would rather have a higher level wrapper along the lines of std.parallelism. Languages

Array of objects and their inheritance

2015-05-14 Thread tired_eyes via Digitalmars-d-learn
Hi. I'm having a hard time understanding D's inheritance. Consider the following code: class Parent { public int x = 10; } class Child : Parent { public int y = 20; } void main() { import std.stdio; Parent[] array; auto obj1 = new Parent(); auto obj2 = new Child();

Re: What wrong?

2015-05-14 Thread sclytrack via Digitalmars-d-learn
On Tuesday, 5 May 2015 at 07:41:04 UTC, sclytrack wrote: On Monday, 4 May 2015 at 01:03:43 UTC, Fyodor Ustinov wrote: On Saturday, 2 May 2015 at 20:46:32 UTC, Dennis Ritchie wrote: On Saturday, 2 May 2015 at 19:38:01 UTC, Fyodor Ustinov wrote: I see it by the lack of 42. :) But why is this

Re: rvalue references

2015-05-14 Thread bitwise via Digitalmars-d
On Thu, 14 May 2015 13:15:34 -0400, Namespace rswhi...@gmail.com wrote: On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote: If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is, and 'in' should adopt the behavior of 'ref' post DIP25

Re: std.parallelism equivalents for posix fork and multi-machine processing

2015-05-14 Thread Laeeth Isharc via Digitalmars-d
On Thursday, 14 May 2015 at 16:33:46 UTC, John Colvin wrote: On Wednesday, 13 May 2015 at 20:34:24 UTC, weaselcat wrote: On Wednesday, 13 May 2015 at 20:28:02 UTC, Laeeth Isharc wrote: Is there value to having equivalents to the std.parallelism approach that works with processes rather than

Re: Dynamic / resizable array type, and a crash problem

2015-05-14 Thread ivoras via Digitalmars-d-learn
On Thursday, 14 May 2015 at 13:50:17 UTC, Adam D. Ruppe wrote: On Thursday, 14 May 2015 at 13:26:27 UTC, ivoras wrote: Is it resizable? You can append with the ~= operator and size down by slicing it. Apparently it doesn't even have an insert method: http://dlang.org/phobos/std_array.html .

Re: rvalue references

2015-05-14 Thread Namespace via Digitalmars-d
On Thursday, 14 May 2015 at 20:02:29 UTC, bitwise wrote: On Thu, 14 May 2015 13:15:34 -0400, Namespace rswhi...@gmail.com wrote: On Thursday, 14 May 2015 at 16:53:04 UTC, bitwise wrote: If it were up to me, I would say: 'scope' should be removed as a storage class, 'ref' should be left as is,

Re: std.parallelism equivalents for posix fork and multi-machine processing

2015-05-14 Thread Laeeth Isharc via Digitalmars-d
On Thursday, 14 May 2015 at 10:15:48 UTC, Daniel Murphy wrote: Laeeth Isharc wrote in message news:ejbhesbstgazkxnpv...@forum.dlang.org... Is there value to having equivalents to the std.parallelism approach that works with processes rather than threads, and makes it easy to manage tasks

Re: Dynamic / resizable array type, and a crash problem

2015-05-14 Thread rumbu via Digitalmars-d-learn
On Thursday, 14 May 2015 at 20:03:16 UTC, ivoras wrote: What would be the difference between Array!string and string[] ? std.array is used to manipulate or create built-in arrays from various sources (ranges). For basic needs, you can safely use built-in arrays:

Re: std.allocator: plea for contributions

2015-05-14 Thread Andrei Alexandrescu via Digitalmars-d
On 5/13/15 2:19 PM, Atila Neves wrote: Tried to, couldn't get it to compile with git HEAD. Could you please post the dmd and druntime git hashes, or are those forks as well? Thanks for looking into it! Here's what I have: dmd - acbe13ee54e024c0bba044d1146e244a5ea57502 druntime -

Re: Need a JQuery plugin for D

2015-05-14 Thread Idan Arye via Digitalmars-d
On Thursday, 14 May 2015 at 18:23:47 UTC, Wyatt wrote: On Thursday, 14 May 2015 at 18:09:06 UTC, extrawurst wrote: On Tuesday, 12 May 2015 at 15:53:53 UTC, Walter Bright wrote: https://i.stack.imgur.com/ssRUr.gif I hope this is fake!? Look at the sidebar stuff. It's clearly a joke. (From

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Ali Çehreli via Digitalmars-d
On 05/14/2015 03:20 PM, Dragos Carp wrote: Dragos [1] http://funkwerk-itk.com/funkwerk_itk_de/imagepool/jobs/SoftwareEntwickler.pdf Added: http://wiki.dlang.org/Jobs Ali

Re: D casually mentioned and dismissed + a suggestion

2015-05-14 Thread Dragos Carp via Digitalmars-d
On Thursday, 14 May 2015 at 16:28:01 UTC, Andrei Alexandrescu wrote: On 5/14/15 8:14 AM, Dragos Carp wrote: On Wednesday, 13 May 2015 at 15:24:02 UTC, Andrei Alexandrescu wrote: It should be easy to update by the community, so a wiki might be a good start. So I saw three links, any others?

Re: Feature or bug: print braces

2015-05-14 Thread Ali Çehreli via Digitalmars-d-learn
On 05/14/2015 03:39 PM, Dennis Ritchie wrote: On Thursday, 14 May 2015 at 21:55:40 UTC, Alex Parrill wrote: On Thursday, 14 May 2015 at 00:39:25 UTC, Dennis Ritchie wrote: On Thursday, 14 May 2015 at 00:33:33 UTC, Brian Schott wrote: You told it to output a function literal, so it did. Yes,

[Issue 14584] New: spurious autotester deadlocks

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14584 Issue ID: 14584 Summary: spurious autotester deadlocks Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority:

[Issue 14584] spurious autotester deadlocks

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14584 Martin Nowak c...@dawg.eu changed: What|Removed |Added Severity|enhancement |major --

[Issue 14584] spurious autotester deadlocks

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14584 --- Comment #1 from Martin Nowak c...@dawg.eu --- I ran a debug build of druntime and the mutex was unlocked too often (__count == -1). The double checked locking bug in rt.critical_

Re: Feature or bug: print braces

2015-05-14 Thread Alex Parrill via Digitalmars-d-learn
On Thursday, 14 May 2015 at 00:39:25 UTC, Dennis Ritchie wrote: On Thursday, 14 May 2015 at 00:33:33 UTC, Brian Schott wrote: You told it to output a function literal, so it did. Yes, but it would be logical to deduce something like: - writeln({}); // prints literal[{}] Or the compiler

Re: Feature or bug: print braces

2015-05-14 Thread Dennis Ritchie via Digitalmars-d-learn
On Thursday, 14 May 2015 at 21:55:40 UTC, Alex Parrill wrote: On Thursday, 14 May 2015 at 00:39:25 UTC, Dennis Ritchie wrote: On Thursday, 14 May 2015 at 00:33:33 UTC, Brian Schott wrote: You told it to output a function literal, so it did. Yes, but it would be logical to deduce something

[Issue 14584] spurious autotester deadlocks

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14584 Martin Nowak c...@dawg.eu changed: What|Removed |Added Keywords||pull --- Comment #2 from Martin

Re: How to simulate a new type

2015-05-14 Thread Charles Hixson via Digitalmars-d-learn
On 05/14/2015 01:42 PM, Laeeth Isharc via Digitalmars-d-learn wrote: On Thursday, 14 May 2015 at 18:42:56 UTC, Charles Hixson wrote: What are the downsides to simulating a new type with a struct. What I have in mind is something along the lines of: struct myType { uint64_t value; } The

Re: How to simulate a new type

2015-05-14 Thread Adam D. Ruppe via Digitalmars-d-learn
On Friday, 15 May 2015 at 01:03:32 UTC, Charles Hixson wrote: Yes, that looks as if it would do the job, but what are its advantages over a simple struct? None really, except perhaps automatic forwarding of operators which is easy enough to do on a struct too (and with a struct, you can do

Re: Calypso: Direct and full interfacing to C++

2015-05-14 Thread Elie Morisse via Digitalmars-d-announce
On Thursday, 14 May 2015 at 20:23:47 UTC, Laeeth Isharc wrote: Elie, Congratulations on this very impressive work. Out of curiosity, how far away do you think it is from being at a beta stage that one can use to write non-critical work in ? Thanks Laeeth, It's not too far I think. When

Re: Feature or bug: print braces

2015-05-14 Thread Dennis Ritchie via Digitalmars-d-learn
On Thursday, 14 May 2015 at 22:55:43 UTC, Ali Çehreli wrote: Yes, it is weird but that value happens to be the address of the function. Here is another test: import std.stdio; void foo() pure nothrow @nogc @safe {} void main() { void printInfo(T)(T t) { writefln(%s %s,

Re: rvalue references

2015-05-14 Thread bitwise via Digitalmars-d
On Thu, 14 May 2015 16:12:36 -0400, Namespace rswhi...@gmail.com wrote: Don't ask me, I'm just a little light here. But I think it's because 'in' means 'const scope' and as you said, scope is out. ;) Which means 'in' is available! ;) Bit

Re: std.parallelism equivalents for posix fork and multi-machine processing

2015-05-14 Thread Laeeth Isharc via Digitalmars-d
On Thursday, 14 May 2015 at 20:56:16 UTC, Ola Fosheim Grøstad wrote: On Thursday, 14 May 2015 at 20:28:20 UTC, Laeeth Isharc wrote: My own is a pragmatic commercial one. I have some problems which perhaps scale quite well, and rather than write it using fork directly, I would rather have a

[Issue 14578] [ddemangle] core.exception.InvalidMemoryOperationError@(0) handling large symbol list

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14578 --- Comment #4 from Iain Buclaw ibuc...@gdcproject.org --- OK, got a reduced test: --- import std.stdio; void main() { foreach (line; stdin.byLine()) { } } --- Only require two lines of stdin with the following constraints: #1 Line:

[Issue 14578] [ddemangle] core.exception.InvalidMemoryOperationError@(0) handling large symbol list

2015-05-14 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14578 ag0ae...@gmail.com changed: What|Removed |Added CC||ag0ae...@gmail.com --- Comment #5 from

Re: Thoughts about the ideal programming language

2015-05-14 Thread Dennis Ritchie via Digitalmars-d
On Thursday, 14 May 2015 at 06:02:37 UTC, thedeemon wrote: On Wednesday, 13 May 2015 at 18:59:42 UTC, Dennis Ritchie wrote: http%3A%2F%2Fhabrahabr.ru%2Fpost%2F257875%2F Just some usual C++ critique and very vague basic principles about having a core language with some extensions and library

Re: Returning an empty range of a given type

2015-05-14 Thread rcorre via Digitalmars-d-learn
On Thursday, 14 May 2015 at 06:41:45 UTC, Ali Çehreli wrote: I am lucky because although the returned type is opaque to me, I know that it is constructed by a void lambda. Yeah, in this case I control the container so I may just add an emptySlice property, but it does seem like it might be

Re: Thoughts about the ideal programming language

2015-05-14 Thread thedeemon via Digitalmars-d
On Wednesday, 13 May 2015 at 18:59:42 UTC, Dennis Ritchie wrote: http%3A%2F%2Fhabrahabr.ru%2Fpost%2F257875%2F Just some usual C++ critique and very vague basic principles about having a core language with some extensions and library support, nothing constructive or informative really.

  1   2   >