Re: reading file byLine

2015-09-06 Thread Namal via Digitalmars-d-learn
On Sunday, 6 September 2015 at 20:39:27 UTC, deed wrote: On Sunday, 6 September 2015 at 17:57:49 UTC, Namal wrote: Yeah, I just checked, it is 2.066, how can I install the new version on ubuntu with sudo apt-get? sudo apt-get install dmd will give you dmd v2.067.1. Don't know when it will

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Prudence via Digitalmars-d
On Sunday, 6 September 2015 at 20:22:23 UTC, Zoadian wrote: On Sunday, 6 September 2015 at 19:32:58 UTC, Prudence wrote: template X(Y) { string X = Y.stringof; } [...] as you'd have to write a parser for other languages why not just use strings? you can already do this: template

Release D 2.068.1

2015-09-06 Thread Martin Nowak via Digitalmars-d-announce
Glad to announce D 2.068.1. http://downloads.dlang.org/releases/2.x/2.068.1/ This point release comes with many regression and bug fixes over 2.068.0, see the changelog for more details. http://dlang.org/changelog.html#2.068.1 -Martin

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Adam D. Ruppe via Digitalmars-d
On Monday, 7 September 2015 at 00:34:20 UTC, Idan Arye wrote: Compare it to Ruby's heredoc, where the chosen terminator string can be used as an hint(https://github.com/joker1007/vim-ruby-heredoc-syntax). Or D's heredoc strings, yes, we have them too: http://dlang.org/lex.html (search for

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread anonymous via Digitalmars-d
On Monday 07 September 2015 02:24, Idan Arye wrote: > That's not considered as syntax check - that's an earlier stage > of the compilation process called "lexical > analysis"(https://en.wikipedia.org/wiki/Lexical_analysis) >From the Wikipedia article: "a lexer is generally combined with a

Re: FancyPars

2015-09-06 Thread Bastiaan Veelo via Digitalmars-d-announce
On Saturday, 5 September 2015 at 19:45:09 UTC, Stefan Koch wrote: On Thursday, 2 July 2015 at 14:25:09 UTC, Stefan Koch wrote: I addded simplistic Left Recursion handling... Interesting. From the readme: it only compiles with dmd 2.0.66.2 because it exploits a bug in the const-ness

Re: std.Stream.InputStream convenience functions

2015-09-06 Thread bitwise via Digitalmars-d
On Sunday, 6 September 2015 at 21:33:36 UTC, BBasile wrote: I don't care about your problem Then I suggest another thread.

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread bitwise via Digitalmars-d
On Sunday, 6 September 2015 at 22:37:16 UTC, cym13 wrote: On Sunday, 6 September 2015 at 21:16:18 UTC, Prudence wrote: [...] There already is a kind of "code string": interpret(q{ var a = 2; var b += a; }); It doesn't do any kind of syntax check, but there again

Re: Are there any Phobos functions to check file permissions on Windows and Posix?

2015-09-06 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, September 06, 2015 20:40:03 Gary Willoughby via Digitalmars-d-learn wrote: > Are there any Phobos functions to check file permissions on > Windows and Posix? For example, I want to check if a file is > readable and/or writable in a cross-platform fashion. Does anyone > have an example?

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread anonymous via Digitalmars-d
On Monday 07 September 2015 00:37, cym13 wrote: > There already is a kind of "code string": > > interpret(q{ > var a = 2; > var b += a; > }); > > It doesn't do any kind of syntax check, but there again how do > you want to have syntax check for any language? The D

Re: Regression?

2015-09-06 Thread Sebastiaan Koppe via Digitalmars-d-learn
Dammit, i am on windows, DMD32 D Compiler v2.068.0

Re: How To: Passing curried functions around

2015-09-06 Thread Meta via Digitalmars-d-learn
The name validator_t is not idiomatic in D. Something like ValidatorFun should be preferred. Same for intReader_t; ReadIntFun is probably preferred, or even IntReader (but that would imply that it's a struct/class in my mind). As for the actual use of partial, it's perfectly fine and

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Zoadian via Digitalmars-d
On Sunday, 6 September 2015 at 19:32:58 UTC, Prudence wrote: template X(Y) { string X = Y.stringof; } [...] as you'd have to write a parser for other languages why not just use strings? you can already do this: template X(string Y) { enum X = Y; } auto s = X!q{int 3;};

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Prudence via Digitalmars-d
On Sunday, 6 September 2015 at 20:38:44 UTC, Adam D. Ruppe wrote: On Sunday, 6 September 2015 at 20:22:23 UTC, Zoadian wrote: obviously X has to be a compiletime js->d compiler. Just a fun fact: my script.d's interpreter is itself CTFEable in modern dmd! import arsd.script; void main() {

Re: reading file byLine

2015-09-06 Thread Namal via Digitalmars-d-learn
That should be it though... Could you try this minimal complete test? import std.stdio; import std.algorithm; void main(string[] args) { int[] arr = [1, 2, 4, 2, 3, 4, 1]; arr.sort.uniq.writeln; } // [1, 2, 3, 4] yes, it works likte that. unique(arr) I get Error: undefined

Re: reading file byLine

2015-09-06 Thread Namal via Digitalmars-d-learn
Well, if you don't type function names right, it will be hard to help you. oh, sorry. But I found out what I have been doing wrong besides that. arr.sort.uniq; uniq(arr) or arr.sort.uniq; compiles but doesn't store it in the arr array, I need to store it in a new one.

Re: dmd codegen improvements

2015-09-06 Thread Manu via Digitalmars-d
On 6 September 2015 at 18:57, Jacob Carlborg via Digitalmars-d wrote: > On 2015-09-06 02:54, Walter Bright wrote: > >> It probably is a rampant problem. I notice it with you because >> Thunderbird gives a line count for a message, and yours are usually in >> the

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread cym13 via Digitalmars-d
On Sunday, 6 September 2015 at 23:00:21 UTC, bitwise wrote: On Sunday, 6 September 2015 at 22:37:16 UTC, cym13 wrote: On Sunday, 6 September 2015 at 21:16:18 UTC, Prudence wrote: [...] There already is a kind of "code string": interpret(q{ var a = 2; var b += a;

Re: std.Stream.InputStream convenience functions

2015-09-06 Thread BBasile via Digitalmars-d
On Sunday, 6 September 2015 at 18:52:34 UTC, bitwise wrote: On Sunday, 6 September 2015 at 10:12:39 UTC, BBasile wrote: On Sunday, 6 September 2015 at 04:48:56 UTC, bitwise wrote: On Sunday, 6 September 2015 at 03:42:20 UTC, BBasile wrote: [...] auto rng =

Re: std.Stream.InputStream convenience functions

2015-09-06 Thread BBasile via Digitalmars-d
On Sunday, 6 September 2015 at 20:17:32 UTC, bitwise wrote: On Sunday, 6 September 2015 at 20:05:20 UTC, BBasile wrote: On Sunday, 6 September 2015 at 18:52:34 UTC, bitwise wrote: [...] You should have got that's even not what i was talking about. Basic summary of the conversation: - you:

[Issue 15019] New: [ICE] Heisencrash with -fPIC and non-trivial projects

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15019 Issue ID: 15019 Summary: [ICE] Heisencrash with -fPIC and non-trivial projects Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: major

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread cym13 via Digitalmars-d
On Sunday, 6 September 2015 at 23:48:30 UTC, cym13 wrote: On Sunday, 6 September 2015 at 23:40:58 UTC, anonymous wrote: On Monday 07 September 2015 00:37, cym13 wrote: There already is a kind of "code string": interpret(q{ var a = 2; var b += a; }); It doesn't

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread cym13 via Digitalmars-d
On Sunday, 6 September 2015 at 23:40:58 UTC, anonymous wrote: On Monday 07 September 2015 00:37, cym13 wrote: There already is a kind of "code string": interpret(q{ var a = 2; var b += a; }); It doesn't do any kind of syntax check, but there again how do you

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Idan Arye via Digitalmars-d
On Sunday, 6 September 2015 at 23:40:58 UTC, anonymous wrote: On Monday 07 September 2015 00:37, cym13 wrote: There already is a kind of "code string": interpret(q{ var a = 2; var b += a; }); It doesn't do any kind of syntax check, but there again how do you

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 6 September 2015 at 23:33:17 UTC, Walter Bright wrote: I'd always thought Javascript was an ideal extension language for a text editor. Well, I don't think *ideal*, but indeed, it wouldn't be bad. And my little thing isn't quite JS, I borrow some ideas from D too. So it has string

Are there any Phobos functions to check file permissions on Windows and Posix?

2015-09-06 Thread Gary Willoughby via Digitalmars-d-learn
Are there any Phobos functions to check file permissions on Windows and Posix? For example, I want to check if a file is readable and/or writable in a cross-platform fashion. Does anyone have an example?

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 6 September 2015 at 21:16:18 UTC, Prudence wrote: Yeah, but wouldn't it be so much nicer? (and probably debuggable inline) interpret({ var a = 5; a += 2; a; } Not really because that already more-or-less works today (add a q before that { and it will compile). The

Re: What's the "right" way to do openmp-style parallelism?

2015-09-06 Thread Meta via Digitalmars-d-learn
On Monday, 7 September 2015 at 02:56:04 UTC, Charles wrote: Friends, I have a program that would be pretty easy to parallelize with an openmp pragra in C. I'd like to avoid the performance cost of using message passing, and the shared qualifier seems like it's enforcing guarantees I don't

Re: How To: Passing curried functions around

2015-09-06 Thread welkam via Digitalmars-d-learn
Now its clearer to me. You want delegates http://wiki.dlang.org/Function_literals

Re: std.Stream.InputStream convenience functions

2015-09-06 Thread bitwise via Digitalmars-d
On Sunday, 6 September 2015 at 20:05:20 UTC, BBasile wrote: On Sunday, 6 September 2015 at 18:52:34 UTC, bitwise wrote: On Sunday, 6 September 2015 at 10:12:39 UTC, BBasile wrote: On Sunday, 6 September 2015 at 04:48:56 UTC, bitwise wrote: On Sunday, 6 September 2015 at 03:42:20 UTC, BBasile

Re: reading file byLine

2015-09-06 Thread cym13 via Digitalmars-d-learn
On Sunday, 6 September 2015 at 21:01:09 UTC, Namal wrote: On Sunday, 6 September 2015 at 20:39:27 UTC, deed wrote: On Sunday, 6 September 2015 at 17:57:49 UTC, Namal wrote: Yeah, I just checked, it is 2.066, how can I install the new version on ubuntu with sudo apt-get? sudo apt-get

Re: reading file byLine

2015-09-06 Thread cym13 via Digitalmars-d-learn
On Sunday, 6 September 2015 at 21:18:28 UTC, Namal wrote: That should be it though... Could you try this minimal complete test? import std.stdio; import std.algorithm; void main(string[] args) { int[] arr = [1, 2, 4, 2, 3, 4, 1]; arr.sort.uniq.writeln; } // [1, 2, 3, 4] yes, it

Re: Containers

2015-09-06 Thread bitwise via Digitalmars-d
On Saturday, 5 September 2015 at 00:21:42 UTC, Timon Gehr wrote: On 09/05/2015 01:15 AM, Andrei Alexandrescu wrote: My thinking is that significant work in this(this) is poor D style. Eager copying for containers doesn't seem like the best way to go. -- Andrei @disable this(this) for

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Walter Bright via Digitalmars-d
On 9/6/2015 1:38 PM, Adam D. Ruppe wrote: jsvar.d and script.d can be found here: https://github.com/adamdruppe/arsd I'd always thought Javascript was an ideal extension language for a text editor.

Re: FancyPars

2015-09-06 Thread Stefan Koch via Digitalmars-d-announce
On Sunday, 6 September 2015 at 20:23:40 UTC, Bastiaan Veelo wrote: However, 2.0.66.2 does not seem to exist [1,2]. Am I overlooking something? Ahh yeah it should be 2.066.1 Thanks for catching that

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Adam D. Ruppe via Digitalmars-d
On Sunday, 6 September 2015 at 20:22:23 UTC, Zoadian wrote: obviously X has to be a compiletime js->d compiler. Just a fun fact: my script.d's interpreter is itself CTFEable in modern dmd! import arsd.script; void main() { // script.d is similar to but not identical to javascript

Re: reading file byLine

2015-09-06 Thread deed via Digitalmars-d-learn
On Sunday, 6 September 2015 at 17:57:49 UTC, Namal wrote: Yeah, I just checked, it is 2.066, how can I install the new version on ubuntu with sudo apt-get? sudo apt-get install dmd will give you dmd v2.067.1. Don't know when it will be upgraded to 2.068 though.

[Issue 14472] add separate ptr data section

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14472 Martin Nowak changed: What|Removed |Added Summary|add separate noptr data |add separate ptr data

Re: DCD 0.7.0

2015-09-06 Thread Dicebot via Digitalmars-d-announce
On Wednesday, 2 September 2015 at 09:07:24 UTC, Chris wrote: Thanks, great stuff! One thing you say it's been tested with 2.067.1, but for this version it gives the following error message: containers/experimental_allocator/src/std/experimental/allocator/common.d(337): Error: module meta is

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread cym13 via Digitalmars-d
On Sunday, 6 September 2015 at 21:16:18 UTC, Prudence wrote: Or, maybe better yet, have the concept of "code strings". which are strings that are suppose to be interpreted as code. This then means the compiler just has to do a syntax check for errors before it does anything else with

Re: AST like coding syntax. Easy upgrade!

2015-09-06 Thread Idan Arye via Digitalmars-d
On Sunday, 6 September 2015 at 23:38:51 UTC, cym13 wrote: On Sunday, 6 September 2015 at 23:00:21 UTC, bitwise wrote: On Sunday, 6 September 2015 at 22:37:16 UTC, cym13 wrote: On Sunday, 6 September 2015 at 21:16:18 UTC, Prudence wrote: [...] There already is a kind of "code string":

What's the "right" way to do openmp-style parallelism?

2015-09-06 Thread Charles via Digitalmars-d-learn
Friends, I have a program that would be pretty easy to parallelize with an openmp pragra in C. I'd like to avoid the performance cost of using message passing, and the shared qualifier seems like it's enforcing guarantees I don't need. Essentially, I have x = float[imax][jmax]; //x is about

Regression?

2015-09-06 Thread Sebastiaan Koppe via Digitalmars-d-learn
This used to work in older compiler (might have been v2.067 or v2.066, not older). ``` #!rdmd import std.stdio; import std.json; import std.algorithm; void main() { auto ls = File("../languages.json","r").byLineCopy().joiner.parseJSON(); } ``` Error:

Re: dmd codegen improvements

2015-09-06 Thread Iain Buclaw via Digitalmars-d
On 5 Sep 2015 11:25 pm, "Walter Bright via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: > > On 9/5/2015 5:54 AM, Adam D. Ruppe wrote: >> >> On Saturday, 5 September 2015 at 08:15:06 UTC, Walter Bright wrote: >>> >>> And your post did it too. >>> >>> If you're using the Thunderbird news

[Issue 15017] [REG2.068.1-b2] assigning a Variant to be value in a hashmap

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15017 Kenji Hara changed: What|Removed |Added Keywords||link-failure, pull

Re: Can we have strcu with destructor have postblit disabled if none is provided ?

2015-09-06 Thread ponce via Digitalmars-d
On Saturday, 5 September 2015 at 22:22:03 UTC, deadalnix wrote: Can we have strcu with destructor have postblit disabled if none is provided ? I also feel like post-blit should be opt-in.

Re: How to partially forward properties of struct array member to struct (disable length property) ?

2015-09-06 Thread bioinfornatics via Digitalmars-d-learn
On Sunday, 6 September 2015 at 07:34:36 UTC, ParticlePeter wrote: I am working on a struct vector. The data is stored in a member static array and I want to be able to forward all array properties except length to vector. Reason is I have free functions f that take vector(s) as arguments, such

Re: dmd codegen improvements

2015-09-06 Thread Jacob Carlborg via Digitalmars-d
On 2015-09-06 02:54, Walter Bright wrote: It probably is a rampant problem. I notice it with you because Thunderbird gives a line count for a message, and yours are usually in the hundreds of lines while others are like 10 to 20. Usually Thunderbird highlights the quoted part in blue and

How to partially forward properties of struct array member to struct (disable length property) ?

2015-09-06 Thread ParticlePeter via Digitalmars-d-learn
I am working on a struct vector. The data is stored in a member static array and I want to be able to forward all array properties except length to vector. Reason is I have free functions f that take vector(s) as arguments, such that f(vector) and vector.f via UFCS is possible. Using alias

Re: Current state of GUI's

2015-09-06 Thread Jacob Carlborg via Digitalmars-d
On 2015-09-06 01:43, motaito wrote: Bummer... However, I appreciate that you are giving it a shot! But you see my point. An out of the box solution like QT would be worth gold. That's the one thing Microsoft got right. They have awesome developer tools. Or in the words of Steve Ballmer:

Re: dmd codegen improvements

2015-09-06 Thread via Digitalmars-d
On Sunday, 6 September 2015 at 12:31:27 UTC, Kagamin wrote: On Saturday, 5 September 2015 at 14:57:58 UTC, Ola Fosheim Grøstad wrote: On Friday, 4 September 2015 at 14:44:46 UTC, Jacob Carlborg wrote: I heard the TypeScript support for Visual Studio Code is really good. I'm crossing my

Re: Interfacing Chromium & SQLite

2015-09-06 Thread Byron Heads via Digitalmars-d-learn
On Saturday, 5 September 2015 at 13:32:04 UTC, Mike McKee wrote: On Saturday, 5 September 2015 at 11:43:16 UTC, Mike McKee wrote: On a Mac (Yosemite version), how would I create a window in D, embed Chromium, use D to show a local SQLite test database (id, firstname, lastname) inside Chromium,

Re: Is D suitable for my latest project?

2015-09-06 Thread BBasile via Digitalmars-d-learn
On Sunday, 6 September 2015 at 14:36:53 UTC, chris stevens wrote: - dynamic creation of classes/structs at runtime. You have Object.factory for this. You can also use a custom factory based on string comparison. (with some: static if(condition) return new This; else static if(otherCondition)

[Issue 14996] only(EnumMembers!T) eats all my memory when T : string

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14996 --- Comment #2 from Kenji Hara --- Reduced test case: enum Bad : string { confirm = "confirm", } struct OnlyResult { Bad[1] data; } void main() {} --

[Issue 14996] only(EnumMembers!T) eats all my memory when T : string

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14996 Kenji Hara changed: What|Removed |Added Keywords||ice, pull

Is D suitable for my latest project?

2015-09-06 Thread chris stevens via Digitalmars-d-learn
Hi All, I am considering using D for my latest project and there are a few features I would like and am not entirely sure at this point whether D has them. They are: - dynamic creation of classes/structs at runtime (think I can emulate this with variants/dynamic) - dynamic compilation of

Re: Is D suitable for my latest project?

2015-09-06 Thread chris stevens via Digitalmars-d-learn
On Sunday, 6 September 2015 at 14:36:53 UTC, chris stevens wrote: - dynamic compilation of code files at runtime I guess I could just invoke the compiler from my code for this? I would also like to be able to load this compiled code into the current process. This probably can be achieved

[Issue 14785] Some corner cases are not handled properly by core.checkedint.

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

[Issue 14785] Some corner cases are not handled properly by core.checkedint.

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14785 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/799a68968ee5c92452b863851fa32d762cba180f Fix Issue 14785 -

Re: Windows Resources

2015-09-06 Thread Kagamin via Digitalmars-d-learn
On Sunday, 6 September 2015 at 02:37:21 UTC, Prudence wrote: Obviously the issue is that I'm not using any resources yet it is giving me such an error. You do. See docs for lpszMenuName field. GUI projects generated by Visual Studio include resource generation, that's why it works for them.

[Issue 15017] [REG2.068.1-b2] assigning a Variant to be value in a hashmap

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

[Issue 15017] [REG2.068.1-b2] assigning a Variant to be value in a hashmap

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15017 --- Comment #4 from github-bugzi...@puremagic.com --- Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4a87ff64dfdc67419a69136ce542e88c67726701 fix Issue 15017 - assigning

Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-06 Thread anonymous via Digitalmars-d-announce
On Sunday, 6 September 2015 at 09:42:53 UTC, Grand_Axe wrote: On Wednesday, 2 September 2015 at 21:13:12 UTC, anonymous wrote: On Wednesday, 2 September 2015 at 14:41:20 UTC, GrandAxe wrote: Unnetworked personal mobile devices are the target platform for the standard implementation of OBI.

[Issue 14944] [REG2.064] cannot initialize static array by static this()

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14944 --- Comment #6 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/1d621e240a0f8d7df60fb1c7f14da21532aa99d5 fix Issue 14944 - cannot

[Issue 14714] Add README.md to the Installer Repository

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

[Issue 14714] Add README.md to the Installer Repository

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14714 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/installer https://github.com/D-Programming-Language/installer/commit/74ba8dbfe5671ed6d1a1b000b9a05bc043ec1bd3 fix Issue 14714

Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-06 Thread Grand_Axe via Digitalmars-d-announce
On Wednesday, 2 September 2015 at 21:13:12 UTC, anonymous wrote: On Wednesday, 2 September 2015 at 14:41:20 UTC, GrandAxe wrote: Unnetworked personal mobile devices are the target platform for the standard implementation of OBI. What hardware/OS (if any) will you use? Depending on the

Re: dmd codegen improvements

2015-09-06 Thread Kagamin via Digitalmars-d
On Saturday, 5 September 2015 at 14:57:58 UTC, Ola Fosheim Grøstad wrote: On Friday, 4 September 2015 at 14:44:46 UTC, Jacob Carlborg wrote: I heard the TypeScript support for Visual Studio Code is really good. I'm crossing my fingers for an OS-X or Linux version of VS. ;) You mean Visual

Re: Windows Resources

2015-09-06 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 6 September 2015 at 10:28:59 UTC, Kagamin wrote: You do. See docs for lpszMenuName field. I can't believe I missed that!

Re: How to partially forward properties of struct array member to struct (disable length property) ?

2015-09-06 Thread ParticlePeter via Digitalmars-d-learn
On Sunday, 6 September 2015 at 08:48:32 UTC, bioinfornatics wrote: On Sunday, 6 September 2015 at 07:34:36 UTC, ParticlePeter wrote: I am working on a struct vector. The data is stored in a member static array and I want to be able to forward all array properties except length to vector.

Re: std.Stream.InputStream convenience functions

2015-09-06 Thread BBasile via Digitalmars-d
On Sunday, 6 September 2015 at 04:48:56 UTC, bitwise wrote: On Sunday, 6 September 2015 at 03:42:20 UTC, BBasile wrote: [...] auto rng = StreamRange!(MemoryStream,long)(instance); auto rng = StreamRange!(FileStream,float)(instance); --- Actually I have nothing against your helper functions

Re: Error reporting is terrible

2015-09-06 Thread Kagamin via Digitalmars-d
On Friday, 4 September 2015 at 22:14:02 UTC, Adam D. Ruppe wrote: On Thursday, 3 September 2015 at 23:56:53 UTC, Prudence wrote: 1. The setup is a much compared to most modern day compilers and software. The most inappropriately kept secret of installing dmd is that you don't have to. Just

Re: 1st Ever Artificial Consciousness to be Written in D Language

2015-09-06 Thread Grand_Axe via Digitalmars-d-announce
On Friday, 4 September 2015 at 20:48:54 UTC, Márcio Martins wrote: On Wednesday, 2 September 2015 at 14:41:20 UTC, GrandAxe wrote: This is to inform the D Language community that the first viable general artificial algorithm is being written in D. It is called Organic Big data intelligence

Re: How to partially forward properties of struct array member to struct (disable length property) ?

2015-09-06 Thread via Digitalmars-d-learn
Untested: struct Vector(T) { T[42] data; auto opDispatch(string func, Args...)(Args args) if(is(typeof(mixin("data."~func)(Args.init))) && func != "length") { return mixin("data."~func)(Args.init); } }

[Issue 11686] core.thread missing cpu binding method (thread affinity).

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11686 Robert M. Münch changed: What|Removed |Added CC|

Re: dmd codegen improvements

2015-09-06 Thread via Digitalmars-d
On Friday, 4 September 2015 at 15:45:35 UTC, Luís Marques wrote: On Friday, 4 September 2015 at 14:59:12 UTC, Ola Fosheim Grøstad wrote: Actually, browsers are deprecating NPAPI plugins. Flash is so dead… Could, in principle, Flash be supported through an extension, instead of a media /

[Issue 13234] Windows installer: when updating, uninstaller reports wrong installation directory

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13234 --- Comment #1 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/installer https://github.com/D-Programming-Language/installer/commit/d76977ee447f107b3e9c70827d52b45d08ca3c30 Merge pull

Re: reading file byLine

2015-09-06 Thread Namal via Digitalmars-d-learn
Are you on 2.066 or older? Back then std.algorithm hasn't been split into submodules yet. Just import std.algorithm then instead of std.algorithm.comparison, std.algorithm.iteration, etc. Yeah, I just checked, it is 2.066, how can I install the new version on ubuntu with sudo apt-get? I

Re: Interface "indexing"

2015-09-06 Thread Kagamin via Digitalmars-d-learn
On Sunday, 6 September 2015 at 17:32:11 UTC, Prudence wrote: And to fire the event, instead of a huge switch(or essentially the same), one can write one line of code or so and have D take care of matching up things. (essentially for some enum value I want a corresponding type to be associated

Re: Interface "indexing"

2015-09-06 Thread Kagamin via Digitalmars-d-learn
Well, you can have an array of event factories: IEvent function()[2] factories = [ factory1, factory2 ]; IEvent factory1() { return new Event1(); } IEvent factory2() { return new Event2(); } Then use enum for indexing: IEvent e = factories[NumEvent1]();

Re: Interface "indexing"

2015-09-06 Thread Prudence via Digitalmars-d-learn
On Sunday, 6 September 2015 at 18:11:44 UTC, Kagamin wrote: Well, you can have an array of event factories: IEvent function()[2] factories = [ factory1, factory2 ]; IEvent factory1() { return new Event1(); } IEvent factory2() { return new Event2(); } Then use enum for indexing: IEvent e =

Re: Current state of GUI's

2015-09-06 Thread motaito via Digitalmars-d
On Sunday, 6 September 2015 at 02:27:42 UTC, Rikki Cattermole wrote: I would very much appreciate people helping out. E.g. Contributing manipulation functions, image loader / exporter. Most importantly unittests. Fix bugs. I'll most likely do the PNG test case infrastructure, but it would

Re: Windows Resources

2015-09-06 Thread Kagamin via Digitalmars-d-learn
On Sunday, 6 September 2015 at 15:42:52 UTC, Prudence wrote: So how does one actually include resources such as menu's (rc files and all that) in a D project? Or am I stuff creating all that stuff programmatically? Just like in a C project: write, compile and link them.

[Issue 14862] Constructor of overlapped struct does not initialize correctly global variables

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

Re: reading file byLine

2015-09-06 Thread anonymous via Digitalmars-d-learn
On Sunday, 6 September 2015 at 15:41:34 UTC, Namal wrote: is there any function that removes double elements in a sorted array? std.algorithm.iteration.uniq http://dlang.org/phobos/std_algorithm_iteration.html#uniq

Re: Is D suitable for my latest project?

2015-09-06 Thread chris stevens via Digitalmars-d-learn
Thanks so much for your reply. On Sunday, 6 September 2015 at 14:45:45 UTC, BBasile wrote: if you mean to generate code as string, writing them to a file, of course it will work in D. I guess you're right it wouldn't be too difficult to do it all using strings. The code generation I'd done

Re: reading file byLine

2015-09-06 Thread Namal via Digitalmars-d-learn
Note that there's a specialized `std.algorithm.iteration.sum`. is there any function that removes double elements in a sorted array?

Re: Windows Resources

2015-09-06 Thread Prudence via Digitalmars-d-learn
On Sunday, 6 September 2015 at 10:28:59 UTC, Kagamin wrote: On Sunday, 6 September 2015 at 02:37:21 UTC, Prudence wrote: Obviously the issue is that I'm not using any resources yet it is giving me such an error. You do. See docs for lpszMenuName field. GUI projects generated by Visual Studio

[Issue 15012] Druntime Makefile whitelists compilers

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15012 --- Comment #2 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/druntime https://github.com/D-Programming-Language/druntime/commit/7b1a6110f35fbd358235385b9bb0c56d91bcc084 remove CC filter

[Issue 15012] Druntime Makefile whitelists compilers

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15012 --- Comment #3 from github-bugzi...@puremagic.com --- Commit pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/0bfc7ca32f074ff4295f567033da4f72b4d377a7 remove CC filter for

Re: reading file byLine

2015-09-06 Thread Namal via Digitalmars-d-learn
On Sunday, 6 September 2015 at 15:52:38 UTC, anonymous wrote: On Sunday, 6 September 2015 at 15:41:34 UTC, Namal wrote: is there any function that removes double elements in a sorted array? std.algorithm.iteration.uniq http://dlang.org/phobos/std_algorithm_iteration.html#uniq Hmm, I get

Re: reading file byLine

2015-09-06 Thread anonymous via Digitalmars-d-learn
On Sunday, 6 September 2015 at 16:17:29 UTC, Namal wrote: Error: module comparison is in file 'std/algorithm/comparison.d' which cannot be read import path[0] = /usr/include/dmd/phobos import path[1] = /usr/include/dmd/druntime/import when I try to load the headers like in the example Are

Re: std.Stream.InputStream convenience functions

2015-09-06 Thread bitwise via Digitalmars-d
On Sunday, 6 September 2015 at 10:12:39 UTC, BBasile wrote: On Sunday, 6 September 2015 at 04:48:56 UTC, bitwise wrote: On Sunday, 6 September 2015 at 03:42:20 UTC, BBasile wrote: [...] auto rng = StreamRange!(MemoryStream,long)(instance); auto rng = StreamRange!(FileStream,float)(instance);

How To: Passing curried functions around

2015-09-06 Thread Bahman Movaqar via Digitalmars-d-learn
I'm just learning D, so please bear with me if I'm asking something naive. Consider the following code skeleton: // in part A of the application... // - alias bool function(int n) validator_t; bool isEven(int n) {

[Issue 15006] Compiling trivial program produces 400,000+ byte object file

2015-09-06 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15006 Martin Nowak changed: What|Removed |Added CC||c...@dawg.eu --- Comment #3

AST like coding syntax. Easy upgrade!

2015-09-06 Thread Prudence via Digitalmars-d
template X(Y) { string X = Y.stringof; } auto s = X({int 3;}) Of course, doesn't work!! But having the ability to pass code that isn't contained in a string is very useful!! 1. A new code keyword, similar to alias. Can only be used as template parameters. If you are worried about

Re: How To: Passing curried functions around

2015-09-06 Thread Bahman Movaqar via Digitalmars-d-learn
On Sunday, 6 September 2015 at 19:22:41 UTC, welkam wrote: I dont know much about functional programming, but what stops you defining int readInt(string prompt, validator_t validator) { ... } as a free standing function and just call it from both parts of your code? What is the benefit of