Re: Walter, I need a __trait please.

2016-03-15 Thread cy via Digitalmars-d
On Tuesday, 15 March 2016 at 19:59:01 UTC, deadalnix wrote: It is like one of these simili good idea that everybody tries and everybody regrets it. You DON'T want to expose your compiler implementation to the language. I'm sorry, but I know a lot of people who don't expose their compiler

[Issue 9086] std.typecons.appendIfNotNull() or a better idea

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=9086 Ender KaShae changed: What|Removed |Added CC||astrotha...@gmail.com

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread David Nadlinger via Digitalmars-d
On Tuesday, 15 March 2016 at 09:07:05 UTC, Nordlöw wrote: On Monday, 14 March 2016 at 18:51:45 UTC, Chris Wright wrote: Ohm my, that's awesome. Watt needs to happen to get this into Phobos? I'm cleaning up David's work right and will put up a PR today. Please make a really, really thorough

Re: Walter, I need a __trait please.

2016-03-15 Thread ZombineDev via Digitalmars-d
On Tuesday, 15 March 2016 at 19:59:01 UTC, deadalnix wrote: On Tuesday, 15 March 2016 at 11:47:20 UTC, ZombineDev wrote: Instead I think that if we improve D's existing introspection capabilities and expose the compiler as a library at compile-time, we will have a much powerful system than any

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread David Nadlinger via Digitalmars-d
On Tuesday, 15 March 2016 at 14:46:30 UTC, D.Enguiyen wrote: Is it able to manage quantities with a non-linear transformations, for example when dealing with octet and byte ? (1024)!"byte" == 1!"kbyte"; There are no non-linear transformations going on here, following usual math terminology.

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread David Nadlinger via Digitalmars-d
On Monday, 14 March 2016 at 19:08:18 UTC, Robert burner Schadek wrote: have a look at this! https://github.com/biozic/quantities This has been brought up (and subsequently discussed) on the first page of this thread, more than two years ago. — David

Re: D could catch this wave: web assembly

2016-03-15 Thread David Nadlinger via Digitalmars-d
On Tuesday, 15 March 2016 at 20:18:40 UTC, deadalnix wrote: I can. I know LLVM fairly well (I'm not a committer), but I do not have that much experience with WebAssembly. Yes, please! I'd volunteer myself, but this summer will be too busy for me academically. — David

[Issue 11533] Compiler should allow to being nested for static local template functions

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11533 --- Comment #5 from Kenji Hara --- (In reply to ZombineDev from comment #4) > I'm reopening because the test case doesn't work with DMD 2.070.2: > > /d224/f50.d(11): Error: static function f50.main.bar!(nested).bar cannot >

Re: Walter, I need a __trait please.

2016-03-15 Thread deadalnix via Digitalmars-d
On Tuesday, 15 March 2016 at 19:59:01 UTC, deadalnix wrote: On Tuesday, 15 March 2016 at 11:47:20 UTC, ZombineDev wrote: Instead I think that if we improve D's existing introspection capabilities and expose the compiler as a library at compile-time, we will have a much powerful system than any

Re: the most D-ish GUI library

2016-03-15 Thread Karabuta via Digitalmars-d
On Sunday, 13 March 2016 at 22:26:48 UTC, Saša Janiška wrote: Hello, After long pause and trying some other languages, I've decided to try (again) with D for writing open-source multi-platform desktop (GUI) application. I've selected three different libraries: a) dlangui

Re: D could catch this wave: web assembly

2016-03-15 Thread deadalnix via Digitalmars-d
On Tuesday, 15 March 2016 at 20:18:40 UTC, deadalnix wrote: On Tuesday, 15 March 2016 at 16:12:46 UTC, Joakim wrote: Maybe deadalnix would be interested in mentoring, I think he showed some interest earlier. Or worst case, 3-4 of us could tag team, if that's allowed. I can. I know LLVM

Re: D could catch this wave: web assembly

2016-03-15 Thread Joakim via Digitalmars-d
On Tuesday, 15 March 2016 at 20:18:40 UTC, deadalnix wrote: On Tuesday, 15 March 2016 at 16:12:46 UTC, Joakim wrote: Maybe deadalnix would be interested in mentoring, I think he showed some interest earlier. Or worst case, 3-4 of us could tag team, if that's allowed. I can. I know LLVM

Re: IDE - Coedit 2, update 2 released

2016-03-15 Thread Martin Drašar via Digitalmars-d-announce
Dne 15.3.2016 v 3:09 Basile B. via Digitalmars-d-announce napsal(a): > see https://github.com/BBasile/Coedit/releases/tag/2_update_2 Nice work! Any chance of getting debugging support eventually? I would love to ditch Visual Studio.

Re: D could catch this wave: web assembly

2016-03-15 Thread deadalnix via Digitalmars-d
On Tuesday, 15 March 2016 at 16:12:46 UTC, Joakim wrote: Maybe deadalnix would be interested in mentoring, I think he showed some interest earlier. Or worst case, 3-4 of us could tag team, if that's allowed. I can. I know LLVM fairly well (I'm not a committer), but I do not have that much

Re: C.h to D conversion (structs)

2016-03-15 Thread Chris via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 18:47:22 UTC, Adam D. Ruppe wrote: Like you would another D library. Now I get it! Yes, that works as expected. The problem isn't the struct itself, but the D initializer. Structs in C don't have initalizers but do in D: struct Foo { int a = 10; /*

Re: the most D-ish GUI library

2016-03-15 Thread Jacob Carlborg via Digitalmars-d
On 15/03/16 11:23, Saša Janiška wrote: That sounds very nice - something like wxWidgets, although I admit my experience with Java/SWT is zero. :-( There's a lot of documentation online for SWT. Most of the examples can be applied to DWT as well with none to minimal code changes. Some of the

Re: IDE - Coedit 2, update 2 released

2016-03-15 Thread WebFreak001 via Digitalmars-d-announce
On Tuesday, 15 March 2016 at 02:09:14 UTC, Basile B. wrote: see https://github.com/BBasile/Coedit/releases/tag/2_update_2 Just a suggestion but you should also put the changelog into the forum so more people read it. Some people dont like clicking links :)

Re: the most D-ish GUI library

2016-03-15 Thread Jacob Carlborg via Digitalmars-d
On 15/03/16 10:35, Luis wrote: Suddenly I have interest on DWT. I thought that was a simple copy of SWT, not being native... DWT is the Java code from SWT ported to D. It's native both as in native machine code and using native drawing operations. -- /Jacob Carlborg

Re: Walter, I need a __trait please.

2016-03-15 Thread Jacob Carlborg via Digitalmars-d
On 15/03/16 12:47, ZombineDev wrote: Hi Jacob, I've been thinking quite a bit about the next step in the evolution of D's metaprogramming, and I thought that AST macros are the best way forward, however since then I become convinced that macros are a distraction from a much more powerful

Re: Walter, I need a __trait please.

2016-03-15 Thread deadalnix via Digitalmars-d
On Tuesday, 15 March 2016 at 11:47:20 UTC, ZombineDev wrote: Instead I think that if we improve D's existing introspection capabilities and expose the compiler as a library at compile-time, we will have a much powerful system than any potential macro system, for a fraction of the complexity.

Re: updating DWT

2016-03-15 Thread Jacob Carlborg via Digitalmars-d-dwt
On 15/03/16 18:17, Saša Janiška wrote: Hello, stil thinking about which GUI to use and today I noticed that according to web site, DWT is based on SWT-3.4, while SWT at upstream is at 4.5,4.6, so I'm interested if porting SWT to DWT is mostly manual work which seems to be disadvantageous and

Re: Clearing associative array.

2016-03-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/12/16 8:09 AM, Adam D. Ruppe wrote: On Saturday, 12 March 2016 at 12:59:02 UTC, ciechowoj wrote: Nice article :), thanks. But still, what about clear()? In the documentation https://dlang.org/spec/hash-map.html#properties there is written that associative arrays have clear property. I

Re: Is there a sorted map?

2016-03-15 Thread Steven Schveighoffer via Digitalmars-d-learn
On 3/13/16 4:33 AM, Jonathan M Davis via Digitalmars-d-learn wrote: On Sunday, March 13, 2016 02:35:27 stunaep via Digitalmars-d-learn wrote: Is there any sorted map in D? I need a map and I need to be able to get the highest key in the map. In java I would use a TreeMap and use map.lastKey(),

Re: C.h to D conversion (structs)

2016-03-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 18:04:00 UTC, Chris wrote: I'm not 100% sure what you mean with compile+link in the modules. Like you would another D library. The structs are all defined in the original (third party) C header file. It's nothing I added (in which case I would have to recompile

[Issue 15782] [Reg 2.071-devel] something about the const/non-const types in TypeTuples changed

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15782 --- Comment #4 from Martin Nowak --- I think it would be OK to make the change if it were only for Alias (which was package protected and undocumented anyhow), but I don't like that those breakages just happen, and it's definitely not

Re: Gdmd compiling error

2016-03-15 Thread Ali Çehreli via Digitalmars-d-learn
On 03/15/2016 02:45 AM, Orkhan wrote: > output of the gdc is : > > root@ubuntu:/home/alikoza/Downloads/i686-pc-linux-gnu# gdc > gdc: fatal error: no input files > compilation terminated. That makes sense. It should produce an executable if you give it a .d file: gdc foo.d Since you

Re: Is there anybody who used FireBird DB?

2016-03-15 Thread Ali Çehreli via Digitalmars-d-learn
On 03/15/2016 07:08 AM, Suliman wrote: For my regret I need way to work with FireBird. I have found only one driver for D https://github.com/jiorhub/fired Before I did not work with C-bindigs and D. So I can't understand how to use this files. Could anybody help and explain how to work with

Re: C.h to D conversion (structs)

2016-03-15 Thread Chris via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 17:10:03 UTC, Adam D. Ruppe wrote: On Tuesday, 15 March 2016 at 16:56:00 UTC, Chris wrote: Do you mean I need to void initialize them in the C code or in D? And if in D, how would I do that, with `static this`? in D, at the usage point with =void where you declare

Re: Tracing InvalidMemoryOperationError

2016-03-15 Thread Ali Çehreli via Digitalmars-d-learn
On 03/15/2016 12:27 AM, stunaep wrote: > I need to find the source of this InvalidMemoryOperationError. I tried > loading the project in visuald but it wont break on the error. Just to make sure, you tried to break inside the constructor of InvalidMemoryOperationError, right? Right where it

Re: Berlin D Meetup March 2016

2016-03-15 Thread Stefan Koch via Digitalmars-d-announce
On Tuesday, 15 March 2016 at 14:30:20 UTC, Ben Palmer wrote: Hi All, The March Berlin D Meetup will be happening at 19:30 on Friday the 18th at Berlin Co-Op (http://co-up.de/) on the fifth floor. This time Martin Nowak will be doing a talk titled "Object (Relational) Mapper". The abstract

[Issue 15802] New: (SIGSEGV) CppMangleVisitor::source_name

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15802 Issue ID: 15802 Summary: (SIGSEGV) CppMangleVisitor::source_name Product: D Version: D2 Hardware: All OS: Linux Status: NEW Severity: normal

Re: How to list all version identifiers?

2016-03-15 Thread Timothee Cour via Digitalmars-d-learn
would be easy with compiler as a library... also i thought 'dmd -v -version=foo -c -o- bar.d' would show -version identifiers used on the command line but doesn't seem to On Tue, Mar 15, 2016 at 8:51 AM, Iakh via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > On Sunday, 13

updating DWT

2016-03-15 Thread Saša Janiška via Digitalmars-d-dwt
Hello, stil thinking about which GUI to use and today I noticed that according to web site, DWT is based on SWT-3.4, while SWT at upstream is at 4.5,4.6, so I'm interested if porting SWT to DWT is mostly manual work which seems to be disadvantageous and destined to be always a lot behind the

Re: Is there anybody who used FireBird DB?

2016-03-15 Thread Suliman via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 15:01:09 UTC, Kagamin wrote: The same as you would do it in C. I do not know C :( Please explain me what i should to do with this binding

Re: C.h to D conversion (structs)

2016-03-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 16:56:00 UTC, Chris wrote: Do you mean I need to void initialize them in the C code or in D? And if in D, how would I do that, with `static this`? in D, at the usage point with =void where you declare the variable of that type. So in your code: struct C { A a

Re: C.h to D conversion (structs)

2016-03-15 Thread Chris via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 16:44:10 UTC, Adam D. Ruppe wrote: On Tuesday, 15 March 2016 at 16:32:56 UTC, Chris wrote: The error I get is something like undefined reference to `_D3test7testmodule13A6__initZ' undefined reference to `_D3test7testmodule13B6__initZ' You still need to

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread Robert burner Schadek via Digitalmars-d
On Tuesday, 15 March 2016 at 09:08:11 UTC, Nordlöw wrote: On Monday, 14 March 2016 at 19:08:18 UTC, Robert burner Schadek wrote: have a look at this! https://github.com/biozic/quantities Could you briefly outline why you prefer this over David's work? - has been in code.dlang.org since

Re: C.h to D conversion (structs)

2016-03-15 Thread Adam D. Ruppe via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 16:32:56 UTC, Chris wrote: The error I get is something like undefined reference to `_D3test7testmodule13A6__initZ' undefined reference to `_D3test7testmodule13B6__initZ' You still need to compile/link in the module (or in this specific case, void initialize the

Re: dlang.org makefile pains

2016-03-15 Thread Seb via Digitalmars-d
On Tuesday, 15 March 2016 at 11:15:12 UTC, Jakob Ovrum wrote: I used to contribute to dlang.org now and then before the makefile revamp. Now every time I try, I end up fighting with the makefile. make -f posix.mak apidocs-serve LATEST=2.070.2 <-- place in the command line to skip network

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread Andrei Alexandrescu via Digitalmars-d
On 3/15/16 3:31 AM, Marc Schütz wrote: For some other modules, Andrei has insisted that package.d must publicly import all subpackages Not too strongly, I think std.allocator doesn't do that. But the judgment must be thoroughly sound and explained. For the putative package, importing

C.h to D conversion (structs)

2016-03-15 Thread Chris via Digitalmars-d-learn
I've converted a C.h file to D according to this guide: http://wiki.dlang.org/Converting_C_.h_Files_to_D_Modules and examples in deimos: https://github.com/D-Programming-Deimos/ However, I get an error when trying to use a struct that uses structs. struct A { size_t i; } struct B {

[Issue 11533] Compiler should allow to being nested for static local template functions

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11533 ZombineDev changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 12230] methods do not bind templates via alias parameter

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12230 --- Comment #5 from Vladimir Panteleev --- Well, for one thing, there is the inconsistence - if fields bind context, why don't methods? In much broader terms, I really really wish we'd have explicit control over alias

Re: D could catch this wave: web assembly

2016-03-15 Thread Joakim via Digitalmars-d
On Tuesday, 15 March 2016 at 13:01:31 UTC, CraigDillabaugh wrote: On Tuesday, 15 March 2016 at 11:56:40 UTC, Ola Fosheim Grøstad wrote: On Monday, 14 March 2016 at 16:14:55 UTC, CraigDillabaugh wrote: On Monday, 14 March 2016 at 15:53:39 UTC, Joakim wrote: I can chip in general input on

[Issue 15786] Line buffering not activated for stdout when running D programs under Eclipse

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15786 --- Comment #3 from Bruno Medeiros --- (In reply to b2.temp from comment #2) > I'd rather propose to add a new wrapper function because changing the > behavior of writeln() would have a negative impact on

Re: How to list all version identifiers?

2016-03-15 Thread Iakh via Digitalmars-d-learn
On Sunday, 13 March 2016 at 20:16:36 UTC, Basile B. wrote: On Sunday, 13 March 2016 at 16:28:50 UTC, Iakh wrote: On Sunday, 13 March 2016 at 15:50:47 UTC, Basile B. wrote: trivial answer, let's say you have dcd-server running in the background: dcd-client -c8 <<< "version(" Thanks. Will

Re: Not sure how to translate this C++ variable to D.

2016-03-15 Thread Ali Çehreli via Digitalmars-d-learn
On 03/15/2016 07:29 AM, WhatMeWorry wrote: >> SpriteRenderer Renderer; // Although, I would name it 'renderer' > Ok. I was trying something more D like, by doing: > > SpriteRenderer Renderer = new SpriteRenderer(); That would work if the variable were const or immutable and if everything

[Issue 15793] Change !is error to warning

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15793 --- Comment #7 from Jonathan M Davis --- > The problem is not best practices, but usability. As I said, while it's best practice to use is and !is with null, it is a bit much to treat it as an error to use == or !=.

[Issue 12230] methods do not bind templates via alias parameter

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12230 --- Comment #4 from Kenji Hara --- (In reply to Kenji Hara from comment #3) > From the long discussion in issue 11946, the static template T cannot get > any context even if the aliased symbol a is an instance member. Or... am

Re: D could catch this wave: web assembly

2016-03-15 Thread Dan Olson via Digitalmars-d
CraigDillabaugh writes: > On Monday, 14 March 2016 at 15:53:39 UTC, Joakim wrote: >> On Monday, 14 March 2016 at 15:14:17 UTC, CraigDillabaugh wrote: >> >> I'm not qualified to mentor a WebAssembly port, as I'm not versed on >> compilers or IR. Dan would probably be

[Issue 12230] methods do not bind templates via alias parameter

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12230 --- Comment #3 from Kenji Hara --- (In reply to Vladimir Panteleev from comment #0) > / test.d > import std.stdio; > > static template T(alias a) > { > void foo() { writeln(a); } > }

[Issue 15801] Enum alias parameter variable cannot be read at compile-time

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15801 Nick Treleaven changed: What|Removed |Added Summary|Overloaded alias parameter |Enum alias

Re: Is there anybody who used FireBird DB?

2016-03-15 Thread Kagamin via Digitalmars-d-learn
The same as you would do it in C.

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread D.Enguiyen via Digitalmars-d
On Tuesday, 15 March 2016 at 14:46:30 UTC, D.Enguiyen wrote: Is it able to manage quantities with a non-linear transformations, for example when dealing with octet and byte ? (1024)!"byte" == 1!"kbyte"; 1!"byte" * 1024 == 1!"kbyte";

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread D.Enguiyen via Digitalmars-d
On Tuesday, 15 March 2016 at 14:50:42 UTC, D.Enguiyen wrote: On Tuesday, 15 March 2016 at 14:46:30 UTC, D.Enguiyen wrote: Is it able to manage quantities with a non-linear transformations, for example when dealing with octet and byte ? (1024)!"byte" == 1!"kbyte"; 1!"byte" * 1024 ==

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread D.Enguiyen via Digitalmars-d
On Tuesday, 15 March 2016 at 09:13:10 UTC, Nordlöw wrote: On Monday, 14 March 2016 at 09:04:28 UTC, Nordlöw wrote: http://klickverbot.at/code/units/std_units.html http://klickverbot.at/code/units/std_units.html#PrefixSystem No module name in Phobos is currently in plural form. I suggest we

Berlin D Meetup March 2016

2016-03-15 Thread Ben Palmer via Digitalmars-d-announce
Hi All, The March Berlin D Meetup will be happening at 19:30 on Friday the 18th at Berlin Co-Op (http://co-up.de/) on the fifth floor. This time Martin Nowak will be doing a talk titled "Object (Relational) Mapper". The abstract is: "This talk presents several prototypes for a high-level

Re: Not sure how to translate this C++ variable to D.

2016-03-15 Thread WhatMeWorry via Digitalmars-d-learn
On Monday, 14 March 2016 at 22:19:50 UTC, Ali Çehreli wrote: On 03/14/2016 03:14 PM, WhatMeWorry wrote: > > sprite_renderer.h -- > > class SpriteRenderer > { > ... > }; Same thing in D without the semicolon. :) > game.cpp

[Issue 15793] Change !is error to warning

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15793 --- Comment #6 from Steven Schveighoffer --- lowering != null to !is null is the right answer. I would be surprised if inlining doesn't automatically do this. But of course, the compiler rejects it, so no way to test it. --

Is there anybody who used FireBird DB?

2016-03-15 Thread Suliman via Digitalmars-d-learn
For my regret I need way to work with FireBird. I have found only one driver for D https://github.com/jiorhub/fired Before I did not work with C-bindigs and D. So I can't understand how to use this files. Could anybody help and explain how to work with it?

Re: Is D a good choice for embedding python/octave/julia

2016-03-15 Thread John Colvin via Digitalmars-d-learn
On Sunday, 13 March 2016 at 13:02:16 UTC, Bastien wrote: Hi, apologies for what may be a fairly obvious question to some. ## The background: I have been tasked with building software to process data output by scientific instruments for non-experts - basically with GUI, menus, easy config

Re: Dpaste modifies applocation output ?

2016-03-15 Thread John Colvin via Digitalmars-d
On Tuesday, 15 March 2016 at 11:48:48 UTC, Temtaime wrote: Hi! http://dpaste.dzfl.pl/93d518c713b5 On dpaste it's ["a\n\nb"] But should be ["a\r\n\rb"] I've tested with dmd on win, linux and mac : all is ok, and only dpaste returns incorrect result. Why so? I'd wrote them using contact form

Re: write to file array by lines

2016-03-15 Thread John Colvin via Digitalmars-d
On Tuesday, 15 March 2016 at 10:58:16 UTC, Suliman wrote: I have got: string [] total_content; I am appending to it data on every iteration. total_content ~= somedata File file = File(`D:\code\2vlad\result.txt`, "a+"); file.write(total_content); I need to write it's to file by lines. Like:

[Issue 15793] Change !is error to warning

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15793 --- Comment #5 from Sobirari Muhomori --- The problem is not best practices, but usability. --

Re: write to file array by lines

2016-03-15 Thread wobbles via Digitalmars-d
On Tuesday, 15 March 2016 at 12:55:17 UTC, Suliman wrote: I created better example to show. string [] myarr = ["foo", "bar", "baz"]; myarr ~= "new"; File file = File(`result.txt`, "w"); file.write(myarr); is any way to write myarr to file in byLine mode void main(){ import std.stdio;

Re: write to file array by lines

2016-03-15 Thread wobbles via Digitalmars-d
On Tuesday, 15 March 2016 at 12:55:17 UTC, Suliman wrote: I created better example to show. string [] myarr = ["foo", "bar", "baz"]; myarr ~= "new"; File file = File(`result.txt`, "w"); file.write(myarr); is any way to write myarr to file in byLine mode myarr .each!(line =>

Re: D could catch this wave: web assembly

2016-03-15 Thread CraigDillabaugh via Digitalmars-d
On Tuesday, 15 March 2016 at 11:56:40 UTC, Ola Fosheim Grøstad wrote: On Monday, 14 March 2016 at 16:14:55 UTC, CraigDillabaugh wrote: On Monday, 14 March 2016 at 15:53:39 UTC, Joakim wrote: I can chip in general input on porting, based on my Android experience. Thanks. Dan or Ola ... are

Re: write to file array by lines

2016-03-15 Thread Suliman via Digitalmars-d
I created better example to show. string [] myarr = ["foo", "bar", "baz"]; myarr ~= "new"; File file = File(`result.txt`, "w"); file.write(myarr); is any way to write myarr to file in byLine mode

[Issue 15801] New: Overloaded alias parameter variable cannot be read at compile-time

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15801 Issue ID: 15801 Summary: Overloaded alias parameter variable cannot be read at compile-time Product: D Version: D2 Hardware: x86 OS: Windows Status:

Re: Dpaste modifies applocation output ?

2016-03-15 Thread ag0aep6g via Digitalmars-d
On 15.03.2016 12:48, Temtaime wrote: Hi! http://dpaste.dzfl.pl/93d518c713b5 On dpaste it's ["a\n\nb"] But should be ["a\r\n\rb"] I've tested with dmd on win, linux and mac : all is ok, and only dpaste returns incorrect result. Why so? I'd wrote them using contact form but seems no reply.

Re: running D on AWS lambda

2016-03-15 Thread WebFreak001 via Digitalmars-d-announce
On Sunday, 13 March 2016 at 21:22:11 UTC, Laeeth Isharc wrote: http://awslambda-d.readthedocs.org/ http://code.dlang.org/packages/awslambda_d https://github.com/kaleidicpublic/awslambda_d AWS Lambda is a 'compute service that runs your code in response to events and automatically manages the

[Issue 15781] [REG2.069] Template type deduction failure with same-type variables with different constness

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15781 Kenji Hara changed: What|Removed |Added Keywords||pull --- Comment #3 from

[Issue 15781] [REG2.069] Template type deduction failure with same-type variables with different constness

2016-03-15 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15781 Kenji Hara changed: What|Removed |Added Keywords||rejects-valid

Re: the most D-ish GUI library

2016-03-15 Thread thedeemon via Digitalmars-d
On Tuesday, 15 March 2016 at 10:31:40 UTC, Saša Janiška wrote: Another one is DML, an analog of QML: http://stuff.thedeemon.com/lj/dml.png is there some GUI build for DML? In the examples coming with DLangUI there is an app where on the left you enter some DML text and on the right you see

Re: D could catch this wave: web assembly

2016-03-15 Thread Ola Fosheim Grøstad via Digitalmars-d
On Monday, 14 March 2016 at 16:14:55 UTC, CraigDillabaugh wrote: On Monday, 14 March 2016 at 15:53:39 UTC, Joakim wrote: I can chip in general input on porting, based on my Android experience. Thanks. Dan or Ola ... are either of you interested in mentoring something like this? I haven't

Re: write to file array by lines

2016-03-15 Thread wobbles via Digitalmars-d
On Tuesday, 15 March 2016 at 10:58:16 UTC, Suliman wrote: I have got: string [] total_content; I am appending to it data on every iteration. total_content ~= somedata File file = File(`D:\code\2vlad\result.txt`, "a+"); file.write(total_content); I need to write it's to file by lines. Like:

Dpaste modifies applocation output ?

2016-03-15 Thread Temtaime via Digitalmars-d
Hi! http://dpaste.dzfl.pl/93d518c713b5 On dpaste it's ["a\n\nb"] But should be ["a\r\n\rb"] I've tested with dmd on win, linux and mac : all is ok, and only dpaste returns incorrect result. Why so? I'd wrote them using contact form but seems no reply.

Re: Walter, I need a __trait please.

2016-03-15 Thread ZombineDev via Digitalmars-d
On Tuesday, 15 March 2016 at 08:02:34 UTC, Jaocb Carlborg wrote: On Tuesday, 15 March 2016 at 00:29:17 UTC, Stefan Koch wrote: Hi, I found myself in need of __trait that might be useful to include. something that would give me the parameters of a the body of the lambda as string and the

Re: write to file array by lines

2016-03-15 Thread Anonymouse via Digitalmars-d
On Tuesday, 15 March 2016 at 10:58:16 UTC, Suliman wrote: I have got: string [] total_content; I am appending to it data on every iteration. total_content ~= somedata File file = File(`D:\code\2vlad\result.txt`, "a+"); file.write(total_content); I need to write it's to file by lines. Like:

Re: [Request] A way to extract all instance of X from a range

2016-03-15 Thread Meta via Digitalmars-d
On Tuesday, 15 March 2016 at 07:42:58 UTC, Stefan Koch wrote: On Tuesday, 15 March 2016 at 04:05:11 UTC, Meta wrote: I believe this should work with the latest DMD: alias castRange(T) = t => t.map!(x => cast(T) x).filter!(x => x !is null); No it does not. However this works : auto

dlang.org makefile pains

2016-03-15 Thread Jakob Ovrum via Digitalmars-d
I used to contribute to dlang.org now and then before the makefile revamp. Now every time I try, I end up fighting with the makefile. make -f posix.mak apidocs-serve LATEST=2.070.2 <-- place in the command line to skip network traffic *starts downloading crap from downloads.dlang.org that I

write to file array by lines

2016-03-15 Thread Suliman via Digitalmars-d
I have got: string [] total_content; I am appending to it data on every iteration. total_content ~= somedata File file = File(`D:\code\2vlad\result.txt`, "a+"); file.write(total_content); I need to write it's to file by lines. Like: somedataline1 somedataline2 somedataline3 I tried to do

Re: Using tango or other static lib in static lib

2016-03-15 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 08:40:31 UTC, Jaocb Carlborg wrote: On Tuesday, 15 March 2016 at 06:54:45 UTC, Zardoz wrote: Not would be more easy to simply add a dependency to tango on dub.SDL ? I ask... Yes. Mike gave a very long explanation that can be summed up by saying: add Tango as a

Re: the most D-ish GUI library

2016-03-15 Thread Saša Janiška via Digitalmars-d
thedeemon writes: > It is quite "D-ish", using the power of D metaprogramming and D syntax > quite effectively in some places. That's nice. > One big 'pro' of dlangui for me is that you can get a self-contained > 1-2 MB binary without dependencies on any DLLs. Small to

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread Marc Schütz via Digitalmars-d
On Tuesday, 15 March 2016 at 09:13:10 UTC, Nordlöw wrote: On Monday, 14 March 2016 at 09:04:28 UTC, Nordlöw wrote: http://klickverbot.at/code/units/std_units.html http://klickverbot.at/code/units/std_units.html#PrefixSystem No module name in Phobos is currently in plural form. std.traits

Re: the most D-ish GUI library

2016-03-15 Thread Saša Janiška via Digitalmars-d
Jaocb Carlborg writes: > No, DWT does _not_ work on OS X, neither native nor non-native. I'm > working on the OS X port indirectly. The automated process should work > for all ports. OK, the main thing for now it would be that it works on Linux...but I have some problems - see DWT

Re: Walter, I need a __trait please.

2016-03-15 Thread Stefan Koch via Digitalmars-d
foreach (p;__traits(lambda, (x,y) => x < y)) { writeln(p); } would output x y x < y If something like that would be merged I can implement this now I guess. thanks for the PR link Jacob

Re: Walter, I need a __trait please.

2016-03-15 Thread Stefan Koch via Digitalmars-d
On Tuesday, 15 March 2016 at 08:02:34 UTC, Jaocb Carlborg wrote: On Tuesday, 15 March 2016 at 00:29:17 UTC, Stefan Koch wrote: [...] To get the parameters as as strings, I think this [1] will allow you to that. To get the body as a string, that sounds almost as AST macros :) [1]

Re: build problem with 2.0.70

2016-03-15 Thread Saša Janiška via Digitalmars-d-dwt
Saša Janiška writes: > Any hint? It looks it's the following: https://github.com/d-widget-toolkit/dwt/issues/22 since it works when I do not specify '-m64' flag? > Sincerely, > Gour -- What is night for all beings is the time of awakening for the self-controlled; and the

Re: Gdmd compiling error

2016-03-15 Thread Orkhan via Digitalmars-d-learn
On Monday, 14 March 2016 at 17:08:24 UTC, Marc Schütz wrote: On Monday, 14 March 2016 at 14:46:06 UTC, Orkhan wrote: [...] What does `which gdc` print? If it says something like "which: no gdc in ...", there is a problem with the installation of GDC. Otherwise, you can use the following as

build problem with 2.0.70

2016-03-15 Thread Saša Janiška via Digitalmars-d-dwt
Hello, considering that DWT might be interesting option for writing GUI apps with D, I've tried to build it on my Linux machine, but it fails with: [gour@atmarama ~/repos/external]$ git clone --recursive git://github.com/d-widget-toolkit/dwt.git Cloning into 'dwt'... remote: Counting objects:

Re: Gdmd compiling error

2016-03-15 Thread Orkhan via Digitalmars-d-learn
On Monday, 14 March 2016 at 18:13:33 UTC, Ali Çehreli wrote: On 03/14/2016 10:08 AM, Marc Schütz wrote: > What does `which gdc` print? If it says something like "which: no gdc in > ...", there is a problem with the installation of GDC. Otherwise, you > can use the following as a quick

Re: Gdmd compiling error

2016-03-15 Thread Orkhan via Digitalmars-d-learn
On Monday, 14 March 2016 at 17:08:24 UTC, Marc Schütz wrote: On Monday, 14 March 2016 at 14:46:06 UTC, Orkhan wrote: On Monday, 14 March 2016 at 11:11:28 UTC, Ali Çehreli wrote: On 03/14/2016 02:56 AM, Orkhan wrote: > THe output like that : > root@ubuntu:/opt/xcomm# gdmd > Can't exec

Re: the most D-ish GUI library

2016-03-15 Thread Luis via Digitalmars-d
On Tuesday, 15 March 2016 at 08:37:13 UTC, Jaocb Carlborg wrote: On Monday, 14 March 2016 at 20:26:51 UTC, Saša Janiška wrote: Well, OS X and Windows are 'nice to have'. DWT already works on Windows where it uses native drawing operations. So, DWT works on Mac OS, but it's not native as

Re: the most D-ish GUI library

2016-03-15 Thread Luis via Digitalmars-d
On Tuesday, 15 March 2016 at 07:50:48 UTC, Saša Janiška wrote: Jordi Sayol via Digitalmars-d writes: TkD works on Linux. Have you used it and/or what would be some prp/cons vs GtkD? Sincerely, Gour I only tested the examples when I was searching an

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread Nordlöw via Digitalmars-d
On Monday, 14 March 2016 at 09:04:28 UTC, Nordlöw wrote: http://klickverbot.at/code/units/std_units.html http://klickverbot.at/code/units/std_units.html#PrefixSystem No module name in Phobos is currently in plural form. I suggest we stick to that standard a name these std.experimental.unit

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread Nordlöw via Digitalmars-d
On Monday, 14 March 2016 at 19:08:18 UTC, Robert burner Schadek wrote: have a look at this! https://github.com/biozic/quantities Could you briefly outline why you prefer this over David's work?

Re: RFC: Units of measurement for D (Phobos?)

2016-03-15 Thread Nordlöw via Digitalmars-d
On Monday, 14 March 2016 at 18:51:45 UTC, Chris Wright wrote: Ohm my, that's awesome. Watt needs to happen to get this into Phobos? I'm cleaning up David's work right and will put up a PR today.

Re: Is D a good choice for embedding python/octave/julia

2016-03-15 Thread Laeeth Isharc via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 05:56:36 UTC, Ellery Newcomer wrote: On 03/13/2016 02:36 PM, Laeeth Isharc wrote: InterpContext context = new InterpContext(); context.py_stmts(outdent(" import numpy a = numpy.eye(2, dtype='complex128') "));

Re: Using tango or other static lib in static lib

2016-03-15 Thread Jaocb Carlborg via Digitalmars-d-learn
On Tuesday, 15 March 2016 at 06:54:45 UTC, Zardoz wrote: Not would be more easy to simply add a dependency to tango on dub.SDL ? I ask... Yes. Mike gave a very long explanation that can be summed up by saying: add Tango as a dependency to your dub.json/sdl. -- /Jacob Carlborg

  1   2   >