»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg camelia perl6: ... | irclog: irc.perl6.org | UTF-8 is our friend!
Set by sorear on 25 June 2013.
00:04 geekosaur left 00:06 geekosaur joined 00:08 mtj_ joined, LLamaRider left
colomon avuserow: you want to scrobble from p6? 00:11
00:18 hoverboard left 00:19 xenoterracide joined
avuserow colomon: also want to read my old scrobbles 00:21
colomon didn't know that was possible
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:22
so that's at least one use of said information :) 00:23
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
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
where you keep making the same set of songs more and more popular 00:26
but yeah, there are some potentially interesting things you can do with TagLib and some historical music information about you (and others) 00:27
00:33 Pleiades` joined 00:35 vaskozl left 00:41 vaskozl joined
colomon avuserow++ # just used Audio::Taglib::SImple to set tags for an MP3 file downloaded from youtube. 00:47
00:52 xenoterracide left
Timbus i like to think of youtube ripping as the modern version of taping a song on the radio 00:52
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:53
www.youtube.com/watch?v=fJTr64e-Mu4 00:55
Timbus haha, no judgement here. i just liked the comparison
colomon taped songs off the radio a good bit back in the day. :) 00:56
Timbus I never did, but my younger sister taped hanson's "mmm bop" and our family has never fully recovered 00:57
01:04 xenoterracide joined
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:06
01:17 FROGGS_ joined 01:18 FROGGS left 01:26 btyler left 01:32 araujo left 01:41 vaskozl left 01:53 vaskozl joined 01:55 klapperl joined 01:56 Khisanth left 01:58 Su-Shee_ joined, xenoterracide left, Su-Shee left 01:59 klapperl_ left, rurban left 02:03 xenoterracide joined 02:11 Khisanth joined 02:15 ivanshmakov left 02:31 Mouq left 02:33 xragnar_ joined, xragnar is now known as Guest11088, xragnar_ is now known as xragnar 02:36 Guest11088 left 02:48 vaskozl left 02:54 vaskozl joined 03:00 araujo joined, araujo left, araujo joined
raydiak ugh. lifted so much weight today I almost can't type 03:05
(helping a friend move, that is) 03:06
TimToady yeah, that'll do in your typing muscles fershure 03:07
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:09
TimToady boxes of books are the worst 03:10
well, and pianos :)
raydiak what about limp foam matresses and projection TVs? 03:11
TimToady them too :)
they're all the worst
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
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
TimToady hopefully it's a gentle slope for you :)
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
*yield
but mainly I just hope the TV I semi-dropped towards the end is okay 03:16
TimToady they needed a new TV 03:17
raydiak heh so true
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:24
BenGoldberg Writing documentation... 03:33
raydiak thanks, I'll consider it. should get back to helping with the docs one way or another anyway, I guess 03:37
03:42 Mouq joined, xenoterracide left 03:43 sftp left 03:46 Mouq left 03:52 sftp joined 03:54 vaskozl left 03:55 eternaleye joined 04:00 vaskozl joined 04:06 xenoterracide joined 04:20 BenGoldberg left 04:28 bjz joined, xenoterracide left 04:49 adu joined 05:00 vaskozl left 05:07 vaskozl joined 05:10 ponbiki_ is now known as ponbiki 05:11 ponbiki left 05:14 Alula_ left 05:15 Alula_ joined 05:16 labster left 05:17 rurban joined 05:26 ponbiki joined 05:30 Mouq joined
lue ♘ #perl6, oh and blag toast! :) rdstar.wordpress.com/2014/04/27/bu...t-strings/ 05:33
05:35 Mouq left 05:40 Mouq joined
Mouq lue++ # blag, "Bowties are cool." :) 05:51
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:53
(Str coerces to that in NativeCall where "that" is a char*) 05:54
(hopefully that makes sense and I'm not just using NativeCall wrong/ineffectively) 05:55
anyway, lue++ # blag :)
05:59 rurban left 06:01 adu left 06:06 vaskozl left 06:11 SamuraiJack joined 06:12 vaskozl joined
Mouq is finding Python's pack format much saner than Perl's: docs.python.org/2/library/struct.html 06:19
(They're pretty similar, but the naming is better. Python's pack isn't nearly as powerful as Perl 5's, though, AFAICT) 06:21
I'm kind of confused, actually… does Python's format only work on the level of bytes? :| 06:24
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
It seems that there's two ways of looking at pack and how it should be in P6: 06:36
The way everyone else thinks of it, as a way to decode a C struct 06:37
and the way I think of it, as a way to decode aribitary binary data 06:38
s/aribitary/arbitrary/
and s/pack/unpack/, really 06:39
06:44 Mouq left 06:48 xinming__ joined 06:51 xinming_ left
masak morning, #perl6 06:53
Mouq: it would be really neat to tie pack/unpack to objects, somehow.
06:55 darutoko joined 07:00 rurban joined 07:04 rurban left 07:19 grep0r left
dalek ecs: da4e9a6 | (Elizabeth Mattijsen)++ | S17-concurrency.pod:
Supply.unchanged -> Supply.stable
07:22
lizmat good *, #perl6!
nothing like starting the day with a commit :-) 07:23
FROGGS_ good morning lizmat 07:24
07:24 rurban joined
lizmat FROGGS_ o/ 07:27
07:28 Su-Shee_ is now known as Su-Shee
Su-Shee good morning everyone. 07:29
07:29 rurban left
FROGGS_ TimToady: rdstar.wordpress.com/2014/04/27/bu...t-strings/ 07:29
Su-Shee: morning :o)
dalek kudo/nom: 62dd251 | (Elizabeth Mattijsen)++ | src/core/Supply (2 files):
Supply.unchanged -> Supply.stable (to match spec)
07:38 ivanshmakov joined 07:40 ivanshmakov left, ivanshmakov joined 07:44 grep0r joined
dalek kudo/nom: 2685e85 | (Elizabeth Mattijsen)++ | src/core/Supply (2 files):
Implement Supply.delay
07:44
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 07:55 woolfy joined
dalek kudo/nom: f3446b9 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
Implement .Supply coercer
08:02
lizmat (1..10).Supply seems more natural to me than Supply.for(1..10) 08:03
08:06 SamuraiJack left
dalek ast: a7550db | (Elizabeth Mattijsen)++ | S17-concurrency/supply.t:
Add tests for .Supply coercer
08:07
08:13 anaeem1 joined 08:20 anaeem1 left 08:23 Mouq joined 08:25 rurban joined 08:27 anaeem1_ joined 08:29 Mouq left, rurban left 08:36 rindolf joined 08:41 anaeem1_ left 09:07 FROGGS_ is now known as FROGGS
FROGGS it seems like I partly understand how exception handlers are registered for loops in nqp-j 09:09
09:10 dmol joined 09:14 denis_boyun_ joined 09:22 kurahaupo joined 09:26 rurban joined 09:30 rurban left
moritz Mouq++ # hacking htmlify in perl6/doc 09:35
09:38 SamuraiJack joined 09:42 kurahaupo_mobile joined 09:44 kurahaupo left
masak this email kind of highlights the core of difference in approach between Perl and Python language design: mail.python.org/pipermail/python-3...08663.html 09:45
09:45 kurahaupo_mobile is now known as kurahaupo
masak especially this sentence: "There is real value in having a small language." 09:45
vendethiel I think I disagree a bit here, though. JavaScript is a small language. Python is a limiting language. 09:48
09:54 SamuraiJack left
masak that's an interesting distinction. 09:54
10:04 araujo left
lizmat cycling& 10:06
10:11 PZt joined
DrEeevil "compact" is an important feature of things that humans interact with 10:16
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
work-arounds that produce clean code"
FROGGS moritz: that is something that you will not hear in #perl6 (about Perl 6) 10:18
moritz so, workarounds are necessary
FROGGS basically I do not see how a work around can ever produce clean code
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
still upstream insists that people use it ...
moritz I've abused them once to create non-local returns, and have discarded the commit before ever pushing it
10:27 rurban joined
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:29
10:31 rurban left
Su-Shee small language? smalltalk. python isn't small. smalltalk fits on a vocabulary sized index card. and it's really NOT limited. 10:34
masak small language? Lisp. has, like, 7 primitives. 10:36
small language? Forth. all you need is a stack and some words strung together.
hm, this looks interesting: blog.burntsushi.net/rust-regex-syntax-extensions -- Russ Cox, regexes, *and* hygientic macros.
Su-Shee masak: smalltalk has 6 ;)
masak ooh -- which ones? 10:37
moritz BF has 4! 10:38
vendethiel (for lisp, I thought it was 9 -- quote atom eq car cdr cons cond label lambda) 10:40
Su-Shee masak: true, false, nil, self, super, and thisContext 10:43
other side of the index card fits the syntax if I write tiny ;)
moritz both of those sound incomplete to me
might be the only keywords
but not the only primitives 10:44
I guess both allow invocation, and that's a primitive operation?
(invoking a lambda or method)
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:47
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
moritz Su-Shee: so the primitives count is highly misleading
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
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:51
sicp illustrates that very nicely I'd say :) 10:52
forth I haven't tried yet.
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..) 10:53
if I only want rakudo on the jvm I can drop all --gen-* and just use --backend=jvm? 11:20
11:21 spider-mario joined
vendethiel if you were to create an HAML (i.e.) parser in Perl6, would you use EVAL ? 11:22
FROGGS Su-Shee: well, you still need --gen-nqp 11:26
11:27 rurban joined
masak vendethiel: no, I'd look for other ways. 11:31
11:31 rurban left
vendethiel well, I can keep a CST around and just substitute the values 11:32
that seems as inefficient, though
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.
vendethiel no, that's not an issue
I'd EVAL `sub ($params) { "html code here {$params<something>}" }` 11:34
so, you'd need to call the function I returned
11:37 SamuraiJack joined
masak and that saves you from injection attacks... how? 11:38
vendethiel masak: well, there's no risk the guy will be able to execute perl code 11:40
which, I thought, was what you meant.
masak no, I was talking about my night's sleep.
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.
vendethiel as I said -- it's not
I evaluate to a sub. So what you get - what I EVAL'd - is a function. 11:42
11:42 anaeem1_ joined 11:43 SamuraiJack left
masak you're saying there's pride in making the catastrophe a lambda expression? :) 11:44
11:45 anaeem1_ left
masak anyway, you asked advice and that is mine. I would not use EVAL on string-concatenated user input. 11:45
vendethiel Neither would I. I said it 2 times -- that's not what I'm proposing here. 11:47
I'm proposing to EVAL code generated from the template, which would be a function. You would pass the arguments to that function
There'd be no user-input EVAL'd 11:48
FROGGS vendethiel: if $params<something> contains '}; shell `rm -rf /`; #', would you be upset?
vendethiel FROGGS: no. that'd show `'; shell `rm -rf /`` 11:49
so I'd pity the guy who tried it.
m: my &s = EVAL "sub ($a) { say 'a'; }"; s(); 11:50
camelia rakudo-moar f3446b: OUTPUT«===SORRY!=== Error while compiling /tmp/9KLPnOF7sK␤Variable '$a' is not declared␤at /tmp/9KLPnOF7sK:1␤------> my &s = EVAL "sub ($a⏏) { say 'a'; }"; s();␤ expecting any of:␤ postfix␤»
vendethiel m: my &s = EVAL 'sub ($a) { say "a"; }'; s();
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␤␤»
vendethiel m: my &s = EVAL 'sub ($a) { say "a"; }'; s("'; shell `rm -rf /`");
camelia rakudo-moar f3446b: OUTPUT«a␤»
vendethiel FROGGS: see ? I'd be okay with it.
also masak ^ 11:51
FROGGS ahh, $params<something> comes from the signature... I missed that 11:52
brb 11:53
11:53 FROGGS left 11:54 FROGGS joined
masak ah, the single-quoted string sent to EVAL doesn't interpolate. I missed *that*. 11:56
yeah, then it's safe, I think. sorry for being alarmist.
but I don't see why that isn't a useless use of EVAL, then. 11:57
why not just declare the sub right away?
you're evaling what amounts to a constant string; why not express it as code instead?
vendethiel masak: because I want to generate that string from a HAML template 12:08
like: `my &tmpl = HAML::compile('h1= hey'); say tmpl(hey => 'Hello you!')`
masak oh, so the *template* can vary. I see. 12:11
vendethiel Yeah. So I think I can either generate a sub (to EVAL, like I just said) or a CST I traverse 12:12
masak right. 12:16
I would do the CST, out of reflex.
vendethiel that should be easy to generate with the grammars, I get 12:25
masak aye. 12:26
I wish there were a handy tutorial out there for that.
not aware of one.
12:28 rurban joined
masak train & 12:29
vendethiel masak: well, for one, I can just `grammar HAMLGrammar { token id { blah } }; ` then the action will `make IdNode` 12:30
12:32 rurban left 12:37 anaeem1_ joined
timotimo i'd like QAST and the compilers to be exposed via a clean api 12:39
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
vendethiel because it means you're tying it up to NQP
unless QAST is specced somewhere, but I don't think so
timotimo it is not
12:41 anaeem1_ left
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:45
vendethiel do we even have docs on how to create modules, test them locally and stuff? 12:53
12:54 xenoterracide joined
timotimo hm, not actually sure 12:55
vendethiel m: grammar A { token TOP { 'a' } }; A.parse('a'); say $/.ast; 12:57
camelia rakudo-moar f3446b: OUTPUT«(Any)␤»
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:58
vendethiel mmh 12:59
timotimo i should probably try to re-do that 13:01
currently waiting for obs-studio to be cool enough on linux :P
vendethiel that doesn't help me yet though :p 13:02
timotimo aye :) 13:03
13:29 rurban joined 13:30 zakharyas joined, guru joined, guru is now known as Guest36760, Guest36760 is now known as ajr_ 13:33 rurban left
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:36
timotimo well, something to construct ASTs programmatically 13:37
ideally, macros would offer that in a nice package
they don't as of yet
masak quasi blocks are our current way to construct ASTs programatically. but they don't do enough, admittedly.
to be specific, they don't offer a "build your own control flow" kit. 13:38
timotimo and they don't make it easy to compose things 13:39
masak yes, we're missing some kind of combinator API. 13:40
13:43 haroldwu left, haroldwu joined
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:45
FROGGS masak: would make sense to sketch some pseudo code for a minimalistic use case 13:46
masak aye.
timotimo like building html templates out of macros 13:47
masak :) 13:48
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. gist.github.com/cognominal/10880617 13:49
masak looks 13:50
cognominal feeback welcome.
13:50 haroldwu left, haroldwu joined 13:51 haroldwu left, haroldwu joined
masak "Indentation can be used in place of parenthetic syntax." -- um, please do one or the other. 13:52
I skimmed the gist. this feels like something that needn't be built into the NQP compiler, but could be prototyped as a module.
cognominal I am trying to accumulate more examples to see what is needed. 13:55
masak sounds good.
cognominal masak, I am not sure I understand the QAST classes for macro and if I can use them. 13:57
masak been a while since I dug into that code, but... there's only one new QAST class, QAST::Quasi. 13:59
it's not very exceptional compared to the others.
14:00 araujo joined, araujo left, araujo joined 14:05 skids joined
cognominal masak, are you making progress about macros, btw? 14:08
masak not currently. 14:10
swamped by $dayjob, and I've decided to close up p6cc2012 before I get back to macros.
14:10 isBEKaml joined
masak I do have enlightening discussions here about macros sometimes, though. 14:11
isBEKaml masak: p6cc2012? dude, you *yllear* have to catch up! :) 14:12
cognominal p6cc2012?
timotimo perl 6 coding contest
masak isBEKaml: yeah :/ 14:13
I have two Perl 6 days coming up this coming week. intend to make good use of the. 14:19
them*
isBEKaml masak: what do you usually do on perl6 days? talks? hack days? 14:20
14:20 pdcawley joined
masak tend to prefer hacking, but it varies a lot. 14:20
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:21
masak not a big problem, no. 14:25
Rakudo has been stable enough since 2012.
timotimo i think so, too 14:26
the things that have been used back then should all still be stable until now
mostly "new" things have been turbulent
14:27 kaare_ joined
masak aye. 14:28
timotimo i'm looking forward to the next coming p6cc where supplies, channels, ... are usable :) 14:29
14:30 rurban joined
masak heh. "the next coming p6cc" will not be held by me, sad to say. 14:30
I'm having enough trouble finishing the current one.
cognominal with this async stuff, Perl 6 is no more the genius autist 14:31
masak er, I don't think that's a metaphor that ever described Perl 6 very well. 14:32
lizmat timotimo: I would think that any delayed values should still appear on the tap by the time they were scheduled 14:33
14:34 rurban left
timotimo er. 14:34
lizmat timotimo: to be. Having said that, I just realize that the done should *also* be delayed
timotimo ah, yes :)
that's what i thought of
lizmat ok :-)
we're about to be off again for a few hours 14:35
if it hasn't been done by the time I get back, I'll take care of it
14:42 census joined, cooper left 14:45 BenGoldberg joined 14:55 logie joined 14:56 anaeem1 joined 14:57 rurban joined, anaeem1 left, anaeem1_ joined 14:58 anaeem1_ left, anaeem1_ joined 14:59 vaskozl left, raiph joined 15:06 vaskozl joined
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 = ␤»
raiph m: my $foo; say $foo.perl
camelia rakudo-moar f3446b: OUTPUT«Any␤»
timotimo raiph: pairs are perfect 15:08
m: my $foo = "hi raiph"; say (:$foo).perl
camelia rakudo-moar f3446b: OUTPUT«"foo" => "hi raiph"␤»
timotimo hm. almost perfect
loses the sigil.
raiph timotimo: that's the ticket. thx!
timotimo m: my $foo = "hi raiph"; say :$foo.perl 15:09
camelia rakudo-moar f3446b: OUTPUT«"foo" => "hi raiph"␤»
timotimo m: my $foo = "hi raiph"; say (:$foo)
camelia rakudo-moar f3446b: OUTPUT«"foo" => "hi raiph"␤»
timotimo m: my $foo = "hi raiph"; say :$foo
camelia rakudo-moar f3446b: OUTPUT«␤»
lizmat r: my $foo; say $foo.VAR.name 15:10
camelia rakudo-jvm f3446b: OUTPUT«(timeout)»
..rakudo-{parrot,moar} f3446b: OUTPUT«$foo␤»
timotimo brr, rakudo-jvm b0rked again? :( 15:11
lizmat r: my @foo; say @foo.VAR.name
raiph .oO ( gets cold in here when jvm isn't working )
camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«@foo␤»
lizmat r: my %foo; say %foo.VAR.name
camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«%foo␤»
lizmat r: my &foo; say &foo.VAR.name 15:12
camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«&foo␤»
vendethiel raiph: my $foo; say :$foo; # that's what I use to debug :-)
jnthn o/ for a short moment, #perl6
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 =~ /^\#/; # … }")?
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
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;
camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«"\$thingie" => Any␤»
timotimo well, almost :D
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.
vendethiel m: my $a = 5; my $b = |$a; say $a; # wat
camelia rakudo-moar f3446b: OUTPUT«===SORRY!=== Error while compiling /tmp/SXJvHCa0BM␤Variable '&prefix:<|>' is not declared␤at /tmp/SXJvHCa0BM:1␤------> my $a = 5; my $b = ⏏|$a; say $a; # wat␤»
timotimo r: sub prefix:<::>(\thing) { "{thing.VAR.name} => {thing.perl}; my $thingie; say ::$thingie;
camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«===SORRY!=== Error while compiling /tmp/tmpfile␤Variable '$thingie' is not declared␤at /tmp/tmpfile:1␤------> g.VAR.name} => {thing.perl}; my $thingie⏏; say ::$thingie;␤ expecting any of:␤ …»
vendethiel m: my $a = 5; my $b := $a; say $b.VAR.name; # wat
camelia rakudo-moar f3446b: OUTPUT«$a␤»
timotimo r: sub prefix:<::>(\thing) { "{thing.VAR.name} => {thing.perl}" }; my $thingie; say ::$thingie;
lizmat r: sub prefix:<::>(\thing) { (thing.VAR.name.substr(1) => thing).perl }; my $thingie; say ::$thingie;
vendethiel guessed so
camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«$thingie => Any␤»
rakudo-{parrot,jvm,moar} f3446b: OUTPUT«"thingie" => Any␤»
vendethiel really thinks .VAR.name shouldn't be available :(
15:14 Rotwang joined
timotimo it's fine as long as you spell it VAR ;) 15:15
vendethiel as opposed to WAT?
timotimo :D
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
Dave Cross: I've made "Data Munging with Perl" available for free download perlhacks.com/2014/04/data-munging-perl/
masak (Dave Cross)++
sjn nice! 15:20
woolfy (maybe some day Dave can be convinced to write a Perl6-version) :-)
masak we could crowd-translate it to Perl 6 in a wiki :P 15:21
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.
dalek kudo-star-daily: abecb36 | coke++ | log/ (5 files):
today (automated commit)
kudo-star-daily: 1dc0703 | coke++ | log/ (5 files):
today (automated commit)
rl6-roast-data: 30d347e | coke++ | / (4 files):
today (automated commit)
15:22
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:23 kurahaupo left
timotimo i don't really think he'd mind as long as we provide ample attribution 15:24
masak read that as "ample attrition"
detrain & 15:25
jnthn airport * 15:26
&
.oO( travel day all around, it seems :) )
15:26 denis_boyun_ left 15:28 Mouq joined 15:31 guru joined 15:32 guru is now known as Guest4488, ajr_ left 15:33 Guest4488 is now known as ajr_ 15:36 xenoterracide left 15:41 logie left
Mouq m: say (4, "n", 0) ~~ :(Int, Str, 0) 15:48
camelia rakudo-moar f3446b: OUTPUT«True␤»
Mouq ^^ Really cool
vendethiel :o) 15:49
tuple-matching-like
Mouq Smart-match is supa cool 15:52
m: say (^10).grep: (:is-prime)
camelia rakudo-moar f3446b: OUTPUT«2 3 5 7␤»
timotimo aye.
vendethiel :o
I don't even know how that works 15:53
Mouq vendethiel: You can smart-match against pairs
timotimo if there's a pair at the RHS, it tries to function-call the key and compare to the value
in this case it's "is-prime" => True
vendethiel oh, kay
timotimo so you could also have used :!is-prime for checking non-prime numbers
or :uc<HELLO> for words that uppercase to HELLO 15:54
Mouq timotimo: Oh, it compares to the value?
timotimo: :O
timotimo i'm not sure if it smartmatches.
let me check
m: say (^10).grep: (:is-prime({ say "in the closure: $_" }))
camelia rakudo-moar f3446b: OUTPUT«2 3 5 7␤»
timotimo apparently doesn't
m: say (^10).grep: (:is-prime(False))
camelia rakudo-moar f3446b: OUTPUT«0 1 4 6 8 9␤»
Mouq m: say "$_ => ", $_ ~~ :Int(4) for 3,3.5,3.7,4,4.3,4.5
camelia rakudo-moar f3446b: OUTPUT«3 => True␤3.5 => True␤3.7 => True␤4 => True␤4.3 => True␤4.5 => True␤»
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␤»
Mouq m: say "$_ => ", ($_ ~~ :Int(4)) for 2,3,3.5,3.7,4,4.3,4.5
camelia rakudo-moar f3446b: OUTPUT«2 => True␤3 => True␤3.5 => True␤3.7 => True␤4 => True␤4.3 => True␤4.5 => True␤»
timotimo huh? 15:56
i must have been wrong?
you would have to check the specs
timotimo is watching a LW talk at the moment
Mouq thinks timotimo's way is superiour
15:56 Ben_Goldberg joined, BenGoldberg left 15:57 Ben_Goldberg is now known as BenGoldberg 16:06 xinming__ left 16:09 isBEKaml` joined 16:11 isBEKaml left 16:12 xinming_ joined 16:16 isBEKaml` left 16:18 rindolf left
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.
raiph: I'll pass your message to jnthn.
16:21 rurban left, rurban joined 16:22 sjn_ joined, rurban left, xenoterracide joined 16:26 sjn_ left 16:30 census left, rindolf joined 16:32 hoverboard joined
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:40
16:42 xenoterracide left
timotimo it doesn't seem like the TalksDump upload from "what can you do today?" is the audially-improved version of the video 16:50
t.h8.lv/Perl_6_what_can_you_do_toda...audio.webm ← for future reference; also posted in that video's comments 16:52
16:54 Rotwang left 17:00 Rotwang joined, ajr_ left 17:09 telex left 17:10 xenoterracide joined, telex joined
raiph m: sub foo (|args, $a, @b, %c) { say args }; foo(5) # according to spec this should work: perlcabal.org/syn/S06.html#Argument_list_binding 17:17
camelia rakudo-moar f3446b: OUTPUT«===SORRY!=== Error while compiling /tmp/SHaAEY_8Ed␤Cannot put required parameter $a after variadic parameters␤at /tmp/SHaAEY_8Ed:1␤------> sub foo (|args, $a⏏, @b, %c) { say args }; foo(5) # accordi␤ expect…»
raiph what, in the meantime, is a terse way to dump the capture of args to foo?
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.")?
sub foo ($a, @b, %c) { say &?ROUTINE.args }; foo(5) # is there something like this that works? 17:19
timotimo sub foo (|capt) { say capt.perl }; foo(5) 17:20
m: sub foo (|capt) { say capt.perl }; foo(5)
camelia rakudo-moar f3446b: OUTPUT«Capture.new(list => (5,))␤»
timotimo m: sub foo (|capt) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
camelia rakudo-moar f3446b: OUTPUT«Capture.new(list => (1, 8, 9,), hash => {"quak" => "duck", "foo" => "bar"})␤»
timotimo interestingly, the $a and @b seem to have flattened together there
that can't be right?
oh, it can 17:21
raiph (darn, shoulda been 3 args to foo as well as the 3 or 4 params)
timotimo i didn't put $a, @b there
m: sub foo ($a, @b, %c, |capt) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
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␤␤»
timotimo m: sub foo ($a, @b, *%c, |capt) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
camelia rakudo-moar f3446b: OUTPUT«Capture.new()␤»
timotimo m: sub foo (|capt, $a, @b, *%c) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
camelia rakudo-moar f3446b: OUTPUT«===SORRY!=== Error while compiling /tmp/vw5ZstAWTu␤Cannot put required parameter $a after variadic parameters␤at /tmp/vw5ZstAWTu:1␤------> sub foo (|capt, $a⏏, @b, *%c) { say capt.perl }; foo(1, (8,␤ expect…»
timotimo oh, huh.
i thought you could do that like that.
raiph if the capt goes at the end the args have been "consumed", when i put it at the start rakudo complains 17:22
as you see
timotimo right
raydiak | shouldn't count as variadic? or as a param at all, if it's not supposed to consume? 17:23
raiph right
so that's an issue. also, i'm guessing there's a method akin to .capture for a Routine (but it isn't ".capture")
timotimo i know you can get the current capture with an nqp op, which isn't what you want 17:24
m: sub foo (|capt ($a, @b, *%c)) { say capt.perl }; foo(1, (8, 9), foo => "bar", quak => "duck")
camelia rakudo-moar f3446b: OUTPUT«Capture.new(list => (1, 8, 9,), hash => {"foo" => "bar", "quak" => "duck"})␤»
timotimo this works
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
timotimo i'm glad i thought of it before someone exclaimed "oh, perl6 isn't ready for prime time yet after all!" 17:26
raiph .ask TimToady is timotimo's approach sufficient to mean no need for non-consuming |args? ^^ irclog.perlgeek.de/perl6/2014-04-27#i_8644698 17:27
yoleaux raiph: I'll pass your message to TimToady.
timotimo oh 17:34
i don't think it will
it probably has different semantics for multiple dispatch
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␤»
raydiak m: multi sub foo($a, @b) {say "good"}; multi sub foo($a, $b) {say "bad"}; foo("hi", [1,2,3])
camelia rakudo-moar f3446b: OUTPUT«good␤»
17:39 hoverboard is now known as moistcherry
raydiak (could have left $a out of that entirely, in retrspect) 17:42
*retrospect
timotimo well, then you wouldn't have had to use the capture at all :) 17:43
raydiak hah
17:44 beastd joined
raiph just realized the saying cap doesn't print the variable names 17:44
timotimo yeah, how would it?
Mouq m: multi sub foo(|cap ($a, @b)) {say "good"}; multi sub foo(|cap ($a, $b)) {say "bad"}; foo("hi", [1,2,3])
camelia rakudo-moar f3446b: OUTPUT«good␤»
Mouq :)
running &
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])
camelia rakudo-moar f3446b: OUTPUT«===SORRY!=== Error while compiling /tmp/HHelHGusy0␤Variable '&prefix:<|>' is not declared␤at /tmp/HHelHGusy0:1␤------> sub foo(|cap($a)) {⏏|cap.perl.say}; foo([1,2,3])␤»
raydiak m: sub foo(|cap($a)) {cap.perl.say}; foo([1,2,3]) 17:46
raiph yes, tersely, with their variable names
camelia rakudo-moar f3446b: OUTPUT«Capture.new(list => ([1, 2, 3],))␤»
timotimo how about putting something like say MY::.pairs.grep: .value.defined
r: sub tester($a, $b, *%foo) { say MY::.pairs.grep: .value.defined }; tester(1, 99, foo => "bar", quak => "duck")
camelia rakudo-{parrot,jvm,moar} f3446b: OUTPUT«␤»
timotimo oh
m: sub tester($a, $b, *%foo) { say ::.pairs.grep: .value.defined }; tester(1, 99, foo => "bar", quak => "duck")
camelia rakudo-moar f3446b: OUTPUT«␤»
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␤»
timotimo i wonder why those are mu at that point.
anyway, gotta run
(but probably not like mouq is)
raiph thanks
:)
17:55 guru joined, guru is now known as ajr_, zakharyas left 17:57 kurahaupo joined
timotimo well, in any case you can still be wrappin' 18:10
in that case you're "in front" of the multi dispatch 18:11
because you're wrapping the proto rather than any of the candidates
18:11 darutoko left, kaare_ left
timotimo hm. 18:12
but that won't give you the local variable names
FROGGS arnsholt: ping 18:14
arnsholt: nvm
:o)
18:19 Rotwang left 18:22 xenoterracide left
timotimo you're doing that a lot today aren't you? 18:22
FROGGS do I 18:23
?
timotimo well
twice already
18:24 denis_boyun_ joined
FROGGS ahh, yes 18:24
but on another channel, you see :o)
18:25 kaare_ joined
timotimo right 18:31
18:38 denis_boyun_ left 18:39 denis_boyun_ joined
FROGGS arnsholt / jnthn: NativeCall x86 problem as a ticket: github.com/jnthn/zavolaj/issues/37 18:40
lizmat jnthn should be online again in about 2 hours 18:42
timotimo oh, hm 18:43
bbl
FROGGS thanks lizmat
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:44
FROGGS I dunno, I only used the 'returns int' version so far 18:45
18:49 kurahaupo_mobile joined, kurahaupo left
japhb Are the constraints at the top of 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:53
FROGGS try it :/ 18:54
dalek ast: c03a941 | (Elizabeth Mattijsen)++ | S17-concurrency/supply.t:
Simplify some tests
18:58
ast: 92d9eb8 | (Elizabeth Mattijsen)++ | S17-c (2 files):
Move Channel tests to their own directory
ast: 64450c5 | (Elizabeth Mattijsen)++ | S17- (2 files):
Move Scheduler tests to their own directory
ast: e4b0481 | (Elizabeth Mattijsen)++ | S17-c (2 files):
Winner is a Channel test
lizmat hmm... seems I got Dalek kicked :-( 18:59
18:59 vaskozl left
dalek kudo/nom: b17348a | (Elizabeth Mattijsen)++ | t/spectest.data:
Adapt S17 tests to reorganized structure
19:00
19:06 anaeem1_ left 19:07 kurahaupo_mobile is now known as kurahaupo, pmurias joined 19:08 zakharyas joined 19:25 zakharyas left
dalek ast: d7062e4 | (Elizabeth Mattijsen)++ | packages/Test/Tap.pm:
Add library with "tap_ok" logic
19:29
ast: 9ba2bae | (Elizabeth Mattijsen)++ | S17-supply/basic.t:
Use tap_ok from the Test::Tap module
19:33 molaf_ joined, molaf_ left
moritz lizmat++ 19:35
19:36 molaf left 19:39 rurban joined 19:42 rurban1 joined 19:44 rurban left
vendethiel m: say (1.0/3.0).fmt("%.1000f") 19:49
camelia rakudo-moar b17348: OUTPUT«0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…»
FROGGS p: say (1.0/3.0).fmt("%.1000f") 19:50
camelia rakudo-parrot b17348: OUTPUT«0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…»
FROGGS nqp::sprintf's fault probably 19:51
masak :/
BenGoldberg p6: (1.0/3.0).fmt("%.1000f").say
camelia rakudo-moar b17348: OUTPUT«0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…»
..rakudo-jvm b17348: OUTPUT«(timeout)»
..rakudo-parrot b17348: OUTPUT«0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000…»
..niecza v24-109-g48a8de3: OUTPUT«F1000␤» 19:52
BenGoldberg F1000?
FROGGS O.o
masak niecza wins the dadaist prize.
BenGoldberg p6: (1.0/3.0).fmt("%.10f").say
camelia rakudo-{parrot,jvm,moar} b17348, niecza v24-109-g48a8de3: OUTPUT«0.3333333333␤»
BenGoldberg p6: (1.0/3.0).fmt("%.100f").say 19:53
camelia rakudo-jvm b17348: OUTPUT«0.00000000000000000000000000000000000000000000000000000000000000000000000000000003.3333333333333327E99␤»
..niecza v24-109-g48a8de3: OUTPUT«F100␤»
..rakudo-parrot b17348: OUTPUT«0.0000000000000000000000000000000000000000000000000000000000000000000000000000000003.3333333333333e+99␤»
..rakudo-moar b17348: OUTPUT«0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000-1e+100␤»
FROGGS ahh
vendethiel did I break everything
FROGGS F100 *g*
BenGoldberg p6: (1.0/3.0).fmt("%.50f").say
19:53 rindolf left
camelia rakudo-moar b17348: OUTPUT«0.00000000000000000000000000000000000000000000-1e+50␤» 19:53
..rakudo-jvm b17348: OUTPUT«0.0000000000000000000000000000003.333333333333332E49␤»
..niecza v24-109-g48a8de3: OUTPUT«0.33333333333333300000000000000000000000000000000000␤»
..rakudo-parrot b17348: OUTPUT«0.00000000000000000000000000000003.3333333333333e+49␤»
BenGoldberg Well, that's certainly wrong.
p6: (1/3).fmt("%.50f").say 19:54
camelia rakudo-moar b17348: OUTPUT«0.00000000000000000000000000000000000000000000-1e+50␤»
..rakudo-jvm b17348: OUTPUT«0.0000000000000000000000000000003.333333333333332E49␤»
..niecza v24-109-g48a8de3: OUTPUT«0.33333333333333300000000000000000000000000000000000␤»
..rakudo-parrot b17348: OUTPUT«0.00000000000000000000000000000003.3333333333333e+49␤»
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 ;)
FROGGS yeah :o)
vendethiel fair enough =)
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
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"
FROGGS hehe
BenGoldberg wonders where one can order food by fax, nowadays. 19:58
FROGGS I have such a device in theory
but I am unable to connect it to the outer world
BenGoldberg A theoretical fax machine?
FROGGS vendethiel: here is the code btw: github.com/perl6/nqp/blob/master/s...printf.nqp 19:59
vendethiel FROGGS: I never pretended I could fix it :o)
FROGGS BenGoldberg: no, hardware... a printer/scanner/fax thingy
vendethiel: damn, and I wanted to trick you in hacking at it *g*
20:01 vaskozl joined
vendethiel FROGGS: method directive:sym<f>($/) { ? 20:02
well, I can't build it because I'm on windows anyway ...
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...
vendethiel: but yes, sym<f> is the place to start digging into
vendethiel actually,no 20:04
dalek ast: 249670a | (David Warring [email@hidden.address] | integration/advent2012-day1 (2 files):
adding advent 2012 days 16 and 19
20:05
vendethiel FROGGS: I have both, can't get rakudo or anything to build
FROGGS :/ 20:06
I have no problems building it on windows...
vendethiel my `make` started segfaulting randomly, no idea why
FROGGS make or nmake? 20:07
vendethiel gnumake
FROGGS ohh, I always used nmake
vendethiel will look for nmake
FROGGS vc express
then you'd use the vc developer console and configure and perl rakudo 20:08
vendethiel vc ? 20:09
you mean vs ? i have vs ultimate, so I'd expect it to be here :|
but I'll look for the console thingie
masak wow, github.com/perl6/nqp/blob/master/s...printf.nqp has certainly come along since last I looked at it. 20:11
colomon++ FROGGS++ lizmat++ jnthn++
colomon shudders to think of the bugs colomon left in there...
masak "I know what you did last summer" :P 20:12
FROGGS yeah :/
masak nevertheless, colomon++ FROGGS++ especially.
20:12 vaskozl left 20:13 BenGoldberg left
colomon hopes to wrangle more time to work on p6 in the near future... 20:14
masak++ # getting it started
20:14 effbiai left, effbiai joined 20:15 vaskozl joined 20:16 jnap joined
masak :) 20:20
dalek ast: 632782d | (Elizabeth Mattijsen)++ | S17-supply/ (2 files):
Move Supply.for tests to separate file
20:26
roast: 1c1df5a | (Elizabeth Mattijsen)++ | S17-supply/ (2 files):
roast: Move Supply.do tests to separate file
20:26 dalek left, dalek joined, ChanServ sets mode: +v dalek
dalek kudo/nom: f550cfb | (Elizabeth Mattijsen)++ | t/spectest.data:
Test all of the S17-supply separate test files
20:27
20:32 anaeem1 joined
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
m: say ([16,15],[5,6]).fmt("%d elephants doing %d tricks!")
camelia rakudo-moar b17348: OUTPUT«No such method 'item' for invocant of type 'NQPMu'␤ in method message at src/gen/m-CORE.setting:12383␤␤»
Mouq m: say ([16,15]).fmt("%d elephants doing %d tricks!")
camelia rakudo-moar b17348: OUTPUT«No such method 'item' for invocant of type 'NQPMu'␤ in method message at src/gen/m-CORE.setting:12383␤␤»
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␤␤»
lue r: say ([16,15],[5,6])».fmt("%d elephants doing %d tricks!")
camelia rakudo-parrot b17348: OUTPUT«Nominal type check failed for parameter '$x'; expected Any but got NQPMu instead␤␤»
..rakudo-jvm b17348: OUTPUT«Nominal type check failed for parameter '$x'␤␤»
..rakudo-moar b17348: OUTPUT«No such method 'item' for invocant of type 'NQPMu'␤ in method message at src/gen/m-CORE.setting:12383␤␤»
Mouq All List.fmt is doing is self.map(*.fmt(…)).join(…) 20:39
20:39 cooper joined
Mouq It doesn't pay attention to the arity of the format 20:39
dalek kudo/nom: 54598a2 | (Elizabeth Mattijsen)++ | t/spectest.data:
Add 2012/day(16|19) tests
Mouq Though we should probably have better error messages for 'less arguments than directives' 20:40
20:40 bystandereffect joined 20:43 kaare_ left
dalek kudo/nom: 0f8501f | (Elizabeth Mattijsen)++ | src/core/Supply.pm:
Make sure .Supply on a Supply is a noop
20:44
ast: 12d5f17 | (Elizabeth Mattijsen)++ | S17-supply/for.t:
Test that .Supply on a Supply is a noop
20:45
p/loop_labels: 6d8fc83 | (Tobias Leich)++ | src/vm/moar/QAST/QASTOperationsMAST.nqp:
add nqp constant CONTROL_LABELED
20:47
kudo/nom: c154152 | (Elizabeth Mattijsen)++ | src/core/SupplyOperations.pm:
Supply.delay: done/quit are also delayed

Thanks to timotimo++ for reminding me
20:51
20:55 ajr_ left
timotimo errrrr wtf 20:55
m: my %test; %test.push: bar => "hi"; say %test 20:56
camelia rakudo-moar b17348: OUTPUT«().hash␤»
timotimo what?
... oooh
silly me. again.
Mouq m: my %test; %test.push: (bar => "hi"); say %test
camelia rakudo-moar b17348: OUTPUT«("bar" => "hi").hash␤»
lue timotimo: named parameters are slurped up, what could possibly make you think that would work? :)
dalek ast: 0381e1d | (Elizabeth Mattijsen)++ | / (5 files):
Make tap_ok "after_tap" parameter more Perl6ish
20:57 denis_boyun_ left
masak it's easy to accidentally think that would work. 20:58
it's kind of a corner case.
and because of "interface consistency", there are no warnings/errors to alert you to what's wrong... 20:59
vendethiel isn't quite sure
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
vendethiel (what's happening ?)
lue doesn't think people specify named params with => too often
lizmat people coming from Perl 5 would
jnthn evneing, #perl6
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. :)
lizmat and the current behaviour is a WTF? 21:01
vendethiel lizmat: mind explaining ? 21:02
lizmat Perl 6's behaviour of eating unused named parameters
vendethiel m: my %test; say (%test.push: bar => "hi").perl; say %test
camelia rakudo-moar b17348: OUTPUT«().hash␤().hash␤»
lizmat because that is what happens here
21:03 denis_boyun_ joined
timotimo lue: what got me confused was that 5 => "foo" worked but blah => "boo" didn't 21:03
vendethiel lizmat: uhm?
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;
camelia rakudo-moar b17348: OUTPUT«().hash␤»
FROGGS vendethiel: unused named params get silently ignored in method calls (only in method calls, not sub calls)
Mouq n: my %test; %test.push: bar => "hi"; say %test
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) ␤…»
vendethiel lue: I agree with that =)
lizmat r: class Foo {}; Foo.new( :eat<this> )
camelia ( no output )
vendethiel p6: class Foo {}; Foo.new( :eat<this> )
camelia ( no output )
21:05 labster joined
vendethiel niecza agrees on that one, though 21:05
lizmat p6: class Foo {}; say Foo.new( :eat<this> )
camelia rakudo-{parrot,jvm,moar} b17348: OUTPUT«Foo.new()␤»
..niecza v24-109-g48a8de3: OUTPUT«Foo.new(...)␤»
lue lizmat, FROGGS: do any of you know why there's an implict *%thing at all? I can't fathom a need for it.
jnthn See the S12 section titled Interface Consistency
lizmat S12:2270 21:06
synopsebot Link: perlcabal.org/syn/S12.html#line_2270
lue Ah. :/ 21:07
21:08 btyler joined
lue
.oO(Perl 7 will probably disambiguate flags (binary adverbs), named params, and Pairs, because this seems to cause problems.)
21:08
21:10 vaskozl left, vaskozl joined
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:11
21:13 anaeem1 left, moistcherry left 21:14 denis_boyun_ left
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
jnthn 'night, lizmat
lue lizmat o/ 21:16
woolfy is responsible for kicking lizmat :-)
FROGGS gnight lizmat and woolfy :o)
woolfy \o/
jnthn o/ woolfy
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 :)
masak 'night, lizmat and woolfy. 21:17
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:24
(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:28
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:45 bystandereffect is now known as register 21:46 register is now known as baryonicandproud 21:50 baryonicandproud left
masak 'night, #perl6 21:51
timotimo iterating over a list while simultaneously removing and adding pieces from it is ... meh :\ 21:52
gnite masak
redo won't pull the appropriate element from the list if you just removed one
jnthn timotimo: That's probably always bad program design.
timotimo should i be using a linked list? ;)
jnthn Perhaps. Or a differnet algorithm.
timotimo my problem is that i have a set of intervals and sometimes i want to split or remove intervals
21:53 beastd left
timotimo splitting i could implement by appending the added interval to the end of the list 21:53
but removing one ... i *could* grab the very last element of the list and put it in place of the current one
jnthn @list .= grep(* !=== $thing-to-remove);
But yeah, a linked list may be more suitable. 21:54
timotimo doing that often sounds prohibitively expensive given rakudo's current performance characteristics ;)
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)
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 :)
jnthn raydiak: It'd maybe be simpler to just build the new list, no? :) 21:56
raydiak: Generally, though, if you're using an iterator over something *and* mutating it, then it'll be hard to understnad the behavior.
raydiak: It's the kind of thing that will have me reaching for the docs in pretty much any language I work in. :) 21:57
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
21:58 rurban1 left
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:58
jnthn raydiak: Well, in the case of array iterators, the common approach is just an incrementing index. 21:59
22:00 kurahaupo left
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
And it doesn't tend to convey intent too well.
timotimo jnthn: in case of a naughty user i'll have 80 entries in that list 22:02
i may want to reconstruct that list ~4x per second each time removing or adding a single piece
... actually
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
raydiak jnthn: thanks for explaining, I'm absorbing and processing :)
timotimo i'm afraid we might not be able to :\
hmm. actually. the rendering approach i'm using uses strings with ansi escape codes and unicode stuff 22:04
*maybe* i can get around the problematic string implementation and performance characteristics of moarvm by using bufs instead?
do we have something like join for bufs?
hm. i could probably just print the bufs one after the other
jnthn timotimo: On my box I can do it 100 times in half a second, and half of that is startup time... 22:06
timotimo: arrgh, the strings...
I really, really need to deal with those soon. :/
jnthn puts it on this month's "performance improvements todo" list.
With all the async stuff I probably already did enough features for 2014.05 :P
and lizmat++ is cooking on gas with other stuff there anayways :) 22:07
So I can do some performance work with my next tuits. :)
Probably on Thursday :)
Anyways, teaching a big group of folks hard stuffs tomorrow, so guess I should rest well for it. :) 22:08
'night, #perl6
raydiak \o jnthn
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:09
it now takes almost exactly 1s to render the background image 22:16
Mouq timotimo: What are you rendering? 22:20
timotimo a background for my nibbles game 22:25
tadzik oh :) 22:26
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:28
22:29 hoverboard joined
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:31
maybe we could put a "how to hash" method into the repr 22:34
22:37 btyler left
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:37
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:38
22:40 rurban joined 22:44 rurban left, yoleaux left
timotimo since the hash function is hardly cryptographically strong, finding collisions is kind of easy anyway if you just look at the code 22:58
22:59 spider-mario left 23:02 jnap left 23:03 yoleaux joined, ChanServ sets mode: +v yoleaux 23:09 kurahaupo joined 23:11 jnap joined 23:15 pmurias left 23:27 raiph left 23:30 lue left 23:36 lue joined
timotimo i'd like to has supplies for generic file opening 23:46
especially for getting single bytes from /dev/stdin if, say, i'm building a console game :)
23:52 dmol left