Re: Boston D Language Meetup in Back Bay

2016-11-17 Thread Steven Schveighoffer via Digitalmars-d-announce

On 11/17/16 12:42 PM, John Colvin wrote:

On Thursday, 17 November 2016 at 16:28:08 UTC, Steven Schveighoffer wrote:

On 11/17/16 10:38 AM, John Colvin wrote:

On Thursday, 17 November 2016 at 13:59:25 UTC, Steven Schveighoffer
wrote:

[...]


Can't you use a template lambda alias argument to pushTo instead, so
then you can instantiate it inside pushTo?

something like
nullStream!char
.bufferedInput
.pushTo!(_ => _
.arrayCastPipe!ubyte
.outputFile("output.txt")
);
maybe?


I could do that. But I don't like it ;)


I don't think it's so bad, but fair enough


I can say the part I don't like is the _ => _ thing. Ugly. Other than 
that, it's actually quite nice syntax-wise.



I'm also concerned that using a lambda is going to confuse or prevent
optimization.


Why would you think that? If we can't trust the optimiser (dmd aside) to
inline a template lambda argument then phobos is totally screwed!


I admit this isn't a rational fear ;) I just have had experience with 
lambdas where this does happen. The fear part of my brain is warning me, 
but the memory part can't remember the specifics of when this happened...


What happens when you use a local variable in your lambda expression?

-Steve


Re: Boston D Language Meetup in Back Bay

2016-11-17 Thread John Colvin via Digitalmars-d-announce
On Thursday, 17 November 2016 at 16:28:08 UTC, Steven 
Schveighoffer wrote:

On 11/17/16 10:38 AM, John Colvin wrote:
On Thursday, 17 November 2016 at 13:59:25 UTC, Steven 
Schveighoffer wrote:

[...]


Can't you use a template lambda alias argument to pushTo 
instead, so

then you can instantiate it inside pushTo?

something like
nullStream!char
.bufferedInput
.pushTo!(_ => _
.arrayCastPipe!ubyte
.outputFile("output.txt")
);
maybe?


I could do that. But I don't like it ;)


I don't think it's so bad, but fair enough

I will note that Adrian Matoga's flod library has a different 
solution that I think is similar to this, but I don't 
understand it very well.


I'm also concerned that using a lambda is going to confuse or 
prevent optimization.


Why would you think that? If we can't trust the optimiser (dmd 
aside) to inline a template lambda argument then phobos is 
totally screwed!


I think with some better naming, the push feature will look 
better.


-Steve


I look forward to it.


Re: Boston D Language Meetup in Back Bay

2016-11-17 Thread Steven Schveighoffer via Digitalmars-d-announce

On 11/17/16 10:38 AM, John Colvin wrote:

On Thursday, 17 November 2016 at 13:59:25 UTC, Steven Schveighoffer wrote:

nullStream!char
   .bufferedInput
   .pushTo(
  arrayCastPipe!ubyte
  .outputFile("output.txt")
   );

But then the parameters to the "pushTo" hypothetical function don't
know what the source type is before calling. By inserting valves, I
get the equivalent thing, but the types all are passed down the chain
properly.


Can't you use a template lambda alias argument to pushTo instead, so
then you can instantiate it inside pushTo?

something like
nullStream!char
.bufferedInput
.pushTo!(_ => _
.arrayCastPipe!ubyte
.outputFile("output.txt")
);
maybe?


I could do that. But I don't like it ;)

I will note that Adrian Matoga's flod library has a different solution 
that I think is similar to this, but I don't understand it very well.


I'm also concerned that using a lambda is going to confuse or prevent 
optimization.


I think with some better naming, the push feature will look better.

-Steve


Re: Boston D Language Meetup in Back Bay

2016-11-17 Thread John Colvin via Digitalmars-d-announce
On Thursday, 17 November 2016 at 13:59:25 UTC, Steven 
Schveighoffer wrote:

nullStream!char
   .bufferedInput
   .pushTo(
  arrayCastPipe!ubyte
  .outputFile("output.txt")
   );

But then the parameters to the "pushTo" hypothetical function 
don't know what the source type is before calling. By inserting 
valves, I get the equivalent thing, but the types all are 
passed down the chain properly.


Can't you use a template lambda alias argument to pushTo instead, 
so then you can instantiate it inside pushTo?


something like
nullStream!char
.bufferedInput
.pushTo!(_ => _
.arrayCastPipe!ubyte
.outputFile("output.txt")
);
maybe?


Re: Boston D Language Meetup in Back Bay

2016-11-17 Thread Steven Schveighoffer via Digitalmars-d-announce

On 11/17/16 7:32 AM, qznc wrote:

On Thursday, 17 November 2016 at 02:55:46 UTC, Meta wrote:

Thanks for recording the presentation, your IOPipe library is pretty
interesting.


+1

Especially for any parser, this looks like a great solution!


Thanks! I agree, I hope to prove that with some example implementations.


The output (valves) looks meh, though. I hope, you discover something
more elegant.


Explaining valves is more complex then actually using them. The neat 
thing about them is that I do not have to implement a push mechanism or 
rewrite any existing transform iopipes. And in general, valves don't 
have to really be involved with pushing. They are simply control points 
along the pipeline (but doing output by simulating push via a pull was 
the impetus for valves).


I will note that an obvious different solution (and one that I 
considered) is to encapsulate the entire output pipe into one call, 
something like:


nullStream!char
   .bufferedInput
   .pushTo(
  arrayCastPipe!ubyte
  .outputFile("output.txt")
   );

But then the parameters to the "pushTo" hypothetical function don't know 
what the source type is before calling. By inserting valves, I get the 
equivalent thing, but the types all are passed down the chain properly.


I'm thinking I will rename the holdingValve and holdingLoop functions, 
so that it's more clear that this results in a push mechanism. I'm still 
playing with the naming.


Eventually, the valve concept I think will be more justified when I have 
more building blocks available that can be used any way you wish.


-Steve


Re: Boston D Language Meetup in Back Bay

2016-11-17 Thread qznc via Digitalmars-d-announce

On Thursday, 17 November 2016 at 02:55:46 UTC, Meta wrote:
Thanks for recording the presentation, your IOPipe library is 
pretty interesting.


+1

Especially for any parser, this looks like a great solution!

The output (valves) looks meh, though. I hope, you discover 
something more elegant.


Re: Boston D Language Meetup in Back Bay

2016-11-16 Thread Meta via Digitalmars-d-announce
On Thursday, 17 November 2016 at 01:20:58 UTC, Steven 
Schveighoffer wrote:

I had one job...

Forgot to post the link BEFORE the live stream. In any case, it 
was recorded and is here: 
https://www.youtube.com/watch?v=dVuPgbRIljA


Sorry, please accept my shameful apology.

-Steve


I was wondering about that. Thanks for recording the 
presentation, your IOPipe library is pretty interesting.


Re: Boston D Language Meetup in Back Bay

2016-11-16 Thread Steven Schveighoffer via Digitalmars-d-announce

On 11/16/16 6:34 PM, Steven Schveighoffer wrote:

On 11/13/16 6:51 PM, Steven Schveighoffer wrote:

On 11/4/16 12:02 PM, Steven Schveighoffer wrote:

Just announced:
https://www.meetup.com/Boston-area-D-Programming-Language-Meetup/events/235353279/




We are going to try a freely available conference room to have a
presentation. No details on the presentation yet (I will figure that out
soon), and probably no streaming this time.


I got streaming to work. Will post a link later, in case anyone is
interested.


I had one job...

Forgot to post the link BEFORE the live stream. In any case, it was 
recorded and is here: https://www.youtube.com/watch?v=dVuPgbRIljA


Sorry, please accept my shameful apology.

-Steve


Re: Boston D Language Meetup in Back Bay

2016-11-16 Thread Andrei Alexandrescu via Digitalmars-d-announce

On 11/16/16 6:34 PM, Steven Schveighoffer wrote:

On 11/13/16 6:51 PM, Steven Schveighoffer wrote:

On 11/4/16 12:02 PM, Steven Schveighoffer wrote:

Just announced:
https://www.meetup.com/Boston-area-D-Programming-Language-Meetup/events/235353279/




We are going to try a freely available conference room to have a
presentation. No details on the presentation yet (I will figure that out
soon), and probably no streaming this time.


I got streaming to work. Will post a link later, in case anyone is
interested.


We should be online in some 23 minutes - the quality during the tests is 
great! -- Andrei


Re: Boston D Language Meetup in Back Bay

2016-11-16 Thread Steven Schveighoffer via Digitalmars-d-announce

On 11/13/16 6:51 PM, Steven Schveighoffer wrote:

On 11/4/16 12:02 PM, Steven Schveighoffer wrote:

Just announced:
https://www.meetup.com/Boston-area-D-Programming-Language-Meetup/events/235353279/



We are going to try a freely available conference room to have a
presentation. No details on the presentation yet (I will figure that out
soon), and probably no streaming this time.


I got streaming to work. Will post a link later, in case anyone is 
interested.


-Steve



Re: Boston D Language Meetup in Back Bay

2016-11-13 Thread Steven Schveighoffer via Digitalmars-d-announce

On 11/4/16 12:02 PM, Steven Schveighoffer wrote:

Just announced:
https://www.meetup.com/Boston-area-D-Programming-Language-Meetup/events/235353279/


We are going to try a freely available conference room to have a
presentation. No details on the presentation yet (I will figure that out
soon), and probably no streaming this time.


UPDATE: This Wednesday (the 16th), we will have a meetup at the Capital 
One Cafe conference room in the Back Bay. I'll present a short overview 
of my iopipe library. Hope you can join us!


If everyone's up to it, we can go out after for drinks and/or food.

-Steve


Re: Boston D Language Meetup in Back Bay

2016-11-07 Thread Steven Schveighoffer via Digitalmars-d-announce

On 11/4/16 12:02 PM, Steven Schveighoffer wrote:

Just announced:
https://www.meetup.com/Boston-area-D-Programming-Language-Meetup/events/235353279/


We are going to try a freely available conference room to have a
presentation. No details on the presentation yet (I will figure that out
soon), and probably no streaming this time.


Due to a scheduling conflict, I had to move this to Wednesday the 16th.

-Steve



Boston D Language Meetup in Back Bay

2016-11-04 Thread Steven Schveighoffer via Digitalmars-d-announce
Just announced: 
https://www.meetup.com/Boston-area-D-Programming-Language-Meetup/events/235353279/


We are going to try a freely available conference room to have a 
presentation. No details on the presentation yet (I will figure that out 
soon), and probably no streaming this time.


-Steve