Re: version and configuration

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 12 September 2015 at 14:41:45 UTC, Spacen Jasset It appears that I can't put this in a module and import it elsewhere to test the version specifications as they are all in their own namespaces. Is this then a dead end for having a feature configuration file? Correct, version

Re: Mixin templates accessing mixed out scope

2015-09-12 Thread Prudence via Digitalmars-d-learn
On Saturday, 12 September 2015 at 17:11:04 UTC, anonymous wrote: On Saturday 12 September 2015 16:30, Ali Çehreli wrote: Reduced: [...] Error: type SingleStore is not an expression Reduced further: class MyStore { class SingleStore { static void New() // Removing

Re: Floating point in the type system

2015-09-12 Thread via Digitalmars-d
On Saturday, 12 September 2015 at 19:02:16 UTC, Robert wrote: For what it's worth, I was investigating this initially as a discussion about adding type-level values in Rust, and how to handle unusual cases like this. C++ does not allow it. And frankly, having more than a single integer value

Re: Type helpers instead of UFCS

2015-09-12 Thread BBasile via Digitalmars-d
On Saturday, 12 September 2015 at 20:54:09 UTC, Enamex wrote: On Saturday, 12 September 2015 at 20:40:35 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2015-09-12 Thread Jonathan M Davis via Digitalmars-d
On Saturday, 12 September 2015 at 14:26:10 UTC, Jacob Carlborg wrote: On 2015-09-12 03:23, Jonathan M Davis wrote: Though, now that I think about it, we should probably also put it in undead now. I think it can be put in undead as soon as something is deprecated or to-be-deprecated in the

Re: Calling D from C, C++, Python…

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 12 September 2015 at 09:47:55 UTC, Jacob Carlborg wrote: Well, if your D function doesn't use anything of the runtime I guess it's not necessary. Right. If you don't call into the threading system in the druntime, you should be ok. Keep in mind though that the GC uses the

[Issue 12210] dlang.org home page example - Run button does not work

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12210 Vladimir Panteleev changed: What|Removed |Added Depends on||15051 --

[Issue 15051] New: Code that runs fine on dpaste.dzfl.pl refuses to run on dlang.org

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15051 Issue ID: 15051 Summary: Code that runs fine on dpaste.dzfl.pl refuses to run on dlang.org Product: D Version: D2 Hardware: All URL:

Re: Reasons to use D

2015-09-12 Thread via Digitalmars-d
On Saturday, 12 September 2015 at 18:48:52 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 18:44:44 UTC, Ola Fosheim Grøstad wrote: Arrayviews ("slices") are available as a type so you can do it like this: Yeah, there's also the Array.slice and String.substring that work kinda

Rust style memory management

2015-09-12 Thread Freddy via Digitalmars-d
So I saw this video: https://air.mozilla.org/guaranteeing-memory-safety-in-rust/ and was amazed. Is there any way we can implement this in D? What language extensions would be required? My idea on implement this would be to add 3 new pointer (and array) types : [owned,shared immutable,borrow

Re: Type helpers instead of UFCS

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems like a pretty easy problem, except perhaps with complex templates. - noobs, code is unreadable. meh

Re: shared array?

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 12 September 2015 at 22:36:00 UTC, Laeeth Isharc wrote: Thank you for this. How large is the allocation for closure for a delegate? Just a pair of pointers? It depends on what the delegate needs to capture. It makes a copy of the local variables the function is referencing.

Re: Type helpers instead of UFCS

2015-09-12 Thread Idan Arye via Digitalmars-d
On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: That's why I propose the new keywords 'helper' and 'subject' that will allow to extend the properties pre-defined for a type, as long as the helper is imported: --- module myhelper; helper for subject : string Do we really need

Re: shared array?

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 12 September 2015 at 13:42:44 UTC, Prudence wrote: Using it at all is a problem because one doesn't know when and where. It is called when the collect function is called and where it was called from. D's garbage collector isn't magic, it is just a function that frees memory

Re: Moving forward with work on the D language and foundation

2015-09-12 Thread BBasile via Digitalmars-d-announce
On Friday, 28 August 2015 at 12:28:43 UTC, Russel Winder wrote: On Thu, 2015-08-27 at 16:01 +, BBasile via Digitalmars-d-announce wrote: […] That's courageous, particularly past 50 yo. It's a different culture, past 50 yo in Europe people choose security, but in USA, past 50 yo some

Re: Reasons to use D

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 16:34:42 UTC, Meta wrote: Maybe because the static type system allows for overloading and so all of these utility functions don't have to do a million different things depending on what you pass to them. Yea. Another huge thing to me is the slice operator. I

Re: Calling D from C, C++, Python…

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d-learn
On Saturday, 12 September 2015 at 18:20:37 UTC, Brad Roberts wrote: You can get away with it in some circumstances, but it's at your own risk. Yeah, I agree.

Re: I guess this is a bug?

2015-09-12 Thread anonymous via Digitalmars-d-learn
On Saturday 12 September 2015 20:28, Random D user wrote: > prints (with option B): > bar: 0.00, 0.00 // BUG?? > baz: 1.00, 2.00 Looks like a bug to me. Please file an issue at https://issues.dlang.org/

Re: Reasons to use D

2015-09-12 Thread via Digitalmars-d
On Saturday, 12 September 2015 at 18:23:55 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 16:34:42 UTC, Meta wrote: Maybe because the static type system allows for overloading and so all of these utility functions don't have to do a million different things depending on what you

[Issue 15036] SimpleDllMain assumes various symbols are available unqualified

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15036 Vladimir Panteleev changed: What|Removed |Added Keywords||pull

[Issue 15043] [e2ir] dmd still crashes when trying to set a delegate from __traits(getOverloads)

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15043 bb.t...@gmx.com changed: What|Removed |Added Status|NEW |ASSIGNED

Re: Moving forward with work on the D language and foundation

2015-09-12 Thread BBasile via Digitalmars-d-announce
On Saturday, 12 September 2015 at 22:28:49 UTC, BBasile wrote: On Friday, 28 August 2015 at 12:28:43 UTC, Russel Winder wrote: On Thu, 2015-08-27 at 16:01 +, BBasile via Digitalmars-d-announce wrote: […] That's courageous, particularly past 50 yo. It's a different culture, past 50 yo in

Re: Rust style memory management

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
Try using the -dip25 switch to dmd, it does one more step in D toward making a borrow thingy. Nowhere near the level Rust does it, but combined with other library things like destructors, prohibiting copying, etc., it can kinda make a owned thing with borrowed bits.

[Issue 15049] New: bad error message when trying to instantiate a nested class in a static method

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15049 Issue ID: 15049 Summary: bad error message when trying to instantiate a nested class in a static method Product: D Version: D2 Hardware: All OS: All

Re: I guess this is a bug?

2015-09-12 Thread Random D user via Digitalmars-d-learn
On Saturday, 12 September 2015 at 18:28:02 UTC, Random D user wrote: or is it some obscure feature conflict? [...] Oh... and I'm using win 64-bit and dmd 2.068.1, but this behavior was present earlier than that...

Re: Reasons to use D

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 18:59:11 UTC, Ola Fosheim Grøstad wrote: Array.slice create value copies, not reference views. I don't think there is a "slice" for Array. :-/ Right, that's why I said "kinda similarly"... the copy is really important if you want to mutate it, but it is good

Re: Type helpers instead of UFCS

2015-09-12 Thread BBasile via Digitalmars-d
On Saturday, 12 September 2015 at 20:40:35 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems like a pretty easy problem, except perhaps with complex

Re: Moving forward with work on the D language and foundation

2015-09-12 Thread BBasile via Digitalmars-d-announce
On Friday, 28 August 2015 at 12:28:43 UTC, Russel Winder wrote: On Thu, 2015-08-27 at 16:01 +, BBasile via Digitalmars-d-announce wrote: […] That's courageous, particularly past 50 yo. It's a different culture, past 50 yo in Europe people choose security, but in USA, past 50 yo some

Re: Rust style memory management

2015-09-12 Thread deadalnix via Digitalmars-d
On Saturday, 12 September 2015 at 23:21:48 UTC, welkam wrote: On Saturday, 12 September 2015 at 20:17:04 UTC, Freddy wrote: So I saw this video: https://air.mozilla.org/guaranteeing-memory-safety-in-rust/ and was amazed. Is there any way we can implement this in D? What language extensions

Re: Rust style memory management

2015-09-12 Thread deadalnix via Digitalmars-d
On Saturday, 12 September 2015 at 20:33:39 UTC, Adam D. Ruppe wrote: Try using the -dip25 switch to dmd, it does one more step in D toward making a borrow thingy. Nowhere near the level Rust does it, but combined with other library things like destructors, prohibiting copying, etc., it can

Re: Mixin templates accessing mixed out scope

2015-09-12 Thread Prudence via Digitalmars-d-learn
On Saturday, 12 September 2015 at 14:30:16 UTC, Ali Çehreli wrote: On 09/12/2015 06:37 AM, Prudence wrote: Says the creating new SingleStore is not an expression Reduced: mixin template ObjectStore(TKey) { class SingleStore { static void New()// Removing 'static'

I guess this is a bug?

2015-09-12 Thread Random D user via Digitalmars-d-learn
or is it some obscure feature conflict? struct Foo { this( float x_, float y_ ) { // option A //x = x_; //y = y_; // option B v[0] = x_; v[1] = y_; } union { struct { float x = 0; float

Massive linker error after upgrade to DMD 2.068.1-1

2015-09-12 Thread rcorre via Digitalmars-d-learn
After upgrading from DMD 2.068.0-1 to DMD 2.068.1-1, my project began producing a large linker error (when built using dub). I was able to trace it down to a single line: target = target.adjacent(Diagonals.yes).randomSample(1).front; target is of type RowCol

Re: Operator overloading or alternatives to expression templates

2015-09-12 Thread Bahman Movaqar via Digitalmars-d
On Fri, 11 Sep 2015 21:40:58 +0200, Martin Nowak wrote: Does anyone have a different idea how to make a nice query language? db.get!Person.where!(p => p.age > 21 && p.name == "Peter") Django's approach is, IMO, the cleverest and least magical one while keeping

Re: shared array?

2015-09-12 Thread Laeeth Isharc via Digitalmars-d-learn
On Saturday, 12 September 2015 at 06:23:12 UTC, Jonathan M Davis wrote: Aside from the few classes in Phobos, its GC usage is almost entirely restricted to when it allocates arrays or when it has to allocate a closure for a delegate, which can happen in some cases when passing predicates to

Re: Rust style memory management

2015-09-12 Thread welkam via Digitalmars-d
On Saturday, 12 September 2015 at 20:17:04 UTC, Freddy wrote: So I saw this video: https://air.mozilla.org/guaranteeing-memory-safety-in-rust/ and was amazed. Is there any way we can implement this in D? What language extensions would be required? My idea on implement this would be to add 3

Re: Floating point in the type system

2015-09-12 Thread Robert via Digitalmars-d
On Saturday, 12 September 2015 at 15:13:27 UTC, Robert wrote: Hi all, I came across this example, and wondered what your thoughts on it are: It seems a little unusual to me. Robert For what it's worth, I was investigating this initially as a discussion about adding type-level values

Re: Operator overloading or alternatives to expression templates

2015-09-12 Thread Martin Nowak via Digitalmars-d
On Friday, 11 September 2015 at 23:47:42 UTC, Andrei Alexandrescu wrote: 1. Use lambdas, which seem to already do what you want: db.get!Person.filter!(p => p.age > 21 && p.name == "Peter") The way this'd go, the db.get!Person() call returns an input range of Person. Presumably introspection

Re: Rust style memory management

2015-09-12 Thread Enamex via Digitalmars-d
On Saturday, 12 September 2015 at 20:17:04 UTC, Freddy wrote: So I saw this video: https://air.mozilla.org/guaranteeing-memory-safety-in-rust/ and was amazed. Is there any way we can implement this in D? What language extensions would be required? My idea on implement this would be to add 3

Type helpers instead of UFCS

2015-09-12 Thread BBasile via Digitalmars-d
UFCS is good but there are two huge problems: - code completion in IDE. It'will never work. - noobs, code is unreadable. That's why I propose the new keywords 'helper' and 'subject' that will allow to extend the properties pre-defined for a type, as long as the helper is imported: --- module

Re: module std.stream is deprecated - Will be removed by phobos version 2.070

2015-09-12 Thread Jonathan M Davis via Digitalmars-d
On Saturday, 12 September 2015 at 14:24:21 UTC, Jacob Carlborg wrote: The problem with adding notifications in the documentation is that if a user already has implemented code that uses the particular model and have no need to change the code. Or the user already is familiar with the module

Re: Why does reverse also flips my other dynamic array?

2015-09-12 Thread Ali Çehreli via Digitalmars-d-learn
On 09/12/2015 02:29 PM, Marco Leise wrote: > Note that often the original dynamic array has additional > capacity beyond its length. This can be used to ~= additional > items without causing a reallocation, but is lost when you > do the assignment "b = a". Actually, the capacity is still there,

Re: Hello World Example with Glade?

2015-09-12 Thread Mike McKee via Digitalmars-d-learn
On Saturday, 12 September 2015 at 09:03:53 UTC, Russel Winder wrote: Once you get to a GtkD application bigger than "Hello World" create a project and use Dub. Oh yes, Dub. That's the ticket. Thanks, mate.

Re: Reasons to use D

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 11:36:47 UTC, Sebastiaan Koppe wrote: I suppose you mean changing the contents of an existing script element. I was talking about inserting a new inline-script via html(). oh yeah, you are right. That's one thing I do like about D though: I find it so much

Re: Floating point in the type system

2015-09-12 Thread Ola Fosheim Grostad via Digitalmars-d
On Saturday, 12 September 2015 at 16:08:31 UTC, Robert wrote: assert and runtime assert failing. I'm just curious to understand the reasoning behind this, whether it's intentional, and whether it matters at all. Types need to mangle to the same name, but using floats in a type name is

Re: Better lambdas!!!!!!!!!!

2015-09-12 Thread Prudence via Digitalmars-d
On Saturday, 12 September 2015 at 10:44:05 UTC, Pierre Krafft wrote: On Saturday, 12 September 2015 at 03:32:51 UTC, Prudence wrote: On Saturday, 12 September 2015 at 02:13:11 UTC, Pierre Krafft wrote: On Saturday, 12 September 2015 at 01:03:54 UTC, Prudence wrote: On Thursday, 10 September

Re: Mixin templates accessing mixed out scope

2015-09-12 Thread anonymous via Digitalmars-d-learn
On Saturday 12 September 2015 16:30, Ali Çehreli wrote: > Reduced: [...] > Error: type SingleStore is not an expression Reduced further: class MyStore { class SingleStore { static void New() // Removing 'static' compiles { new SingleStore(); }

[Issue 15050] DPaste is always passing an empty second argument to programs

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15050 Vladimir Panteleev changed: What|Removed |Added Blocks||12210 --

[Issue 12210] dlang.org home page example - Run button does not work

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12210 Vladimir Panteleev changed: What|Removed |Added Depends on||15050 --

[Issue 15050] New: DPaste is always passing an empty second argument to programs

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15050 Issue ID: 15050 Summary: DPaste is always passing an empty second argument to programs Product: D Version: D2 Hardware: All URL:

Re: Mixin templates accessing mixed out scope

2015-09-12 Thread anonymous via Digitalmars-d-learn
On Saturday 12 September 2015 19:36, Prudence wrote: > On Saturday, 12 September 2015 at 17:11:04 UTC, anonymous wrote: [...] >> class MyStore >> { >> class SingleStore >> { >> static void New() // Removing 'static' compiles >> { >> new SingleStore(); >>

Re: Calling D from C, C++, Python…

2015-09-12 Thread Brad Roberts via Digitalmars-d-learn
On 9/12/15 9:20 AM, Adam D. Ruppe via Digitalmars-d-learn wrote: On Saturday, 12 September 2015 at 09:47:55 UTC, Jacob Carlborg wrote: Well, if your D function doesn't use anything of the runtime I guess it's not necessary. Right. If you don't call into the threading system in the druntime,

[Issue 12210] dlang.org home page example - Run button does not work

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12210 Vladimir Panteleev changed: What|Removed |Added Assignee|thecybersha...@gmail.com

Re: Reasons to use D

2015-09-12 Thread Adam D. Ruppe via Digitalmars-d
On Saturday, 12 September 2015 at 18:44:44 UTC, Ola Fosheim Grøstad wrote: Arrayviews ("slices") are available as a type so you can do it like this: Yeah, there's also the Array.slice and String.substring that work kinda similarly in old standard javascript. But there's still a lot of

[Issue 15036] SimpleDllMain assumes various symbols are available unqualified

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

[Issue 15036] SimpleDllMain assumes various symbols are available unqualified

2015-09-12 Thread via Digitalmars-d-bugs
- SimpleDllMain assumes various symbols are available unqualified https://github.com/D-Programming-Language/druntime/commit/15cde5050c8341fec3c8b5f5ad83eac2a92fe6f3 Merge pull request #1385 from CyberShadow/pull-20150912-184323 fix Issue 15036 - SimpleDllMain assumes various symbols are available… --

Re: Operator overloading or alternatives to expression templates

2015-09-12 Thread Dmitry Olshansky via Digitalmars-d
On 12-Sep-2015 23:08, Martin Nowak wrote: On Friday, 11 September 2015 at 23:47:42 UTC, Andrei Alexandrescu wrote: 1. Use lambdas, which seem to already do what you want: db.get!Person.filter!(p => p.age > 21 && p.name == "Peter") The way this'd go, the db.get!Person() call returns an input

Re: Operator overloading or alternatives to expression templates

2015-09-12 Thread Martin Nowak via Digitalmars-d
On Friday, 11 September 2015 at 23:19:54 UTC, Timon Gehr wrote: Does anyone have a different idea how to make a nice query language? db.get!Person.where!(p => p.age > 21 && p.name == "Peter") You could give up on operator syntax. That's what I did in the prototype, p.age.gt(21), but it's

Re: Type helpers instead of UFCS

2015-09-12 Thread Enamex via Digitalmars-d
On Saturday, 12 September 2015 at 20:40:35 UTC, Adam D. Ruppe wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: - code completion in IDE. It'will never work. Why not? I haven't actually tried it, but it seems like a pretty easy problem, except perhaps with complex

Re: Reasons to use D

2015-09-12 Thread via Digitalmars-d
On Saturday, 12 September 2015 at 20:03:09 UTC, Adam D. Ruppe wrote: That's basically what my D->JS thing did back in 2011. Nice, so now you will do it again in 2016 ? ;) That actually worked somewhat well in my dtojs but it was a mild hassle too once function callbacks got more involved.

Re: Floating point in the type system

2015-09-12 Thread via Digitalmars-d
On Saturday, 12 September 2015 at 19:02:16 UTC, Robert wrote: handle unusual cases like this. In the process we've managed to break the Idris type system: https://github.com/idris-lang/Idris-dev/issues/2609. I don't know Idris, but you can't easily unify over floats, because they are samples

Re: Floating point in the type system

2015-09-12 Thread Xinok via Digitalmars-d
On Saturday, 12 September 2015 at 16:08:31 UTC, Robert wrote: On Saturday, 12 September 2015 at 15:49:23 UTC, Atila Neves wrote: What do think is unusual? Atila It's unusual, because `float.nan != float.nan`, so one might expect that `typeof(Foo!(float.nan) != Foo!(float.nan))`, whereas

Re: A collection of DIPs

2015-09-12 Thread NX via Digitalmars-d
On Saturday, 12 September 2015 at 15:54:53 UTC, Adam D. Ruppe wrote: D programs *never* have a GC thread. Remember, the D GC isn't magic and isn't actually even that complicated, it is just an ordinary function call. That's what I was afraid of :'(

Re: Reasons to use D

2015-09-12 Thread Meta via Digitalmars-d
On Saturday, 12 September 2015 at 16:32:52 UTC, Adam D. Ruppe wrote: oh yeah, you are right. That's one thing I do like about D though: I find it so much easier to remember (perhaps because I wrote most the libs I use myself). I forget the difference between stuff like substr and substring in

Re: Floating point in the type system

2015-09-12 Thread anonymous via Digitalmars-d
On Saturday 12 September 2015 18:08, Robert wrote: > It's unusual, because `float.nan != float.nan`, so one might > expect that `typeof(Foo!(float.nan) != Foo!(float.nan))`, whereas > this is clearly not the case, even with both the static assert > and runtime assert failing. I'm just curious

Re: Why does reverse also flips my other dynamic array?

2015-09-12 Thread Marco Leise via Digitalmars-d-learn
Am Sat, 12 Sep 2015 10:55:50 + schrieb "Namal" : > > Why is also b flipped here? This doesn't happen if I use static > > arrays. > > nvm. I need to .dup that. Correct, static arrays are value types and copied on assignment. Dynamic arrays on the other hand are generally

Re: shared array?

2015-09-12 Thread Laeeth Isharc via Digitalmars-d-learn
On Saturday, 12 September 2015 at 13:42:44 UTC, Prudence wrote: Saying that it doesn't use it most of the time is not an answer/solution. Using it at all is a problem because one doesn't know when and where. I realize there is a switch now(-vgc), and maybe that is the solution, but you say

[Issue 15052] New: dmd/std/utf.d error on variable std.utf.byCodeUnit!(inout(char)[]).byCodeUnit.ByCodeUnitImpl.r

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15052 Issue ID: 15052 Summary: dmd/std/utf.d error on variable std.utf.byCodeUnit!(inout(char)[]).byCodeUnit.ByCodeUn itImpl.r Product: D Version: D2 Hardware:

Re: Massive linker error after upgrade to DMD 2.068.1-1

2015-09-12 Thread Nicholas Wilson via Digitalmars-d-learn
On Saturday, 12 September 2015 at 20:05:28 UTC, rcorre wrote: After upgrading from DMD 2.068.0-1 to DMD 2.068.1-1, my project began producing a large linker error (when built using dub). I was able to trace it down to a single line: target =

[Issue 15052] dmd/std/utf.d error on variable std.utf.byCodeUnit!(inout(char)[]).byCodeUnit.ByCodeUnitImpl.r

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15052 pedrolopes changed: What|Removed |Added CC||pedrolo...@gmx.com

[Issue 15052] dmd/std/utf.d error on variable std.utf.byCodeUnit!(inout(char)[]).byCodeUnit.ByCodeUnitImpl.r

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15052 pedrolopes changed: What|Removed |Added Component|dmd |phobos --

Re: Looking for someone that could work on 32 bits support for SDC

2015-09-12 Thread deadalnix via Digitalmars-d
On Sunday, 13 September 2015 at 01:17:17 UTC, Brandon Ragland wrote: x86 would be easiest to target. I've checked out the repo, built it so far, and indeed some failures but no big deals. Currently paging through to get a hold on what's in there. (I'll be the first to admit I don't know

Re: Does a synchronization yield on waiting thread?

2015-09-12 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/12/15 10:48 PM, Prudence wrote: It would seem to be the logical thing to do? That is, suppose two threads are sharing a resource. Thread A has it locked. B is "waiting". Is B in a loop burning cycles running in the background(regardless of thread.sleep, which only alleviates the problem)

Re: Type helpers instead of UFCS

2015-09-12 Thread BBasile via Digitalmars-d
On Saturday, 12 September 2015 at 22:44:41 UTC, Idan Arye wrote: On Saturday, 12 September 2015 at 20:37:37 UTC, BBasile wrote: That's why I propose the new keywords 'helper' and 'subject' that will allow to extend the properties pre-defined for a type, as long as the helper is imported: ---

Re: Looking for someone that could work on 32 bits support for SDC

2015-09-12 Thread BBasile via Digitalmars-d
On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote: All is in the title. ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are valuable targets IMO. I can provide support, but I just don't have the bandwidth to pull it by myself. If someone could step up, that'd be

Re: reading file byLine

2015-09-12 Thread deed via Digitalmars-d-learn
On Saturday, 12 September 2015 at 12:51:04 UTC, Namal wrote: Anyway, there is no .reverse for strings I guess, what is the way to completely reverse a string in D? What do you want to do? Do you want to keep your data in original order, but get a reversed view of it for something, or do you

[Issue 15019] [ICE] Heisencrash on OS X 32-bit with non-trivial projects

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15019 --- Comment #13 from Vladimir Panteleev --- I think I found the cause of the memory corruption, but not the root cause of the bug. If you apply these patches:

[Issue 15053] New: Runtime.cArgs not @nogc

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15053 Issue ID: 15053 Summary: Runtime.cArgs not @nogc Product: D Version: D2 Hardware: x86_64 OS: All Status: NEW Severity: enhancement Priority: P1

Re: Enumap -- a lightweight AA alternative when your keys are enums

2015-09-12 Thread rcorre via Digitalmars-d-announce
On Friday, 11 September 2015 at 03:25:58 UTC, SimonN wrote: It doesn't seem to matter whether I put const int, or int, in the foreach statement. What's the idiomatic way to loop over a const Enumap? :-) -- Simon I've released v0.4.0, which implements foreach with ref, and (hopefully)

[Issue 15052] dmd/std/utf.d error on variable std.utf.byCodeUnit!(inout(char)[]).byCodeUnit.ByCodeUnitImpl.r

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15052 pedrolopes changed: What|Removed |Added Status|NEW |RESOLVED

Re: Looking for someone that could work on 32 bits support for SDC

2015-09-12 Thread Brandon Ragland via Digitalmars-d
On Friday, 11 September 2015 at 01:35:09 UTC, deadalnix wrote: On Friday, 11 September 2015 at 01:12:21 UTC, Brandon Ragland wrote: [...] Sure. First thing first, try to checkout the project and get it to build and pass the tests (well, some tests will fail, but you should get 0

Re: Adjacent Pairs Range

2015-09-12 Thread deed via Digitalmars-d-learn
On Saturday, 12 September 2015 at 10:17:19 UTC, Nordlöw wrote: How do I most elegantly iterate all the adjacent pairs in an `InputRange` using Phobos? Something like [1,2,3,4] => [(1,2), (2,3), (3,4)] Why not just: zip(arr[0 .. $-1], arr[1 .. $]) ?

Re: Operator overloading or alternatives to expression templates

2015-09-12 Thread Andrei Alexandrescu via Digitalmars-d
On 09/12/2015 04:08 PM, Martin Nowak wrote: On Friday, 11 September 2015 at 23:47:42 UTC, Andrei Alexandrescu wrote: 1. Use lambdas, which seem to already do what you want: db.get!Person.filter!(p => p.age > 21 && p.name == "Peter") The way this'd go, the db.get!Person() call returns an input

Re: Build It And They Will Not Come

2015-09-12 Thread Bahman Movaqar via Digitalmars-d-announce
On 09/13/2015 08:51 AM, Meta wrote: > It's funny, people are willing to suspend their disbelief for demons > from hell, but not for the lack of a flashlight and duct tape. It's > probably because it was an annoying game mechanic, and taping a > flashlight to a gun is something so simple and

Does a synchronization yield on waiting thread?

2015-09-12 Thread Prudence via Digitalmars-d-learn
It would seem to be the logical thing to do? That is, suppose two threads are sharing a resource. Thread A has it locked. B is "waiting". Is B in a loop burning cycles running in the background(regardless of thread.sleep, which only alleviates the problem) or does it yield completely and

Re: Build It And They Will Not Come

2015-09-12 Thread Meta via Digitalmars-d-announce
On Saturday, 12 September 2015 at 14:25:46 UTC, Nick Sabalausky wrote: That's pretty similar to how I felt about Doom3: People complained how "unrealistic" it was to not be able to duct tape the flashlight to the gun, but...For crap's sake, it's a game about a demon invasion from hell and one

Re: Looking for someone that could work on 32 bits support for SDC

2015-09-12 Thread deadalnix via Digitalmars-d
On Sunday, 13 September 2015 at 02:19:27 UTC, BBasile wrote: On Wednesday, 9 September 2015 at 20:33:43 UTC, deadalnix wrote: All is in the title. ARM/Mips/pNaCl/WebAssembly require 32bits to work. These are valuable targets IMO. I can provide support, but I just don't have the bandwidth to

Re: A collection of DIPs

2015-09-12 Thread NX via Digitalmars-d
On Friday, 11 September 2015 at 19:30:56 UTC, ponce wrote: Some of us use and need @nogc all the time. The other parts of an application can use the GC: best of both worlds. Is there even a compiler switch to disable GC altogether so the program doesn't have a GC thread? No, I can't see it...

Re: std.allocator ready for some abuse

2015-09-12 Thread bitwise via Digitalmars-d
On Saturday, 12 September 2015 at 06:30:42 UTC, bitwise wrote: On Saturday, 12 September 2015 at 00:31:27 UTC, Andrei Alexandrescu wrote: [...] This sounds like the default setup I'll be using. The containers will use a Mallocator by default, so I will have to add the ranges when the

Difference between back (`) and double (") quoted strings

2015-09-12 Thread Bahman Movaqar via Digitalmars-d-learn
Is there any or they are just simply syntactically equivalent? Are there any official docs on this? -- Bahman Movaqar http://BahmanM.com - https://twitter.com/bahman__m https://github.com/bahmanm - https://gist.github.com/bahmanm PGP Key ID: 0x6AB5BD68 (keyserver2.pgp.com) signature.asc

Re: Multidimension AA's and remove

2015-09-12 Thread NX via Digitalmars-d-learn
On Saturday, 12 September 2015 at 05:54:13 UTC, NX wrote: import std.stdio : writeln, std.algorithm.mutation : remove; Ooops, this is so wrong! Corrected version: void main() { import std.stdio : writeln; import std.algorithm.mutation : remove; int[][string]

Re: Better lambdas!!!!!!!!!!

2015-09-12 Thread Ola Fosheim Grostad via Digitalmars-d
On Friday, 11 September 2015 at 23:15:58 UTC, Jonathan M Davis wrote: style lambdas in D. However, given the complexity of C++ templates, as I understand it, there are no plans to ever support them in C++ interop (since it would pretty much mean putting a C++ compiler in the D compiler), in

Re: shared array?

2015-09-12 Thread Jonathan M Davis via Digitalmars-d-learn
On Friday, September 11, 2015 23:29:05 Laeeth Isharc via Digitalmars-d-learn wrote: > On Friday, 11 September 2015 at 21:58:28 UTC, Adam D. Ruppe wrote: > > On Friday, 11 September 2015 at 21:48:14 UTC, Prudence wrote: > >> Oh really?!?! I thought slicing used the GC? Is this a recent > >>

Re: std.allocator ready for some abuse

2015-09-12 Thread bitwise via Digitalmars-d
On Saturday, 12 September 2015 at 00:31:27 UTC, Andrei Alexandrescu wrote: On 09/11/2015 07:46 PM, bitwise wrote: [...] Say you have a container that uses its own allocator inside, yet offers the user to store objects with indirections that use the GC. Then indeed the container would need

[Issue 15026] cannot array assign to a slice return value

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15026 anoneu...@gmail.com changed: What|Removed |Added CC||anoneu...@gmail.com --- Comment #2

Re: How To: Passing curried functions around

2015-09-12 Thread Bahman Movaqar via Digitalmars-d-learn
On Friday, 11 September 2015 at 21:06:32 UTC, Ali Çehreli wrote: On 09/11/2015 02:04 PM, Ali Çehreli wrote: The same keyword has a different use with templates: And the official documentation: http://dlang.org/template.html#TemplateAliasParameter Thanks again!

Re: Reasons to use D

2015-09-12 Thread Bahman Movaqar via Digitalmars-d
On Friday, 11 September 2015 at 17:58:49 UTC, bachmeier wrote: On Friday, 11 September 2015 at 14:17:03 UTC, Bahman Movaqar wrote: On Friday, 11 September 2015 at 13:15:03 UTC, Adam D. Ruppe wrote: "3. The documentation poor." I agree but so is the documentation for virtually everything

Re: Difference between back (`) and double (") quoted strings

2015-09-12 Thread NX via Digitalmars-d-learn
On Saturday, 12 September 2015 at 08:13:33 UTC, Bahman Movaqar wrote: Is there any or they are just simply syntactically equivalent? Are there any official docs on this? What if I told you, you should search the official reference before asking such things in the forum?

Re: Hello World Example with Glade?

2015-09-12 Thread Mike McKee via Digitalmars-d-learn
On Friday, 11 September 2015 at 20:29:05 UTC, Mike Wey wrote: You should be able to drop the -L-ldl and -I/usr/ flags, as they are included in the pkg-config output. I just tested and you are correct. Now, is there a way that I can edit /etc/dmd.conf and make it so that I don't need to do

[Issue 12210] dlang.org home page example - Run button does not work

2015-09-12 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12210 --- Comment #9 from Gerald Jansen --- Perhaps this is a slightly different issue but it is related so I'll just mention it here. The example in the section "Convenience" under the paragraph starting with "Automatic memory

  1   2   >