Re: Better native D 2D graphics library?

2015-02-09 Thread Namespace via Digitalmars-d-learn
On Monday, 9 February 2015 at 05:50:00 UTC, uri wrote: On Saturday, 7 February 2015 at 23:29:01 UTC, Namespace wrote: On Saturday, 7 February 2015 at 22:09:03 UTC, Gan wrote: Is there a better D graphics library in the works? I'm using SFML(which is very easy and has lots of features) but it

Re: Git, the D package manager

2015-02-09 Thread Atila Neves via Digitalmars-d
I definitely agree this is a good thing, but I have yet to see a good build system with serious traction that is purely statically typed and compiled. Maybe D could be different. Perhaps another GSoC 2015 project in here? I haven't tried Shake, but since it's in Haskell... Atila

Re: Static method of inner class needs this

2015-02-09 Thread wobbles via Digitalmars-d-learn
On Monday, 9 February 2015 at 07:32:33 UTC, rumbu wrote: class Outer { class Inner { static Inner createInner() { return new Inner(); //need 'this' to access member this } } } Is this a bug? If Inner is not nested, it works as expected: class

Re: Static method of inner class needs this

2015-02-09 Thread ketmar via Digitalmars-d-learn
On Mon, 09 Feb 2015 07:32:32 +, rumbu wrote: class Outer { class Inner { static Inner createInner() { return new Inner(); //need 'this' to access member this } } } Is this a bug? strictly speaking, this is not a bug. compiler

Re: Trusted Manifesto

2015-02-09 Thread Dicebot via Digitalmars-d
string toUpper(string s) @safe { char[] r = new char[s.length]; foreach (i, c; s) r[i] = toUpper(c); return cast(string)r; // == unsafe operation } Shouldn't that be `return assumeUnique(r)` instead? What about requiring to put in-code comment that mentions

Re: A safer interface for core.stdc

2015-02-09 Thread Dicebot via Digitalmars-d
On Saturday, 7 February 2015 at 23:50:55 UTC, Andrei Alexandrescu wrote: I was looking into ways to make core.stdc safer. That should be relatively easy to do by defining a few wrappers. For example: int setvbuf(FILE* stream, char* buf, int mode, size_t size); is unsafe because there's no

[Issue 14155] New: [REG2.066] A defect in DIP29: the return value of some pure functions cannot be unique pointer

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14155 Issue ID: 14155 Summary: [REG2.066] A defect in DIP29: the return value of some pure functions cannot be unique pointer Product: D Version: D2 Hardware: All OS:

Re: Git, the D package manager

2015-02-09 Thread Sönke Ludwig via Digitalmars-d
It looks like the core issue is that we simply have different goals in mind. When we were deciding on how the build description works back then, we basically had these: - The build description can be reasoned about in a generic way (not generally possible with an imperative scripting

Re: Classes and @disable this()

2015-02-09 Thread via Digitalmars-d-learn
On Sunday, 8 February 2015 at 19:57:28 UTC, Jonathan M Davis wrote: On Sunday, February 08, 2015 17:51:09 bearophile via Digitalmars-d-learn wrote: fra: However making it a compiler error would be far, far better I think this can be filed in Bugzilla as diagnostic enhancement: class Foo

Re: Template constructor in a non-template struct.

2015-02-09 Thread via Digitalmars-d-learn
On Sunday, 8 February 2015 at 22:19:35 UTC, ChrisG wrote: Thanks bearophile. Your first suggestion about making the struct a template is something I considered. However, because of all the code I've already written that approach would force me to use inheritance or convert a ton of functions

Re: Const-correctness and uniqueness. Again.

2015-02-09 Thread Kenji Hara via Digitalmars-d
2015-02-10 0:15 GMT+09:00 via Digitalmars-d digitalmars-d@puremagic.com: On Monday, 9 February 2015 at 13:19:24 UTC, Tobias Pankrath wrote: On Monday, 9 February 2015 at 12:39:06 UTC, Marc Schütz wrote: It does? Not according to my tests. And it would be bad if it did, because the returned

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

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d
On 2/9/15 10:13 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net wrote: On Monday, 9 February 2015 at 14:40:36 UTC, Steven Schveighoffer wrote: On 2/7/15 7:11 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: You are trying to do this: 1. mechanically

Worker is not finished while sending message to intermediate worker

2015-02-09 Thread xtreak via Digitalmars-d-learn
I am using programming in D to learn about D language. I wrote a simple program that spawns a worker and sends it a number to receive its square as a string. The worker 1 gets the number squares it and sends to worker 2 (a different function) to get casted as string which is returned to the

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

2015-02-09 Thread via Digitalmars-d
On Monday, 9 February 2015 at 14:40:36 UTC, Steven Schveighoffer wrote: On 2/7/15 7:11 AM, Ola Fosheim =?UTF-8?B?R3LDuHN0YWQi?= ola.fosheim.grostad+dl...@gmail.com wrote: You are trying to do this: 1. mechanically verify the whole @trusted region 2. manually verify the whole @trusted

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

2015-02-09 Thread Kagamin via Digitalmars-d-announce
On Monday, 9 February 2015 at 04:33:04 UTC, Kelly wrote: Ugh, this forum needs a preview button!! Sorry about the poor formatting, Kelly http://pastebin.com/

Re: parse string as char

2015-02-09 Thread Kagamin via Digitalmars-d-learn
https://github.com/Hackerpilot/libdparse/blob/master/src/std/d/lexer.d#L1491

Re: parse string as char

2015-02-09 Thread FG via Digitalmars-d-learn
Of course consuming it dchar by dchar also works: string s = `\tabŁŃ\r\nx`; assert(parseDchar(s) == '\t'); assert(parseDchar(s) == 'a'); assert(parseDchar(s) == 'b'); assert(parseDchar(s) == 'Ł'); assert(parseDchar(s) == 'Ń'); assert(parseDchar(s) == '\r');

Re: parse string as char

2015-02-09 Thread FG via Digitalmars-d-learn
On 2015-02-09 at 03:40, Timothee Cour via Digitalmars-d-learn wrote: Is there a simple way to parse a string as a char? eg: unittest{ assert(parseChar(`a`)=='a'); assert(parseChar(`\n`)=='\n'); //NOTE: I'm looking at `\n` not \n // should also work with other forms of characters, see

Re: Const-correctness and uniqueness. Again.

2015-02-09 Thread via Digitalmars-d
On Monday, 9 February 2015 at 13:19:24 UTC, Tobias Pankrath wrote: On Monday, 9 February 2015 at 12:39:06 UTC, Marc Schütz wrote: On Monday, 9 February 2015 at 11:38:23 UTC, Jakob Ovrum wrote: On Monday, 9 February 2015 at 11:37:23 UTC, Jakob Ovrum wrote: std.array.join is strongly pure (with

Re: How to write similar code D?

2015-02-09 Thread FG via Digitalmars-d-learn
On 2015-02-10 at 01:41, bearophile wrote: auto query = iota(2, 12) .map!(c = Tuple!(int,length, int,height, int,hypotenuse) (2 * c, c ^^ 2 - 1, c ^^ 2 + 1)) .map!(x = %3d%4d%4d.format(x.height, x.hypotenuse,

Re: Deadcode - Widgets and Styling post

2015-02-09 Thread Phil via Digitalmars-d-announce
This looks great. Do you have any idea roughly when an alpha release will be available? On Monday, 9 February 2015 at 22:36:45 UTC, David Ellsworth wrote: On Monday, 9 February 2015 at 21:08:18 UTC, Brad Anderson wrote: I've never seen anyone post under the name deadcode on the forums so

Re: How to write similar code D?

2015-02-09 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 10 February 2015 at 01:31:54 UTC, FG wrote: On 2015-02-10 at 01:41, bearophile wrote: auto query = iota(2, 12) .map!(c = Tuple!(int,length, int,height, int,hypotenuse) (2 * c, c ^^ 2 - 1, c ^^ 2 + 1)) .map!(x

Re: To write such an expressive code D

2015-02-09 Thread Ali Çehreli via Digitalmars-d-learn
On 02/09/2015 08:17 PM, Dennis Ritchie wrote: Ali, and you can write it without using the function iota() and map? No because the a..b syntax is not a D language construct that we can use anywhere that it makes sense. It only works as number ranges inside foreach loops, when indexing slices,

Re: Trusted Manifesto

2015-02-09 Thread Zach the Mystic via Digitalmars-d
On Tuesday, 10 February 2015 at 05:18:26 UTC, Andrei Alexandrescu wrote: On 2/9/15 9:06 PM, Dicebot wrote: On Tuesday, 10 February 2015 at 04:05:35 UTC, Andrei Alexandrescu wrote: On 2/9/15 8:03 PM, Zach the Mystic wrote: You could put the 'trusted' template right in object.d, to save people

Re: Trusted Manifesto

2015-02-09 Thread H. S. Teoh via Digitalmars-d
On Mon, Feb 09, 2015 at 12:19:10AM -0800, Walter Bright via Digitalmars-d wrote: [...] Trusted Manifesto - [...] RULE 1: @trusted code accessible from @safe code must expose a safe interface to unsafe operations. @trusted must not be used to inject unsafety into surrounding

Re: Trusted Manifesto

2015-02-09 Thread Zach the Mystic via Digitalmars-d
On Tuesday, 10 February 2015 at 03:36:14 UTC, Walter Bright wrote: On 2/9/2015 6:21 PM, H. S. Teoh via Digitalmars-d wrote: What stops the following abuse of @trusted via trusted()? int* myFunc(void* p) @safe // -- I'm claiming to be @safe { // But actually I'm

Re: Trusted Manifesto

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/9/15 6:21 PM, H. S. Teoh via Digitalmars-d wrote: I wonder if there's a way, in the current language, to make it illegal to call trusted() from a function explicitly marked @safe...? No, but that might be worthy future consideration. I think we now should move forward with this and see

Re: function and variable

2015-02-09 Thread Vlad Levenfeld via Digitalmars-d-learn
On Tuesday, 10 February 2015 at 03:59:22 UTC, Rikki Cattermole wrote: That's a bug. It should be using the function pointer. UFCS call should abide by the same scoping rules as anything else. https://issues.dlang.org/show_bug.cgi?id=14161 I thought that's how UFCS was explicitly designed?

[Issue 14160] [REG2.066] mutable global data access is wrongly accepted in pure function

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14160 --- Comment #1 from Kenji Hara k.hara...@gmail.com --- Introduced in: https://github.com/D-Programming-Language/dmd/pull/3303 --

Re: Trusted Manifesto

2015-02-09 Thread Zach the Mystic via Digitalmars-d
On Tuesday, 10 February 2015 at 04:05:35 UTC, Andrei Alexandrescu wrote: On 2/9/15 8:03 PM, Zach the Mystic wrote: You could put the 'trusted' template right in object.d, to save people the awkward burden of importing it from std.conv all the time. But that would be a language change, of

Re: To write such an expressive code D

2015-02-09 Thread Dennis Ritchie via Digitalmars-d-learn
On Monday, 9 February 2015 at 20:16:45 UTC, Ali Çehreli wrote: Yes, but apparently D's default precision for output is less than F#'s so how about the following? :p %(%.15g\n%).writefln(iota(0, PI/2, PI/2/9).map!sin); Just for demonstration, I would not write anything like that but the

[Issue 14160] [REG2.066] mutable global data access is wrongly accepted in pure function

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

Re: Proposal : aggregated dlang git repository

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/8/15 11:58 PM, Dicebot wrote: On Monday, 9 February 2015 at 07:04:35 UTC, Ali Çehreli wrote: On 02/08/2015 10:33 PM, Dicebot wrote: Trivial proof of concept : https://github.com/Dicebot/TestDlangAggregated Great idea. I've been using the following one just to keep up-to-date with git

[Issue 14160] New: [REG2.066] mutable global data access is wrongly accepted in pure function

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14160 Issue ID: 14160 Summary: [REG2.066] mutable global data access is wrongly accepted in pure function Product: D Version: D2 Hardware: All OS: All

function and variable

2015-02-09 Thread Fyodor Ustinov via Digitalmars-d-learn
Hi! I think this code should not be compiled without any warning: import std.stdio; void f(int a) { writeln(it's a function! : , a); } void main() { auto f = function (int a) {writeln(It's a variable! : , a);}; 5.f(); f(5); } Output: it's a function! : 5 It's a variable! :

Re: Trusted Manifesto

2015-02-09 Thread Walter Bright via Digitalmars-d
On 2/9/2015 6:21 PM, H. S. Teoh via Digitalmars-d wrote: What stops the following abuse of @trusted via trusted()? int* myFunc(void* p) @safe // -- I'm claiming to be @safe { // But actually I'm not! Though I can convince the // compiler that I

Re: function and variable

2015-02-09 Thread Fyodor Ustinov via Digitalmars-d-learn
On Tuesday, 10 February 2015 at 03:59:22 UTC, Rikki Cattermole wrote: That's a bug. It should be using the function pointer. UFCS call should abide by the same scoping rules as anything else. https://issues.dlang.org/show_bug.cgi?id=14161 Moreover. If the function is not defined (only

Re: Trusted Manifesto

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/9/15 8:03 PM, Zach the Mystic wrote: You could put the 'trusted' template right in object.d, to save people the awkward burden of importing it from std.conv all the time. But that would be a language change, of sorts. We won't define it. Instead we'll go with Steve's idea: () @trusted =

Re: Intended to be able to RefCount an interface?

2015-02-09 Thread weaselcat via Digitalmars-d-learn
On Tuesday, 10 February 2015 at 05:09:00 UTC, Jakob Ovrum wrote: On Tuesday, 10 February 2015 at 04:44:55 UTC, weaselcat wrote: Thread title. interface Itest{ } class testclass : Itest{ } void main() { import std.typecons; auto test = RefCounted!Itest(new testclass()); } If you

Re: Proposal : aggregated dlang git repository

2015-02-09 Thread Brian Schott via Digitalmars-d
On Tuesday, 10 February 2015 at 06:22:51 UTC, Andrei Alexandrescu wrote: Yet we do have matters that are important and urgent. We want to improve Phobos' take on memory allocation. Yet not one soul is working on RefCounted. Few know even what needs to be done of it. I think you may have just

Re: Unreachable statement, do or do not, there is no try

2015-02-09 Thread Jacob Carlborg via Digitalmars-d
On 2015-02-09 20:00, deadalnix wrote: DMD accept both : int foo() { try { throw new Exception(blah); } catch(Exception e) { return 25; } } and int foo() { try { throw new Exception(blah); } catch(Exception e) { return 25; } return 42; } Which is it ?

Re: Trusted Manifesto

2015-02-09 Thread Walter Bright via Digitalmars-d
On 2/9/2015 9:06 PM, Dicebot wrote: This was exactly how all those trustedFoo() nested functions have appeared - we wanted to localized unsafe operations with `() @trusted {}` but it wasn't properly inlined by DMD. DMD will inline trivial functions like that. In what case does it not?

Re: To write such an expressive code D

2015-02-09 Thread Dennis Ritchie via Digitalmars-d-learn
On Tuesday, 10 February 2015 at 06:17:17 UTC, Ali Çehreli wrote: On 02/09/2015 08:17 PM, Dennis Ritchie wrote: Ali, and you can write it without using the function iota() and map? No because the a..b syntax is not a D language construct that we can use anywhere that it makes sense. It only

[Issue 14153] std.format page displaying incorrectly

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

[Issue 14153] std.format page displaying incorrectly

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14153 --- Comment #2 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/799fdf81adc9ba2cf17edaaad3f1e2621cdcdf95 Merge pull request

Re: Trusted Manifesto

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d
This is headed in the right direction, I think. Comments below. On 2/9/15 3:19 AM, Walter Bright wrote: Andrei and I have learned a lot from the @trusted discussions. It's clear the way we were approaching the problem was inadequate. So we came up with a proposal based on the ideas and

Re: Google Summer of Code - Again

2015-02-09 Thread CraigDillabaugh via Digitalmars-d
On Monday, 9 February 2015 at 14:17:32 UTC, Wyatt wrote: On Monday, 9 February 2015 at 13:47:21 UTC, CraigDillabaugh wrote: Google Summer of Code organizational proposals start today. I will submit our proposal in the next day or two. The evaluation process starts on Feb 23rd, so I imagine

Re: Classes and @disable this()

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/8/15 2:57 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, February 08, 2015 17:51:09 bearophile via Digitalmars-d-learn wrote: fra: However making it a compiler error would be far, far better I think this can be filed in Bugzilla as diagnostic enhancement: class Foo {

Re: Static method of inner class needs this

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/9/15 4:30 AM, ketmar wrote: On Mon, 09 Feb 2015 07:32:32 +, rumbu wrote: class Outer { class Inner { static Inner createInner() { return new Inner(); //need 'this' to access member this } } } Is this a bug? strictly speaking,

Re: Git, the D package manager

2015-02-09 Thread CraigDillabaugh via Digitalmars-d
On Monday, 9 February 2015 at 17:43:58 UTC, Andrei Alexandrescu wrote: On 2/9/15 12:43 AM, Russel Winder via Digitalmars-d wrote: clip I definitely agree this is a good thing, but I have yet to see a good build system with serious traction that is purely statically typed and compiled. Maybe

Re: Trusted Manifesto

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d
On 2/9/15 1:18 PM, Andrei Alexandrescu wrote: On 2/9/15 10:12 AM, Steven Schveighoffer wrote: On 2/9/15 12:57 PM, Andrei Alexandrescu wrote: On 2/9/15 7:48 AM, Steven Schveighoffer wrote: auto result = (() @trusted = cast(immutable)a)(); I'm okay with this as with most of Steve's points.

Re: Trusted Manifesto

2015-02-09 Thread Wyatt via Digitalmars-d
On Monday, 9 February 2015 at 18:18:23 UTC, Andrei Alexandrescu wrote: On 2/9/15 10:12 AM, Steven Schveighoffer wrote: Merriam Webster says otherwise ;) http://www.merriam-webster.com/dictionary/generic Interesting, thanks. Also, M-W does not list genericity. -- Webster needs to get over

[Issue 14158] ICE 1567

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14158 Илья Ярошенко ilyayaroshe...@gmail.com changed: What|Removed |Added Keywords||ice,

Re: To write such an expressive code D

2015-02-09 Thread Dennis Ritchie via Digitalmars-d-learn
On Monday, 9 February 2015 at 20:03:00 UTC, Vladimir Panteleev wrote: On Monday, 9 February 2015 at 19:57:23 UTC, Ali Çehreli wrote: writefln(%(%.15g\n%), sins); In 2.067, you can write: iota(0, PI/2, PI/2/9).map!sin.each!writeln; March 1!

Re: Worker is not finished while sending message to intermediate worker

2015-02-09 Thread Ali Çehreli via Digitalmars-d-learn
On 02/09/2015 11:46 AM, Ali Çehreli wrote: threads normally start one [or] more worker threads and send tasks to those threads Accordingly, the following program uses just three threads: import std.stdio; import std.concurrency; import std.conv; import core.thread; struct Terminate {} void

Binding C++ value types

2015-02-09 Thread Benjamin Thaut via Digitalmars-d-learn
When binding C++ value types you might want to use them by placing them on the D-Stack. This however seems to be not supported as the mangling for the constructor is completely wrong. Is this supposed to work? Kind Regards Benjamin Thaut

Re: To write such an expressive code D

2015-02-09 Thread Tobias Pankrath via Digitalmars-d-learn
On Monday, 9 February 2015 at 19:40:42 UTC, Dennis Ritchie wrote: Good evening. Is it possible to D something to replace the container on the F#, which displays the values of the sine from 0 to 90 degrees with an interval of 10 degrees: let pi = Math.PI let sins = [for x in 0.0..pi / 2.0 /

Re: To write such an expressive code D

2015-02-09 Thread Ali Çehreli via Digitalmars-d-learn
On 02/09/2015 11:45 AM, Tobias Pankrath wrote: iota(0, 91, 10).map!sin.writeln or something like that. Yes: :) import std.math; import std.stdio; import std.range; import std.algorithm; void main() { const beg = 0.0L; const interval = PI_2 / 9; const end = PI_2 + interval;

Re: Classes and @disable this()

2015-02-09 Thread Jonathan M Davis via Digitalmars-d-learn
On Monday, February 09, 2015 13:29:22 Steven Schveighoffer via Digitalmars-d-learn wrote: On 2/8/15 2:57 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, February 08, 2015 17:51:09 bearophile via Digitalmars-d-learn wrote: fra: However making it a compiler error would be

Re: Proposal : aggregated dlang git repository

2015-02-09 Thread Dicebot via Digitalmars-d
On Monday, 9 February 2015 at 07:04:35 UTC, Ali Çehreli wrote: On 02/08/2015 10:33 PM, Dicebot wrote: Trivial proof of concept : https://github.com/Dicebot/TestDlangAggregated Great idea. I've been using the following one just to keep up-to-date with git head dmd and Phobos:

Re: Git, the D package manager

2015-02-09 Thread Dicebot via Digitalmars-d
On Monday, 9 February 2015 at 07:15:23 UTC, Vladimir Panteleev wrote: On Sunday, 8 February 2015 at 21:02:14 UTC, Jacob Carlborg wrote: The above command will obviously not compile bar.d. What I mean is that it's no longer enough to pass a single file and let RDMD track the dependencies. OK,

Re: Testing package proposed for Phobos

2015-02-09 Thread Russel Winder via Digitalmars-d
On Mon, 2015-02-09 at 01:54 +, Craig Dillabaugh via Digitalmars-d wrote: […] Google Summer of Code project? Are you interested in mentoring? (Sorry, I have a bit of a one-track mind) A point came up at the London D Users meeting: Having unittest integrated into module structure and

Re: Git, the D package manager

2015-02-09 Thread Jacob Carlborg via Digitalmars-d
On 2015-02-09 08:15, Vladimir Panteleev wrote: OK, but the obviously trivial fix is to either import bar, or create a module that imports all other modules in the library. It's not really enough justification for switching build tools, is it? I thought the whole point of this thread was that

Trusted Manifesto

2015-02-09 Thread Walter Bright via Digitalmars-d
Andrei and I have learned a lot from the @trusted discussions. It's clear the way we were approaching the problem was inadequate. So we came up with a proposal based on the ideas and criticisms of the participants in the references. It involves no language changes, but offers usage guidelines

Re: Git, the D package manager

2015-02-09 Thread Jacob Carlborg via Digitalmars-d
On 2015-02-09 08:15, Vladimir Panteleev wrote: OK, but the obviously trivial fix is to either import bar, or create a module that imports all other modules in the library. It's not really enough justification for switching build tools, is it? Setting up dependencies between modules just to

Re: Git, the D package manager

2015-02-09 Thread Vladimir Panteleev via Digitalmars-d
On Monday, 9 February 2015 at 08:16:24 UTC, Jacob Carlborg wrote: On 2015-02-09 08:15, Vladimir Panteleev wrote: OK, but the obviously trivial fix is to either import bar, or create a module that imports all other modules in the library. It's not really enough justification for switching

Re: Testing package proposed for Phobos

2015-02-09 Thread Atila Neves via Digitalmars-d
A point came up at the London D Users meeting: Having unittest integrated into module structure and compiler is fine for small unit tests, but what is the D support for integration tests, end-to-end tests, etc. What is the equivalent in D of Catch, TestNG, Spock, Cucumber,…

Re: Git, the D package manager

2015-02-09 Thread Russel Winder via Digitalmars-d
On Sun, 2015-02-08 at 20:54 +0100, Jacob Carlborg via Digitalmars-d wrote: […] Since Rake will give you the full power of Ruby I assume you mean some high level helper constructs? The Rake community were not really interested in supporting C and C++ builds, let alone LaTeX, with abstractions

Re: Git, the D package manager

2015-02-09 Thread Vladimir Panteleev via Digitalmars-d
On Monday, 9 February 2015 at 08:08:36 UTC, Dicebot wrote: On Monday, 9 February 2015 at 07:15:23 UTC, Vladimir Panteleev wrote: On Sunday, 8 February 2015 at 21:02:14 UTC, Jacob Carlborg wrote: The above command will obviously not compile bar.d. What I mean is that it's no longer enough to

Re: Git, the D package manager

2015-02-09 Thread Vladimir Panteleev via Digitalmars-d
On Monday, 9 February 2015 at 08:10:56 UTC, Jacob Carlborg wrote: On 2015-02-09 08:15, Vladimir Panteleev wrote: OK, but the obviously trivial fix is to either import bar, or create a module that imports all other modules in the library. It's not really enough justification for switching

Re: Git, the D package manager

2015-02-09 Thread Paolo Invernizzi via Digitalmars-d
On Sunday, 8 February 2015 at 20:34:19 UTC, Jacob Carlborg wrote: On 2015-02-03 22:02, H. S. Teoh via Digitalmars-d wrote: Second generation build algorithms are centered around *not* scanning, but taking advantage of modern OSes providing APIs for file change notification. Rather than scan

[Issue 14154] New: [e2ir] Error in e2ir at casting to struct

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14154 Issue ID: 14154 Summary: [e2ir] Error in e2ir at casting to struct Product: D Version: D2 Hardware: x86 OS: Linux Status: NEW Severity: minor

Re: Git, the D package manager

2015-02-09 Thread Russel Winder via Digitalmars-d
On Sun, 2015-02-08 at 08:57 -0800, Andrei Alexandrescu via Digitalmars-d wrote: […] * One more language for the maintainers to know and use. On the other hand by replacing Make you lose two languages, so total one less language to know. * One more dependency. Although scripting languages are

Re: Trusted Manifesto

2015-02-09 Thread Dicebot via Digitalmars-d
On Tuesday, 10 February 2015 at 07:02:23 UTC, Walter Bright wrote: On 2/9/2015 9:06 PM, Dicebot wrote: This was exactly how all those trustedFoo() nested functions have appeared - we wanted to localized unsafe operations with `() @trusted {}` but it wasn't properly inlined by DMD. DMD will

Re: Proposal : aggregated dlang git repository

2015-02-09 Thread weaselcat via Digitalmars-d
On Tuesday, 10 February 2015 at 07:17:11 UTC, Dicebot wrote: At the same time stuff like RefCounted is a mess. +1 (Sorry for the noise, just wanted to share the opinion. :) )

[Issue 11792] Investigate migrating to a meta repo

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11792 Dicebot pub...@dicebot.lv changed: What|Removed |Added CC||pub...@dicebot.lv --- Comment #6

Re: Proposal : aggregated dlang git repository

2015-02-09 Thread Dicebot via Digitalmars-d
On Tuesday, 10 February 2015 at 06:22:51 UTC, Andrei Alexandrescu wrote: Well I have to say something. Great, lets debate :P This proposal is a good example of a cultural lore we should unlearn: high-churn, low-impact changes. https://github.com/D-Programming-Language/dlang.org/pull/896 is

Re: Proposal : aggregated dlang git repository

2015-02-09 Thread Dicebot via Digitalmars-d
On Tuesday, 10 February 2015 at 07:49:28 UTC, Mathias LANG wrote: On Tuesday, 10 February 2015 at 06:22:51 UTC, Andrei Alexandrescu wrote: Well I have to say something. This proposal is a good example of a cultural lore we should unlearn: high-churn, low-impact changes.

Re: Unreachable statement, do or do not, there is no try

2015-02-09 Thread deadalnix via Digitalmars-d
On Tuesday, 10 February 2015 at 07:01:18 UTC, Jacob Carlborg wrote: DMD will complain about the second example if warnings are enabled. Ok I think that answer the question.

[Issue 14162] New: Erratic inference of @safe for lambdas

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14162 Issue ID: 14162 Summary: Erratic inference of @safe for lambdas Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority:

Re: Proposal : aggregated dlang git repository

2015-02-09 Thread Mathias LANG via Digitalmars-d
On Tuesday, 10 February 2015 at 06:22:51 UTC, Andrei Alexandrescu wrote: Well I have to say something. This proposal is a good example of a cultural lore we should unlearn: high-churn, low-impact changes. https://github.com/D-Programming-Language/dlang.org/pull/896 is another example.

Re: A safer interface for core.stdc

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/9/15 9:47 AM, Dicebot wrote: I foresee certain stdc-based primitives being duplicated over and over again as nested functions - in scope of complying with minimal @trusted function that exposes @safe API rule. Would be nice to encapsulate them in Phobos on a case basis. -- Andrei

Re: Git, the D package manager

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/9/15 12:43 AM, Russel Winder via Digitalmars-d wrote: On Sun, 2015-02-08 at 08:57 -0800, Andrei Alexandrescu via Digitalmars-d wrote: […] * One more language for the maintainers to know and use. On the other hand by replacing Make you lose two languages, so total one less language to

Re: Trusted Manifesto

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d
On 2/9/15 12:57 PM, Andrei Alexandrescu wrote: On 2/9/15 7:48 AM, Steven Schveighoffer wrote: auto result = (() @trusted = cast(immutable)a)(); I'm okay with this as with most of Steve's points. But genericness is not a word :o). -- Andrei Merriam Webster says otherwise ;)

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

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d
On 2/6/15 7:29 PM, H. S. Teoh via Digitalmars-d wrote: On Fri, Feb 06, 2015 at 04:04:48PM -0800, Walter Bright via Digitalmars-d wrote: [...] I agree with Andrei in that I do not believe that reviewing a @trusted function, line by line, for safety is necessarily some sort of maintenance

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

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d
On 2/6/15 4:48 PM, Walter Bright wrote: On 2/6/2015 11:11 AM, H. S. Teoh via Digitalmars-d wrote: This is precisely why I have lost all interest in @safe. It's clear that the present problematic situation will continue to hold, and the decision makers are not interested to address it. I am not

Re: Trusted Manifesto

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/9/15 2:09 AM, Kagamin wrote: Also why safe code is allowed to create unsafe lambdas? Might be interesting to restrict that. -- Andrei

Re: A safer interface for core.stdc

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/9/15 1:39 AM, Dicebot wrote: I think this is crucial if we want to keep actual Phobos sources easily review-able within your requirements. There is a good value in having `core.stdc` to map C headers 1-to-1 though. Would you consider separate `core.safestdc` package tree where such

Re: A safer interface for core.stdc

2015-02-09 Thread Dicebot via Digitalmars-d
On Monday, 9 February 2015 at 17:45:09 UTC, Andrei Alexandrescu wrote: On 2/9/15 1:39 AM, Dicebot wrote: I think this is crucial if we want to keep actual Phobos sources easily review-able within your requirements. There is a good value in having `core.stdc` to map C headers 1-to-1 though.

Re: Trusted Manifesto

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/9/15 2:05 AM, Kagamin wrote: On Monday, 9 February 2015 at 08:19:24 UTC, Walter Bright wrote: while not allowing std.conv.trusted escapes in @safe function would be by convention. Can SafeD be enforced given that? At some point you have to define a trusted computing base. That includes

Re: Trusted Manifesto

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/9/15 7:48 AM, Steven Schveighoffer wrote: auto result = (() @trusted = cast(immutable)a)(); I'm okay with this as with most of Steve's points. But genericness is not a word :o). -- Andrei

Re: static `this`

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d
On 2/8/15 5:54 PM, Mike wrote: On Sunday, 8 February 2015 at 13:13:18 UTC, Marc Schütz wrote: On Sunday, 8 February 2015 at 01:57:55 UTC, Meta wrote: On Sunday, 8 February 2015 at 00:31:42 UTC, Mike wrote: Is `this` overloaded to mean this class in a static context or is `this` only valid in

Re: Trusted Manifesto

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d
On 2/9/15 10:12 AM, Steven Schveighoffer wrote: On 2/9/15 12:57 PM, Andrei Alexandrescu wrote: On 2/9/15 7:48 AM, Steven Schveighoffer wrote: auto result = (() @trusted = cast(immutable)a)(); I'm okay with this as with most of Steve's points. But genericness is not a word :o). -- Andrei

[Issue 14157] fabsf fabsl for CRuntime_Microsoft

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14157 --- Comment #1 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/5cd66781280ada9ab07148be7f468c3d7389da95 fix Issue 14157

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

2015-02-09 Thread Kelly via Digitalmars-d-announce
On Monday, 9 February 2015 at 22:24:49 UTC, Elie Morisse wrote: Hi Kelly, Good to see bitset instantiating and basically working too! Can I add your code to the tests? So yes to clear things up a bit, operators are still missing and so are many other features. Off the top of my head: -

Re: How to write similar code D?

2015-02-09 Thread bearophile via Digitalmars-d-learn
Dennis Ritchie: Tell me, please, how to write similar С# code D: This is more or less exactly the same: void main() { import std.stdio, std.range, std.algorithm, std.typecons, std.format; auto query = iota(2, 12) .map!(c = Tuple!(int,length, int,height,

[Issue 14161] UFCS call does not abide by scope

2015-02-09 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14161 Fyodor Ustinov u...@ufm.su changed: What|Removed |Added CC||u...@ufm.su --- Comment #1 from

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

2015-02-09 Thread Andrei Alexandrescu via Digitalmars-d-announce
On 2/8/15 2:45 PM, Elie Morisse wrote: On Sunday, 8 February 2015 at 20:56:31 UTC, Syro wrote: That is really cool. Thanks, just got that tangled mess of templates that is std::string working too: https://github.com/Syniurge/Calypso/blob/master/tests/calypso/libstdc%2B%2B/string.d You may

Re: To write such an expressive code D

2015-02-09 Thread Ali Çehreli via Digitalmars-d-learn
On 02/09/2015 12:05 PM, Dennis Ritchie wrote: On Monday, 9 February 2015 at 20:03:00 UTC, Vladimir Panteleev wrote: On Monday, 9 February 2015 at 19:57:23 UTC, Ali Çehreli wrote: writefln(%(%.15g\n%), sins); In 2.067, you can write: iota(0, PI/2, PI/2/9).map!sin.each!writeln; March 1!

Re: Classes and @disable this()

2015-02-09 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/9/15 3:15 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Monday, February 09, 2015 13:29:22 Steven Schveighoffer via Digitalmars-d-learn wrote: On 2/8/15 2:57 PM, Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, February 08, 2015 17:51:09 bearophile via

  1   2   >