Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Jonathan M Davis via Digitalmars-d
On Wednesday, February 04, 2015 16:24:14 Andrei Alexandrescu via Digitalmars-d wrote: I'm seeing another idiom that seems to become fashionable. Consider this excerpt from https://github.com/D-Programming-Language/phobos/blob/master/std/algorithm/iteration.d#L407: auto

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Jonathan M Davis via Digitalmars-d
On Thursday, February 05, 2015 01:33:54 David Nadlinger via Digitalmars-d wrote: On Thursday, 5 February 2015 at 01:09:15 UTC, Andrei Alexandrescu wrote: Non-debug mode removes asserts statically. -- Andrei Using pre-/post-conditions allows the _caller_ to specify whether the checks are run

Re: Martin Nowak is our new release czar

2015-02-05 Thread eles via Digitalmars-d-announce
On Thursday, 5 February 2015 at 03:33:40 UTC, Manu wrote: On 5 February 2015 at 10:07, Andrei Alexandrescu via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Please throw your hat in the air with me to hail the new czar! :o) Huzzah! Or should I say... Huczar! Vive le

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread eles via Digitalmars-d
On Thursday, 5 February 2015 at 06:55:09 UTC, Vlad Levenfeld wrote: On Thursday, 5 February 2015 at 06:51:35 UTC, Vlad Levenfeld wrote: I could care less Er, stupid but unfortunately common american english idiom. For Thanks. I was firmly convinced that's a typo...

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread via Digitalmars-d
On Thursday, 5 February 2015 at 08:01:06 UTC, Jonathan M Davis wrote: the function exits, but in the vast majority of cases, what you're testing with an out contract is what unit tests would be testing, in which case, the out blocks don't really add anything, and since they're forced to be

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Jonathan M Davis via Digitalmars-d
On Thursday, February 05, 2015 17:42:11 Daniel Murphy via Digitalmars-d wrote: Meta wrote in message news:ejqtxksoifmqzetll...@forum.dlang.org... I don't know about others (besides Beatophile, who religiously adheres to writing contacts), but putting contracts on functions is a hassle. I

Re: Martin Nowak is our new release czar

2015-02-05 Thread Rory McGuire via Digitalmars-d-announce
On Thu, Feb 5, 2015 at 2:07 AM, Andrei Alexandrescu via Digitalmars-d-announce digitalmars-d-announce@puremagic.com wrote: Please throw your hat in the air with me to hail the new czar! :o) Andrei Thanks Martin, good luck. May the source be with you.

Re: Git, the D package manager

2015-02-05 Thread Iain Buclaw via Digitalmars-d
On 5 February 2015 at 07:20, Paulo Pinto via Digitalmars-d digitalmars-d@puremagic.com wrote: On Thursday, 5 February 2015 at 06:46:12 UTC, weaselcat wrote: After reading this thread I think I'm the only person here who actually likes makefiles. Nothing ever feels as complete as a good old

Re: Module for manual memory management

2015-02-05 Thread Foo via Digitalmars-d
On Thursday, 5 February 2015 at 07:53:34 UTC, Andrei Alexandrescu wrote: On 2/4/15 11:48 PM, Foo wrote: I would be glad if you or Walter could review the other parts as well. I'm very sure that your review will be very helpful and I'm convinced that the modules Array or Smart Pointer could be

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Jonathan M Davis via Digitalmars-d
On Thursday, February 05, 2015 08:13:32 eles via Digitalmars-d wrote: On Thursday, 5 February 2015 at 06:55:09 UTC, Vlad Levenfeld wrote: On Thursday, 5 February 2015 at 06:51:35 UTC, Vlad Levenfeld wrote: I could care less Er, stupid but unfortunately common american english idiom.

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Meta via Digitalmars-d
On Thursday, 5 February 2015 at 06:41:59 UTC, Daniel Murphy wrote: Meta wrote in message news:ejqtxksoifmqzetll...@forum.dlang.org... I don't know about others (besides Beatophile, who religiously adheres to writing contacts), but putting contracts on functions is a hassle. I never do it

[Issue 14128] wrong alias

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14128 Vlad Levenfeld vlevenf...@gmail.com changed: What|Removed |Added CC||vlevenf...@gmail.com

[Issue 14128] New: wrong alias

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14128 Issue ID: 14128 Summary: wrong alias Product: D Version: D1 D2 Hardware: x86_64 OS: Linux Status: NEW Severity: major Priority: P1

Re: Wrong pointer calculation without casting on struct

2015-02-05 Thread tcak via Digitalmars-d-learn
On Friday, 6 February 2015 at 03:59:51 UTC, tcak wrote: I am on 64-bit Linux. I defined a struct that it 8 bytes in total. align(1) struct MessageBase{ align(1): ushort qc; ushort wc; ushort id; ushort contentLength; void[0] content; } I defined a

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread Brad Roberts via Digitalmars-d
I figured that someone would have already objected to part of this, but the definition is stronger than I believe is intended for D: On 2/5/2015 5:23 PM, H. S. Teoh via Digitalmars-d wrote: 2) I think we also all basically agree that the *intent* of @trusted is to be an encapsulation

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread Walter Bright via Digitalmars-d
On 2/5/2015 8:30 PM, Brad Roberts via Digitalmars-d wrote: @safe code is memory safe when passed good inputs. @safe code does not have to detect or prevent garbage input from causing harm. The promises of @trusted aren't stronger than that either. This is correct. Thanks for catching it.

Re: misplaced @trust?

2015-02-05 Thread Walter Bright via Digitalmars-d
On 2/5/2015 8:24 PM, Dicebot wrote: What is worse, as it has been already mentioned, it is not just a one time effort - careful review necessity taints all code that gets called from @trusted code. That is only true if the @trusted code has an unsafe interface. Determining if a function has a

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread via Digitalmars-d
On Thursday, 5 February 2015 at 23:39:39 UTC, Walter Bright wrote: static void trustedMemcopy(T[] dest, T[] src) @trusted { assert(src.length == dest.length); memcpy(dest.ptr, src.ptr, src.length * T.sizeof); } I don't have to review callers of trustedMemory() because it

ubyte array to uint?

2015-02-05 Thread Gan via Digitalmars-d-learn
Is there a simple way of conversion? Something like: uint length = to!uint(buffer[0 .. 4]); Right now I have: uint length = *cast(uint*)buffer[0 .. 4].ptr; Which I'm not entirely sure is the correct way to do that.

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread via Digitalmars-d
On Thursday, 5 February 2015 at 12:39:18 UTC, Paulo Pinto wrote: I believe the Eiffel way, just like the industry does, with endless tools and processes that follow and validate DbC. I believe Ada allows the separation of interface and implementation, and providing the contract in the

Re: Some notes on Rust

2015-02-05 Thread Vlad Levenfeld via Digitalmars-d
On Friday, 6 February 2015 at 05:05:08 UTC, Ola Fosheim Grøstad wrote: OT: Have you looked at Ada SPARK 2014 yet? Provides nice and strong system programming language semantics. With a verification tool... nice. http://docs.adacore.com/spark2014-docs/html/ug/spark_2014.html Even more OT:

[Issue 13651] Writing Unicode text with console code page 65001 (UTF-8) may fail

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13651 mzfh...@foxmail.com changed: What|Removed |Added CC||mzfh...@foxmail.com --

Re: New DIP73: D Drafting Library

2015-02-05 Thread Laeeth Isharc via Digitalmars-d
Perhaps it is over ambitious to start with the goal of producing only code destined to end up in Phobos. The domain is so broadly defined, and the standard to aspire to so high that one ends up setting the goalpost so high that given likely contributors one risks ending up running out of

Re: Google Summer of Code - Again

2015-02-05 Thread Craig Dillabaugh via Digitalmars-d
On Friday, 6 February 2015 at 00:23:59 UTC, Rikki Cattermole wrote: On 6/02/2015 9:30 a.m., CraigDillabaugh wrote: On Friday, 30 January 2015 at 04:32:14 UTC, Craig Dillabaugh wrote: It seems like its been too long since I posted asking for GSOC help. The start of submissions for the 2015

Re: Trying to make a TCP server, client connects and disconnects immediately

2015-02-05 Thread Gan via Digitalmars-d-learn
On Friday, 6 February 2015 at 01:36:17 UTC, Mike Parker wrote: On 2/6/2015 9:50 AM, Gan wrote: On Friday, 6 February 2015 at 00:35:12 UTC, Adam D. Ruppe wrote: On Friday, 6 February 2015 at 00:31:37 UTC, Gan wrote: Or am I misunderstanding the receive function? Does it send whole messages or

Re: Wrong pointer calculation without casting on struct

2015-02-05 Thread Baz via Digitalmars-d-learn
On Friday, 6 February 2015 at 04:10:08 UTC, tcak wrote: On Friday, 6 February 2015 at 03:59:51 UTC, tcak wrote: I am on 64-bit Linux. I defined a struct that it 8 bytes in total. align(1) struct MessageBase{ align(1): ushort qc; ushort wc; ushort id; ushort

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread Walter Bright via Digitalmars-d
On 2/5/2015 8:20 PM, Dicebot wrote: I am not even sure how you can show the example though, to be honest - implied issues are about maintaining code and not just writing it. Let's start with std.array.uninitializedArray(): auto uninitializedArray(T, I...)(I sizes) nothrow @trusted Note

Re: Some notes on Rust

2015-02-05 Thread via Digitalmars-d
OT: Have you looked at Ada SPARK 2014 yet? Provides nice and strong system programming language semantics. With a verification tool... nice. http://docs.adacore.com/spark2014-docs/html/ug/spark_2014.html

Re: Some notes on Rust

2015-02-05 Thread weaselcat via Digitalmars-d
On Thursday, 5 February 2015 at 14:17:16 UTC, bearophile wrote: In the best language blog: http://lambda-the-ultimate.org/node/5113 The discussion is long. They discuss if a good GC can be written in the language itself, about actual security, what a GC can and can't do, and more. Bye,

Re: Some notes on Rust

2015-02-05 Thread via Digitalmars-d
On Friday, 6 February 2015 at 05:16:56 UTC, Vlad Levenfeld wrote: safety-critical systems. What's this kind of programming called? And can you recommend any resources for learning about the subject from square one? I haven't actually used SPARK, so my knowledge on what it can do is only

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread Walter Bright via Digitalmars-d
On 2/5/2015 9:00 PM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Thursday, 5 February 2015 at 23:39:39 UTC, Walter Bright wrote: static void trustedMemcopy(T[] dest, T[] src) @trusted { assert(src.length == dest.length); memcpy(dest.ptr,

Re: Trying to make a TCP server, client connects and disconnects immediately

2015-02-05 Thread Andre Kostur via Digitalmars-d-learn
On 2015-02-05, 8:17 PM, Gan wrote: On Friday, 6 February 2015 at 01:36:17 UTC, Mike Parker wrote: On 2/6/2015 9:50 AM, Gan wrote: On Friday, 6 February 2015 at 00:35:12 UTC, Adam D. Ruppe wrote: On Friday, 6 February 2015 at 00:31:37 UTC, Gan wrote: Or am I misunderstanding the receive

Re: misplaced @trust?

2015-02-05 Thread Andrei Alexandrescu via Digitalmars-d
On 2/5/15 8:24 PM, Dicebot wrote: I referred to this fact with a comment it is better to make no promises than to make one and break it. Simply dealing with unsafe language is something I got used to - all crashes and weird think become expected. It is totally different from seeing a memory

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread weaselcat via Digitalmars-d
On Friday, 6 February 2015 at 05:32:48 UTC, Walter Bright wrote: On 2/5/2015 9:00 PM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: On Thursday, 5 February 2015 at 23:39:39 UTC, Walter Bright wrote: static void trustedMemcopy(T[] dest, T[] src) @trusted {

[Issue 14126] GITHEAD - GC seemingly corrupting memory

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14126 --- Comment #7 from Orvid King blah38...@gmail.com --- It is a valid bug, just not sure of the cause yet. --

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread Zach the Mystic via Digitalmars-d
On Friday, 6 February 2015 at 03:14:59 UTC, Walter Bright wrote: I don't see how any proposal can work unless it specifies a safe interface to an unsafe section of code. (I read a Rust tutorial that rather bluntly pointed this out as well.) Link?

[Issue 14108] template object.get cannot deduce function from argument types

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14108 --- Comment #4 from Timothee Cour timothee.co...@gmail.com --- But the argument $key to aa.get(key) doesn't need to be stored, it's just used to retrieve the value with that key if it's there (eg by computing a hash function on the key, which doesn't

Wrong pointer calculation without casting on struct

2015-02-05 Thread tcak via Digitalmars-d-learn
I am on 64-bit Linux. I defined a struct that it 8 bytes in total. align(1) struct MessageBase{ align(1): ushort qc; ushort wc; ushort id; ushort contentLength; void[0] content; } I defined a function in this struct that tries to set a pointer to

[Issue 14087] @disable this hides static opCall

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

[Issue 6400] opDispatch with WithStatement

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=6400 yebblies yebbl...@gmail.com changed: What|Removed |Added CC||rob...@octarineparrot.com ---

[Issue 9808] with statement does not work with opDispatch

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9808 yebblies yebbl...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 14126] GITHEAD - GC seemingly corrupting memory

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14126 Puneet Goel pun...@coverify.org changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread Dicebot via Digitalmars-d
On Friday, 6 February 2015 at 01:12:18 UTC, Walter Bright wrote: On 2/5/2015 4:13 PM, Dicebot wrote: I know this definition. It have tried it in practice and concluded as being absolutely useless. There is no way I am going to return back to this broken concept - better to ignore @safe

Re: misplaced @trust?

2015-02-05 Thread Dicebot via Digitalmars-d
On Friday, 6 February 2015 at 00:56:09 UTC, Andrei Alexandrescu wrote: On 2/5/15 4:37 PM, Dicebot wrote: On Friday, 6 February 2015 at 00:31:06 UTC, Andrei Alexandrescu wrote: On 2/5/15 4:22 PM, Dicebot wrote: On Friday, 6 February 2015 at 00:21:45 UTC, Andrei Alexandrescu wrote: On 2/5/15

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread Walter Bright via Digitalmars-d
On 2/5/2015 7:39 PM, Zach the Mystic wrote: On Friday, 6 February 2015 at 03:14:59 UTC, Walter Bright wrote: I don't see how any proposal can work unless it specifies a safe interface to an unsafe section of code. (I read a Rust tutorial that rather bluntly pointed this out as well.) Link?

Re: New DIP73: D Drafting Library

2015-02-05 Thread Israel via Digitalmars-d
On Friday, 6 February 2015 at 00:45:16 UTC, Andrei Alexandrescu wrote: On 2/5/15 4:08 PM, Zach the Mystic wrote: Just use code.dlang.org. It's perfect either as a place for good work and a stepping stone toward the standard library. Andrei I get the feeling you guys will eventually look

Re: ubyte array to uint?

2015-02-05 Thread weaselcat via Digitalmars-d-learn
On Friday, 6 February 2015 at 05:18:45 UTC, Gan wrote: Is there a simple way of conversion? Something like: uint length = to!uint(buffer[0 .. 4]); Right now I have: uint length = *cast(uint*)buffer[0 .. 4].ptr; Which I'm not entirely sure is the correct way to do that. Hi, check out

Re: @trust is an encapsulation method, not an escape

2015-02-05 Thread Walter Bright via Digitalmars-d
On 2/5/2015 9:55 PM, weaselcat wrote: What's the D way of checking if a parameter is a reftype, valuetype, etc? http://dlang.org/phobos/std_traits.html

Re: D + Solaris

2015-02-05 Thread Suliman via Digitalmars-d-learn
ldc supports solaris/x86 but druntime/Phobos support will most likely be lacking what does it's mean? It is not fully work or what?

[Issue 14108] template object.get cannot deduce function from argument types

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

Fwd: Fwd: ANNOUNCEMENT: Intel386 psABI version 1.0

2015-02-05 Thread Brad Roberts via Digitalmars-d
I haven't read it yet myself, but probably of interest to anyone playing at the abi layer for x86 languages. -- Forwarded message -- From: H.J. Lu hjl.to...@gmail.com Date: Thu, Feb 5, 2015 at 10:35 AM Subject: ANNOUNCEMENT: Intel386 psABI version 1.0 To: IA32 System V

[Issue 14093] [REG2.065] __traits(compiles, cast(Object)(tuple)) is true even if it doesn't compile.

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

[Issue 12153] Ternary operator on static array lvalues creates copy

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12153 --- Comment #7 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/bdb30977e7084d1c496c7b386203af8dd33eea0d Move fix Issue 12153 to

[Issue 13952] change in struct ctor lowering generates excessive init code

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13952 Walter Bright bugzi...@digitalmars.com changed: What|Removed |Added Summary|change in struct ctor |change in struct

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Jonathan M Davis via Digitalmars-d
On Thursday, February 05, 2015 12:03:29 Walter Bright via Digitalmars-d wrote: On 2/5/2015 12:22 AM, Jonathan M Davis via Digitalmars-d wrote: No. It's just a frustratingly common mistake - like saying for all intensive purposes instead of for all intents and purposes. What? I thought it

[Issue 14129] New: stdio.write crashed on window console with codepage 65001

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14129 Issue ID: 14129 Summary: stdio.write crashed on window console with codepage 65001 Product: D Version: D2 Hardware: x86 OS: Windows Status: NEW

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Jonathan M Davis via Digitalmars-d
On Thursday, February 05, 2015 12:34:34 Kagamin via Digitalmars-d wrote: On Thursday, 5 February 2015 at 09:43:53 UTC, Jonathan M Davis wrote: There is no such difference in the current implementation. assertions inside of in and out blocks are no different from assertions inside of the

Re: Do you have a better way to remove element from a array?

2015-02-05 Thread Tobias Pankrath via Digitalmars-d-learn
On Thursday, 5 February 2015 at 13:25:37 UTC, FrankLike wrote: Now I can remove element from a array: module removeOne; import std.stdio; import std.array; import std.algorithm; void main() { int[] aa =[1,2,3,4,5]; aa = aa[0..2] ~aa[3..$]; writeln(aa); //ok

Do you have a better way to remove element from a array?

2015-02-05 Thread FrankLike via Digitalmars-d-learn
Now I can remove element from a array: module removeOne; import std.stdio; import std.array; import std.algorithm; void main() { int[] aa =[1,2,3,4,5]; aa = aa[0..2] ~aa[3..$]; writeln(aa); //ok remove(aa,1); writeln(aa);//get error result } You

Re: Syntax for checking if an element exists in a list

2015-02-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 5 February 2015 at 13:31:21 UTC, Nicholas Wilson wrote: On Thursday, 5 February 2015 at 12:31:31 UTC, Stéphane wrote: Syntax for checking if an element exists in a list Hello, I would like to know if there is a better (easier to wite, easier to read, easier to understand) way

Re: What am I doing Wrong (OpenGL SDL)

2015-02-05 Thread Mike Parker via Digitalmars-d-learn
On 2/5/2015 4:53 PM, Entity325 wrote: On Thursday, 5 February 2015 at 07:23:15 UTC, drug wrote: Look at this https://github.com/drug007/geoviewer/blob/master/src/sdlapp.d I used here SDL and OpenGL and it worked. Ctor of SDLApp creates SDL window with OpenGL context, may be it helps. Tested

Re: Do you have a better way to remove element from a array?

2015-02-05 Thread Tobias Pankrath via Digitalmars-d-learn
On Thursday, 5 February 2015 at 13:55:59 UTC, FrankLike wrote: On Thursday, 5 February 2015 at 13:29:30 UTC, Tobias Pankrath wrote: Works as designed: http://dlang.org/phobos/std_algorithm.html#.remove Thank you. aa = remove(aa,1);//ok but how to remove one item? such as aa.remove(2) ? I

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 02.02.2015 um 12:00 schrieb Manu via Digitalmars-d: On 2 February 2015 at 18:09, Vladimir Panteleev via Digitalmars-d digitalmars-d@puremagic.com wrote: On Monday, 2 February 2015 at 05:23:52 UTC, Daniel Murphy wrote: [snip] I agree with basically everything you said. I'll add, I have no

Some notes on Rust

2015-02-05 Thread bearophile via Digitalmars-d
In the best language blog: http://lambda-the-ultimate.org/node/5113 The discussion is long. They discuss if a good GC can be written in the language itself, about actual security, what a GC can and can't do, and more. Bye, bearophile

Re: Git, the D package manager

2015-02-05 Thread Atila Neves via Digitalmars-d
On Thursday, 5 February 2015 at 09:46:44 UTC, Daniel Murphy wrote: Atila Neves wrote in message news:wpryuzyjmcdjtocqg...@forum.dlang.org... I'm don't mind makefiles. That says, our dmd/druntime/phobos/dlang.org makefiles break at the drop of a hat. It's also rather difficult to review

Re: Improving reviewing and scrutiny

2015-02-05 Thread Atila Neves via Digitalmars-d
I learned a lot about how @trusted is supposed to be used by the discussion on that bug report. I don't know about the rest of you, but it wasn't obvious to me at all beforehand. Atila On Wednesday, 4 February 2015 at 23:01:48 UTC, Andrei Alexandrescu wrote: I just stepped into a disaster

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 04.02.2015 um 23:00 schrieb Mike Parker: On 2/5/2015 4:02 AM, Jacob Carlborg wrote: On 2015-02-02 09:58, Joseph Rushton Wakeling via Digitalmars-d wrote: Scenario: a dependency has a security hole that gets patched. If the dub package is updated, all applications using that dub package

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Paulo Pinto via Digitalmars-d
On Thursday, 5 February 2015 at 11:43:28 UTC, Ola Fosheim Grøstad wrote: On Thursday, 5 February 2015 at 11:05:42 UTC, Paulo Pinto wrote: On Thursday, 5 February 2015 at 10:09:34 UTC, deadalnix wrote: On Thursday, 5 February 2015 at 09:33:12 UTC, Paulo Pinto wrote: So the caller can break

Re: Syntax for checking if an element exists in a list

2015-02-05 Thread Tobias Pankrath via Digitalmars-d-learn
import std.algorithm; int main(string[] options) { // true if the first option given to this program is either foo, bar, or baz. if(options[1].canFind(foo, bar, baz)) return 0; return 1; }

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Nick Treleaven via Digitalmars-d
On 05/02/2015 01:50, H. S. Teoh via Digitalmars-d wrote: On Thu, Feb 05, 2015 at 01:34:47AM +, deadalnix via Digitalmars-d wrote: On Thursday, 5 February 2015 at 01:07:56 UTC, Andrei Alexandrescu wrote: Would introduce an exception to our brace-on-its-line rule. Which is already

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Nick Treleaven via Digitalmars-d
On 05/02/2015 08:56, Kagamin wrote: On Thursday, 5 February 2015 at 01:34:49 UTC, deadalnix wrote: On Thursday, 5 February 2015 at 01:07:56 UTC, Andrei Alexandrescu wrote: Would introduce an exception to our brace-on-its-line rule. Will I start the next world war if I mention this rule is

Re: Git, the D package manager

2015-02-05 Thread Daniel Murphy via Digitalmars-d
Atila Neves wrote in message news:myzbnoipafejrpzdw...@forum.dlang.org... I understand why dependencies are to be avoided. The good thing about the state of things right now is that one needs only a C++ compiler and make. That's a good thing. It certainly is. We are however planning to

Re: how can I get a reference of array?

2015-02-05 Thread FG via Digitalmars-d-learn
On 2015-02-05 at 09:58, bearophile wrote: zhmt: Will arr.ptr change in the future? As the array add more members , it need more memroy, then remalloc may be called, the pointer maybe change, then the stored pointer will be invalid. Will this happen? Yes, it can happen. Therefore, don't

Re: Syntax for checking if an element exists in a list

2015-02-05 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 5 February 2015 at 12:31:31 UTC, Stéphane wrote: Syntax for checking if an element exists in a list Hello, I would like to know if there is a better (easier to wite, easier to read, easier to understand) way to check if an element (string) is in a list of strings. Here are

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 03.02.2015 um 21:08 schrieb ketmar: On Tue, 03 Feb 2015 19:43:53 +0100, Martin Nowak wrote: On 02/03/2015 09:51 AM, ketmar wrote: 'cause it really sux as a build tool. Not getting into any of the lengthy discussions of yours, but 'it sux' isn't really helping anyone to improve it.

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Mike Parker via Digitalmars-d
On 2/5/2015 5:22 PM, Jonathan M Davis via Digitalmars-d wrote: On Thursday, February 05, 2015 08:13:32 eles via Digitalmars-d wrote: On Thursday, 5 February 2015 at 06:55:09 UTC, Vlad Levenfeld wrote: On Thursday, 5 February 2015 at 06:51:35 UTC, Vlad Levenfeld wrote: I could care less Er,

Re: GDB Improved D support

2015-02-05 Thread Andrej Mitrovic via Digitalmars-d
On 1/3/14, Iain Buclaw ibuc...@ubuntu.com wrote: snip https://github.com/ibuclaw/gdb/ Iain, is there a nice feature list somewhere to tell what's new in your fork? I saw the changelog but it's not very informative from a user's point of view:

Re: Do you have a better way to remove element from a array?

2015-02-05 Thread FrankLike via Digitalmars-d-learn
On Thursday, 5 February 2015 at 13:29:30 UTC, Tobias Pankrath wrote: Works as designed: http://dlang.org/phobos/std_algorithm.html#.remove Thank you. aa = remove(aa,1);//ok but how to remove one item? such as aa.remove(2) ?

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 02.02.2015 um 10:44 schrieb Andrej Mitrovic: On Monday, 2 February 2015 at 08:09:39 UTC, Vladimir Panteleev wrote: snip Also: - Dub installs everything in ~/ (home, which on Windows is an awful location anywho). It's a pain in the ass for browsing dependencies in your editor. If it's just

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 02.02.2015 um 15:45 schrieb ketmar: On Mon, 02 Feb 2015 14:36:00 +, Mathias LANG wrote: I couldn't disagree more, but I understand how frustrating dub can be. I also had to adapt my workflow to it. and sometimes it's plain unusable. it insists on batch builds, and i have three or so

Re: Do you have a better way to remove element from a array?

2015-02-05 Thread bearophile via Digitalmars-d-learn
Tobias Pankrath: Works as designed: http://dlang.org/phobos/std_algorithm.html#.remove Unfortunately it's one of the worst designed functions of Phobos: https://issues.dlang.org/show_bug.cgi?id=10959 Bye, bearophile

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Dragos Carp via Digitalmars-d
On Thursday, 5 February 2015 at 01:09:15 UTC, Andrei Alexandrescu wrote: On 2/4/15 4:50 PM, Jonathan Marler wrote: On Thursday, 5 February 2015 at 00:42:01 UTC, Andrei Alexandrescu wrote: On 2/4/15 4:40 PM, Jonathan Marler wrote: On Thursday, 5 February 2015 at 00:35:50 UTC, bearophile wrote:

Do you want add contains and remove item Function in array?

2015-02-05 Thread FrankLike via Digitalmars-d
Now operate array is not very quick,such as contains function,remove item function can't get from arry module. template contains(T) { bool contains(T[] Array,T Element) { foreach(T ArrayElement; Array) {

Re: Syntax for checking if an element exists in a list

2015-02-05 Thread Stéphane
On Thursday, 5 February 2015 at 12:35:03 UTC, Tobias Pankrath wrote: import std.algorithm; if(options[1].canFind(foo, bar, baz)) This looks quite OK. Thank you, I did not know about that possibility.

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 02.02.2015 um 15:59 schrieb ketmar: On Mon, 02 Feb 2015 14:18:47 +, Tobias Pankrath wrote: At least I don't expect Dub to support every single language out there natively. that's why other build tools allows to manually specify dependencies and commands as a last resort. but dub

Re: Do you want add contains and remove item Function in array?

2015-02-05 Thread FrankLike via Digitalmars-d
On Thursday, 5 February 2015 at 14:47:40 UTC, Daniel Murphy wrote: Contains: array.canFind(element) Oh, canFind is better than Contains. Thank you.

Re: Git, the D package manager

2015-02-05 Thread ketmar via Digitalmars-d
On Thu, 05 Feb 2015 14:48:12 +0100, Sönke Ludwig wrote: Am 03.02.2015 um 21:08 schrieb ketmar: On Tue, 03 Feb 2015 19:43:53 +0100, Martin Nowak wrote: On 02/03/2015 09:51 AM, ketmar wrote: 'cause it really sux as a build tool. Not getting into any of the lengthy discussions of yours, but

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 02.02.2015 um 09:09 schrieb Vladimir Panteleev: On Monday, 2 February 2015 at 05:23:52 UTC, Daniel Murphy wrote: 1. rdmd BTW, there is one thing about RDMD that can be a real issue and one that is not easily solved without integrating its functionality directly into DMD: It doesn't track

[Issue 14125] @trusted nested helper functions in std.file

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14125 --- Comment #77 from Andrei Alexandrescu and...@erdani.com --- Thanks Steve for the nice summary! --

Re: D + Solaris

2015-02-05 Thread John Colvin via Digitalmars-d-learn
On Thursday, 5 February 2015 at 14:51:58 UTC, suliman wrote: My next job will be related with prorgamming under Solaris. I dont know version but suppose it will be something pretty out of date. Once i had seen topic about D and Solaris, but i want to ask if D solaris version is ready for

[Issue 10920] template instantiation order dependent link failure problem

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

[Issue 14125] @trusted nested helper functions in std.file

2015-02-05 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14125 John Colvin john.loughran.col...@gmail.com changed: What|Removed |Added CC|

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 02.02.2015 um 23:15 schrieb Nick Sabalausky: On 02/02/2015 03:09 AM, Vladimir Panteleev wrote: 1a. rdmd and D's module system: [...] In contrast, Dub's default modus operandi is to blindly send to the compiler all *.d files found in the src folder, whether they're actually used or not. Not

Re: Git, the D package manager

2015-02-05 Thread ketmar via Digitalmars-d
On Thu, 05 Feb 2015 15:33:51 +, Mathias LANG wrote: On Thursday, 5 February 2015 at 15:26:23 UTC, ketmar wrote: On Thu, 05 Feb 2015 15:21:08 +, Atila Neves wrote: the package manager part should have good machine interface to allow it's usage in various scripts and other build

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 05.02.2015 um 16:18 schrieb ketmar: On Thu, 05 Feb 2015 16:05:11 +0100, Sönke Ludwig wrote: Yes, incremental building is indeed a missing feature. It's simply a matter of available developer time, as for many of the other concerns. Otherwise this is something that has been acknowledged for

Re: Git, the D package manager

2015-02-05 Thread Atila Neves via Digitalmars-d
On Thursday, 5 February 2015 at 15:46:57 UTC, Sönke Ludwig wrote: Am 03.02.2015 um 09:51 schrieb ketmar: On Tue, 03 Feb 2015 02:19:55 +, Martin Nowak wrote: There seems to be a general scepticism against dub and I wonder what the reasons are. 'cause it really sux as a build tool.

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Andrei Alexandrescu via Digitalmars-d
On 2/5/15 1:53 AM, Daniel Murphy wrote: Yes, optimization is another nice possibility. I think there is a lot of untapped potential in using contracts to pass extra information to the compiler. I agree. One actionable - albeit crazy :o) - idea is to make __FILE__, __LINE__, __MODULE__ etc.

Re: RFC: std.json sucessor

2015-02-05 Thread Andrei Alexandrescu via Digitalmars-d
On 2/5/15 1:07 AM, Jakob Ovrum wrote: On Thursday, 21 August 2014 at 22:35:18 UTC, Sönke Ludwig wrote: ... Added to the review queue as a work in progress with relevant links: http://wiki.dlang.org/Review_Queue Yay! -- Andrei

Re: Git, the D package manager

2015-02-05 Thread Sönke Ludwig via Digitalmars-d
Am 03.02.2015 um 09:51 schrieb ketmar: On Tue, 03 Feb 2015 02:19:55 +, Martin Nowak wrote: There seems to be a general scepticism against dub and I wonder what the reasons are. 'cause it really sux as a build tool. Just to state the design perspective for a little bit of rationale:

Re: Another idiom I wish were gone from phobos/druntime

2015-02-05 Thread Daniel Murphy via Digitalmars-d
Andrei Alexandrescu wrote in message news:mb03nt$1lhr$1...@digitalmars.com... I agree. One actionable - albeit crazy :o) - idea is to make __FILE__, __LINE__, __MODULE__ etc. inside contracts bind to the caller context. Then all failures blame straight to the caller code. -- Andrei

  1   2   3   4   >