Re: `clear`ing a dynamic array

2015-10-24 Thread anonymous via Digitalmars-d-learn
On 24.10.2015 15:18, Shriramana Sharma wrote: int a[] = [1,2,3,4,5]; Aside: `int[] a;` is the preferred style for array declarations. How to make it so that after clearing `a`, `b` will also point to the same empty array? IOW the desired output is: [1, 2, 3, 4, 5] [1, 2, 3, 4, 5] [] []

Re: `clear`ing a dynamic array

2015-10-24 Thread Cauterite via Digitalmars-d-learn
I'm afraid what you're asking for is impossible. Because 'a' and 'b' are both slices, they each have their own 'length' field. When you do 'a = []', you're effectively doing 'a.length = 0'. There's no way to change 'b.length' through 'a'. To get that effect, you'd have to do something like

Re: LDC iOS cross-compiler with arm64

2015-10-24 Thread Dan Olson via Digitalmars-d-announce
Jacob Carlborg writes: > On 2015-10-24 12:01, Suliman wrote: > >> Would it be hard to add Windows/Linux host available? Would it be hard >> to develop iOS apps on Windows in comparison of using MacOSX? > > It depends on what you mean. Microsoft already supports developing iOS > apps

Re: Array of templated classes or structs

2015-10-24 Thread qsdfghjk via Digitalmars-d-learn
On Saturday, 24 October 2015 at 15:57:09 UTC, Dandyvica wrote: Hi guys, Apart from deriving from the same class and declaring an array of that root class, is there a way to create an array of templates? This seems not possible since template are compile-time generated, but just to be sure.

Re: Converting Unicode Escape Sequences to UTF-8

2015-10-24 Thread Nordlöw via Digitalmars-d-learn
On Saturday, 24 October 2015 at 08:54:40 UTC, Nordlöw wrote: Working first version at https://github.com/nordlow/justd/blob/master/conv_ex.d#L207 Next I'll make it a range. Made it a range: https://github.com/nordlow/justd/blob/master/conv_ex.d#L207

Re: `clear`ing a dynamic array

2015-10-24 Thread rsw0x via Digitalmars-d-learn
On Saturday, 24 October 2015 at 13:18:26 UTC, Shriramana Sharma wrote: Hello. I had first expected that dynamic arrays (slices) would provide a `.clear()` method but they don't seem to. Obviously I can always effectively clear an array by assigning an empty array to it, but this has unwanted

Re: LDC iOS cross-compiler with arm64

2015-10-24 Thread Dan Olson via Digitalmars-d-announce
extrawurst writes: > On Saturday, 24 October 2015 at 07:07:18 UTC, Dan Olson wrote: >> This is another set of binaries and universal libs for the >> experimental LDC iOS cross-compiler. It is now based on LDC 0.15.2 >> (2.066.1) and LLVM 3.6.1. >> >> [...] > > Cool work!

Array of templated classes or structs

2015-10-24 Thread Dandyvica via Digitalmars-d-learn
Hi guys, Apart from deriving from the same class and declaring an array of that root class, is there a way to create an array of templates? This seems not possible since template are compile-time generated, but just to be sure. For example, it seems logical to get an array of complex

Re: Array of templated classes or structs

2015-10-24 Thread Dandyvica via Digitalmars-d-learn
On Saturday, 24 October 2015 at 16:58:58 UTC, qsdfghjk wrote: On Saturday, 24 October 2015 at 15:57:09 UTC, Dandyvica wrote: Hi guys, Apart from deriving from the same class and declaring an array of that root class, is there a way to create an array of templates? This seems not possible

Fixing spurious "statement is not reachable" in template code

2015-10-24 Thread tsbockman via Digitalmars-d
While improving the DMD front-end's constant folding: https://github.com/D-Programming-Language/dmd/pull/5229 I found out about DMD issue 14835: https://issues.dlang.org/show_bug.cgi?id=14835 Briefly: /// module main; import std.stdio; void reachIf(bool x)()

Re: Array of templated classes or structs

2015-10-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Saturday, 24 October 2015 at 15:57:09 UTC, Dandyvica wrote: Hi guys, Apart from deriving from the same class and declaring an array of that root class, is there a way to create an array of templates? This seems not possible since template are compile-time generated, but just to be sure.

Re: Type of receiver

2015-10-24 Thread Marc Schütz via Digitalmars-d
On Saturday, 24 October 2015 at 09:54:43 UTC, Jacob Carlborg wrote: When the template this parameter feature was added to the language it was possible to use it for static methods: class Foo { static void foo(this T)() { pragma(msg, T.stringof); } } class Bar : Foo {}

Re: Synchronized classes have no public members

2015-10-24 Thread Spacen Jasset via Digitalmars-d
On Tuesday, 20 October 2015 at 18:15:05 UTC, Bruno Medeiros wrote: On 16/10/2015 08:02, Jacob Carlborg wrote: On 2015-10-16 08:49, Dicebot wrote: As far as I understand topic is about deprecating direct field access of synchronized classes, method calls in synhronized classes and

Re: Fastest JSON parser in the world is a D project

2015-10-24 Thread Laeeth Isharc via Digitalmars-d-announce
On Thursday, 22 October 2015 at 20:10:36 UTC, rsw0x wrote: On Thursday, 22 October 2015 at 19:16:00 UTC, Laeeth Isharc wrote: On Thursday, 22 October 2015 at 18:23:08 UTC, Andrei Alexandrescu wrote: On 10/22/2015 09:08 AM, Walter Bright wrote: [...] This has been a homerun. Congratulations

[Issue 14627] Implicit conversion from uint to dchar allows dchar > dchar.max

2015-10-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14627 thomas.bock...@gmail.com changed: What|Removed |Added CC||thomas.bock...@gmail.com ---

Re: Array of templated classes or structs

2015-10-24 Thread qsdfghjk via Digitalmars-d-learn
On Saturday, 24 October 2015 at 17:06:13 UTC, Dandyvica wrote: On Saturday, 24 October 2015 at 16:58:58 UTC, qsdfghjk wrote: On Saturday, 24 October 2015 at 15:57:09 UTC, Dandyvica wrote: Hi guys, Apart from deriving from the same class and declaring an array of that root class, is there a

Re: Kinds of containers

2015-10-24 Thread TheFlyingFiddle via Digitalmars-d
On Saturday, 24 October 2015 at 09:22:37 UTC, Jacob Carlborg wrote: Can these be implemented by the user just declaring a regular container as immutable? The implement will recognize if it's declared as immutable and adapt. How can a type know it's qualifier? struct Container(T) { //

`clear`ing a dynamic array

2015-10-24 Thread Shriramana Sharma via Digitalmars-d-learn
Hello. I had first expected that dynamic arrays (slices) would provide a `.clear()` method but they don't seem to. Obviously I can always effectively clear an array by assigning an empty array to it, but this has unwanted consequences that `[]` actually seems to allocate a new dynamic array and

Re: Type of receiver

2015-10-24 Thread bitwise via Digitalmars-d
On Saturday, 24 October 2015 at 09:54:43 UTC, Jacob Carlborg wrote: When the template this parameter feature was added to the language it was possible to use it for static methods: class Foo { static void foo(this T)() { pragma(msg, T.stringof); } } class Bar : Foo {}

Re: Coedit 2 alpha 1 - now with dub

2015-10-24 Thread qsdfghjk via Digitalmars-d-announce
On Friday, 23 October 2015 at 06:55:37 UTC, Rory McGuire wrote: I think IDE devs are supposed to use `dub describe` not read the package file directly. That whole package loading section of dub should probably be a library though. On Fri, Oct 23, 2015 at 8:47 AM, Eliatto via

Re: `clear`ing a dynamic array

2015-10-24 Thread John Colvin via Digitalmars-d-learn
On Saturday, 24 October 2015 at 13:18:26 UTC, Shriramana Sharma wrote: Hello. I had first expected that dynamic arrays (slices) would provide a `.clear()` method but they don't seem to. Obviously I can always effectively clear an array by assigning an empty array to it, but this has unwanted

Re: How to install DMD 64bit on Windows?

2015-10-24 Thread ric maicle via Digitalmars-d-learn
On Thursday, 22 October, 2015 02:50 AM, Adam D. Ruppe wrote: Use the .exe installer and it will offer to download and install visual studio for you as part for its process. Sorry to ask this but could anyone please explain why Visual Studio is required by DMD 64-bit? (I have been away far too

Re: Is dlangui dead?

2015-10-24 Thread karabuta via Digitalmars-d
On Saturday, 24 October 2015 at 12:14:18 UTC, suliman wrote: On Saturday, 24 October 2015 at 12:07:29 UTC, karabuta wrote: On Friday, 23 October 2015 at 10:09:36 UTC, Chris wrote: On Thursday, 22 October 2015 at 20:14:06 UTC, karabuta wrote: On Tuesday, 20 October 2015 at 17:58:07 UTC, tcak

Re: Kinds of containers

2015-10-24 Thread Kagamin via Digitalmars-d
On Friday, 23 October 2015 at 17:44:55 UTC, deadalnix wrote: void foo(T)(const Collection!const(T) c) {} void main() { Collection!T c; foo(c); // Error, GTFO ! } How about this? void f(T)(const Collection!T c) { const Collection!(Unqual!T) cc = c; }

Re: No shortcircuit for static if or template constraints?

2015-10-24 Thread stewart via Digitalmars-d-learn
On Saturday, 24 October 2015 at 23:26:09 UTC, stewart wrote: Hi All, Given this code: --- import std.traits; import std.range; import std.stdio; enum isSupportedRange(T) = (isInputRange!T && isIntegral!(ForeachType!T)); void func(T)(T vals) { static if(isSupportedRange!T) { //

Re: No shortcircuit for static if or template constraints?

2015-10-24 Thread stewart via Digitalmars-d-learn
On Saturday, 24 October 2015 at 23:59:02 UTC, qsdfghjk wrote: On Saturday, 24 October 2015 at 23:34:19 UTC, stewart wrote: On Saturday, 24 October 2015 at 23:26:09 UTC, stewart wrote: [...] Oh and the workaround I'm using is this: --- void func(T)(T vals) { static if(isInputRange!T) {

Re: No shortcircuit for static if or template constraints?

2015-10-24 Thread qsdfghjk via Digitalmars-d-learn
On Saturday, 24 October 2015 at 23:59:02 UTC, qsdfghjk wrote: On Saturday, 24 October 2015 at 23:34:19 UTC, stewart wrote: On Saturday, 24 October 2015 at 23:26:09 UTC, stewart wrote: [...] Oh and the workaround I'm using is this: --- void func(T)(T vals) { static if(isInputRange!T) {

Re: Kinds of containers

2015-10-24 Thread Andrei Alexandrescu via Digitalmars-d
On 10/24/15 3:19 PM, Timon Gehr wrote: Even if this was possible, it would not be a very good idea. Persistent data structures have use cases that would be hindered by required transitive immutability. This part I don't quite get. Are there any languages that offer containers with immutable

Compilation time profiling

2015-10-24 Thread tired_eyes via Digitalmars-d-learn
Hi, are there any tools for compilation time profiling? I'm trying to find what part of the code increases compilation time and don't want to stumble around.

[Issue 15244] New: Misleading compiler warning: "Error: use .min_normal property instead of .min"

2015-10-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15244 Issue ID: 15244 Summary: Misleading compiler warning: "Error: use .min_normal property instead of .min" Product: D Version: D2 Hardware: x86_64 OS: Linux

No shortcircuit for static if or template constraints?

2015-10-24 Thread stewart via Digitalmars-d-learn
Hi All, Given this code: --- import std.traits; import std.range; import std.stdio; enum isSupportedRange(T) = (isInputRange!T && isIntegral!(ForeachType!T)); void func(T)(T vals) { static if(isSupportedRange!T) { // Do something with a range } else { // Do something

Re: Type of receiver

2015-10-24 Thread bitwise via Digitalmars-d
On Saturday, 24 October 2015 at 16:05:15 UTC, bitwise wrote: [...] class TypeInfo {} class TypeInfoImpl(T) : TypeInfo {} class BaseObject { static TypeInfo typeInfo(this This)() { return TypeInfoImpl!This(); } static TypeInfo info = typeInfo(); } class Foo : BaseObject {

Memory fragmentation

2015-10-24 Thread Kagamin via Digitalmars-d
An interesting article about memory fragmentation: http://nfrechette.github.io/2015/06/25/out_of_memory/

Re: Compilation time profiling

2015-10-24 Thread Vladimir Panteleev via Digitalmars-d-learn
On Saturday, 24 October 2015 at 21:56:05 UTC, tired_eyes wrote: Hi, are there any tools for compilation time profiling? I'm trying to find what part of the code increases compilation time and don't want to stumble around. There's this: https://github.com/CyberShadow/DBuildStat Example

Re: Kinds of containers

2015-10-24 Thread Timon Gehr via Digitalmars-d
On 10/24/2015 09:33 PM, David Nadlinger wrote: On Friday, 23 October 2015 at 17:44:55 UTC, deadalnix wrote: Collection!T and Collection!const(T) are 2 completely different types. Isn't this also required anyway because of covariance vs. contravariance considerations? — David (I'm

Re: Array of templated classes or structs

2015-10-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Saturday, 24 October 2015 at 19:00:57 UTC, TheFlyingFiddle wrote: One thing about variant is that if the struct you are trying to insert is larger then (void delegate()).sizeof it will allocate the wrapped type on the gc heap. This is not a concern if you want to have class templates as

Re: Array of templated classes or structs

2015-10-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Saturday, 24 October 2015 at 18:40:02 UTC, TheFlyingFiddle wrote: To complete TemplateStruct simply forward the remaing members of the variant. Or use something like proxy!T in std.typecons. Or use an alias this v. (I don't really recommend alias this it has all kinds of problems) One

Re: Type of receiver

2015-10-24 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-24 15:38, Marc Schütz wrote: It was changed in this PR: https://github.com/D-Programming-Language/dmd/pull/1687 It's hard to tell whether it was intentional though. But IMO your code should work, so I suggest you file a bug report. I did that, back in 2013 [1]. It was closed as

Re: Is dlangui dead?

2015-10-24 Thread Suliman via Digitalmars-d
Try this https://github.com/filcuc/DOtherSide How cross platform is dqml by the way? I think it should be work on Linux too. On Windows it's fine. Maybe even MacOSX will work. Also you may look at http://www.dsfml.com/

Re: LDC 0.16.0 has been released!

2015-10-24 Thread Kai Nacke via Digitalmars-d-announce
On Saturday, 24 October 2015 at 04:59:02 UTC, suliman wrote: On Thursday, 22 October 2015 at 19:00:07 UTC, Kai Nacke wrote: Hi everyone, LDC 0.16.0, the LLVM-based D compiler, is available for download! This release is based on the 2.067.1 frontend and standard library and supports LLVM

Re: Kinds of containers

2015-10-24 Thread Timon Gehr via Digitalmars-d
On 10/24/2015 09:22 PM, Andrei Alexandrescu wrote: On 10/24/15 3:19 PM, Timon Gehr wrote: Even if this was possible, it would not be a very good idea. Persistent data structures have use cases that would be hindered by required transitive immutability. This part I don't quite get. The slots

Re: No shortcircuit for static if or template constraints?

2015-10-24 Thread qsdfghjk via Digitalmars-d-learn
On Saturday, 24 October 2015 at 23:34:19 UTC, stewart wrote: On Saturday, 24 October 2015 at 23:26:09 UTC, stewart wrote: [...] Oh and the workaround I'm using is this: --- void func(T)(T vals) { static if(isInputRange!T) { static if(isIntegral!(ForeachType!T)) { //

Re: Array of templated classes or structs

2015-10-24 Thread TheFlyingFiddle via Digitalmars-d-learn
On Saturday, 24 October 2015 at 18:29:08 UTC, TheFlyingFiddle wrote: Variant[] array; array ~= S!int(...); array ~= S!double(...); array ~= S!long(...); array ~= "I am a string!"; And this is probably not what you want. You can do this if you want to ensure that items stored in the variant

Re: Kinds of containers

2015-10-24 Thread Timon Gehr via Digitalmars-d
On 10/24/2015 11:22 AM, Jacob Carlborg wrote: On 2015-10-21 13:05, Andrei Alexandrescu wrote: 1. Functional containers. These are immutable; once created, neither their topology nor their elements may be observably changed. Manipulating a container entails creating an entire new container,

Re: Kinds of containers

2015-10-24 Thread David Nadlinger via Digitalmars-d
On Friday, 23 October 2015 at 17:44:55 UTC, deadalnix wrote: Collection!T and Collection!const(T) are 2 completely different types. Isn't this also required anyway because of covariance vs. contravariance considerations? — David

Re: Is dlangui dead?

2015-10-24 Thread Chris via Digitalmars-d
On Saturday, 24 October 2015 at 12:07:29 UTC, karabuta wrote: Thanks for the insights. Sorry I meant tkd, not wxD.

Re: Vision

2015-10-24 Thread Jonathan M Davis via Digitalmars-d
On Saturday, 24 October 2015 at 09:14:40 UTC, Jacob Carlborg wrote: On 2015-10-24 01:23, Adam D. Ruppe wrote: We just recently got it in for Windows, pretty well auto generated, so I should hope we can get it for Mac too. Oh, I didn't know it was the automatically generated. My concern are

on std.net.curl high level functions

2015-10-24 Thread Mengu via Digitalmars-d
hi all what do you think about high level functions such as get, post, put, delete returning a Request object with status code, headers and content as its properties rather than just the content? this would make things easier for n00bs and newcomers to D as everyone would not have to create

Re: `clear`ing a dynamic array

2015-10-24 Thread Shriramana Sharma via Digitalmars-d-learn
rsw0x wrote: > use std.container.array Thanks all for all the recommendations. When would one use std.array.appender with a built-in array vs std.container.array.Array? What are the pros and cons on either side? -- Shriramana Sharma, Penguin #395953

Re: Option types and pattern matching.

2015-10-24 Thread Rikki Cattermole via Digitalmars-d
On 25/10/15 6:01 PM, Nerve wrote: Hello D community! First time poster, I'm utterly fascinated with this language's mix of features. It's powerful and expressive. There are just two conveniences I'd like to see out of D. The first is pattern matching, a functional construct which can unwrap

Re: My experience from learning Polish language

2015-10-24 Thread Ali Çehreli via Digitalmars-d
On 10/24/2015 04:15 AM, Cauterite wrote: On Saturday, 24 October 2015 at 11:01:24 UTC, grumpyalittle wrote: My name is Daisy and I was on Erasmus program in Poland. During This looks like spam to me. Of course spam but it's pretty amusing. :) It must have happened like this: - Polish

Re: Option types and pattern matching.

2015-10-24 Thread Nerve via Digitalmars-d
On Sunday, 25 October 2015 at 05:05:47 UTC, Rikki Cattermole wrote: Since I have no idea what the difference between Some(_), None and default. I'll assume it's already doable. _ represents all existing values not matched. In this case, Some(_) represents any integer value that is not 7. None

Does D's GC release memory back to the OS?

2015-10-24 Thread Richard White via Digitalmars-d-learn
Just wondering if D's GC release memory back to the OS? The documentation for the GC.minimize (http://dlang.org/phobos/core_memory.html#.GC.minimize) seems to imply that it does, but watching my OS's memory usage for various D apps doesn't support this.

Re: Memory fragmentation

2015-10-24 Thread Rikki Cattermole via Digitalmars-d
On 25/10/15 9:05 AM, Kagamin wrote: An interesting article about memory fragmentation: http://nfrechette.github.io/2015/06/25/out_of_memory/ The last couple of streams + a bit of time off it. I've spent quite a bit of it working on a host name + port router and the optimization function

Option types and pattern matching.

2015-10-24 Thread Nerve via Digitalmars-d
Hello D community! First time poster, I'm utterly fascinated with this language's mix of features. It's powerful and expressive. There are just two conveniences I'd like to see out of D. The first is pattern matching, a functional construct which can unwrap tuples or other containers, usually

Re: LDC 0.16.0 has been released!

2015-10-24 Thread Joakim via Digitalmars-d-announce
On Sunday, 25 October 2015 at 03:22:39 UTC, Joakim wrote: On Saturday, 24 October 2015 at 15:40:41 UTC, Jack Stouffer wrote: That's surprising given that many were worried that switching to ddmd would slow compilation speeds down by at least 30%. Also, this does not seem to be using any of

Re: LDC 0.16.0 has been released!

2015-10-24 Thread Joakim via Digitalmars-d-announce
On Saturday, 24 October 2015 at 15:40:41 UTC, Jack Stouffer wrote: On Saturday, 24 October 2015 at 03:11:30 UTC, Joakim wrote: The associated travis CI run that finally went green with ldc 0.16.0 beta 2 took about as long as the other D compilers, so performance of ldc-compiled ddmd seems

Re: Kinds of containers

2015-10-24 Thread deadalnix via Digitalmars-d
On Saturday, 24 October 2015 at 19:33:03 UTC, David Nadlinger wrote: On Friday, 23 October 2015 at 17:44:55 UTC, deadalnix wrote: Collection!T and Collection!const(T) are 2 completely different types. Isn't this also required anyway because of covariance vs. contravariance considerations?

Re: Option types and pattern matching.

2015-10-24 Thread Rikki Cattermole via Digitalmars-d
On 25/10/15 6:45 PM, Nerve wrote: On Sunday, 25 October 2015 at 05:05:47 UTC, Rikki Cattermole wrote: Since I have no idea what the difference between Some(_), None and default. I'll assume it's already doable. _ represents all existing values not matched. In this case, Some(_) represents any

Re: Is dlangui dead?

2015-10-24 Thread suliman via Digitalmars-d
On Saturday, 24 October 2015 at 12:07:29 UTC, karabuta wrote: On Friday, 23 October 2015 at 10:09:36 UTC, Chris wrote: On Thursday, 22 October 2015 at 20:14:06 UTC, karabuta wrote: On Tuesday, 20 October 2015 at 17:58:07 UTC, tcak wrote: On Tuesday, 20 October 2015 at 17:01:19 UTC, karabuta

LDC iOS cross-compiler with arm64

2015-10-24 Thread Dan Olson via Digitalmars-d-announce
This is another set of binaries and universal libs for the experimental LDC iOS cross-compiler. It is now based on LDC 0.15.2 (2.066.1) and LLVM 3.6.1. https://github.com/smolt/ldc-iphone-dev/releases/tag/ios-0.15.2-151023 What's new? - arm64 for iOS 64-bit devices - C ABI compatibility

Re: dchar undefined behaviour

2015-10-24 Thread Dmitry Olshansky via Digitalmars-d
On 24-Oct-2015 02:45, Anon wrote: On Friday, 23 October 2015 at 21:22:38 UTC, Vladimir Panteleev wrote: That doesn't sound right. In fact, this puts into question why dchar.max is at the value it is now. It might be the current maximum at the current version of Unicode, but this seems like a

Re: Vision

2015-10-24 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-24 02:57, Laeeth Isharc wrote: I read it quickly so may have missed, but I meant in the vision document ;) Oh, no I understand :). I guess it's not part of the vision. You have to ask Andrei/Walter about that. Personally, for me, it doesn't matter. I won't work more or less on

Re: Kinds of containers

2015-10-24 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-21 13:05, Andrei Alexandrescu wrote: 1. Functional containers. These are immutable; once created, neither their topology nor their elements may be observably changed. Manipulating a container entails creating an entire new container, often based on an existing container (e.g. append

Re: inout, delegates, and visitor functions.

2015-10-24 Thread Sebastien Alaiwan via Digitalmars-d-learn
Hi ponce, Thanks for your suggestion. I think I may have found the beginning of a solution: class E { import std.traits; void apply(this F, U)(void delegate(U e) f) if(is(Unqual!U == E)) { f(this); } int val; } int main() { void setToZero(E e) { e.val = 0; }

Re: inout, delegates, and visitor functions.

2015-10-24 Thread ponce via Digitalmars-d-learn
On Saturday, 24 October 2015 at 11:28:17 UTC, Sebastien Alaiwan wrote: Hi ponce, Thanks for your suggestion. I think I may have found the beginning of a solution: class E { import std.traits; void apply(this F, U)(void delegate(U e) f) if(is(Unqual!U == E)) { f(this); } int

Re: Is dlangui dead?

2015-10-24 Thread karabuta via Digitalmars-d
On Friday, 23 October 2015 at 10:09:36 UTC, Chris wrote: On Thursday, 22 October 2015 at 20:14:06 UTC, karabuta wrote: On Tuesday, 20 October 2015 at 17:58:07 UTC, tcak wrote: On Tuesday, 20 October 2015 at 17:01:19 UTC, karabuta wrote: I hope I am wrong, but dlangui seems to be abandoned for

[Issue 14835] Statement is not reachable doesn't play along generic code

2015-10-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14835 --- Comment #6 from thomas.bock...@gmail.com --- Here's a minimal compilable (requires dmd argument -wi, rather than -w) example, for anyone trying to fix this: module main; import std.stdio; void reachIf(bool x)() { if(!x) return;

Re: LDC iOS cross-compiler with arm64

2015-10-24 Thread Jacob Carlborg via Digitalmars-d-announce
On 2015-10-24 12:01, Suliman wrote: Would it be hard to add Windows/Linux host available? Would it be hard to develop iOS apps on Windows in comparison of using MacOSX? It depends on what you mean. Microsoft already supports developing iOS apps on Windows, but the building is actually

Re: My experience from learning Polish language

2015-10-24 Thread Cauterite via Digitalmars-d
On Saturday, 24 October 2015 at 11:01:24 UTC, grumpyalittle wrote: My name is Daisy and I was on Erasmus program in Poland. During This looks like spam to me.

Re: Vision

2015-10-24 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-23 14:44, Steven Schveighoffer wrote: Also, what type does 'id' map to? I don't think that "id" is particular interesting. Apple is moving away from it more and more. They added the "instancetype" feature for the declarations of "init" and "alloc". They added generics for

Re: LDC iOS cross-compiler with arm64

2015-10-24 Thread Suliman via Digitalmars-d-announce
Only binaries for OS X build host are available. Would it be hard to add Windows/Linux host available? Would it be hard to develop iOS apps on Windows in comparison of using MacOSX?

Re: Vision

2015-10-24 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-24 01:23, Adam D. Ruppe wrote: We just recently got it in for Windows, pretty well auto generated, so I should hope we can get it for Mac too. Oh, I didn't know it was the automatically generated. My concern are these posts:

Re: Kinds of containers

2015-10-24 Thread Timon Gehr via Digitalmars-d
On 10/24/2015 01:36 AM, bitwise wrote: On Friday, 23 October 2015 at 23:21:31 UTC, bigsandwich wrote: On Friday, 23 October 2015 at 17:44:55 UTC, deadalnix wrote: On Friday, 23 October 2015 at 11:03:37 UTC, Andrei Alexandrescu wrote: [...] Sure. We have a problem when it come to collection

Re: DCD 0.7.1

2015-10-24 Thread Dicebot via Digitalmars-d-announce
On Tuesday, 20 October 2015 at 22:14:24 UTC, Brian Schott wrote: On Tuesday, 20 October 2015 at 08:28:19 UTC, Dicebot wrote: Which LDC is it supposed to build with? Trying latest stable (0.15.1) I get: src/server/autocomplete.d(23): Error: module logger is in file 'std/experimental/logger.d'

Re: LDC iOS cross-compiler with arm64

2015-10-24 Thread extrawurst via Digitalmars-d-announce
On Saturday, 24 October 2015 at 07:07:18 UTC, Dan Olson wrote: This is another set of binaries and universal libs for the experimental LDC iOS cross-compiler. It is now based on LDC 0.15.2 (2.066.1) and LLVM 3.6.1. [...] Cool work! Can this be merged with official LDC eventually ?

inout, delegates, and visitor functions.

2015-10-24 Thread Sebastien Alaiwan via Digitalmars-d-learn
Hi all, I'm trying to get the following code to work. (This code is a simplified version of some algebraic type). Is it possible to only declare one version of the 'apply' function? Or should I declare the const version and the non-const version? I tried using "inout", but I got the following

Type of receiver

2015-10-24 Thread Jacob Carlborg via Digitalmars-d
When the template this parameter feature was added to the language it was possible to use it for static methods: class Foo { static void foo(this T)() { pragma(msg, T.stringof); } } class Bar : Foo {} Foo.foo(); // prints "Foo" Bar.foo(); // prints "Bar" For some reason

[Issue 14835] Statement is not reachable doesn't play along generic code

2015-10-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14835 Marc Schütz changed: What|Removed |Added CC||schue...@gmx.net --

My experience from learning Polish language

2015-10-24 Thread grumpyalittle via Digitalmars-d
My name is Daisy and I was on Erasmus program in Poland. During this period I decided to try to learn this language, what I thought couldn’t be easy. I went to school of Polish (called Prolog, more info here: www.polishcourses.com) and I started with no expectations. But now I’m really glad

Merging two named Tuples

2015-10-24 Thread Edwin van Leeuwen via Digitalmars-d-learn
I am trying to write a function to merge two named structs, but am completely stuck on how to do that and was wondering if anyone good provide any help. I know I can access the different names with tup.fieldNames, but basically can't work out how to use that to build the new return type. Below

[Issue 15243] rejects-valid on variadic

2015-10-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15243 Sebastien Alaiwan changed: What|Removed |Added CC||ac...@free.fr --

[Issue 15243] New: rejects-valid on variadic

2015-10-24 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15243 Issue ID: 15243 Summary: rejects-valid on variadic Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1

Re: inout, delegates, and visitor functions.

2015-10-24 Thread ponce via Digitalmars-d-learn
On Saturday, 24 October 2015 at 08:51:58 UTC, Sebastien Alaiwan wrote: Hi all, I'm trying to get the following code to work. (This code is a simplified version of some algebraic type). Is it possible to only declare one version of the 'apply' function? Or should I declare the const version

Re: Converting Unicode Escape Sequences to UTF-8

2015-10-24 Thread Nordlöw via Digitalmars-d-learn
On Thursday, 22 October 2015 at 21:52:05 UTC, anonymous wrote: On 22.10.2015 21:13, Nordlöw wrote: Hmm, why isn't this already in Phobos? Working first version at https://github.com/nordlow/justd/blob/master/conv_ex.d#L207 Next I'll make it a range.