Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-04-27

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:06 geekosaur joined #perl6
00:08 mtj_ joined #perl6
00:11 colomon avuserow: you want to scrobble from p6?
00:19 xenoterracide joined #perl6
00:21 avuserow colomon: also want to read my old scrobbles
00:21 * colomon didn't know that was possible
00:22 avuserow I have a Perl 5 script currently that uses that data to determine what music I should put on my phone given a size limit
00:23 avuserow so that's at least one use of said information :)
00:23 avuserow I don't have any immediate use for that sort of thing, but I am interested in seeing if we have all the bits needed in good shape
00:25 colomon ha, I think my phone is my only music player which reliably scrobbles, so I don't know if that would be useful for me.  :)
00:25 avuserow yeah, one would have to be careful about feedback loops
00:26 avuserow where you keep making the same set of songs more and more popular
00:27 avuserow but yeah, there are some potentially interesting things you can do with TagLib and some historical music information about you (and others)
00:33 Pleiades` joined #perl6
00:41 vaskozl joined #perl6
00:47 colomon avuserow++ #  just used Audio::Taglib::SImple to set tags for an MP3 file downloaded from youtube.
00:52 Timbus i like to think of youtube ripping as the modern version of taping a song on the radio
00:53 colomon Timbus: I won't (generally) do it for commerical recordings.  This was one of a couple people sitting around playing fiddle, mistakes and all.  It's a tune I need to learn.
00:55 colomon https://www.youtube.com/watch?v=fJTr64e-Mu4
00:55 Timbus haha, no judgement here. i just liked the comparison
00:55 * colomon taped songs off the radio a good bit back in the day.  :)
00:57 Timbus I never did, but my younger sister taped hanson's "mmm bop" and our family has never fully recovered
01:04 xenoterracide joined #perl6
01:06 colomon actually, to be fully honest, I'm pretty actively involved with the direct modern equivalent of taping off the radio -- digitally grabbing online streams of radio shows.  We've been listening a lot lately to a couple of live shows broadcast from Newfoundland.
01:17 FROGGS_ joined #perl6
01:53 vaskozl joined #perl6
01:55 klapperl joined #perl6
01:58 Su-Shee_ joined #perl6
02:03 xenoterracide joined #perl6
02:11 Khisanth joined #perl6
02:33 xragnar_ joined #perl6
02:54 vaskozl joined #perl6
03:00 araujo joined #perl6
03:00 araujo joined #perl6
03:05 raydiak ugh. lifted so much weight today I almost can't type
03:06 raydiak (helping a friend move, that is)
03:07 TimToady yeah, that'll do in your typing muscles fershure
03:09 raydiak you're not kidding...I'm sorta proud of my almost unnatural grip strength, but guess I'm not as young as I used to be.  I was just happy to be able to grip the steering wheel all the way home
03:10 TimToady boxes of books are the worst
03:10 TimToady well, and pianos :)
03:11 raydiak what about limp foam matresses and projection TVs?
03:11 TimToady them too :)
03:11 TimToady they're all the worst
03:12 raydiak I turned 30 a few weeks ago...that's when you start to go downhill, right? :)
03:12 TimToady well, actually starts at about 25 for most of us
03:13 TimToady by the time you get to my age, nothing works quite like it's supposed to
03:13 raydiak eek I'm already over the hill by 5 years
03:13 TimToady hopefully it's a gentle slope for you :)
03:14 raydiak did start taking an interest in diet and exercise a few years ago, hoping starting early will yeild maximum long-term benefits
03:14 raydiak *yield
03:16 raydiak but mainly I just hope the TV I semi-dropped towards the end is okay
03:17 TimToady they needed a new TV
03:17 raydiak heh so true
03:24 raydiak not sure if this is in the cards for my time allocation or not, but are you (or anyone else reading) aware of any beginner-level LHF I might use to get into hacking rakudo?
03:33 BenGoldberg Writing documentation...
03:37 raydiak thanks, I'll consider it.  should get back to helping with the docs one way or another anyway, I guess
03:42 Mouq joined #perl6
03:52 sftp joined #perl6
03:55 eternaleye joined #perl6
04:00 vaskozl joined #perl6
04:06 xenoterracide joined #perl6
04:28 bjz joined #perl6
04:49 adu joined #perl6
05:07 vaskozl joined #perl6
05:15 Alula_ joined #perl6
05:17 rurban joined #perl6
05:26 ponbiki joined #perl6
05:30 Mouq joined #perl6
05:33 lue #perl6, oh and blag toast! :)    https://rdstar.wordpress.com/20​14/04/27/buffers-arent-strings/
05:40 Mouq joined #perl6
05:51 Mouq lue++ # blag, "Bowties are cool." :)
05:53 avuserow lue and others: for reference, I'm mostly using Bufs when interfacing with native libs that expect a char*. Sure, Str coerces to that, but often times you want to e.g. run sha1 on an ISO, which won't be valid UTF8
05:54 avuserow (Str coerces to that in NativeCall where "that" is a char*)
05:55 avuserow (hopefully that makes sense and I'm not just using NativeCall wrong/ineffectively)
05:55 avuserow anyway, lue++ # blag :)
06:11 SamuraiJack joined #perl6
06:12 vaskozl joined #perl6
06:19 * Mouq is finding Python's pack format much saner than Perl's: https://docs.python.org/2/library/struct.html
06:21 Mouq (They're pretty similar, but the naming is better. Python's pack isn't nearly as powerful as Perl 5's, though, AFAICT)
06:24 Mouq I'm kind of confused, actually… does Python's format only work on the level of bytes? :|
06:32 Mouq Oh, Perl 5 doesn't work on bit-level either, and the Python version is mostly just an abridged version of the Perl
06:32 * Mouq feels dumb
06:36 Mouq It seems that there's two ways of looking at pack and how it should be in P6:
06:37 Mouq The way everyone else thinks of it, as a way to decode a C struct
06:38 Mouq and the way I think of it, as a way to decode aribitary binary data
06:38 Mouq s/aribitary/arbitrary/
06:39 Mouq and s/pack/unpack/, really
06:48 xinming__ joined #perl6
06:53 masak morning, #perl6
06:53 masak Mouq: it would be really neat to tie pack/unpack to objects, somehow.
06:55 darutoko joined #perl6
07:00 rurban joined #perl6
07:22 dalek specs: da4e9a6 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
07:22 dalek specs: Supply.unchanged -> Supply.stable
07:22 dalek specs: review: https://github.com/perl6/specs/commit/da4e9a62a7
07:22 lizmat good *, #perl6!
07:23 lizmat nothing like starting the day with a commit :-)
07:24 FROGGS_ good morning lizmat
07:24 rurban joined #perl6
07:27 lizmat FROGGS_ o/
07:29 Su-Shee good morning everyone.
07:29 FROGGS_ TimToady: https://rdstar.wordpress.com/20​14/04/27/buffers-arent-strings/
07:29 FROGGS_ Su-Shee: morning :o)
07:29 dalek rakudo/nom: 62dd251 | (Elizabeth Mattijsen)++ | src/core/Supply (2 files):
07:29 dalek rakudo/nom: Supply.unchanged -> Supply.stable (to match spec)
07:29 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/62dd2512e4
07:38 ivanshmakov joined #perl6
07:40 ivanshmakov joined #perl6
07:44 grep0r joined #perl6
07:44 dalek rakudo/nom: 2685e85 | (Elizabeth Mattijsen)++ | src/core/Supply (2 files):
07:44 dalek rakudo/nom: Implement Supply.delay
07:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/2685e851b9
07:47 masak m: say SupplyOperations.^methods
07:47 camelia rakudo-moar 46b38f: OUTPUT«for interval flat do grep uniq squish map rotor batch schedule_on start unchanged migrate merge zip␤»
07:53 woolfy left #perl6
07:55 woolfy joined #perl6
08:02 dalek rakudo/nom: f3446b9 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
08:02 dalek rakudo/nom: Implement .Supply coercer
08:02 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f3446b97bd
08:03 lizmat (1..10).Supply seems more natural to me than Supply.for(1..10)
08:07 dalek roast: a7550db | (Elizabeth Mattijsen)++ | S17-concurrency/supply.t:
08:07 dalek roast: Add tests for .Supply coercer
08:07 dalek roast: review: https://github.com/perl6/roast/commit/a7550db8a4
08:13 anaeem1 joined #perl6
08:23 Mouq joined #perl6
08:25 rurban joined #perl6
08:27 anaeem1_ joined #perl6
08:36 rindolf joined #perl6
09:09 FROGGS it seems like I partly understand how exception handlers are registered for loops in nqp-j
09:10 dmol joined #perl6
09:14 denis_boyun_ joined #perl6
09:22 kurahaupo joined #perl6
09:26 rurban joined #perl6
09:35 moritz Mouq++ # hacking htmlify in perl6/doc
09:38 SamuraiJack joined #perl6
09:42 kurahaupo_mobile joined #perl6
09:45 masak this email kind of highlights the core of difference in approach between Perl and Python language design: https://mail.python.org/pipermail/​python-3000/2007-July/008663.html
09:45 masak especially this sentence: "There is real value in having a small language."
09:48 vendethiel I think I disagree a bit here, though. JavaScript is a small language. Python is a limiting language.
09:54 masak that's an interesting distinction.
10:06 lizmat cycling&
10:11 PZt joined #perl6
10:16 DrEeevil "compact" is an important feature of things that humans interact with
10:17 DrEeevil C vs. C++ ... no one 'knows' C++, so people are eternally confused. C is compact enough that it fits in a human head
10:17 moritz "In most cases there are existing
10:17 moritz work-arounds that produce clean code"
10:18 FROGGS moritz: that is something that you will not hear in #perl6 (about Perl 6)
10:18 moritz so, workarounds are necessary
10:18 FROGGS basically I do not see how a work around can ever produce clean code
10:19 moritz perl has loop labels, and I don't see them abused very often
10:19 DrEeevil well, py3k is quite frustrating in general ... it's just incompatible enough to make porting a problem, while offering almost no benefits
10:19 DrEeevil still upstream insists that people use it ...
10:19 moritz I've abused them once to create non-local returns, and have discarded the commit before ever pushing it
10:27 rurban joined #perl6
10:29 masak moritz: I guess abuse becomes the rationale quite often if you're in the business of restricting the language to a sane core.
10:34 Su-Shee small language? smalltalk. python isn't small. smalltalk fits on a vocabulary sized index card. and it's really NOT limited.
10:36 masak small language? Lisp. has, like, 7 primitives.
10:36 masak small language? Forth. all you need is a stack and some words strung together.
10:36 masak hm, this looks interesting: http://blog.burntsushi.net/r​ust-regex-syntax-extensions -- Russ Cox, regexes, *and* hygientic macros.
10:36 Su-Shee masak: smalltalk has 6 ;)
10:37 masak ooh -- which ones?
10:38 moritz BF has 4!
10:40 vendethiel (for lisp, I thought it was 9 -- quote atom eq car cdr cons cond label lambda)
10:43 Su-Shee masak: true, false, nil, self, super, and thisContext
10:43 Su-Shee other side of the index card fits the syntax if I write tiny ;)
10:43 moritz both of those sound incomplete to me
10:43 moritz might be the only keywords
10:44 moritz but not the only primitives
10:44 moritz I guess both allow invocation, and that's a primitive operation?
10:44 moritz (invoking a lambda or method)
10:47 Su-Shee moritz: the language and syntax is minimalist to the extreme, the "concept" is as well, but of course there's nothing simple about the innards of a smalltalk considering it comes with the whole image concept + a ton of classes..
10:49 moritz Su-Shee: well, my point is that even if the syntax is minimalistic, it still lets you do things other than the primitives
10:49 Su-Shee but not having to bother with learning syntax because there isn't any to speak of really is kind of nice
10:49 moritz Su-Shee: so the primitives count is highly misleading
10:49 moritz also, if there are things you simply can't do without those primtiives (like IO), you have to count the libraries that implement them as primitive too, IMHO
10:51 Su-Shee moritz: no, you don't because it's basically about the question where you put the learning effort of a language and smalltalk, lisp (or scheme) defer it away from the base to elsewhere and that makes things very easy to learn and you can focus on good style and learning it right a lot better...
10:52 Su-Shee sicp illustrates that very nicely I'd say :)
10:52 Su-Shee forth I haven't tried yet.
10:53 Su-Shee but yes, of course you have to learn at some point "the standard library" (be it a bunch of functions or a ton of classes or a libc..)
11:20 Su-Shee if I only want rakudo on the jvm I can drop all --gen-* and just use --backend=jvm?
11:20 spider-mario joined #perl6
11:22 vendethiel if you were to create an HAML (i.e.) parser in Perl6, would you use EVAL ?
11:26 FROGGS Su-Shee: well, you still need --gen-nqp
11:27 rurban joined #perl6
11:31 masak vendethiel: no, I'd look for other ways.
11:32 vendethiel well, I can keep a CST around and just substitute the values
11:32 vendethiel that seems as inefficient, though
11:32 masak vendethiel: using EVAL in that situation would make me sleep badly at night, because I would never be sure I had eliminated all injection attacks.
11:32 vendethiel no, that's not an issue
11:34 vendethiel I'd EVAL `sub ($params) { "html code here {$params<something>}" }`
11:34 vendethiel so, you'd need to call the function I returned
11:37 SamuraiJack joined #perl6
11:38 masak and that saves you from injection attacks... how?
11:40 vendethiel masak: well, there's no risk the guy will be able to execute perl code
11:40 vendethiel which, I thought, was what you meant.
11:40 masak no, I was talking about my night's sleep.
11:41 vendethiel I can't help people injecting your dreams, though :)
11:41 masak there's no way I'm piping $params<anything> into a construct that evaluates arbitrary code.
11:41 vendethiel as I said -- it's not
11:42 vendethiel I evaluate to a sub. So what you get - what I EVAL'd - is a function.
11:42 anaeem1_ joined #perl6
11:44 masak you're saying there's pride in making the catastrophe a lambda expression? :)
11:45 masak anyway, you asked advice and that is mine. I would not use EVAL on string-concatenated user input.
11:47 vendethiel Neither would I. I said it 2 times -- that's not what I'm proposing here.
11:47 vendethiel I'm proposing to EVAL code generated from the template, which would be a function. You would pass the arguments to that function
11:48 vendethiel There'd be no user-input EVAL'd
11:48 FROGGS vendethiel: if $params<something> contains '}; shell `rm -rf /`; #', would you be upset?
11:49 vendethiel FROGGS: no. that'd show `'; shell `rm -rf /``
11:49 vendethiel so I'd pity the guy who tried it.
11:50 vendethiel m: my &s = EVAL "sub ($a) { say 'a'; }"; s();
11:50 camelia rakudo-moar f3446b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/9KLPnOF7sKâ�¤Variable '$a' is not declaredâ�¤at /tmp/9KLPnOF7sK:1â�¤------> [32mmy &s = EVAL "sub ($a[33mâ��[31m) { say 'a'; }"; s();[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
11:50 vendethiel m: my &s = EVAL 'sub ($a) { say "a"; }'; s();
11:50 camelia rakudo-moar f3446b: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in sub  at eval_0:1␤  in block  at /tmp/kOmgiRm4oR:1␤␤»
11:50 vendethiel m: my &s = EVAL 'sub ($a) { say "a"; }'; s("'; shell `rm -rf /`");
11:50 camelia rakudo-moar f3446b: OUTPUT«a␤»
11:50 vendethiel FROGGS: see ? I'd be okay with it.
11:51 vendethiel also masak ^
11:52 FROGGS ahh, $params<something> comes from the signature... I missed that
11:52 FROGGS brb
11:54 FROGGS joined #perl6
11:56 masak ah, the single-quoted string sent to EVAL doesn't interpolate. I missed *that*.
11:56 masak yeah, then it's safe, I think. sorry for being alarmist.
11:57 masak but I don't see why that isn't a useless use of EVAL, then.
11:57 masak why not just declare the sub right away?
11:57 masak you're evaling what amounts to a constant string; why not express it as code instead?
12:08 vendethiel masak: because I want to generate that string from a HAML template
12:08 vendethiel like: `my &tmpl = HAML::compile('h1= hey'); say tmpl(hey => 'Hello you!')`
12:11 masak oh, so the *template* can vary. I see.
12:12 vendethiel Yeah. So I think I can either generate a sub (to EVAL, like I just said) or a CST I traverse
12:16 masak right.
12:16 masak I would do the CST, out of reflex.
12:25 vendethiel that should be easy to generate with the grammars, I get
12:26 masak aye.
12:26 masak I wish there were a handy tutorial out there for that.
12:26 masak not aware of one.
12:28 rurban joined #perl6
12:29 masak train &
12:30 vendethiel masak: well, for one, I can just `grammar HAMLGrammar { token id { blah } }; ` then the action will `make IdNode`
12:37 anaeem1_ joined #perl6
12:39 timotimo i'd like QAST and the compilers to be exposed via a clean api
12:40 vendethiel that seems rather arbitrary, no ?
12:40 timotimo in that case, you could do this without an eval, by using symbolic AST operations insetad
12:40 vendethiel because it means you're tying it up to NQP
12:40 vendethiel unless QAST is specced somewhere, but I don't think so
12:40 timotimo it is not
12:45 timotimo lizmat: does the delay supply have to care about being done'd ore quit'd while the delay for moreing a new value is running?
12:53 vendethiel do we even have docs on how to create modules, test them locally and stuff?
12:54 xenoterracide joined #perl6
12:55 timotimo hm, not actually sure
12:57 vendethiel m: grammar A { token TOP { 'a' } }; A.parse('a'); say $/.ast;
12:57 camelia rakudo-moar f3446b: OUTPUT«(Any)␤»
12:58 timotimo i once made a video to show how to create simple modules, but i'm not sure i actually published it; it had problems :)
12:59 vendethiel mmh
13:01 timotimo i should probably try to re-do that
13:01 timotimo currently waiting for obs-studio to be cool enough on linux :P
13:02 vendethiel that doesn't help me yet though :p
13:03 timotimo aye :)
13:29 rurban joined #perl6
13:30 zakharyas joined #perl6
13:30 guru joined #perl6
13:36 masak timotimo: I'm not 100% convinced it's QAST that should be exposed -- but I haven't heard any contender ideas, either. I suspect this is something we'll need to iterate on with real implementations to learn what it is we want.
13:37 timotimo well, something to construct ASTs programmatically
13:37 timotimo ideally, macros would offer that in a nice package
13:37 timotimo they don't as of yet
13:37 masak quasi blocks are our current way to construct ASTs programatically. but they don't do enough, admittedly.
13:38 masak to be specific, they don't offer a "build your own control flow" kit.
13:39 timotimo and they don't make it easy to compose things
13:40 masak yes, we're missing some kind of combinator API.
13:43 haroldwu joined #perl6
13:45 masak now that I think about it, I'm not 100% sure such a combinator APi couldn't be built entirely out of quasis and ingenuity
13:46 FROGGS masak: would make sense to sketch some pseudo code for a minimalistic use case
13:46 masak aye.
13:47 timotimo like building html templates out of macros
13:48 masak :)
13:49 cognominal I am thinking about a slang for building ASTs.  I am working from real examples to be sure it pans out. There is still probably many insconsistences. It is a work in progress.  https://gist.github.com/cognominal/10880617
13:50 * masak looks
13:50 cognominal feeback welcome.
13:50 haroldwu joined #perl6
13:51 haroldwu joined #perl6
13:52 masak "Indentation can be used in place of parenthetic syntax." -- um, please do one or the other.
13:52 masak I skimmed the gist. this feels like something that needn't be built into the NQP compiler, but could be prototyped as a module.
13:55 cognominal I am trying to accumulate more examples to see what is needed.
13:55 masak sounds good.
13:57 cognominal masak, I am not sure I understand the QAST classes for macro and if I can use them.
13:59 masak been a while since I dug into that code, but... there's only one new QAST class, QAST::Quasi.
13:59 masak it's not very exceptional compared to the others.
14:00 araujo joined #perl6
14:00 araujo joined #perl6
14:05 skids joined #perl6
14:08 cognominal masak, are you making progress about macros, btw?
14:10 masak not currently.
14:10 masak swamped by $dayjob, and I've decided to close up p6cc2012 before I get back to macros.
14:10 isBEKaml joined #perl6
14:11 masak I do have enlightening discussions here about macros sometimes, though.
14:12 isBEKaml masak: p6cc2012? dude, you *yllear* have to catch up! :)
14:12 cognominal p6cc2012?
14:12 timotimo perl 6 coding contest
14:13 masak isBEKaml: yeah :/
14:19 masak I have two Perl 6 days coming up this coming week. intend to make good use of the.
14:19 masak them*
14:20 isBEKaml masak: what do you usually do on perl6 days? talks? hack days?
14:20 pdcawley joined #perl6
14:20 masak tend to prefer hacking, but it varies a lot.
14:21 isBEKaml masak: now that you are 2 years past, you must now be struggling with some of that code "this *used* to work, what happened now?" :)
14:25 masak not a big problem, no.
14:25 masak Rakudo has been stable enough since 2012.
14:26 timotimo i think so, too
14:26 timotimo the things that have been used back then should all still be stable until now
14:26 timotimo mostly "new" things have been turbulent
14:27 kaare_ joined #perl6
14:28 masak aye.
14:29 timotimo i'm looking forward to the next coming p6cc where supplies, channels, ... are usable :)
14:30 rurban joined #perl6
14:30 masak heh. "the next coming p6cc" will not be held by me, sad to say.
14:30 masak I'm having enough trouble finishing the current one.
14:31 cognominal with this async stuff, Perl 6 is no more  the  genius autist
14:32 masak er, I don't think that's a metaphor that ever described Perl 6 very well.
14:33 lizmat timotimo: I would think that any delayed values should still appear on the tap by the time they were scheduled
14:34 timotimo er.
14:34 lizmat timotimo: to be.  Having said that, I just realize that the done should *also* be delayed
14:34 timotimo ah, yes :)
14:34 timotimo that's what i thought of
14:34 lizmat ok  :-)
14:35 lizmat we're about to be off again  for a few hours
14:35 lizmat if it hasn't been done by the time I get back, I'll take care of it
14:42 census joined #perl6
14:45 BenGoldberg joined #perl6
14:55 logie joined #perl6
14:56 anaeem1 joined #perl6
14:57 rurban joined #perl6
14:57 anaeem1_ joined #perl6
14:58 anaeem1_ joined #perl6
14:59 raiph joined #perl6
15:06 vaskozl joined #perl6
15:07 raiph m: my $foo; say "\$foo = $foo" # I'm wondering if there's already a more terse way to get both the name of a thing, especially a variable, and its value though I realize macros will be appropriate for this and I don't mind waiting)
15:07 camelia rakudo-moar f3446b: OUTPUT«use of uninitialized value of type Any in string context␤$foo = ␤»
15:07 raiph m: my $foo; say $foo.perl
15:07 camelia rakudo-moar f3446b: OUTPUT«Any␤»
15:08 timotimo raiph: pairs are perfect
15:08 timotimo m: my $foo = "hi raiph"; say (:$foo).perl
15:08 camelia rakudo-moar f3446b: OUTPUT«"foo" => "hi raiph"␤»
15:08 timotimo hm. almost perfect
15:08 timotimo loses the sigil.
15:08 raiph timotimo: that's the ticket. thx!
15:09 timotimo m: my $foo = "hi raiph"; say :$foo.perl
15:09 camelia rakudo-moar f3446b: OUTPUT«"foo" => "hi raiph"␤»
15:09 timotimo m: my $foo = "hi raiph"; say (:$foo)
15:09 camelia rakudo-moar f3446b: OUTPUT«"foo" => "hi raiph"␤»
15:09 timotimo m: my $foo = "hi raiph"; say :$foo
15:09 camelia rakudo-moar f3446b: OUTPUT«␤»
15:10 lizmat r: my $foo; say $foo.VAR.name
15:10 camelia rakudo-jvm f3446b: OUTPUT«(timeout)»
15:10 camelia ..rakudo-{parrot,moar} f3446b: OUTPUT«$foo␤»
15:11 timotimo brr, rakudo-jvm b0rked again? :(
15:11 lizmat r: my @foo; say @foo.VAR.name
15:11 raiph .oO ( gets cold in here when jvm isn't working )
15:11 camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«@foo␤»
15:11 lizmat r: my %foo; say %foo.VAR.name
15:11 camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«%foo␤»
15:12 lizmat r: my &foo; say &foo.VAR.name
15:12 camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«&foo␤»
15:12 vendethiel raiph: my $foo; say :$foo; # that's what I use to debug :-)
15:12 jnthn o/ for a short moment, #perl6
15:12 yoleaux 26 Apr 2014 21:43Z <raiph> jnthn: why do you have P5 code in your "reactive programming in perl 6" presentation ("while (!eof($fh)) { my $line = <$fh>; next if $line =~ /^\#/; # … }")?
15:12 yoleaux 26 Apr 2014 22:26Z <raiph> jnthn: I guess what I mean is that the PDF should at least mention that that first fragment is P5 code (though I'd prefer that the whole PDF was P6 code) so it works for folk who don't know or care about P5
15:13 * vendethiel is so late and didn't see other messages ¬¬
15:13 timotimo r: sub prefix:<::>(\thing) { (thing.VAR.name => thing).perl }; my $thingie; say ::$thingie;
15:13 camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«"\$thingie" => Any␤»
15:13 timotimo well, almost :D
15:14 jnthn .tell raiph What you forget are that I make slides primarily for the purpose of supporing the presentation I'm giving. If you're interested in using hem as the basis for articles or some other more pleasant form for not-at-the-talk folks, feel free.
15:14 yoleaux jnthn: I'll pass your message to raiph.
15:14 vendethiel m: my $a = 5; my $b = |$a; say $a; # wat
15:14 camelia rakudo-moar f3446b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/SXJvHCa0BM�Variable '&prefix:<|>' is not declared�at /tmp/SXJvHCa0BM:1�------> [32mmy $a = 5; my $b = [33m�[31m|$a; say $a; # wat[0m�»
15:14 timotimo r: sub prefix:<::>(\thing) { "{thing.VAR.name} => {thing.perl}; my $thingie; say ::$thingie;
15:14 camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/tmpfileâ�¤Variable '$thingie' is not declaredâ�¤at /tmp/tmpfile:1â�¤------> [32mg.VAR.name} => {thing.perl}; my $thingie[33mâ��[31m; say ::$thingie;[0mâ�¤    expecting any of:â�¤   …»
15:14 vendethiel m: my $a = 5; my $b := $a; say $b.VAR.name; # wat
15:14 camelia rakudo-moar f3446b: OUTPUT«$a␤»
15:14 timotimo r: sub prefix:<::>(\thing) { "{thing.VAR.name} => {thing.perl}" }; my $thingie; say ::$thingie;
15:14 lizmat r: sub prefix:<::>(\thing) { (thing.VAR.name.substr(1) => thing).perl }; my $thingie; say ::$thingie;
15:14 * vendethiel guessed so
15:14 camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«$thingie => Any␤»
15:14 camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«"thingie" => Any␤»
15:14 * vendethiel really thinks .VAR.name shouldn't be available :(
15:14 Rotwang joined #perl6
15:15 timotimo it's fine as long as you spell it VAR ;)
15:15 vendethiel as opposed to WAT?
15:15 timotimo :D
15:19 woolfy Dave Cross:  Just got a letter from Manning. They've declared "Data Munging with Perl" out of print. All rights revert to me. Hurrah!
15:19 woolfy Dave Cross: I've made "Data Munging with Perl" available for free download  http://perlhacks.com/2014/04/data-munging-perl/
15:19 masak (Dave Cross)++
15:20 sjn nice!
15:20 woolfy (maybe some day Dave can be convinced to write a Perl6-version)     :-)
15:21 masak we could crowd-translate it to Perl 6 in a wiki :P
15:21 masak one of the big missing things of the Using Perl 6 book was a lack of overarching structure. an existing book would already have that.
15:21 dalek rakudo-star-daily: abecb36 | coke++ | log/ (5 files):
15:21 dalek rakudo-star-daily: today (automated commit)
15:21 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/abecb36299
15:21 dalek rakudo-star-daily: 1dc0703 | coke++ | log/ (5 files):
15:21 dalek rakudo-star-daily: today (automated commit)
15:21 dalek rakudo-star-daily: review: https://github.com/coke/rakudo​-star-daily/commit/1dc07039a4
15:22 dalek perl6-roast-data: 30d347e | coke++ | / (4 files):
15:22 dalek perl6-roast-data: today (automated commit)
15:22 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/30d347e1ba
15:23 masak of course, I imagine crowd-translating it in a wiki would need some kind of permission from Dave Cross.
15:23 timotimo sure
15:24 timotimo i don't really think he'd mind as long as we provide ample attribution
15:24 * masak read that as "ample attrition"
15:25 masak detrain &
15:26 jnthn airport *
15:26 jnthn &
15:26 jnthn .oO( travel day all around, it seems :) )
15:28 Mouq joined #perl6
15:31 guru joined #perl6
15:48 Mouq m: say (4, "n", 0) ~~ :(Int, Str, 0)
15:48 camelia rakudo-moar f3446b: OUTPUT«True␤»
15:48 Mouq ^^ Really cool
15:49 vendethiel :o)
15:49 vendethiel tuple-matching-like
15:52 Mouq Smart-match is supa cool
15:52 Mouq m: say (^10).grep: (:is-prime)
15:52 camelia rakudo-moar f3446b: OUTPUT«2 3 5 7␤»
15:52 timotimo aye.
15:52 vendethiel :o
15:53 vendethiel I don't even know how that works
15:53 Mouq vendethiel: You can smart-match against pairs
15:53 timotimo if there's a pair at the RHS, it tries to function-call the key and compare to the value
15:53 timotimo in this case it's "is-prime" => True
15:53 vendethiel oh, kay
15:53 timotimo so you could also have used :!is-prime for checking non-prime numbers
15:54 timotimo or :uc<HELLO> for words that uppercase to HELLO
15:54 Mouq timotimo: Oh, it compares to the value?
15:54 Mouq timotimo: :O
15:54 timotimo i'm not sure if it smartmatches.
15:54 timotimo let me check
15:54 timotimo m: say (^10).grep: (:is-prime({ say "in the closure: $_" }))
15:54 camelia rakudo-moar f3446b: OUTPUT«2 3 5 7␤»
15:54 timotimo apparently doesn't
15:54 timotimo m: say (^10).grep: (:is-prime(False))
15:54 camelia rakudo-moar f3446b: OUTPUT«0 1 4 6 8 9␤»
15:54 Mouq m: say "$_ => ", $_ ~~ :Int(4) for 3,3.5,3.7,4,4.3,4.5
15:54 camelia rakudo-moar f3446b: OUTPUT«3 => True␤3.5 => True␤3.7 => True␤4 => True␤4.3 => True␤4.5 => True␤»
15:55 Mouq m: say "$_ => ", $_ ~~ :Int(4) for 2,3,3.5,3.7,4,4.3,4.5
15:55 camelia rakudo-moar f3446b: OUTPUT«2 => True␤3 => True␤3.5 => True␤3.7 => True␤4 => True␤4.3 => True␤4.5 => True␤»
15:55 Mouq m: say "$_ => ", ($_ ~~ :Int(4)) for 2,3,3.5,3.7,4,4.3,4.5
15:55 camelia rakudo-moar f3446b: OUTPUT«2 => True␤3 => True␤3.5 => True␤3.7 => True␤4 => True␤4.3 => True␤4.5 => True␤»
15:56 timotimo huh?
15:56 timotimo i must have been wrong?
15:56 timotimo you would have to check the specs
15:56 * timotimo is watching a LW talk at the moment
15:56 * Mouq thinks timotimo's way is superiour
15:56 Ben_Goldberg joined #perl6
16:09 isBEKaml` joined #perl6
16:12 xinming_ joined #perl6
16:18 raiph .tell jnthn Thanks for permission to edit/reuse your presentations. After an initial editing attempt I'm thinking you use a presentation build tool; if so, may I/we get permission and a pointer to use that too? Thanks again either way. :)
16:18 yoleaux 15:14Z <jnthn> raiph: What you forget are that I make slides primarily for the purpose of supporing the presentation I'm giving. If you're interested in using hem as the basis for articles or some other more pleasant form for not-at-the-talk folks, feel free.
16:18 yoleaux raiph: I'll pass your message to jnthn.
16:21 rurban joined #perl6
16:22 sjn_ joined #perl6
16:22 xenoterracide joined #perl6
16:30 rindolf joined #perl6
16:32 hoverboard joined #perl6
16:40 masak raiph: as far as I know, jnthn uses unadorned PowerPoint. he makes a single slide with a title and a body, and then he clones that ad lib.
16:50 timotimo it doesn't seem like the TalksDump upload from "what can you do today?" is the audially-improved version of the video
16:52 timotimo http://t.h8.lv/Perl_6_what_can​_you_do_today_fixed_audio.webm ← for future reference; also posted in that video's comments
17:00 Rotwang joined #perl6
17:10 xenoterracide joined #perl6
17:10 telex joined #perl6
17:17 raiph m: sub foo (|args, $a, @b, %c) { say args }; foo(5) # according to spec this should work: http://perlcabal.org/syn/S06​.html#Argument_list_binding
17:17 camelia rakudo-moar f3446b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/SHaAEY_8Edâ�¤Cannot put required parameter $a after variadic parametersâ�¤at /tmp/SHaAEY_8Ed:1â�¤------> [32msub foo (|args, $a[33mâ��[31m, @b, %c) { say args }; foo(5) # accordi[0mâ�¤    expect…»
17:17 raiph what, in the meantime, is a terse way to dump the capture of args to foo?
17:17 raiph and what's the prognosis on that bit of the spec ("The | parameter takes a snapshot of the current binding state, but does not consume any arguments from it.")?
17:19 raiph sub foo ($a, @b, %c) { say &?ROUTINE.args }; foo(5) # is there something like this that works?
17:20 timotimo sub foo (|capt) { say capt.perl }; foo(5)
17:20 timotimo m: sub foo (|capt) { say capt.perl }; foo(5)
17:20 camelia rakudo-moar f3446b: OUTPUT«Capture.new(list => (5,))␤»
17:20 timotimo m: sub foo (|capt) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
17:20 camelia rakudo-moar f3446b: OUTPUT«Capture.new(list => (1, 8, 9,), hash => {"quak" => "duck", "foo" => "bar"})␤»
17:20 timotimo interestingly, the $a and @b seem to have flattened together there
17:20 timotimo that can't be right?
17:21 timotimo oh, it can
17:21 raiph (darn, shoulda been 3 args to foo as well as the 3 or 4 params)
17:21 timotimo i didn't put $a, @b there
17:21 timotimo m: sub foo ($a, @b, %c, |capt) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
17:21 camelia rakudo-moar f3446b: OUTPUT«Not enough positional parameters passed; got 2 but expected at least 3␤  in sub foo at /tmp/PUxEiTJTBc:1␤  in block  at /tmp/PUxEiTJTBc:1␤␤»
17:21 timotimo m: sub foo ($a, @b, *%c, |capt) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
17:21 camelia rakudo-moar f3446b: OUTPUT«Capture.new()␤»
17:21 timotimo m: sub foo (|capt, $a, @b, *%c) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
17:21 camelia rakudo-moar f3446b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/vw5ZstAWTuâ�¤Cannot put required parameter $a after variadic parametersâ�¤at /tmp/vw5ZstAWTu:1â�¤------> [32msub foo (|capt, $a[33mâ��[31m, @b, *%c) { say capt.perl }; foo(1, (8,[0mâ�¤    expect…»
17:21 timotimo oh, huh.
17:21 timotimo i thought you could do that like that.
17:22 raiph if the capt goes at the end the args have been "consumed", when i put it at the start rakudo complains
17:22 raiph as you see
17:22 timotimo right
17:23 raydiak | shouldn't count as variadic?  or as a param at all, if it's not supposed to consume?
17:23 raiph right
17:23 raiph so that's an issue. also, i'm guessing there's a method akin to .capture for a Routine (but it isn't ".capture")
17:24 timotimo i know you can get the current capture with an nqp op, which isn't what you want
17:24 timotimo m: sub foo (|capt ($a, @b, *%c)) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
17:24 camelia rakudo-moar f3446b: OUTPUT«Capture.new(list => (1, 8, 9,), hash => {"foo" => "bar", "quak" => "duck"})␤»
17:24 timotimo this works
17:25 timotimo since a sub-capture of all "consumed" arguments with the | gives you a "second chance"
17:25 raiph timotimo: awesome, that's, er, arguably nicer than the spec
17:25 timotimo i'm glad i thought of it before someone exclaimed "oh, perl6 isn't ready for prime time yet after all!"
17:27 raiph .ask TimToady is timotimo's approach sufficient to mean no need for non-consuming |args? ^^ http://irclog.perlgeek.de/​perl6/2014-04-27#i_8644698
17:27 yoleaux raiph: I'll pass your message to TimToady.
17:34 timotimo oh
17:34 timotimo i don't think it will
17:34 timotimo it probably has different semantics for multiple dispatch
17:39 raydiak m: multi sub foo(|cap($a, @b)) {say "good"}; multi sub foo($a, $b) {say "bad"}; foo("hi", [1,2,3])
17:39 camelia rakudo-moar f3446b: OUTPUT«bad␤»
17:39 raydiak m: multi sub foo($a, @b) {say "good"}; multi sub foo($a, $b) {say "bad"}; foo("hi", [1,2,3])
17:39 camelia rakudo-moar f3446b: OUTPUT«good␤»
17:42 raydiak (could have left $a out of that entirely, in retrspect)
17:42 raydiak *retrospect
17:43 timotimo well, then you wouldn't have had to use the capture at all :)
17:43 raydiak hah
17:44 beastd joined #perl6
17:44 raiph just realized the saying cap doesn't print the variable names
17:44 timotimo yeah, how would it?
17:44 Mouq m: multi sub foo(|cap ($a, @b)) {say "good"}; multi sub foo(|cap ($a, $b)) {say "bad"}; foo("hi", [1,2,3])
17:44 camelia rakudo-moar f3446b: OUTPUT«good␤»
17:44 Mouq :)
17:44 Mouq running &
17:45 timotimo all you want is to uninvasively print the arguments to a function?
17:45 raydiak m: sub foo(|cap($a)) {|cap.perl.say}; foo([1,2,3])
17:45 camelia rakudo-moar f3446b: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/HHelHGusy0�Variable '&prefix:<|>' is not declared�at /tmp/HHelHGusy0:1�------> [32msub foo(|cap($a)) {[33m�[31m|cap.perl.say}; foo([1,2,3])[0m�»
17:46 raydiak m: sub foo(|cap($a)) {cap.perl.say}; foo([1,2,3])
17:46 raiph yes, tersely, with their variable names
17:46 camelia rakudo-moar f3446b: OUTPUT«Capture.new(list => ([1, 2, 3],))␤»
17:46 timotimo how about putting something like say MY::.pairs.grep: .value.defined
17:46 timotimo r: sub tester($a, $b, *%foo) { say MY::.pairs.grep: .value.defined }; tester(1, 99, foo => "bar", quak => "duck")
17:46 camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«␤»
17:46 timotimo oh
17:46 timotimo m: sub tester($a, $b, *%foo) { say ::.pairs.grep: .value.defined }; tester(1, 99, foo => "bar", quak => "duck")
17:46 camelia rakudo-moar f3446b: OUTPUT«␤»
17:47 timotimo m: sub tester($a, $b, *%foo) { say ::.pairs }; tester(1, 99, foo => "bar", quak => "duck")
17:47 camelia rakudo-moar f3446b: OUTPUT«"\$!" => Mu "\$/" => Mu "\$_" => Mu "\$a" => Mu "\$b" => Mu "\%foo" => Mu "\$*DISPATCHER" => Mu "\&?ROUTINE" => Mu "RETURN" => Mu␤»
17:47 timotimo i wonder why those are mu at that point.
17:47 timotimo anyway, gotta run
17:47 timotimo (but probably not like mouq is)
17:47 raiph thanks
17:47 raiph :)
17:55 guru joined #perl6
17:57 kurahaupo joined #perl6
18:10 timotimo well, in any case you can still be wrappin'
18:11 timotimo in that case you're "in front" of the multi dispatch
18:11 timotimo because you're wrapping the proto rather than any of the candidates
18:12 timotimo hm.
18:12 timotimo but that won't give you the local variable names
18:14 FROGGS arnsholt: ping
18:14 FROGGS arnsholt: nvm
18:14 FROGGS :o)
18:22 timotimo you're doing that a lot today aren't you?
18:23 FROGGS do I
18:23 FROGGS ?
18:23 timotimo well
18:23 timotimo twice already
18:24 denis_boyun_ joined #perl6
18:24 FROGGS ahh, yes
18:24 FROGGS but on another channel, you see :o)
18:25 kaare_ joined #perl6
18:31 timotimo right
18:39 denis_boyun_ joined #perl6
18:40 FROGGS arnsholt / jnthn: NativeCall x86 problem as a ticket: https://github.com/jnthn/zavolaj/issues/37
18:42 lizmat jnthn should be online again in about 2 hours
18:43 timotimo oh, hm
18:43 timotimo bbl
18:43 FROGGS thanks lizmat
18:44 japhb Speaking of NativeCall ... do you have to say "sub foo(int arg) returns int is native('libfoo') { * }" or can you say "sub foo(int arg --> int) is native('libfoo') { * }" (changing returns to --> in other words)?
18:45 FROGGS I dunno, I only used the 'returns int' version so far
18:49 kurahaupo_mobile joined #perl6
18:53 japhb Are the constraints at the top of https://github.com/jnthn/zavolaj/#arrays still correct?  ISTR arrays of different sized types and of CStructs were now possible, but maybe I'm just remembering a roadmap somewhere
18:54 FROGGS try it :/
18:58 dalek roast: c03a941 | (Elizabeth Mattijsen)++ | S17-concurrency/supply.t:
18:58 dalek roast: Simplify some tests
18:58 dalek roast: review: https://github.com/perl6/roast/commit/c03a941ee3
18:58 dalek roast: 92d9eb8 | (Elizabeth Mattijsen)++ | S17-c (2 files):
18:58 dalek roast: Move Channel tests to their own directory
18:58 dalek roast: review: https://github.com/perl6/roast/commit/92d9eb8d78
18:58 dalek roast: 64450c5 | (Elizabeth Mattijsen)++ | S17- (2 files):
18:58 dalek roast: Move Scheduler tests to their own directory
18:58 dalek roast: review: https://github.com/perl6/roast/commit/64450c5260
18:58 dalek roast: e4b0481 | (Elizabeth Mattijsen)++ | S17-c (2 files):
18:58 dalek roast: Winner is a Channel test
18:58 dalek roast: review: https://github.com/perl6/roast/commit/e4b04817b7
18:59 lizmat hmm... seems I got Dalek kicked :-(
19:00 dalek rakudo/nom: b17348a | (Elizabeth Mattijsen)++ | t/spectest.data:
19:00 dalek rakudo/nom: Adapt S17 tests to reorganized structure
19:00 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b17348a102
19:07 pmurias joined #perl6
19:08 zakharyas joined #perl6
19:29 dalek roast: d7062e4 | (Elizabeth Mattijsen)++ | packages/Test/Tap.pm:
19:29 dalek roast: Add library with "tap_ok" logic
19:29 dalek roast: review: https://github.com/perl6/roast/commit/d7062e4319
19:29 dalek roast: 9ba2bae | (Elizabeth Mattijsen)++ | S17-supply/basic.t:
19:29 dalek roast: Use tap_ok from the Test::Tap module
19:29 dalek roast: review: https://github.com/perl6/roast/commit/9ba2bae66f
19:33 molaf_ joined #perl6
19:34 moritz lizmat++
19:39 rurban joined #perl6
19:42 rurban1 joined #perl6
19:49 vendethiel m: say (1.0/3.0).fmt("%.1000f")
19:49 camelia rakudo-moar b17348: OUTPUT«0.000000000000000000000000000000000000​000000000000000000000000000000000000000000000​000000000000000000000000000000000000000000000​000000000000000000000000000000000000000000000​000000000000000000000000000000000000000000000​00000000000000000000000000000000000000…»
19:50 FROGGS p: say (1.0/3.0).fmt("%.1000f")
19:50 camelia rakudo-parrot b17348: OUTPUT«0.00000000000000000000000000000000000​00000000000000000000000000000000000000000000​00000000000000000000000000000000000000000000​00000000000000000000000000000000000000000000​00000000000000000000000000000000000000000000​00000000000000000000000000000000000000000…»
19:51 FROGGS nqp::sprintf's fault probably
19:51 masak :/
19:51 BenGoldberg p6: (1.0/3.0).fmt("%.1000f").say
19:51 camelia rakudo-moar b17348: OUTPUT«0.000000000000000000000000000000000000​000000000000000000000000000000000000000000000​000000000000000000000000000000000000000000000​000000000000000000000000000000000000000000000​000000000000000000000000000000000000000000000​00000000000000000000000000000000000000…»
19:51 camelia ..rakudo-jvm b17348: OUTPUT«(timeout)»
19:51 camelia ..rakudo-parrot b17348: OUTPUT«0.00000000000000000000000000000000000​00000000000000000000000000000000000000000000​00000000000000000000000000000000000000000000​00000000000000000000000000000000000000000000​00000000000000000000000000000000000000000000​00000000000000000000000000000000000000000…»
19:52 camelia ..niecza v24-109-g48a8de3: OUTPUT«F1000␤»
19:52 BenGoldberg F1000?
19:52 FROGGS O.o
19:52 masak niecza wins the dadaist prize.
19:52 BenGoldberg p6: (1.0/3.0).fmt("%.10f").say
19:52 camelia rakudo-{parrot,jvm,moar} b17348, niecza v24-109-g48a8de3: OUTPUT«0.3333333333␤»
19:53 BenGoldberg p6: (1.0/3.0).fmt("%.100f").say
19:53 camelia rakudo-jvm b17348: OUTPUT«0.0000000000000000000000000000​0000000000000000000000000000000000000​000000000000003.3333333333333327E99␤»
19:53 camelia ..niecza v24-109-g48a8de3: OUTPUT«F100␤»
19:53 camelia ..rakudo-parrot b17348: OUTPUT«0.0000000000000000000000000000​0000000000000000000000000000000000000​00000000000000003.3333333333333e+99␤»
19:53 camelia ..rakudo-moar b17348: OUTPUT«0.0000000000000000000000000000​0000000000000000000000000000000000000​0000000000000000000000000000-1e+100␤»
19:53 FROGGS ahh
19:53 vendethiel did I break everything
19:53 FROGGS F100 *g*
19:53 BenGoldberg p6: (1.0/3.0).fmt("%.50f").say
19:53 camelia rakudo-moar b17348: OUTPUT«0.0000000000000000000000​0000000000000000000000-1e+50␤»
19:53 camelia ..rakudo-jvm b17348: OUTPUT«0.0000000000000000000000​000000003.333333333333332E49␤»
19:53 camelia ..niecza v24-109-g48a8de3: OUTPUT«0.3333333333333330000000​0000000000000000000000000000␤»
19:53 camelia ..rakudo-parrot b17348: OUTPUT«0.0000000000000000000000​0000000003.3333333333333e+49␤»
19:53 BenGoldberg Well, that's certainly wrong.
19:54 BenGoldberg p6: (1/3).fmt("%.50f").say
19:54 camelia rakudo-moar b17348: OUTPUT«0.0000000000000000000000​0000000000000000000000-1e+50␤»
19:54 camelia ..rakudo-jvm b17348: OUTPUT«0.0000000000000000000000​000000003.333333333333332E49␤»
19:54 camelia ..niecza v24-109-g48a8de3: OUTPUT«0.3333333333333330000000​0000000000000000000000000000␤»
19:54 camelia ..rakudo-parrot b17348: OUTPUT«0.0000000000000000000000​0000000003.3333333333333e+49␤»
19:55 vendethiel and here I thought perl6 was really good at handling numeric precision :PP
19:55 BenGoldberg Oh, it is.  It just has some problems printing those numbers out ;)
19:55 FROGGS yeah :o)
19:55 vendethiel fair enough =)
19:56 FROGGS we're not so good at printing because printing is a) totally 80's and it is b) bad for the environment :o)
19:56 vendethiel that's low
19:57 FROGGS that scientific notation was really tricky when we made nqp::sprintf...
19:57 BenGoldberg One of the local food places lets you place your orders over the phone or internet, but there's also a sign saying, "The 80's called, and they want their fax machine back"
19:57 FROGGS hehe
19:58 * BenGoldberg wonders where one can order food by fax, nowadays.
19:58 FROGGS I have such a device in theory
19:58 FROGGS but I am unable to connect it to the outer world
19:58 BenGoldberg A theoretical fax machine?
19:59 FROGGS vendethiel: here is the code btw: https://github.com/perl6/nqp/b​lob/master/src/HLL/sprintf.nqp
19:59 vendethiel FROGGS: I never pretended I could fix it :o)
19:59 FROGGS BenGoldberg: no, hardware... a printer/scanner/fax thingy
19:59 FROGGS vendethiel: damn, and I wanted to trick you in hacking at it *g*
20:01 vaskozl joined #perl6
20:02 vendethiel FROGGS: method directive:sym<f>($/) { ?
20:02 vendethiel well, I can't build it because I'm on windows anyway ...
20:03 colomon BenGoldberg: back in grad school (1993) I used to order Chinese delivery over the fax via my modem.  Ah, the good old days...
20:03 FROGGS vendethiel: you'd just need activeperl and visual studio express...
20:03 FROGGS vendethiel: but yes, sym<f> is the place to start digging into
20:04 vendethiel actually,no
20:05 dalek roast: 249670a | (David Warring david.warring@gmail.com)++ | integration/advent2012-day1 (2 files):
20:05 dalek roast: adding advent 2012 days 16 and 19
20:05 dalek roast: review: https://github.com/perl6/roast/commit/249670a88e
20:05 vendethiel FROGGS: I have both, can't get rakudo or anything to build
20:06 FROGGS :/
20:06 FROGGS I have no problems building it on windows...
20:06 vendethiel my `make` started segfaulting randomly, no idea why
20:07 FROGGS make or nmake?
20:07 vendethiel gnumake
20:07 FROGGS ohh, I always used nmake
20:07 * vendethiel will look for nmake
20:07 FROGGS vc express
20:08 FROGGS then you'd use the vc developer console and configure and perl rakudo
20:08 vendethiel vc ?
20:09 vendethiel you mean vs ? i have vs ultimate, so I'd expect it to be here :|
20:09 vendethiel but I'll look for the console thingie
20:11 masak wow, https://github.com/perl6/nqp/b​lob/master/src/HLL/sprintf.nqp has certainly come along since last I looked at it.
20:11 masak colomon++ FROGGS++ lizmat++ jnthn++
20:11 * colomon shudders to think of the bugs colomon left in there...
20:12 masak "I know what you did last summer" :P
20:12 FROGGS yeah :/
20:12 masak nevertheless, colomon++ FROGGS++ especially.
20:14 * colomon hopes to wrangle more time to work on p6 in the near future...
20:14 colomon masak++ # getting it started
20:14 effbiai joined #perl6
20:15 vaskozl joined #perl6
20:16 jnap joined #perl6
20:20 masak :)
20:26 dalek roast: 632782d | (Elizabeth Mattijsen)++ | S17-supply/ (2 files):
20:26 dalek roast: Move Supply.for tests to separate file
20:26 dalek roast: review: https://github.com/perl6/roast/commit/632782dc1f
20:26 dalek roast: 1c1df5a | (Elizabeth Mattijsen)++ | S17-supply/ (2 files):
20:26 dalek roast: Move Supply.do tests to separate file
20:26 dalek joined #perl6
20:27 dalek rakudo/nom: f550cfb | (Elizabeth Mattijsen)++ | t/spectest.data:
20:27 dalek rakudo/nom: Test all of the S17-supply separate test files
20:27 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/f550cfbe49
20:32 anaeem1 joined #perl6
20:33 Mouq m: say ([16,15],[5,6]).fmt("%d elephants doing 15 tricks!") # wut
20:33 camelia rakudo-moar b17348: OUTPUT«16 elephants doing 15 tricks! 15 elephants doing 15 tricks! 5 elephants doing 15 tricks! 6 elephants doing 15 tricks!␤»
20:34 Mouq Oh
20:34 Mouq m: say ([16,15],[5,6]).fmt("%d elephants doing %d tricks!")
20:34 camelia rakudo-moar b17348: OUTPUT«No such method 'item' for invocant of type 'NQPMu'␤  in method message at src/gen/m-CORE.setting:12383␤␤»
20:34 Mouq m: say ([16,15]).fmt("%d elephants doing %d tricks!")
20:34 camelia rakudo-moar b17348: OUTPUT«No such method 'item' for invocant of type 'NQPMu'␤  in method message at src/gen/m-CORE.setting:12383␤␤»
20:38 lue m: say ([16,15],[5,6])».fmt("%d elephants doing %d tricks!")
20:38 camelia rakudo-moar b17348: OUTPUT«No such method 'item' for invocant of type 'NQPMu'␤  in method message at src/gen/m-CORE.setting:12383␤␤»
20:38 lue r: say ([16,15],[5,6])».fmt("%d elephants doing %d tricks!")
20:38 camelia rakudo-parrot b17348: OUTPUT«Nominal type check failed for parameter '$x'; expected Any but got NQPMu instead␤␤»
20:38 camelia ..rakudo-jvm b17348: OUTPUT«Nominal type check failed for parameter '$x'␤␤»
20:38 camelia ..rakudo-moar b17348: OUTPUT«No such method 'item' for invocant of type 'NQPMu'␤  in method message at src/gen/m-CORE.setting:12383␤␤»
20:39 Mouq All List.fmt is doing is self.map(*.fmt(…)).join(…)
20:39 cooper joined #perl6
20:39 Mouq It doesn't pay attention to the arity of the format
20:39 dalek rakudo/nom: 54598a2 | (Elizabeth Mattijsen)++ | t/spectest.data:
20:39 dalek rakudo/nom: Add 2012/day(16|19) tests
20:39 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/54598a2e76
20:40 Mouq Though we should probably have better error messages for 'less arguments than directives'
20:40 bystandereffect joined #perl6
20:44 dalek rakudo/nom: 0f8501f | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
20:44 dalek rakudo/nom: Make sure .Supply on a Supply is a noop
20:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0f8501f03c
20:45 dalek roast: 12d5f17 | (Elizabeth Mattijsen)++ | S17-supply/for.t:
20:45 dalek roast: Test that .Supply on a Supply is a noop
20:45 dalek roast: review: https://github.com/perl6/roast/commit/12d5f176d4
20:47 dalek nqp/loop_labels: 6d8fc83 | (Tobias Leich)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
20:47 dalek nqp/loop_labels: add nqp constant CONTROL_LABELED
20:47 dalek nqp/loop_labels: review: https://github.com/perl6/nqp/commit/6d8fc83791
20:51 dalek rakudo/nom: c154152 | (Elizabeth Mattijsen)++ | src/core/SupplyOperations.pm:
20:51 dalek rakudo/nom: Supply.delay: done/quit are also delayed
20:51 dalek rakudo/nom:
20:51 dalek rakudo/nom: Thanks to timotimo++ for reminding me
20:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c154152421
20:55 timotimo errrrr wtf
20:56 timotimo m: my %test; %test.push: bar => "hi"; say %test
20:56 camelia rakudo-moar b17348: OUTPUT«().hash␤»
20:56 timotimo what?
20:56 timotimo ... oooh
20:56 timotimo silly me. again.
20:56 Mouq m: my %test; %test.push: (bar => "hi"); say %test
20:56 camelia rakudo-moar b17348: OUTPUT«("bar" => "hi").hash␤»
20:56 lue timotimo: named parameters are slurped up, what could possibly make you think that would work? :)
20:56 dalek roast: 0381e1d | (Elizabeth Mattijsen)++ | / (5 files):
20:56 dalek roast: Make tap_ok "after_tap" parameter more Perl6ish
20:56 dalek roast: review: https://github.com/perl6/roast/commit/0381e1d021
20:58 masak it's easy to accidentally think that would work.
20:58 masak it's kind of a corner case.
20:59 masak and because of "interface consistency", there are no warnings/errors to alert you to what's wrong...
20:59 * vendethiel isn't quite sure
21:00 * FROGGS .oO( ... so the first Perl 6 wart was born )
21:00 lue masak: yeah, it's a nasty area of named parameters. The only (not-perfect) thing I could think of is making the :adverbial<form> the only way to specify named params, and fat => arrow is always a literal Pair
21:00 vendethiel (what's happening ?)
21:00 * lue doesn't think people specify named params with => too often
21:00 lizmat people coming from Perl 5 would
21:00 jnthn evneing, #perl6
21:00 yoleaux 16:18Z <raiph> jnthn: Thanks for permission to edit/reuse your presentations. After an initial editing attempt I'm thinking you use a presentation build tool; if so, may I/we get permission and a pointer to use that too? Thanks again either way. :)
21:01 lizmat and the current behaviour is a WTF?
21:02 vendethiel lizmat: mind explaining ?
21:02 lizmat Perl 6's behaviour of eating unused named parameters
21:02 vendethiel m: my %test; say (%test.push: bar => "hi").perl; say %test
21:02 camelia rakudo-moar b17348: OUTPUT«().hash␤().hash␤»
21:02 lizmat because that is what happens here
21:03 denis_boyun_ joined #perl6
21:03 timotimo lue: what got me confused was that 5 => "foo" worked but blah => "boo" didn't
21:03 vendethiel lizmat: uhm?
21:04 lue Could the solution be to *not* have an implicit *%slurp on functions? I've never seen the need for that, actually (if you expect errant named params, wouldn't you specify it anyway?)
21:04 vendethiel m: my %test; %test.push():bar; say %test;
21:04 camelia rakudo-moar b17348: OUTPUT«().hash␤»
21:04 FROGGS vendethiel: unused named params get silently ignored in method calls (only in method calls, not sub calls)
21:04 Mouq n: my %test; %test.push: bar => "hi"; say %test
21:04 camelia niecza v24-109-g48a8de3: OUTPUT«Unhandled exception: Excess arguments to Hash.push, unused named bar␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Hash.push @ 1) ␤  at /tmp/kCRFzRA7Jc line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 4595 (ANON @ 3) ␤…»
21:04 vendethiel lue: I agree with that =)
21:04 lizmat r: class Foo {}; Foo.new( :eat<this> )
21:04 camelia rakudo-{parrot,jvm,moar} b17348: ( no output )
21:04 vendethiel p6: class Foo {}; Foo.new( :eat<this> )
21:04 camelia rakudo-{parrot,jvm,moar} b17348, niecza v24-109-g48a8de3: ( no output )
21:05 labster joined #perl6
21:05 vendethiel niecza agrees on that one, though
21:05 lizmat p6: class Foo {}; say Foo.new( :eat<this> )
21:05 camelia rakudo-{parrot,jvm,moar} b17348: OUTPUT«Foo.new()␤»
21:05 camelia ..niecza v24-109-g48a8de3: OUTPUT«Foo.new(...)␤»
21:05 lue lizmat, FROGGS: do any of you know why there's an implict *%thing at all? I can't fathom a need for it.
21:05 jnthn See the S12 section titled Interface Consistency
21:06 lizmat S12:2270
21:06 synopsebot Link: http://perlcabal.org/syn/S12.html#line_2270
21:07 lue Ah. :/
21:08 btyler joined #perl6
21:08 lue .oO(Perl 7 will probably disambiguate flags (binary adverbs), named params, and Pairs, because this seems to cause problems.)
21:10 vaskozl joined #perl6
21:11 lue jnthn: It makes sense to me, yet at the same time it feels like an entirely wrong solution. (And besides, what about the extraneous *positionals*? Shouldn't we make sure they get passed along too?)
21:15 * lizmat has reached her commit limit and is kicked off her desk into her bed
21:15 raydiak agree w/lue...something about "we reduce the usefulness of our signatures and introduce more corner cases because of this one feature, X" feels very wrong, though I don't have an explicit, constructive suggestion
21:15 jnthn 'night, lizmat
21:16 lue ♞ lizmat o/
21:16 * woolfy is responsible for kicking lizmat :-)
21:16 FROGGS gnight lizmat and woolfy :o)
21:16 woolfy \o/
21:16 jnthn o/ woolfy
21:16 lue I personally think :($a) and :($a, :$b) are different signatures, and a case of "next/callwith", not "next/callsame". I'm guessing that's debatable though :)
21:17 masak 'night, lizmat and woolfy.
21:24 lue raydiak: I think the ultimate issue is that things like  foo(:x(1), :y(5))  and  foo() :quietly  are quite different things conceptually, but are specified the same way. I imagine current behavior is for the :quietly kind of things, to the detriment of the other kinds.
21:28 lue (Point is that this area seems incredibly ambiguous, conflating different uses of named parameter-like things, so any decided-on behavior ends up making some number of people unhappy.)
21:33 lue r: class Foo { method bar(Pair $a?) { say $a } }; Foo.bar(a=>2); # this has got to be incredibly wrong, though
21:33 camelia rakudo-{parrot,jvm,moar} c15415: OUTPUT«(Pair)␤»
21:50 baryonicandproud left #perl6
21:51 masak 'night, #perl6
21:51 timotimo iterating over a list while simultaneously removing and adding pieces from it is ... meh :\
21:52 timotimo gnite masak
21:52 timotimo redo won't pull the appropriate element from the list if you just removed one
21:52 jnthn timotimo: That's probably always bad program design.
21:52 timotimo should i be using a linked list? ;)
21:52 timotimo my problem is that i have a set of intervals and sometimes i want to split or remove intervals
21:52 jnthn Perhaps. Or a differnet algorithm.
21:53 timotimo splitting i could implement by appending the added interval to the end of the list
21:53 timotimo but removing one ... i *could* grab the very last element of the list and put it in place of the current one
21:53 jnthn @list .= grep(* !=== $thing-to-remove);
21:54 jnthn But yeah, a linked list may be more suitable.
21:54 timotimo doing that often sounds prohibitively expensive given rakudo's current performance characteristics ;)
21:54 raydiak why is it bad design?  I find it something I do often, and always the long hard way: build another list of the elements to add or remove, then iterate over that list, operating on the first list (from last to first)
21:55 jnthn timotimo: Depends on the size of the list. It's all O(n) afaict, so we're discussing constant factor...
21:55 raydiak lue: all we need are one or two more unicode characters :)
21:56 jnthn raydiak: It'd maybe be simpler to just build the new list, no? :)
21:56 jnthn raydiak: Generally, though, if you're using an iterator over something *and* mutating it, then it'll be hard to understnad the behavior.
21:57 jnthn raydiak: It's the kind of thing that will have me reaching for the docs in pretty much any language I work in. :)
21:58 jnthn Heck, last time somebody tried to optimize a simple "delete by sliding elements to the left" thingy in MoarVM they ended up introducing a bug that wasn't spotted by anybody else for a little while.
21:58 raydiak it's odd, the behavior I would expect doesn't intuitively *seem* complicated...but maybe that just means I don't know enough about the internals :)
21:59 jnthn raydiak: Well, in the case of array iterators, the common approach is just an incrementing index.
22:00 jnthn Anyway, not going to say it's always the wrong thing to do. Just that most times I've seen it done, there were bugs lurking that hurt later.
22:00 jnthn And it doesn't tend to convey intent too well.
22:02 timotimo jnthn: in case of a naughty user i'll have 80 entries in that list
22:02 timotimo i may want to reconstruct that list ~4x per second each time removing or adding a single piece
22:02 timotimo ... actually
22:03 jnthn timotimo: 80 isn't that many. I'd really hope we can handle doing that ~4x per second :P
22:03 timotimo now that i put it like that, maybe it'd even be acceptable to go back to the 80 x 50 array approach i used to have and just do the rendering more efficiently
22:03 raydiak jnthn: thanks for explaining, I'm absorbing and processing :)
22:03 timotimo i'm afraid we might not be able to :\
22:03 timotimo hmm. actually. the rendering approach i'm using uses strings with ansi escape codes and unicode stuff
22:04 timotimo *maybe* i can get around the problematic string implementation and performance characteristics of moarvm by using bufs instead?
22:04 timotimo do we have something like join for bufs?
22:04 timotimo hm. i could probably just print the bufs one after the other
22:06 jnthn timotimo: On my box I can do it 100 times in half a second, and half of that is startup time...
22:06 jnthn timotimo: arrgh, the strings...
22:06 jnthn I really, really need to deal with those soon. :/
22:06 * jnthn puts it on this month's "performance improvements todo" list.
22:06 jnthn With all the async stuff I probably already did enough features for 2014.05 :P
22:07 jnthn and lizmat++ is cooking on gas with other stuff there anayways :)
22:07 jnthn So I can do some performance work with my next tuits. :)
22:07 jnthn Probably on Thursday :)
22:08 jnthn Anyways, teaching a big group of folks hard stuffs tomorrow, so guess I should rest well for it. :)
22:08 jnthn 'night, #perl6
22:08 raydiak \o jnthn
22:09 timotimo is there a way we can make moarvm on stdout buffer? or perhaps just not epoll_wait for stdout to become "writable" each time we've written something?
22:16 timotimo it now takes almost exactly 1s to render the background image
22:20 Mouq timotimo: What are you rendering?
22:25 timotimo a background for my nibbles game
22:26 tadzik oh :)
22:28 raydiak have a similar problem w/Pray...if I try to redraw the whole preview each time, it spends more time drawing the preview than it does raytracing
22:29 hoverboard joined #perl6
22:31 timotimo jnthn: to see a totally bad example of how the hashing thing could be implemented for 8bit strings, look at the branch "uthash_padding"
22:34 timotimo maybe we could put a "how to hash" method into the repr
22:37 timotimo now a friend told me it might be a workable solution to just always only use the lowest of the 4 bytes if we have a 32bit thing
22:38 timotimo because it won't be terrible if two strings have the same key, and how often are two strings equal except for the upper 3 bytes of each character (in the same spots, on top of it all)
22:40 rurban joined #perl6
22:58 timotimo since the hash function is hardly cryptographically strong, finding collisions is kind of easy anyway if you just look at the code
23:03 yoleaux joined #perl6
23:09 kurahaupo joined #perl6
23:11 jnap joined #perl6
23:36 lue joined #perl6
23:46 timotimo i'd like to has supplies for generic file opening
23:46 timotimo especially for getting single bytes from /dev/stdin if, say, i'm building a console game :)

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo