Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-18 Thread Meta via Digitalmars-d-announce
On Sunday, 18 October 2015 at 19:00:16 UTC, rcorre wrote: You might find this interesting. It's an "outside-in" approach to the same problem as opposed to your "inside-out" approach. Not finished, but the general idea is there.

Re: Curl, how to recieve data.

2015-10-18 Thread holo via Digitalmars-d-learn
On Sunday, 18 October 2015 at 20:12:42 UTC, sigod wrote: On Sunday, 18 October 2015 at 20:05:24 UTC, holo wrote: @sigod Actually im working on ec2 requests. Thank you for help, it is working right now. I don't know why i was trying "+=" before instead of "~=". Is it good solution to make it

Re: kxml and dub package manager.

2015-10-18 Thread drug via Digitalmars-d-learn
19.10.2015 02:57, holo пишет: How to make dub to work for me? Try ``` import kxml.xml; // instead of import kxml; ```

Re: Curl, how to recieve data.

2015-10-18 Thread holo via Digitalmars-d-learn
@sigod Actually im working on ec2 requests. Thank you for help, it is working right now. I don't know why i was trying "+=" before instead of "~=". Is it good solution to make it such way? @Suliaman I need to collect information about my instances and put it to DB. I want to present those

Re: OT: why do people use python when it is slow?

2015-10-18 Thread Mengu via Digitalmars-d-learn
On Sunday, 18 October 2015 at 13:29:50 UTC, Ola Fosheim Grøstad wrote: On Sunday, 18 October 2015 at 12:50:43 UTC, Namespace wrote: On Tuesday, 13 October 2015 at 23:26:14 UTC, Laeeth Isharc wrote: https://www.quora.com/Why-is-Python-so-popular-despite-being-so-slow Andrei suggested posting

Re: kxml and dub package manager.

2015-10-18 Thread holo via Digitalmars-d-learn
ok i fugure out it. When i do initiation i need to add dependencies (thought it is enough to add them to sdl file). Proper initiation should look like that: dub init projectname kxml

Re: OT: why do people use python when it is slow?

2015-10-18 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Sunday, 18 October 2015 at 20:44:44 UTC, Mengu wrote: i've seen the presentation and i can't stop thinking how it'd be if they had chosen D instead of Go. Not much better, probably worse, given that Go has stack protection for fibers and D doesn't. So in Go you can get away with 2K

Re: Curl, how to recieve data.

2015-10-18 Thread sigod via Digitalmars-d-learn
On Sunday, 18 October 2015 at 21:01:05 UTC, holo wrote: On Sunday, 18 October 2015 at 20:12:42 UTC, sigod wrote: [...] I changed it to such code: ... auto client = HTTP(endpoint ~ "?" ~ canonicalQueryString); client.method = HTTP.Method.get;

Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-18 Thread rcorre via Digitalmars-d-announce
On Sunday, 18 October 2015 at 21:18:52 UTC, rcorre wrote: On Sunday, 18 October 2015 at 21:00:32 UTC, Meta wrote: On Sunday, 18 October 2015 at 19:00:16 UTC, rcorre wrote: You might find this interesting. It's an "outside-in" approach to the same problem as opposed to your "inside-out"

Re: Curl, how to recieve data.

2015-10-18 Thread sigod via Digitalmars-d-learn
On Sunday, 18 October 2015 at 20:05:24 UTC, holo wrote: @sigod Actually im working on ec2 requests. Thank you for help, it is working right now. I don't know why i was trying "+=" before instead of "~=". Is it good solution to make it such way? Not really as it will trigger allocation on

Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-18 Thread Meta via Digitalmars-d-announce
On Sunday, 18 October 2015 at 21:18:52 UTC, rcorre wrote: That's just the kind of thing I was looking for! I actually started with a 'visitor' function that works similar to project: https://github.com/rcorre/superstruct/blob/master/src/superstruct.d#L153-L166 then decided to wrap the whole

Re: The D Language Foundation is now incorporated

2015-10-18 Thread Jonathan M Davis via Digitalmars-d-announce
On Sunday, October 18, 2015 11:12:18 Suliman via Digitalmars-d-announce wrote: > >I think a new website will be much better suited for this task. > I do not think that we should diffuse efforts and yet another > site is bad idea. And now dsource is not live, so it's better > revive it then create

Re: Curl, how to recieve data.

2015-10-18 Thread holo via Digitalmars-d-learn
On Sunday, 18 October 2015 at 21:11:58 UTC, sigod wrote: On Sunday, 18 October 2015 at 21:01:05 UTC, holo wrote: On Sunday, 18 October 2015 at 20:12:42 UTC, sigod wrote: [...] I changed it to such code: ... auto client = HTTP(endpoint ~ "?" ~ canonicalQueryString);

Re: std.algorithm.startsWith only predicate

2015-10-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, October 18, 2015 17:48:18 Freddy via Digitalmars-d-learn wrote: > How do you call startsWith with only a predicate > --- > import std.algorithm; > import std.ascii; > > bool iden(string str) > { > return str.startsWith!(a => a.isAlpha || a == '_'); > } > --- startsWith doesn't

kxml and dub package manager.

2015-10-18 Thread holo via Digitalmars-d-learn
I want to add xml support to my application so i fetched kxml library with dub but it don't want to work for me. Steps and test code: [holo@ultraxps kxml]$ cat dub.sdl name "kxml" description "A minimal D application." copyright "Copyright © 2015, holo" authors "holo" dependencies "kxml"

Re: opDispatch and compile time parameters

2015-10-18 Thread David Osborne via Digitalmars-d
On Saturday, 17 October 2015 at 15:31:00 UTC, Nikolay wrote: I asked on SO question about opDispatch and compile time parameters: http://stackoverflow.com/questions/32998781/opdispatch-and-compile-time-parameters [...] Is it good idea for opDispatch improvement or may there is some other

Re: The D Language Foundation is now incorporated

2015-10-18 Thread Pradeep Gowda via Digitalmars-d-announce
On Sunday, 18 October 2015 at 21:52:17 UTC, Jonathan M Davis wrote: I expect that you're going to get a fair bit of disagreement on that. We've been telling everyone for years that it's full of old stuff that mostly only works with old versions of D (most of it D1) and that it should usually

Re: kxml and dub package manager.

2015-10-18 Thread holo via Digitalmars-d-learn
On Monday, 19 October 2015 at 03:04:28 UTC, drug wrote: 19.10.2015 02:57, holo пишет: How to make dub to work for me? Try ``` import kxml.xml; // instead of import kxml; ``` Same: [holo@ultraxps kxml]$ dub run Performing "debug" build using dmd for x86_64. kxml ~master: building

[Issue 15221] Duration should treat division by 0 as a logic error rather than throwing an exception

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15221 Jonathan M Davis changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 15221] New: Duration should treat division by 0 as a logic error rather than throwing an exception

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15221 Issue ID: 15221 Summary: Duration should treat division by 0 as a logic error rather than throwing an exception Product: D Version: D2 Hardware: All OS: All

kxml - parsing AWS API xml respond

2015-10-18 Thread holo via Digitalmars-d-learn
I'm trying to take out from AWS respond needed information. Here is cut off part of example respond: ... i-x ami-x 16 running

Re: Sub-classing exceptions

2015-10-18 Thread Shriramana Sharma via Digitalmars-d
Jacob Carlborg wrote: > If you declare the subclass as usual you can have a template mixin that > adds the constructor. > > class SubException : Exception > { > mixin ExceptionConstructors; > } https://github.com/D-Programming-Language/druntime/pull/1413 -- Shriramana Sharma, Penguin #395953

Re: How is std.regex.replaceAllInto more efficient?

2015-10-18 Thread Dmitry Olshansky via Digitalmars-d
On 18-Oct-2015 21:16, Shriramana Sharma wrote: Dmitry Olshansky wrote: I guess the idiomatic way is: foreach (pos; iota(0, sink.data.length, 4).retro) Mmm no that throws an assertion failure, since the guarantee of the regex is only to insert commas before every third digit *from the end*,

Re: Synchronized classes have no public members

2015-10-18 Thread Jonathan M Davis via Digitalmars-d
On Sunday, 18 October 2015 at 15:51:50 UTC, Jacob Carlborg wrote: On 2015-10-16 23:54, Jonathan M Davis wrote: Basically all of the usage of the "synchronized" keyword in DWT is actually the synchronized statement. I found a couple of more false positives where "synchronized" was part of a

Re: It's a class! It's a struct! It's ... SuperStruct!

2015-10-18 Thread rcorre via Digitalmars-d-announce
On Sunday, 18 October 2015 at 21:00:32 UTC, Meta wrote: On Sunday, 18 October 2015 at 19:00:16 UTC, rcorre wrote: You might find this interesting. It's an "outside-in" approach to the same problem as opposed to your "inside-out" approach. Not finished, but the general idea is there.

Re: std.algorithm.startsWith only predicate

2015-10-18 Thread Freddy via Digitalmars-d-learn
On Sunday, 18 October 2015 at 17:58:30 UTC, Meta wrote: Is this a simplified use case of some actual code you have? Otherwise, you can just do: bool iden(string str) { auto f = str.front; return f.isAlpha || f == '_'; } It's simplified, i wanted to check for empty

Re: 0 in version number?

2015-10-18 Thread bitwise via Digitalmars-d
On Sunday, 18 October 2015 at 03:28:28 UTC, Shriramana Sharma wrote: bitwise wrote: Not sure what you're getting at either. By `ls -v1` I was illustrating that directory listing utilities are capable of sorting numbers meaningfully, so there is no need for leading zeroes for *that*

Re: Curl, how to recieve data.

2015-10-18 Thread sigod via Digitalmars-d-learn
On Sunday, 18 October 2015 at 18:04:53 UTC, holo wrote: I'm trying to receive data from curl request my sample code looks like that: ... auto client = HTTP(endpoint ~ "?" ~ canonicalQueryString); client.method = HTTP.Method.get;

It's a class! It's a struct! It's ... SuperStruct!

2015-10-18 Thread rcorre via Digitalmars-d-announce
SuperStruct is a struct that acts like a class: --- struct Square { float size; float area() { return size * size; } } struct Circle { float r; float area() { return r * r * PI; } } alias Shape = SuperStruct!(Square, Circle); // look! polymorphism! Shape sqr = Square(2); Shape cir =

Re: Curl, how to recieve data.

2015-10-18 Thread Suliman via Digitalmars-d-learn
On Sunday, 18 October 2015 at 18:04:53 UTC, holo wrote: I'm trying to receive data from curl request my sample code looks like that: ... auto client = HTTP(endpoint ~ "?" ~ canonicalQueryString); client.method = HTTP.Method.get;

Re: Mobile support

2015-10-18 Thread Andrei Alexandrescu via Digitalmars-d
On 10/18/15 7:55 AM, Joakim wrote: Now, the download page has not traditionally listed alphas and betas. But the importance of mobile is so high that I think it is worth it to do so, with the appropriate cautions about alpha quality. Yes, very much so. Please make that happen. Thanks! --

Re: [OT] LLVM Community Code of Conduct

2015-10-18 Thread Iain Buclaw via Digitalmars-d
On 17 Oct 2015 11:25 pm, "Vladimir Panteleev via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: > > On Saturday, 17 October 2015 at 16:55:06 UTC, Joakim wrote: >> >> On Saturday, 17 October 2015 at 16:38:29 UTC, Andrei Alexandrescu wrote: >>> >>> Fantastic! >>> >>> Could you please send a PR

[sdc] linker problems when building programs with sdc

2015-10-18 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
Hello all, I recently decided to have another play with sdc to see how it's doing. Since my dmd is installed in /opt/dmd/ I had to do a couple of tricks to get sdc itself to build: (i) put a dlang.conf in /etc/ld.so.conf.d/ containing the /opt/dmd/lib64 path; (ii) call 'make

Re: [OT] LLVM Community Code of Conduct

2015-10-18 Thread Iain Buclaw via Digitalmars-d
On 18 Oct 2015 9:45 am, "Vladimir Panteleev via Digitalmars-d" < digitalmars-d@puremagic.com> wrote: > > On Sunday, 18 October 2015 at 07:37:55 UTC, Iain Buclaw wrote: >> >> Essentially, the reason D has not been ported to X has nothing to do with lack of compiler support. A compiler can always

Re: The D Language Foundation is now incorporated

2015-10-18 Thread Jonathan M Davis via Digitalmars-d-announce
On Saturday, October 17, 2015 19:12:41 Andrei Alexandrescu via Digitalmars-d-announce wrote: > On 10/17/15 4:06 PM, suliman wrote: > > Can anybody outside USA join to the foundation? > > As a member, yes. We'll define private and corporate membership with > sponsorship levels etc. > > As an

Re: Mobile support

2015-10-18 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 18 October 2015 at 04:55:53 UTC, Joakim wrote: I made available a test runner for druntime/phobos as an Android apk months ago and never got any feedback: http://forum.dlang.org/post/erqxbcfyyxzviftmh...@forum.dlang.org Posts buried deep in old threads are not very visible. I

[Issue 14327] Unhandled exception from writeln() in C++/D application

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14327 Rainer Schuetze changed: What|Removed |Added CC||r.sagita...@gmx.de

Re: [OT] LLVM Community Code of Conduct

2015-10-18 Thread Vladimir Panteleev via Digitalmars-d
On Sunday, 18 October 2015 at 07:37:55 UTC, Iain Buclaw wrote: Essentially, the reason D has not been ported to X has nothing to do with lack of compiler support. A compiler can always be built to target X, and if that wasn't enough, there are many ready built packages available that target

[Issue 14327] Unhandled exception from writeln() in C++/D application

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14327 Rainer Schuetze changed: What|Removed |Added Keywords||pull --- Comment #13

[Issue 13561] enumProcessThreads should be nothrow

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=13561 Issue 13561 depends on issue 11216, which changed state. Issue 11216 Summary: Make synchronized statement `nothrow` https://issues.dlang.org/show_bug.cgi?id=11216 What|Removed |Added

[Issue 11216] Make synchronized statement `nothrow`

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=11216 Mathias LANG changed: What|Removed |Added Status|RESOLVED|REOPENED

[Issue 3913] Bad error message with wrong enum

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=3913 --- Comment #5 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/4817e508904471d349e71637385f8894cb4bb4f6 Fix Issue 3913 - Emit better

Re: 0 in version number?

2015-10-18 Thread anonymous via Digitalmars-d
On Sunday, October 18, 2015 05:09 AM, Shriramana Sharma wrote: > By `ls -v1` I was illustrating that directory listing utilities are > capable of sorting numbers meaningfully, so there is no need for leading > zeroes for *that* purpose... You only showed that ls can do it, and you need a special

Re: OT: why do people use python when it is slow?

2015-10-18 Thread Namespace via Digitalmars-d-learn
On Tuesday, 13 October 2015 at 23:26:14 UTC, Laeeth Isharc wrote: https://www.quora.com/Why-is-Python-so-popular-despite-being-so-slow Andrei suggested posting more widely. Maybe also interesting:

Re: [OT] LLVM Community Code of Conduct

2015-10-18 Thread Johannes Pfau via Digitalmars-d
Am Sun, 18 Oct 2015 09:55:52 +0200 schrieb Iain Buclaw via Digitalmars-d : > On 18 Oct 2015 9:45 am, "Vladimir Panteleev via Digitalmars-d" < > digitalmars-d@puremagic.com> wrote: > > > > On Sunday, 18 October 2015 at 07:37:55 UTC, Iain Buclaw wrote: > >> > >>

Re: The D Language Foundation is now incorporated

2015-10-18 Thread Gary Willoughby via Digitalmars-d-announce
On Friday, 16 October 2015 at 10:04:36 UTC, Andrei Alexandrescu wrote: We are pleased to announce that the D Language Foundation is now incorporated with the state of Washington, USA. The foundation's Board of Directors are Walter Bright, Ali Çehreli, and myself. Our initial administrative

Re: OT: why do people use python when it is slow?

2015-10-18 Thread data pulverizer via Digitalmars-d-learn
On Thursday, 15 October 2015 at 21:16:18 UTC, Laeeth Isharc wrote: On Wednesday, 14 October 2015 at 22:11:56 UTC, data pulverizer wrote: On Tuesday, 13 October 2015 at 23:26:14 UTC, Laeeth Isharc wrote: https://www.quora.com/Why-is-Python-so-popular-despite-being-so-slow Andrei suggested

Re: 0 in version number?

2015-10-18 Thread Gary Willoughby via Digitalmars-d
On Friday, 16 October 2015 at 23:23:15 UTC, H. S. Teoh wrote: Not to mention, if you want to talk about the truly Big Boys, even Windows doesn't follow any of the proposed versioning schemes (I mean, what's up with 3.0 -> 3.1 -> 95 -> 98 -> 2000 -> XP -> 7 -> 8 -> 9... ? That doesn't even

[Issue 15220] [REG2.065] std.getopt parses -o=value as "=value"

2015-10-18 Thread via Digitalmars-d-bugs
- [REG2.065] std.getopt parses -o=value as "=value" https://github.com/D-Programming-Language/phobos/commit/3612fdab0eb50a9bb899e803f1c7aaa17d757e70 Merge pull request #3727 from CyberShadow/pull-20151018-004338 fix Issue 15220 - [REG2.065] std.getopt parses -o=value as "=value" --

[Issue 15220] [REG2.065] std.getopt parses -o=value as "=value"

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

Re: OT: why do people use python when it is slow?

2015-10-18 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Sunday, 18 October 2015 at 12:50:43 UTC, Namespace wrote: On Tuesday, 13 October 2015 at 23:26:14 UTC, Laeeth Isharc wrote: https://www.quora.com/Why-is-Python-so-popular-despite-being-so-slow Andrei suggested posting more widely. Maybe also interesting:

Re: OT: why do people use python when it is slow?

2015-10-18 Thread Namespace via Digitalmars-d-learn
On Sunday, 18 October 2015 at 13:29:50 UTC, Ola Fosheim Grøstad wrote: On Sunday, 18 October 2015 at 12:50:43 UTC, Namespace wrote: On Tuesday, 13 October 2015 at 23:26:14 UTC, Laeeth Isharc wrote: https://www.quora.com/Why-is-Python-so-popular-despite-being-so-slow Andrei suggested posting

Re: The D Language Foundation is now incorporated

2015-10-18 Thread Suliman via Digitalmars-d-announce
I think a new website will be much better suited for this task. I do not think that we should diffuse efforts and yet another site is bad idea. And now dsource is not live, so it's better revive it then create fork. I currently host dsource.org as a read-only archive ok, when we are done I

Re: How is std.regex.replaceAllInto more efficient?

2015-10-18 Thread Shriramana Sharma via Digitalmars-d
Dmitry Olshansky wrote: > Listing code that is not routinely tested on each build means someday it > may become broken. Anyway just issue a pull request, we can figure out > the details in github discussion. Hmmm... AFAICS the *Into function is most useful when you don't know how many items of

[Issue 12658] Emit informative diagnostic when file with a platform-incompatible extension is found

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12658 Andrej Mitrovic changed: What|Removed |Added Status|NEW |RESOLVED

Re: Why does File.byLine() return char[] and not string

2015-10-18 Thread Suliman via Digitalmars-d-learn
On Friday, 16 October 2015 at 12:43:59 UTC, Meta wrote: On Friday, 16 October 2015 at 10:38:52 UTC, Shriramana Sharma wrote: Is there a particular reason that File.byLine() returns char[] and not string i.e. immutable(char)[]? Is it just to avoid being overly restrictive? It seems that having

Re: Phobos still being statically linked in?

2015-10-18 Thread Marco Leise via Digitalmars-d
For the Gentoo Linux DMD package I made dynamic linking the default. It's not just Phobos but other libraries as well, like GtkD and what else you link into your executable. A simple GUI converting text in the clipboard on button press is at around 553 KiB now. With static linking it is 6 MiB.

Re: Why does File.byLine() return char[] and not string

2015-10-18 Thread novice2 via Digitalmars-d-learn
what buffer you are talking. internal buffer. where result line resides. And what is "signal"? How it's working? just the fact for programmer, that result line can be changed by other code (by phobos library code in this case). no any special programming "signal".

Re: [sdc] linker problems when building programs with sdc

2015-10-18 Thread Marco Leise via Digitalmars-d-learn
Am Sun, 18 Oct 2015 11:35:16 +0200 schrieb Joseph Rushton Wakeling via Digitalmars-d-learn : > Hello all, > > I recently decided to have another play with sdc to see how it's doing. > Since > my dmd is installed in /opt/dmd/ I had to do a couple of tricks to

Re: [OT] LLVM Community Code of Conduct

2015-10-18 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-18 09:55, Iain Buclaw via Digitalmars-d wrote: In it's runtime? Correct - assuming no one invents any new predefined version conditions in the process. :-) I'm pretty sure Dan has added/is planning to add new version identifiers for iOS. It might be that the OSX version identifier

Re: Phobos still being statically linked in?

2015-10-18 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-17 13:28, Marc Schütz wrote: Yes, it's still linked statically by default, at least with DMD. I don't know why this wasn't changed yet 1. It makes it easier to distribute binaries since most computers won't have a Phobos and druntime installed 2. There's no guaranteed ABI

Re: Why does File.byLine() return char[] and not string

2015-10-18 Thread Daniel Kozak via Digitalmars-d-learn
V Sun, 18 Oct 2015 15:51:13 + Suliman via Digitalmars-d-learn napsáno: > On Sunday, 18 October 2015 at 15:40:09 UTC, novice2 wrote: > >> what buffer you are talking. > > > > internal buffer. where result line resides. > > > > > >> And what is "signal"?

[Issue 12385] Enum member should not be modifiable when the member is immutable

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=12385 Andrej Mitrovic changed: What|Removed |Added URL|https://github.com/D-Progra

Re: Why does File.byLine() return char[] and not string

2015-10-18 Thread Suliman via Digitalmars-d-learn
On Sunday, 18 October 2015 at 15:40:09 UTC, novice2 wrote: what buffer you are talking. internal buffer. where result line resides. And what is "signal"? How it's working? just the fact for programmer, that result line can be changed by other code (by phobos library code in this case).

Re: Synchronized classes have no public members

2015-10-18 Thread Jacob Carlborg via Digitalmars-d
On 2015-10-16 23:54, Jonathan M Davis wrote: Well, you probably will at some point, even if you don't know. According to TDPL, there's not supposed to be any such thing as a class with some functions which are synchronized and some not. The entire class is synchronized or none of it is, and if

Re: OT: why do people use python when it is slow?

2015-10-18 Thread Ola Fosheim Grøstad via Digitalmars-d-learn
On Sunday, 18 October 2015 at 13:57:40 UTC, Namespace wrote: I liked the fact that Python with PyPy is more performant than Go (in contrast to the title "Python is slow") and that Go-Routines leak. Yes, Python apparently used less memory, which is rather important when you write a service

Re: How is std.regex.replaceAllInto more efficient?

2015-10-18 Thread Dmitry Olshansky via Digitalmars-d
On 18-Oct-2015 17:26, Shriramana Sharma wrote: Dmitry Olshansky wrote: Listing code that is not routinely tested on each build means someday it may become broken. Anyway just issue a pull request, we can figure out the details in github discussion. Hmmm... AFAICS the *Into function is most

[Issue 15198] evenChunks - std.range.chunks variant which slices range into N evenly-sized chunks

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

[Issue 14778] ddoc doesnt generate code for enum in template struct

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

[Issue 14778] ddoc doesnt generate code for enum in template struct

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=14778 --- 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/d24a3f8fa0864849d324b210796b92d22c938eae fix Issue 14778 - ddoc

Re: Why does File.byLine() return char[] and not string

2015-10-18 Thread Meta via Digitalmars-d-learn
On Sunday, 18 October 2015 at 15:03:22 UTC, Suliman wrote: Sorry, but could you explain more simply? I reread all information, bit can't understand about what buffer you are talking. This is more or less how byLine works, simplified: struct ByLine { File file; char[] line; char[]

Re: D 2015/2016 Vision?

2015-10-18 Thread bitwise via Digitalmars-d
On Sunday, 18 October 2015 at 04:03:49 UTC, Andrei Alexandrescu wrote: On 10/18/15 1:57 AM, bitwise wrote: On Friday, 9 October 2015 at 05:21:13 UTC, Andrei Alexandrescu wrote: On 10/9/15 4:47 AM, bitwise wrote: On Thursday, 8 October 2015 at 17:21:52 UTC, Andrei Alexandrescu wrote: On

Re: How is std.regex.replaceAllInto more efficient?

2015-10-18 Thread Shriramana Sharma via Digitalmars-d
Dmitry Olshansky wrote: > I guess the idiomatic way is: > > foreach (pos; iota(0, sink.data.length, 4).retro) Mmm no that throws an assertion failure, since the guarantee of the regex is only to insert commas before every third digit *from the end*, but doing retro on an *ascending* iota

[Issue 15198] evenChunks - std.range.chunks variant which slices range into N evenly-sized chunks

2015-10-18 Thread via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=15198 --- Comment #2 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/D-Programming-Language/phobos https://github.com/D-Programming-Language/phobos/commit/04349a9cf415a4a420e4d8ffade0934949b2bc18 fix Issue 15198 -

std.algorithm.startsWith only predicate

2015-10-18 Thread Freddy via Digitalmars-d-learn
How do you call startsWith with only a predicate --- import std.algorithm; import std.ascii; bool iden(string str) { return str.startsWith!(a => a.isAlpha || a == '_'); } ---

Re: std.algorithm.startsWith only predicate

2015-10-18 Thread Meta via Digitalmars-d-learn
On Sunday, 18 October 2015 at 17:48:20 UTC, Freddy wrote: How do you call startsWith with only a predicate --- import std.algorithm; import std.ascii; bool iden(string str) { return str.startsWith!(a => a.isAlpha || a == '_'); } --- Is this a simplified use case of some actual code you

Curl, how to recieve data.

2015-10-18 Thread holo via Digitalmars-d-learn
I'm trying to receive data from curl request my sample code looks like that: ... auto client = HTTP(endpoint ~ "?" ~ canonicalQueryString); client.method = HTTP.Method.get; client.addRequestHeader("x-amz-date", xamztime);

Re: [OT] LLVM Community Code of Conduct

2015-10-18 Thread Joakim via Digitalmars-d
On Sunday, 18 October 2015 at 16:00:11 UTC, Jacob Carlborg wrote: On 2015-10-18 09:55, Iain Buclaw via Digitalmars-d wrote: In it's runtime? Correct - assuming no one invents any new predefined version conditions in the process. :-) I'm pretty sure Dan has added/is planning to add new

Re: [sdc] linker problems when building programs with sdc

2015-10-18 Thread Joseph Rushton Wakeling via Digitalmars-d-learn
On 18/10/15 19:43, Marco Leise via Digitalmars-d-learn wrote: Maybe you should have started with `return 42;`? :D writeln is not a light-weight in terms of exercised compiler features. I didn't even know that it compiles yet. Last time I heard it was not usable. Hahahahahahahaha :-D Turns out