Re: See you soon at dconf

2017-05-02 Thread Dukc via Digitalmars-d
On Tuesday, 2 May 2017 at 20:19:02 UTC, Stefan Koch wrote: Hope this time there is dmd on the machine! perhaps you could alternatively use online compilers like DPaste, assuming there's an internet connection. Of course depending on what you're doing.

Re: CTFE Status 2

2017-05-02 Thread Stefan Koch via Digitalmars-d
On Tuesday, 2 May 2017 at 22:08:31 UTC, Moritz Maxeiner wrote: On Tuesday, 2 May 2017 at 09:55:56 UTC, Stefan Koch wrote: [...] I intended for the debugging functionality to be exposed via a udp socket listening on localhost. Such that a debug-ui does not have to deal with ipc difficulties.

Re: Top level associative arrays

2017-05-02 Thread ANtlord via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 16:34:15 UTC, H. S. Teoh wrote: On Tue, May 02, 2017 at 02:37:20PM +, ANtlord via Digitalmars-d-learn wrote: On Tuesday, 2 May 2017 at 12:41:01 UTC, Jacob Carlborg wrote: > > Note that when declared as "enum", all places it's > referenced, a new associative array

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-02 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 2 May 2017 at 23:27:28 UTC, Marco Leise wrote: Am Tue, 02 May 2017 20:53:50 + schrieb Moritz Maxeiner : On Tuesday, 2 May 2017 at 19:34:44 UTC, Marco Leise wrote: > > I see what you're doing there, but your last point is > wishful thinking. Dynamically

Re: D and SCons

2017-05-02 Thread Dmitry Olshansky via Digitalmars-d
On 5/3/17 12:39 AM, H. S. Teoh via Digitalmars-d wrote: On Wed, May 03, 2017 at 12:05:48AM +0200, Dmitry Olshansky via Digitalmars-d wrote: On 5/2/17 2:20 PM, Russel Winder via Digitalmars-d wrote: Hi, Prompted by Bill Deegan (*), I have started a SCons wiki page on D support. Even if you do

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-02 Thread Marco Leise via Digitalmars-d
Am Tue, 02 May 2017 20:53:50 + schrieb Moritz Maxeiner : > On Tuesday, 2 May 2017 at 19:34:44 UTC, Marco Leise wrote: > > > > I see what you're doing there, but your last point is wishful > > thinking. Dynamically linked binaries can share megabytes of > > code. Even

Re: [OT] Algorithm question

2017-05-02 Thread MysticZach via Digitalmars-d
On Tuesday, 2 May 2017 at 21:00:36 UTC, Timon Gehr wrote: On 02.05.2017 22:42, MysticZach wrote: On Tuesday, 2 May 2017 at 13:44:03 UTC, MysticZach wrote: for (;;) { if (P(a[i])) return i; ++count; if (count == length) return -1; i += hop; if

Re: D and SCons

2017-05-02 Thread H. S. Teoh via Digitalmars-d
On Wed, May 03, 2017 at 12:05:48AM +0200, Dmitry Olshansky via Digitalmars-d wrote: > On 5/2/17 2:20 PM, Russel Winder via Digitalmars-d wrote: > > Hi, > > > > Prompted by Bill Deegan (*), I have started a SCons wiki page on D > > support. Even if you do not actually use SCons for D code, if you

Re: Porting Java code to D that uses << and >>> operators

2017-05-02 Thread Faux Amis via Digitalmars-d-learn
On 2017-05-02 18:55, TheGag96 wrote: On Tuesday, 2 May 2017 at 07:42:45 UTC, Jacob Carlborg wrote: From that link: "Note that dmd currently does not comply with left to right evaluation of function arguments and AssignExpression". This is something I've never understood. Why doesn't DMD

Re: CTFE Status 2

2017-05-02 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 2 May 2017 at 09:55:56 UTC, Stefan Koch wrote: [...] I intended for the debugging functionality to be exposed via a udp socket listening on localhost. Such that a debug-ui does not have to deal with ipc difficulties. Hm, rationale for UDP over TCP here? I would assume one

Re: D and SCons

2017-05-02 Thread Dmitry Olshansky via Digitalmars-d
On 5/2/17 2:20 PM, Russel Winder via Digitalmars-d wrote: Hi, Prompted by Bill Deegan (*), I have started a SCons wiki page on D support. Even if you do not actually use SCons for D code, if you are interested in D you are interested in this page as it is another marketing vector for D. I've

Re: [OT] Algorithm question

2017-05-02 Thread Timon Gehr via Digitalmars-d
On 02.05.2017 22:42, MysticZach wrote: On Tuesday, 2 May 2017 at 13:44:03 UTC, MysticZach wrote: 1. Test a random element in the array. If it satisfies P, return it. 2. Choose a hopper interval, h, that is relatively prime to the number of elements in the array, n. You could do this by randomly

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-02 Thread Moritz Maxeiner via Digitalmars-d
On Tuesday, 2 May 2017 at 19:34:44 UTC, Marco Leise wrote: I see what you're doing there, but your last point is wishful thinking. Dynamically linked binaries can share megabytes of code. Even Phobos - although heavily templated - has proven to be very amenable to sharing. For example, a

Re: Porting Java code to D that uses << and >>> operators

2017-05-02 Thread Faux Amis via Digitalmars-d-learn
On 2017-05-02 09:42, Jacob Carlborg wrote: On 2017-05-02 01:27, Faux Amis wrote: To me, this [2] suggests otherwise ;) Or am I missing something? [2] https://dlang.org/spec/expression.html#order-of-evaluation From that link: "Note that dmd currently does not comply with left to right

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-02 Thread David Nadlinger via Digitalmars-d
On Tuesday, 2 May 2017 at 19:34:44 UTC, Marco Leise wrote: static Phobos2 : 806968 bytes dynamic Phobos2 : 18552 bytes That's about 770 KiB to share or 97.7% of its total size! Awesome! By the way, using LDC: 402736 bytes for the static build (Linux x86_64). ;) — David

Re: [OT] Algorithm question

2017-05-02 Thread MysticZach via Digitalmars-d
On Tuesday, 2 May 2017 at 13:44:03 UTC, MysticZach wrote: 1. Test a random element in the array. If it satisfies P, return it. 2. Choose a hopper interval, h, that is relatively prime to the number of elements in the array, n. You could do this by randomly selecting from a pre-made list of

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-02 Thread Marco Leise via Digitalmars-d
Am Tue, 11 Apr 2017 15:03:36 + schrieb qznc : > On Tuesday, 11 April 2017 at 12:56:59 UTC, Jonathan M Davis wrote: > > But if we just use dub - which _is_ the official packaging and > > build tool - then we avoid these issues. Ideally, the compiler > > and dub would be part of

See you soon at dconf

2017-05-02 Thread Stefan Koch via Digitalmars-d
Hi, I am very happy to see you soon at dconf. And I apologize in advance for my nearly slideless talk. Hope this time there is dmd on the machine! Cheers Stefan

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-02 Thread Marco Leise via Digitalmars-d
Am Tue, 11 Apr 2017 07:40:12 -0700 schrieb Jonathan M Davis via Digitalmars-d : > It could always just be distributed as a static library. There arguably > isn't much point in distributing it as a shared library anyway - > particularly when it's not ABI compatible

Re: problem with std.variant rounding

2017-05-02 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
On 05/02/2017 04:02 AM, Suliman wrote: I need co concatenate string with variant type (I am doing SQL query). What is the best way to put it? It's seems that if I am doing simple `replace` string sql = "..." sql.replace(`37.72308`, to!string(cargpspoint.lon)).replace(`55.47957`,

Re: DIP 1004 Preliminary Review Round 1

2017-05-02 Thread Adam D. Ruppe via Digitalmars-d
On Tuesday, 2 May 2017 at 09:03:27 UTC, deadalnix wrote: 100% in favor of the constructor behavior change in case no constructor is in the derived class. I agree.

[Issue 17364] Difference between slicing a slice and a reference to a slice

2017-05-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17364 --- Comment #2 from ki...@gmx.net --- > For example you can't resolve length before loading the array. Not sure what you mean by 'loading the array'. The base expression evaluates to a slice, a pointer+length pair, in these 2 cases either to a

Re: Member delegate/fp to another member in same object?

2017-05-02 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 17:08:11 UTC, Juanjo Alvarez wrote: struct S { int someState; void some_foo() { return this. someState;} void delegate() foo; void enable() { foo = _foo; } } That's actually illegal in D. It will compile, but has undefined behavior because the

Re: Member delegate/fp to another member in same object?

2017-05-02 Thread Juanjo Alvarez via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 17:08:11 UTC, Juanjo Alvarez wrote: Example: struct S { int someState; void some_foo() { return this. someState;} void delegate() foo; void enable() { foo = _foo; } } unittest { S s; s.someState = 1; enable(); s.someState = 2; assert(foo ==

Member delegate/fp to another member in same object?

2017-05-02 Thread Juanjo Alvarez via Digitalmars-d-learn
Hi! I would like to have a "proxy" delegate, let's call it "foo" that could point to a method or another, let's call them "fast_foo" or "slow_foo" on the same object. This way depending on some conditions I could switch at runtime from one set of methods to others with a "switchFoo(" fast")

Re: The D ecosystem in Debian with free-as-in-freedom DMD

2017-05-02 Thread Marco Leise via Digitalmars-d
Am Wed, 12 Apr 2017 07:42:42 + schrieb Martin Nowak : > Our point releases might also contain small ABI > incompatibilities, so they aren't really eligible as patch > version. I've actually been hit by this in one point release on Gentoo, where I used dynamic linking for

Re: Porting Java code to D that uses << and >>> operators

2017-05-02 Thread TheGag96 via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 07:42:45 UTC, Jacob Carlborg wrote: From that link: "Note that dmd currently does not comply with left to right evaluation of function arguments and AssignExpression". This is something I've never understood. Why doesn't DMD implement the behavior their own

Re: Top level associative arrays

2017-05-02 Thread H. S. Teoh via Digitalmars-d-learn
On Tue, May 02, 2017 at 02:37:20PM +, ANtlord via Digitalmars-d-learn wrote: > On Tuesday, 2 May 2017 at 12:41:01 UTC, Jacob Carlborg wrote: > > > > Note that when declared as "enum", all places it's referenced, a new > > associative array will be allocated. > > If it is allocated at all

[Issue 17359] C++ Interfacing: function with 'static' array parameter cannot be linked (x64)

2017-05-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17359 anonymous4 changed: What|Removed |Added Keywords||C++ --

[Issue 17364] Difference between slicing a slice and a reference to a slice

2017-05-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17364 anonymous4 changed: What|Removed |Added Keywords||spec --- Comment #1

[Issue 17363] @safety hole due to $ caching in slice expressions

2017-05-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=17363 anonymous4 changed: What|Removed |Added Keywords||safe --

Re: Top level associative arrays

2017-05-02 Thread ANtlord via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 14:37:20 UTC, ANtlord wrote: On Tuesday, 2 May 2017 at 12:41:01 UTC, Jacob Carlborg wrote: Note that when declared as "enum", all places it's referenced, a new associative array will be allocated. If it is allocated at all places I can move initialization to

Re: Top level associative arrays

2017-05-02 Thread ANtlord via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 12:41:01 UTC, Jacob Carlborg wrote: Note that when declared as "enum", all places it's referenced, a new associative array will be allocated. If it is allocated at all places I can move initialization to module ctor as says evilrat but how can I make an immutable

Re: CTFE Status 2

2017-05-02 Thread H. S. Teoh via Digitalmars-d
On Tue, May 02, 2017 at 09:55:56AM +, Stefan Koch via Digitalmars-d wrote: [...] > I intended for the debugging functionality to be exposed via a udp > socket listening on localhost. > Such that a debug-ui does not have to deal with ipc difficulties. > I am strictly against building a debugger

Re: [OT] Algorithm question

2017-05-02 Thread MysticZach via Digitalmars-d
On Tuesday, 2 May 2017 at 11:27:17 UTC, Ivan Kazmenko wrote: On Tuesday, 2 May 2017 at 10:35:46 UTC, Ivan Kazmenko wrote: I hope some part of the idea is still salvageable. For example, what if we put the intervals in a queue instead of a stack? I tried to implement a similar approach, but

Re: Definition of D

2017-05-02 Thread Jacob Carlborg via Digitalmars-d
On 2017-05-02 13:01, Russel Winder via Digitalmars-d wrote: Is D defined by DMD it's reference implementation, or is there a formal definition somewhere that is met by the reference implementation? I would say that it's a mix of "The D programming Language", the specification on dlang.org and

Re: Top level associative arrays

2017-05-02 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-05-02 09:48, ANtlord wrote: Hello! Is it possible to define associative array on top level of module? I try to compile this code and I get message `Error: non-constant expression ["s":"q", "ss":"qq"]` import std.stdio; auto dict = [ "s": "q", "ss": "qq" ]; void main() {

D and SCons

2017-05-02 Thread Russel Winder via Digitalmars-d
Hi, Prompted by Bill Deegan (*), I have started a SCons wiki page on D support. Even if you do not actually use SCons for D code, if you are interested in D you are interested in this page as it is another marketing vector for D. Two things: 1. Can people check what is there, and that it has

Re: I'm looking for job on D

2017-05-02 Thread Laeeth Isharc via Digitalmars-d
On Tuesday, 2 May 2017 at 11:32:23 UTC, Sergey wrote: Hi everyone! Is there work where to use D? (remotely) Thanks in advance! https://dlang.org/orgs-using-d.html https://wiki.dlang.org/Current_D_Use But you will probably have more luck if you link to a bio and repository of your work.

I'm looking for job on D

2017-05-02 Thread Sergey via Digitalmars-d
Hi everyone! Is there work where to use D? (remotely) Thanks in advance!

Re: Definition of D

2017-05-02 Thread Basile B. via Digitalmars-d
On Tuesday, 2 May 2017 at 11:01:04 UTC, Russel Winder wrote: Is D defined by DMD it's reference implementation, I'd say that this is the case, with - The D programming Language: http://erdani.com/index.php/books/tdpl/ "The D Programming Language, dubbed TDPL by its readers, is the

Re: [OT] Algorithm question

2017-05-02 Thread Ivan Kazmenko via Digitalmars-d
On Tuesday, 2 May 2017 at 10:35:46 UTC, Ivan Kazmenko wrote: I hope some part of the idea is still salvageable. For example, what if we put the intervals in a queue instead of a stack? I tried to implement a similar approach, but instead of a queue or a stack, I used a random-access array of

Re: DIP 1004 Preliminary Review Round 1

2017-05-02 Thread Andrej Mitrovic via Digitalmars-d
On Tuesday, 2 May 2017 at 09:03:27 UTC, deadalnix wrote: 100% in favor of the constructor behavior change in case no constructor is in the derived class. I think we could even split this up into two separate proposals, because this part of the DIP is fairly non-controversial and could be

Definition of D

2017-05-02 Thread Russel Winder via Digitalmars-d
Is D defined by DMD it's reference implementation, or is there a formal definition somewhere that is met by the reference implementation? -- Russel. = Dr Russel Winder t: +44 20 7585 2200 voip:

Re: [OT] Algorithm question

2017-05-02 Thread Ivan Kazmenko via Digitalmars-d
On Monday, 1 May 2017 at 21:54:43 UTC, MysticZach wrote: On Monday, 1 May 2017 at 16:56:58 UTC, MysticZach wrote: The goal is to have the first hit be the one you return. The method: if a random pick doesn't satisfy, randomly choose the partition greater than or less than based on

Re: DIP 1004 Preliminary Review Round 1

2017-05-02 Thread Basile B. via Digitalmars-d
On Monday, 1 May 2017 at 16:08:36 UTC, Andrej Mitrovic wrote: On Monday, 1 May 2017 at 15:33:47 UTC, Basile B. wrote: On Monday, 1 May 2017 at 14:55:28 UTC, Mike Parker wrote: DIP 1004 is titled "Inherited Constructors. [...] All review-related feedback on and discussion of the DIP should

Re: DIP 1004 Preliminary Review Round 1

2017-05-02 Thread Dmitry Olshansky via Digitalmars-d
On 5/2/17 11:03 AM, deadalnix wrote: On Monday, 1 May 2017 at 14:55:28 UTC, Mike Parker wrote: DIP 1004 is titled "Inherited Constructors. https://github.com/dlang/DIPs/blob/master/DIPs/DIP1004.md All review-related feedback on and discussion of the DIP should occur in this thread. Due to

Re: Top level associative arrays

2017-05-02 Thread evilrat via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 09:50:50 UTC, ANtlord wrote: On Tuesday, 2 May 2017 at 08:24:09 UTC, evilrat wrote: Making enum means that value should be available at compile time and AA's are fully dynamic. But if my memory serves me well, you can declare empty AA and delay initialization. So

Re: CTFE Status 2

2017-05-02 Thread Stefan Koch via Digitalmars-d
On Monday, 1 May 2017 at 19:06:24 UTC, H. S. Teoh wrote: On Mon, May 01, 2017 at 06:23:08PM +, Stefan Koch via Digitalmars-d wrote: [...] I'm not sure about providing a debugger UI inside the compiler itself... it's certainly possible, and could lead to interesting new ways of using a

Re: Top level associative arrays

2017-05-02 Thread ANtlord via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 08:24:09 UTC, evilrat wrote: Making enum means that value should be available at compile time and AA's are fully dynamic. But if my memory serves me well, you can declare empty AA and delay initialization. So the closest solution is to move initialization of AA to

Re: DIP 1004 Preliminary Review Round 1

2017-05-02 Thread deadalnix via Digitalmars-d
On Monday, 1 May 2017 at 14:55:28 UTC, Mike Parker wrote: DIP 1004 is titled "Inherited Constructors. https://github.com/dlang/DIPs/blob/master/DIPs/DIP1004.md All review-related feedback on and discussion of the DIP should occur in this thread. Due to DConf taking place during the review

Re: problem with std.variant rounding

2017-05-02 Thread Suliman via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 08:02:23 UTC, Suliman wrote: On Saturday, 29 April 2017 at 08:57:09 UTC, Petar Kirov [ZombineDev] wrote: On Friday, 28 April 2017 at 18:08:38 UTC, H. S. Teoh wrote: On Fri, Apr 28, 2017 at 04:42:28PM +, via Digitalmars-d-learn wrote: [...]

Re: Top level associative arrays

2017-05-02 Thread evilrat via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 07:48:35 UTC, ANtlord wrote: Hello! Is it possible to define associative array on top level of module? I try to compile this code and I get message `Error: non-constant expression ["s":"q", "ss":"qq"]` import std.stdio; auto dict = [ "s": "q", "ss":

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-05-02 Thread Atila Neves via Digitalmars-d
On Monday, 1 May 2017 at 07:42:19 UTC, Sebastiaan Koppe wrote: On Friday, 28 April 2017 at 22:18:54 UTC, Atila Neves wrote: Done. I also added to the README that it has its own versions of the range constraints from Phobos that can be used with `@models`. Atila Example of an error message

Re: problem with std.variant rounding

2017-05-02 Thread Suliman via Digitalmars-d-learn
On Saturday, 29 April 2017 at 08:57:09 UTC, Petar Kirov [ZombineDev] wrote: On Friday, 28 April 2017 at 18:08:38 UTC, H. S. Teoh wrote: On Fri, Apr 28, 2017 at 04:42:28PM +, via Digitalmars-d-learn wrote: [...] writefln(text("%.", i, "f"), x); [...] There's no need to use text()

Re: Top level associative arrays

2017-05-02 Thread ANtlord via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 07:48:35 UTC, ANtlord wrote: Hello! Is it possible to define associative array on top level of module? I try to compile this code and I get message `Error: non-constant expression ["s":"q", "ss":"qq"]` import std.stdio; auto dict = [ "s": "q", "ss":

Re: Top level associative arrays

2017-05-02 Thread ANtlord via Digitalmars-d-learn
On Tuesday, 2 May 2017 at 07:48:35 UTC, ANtlord wrote: Hello! Is it possible to define associative array on top level of module? I try to compile this code and I get message `Error: non-constant expression ["s":"q", "ss":"qq"]` import std.stdio; auto dict = [ "s": "q", "ss":

Top level associative arrays

2017-05-02 Thread ANtlord via Digitalmars-d-learn
Hello! Is it possible to define associative array on top level of module? I try to compile this code and I get message `Error: non-constant expression ["s":"q", "ss":"qq"]` import std.stdio; auto dict = [ "s": "q", "ss": "qq" ]; void main() { writeln(val); } I solved

Re: Porting Java code to D that uses << and >>> operators

2017-05-02 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-05-02 01:27, Faux Amis wrote: To me, this [2] suggests otherwise ;) Or am I missing something? [2] https://dlang.org/spec/expression.html#order-of-evaluation From that link: "Note that dmd currently does not comply with left to right evaluation of function arguments and

[Issue 13017] opEquals for null std.typecons.Nullable

2017-05-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13017 Mario Kroeplin changed: What|Removed |Added CC||qas...@gmail.com

[Issue 10771] std.typecons.Nullable throws an exception on comparision of null values

2017-05-02 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=10771 Mario Kroeplin changed: What|Removed |Added Status|NEW |RESOLVED

Re: Interesting PRs: bringing type system legitimacy to shared allocators

2017-05-02 Thread Nick Sabalausky (Abscissa) via Digitalmars-d
On 05/01/2017 10:51 PM, Stanislav Blinov wrote: On Monday, 1 May 2017 at 16:31:10 UTC, Nick Sabalausky (Abscissa) wrote: If we had a type similar to TaggedAlgebraic... Destroy? It's too strict: you have to specify concrete types beforehand. No, that's why my suggestion was: "If we had a