Re: wc in D: 712 Characters Without a Single Branch

2020-01-28 Thread Petar via Digitalmars-d-announce
On Tuesday, 28 January 2020 at 21:40:40 UTC, Petar Kirov [ZombineDev] wrote: BTW, while playing with a solution of my own [0] I noticed that both mine and Robert's version return different [... snip] I found the culprit - iswspace. For more info see:

Re: wc in D: 712 Characters Without a Single Branch

2020-01-28 Thread Steven Schveighoffer via Digitalmars-d-announce
On 1/28/20 5:11 PM, sarn wrote: Admit it, "my version is very likely IO bound" is hand-wavey. The top comment on HN right now is pointing out that it doesn't make sense. I don't think it's i/o bound. Doing the split/walk-length and then walk-length again is likely making it 2x slower.

Re: wc in D: 712 Characters Without a Single Branch

2020-01-28 Thread sarn via Digitalmars-d-announce
On Tuesday, 28 January 2020 at 14:01:35 UTC, Mike Parker wrote: Robert Schadek was inspired by a post he saw on Hacker News a while back showing an implementation of wc in Haskell totaling 80 lines. I enjoyed the article overall, but I think this part lets it down a bit: Is the Haskell wc

Re: wc in D: 712 Characters Without a Single Branch

2020-01-28 Thread Petar via Digitalmars-d-announce
On Tuesday, 28 January 2020 at 14:01:35 UTC, Mike Parker wrote: [snip] BTW, while playing with a solution of my own [0] I noticed that both mine and Robert's version return different results for the following input [1]: expected:

Re: wc in D: 712 Characters Without a Single Branch

2020-01-28 Thread Petar via Digitalmars-d-announce
On Tuesday, 28 January 2020 at 21:40:40 UTC, Petar Kirov [ZombineDev] wrote: [snip] import std.algorithm : count, splitter; import std.stdio : File, writefln; import std.typecons : Yes; void main(string[] args) { size_t lines, words, bytes; foreach (line;

Re: Bison 3.5 is released, and features a D backend

2020-01-28 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Jan 28, 2020 at 07:03:51PM +, Akim Demaille via Digitalmars-d-announce wrote: > On Wednesday, 1 January 2020 at 09:47:11 UTC, Akim Demaille wrote: > > Hi all! > > [...] > > If you would like to contribute, please reach out to us via > > bison-patc...@gnu.org, or help-bi...@gnu.org. >

Re: wc in D: 712 Characters Without a Single Branch

2020-01-28 Thread Paul Backus via Digitalmars-d-announce
On Tuesday, 28 January 2020 at 14:01:35 UTC, Mike Parker wrote: Robert Schadek was inspired by a post he saw on Hacker News a while back showing an implementation of wc in Haskell totaling 80 lines. He decided he could do better in D. So he did. This post on the D blog shows what he came up

Re: D GUI Framework (responsive grid teaser)

2020-01-28 Thread Robert M. Münch via Digitalmars-d-announce
On 2019-05-19 21:01:33 +, Robert M. Münch said: Hi, we are currently build up our new technology stack and for this create a 2D GUI framework. Hi, some more teaser showing a text-input field, with clipping, scrolling, etc.:

Re: wc in D: 712 Characters Without a Single Branch

2020-01-28 Thread OlaOst via Digitalmars-d-announce
On Tuesday, 28 January 2020 at 14:01:35 UTC, Mike Parker wrote: Robert Schadek was inspired by a post he saw on Hacker News a while back showing an implementation of wc in Haskell totaling 80 lines. He decided he could do better in D. So he did. This post on the D blog shows what he came up

Re: DConf 2020 Early-Bird Registration & Submission Deadlines

2020-01-28 Thread Murilo via Digitalmars-d-announce
On Tuesday, 28 January 2020 at 07:13:01 UTC, Walter Bright wrote: On 1/27/2020 8:16 AM, Murilo wrote: Wait, will you notify the submission authors before or after the deadline? If my submission is accepted, will I need to pay for the registration? If your talk is accepted and you've already

D-Ecke: A German D-website

2020-01-28 Thread berni44 via Digitalmars-d-announce
I setup my own D-website: http://d-ecke.de (in German language) I hope, you enjoy reading it.

Re: wc in D: 712 Characters Without a Single Branch

2020-01-28 Thread Steven Schveighoffer via Digitalmars-d-announce
On 1/28/20 9:01 AM, Mike Parker wrote: Robert Schadek was inspired by a post he saw on Hacker News a while back showing an implementation of wc in Haskell totaling 80 lines. He decided he could do better in D. So he did. This post on the D blog shows what he came up with and also provides a

wc in D: 712 Characters Without a Single Branch

2020-01-28 Thread Mike Parker via Digitalmars-d-announce
Robert Schadek was inspired by a post he saw on Hacker News a while back showing an implementation of wc in Haskell totaling 80 lines. He decided he could do better in D. So he did. This post on the D blog shows what he came up with and also provides a brief introduction to ranges. The