»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
diakopter masak: yer base-test script doesn't work on windows 00:25
there's no /dev/null
diakopter er. typed yer without thinking. 00:36
diakopter unhelpful rakudo error: Can not bind attribute '$!signature' declared in class 'Code' with this object 00:47
no reference to where in the source might have this problem 00:48
oh lol. 00:51
I declared a class named Block. no warning on that. just the above error.
see, I have learned there is a Block class many times.
but I forget.
lue phenny: ask masak what is t4 supposed to output, exactly? (The number of pools?) 01:01
phenny lue: I'll pass that on when masak is around.
sorear lue: Total water collected in cubic meters. 01:02
lue Ah. Didn't see that in t4 (was skimming for the word "output", and didn't see the first line either) 01:03
sorear the main one I'm worried about is t2 01:04
popl :O 02:13
sorear popl: your first netsplit?
popl sorear: No. I think it may have been a DDoS. 02:14
*result of
According to what I've gleaned in #freenode, anyways. 02:15
Either that or somebody tripped over a power cord.
timotimo oooh, "$c div= 2". it's neat how you can even use word-based operators like that! 02:19
sorear There's no difference between word-based operators and symbol operators in perl 6 02:21
sorear They're both just strings of characters 02:21
popl sorear: I was incorrect. tomaw just advised me it was an EU/US split.
timotimo while $d %% 2 {(PrimeCandidate $n, Int $k) - was that a paste mistake?
seems like it was accidentally pasted from the function signature 02:22
soy_dominicana hola 02:22
sorear Hola
timotimo hola señor
soy_dominicana de 25 30
diakopter heh 02:23
sorear que? 02:23
timotimo mi na compreñde
soy_dominicana chico de 25 a 30
sorear timotimo: portugués? 02:24
diakopter [looking for?] a boy between 25 and 30
popl wat
timotimo da, sorear
huf that's amazing
soy_dominicana yees
popl soy_dominicana: no
soy_dominicana si 02:25
popl soy_dominicana: nambla.net
soy_dominicana k
sorear This is a programming language channel, not a dating channel
popl sorear++
diakopter You can date Perl 6 if you like. 02:26
timotimo what kind of dates do you take perl6 out to (or does perl6 take you out to)?
diakopter very long ones
popl Camilla?
sorear huf: what's amazing? I live smack on the US/Mexico border, I can understand Spanish quite well
huf sorear: not that
sorear can hardly speak/write it though 02:27
soy_dominicana juju
huf the fact that someone decides to look for boys between 25 and 30 *here*
i just find the fact that such people exist amazing
diakopter boys who want to chat with boys?
timotimo people between 25 and 30? surprises me, too
huf no no
sorear huf: do you remember the chatmosphere era?
popl Camelia 02:28
sorry
huf i dont remember anything by that name
sorear huf: statistically, a large fraction of programmers are young males
huf but i remember dark days on java applet chats
popl huf: It puts the lotion in the basket.
soy_dominicana que s nambla 02:29
sorear rich white young males specifically
popl soy_dominicana: It was a joke. You are in the wrong channel.
sorear soy_dominicana: es.wikipedia.org/wiki/North_Americ...ssociation 02:30
soy_dominicana y para k ees esa pajina
popl Parakeets are cool. 02:31
sorear interesting. it's pagina down here.
popl Is he speaking Spanish or Portuguese?
diakopter soy_dominicana: Você está no canal errado. Usted se encuentra en el canal erróneo 02:31
sorear popl: Spanish I think
soy_dominicana spanish 02:32
popl soy_dominicana: gracias
diakopter aha! 02:32
popl chatmosphere
huf what is that?
diakopter a world of fun 02:33
popl huf: It's like adult friend finder
huf aha
sorear huf: a chat client that automatically recommends #perl6 to people looking for dates
huf on IRC?!
aight
sorear interesting, their IP resolves to Texas 02:34
that explains the heavy english influence 02:35
popl Probably somewhere near El Paso or the panhandle.
diakopter it's a phone app I thought
popl diakopter: 18:32 -!- soy_dominicana [cfujhg@69.41.182.140] has quit [Quit: Chatmosphere for Blackberry]
sorear popl: Dallas, insofar as geoip data can be trusted
diakopter a person/device's gateway doesn't necessarily have anything to do with where it is 02:36
even if the geoip is correct
sorear freenode has rules that public gateways have to publish the IP in the irc name fields 02:37
diakopter I wasn't talking about only public gateways 02:38
timotimo also, the advent calendar post about prime numbers should get a "Day 14 - " in front for consistency i think 02:39
popl prime number post should be on day 17 02:40
:)
timotimo of course :)
diakopter japhb: did I ask for method form of push vs. sub form of push 04:53
japhb checks ... 05:00
You did not.
japhb adds it 05:01
Still missing dalek, eh? 05:04
Pity ...
Add colomon++'s bag/set and 'is cached' test ideas to the TODO list as well 05:16
s/Add/I added/
eternaleye masak: If I had time, I would *so* do the p6cc. 06:01
For one thing, knights/knaves immediately made me think "Huh, the list metaops would probably be a neat way to do Gaussian elimination..." 06:02
sorear eternaleye: Would you stop giving my competitors ideas? :P 06:08
(also, I already have a better way) 06:09
eternaleye sorear: I have become overly tempted and ame joining.
*am
sorear: Which is bad because I ought to do other things, but... 06:10
p6 is so *nice*
sorear ok, if you're joinign then I won't tell you my idea.
:D
eternaleye sorear: np. I look forward to seeing it in the final!
Now to gow download Star... 06:11
It's been over a year since I last had time to use p6.
I also find myself tempted to try and update the Periodic Table of Operators to handle the Set/Bag operators that got spotlighted in the advent calendar, but I do regrettably need sleep at times 06:14
lue sees how p6cc checks for error strings and is reminded of why there are exception types in P6. 06:49
felher PerlJam++ # Prime blog post :0 08:58
timotimo PerlJam: either i don't understand the code properly or you've made a copy-paste mistake: while $d %% 2 {(PrimeCandidate $n, Int $k) <- i don't think that signature belongs there? 09:06
GlitchMr glitchmr@strawberry ~/g/p/t2> perl6 base-test 09:24
===SORRY!===
Could not find strict in any of: lib, /home/glitchmr/.perl6/lib, /home/glitchmr/rakudo/lib/parrot/4.7.0-devel/languages/perl6/lib
Interesting. I cannot run tests.
sorear GlitchMr: base-test is a perl 5 script 09:36
hence the #! /usr/bin/env perl at the top
eternaleye masak: I think there's a typo in base-test for t1: "Lines must be on the form '<name>: <utterance>" -> "of the form" 09:58
GlitchMr I like haikus my code generates 09:59
GlitchMr glitchmr@strawberry ~/g/p/t2> perl6 code 10:10
today thing perl six
positional radix map
variable constraints
masak good morning, #perl6. 10:15
phenny masak: 01:01Z <lue> ask masak what is t4 supposed to output, exactly? (The number of pools?)
masak lue: the volume, in cubic lengths, of collected water. 10:16
GlitchMr hi, masak
masak GlitchMr: nice haiku ;)
GlitchMr I actually decided to implement "If the words make sense in some kind of sentence structure, that's considered a big bonus. Humor and/or deeper meanings are even bonuser." part. 10:17
masak eternaleye: I think you may be technically correct about the typo. unfortunately, I prefer to keep the base-test files completely static for the duration of the contest, so the typo stays. :/ 10:18
I am considering adding to notes.md a clause allowing people to have apostrophes in their haikus. what do all y'all think? 10:19
masak backslogs
backlogs* :)
GlitchMr Now other challenges could be more difficult 10:21
But they sound possible
github.com/masak/p6cc2012/blob/mas...ription.md 10:22
But if I think about it... it's easy
masak smiles at soy_dominicana in the backlog 10:24
GlitchMr: in that case, I advise you to think about it ;)
masak loves how p6cc drags people into (or sometimes back into) Perl 6 10:25
that's the point of it, of course. doing non-trivial things for fun, making you have to learn the language. 10:26
jnthn hola chicos! 10:30
:P
timotimo * masak smiles at soy_dominicana in the backlog - * masak loves how p6cc drags people into (or sometimes back into) Perl 6 <- so, soy_dominicana was dragged here by p6cc? :D
sorear I'll probably fail it by virtue of not making a satisfactory t2
FROGGS_ masak: we had a SDL (a perl 5 module for games) game contest in march 2011, you had to make a game per week, it was pretty awesome 10:32
it is amazing what you can do within a few hours on sunday afternoon
GlitchMr t2 was easiest task in this to me. 10:33
I did it using brute force, but as long it's fast enough...
jnthn Does anyone know what happened to dalek?
sorear feather kernel panicked and rebooted 10:34
jnthn sorear: Any idea what or who needs poking? 10:37
jnthn does have a feather account but it doesn't seem to be getting him anywhere... :)
FROGGS_ jnthn: on the github service hook page, can't you see the address it is pointing to?
jnthn FROGGS_: oh, good point
FROGGS_ maybe you see his/her homedir 10:38
jnthn feather3.perl6.nl:5000/dalek?t=freenode,perl6
ah, and I didn't connect to feather3...
uh, and don't have an account there 10:39
Guess having feather.perl.nl account wouldn't imply that... :)
*perl6.nl
ah well, I tried...
masak timotimo: your powers of deduction leave something to be desired... :P 10:40
GlitchMr std: $_ = "a"; say; 10:42
p6eval std a8bc48f: OUTPUT«===SORRY!===␤Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /tmp/Nr_2ryCf9n line 1:␤------> $_ = "a"; say⏏;␤Check failed␤FAILED 00:00 43m␤»
GlitchMr What if I just want to print newline?
FROGGS_ std: $_ = "a"; .say; 10:43
p6eval std a8bc48f: OUTPUT«ok 00:00 43m␤»
FROGGS_ right?
r: ''.say
p6eval rakudo fc9c3b: OUTPUT«␤»
FROGGS_ brb 10:44
masak yay, www.reddit.com/r/programming/commen...g_contest/ is gaining some traction. 10:47
timotimo masak: i'm wondering, how's your last name pronounced? 10:49
is the ä like what i'm used to in german?
masak yes, it is.
this is an Estonian ä, but by a stroke of luck it has the same pronunciation.
timotimo i see, thanks :) 10:52
oh, and is the s like in the english word "mess" or more like "mass"?
wait, that's the same
masak :P 10:53
timotimo never mind :|
jnthn phenny: tell moritz I took the liberty of merging latest nom into qast-sink-1. The tests look good here.
phenny jnthn: I'll pass that on when moritz is around.
masak the ä is long and carries the stress.
but I'm perfectly fine with people calling me "masak" in the Internet.
timotimo ah, i was thinking of words like "razor"
masak in fact, I identify more with my handle than with my last name when I'm around Perl people. 10:54
timotimo ah. very well, then :)
GlitchMr 'Readability matters in a Perl programming contest..? So, this is one of those "no-win scenarios" that Kirk was talking about...'
hahaha
Why people think that Perl is unreadable?
masak no, the "s" isn't voiced like a "z".
jnthn I love "release it" guy too. "Yes, we're setting a code contest...but you'll just have to dry run everything" :) 10:55
masak GlitchMr: because they've seen a lot of hastily written Perl, I think.
GlitchMr: and maybe there's a meme or two going around saying that Perl looks like modem line noise.
timotimo well, to be honest, perl 5 with its lack of function signatures would lead to a bit of confusion, don't you say?
masak I've seen beautifully written Perl 5 without function signatures. 10:56
GlitchMr Perl is actually one most consistent languages I've seen.
masak actually, the first beautiful Perl 5 I remember seeing is "Higher Order Perl".
timotimo GlitchMr: stop comparing every language to PHP! :( 10:57
GlitchMr one of*
timotimo: I don't even mean PHP.
In this case, I mean Ruby, Python 2 or C++.
Especially Ruby 10:58
When PHP has at most 1 alias for function, Ruby has LOTS of aliases.
masak this year, I'm getting signup requests through email, IRC, and Twitter. I'm accepting all of them, as long as I have an email address to the participant. 10:59
GlitchMr Somebody could claim it's TIMTOWTDI, but why method would need 3 aliases?
masak GlitchMr: so "consistent" means "non-redundant" to you? in that case, Perl 6 fails in some regards.
GlitchMr Yeah, I think it's less consistent than Perl 5. 11:00
masak gives the .ords method the evil eye
GlitchMr I don't even mean ords.
I mainly mean lots of array and hash types 11:01
I'm confused about this.
Perl 5 only had arrays and references to those.
Also, .elems method. 11:02
jnthn masak: The ROADMAP still has:
2 *** quasiquote splicing
masak: Do you consider that done by now?
masak 11 signups so far. not bad for the first 14 hours.
jnthn: yes.
GlitchMr: much of the duplication in the container types seems to stem from Perl 6 not having a clear idea of how to handle mutability. so every combination of mutable/immutable gets a new type. 11:04
GlitchMr For example, in Ruby - how can you check whatever hash has a key. Well... hash.has_key?('key'), hash.include?('key'), hash.key?('key'), hash.member?('key')
masak Su-Shee_! \o/ 11:05
timotimo the more i think about the cube world rain thingie, the harder it seems to be 11:06
since it says air can escape between cubes, caves would fill up even around bends up to the point where water escapes ...
sorear the cube world rain thing is not impossible. 11:07
I think it's in FP, but I'm not certain yet
definitely in EXPSPACE
timotimo also, if there's one little cube sized hole through which water escapes as a waterfall into nothing and there's a huge funnel above it, would it fill up completely if the funnel is big enough? 11:08
jnthn masak: Removed it.
masak jnthn++
jnthn masak+= for making it work
uh, ++
masak timotimo: no. think of the equilibrium happening sufficiently long after the rain stopped. 11:10
sorear timotimo: I read the problem spec as an analysis in the limiting case of infinitely slow rain
I'm sure masak++ already has a solution 11:11
or maybe hakank
masak :)
timotimo ok
masak in either case, think of the speed of the rain and/or drainage as being irrelevant to the problem.
sorear the main case which I'm fighting with now is ... do Swedish bathroom sinks have P-traps below them? 11:13
sorear en.wikipedia.org/wiki/File:Vattenlaas.png 11:14
masak of course. we're not barbarians.
heh, that image even has a Swedish file name :P
sorear masak: we american barbarians use water-based waste management. haven't you replaced your sewers with in-toilet "mr.fusion"-type disposal systems yet? 11:15
s/you/you Swedes/
masak no, we're officially against fusion, except when it comes to actually using fusion to power our homes. 11:17
sorear wonders what that was a reference to
masak there was a referendum.
the result of which was, "yeah, let's power down our nuclear plants and not build new ones". 11:18
that was several decades ago. the power plants are still up and running.
jnthn :/
sorear en.wikipedia.org/wiki/Swedish_nucl...ndum,_1980
masak it's very hard to do nuclear power research in Sweden, because of laws which prevent you from actually building new power plants.
the "three lines" thing was a PR disaster in some ways. people say afterwards that it elicited Swedish people's desire to always pick the choice in the middle. 11:19
sorear masak: have you heard of the global Pu-238 shortage?
masak no, I have not. 11:20
moritz is there one?
phenny moritz: 10:53Z <jnthn> tell moritz I took the liberty of merging latest nom into qast-sink-1. The tests look good here.
masak I have heard James Bond's "strictly plutonic" pun, though.
moritz jnthn: thanks
jnthn Such laws mostly serve to keep old plants running when we really could replace them with much better designs.
er, much better designed ones
masak yes, as I understand it, fusion power has taken leaps and bounds in recent decades.
moritz jnthn: are you aware that it's your turn to post a p6advent post today?
jnthn moritz: Yes; was gonna write it last night but was struggling to be particularly coherent. 11:21
masak oh, and I should write one for tomorrow.
sorear moritz: unless somebody gets a reprocessing plant on line, there will be no more space-rated RTGs and no more outer solar system missions after 2022 or so
masak :(
sorear moritz: there are about 16.8 kg of the necessary isotope left in the world (as of 2009)
masak wow.
jnthn moritz: Just been doing a few little tasks while I wake up propertly today. About to start on it now :)
moritz jnthn: 's ok, no hurry. Just wanted to be sure you didn't forget 11:22
jnthn :)
masak ooh, I'm writing about operator precedence tomorrow! \o/
masak PerlJam++ # is-prime advent post 11:25
GlitchMr My t3 can solve simplest case of 0123456789... this is progress :-)
moritz can haz primitive t2 solution 11:26
sorear I would love a 25 kg fusion reactor that produces 140W of electricity for 30+ years without requiring sunlight
GlitchMr The only t I've solved yet is t2. 11:27
It's actually simple.
sorear though I wouldn't object too much to a 1000kg reactor I could use on my Uranus-orbiting space station
sorear goes and looks up the latest news on ITER 11:28
masak I expect to get t2 solutions that produce haikus that make me bend over double laughing. I guess you could say my expectations are high. :)
GlitchMr My t2 solution is 23 lines. 11:29
13 actual lines.
The most interesting part is actual "dictionary" I'm using. 11:31
masak hola, smiler. 11:39
nice to see your happy face here on #perl6. 11:40
rn: say "\x263a"
p6eval rakudo 8d4704, niecza v24-12-g8e50362: OUTPUT«☺␤»
masak p6cc contestants: I updated github.com/masak/p6cc2012/blob/master/notes.md with two corrections. 11:44
tl;dr: the "on the form" phrasing stands. apostrophes are OK in haikus.
GlitchMr gist.github.com/4294244 12:07
The fun begins :-).
moritz X 12:09
masak ronja?
GlitchMr Now to support more complex cases, like 1234567890 12:10
moritz masak: no, there were lots of Xs in the gist :-)
GlitchMr gist.github.com/4294274 12:11
I'm sure it's wrong
moritz t3 is more interesting than it seemed at first
GlitchMr I made lambda by accident 12:12
grondilu should I publish a rosalind solution even if it's not realy Perl6 relevant? I mean, like if the solution is jut $a + $b**2 for instance? 12:13
I mean, I like to show off but I feel a bit bad if I spoil. 12:14
ahh my tendency to show off wins: 12:16
masak ESTILLNODALEK 12:18
grondilu (?) dalek did not show my update on perl6-examples
masak dalek did not show anything lately. 12:19
grondilu ok
well, here is what I was talking about: github.com/perl6/perl6-examples/bl...rondilu.pl
tadzik hooray 12:20
jnthn \o/
(whoever did that)++ :)
grondilu maybe I should add a spoiler warning or something 12:21
moritz just remembered that sorear++ wrote misc/dalek-start.txt in the mu repo, and I could just try it :-)
GlitchMr gist.github.com/4294394 12:27
masak walk &
GlitchMr I know, it's just wrong
dalek pan style="color: #395be5">perl6-examples: 2acf3e2 | (L. Grondin)++ | rosalind/README:
adding spoiler warning
12:28
hoelzro good afternoon, #perl6 12:40
FROGGS_ hi hoelzro 12:41
hoelzro so when I've finished with this advent calendar entry, how do I post it? 12:42
FROGGS_ you need editor privs 12:43
masak, moritz and jnthn can give you
moritz hoelzro: I need either a wordpress.com username or an email address from you 12:45
hoelzro moritz: [email@hidden.address] 12:46
I'm guessing that people will be around today and tomorrow to review my writings? ;)
moritz I'm guessing so too 12:48
hoelzro: invitation sent
GlitchMr I know, it's just wrong 12:51
...
oops
Wrong tab
hoelzro moritz: thanks 12:54
hoelzro also, is anyone writing a post on the native code FFI? 12:56
because that would be really cool
tadzik I wrote one last year
hoelzro to me, that's one of Perl 6's killer features
oh, ok
maybe a refresher couldn't hurt ;)
tadzik :) it could be updated for callbacks maybe 12:57
so, who wrote a cool binding recently?
tadzik are arrays of structs working? 13:02
implementing epoll() would be a win-win :) 13:03
moritz tadzik: yes, I think they work 13:08
FROGGS_ tadzik: who is responsible for the structure of META.info? 13:15
tadzik FROGGS_: uh, me :) 13:18
FROGGS_ k, can we (you :P) add an "auth" tag to "your spec"? even if it is just in your mind 13:19
tadzik sure we can
basically, there are never too many fields there, a module manager may just ignore them 13:20
do you have a commit access to it?
FROGGS_ depends what "it" you mean 13:21
tadzik the spec, wherever it is :P
FROGGS_ hehe
here it is, and I have commit access 13:22
github.com/perl6/ecosystem/blob/master/spec.pod
tadzik ok, feel free to add it :)
FROGGS_ ahh, author is optional there 13:23
hmmm
tadzik it also talks about doc/, which I think I nuked some time ago :P 13:24
and the Makefile
FROGGS_ ya 13:25
okay, for now I added a note in my proposal 13:28
moritz masak++ # t3 was fun 13:29
tadzik where is your proposal?
jnthn Done today's advent post :)
perl6advent.wordpress.com/2012/12/1...t-to-stun/
FROGGS_ tadzik: github.com/FROGGS/p6-S11Versioning
jnthn Hopefully it's fine :) 13:30
felher \o/ new advent post
FROGGS_ jnthn++
dalek osystem: 8d0644d | tadzik++ | spec.pod:
Update spec.pod to match the implementation

This should probably be the other way around. I know, I know.
tadzik FROGGS_: oh, good 13:31
jnthn++
speaking of advent, if anyone wants a sneak peek at coroutines post, please have it :)
moritz jnthn: couldn't you have solved the $in_prompt stuff with a contextual instead? 13:32
tadzik (gist.github.com/4280548)
moritz fwiw I found LEAVE to be very handy in a case where I always need to adjust the current working directory before leading
jnthn++ # nice post 13:33
jnthn moritz: Maybe, but every contextual I create in the debugger is one that could stomp on a contextual in the code being debugged. 13:34
moritz jnthn: ah, right
tadzik wow, lots of good stuff in there :) 13:35
felher jnthn++ # yeah, nice post :) 13:41
GlitchMr dl.dropbox.com/u/63913412/cubeworld.png 13:47
This is so confusing...
moritz what's confusing about it? 13:48
GlitchMr I'm still trying to understand description 13:50
oh..
So I'm supposed to count water that is stuck in the blocks
moritz correct
GlitchMr is run("bzzt\n"), qq[Unrecognized line: "bzzt"\n]; 14:01
Fun test!
moritz finds the obligation to do error handling rather annoying 14:03
GlitchMr I was using .eval... looks like it was incorrect 14:04
grondilu rn: say .perl given Hash.new: foo => "bar"; 14:08
p6eval niecza v24-12-g8e50362: OUTPUT«Unhandled exception: Excess arguments to Hash.new, unused named foo␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (Hash.new @ 1) ␤ at /tmp/9RjgAKtAS0 line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4218 (ANON @ 3) ␤ at /home/p6ev…
..rakudo cf2761: OUTPUT«().hash␤»
grondilu rn: say .perl given hash foo => "bar"; 14:10
p6eval rakudo cf2761: OUTPUT«("foo" => "bar").hash␤»
..niecza v24-12-g8e50362: OUTPUT«{"foo" => "bar"}.hash␤»
grondilu rn: sub f($str) { $_ = $str; return $_ if s/fiz/buz/ or s/foo/bar/ }; say f "bar foo"; 14:32
p6eval niecza v24-12-g8e50362: OUTPUT«bar bar␤»
..rakudo cf2761: OUTPUT«bar foo␤»
grondilu was expecting bar bar 14:33
GlitchMr github.com/masak/p6cc2012/blob/mas...ription.md 14:33
Somehow this reminds me t2, except they don't have to be equal.
grondilu rn: sub f($str) { $_ = $str; return $_ if False or s/foo/bar/ }; say f "foo"; 14:34
p6eval rakudo cf2761, niecza v24-12-g8e50362: OUTPUT«bar␤»
grondilu rn: sub f($str) { $_ = $str; return $_ if s/x/y/ or s/foo/bar/ }; say f "foo";
p6eval rakudo cf2761: OUTPUT«foo␤»
..niecza v24-12-g8e50362: OUTPUT«bar␤»
grondilu rn: sub f($str) { $_ = $str; return $_ if s/foo/bar/ }; say f "foo"; 14:35
p6eval rakudo cf2761, niecza v24-12-g8e50362: OUTPUT«bar␤»
cosimo what's the "canonical way" of reading input from stdin? 15:00
pmurias jnthn: how can I check if something has QAST::SpecialArg mixed in? 15:05
GlitchMr gist.github.com/4296235 15:15
I've feeling that masak likes trolling me
cosimo stackoverflow.com/questions/13893392 15:16
GlitchMr Answering your question O_o.
cosimo if you have something to add :)
I decided to do this while I work on the contest 15:17
Rotwang wut?
cosimo there's nothing wrong in answering your own questions on SO 15:18
tadzik I never understood the point though :) 15:19
GlitchMr ok, so I've t2, t4 and t5. And broken solution for t3 that passes tests but is wrong.
tadzik it seems to be answered in the same second as it was asked, which is even weirder
cosimo tadzik: it's not 15:20
GlitchMr It's "Answer your own question – share your knowledge, Q&A-style" field on "Ask question" page
cosimo and, tadzik, the point is to make sure the next person that searches for it, finds it
GlitchMr blog.stackoverflow.com/2011/07/its-...questions/
Rotwang it is a bit like masturbation 15:21
cosimo wtf?
tadzik I see
jnthn pmurias: nqp::istype($thingy, QAST::SpecialArg) 15:25
cosimo in a way, it's using SO as a searchable notepad 15:35
I thought of it when I saw www.learningperl6.com/Chapters/07.i...utput.html and all it had was wrong solutions
kind of sad
GlitchMr www.learningperl6.com/ 15:38
cosimo right, but web searches turn up these results, with no frontpage explanation... 15:56
cosimo does perl6 have sets? 16:03
that is, lists that only have one instance of an element?
jnthn r: my $a = set(1,1,3,2); say $a.perl
p6eval rakudo cf2761: OUTPUT«set("1", "3", "2")␤»
felher cosimo: funny enough, there was a advent calendar blogpost just a few days ago about sets, bags, ...: perl6advent.wordpress.com/2012/12/1...-and-sets/ 16:04
cosimo cool 16:05
felher: jnthn: thanks 16:06
GlitchMr > (<a b> X 1, 2).map(*[0]) 16:19
a 1 a 2 b 1 b 2
I'm trying to use X operator, except I want to access either 'a' or 'b'.
But .map flattens list to me
How can I protect the list I receive with X from flattening? 16:20
moritz .tree
GlitchMr Thanks
cosimo I didn't get it. example? 16:22
hoelzro so perl6.ops in the Rakudo tree; those implement custom opcodes for the Parrot VM to use? 16:26
cosimo what am I doing wrong here? gist.github.com/4296890 16:32
trying to add elements to a Set
timotimo need a KeySet, no? 16:37
oh
lichtkind there is still $() and @() ? 16:38
cosimo works if the set is a normal variable 16:39
r: my Set $x; $x := $x (|) 1; say $x.perl
p6eval rakudo cf2761: OUTPUT«Cannot look up attributes in a type object␤ in method keys at src/gen/CORE.setting:11652␤ in sub register-arg at src/gen/CORE.setting:11669␤ in method new at src/gen/CORE.setting:11677␤ in sub set at src/gen/CORE.setting:11708␤ in sub infix:<(|)> at src/gen/CO…
cosimo r: my $x = set(); $x := $x (|) 1; say $x.perl
p6eval rakudo cf2761: OUTPUT«set("1")␤»
cosimo aha
r: my $x = set(); $x = $x (|) 1; say $x.perl
p6eval rakudo cf2761: OUTPUT«set()␤»
cosimo now that i don't understand either 16:40
jnthn hoelzro: Yes 16:41
felher cosimo: you have to do:
jnthn hoelzro: A few small parts of Rakudo are written in C
felher r: my Set $x = Set.new(); $x := $x (|) 1; say $x.perl
p6eval rakudo cf2761: OUTPUT«set("1")␤»
lichtkind masak: can i have a chat?
hoelzro so, naively speaking, Rakudo creates opcodes with values greater than PARROT_MAX_OPCODE and provides the C implementation, right? 16:42
I'm guessing that this is done for efficiency reasons?
jnthn hoelzro: Yes; they're known as dynops 16:43
felher cosimo: just like you've done with 'my $a = A.new()'. You have to do that with "my Set $x = Set.new()" too.
jnthn hoelzro: And it's for performance for the most part, yeah. Tends to be hot path stuff. 16:44
hoelzro (also, if anyone wants to look at my first draft of my post for Monday, it's on WP)
ok, good to know
and that's what pir::method_name(...) is, yes?
cosimo r: my Set $x = set(); $x := $x (|) 1; say $x.perl 16:45
p6eval rakudo cf2761: OUTPUT«set("1")␤»
cosimo felher: right, thanks
felher cosimo: this works too, because 'set()' calls a function that creates a Set with 'Set.new()' :)
jnthn hoelzro: Yes, that's how they're called, but we hide most of them behind nqp::foo(...)
felher or better: 'set()' is a function that creates a set with 'Set.new()'
hoelzro oh, ok 16:46
felher To be precise: "set" is the name of a functoin that creates a Set for you via "Set.new" :)
hoelzro I'm guessing that nqp::method_name(...) is translated by NQP to some special internal call? or does NQP export a special nqp package into the Rakudo runtime? 16:47
felher Well, I have to go now. Bye #perl6. cosimo: happy hacking :)
pmurias hoelzro: the former 16:48
hoelzro pmurias: so it's basically like an inline function call?
jnthn hoelzro: More like a macro. They're handled by QAST::Compiler.
pmurias they are turned into QAST::Op nodes
jnthn Right, that. The idea is they abstract the underlying VM. 16:49
hoelzro ok
and what does QAST stand for?
jnthn pmurias++ is working on turning them into JavaScript, for example :)
hoelzro Quasi AST?
;)
jnthn Just "Q" :)
hoelzro heh
jnthn It replaced something known as PAST
P++ is Q :)
hoelzro ha
so PAST was the Parrot AST, and the QAST is the improved version that NQP uses? 16:50
benabik PAST++ is PASS ;-)
Urrr... PASU
Stupid braino.
jnthn hoelzro: Yeah, I think that was the original naming.
hoelzro: Note we still turn QAST into code for Parrot. It was partly re-worked for VM abstraction, but actually that was only one factor. The transition meant we implemented QAST in NQP, whereas PAST was written in PIR. 16:51
Also, we learned a few things in the years since PAST was created. :)
hoelzro I see
it's a lot to take in
jnthn Like, that if you represent the nodes the way PAST did, you use a LOT of memory ;) 16:52
hoelzro but I'm trying to learn so I can perhaps contribute, should I find the tuits
jnthn :)
hoelzro so when I type some code into the Rakudo REPL 16:53
it's NQP that's doing the parsing, right?
masak is back 16:55
masak logs back 16:55
jnthn hoelzro: The grammar is written in NQP yes
hoelzro ok
so if I write nqp::foo(...), NQP translates that into a QAST node, which is written out as a series of opcodes by PCT? (assuming the Parrot backend for NQP, that is) 16:56
pmurias yes 16:57
assuming you count a single opcode as a series
hoelzro oh, right 16:58
I was thinking if nqp::foo did more than just wrap pir::foo
jnthn hoelzro: Sometimes it does, sometimes it doesn't. 16:59
hoelzro ok, makes sense
hoelzro jnthn, pmurias: thanks for the input =) 17:00
I'm sure I'll have more questions later
masak lichtkind: a chat? you mean, like, on IRC? 17:02
pmurias hoelzro: as jnthn mentioned sometimes an op does much more then just generating a fixed sequence of ops
lichtkind masak: yes 17:02
hoelzro pmurias: such as? 17:03
masak in that case, just go ahead and chat. don't ask to ask. :)
pmurias hoelzro: setting up exception handling
hoelzro: nqp/src/QAST/Operations.nqp contains the op definitions 17:04
cosimo felher: thx :) 17:05
lichtkind masak: i kinda have to because my other chatclient is broken and i cant open private chats
masak lichtkind: uhm. 17:06
cosimo r: my Set $x = set(); $x := $x (|) 1; say $x.perl
p6eval rakudo cf2761: OUTPUT«set("1")␤»
masak r: my $in_prompt; sub issue_prompt { say ENTER { $in_prompt = True } }; issue_prompt
p6eval rakudo cf2761: OUTPUT«Nil␤»
cosimo r: class A { my Set $.x = set(); } my $a = A.new(); $a.x := $a.x (|) 1; say $a.x.perl
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/yvCOjUJWEC:1␤------> class A { my Set $.x = set(); } ⏏my $a = A.new(); $a.x := $a.x (|) 1; say␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ …
cosimo r: class A { my Set $.x = set(); } my $a = A.new(); $a.x = $a.x (|) 1; say $a.x.perl 17:07
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/sBckA2dwrZ:1␤------> class A { my Set $.x = set(); } ⏏my $a = A.new(); $a.x = $a.x (|) 1; say ␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ …
masak r: my $in_prompt; sub issue_prompt { say ENTER { $in_prompt = True; 42 } }; issue_prompt
p6eval rakudo cf2761: OUTPUT«Nil␤»
masak jnthn: why is the return value of the ENTER block Nil?
jnthn masak: Probably 'cus it doesn't support r-value use.
cosimo r: class A { my Set $.x = set(); } my $a = A.new(); say $a.x.perl 17:08
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/wraw70UAjV:1␤------> class A { my Set $.x = set(); } ⏏my $a = A.new(); say $a.x.perl␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ stateme…
jnthn masak: Feel free to research in the spec if it should. :)
masak hokay.
jnthn And if the spec thinks it should, feel free to file a ticket :)
cosimo r: class A { my Set $.x = set(); } my $a = A.new(); say $a.x;
jnthn cosimo: missing ;
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/hAgWUi2cIq:1␤------> class A { my Set $.x = set(); } ⏏my $a = A.new(); say $a.x;␤ expecting any of:␤ postfix␤ infix or meta-infix␤ infix stopper␤ statement e…
jnthn Right where the yellow marker is 17:09
cosimo r: class A { my Set $.x = set(); }; my $a = A.new(); say $a.x;
p6eval rakudo cf2761: OUTPUT«set()␤»
cosimo aha :)
masak jnthn: I don't see anything in S04 says they're not rvalues.
jnthn: in fact, I'd expect ENTER to work as either an rvalue or lvalue in block form. 17:10
r: say ENTER { 42 }
p6eval rakudo cf2761: OUTPUT«Nil␤»
jnthn masak: Well, clearly a bunch of phasers are useless as l-values.
masak r: say ENTER 42
p6eval rakudo cf2761: OUTPUT«Nil␤»
jnthn er, rvalues I mean
masak jnthn: those that haven't happened yet, yes.
jnthn Like LEAVE :)
masak of course.
jnthn But yeah, I think ENTER should work 17:11
masak I'm not arguing against that :)
jnthn There's probably some nice things to do with it.
LEAVE say "We took {now - ENTER now}s to run";
For example
cosimo r: class A { my Set $.x = set(); }; my $a = A.new(); $a.x = $a.x (|) 1; say $a.x.perl 17:13
p6eval rakudo cf2761: OUTPUT«set("1")␤»
cosimo r: class A { my Set $.x = set(); }; my $a = A.new(); $a.x (|)= 1; say $a.x.perl
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/nEcXyMvMgs:1␤------> t $.x = set(); }; my $a = A.new(); $a.x ⏏(|)= 1; say $a.x.perl␤ expecting any of:␤ method arguments␤ postfix␤ infix or meta-infix␤ infix…
cosimo r: class A { my Set $.x = set(); }; my $a = A.new(); $a.x = $a.x (|) set(1,2,3); say $a.x.perl 17:14
p6eval rakudo cf2761: OUTPUT«set("1", "2", "3")␤»
GlitchMr gist.github.com/4297293
Now all I've to do is adding error checking
Why masak expects 'A mentions B but B doesn't say anything.' when I can give multiple solutions?
TimToady The ever-so-ironic thing about masak's rectangular haiku example is that he's treating "haiku" as a two-syllable English word when the Japanese would count it as three. 17:15
masak :) 17:16
GlitchMr Because it's English.
masak from what I've understood of haikus, the Japanese and western understandings of them are quite different.
Japanese count mori or whatever they're called.
TimToady I guess it's bandwidth revenge for not being able to use kanji on twitter. 17:17
they're still syllables, psychologically speaking, whatever you call 'em 17:18
masak you... can't use kanji on twitter!? o.O
TimToady Oh, I can, but most English speakers seem to have a bit of difficulty in that regard... 17:19
masak jnthn++ # nice p6advent post 17:20
TimToady: I guess they're holding out for a keyboard with all the kanji on it for easier typing. :)
hoelzro speaking of advent posts, does anyone want to proofread mine? ;) 17:22
masak sure thing.
hoelzro \o/
lichtkind r: "123.234.345.456" ~~ m/\d+ % '.'/;say $(); 17:23
p6eval rakudo cf2761: OUTPUT«␤»
lichtkind r: "123.234.345.456" ~~ m:g/\d+ % '.'/;say $();
p6eval rakudo cf2761: OUTPUT«␤»
lichtkind r: "123.234.345.456" ~~ m:g/\d+ % '.'/;say $/;
p6eval rakudo cf2761: OUTPUT«Any()␤»
lichtkind r: "123.234.345.456" ~~ m:g/\d+ % '.'/;say $/[0];
p6eval rakudo cf2761: OUTPUT«Any()␤»
lichtkind r: "123.234.345.456" ~~ m:g/\d+/;say $/; 17:24
p6eval rakudo cf2761: OUTPUT«Any()␤»
masak lichtkind: you won't get any numbered captures if you don't have () inside the regex.
(\d+), probably.
lichtkind r: "123.234.345.456" ~~ m:g/\d+/;say $();
p6eval rakudo cf2761: OUTPUT«␤»
lichtkind ah
flussence oh wow, that phaser post is cool stuff
moritz also I don't think that m:g currently sets $/ in rakudo
lichtkind r: "123.234.345.456" ~~ m:g/(\d+) % '.'/;say $/;
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter % (must be quoted to match literally)␤at /tmp/nQIYJQUFWP:1␤------> "123.234.345.456" ~~ m:g/(\d+) ⏏% '.'/;say $/;␤ expecting any of:␤ colon pair (restricted)␤ infix …
GlitchMr gist.github.com/4297375 :-) 17:25
moritz r: $_ = "123.234.345.456"; .say for m:g/\d+ % '.'/
p6eval rakudo cf2761: OUTPUT«「1」␤␤「2」␤␤「3.2」␤␤「3」␤␤「4.3」␤␤「4」␤␤「5.4」␤␤「5」␤␤「6」␤␤»
moritz r: $_ = "123.234.345.456"; .say for m:g/[\d+]+ % '.'/
p6eval rakudo cf2761: OUTPUT«「123.234.345.456」␤␤»
flussence r: sub timer(&foo) { LEAVE say "{now - ENTER now} seconds"; &foo(); }; say timer({ sleep 5; 'bar' });
p6eval rakudo cf2761: OUTPUT«use of uninitialized value of type Nil in numeric context in sub timer at /tmp/x3LCGYyvLL:1␤␤Instant:1355592394.317712 seconds␤» 17:26
lichtkind r: "123.234.345.456" ~~ m:g/(\d+ % '.')/;say $/;
p6eval rakudo cf2761: OUTPUT«Any()␤»
flussence hm
masak hoelzro: may I point out that the "you don't!" under "How do I install Perl 6?" feels a little... nit-picky... people who don't know the difference between spec and impl also won't particularly enjoy being corrected on it.
moritz lichtkind: as I said, m:g doesn't set $/
hoelzro masak: oh, ok
masak hoelzro: especially when you're the one writing the FAQ ;)
some small rewrite would probably fix it.
hoelzro ok, I'll rewrite that, thanks! 17:27
masak something like "It's easy, you just grab one of the implementations of Perl 6, and..."
lichtkind r: $_ = "123.234.345.456"; .say for m/[\d+]+ % '.'/
p6eval rakudo cf2761: OUTPUT«「123.234.345.456」␤␤»
GlitchMr Now to think about hardest problem. The wires problem. While I already pass tests, my program isn't valid.
masak hoelzro: while it's true that NQP is written in PIR, much of it is bootstrapping, and thus written in NQP. 17:28
lichtkind r: $_ = "123.234.345.456"; .say m/[\d+]+ % '.'/
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/ZNIYxIMIXw:1␤------> $_ = "123.234.345.456"; .say ⏏m/[\d+]+ % '.'/␤ expecting any of:␤ method arguments␤ postfix␤ infix or meta-infix␤ infix stopper␤ …
flussence {now - INIT now} works, but {now - ENTER now} doesn't :(
hoelzro masak: so you currently need NQP to build NQP?
or is there yet another Perl 6 implementation that's used to bootstrap it?
masak hoelzro: I forget the exact steps to bootstrap NQP from nothing.
jnthn None of NQP is written in PIR any more.
masak oh, even what jnthn said. 17:29
moritz you need NQP to compile NQP
jnthn It's all written in NQP, a few Q:PIR blocks aside.
flussence r: sub timer(&foo) { my \then = now; LEAVE say "{now - then} seconds"; &foo(); }; say timer({ sleep 2; 'bar' });
p6eval rakudo cf2761: OUTPUT«2.0143803 seconds␤bar␤»
lichtkind r: $_ = "123.234.345.456"; .say m:g/[\d+]+ % '.'/
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/q2abYLc0ux:1␤------> $_ = "123.234.345.456"; .say ⏏m:g/[\d+]+ % '.'/␤ expecting any of:␤ method arguments␤ postfix␤ infix or meta-infix␤ infix stopper␤ …
jnthn The way we do it is to ship the compiled PIR output
hoelzro oh, I see
jnthn You build that, then use it to build NQP
lichtkind r: $_ = "123.234.345.456"; .say if m:g/[\d+]+ % '.'/
p6eval rakudo cf2761: OUTPUT«123.234.345.456␤»
cosimo r: class A { my Set $.x = set(); method y($e) { $.x = $.x (|) $e }; my $a = A.new(); $a.y(1); say $a.x.perl;
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Unable to parse expression in block; couldn't find final '}'␤at /tmp/4iz4qEOhrW:1␤------> my $a = A.new(); $a.y(1); say $a.x.perl;⏏<EOL>␤ expecting any of:␤ method arguments␤ postfix␤ infix o…
cosimo r: class A { my Set $.x = set(); method y($e) { $.x = $.x (|) $e } }; my $a = A.new(); $a.y(1); say $a.x.perl;
p6eval rakudo cf2761: OUTPUT«Cannot assign to a readonly variable or a value␤ in method y at /tmp/uEa18lXTGz:1␤ in block at /tmp/uEa18lXTGz:1␤␤»
jnthn The compiled output we provide tends to be some versions old, but it's always good enough to build the latest thing.
lichtkind thanks moritz
r: $_ = "123.234.345.456"; .say if m/[\d+]+ % '.'/
p6eval rakudo cf2761: OUTPUT«123.234.345.456␤»
lichtkind r: $_ = "123.234.345.456"; .say if m/[\d+] % '.'/ 17:30
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Unrecognized regex metacharacter % (must be quoted to match literally)␤at /tmp/9PyVEXknGx:1␤------> $_ = "123.234.345.456"; .say if m/[\d+] ⏏% '.'/␤ expecting any of:␤ method arguments␤ postfix␤ …
lichtkind r: $_ = "123.234.345.456"; .say if m/[\d]+ % '.'/
p6eval rakudo cf2761: OUTPUT«123.234.345.456␤»
cosimo i need help, why is this a readonly variable? 17:32
r: class A { my Set $.x = set(); method y($e) { $.x = $.x (|) $e } }; my $a = A.new(); $a.y(1); say $a.x.perl;
p6eval rakudo cf2761: OUTPUT«Cannot assign to a readonly variable or a value␤ in method y at /tmp/pNAUvLGQtS:1␤ in block at /tmp/pNAUvLGQtS:1␤␤»
masak cosimo: because all attributes are readonly by default.
cosimo: need to declare them 'is rw' to make them writable after construction. 17:33
hm, all public ('.') attributes, I should say.
the private ('!') ones are read-write by default.
(and useless if you make them readonly, because then you can never assign to them) 17:34
cosimo masak: is rw doesn't seem to make any difference in my case
r: class A { my Set $.x is rw = set(); method y($e) { $.x = $.x (|) $e } }; my $a = A.new(); $a.y(1); say $a.x.perl;
p6eval rakudo cf2761: OUTPUT«Cannot assign to a readonly variable or a value␤ in method y at /tmp/iHhg9xA_c_:1␤ in block at /tmp/iHhg9xA_c_:1␤␤»
masak hm. it should. 17:35
cosimo masak: obviously I'm ignoring something
masak cosimo: try changing the assignment to be '$!x = ...'
shouldn't be necessary, but it may help.
cosimo I tried moving the initial assignment to a method BUILD, but I got other more mysterious errors 17:35
r: class A { my Set $!x is rw = set(); method y($e) { $!x = $!x (|) $e; say $!x.perl } }; my $a = A.new(); $a.y(1); 17:37
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Cannot use ! twigil on my variable␤at /tmp/w8Bphf2tvv:1␤------> class A { my Set $!x is rw ⏏= set(); method y($e) { $!x = $!x (|) $e␤ expecting any of:␤ scoped declarator␤ constraint␤»…
cosimo private var seems to work, despite this error 17:38
r: class A { my Set $!x = set(); method y($e) { $!x = $!x (|) $e; say $!x.perl } }; my $a = A.new(); $a.y(1);
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Cannot use ! twigil on my variable␤at /tmp/gTdNQ4TVjg:1␤------> class A { my Set $!x ⏏= set(); method y($e) { $!x = $!x (|) $e␤ expecting any of:␤ scoped declarator␤ constraint␤»
cosimo r: class A { has Set $!x = set(); method y($e) { $!x = $!x (|) $e; say $!x.perl } }; my $a = A.new(); $a.y(1);
p6eval rakudo cf2761: OUTPUT«set()␤»
masak cosimo: oh!
cosimo wtf why was a 'my' in front of it? :) 17:39
masak cosimo: yeah, you're using 'my' when you should be using 'has'.
cosimo but set is empty
dalek kudo-js: bedc2f8 | (Paweł Murias)++ | / (2 files):
[nqp] change the calling convetion to pass ctx along
17:40
kudo-js: c6551d2 | (Paweł Murias)++ | / (2 files):
[nqp] remove a unused method
masak r: my $s = set; my $e = 5; $s = $s (|) $e; say $s.perl 17:41
p6eval rakudo cf2761: OUTPUT«set()␤»
masak huh!
not how I expect (|) to work... :/
masak reads source
r: my $s = set; my $e = 5; say ($s (|) $e).perl
p6eval rakudo cf2761: OUTPUT«set("5")␤»
masak something is wrong when doing both '=' and '(|)' 17:42
masak submits rakudobug
jnthn masak: iirc, colomon++ mentioned he copied the precedence from STD
masak: But it's suspect.
masak submits the ENTER rakudobug, too
jnthn Or something like... 17:43
colomon Not from STD.
jnthn Ah, where from?
colomon I think that was the precedence TimToady had on it.
jnthn OK
colomon wonders were the original Set implementation is on his hard drive.
jnthn Seems a bit surprising to me.
colomon definitely feels wrong to me after having tried it.
jnthn yeah 17:44
colomon What is the precedence of X and Z?
rn: my @a = 1, 2, 3 X 2, 3, 6; say @a;
p6eval rakudo cf2761, niecza v24-12-g8e50362: OUTPUT«1 2 1 3 1 6 2 2 2 3 2 6 3 2 3 3 3 6␤»
colomon rn: my @a = 1, 2, 3 (|) 2, 3, 6; say @a;
p6eval niecza v24-12-g8e50362: OUTPUT«set(1, 2, 3, 6)␤» 17:45
..rakudo cf2761: OUTPUT«1 2 3 6␤»
jnthn oh
r: my $s = set; my $e = 5; $s = $s (|) $e; say $s.perl
p6eval rakudo cf2761: OUTPUT«set()␤»
jnthn r: my :s := set; my $e = 5; $s := $s (|) $e; say $s.perl
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Malformed my␤at /tmp/jPa6RgLy4t:1␤------> my ⏏:s := set; my $e = 5; $s := $s (|) $e; s␤ expecting any of:␤ scoped declarator␤»
jnthn grr
r: my @s := set; my $e = 5; @s := @s (|) $e; say $s.perl
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Variable $s is not declared␤at /tmp/H1Qsawf9wD:1␤------> set; my $e = 5; @s := @s (|) $e; say $s⏏.perl␤»
jnthn r: my @s := set; my $e = 5; @s := @s (|) $e; say @s.perl 17:46
p6eval rakudo cf2761: OUTPUT«Type check failed in binding; expected 'Positional' but got 'Set'␤ in block at /tmp/TzdrIeIUXY:1␤␤»
jnthn ah, yeah
colomon rn: my @a = 1, 2, 3 (|) 2, 3, 6; say @a.perl;
p6eval rakudo cf2761: OUTPUT«Array.new("1", "2", "3", "6")␤»
..niecza v24-12-g8e50362: OUTPUT«[set("1", "2", "3", "6")].list␤»
jnthn I wonder if it's the $ meaning that it's item assignment that blows it.
colomon did i get the precedence wrong in Rakudo? I would have thought they'd behave the same. 17:47
jnthn colomon: That looks like a list assignment issue not a precedence one. 17:48
Rakudo is treating the set as sufficiently listy to think it's like my @a = @b; - that is, it takes the elements from @b and puts them into @a
masak because people upvoted, p6cc is now number 12 on www.reddit.com/r/programming/ \o/ 17:51
people++
hoelzro goes to upvote
masak ...and suddenly we're number 11! :D 17:52
pmurias jnthn: I get a strange error pastie.org/5536018 17:53
benabik upbeats from everyone! 17:54
Uhm. *upboats
pmurias "Cannot take a substring outside a string"
and there is no substring anywhere 17:55
(under current rakudo-star)
jnthn pmurias: Odd. Just ran it with nqp 80fed8e and it worked fine. 17:56
pmurias: Can't think of anything that woulda broke/fixed it of late.
pmurias hmm 17:57
we need an nqpbrew ;) 17:58
jnthn
.oO( I want to start a project called "micro", just so we can be like, "I need a microbrew" )
17:59
pmurias that will be a grant proposal title? ;) 18:00
masak "I need a microbrew", grant proposal by jnthn. :D 18:01
jnthn :D
masak someone give this man a microbrew! :P
moritz
.oO( someone give this strawman a microbrew! )
18:06
jnthn moritz: Are you thinking of merging sink this side of release or the other side?
moritz jnthn: release is in the upcoming week, right? 18:08
jnthn moritz: Thu 18:09
moritz: I think if it's going into the release, I'd rather see it merged this weekend.
So we've some days to notice any issues.
moritz I think I'd prefer to wait until after the release 18:10
because there'll be lots of module code with dodgy assumptions
jnthn moritz: Yeah, I can imagine that.
moritz: OK, let's land it right after release and then we've the month to make sure any ecosystem fallout is dealt with. 18:11
moritz +1
jnthn We've got a good amount of stuff to be happy about in the December release.
Especially the improved errors.
moritz aye, I like those :-) 18:13
jnthn and 30x faster junction auto-threading... :)
ooh, and terms :)
moritz they were a surprisingly easy patch 18:14
jnthn Did you get chance to think any more on the throwing multiple errors for the panic/sorry/worry distinction? 18:16
I have tuits to implement it in the next few days, just not sure quite what the exception objects want to look like... 18:17
moritz I still think that the proper way to do it by throwing an exception that acts as a container for other exceptions
colomon rn: my $a = 1, 2, 3 (|) 2, 4, 6; say $a.perl
p6eval rakudo cf2761, niecza v24-12-g8e50362: OUTPUT«1␤»
colomon rn: my %a := 1, 2, 3 (|) 2, 4, 6; say %a.perl
p6eval rakudo cf2761, niecza v24-12-g8e50362: OUTPUT«set("1", "2", "3", "4", "6")␤» 18:18
jnthn moritz: Any idea for a name?
diakopter XX ?
jnthn :P
moritz X::Group ?
jnthn X::Comp::Group maybe?
moritz hm yes 18:19
jnthn Not sure Group quite rings right but...renaming is easy I guess
The only thing that worries me is...
Suppose I get a situation where something that uses to panic now does sorry, and we panic later 18:20
diakopter rn: class Block { }; say Block
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Can not bind attribute '$!signature' declared in class 'Code' with this object␤»
..niecza v24-12-g8e50362: OUTPUT«Block()␤»
jnthn Now the test will break because the thing it used to get is inside the X::Comp::Group. 18:21
Also if we worry about something, the same.
moritz true
diakopter rn: my $a = Block; class Block { }; say Block === $a
p6eval niecza v24-12-g8e50362: OUTPUT«===SORRY!===␤␤Lexical symbol 'Block' is already bound to an outer symbol (see ??? line 0);␤ the implicit outer binding at line 1 must be rewritten as Block␤ before you can unambiguously declare a new 'Block' in this scope at /tmp/PAMdAx…
..rakudo cf2761: OUTPUT«===SORRY!===␤Can not bind attribute '$!signature' declared in class 'Code' with this object␤»
jnthn diakopter: You replaced the Block symbol with something that isn't meeting the expected API of a Block. 18:22
moritz diakopter: if you replace Block, you must do it in a way that's compatible with the old one
jnthn We've discussed this plenty of times before. 18:23
moritz becaues the compiler uses Block for, well, constructing blocks :-)
jnthn Right
moritz same with most other built-in classes
jnthn It's possible we should tie the compiler to just look at the setting and say "if you want to do such a thing, you must write your own setting".
But there's no spec to say so, and the usual Perl 6 behavior is "nearest definition wins".
moritz panda doesn't work on qast-sink-1 18:24
jnthn eek
moritz now rebuilding nom to compare
jnthn store, bbiab 18:29
masak moritz++ had a question about the rain and the cube world: gist.github.com/c90dc8d7596e4551faf7 18:36
posting it here. I may throw it into notes.md, too.
masak oh, by the way. if no-one else volunteers for slot 24 of the advent calendar, I will write it. 18:49
I'd prefer for TimToady or jnthn or sorear or pmichaud to write it, but I can write it if neither of these want to.
moritz ++masak 18:50
masak oh, and it seems I'm cutting the release on Thursday :)
colomon masak++ 18:55
pmurias is anyone interested in me focusing on making nqp-js more developer friendly (TODO, HACKING, code cleanup etc.) (after I finish implementing resumable exceptions) 19:15
diakopter jnthn and moritz: I didn't run those Block examples to point out that there is an error. I ran them to point out that I forgot it once again, as I mentioned in the backlog. It's too easy to forget. 19:47
sorear masak: what would 24 be about? 19:55
FROGGS_ maybe .wrap and .unwrap? 19:56
if there is something interesting to tell
kthakore hi guys 20:06
sorear yo kthakore
kthakore I am going through the perl6 book. And in ch2 I was looking at 'string'.split
japhb nqp: pmurias I am very interested in nqp-js being more developer friendly. Not going to guarantee I can contribute, but I will definitely want to study it and use it to understand NQP from a different point of view
p6eval nqp: OUTPUT«Confused at line 2, near "pmurias I "␤current instr.: 'panic' pc 13221 (src/stage2/gen/NQPHLL.pir:4682) (src/stage2/gen/NQPHLL.pm:328)␤»
japhb er, that was a weird braino
kthakore so I tried 'string'.match('n'); It gives back this: > 'string'.match('n');
「n」
what does that mean? 20:07
hi sorear
sorear kthakore: it matched "n"
kthakore oh what are the chracters before and after the n ?
sorear halfwidth Japanese corner quotes 20:07
kthakore ooooooooooooh
kthakore facepalms
」? 20:08
FROGGS_ hi kthakore
kthakore hi FROGGS_
sorear I wasn't really paying attention but I think we decided to use them because they're virtually never used in real text
.u 」
phenny U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」)
FROGGS_ these things are just there to show you the output
kthakore OOOh so they are not in the output?
japhb re: irclog.perlgeek.de/perl6/2012-12-15#i_6245882 , it bugs me that doing .perl on a set composed of ints looks like it contains strings
FROGGS_ kthakore: right
kthakore my @found = 'string'.match('n'); should be just ['n'] ? 20:09
IT IS
I am learning
\o/
sorear kthakore: the Match object gistifies to the matched text wrapped in angle brackets
kthakore cool
sorear if you do 'string'.match('n').Str you will get just the matched text 20:10
kthakore so my $found = 'string'.match('n')
sorear if you do 'string'.match('n').from you will get the position
kthakore will ahve the angle bracket in them
sorear no, $found will have a Match object
not a string
FROGGS_ r: say 'string'.match('n').WHAT
p6eval rakudo cf2761: OUTPUT«Match()␤»
FROGGS_ r: say 'string'.match('n').perl
p6eval rakudo cf2761: OUTPUT«Match.new(orig => "string", from => 4, to => 5, ast => Any, list => ().list, hash => EnumMap.new())␤»
kthakore oh cool
look at you all fancy mr. FROGGS_ 20:11
FROGGS_ ;o)
kthakore ^5 FROGGS_
FROGGS_ welcome to Perl 5++ :P
kthakore cool
masak sorear: 24 would be about "What Perl 6 has taught me about programming and PL design"
FROGGS_ I can do { Version.new('1.0.3') after Version.new('1.0.5') } and get true or false, what is the tree way operator for before/after ? 20:15
... where I would get Decrease, Same or Increase 20:16
TimToady cmp 20:17
FROGGS_ thanks, I thought I tried that and had weird results... will try again 20:17
TimToady could certainly be buggy
FROGGS_ r: say Version.new('1.0.3') cmp Version.new('1.0.5')
p6eval rakudo cf2761: OUTPUT«Increase␤»
FROGGS_ looks good 20:18
ahh, I was stupid, I must do reverse ordering for what I am doing -.- 20:19
kthakore 0o 20:21
FROGGS_: what are you talking? *shakes FROGGS_ *
FROGGS_ kthakore: sup?
I have a list of installed modules, and want to get the one with the highest version when I do: use Dog
kthakore oh how is SDL6 module? Is all my old work borked?
FROGGS_ well, I started from scratch, yes 20:22
no pir stuff, so it will be portable
kthakore cool 20:22
repo?
diakopter I'm getting "use of uninitialized variable $max of type Any in numeric context in method Numeric at src\gen\CORE.setting:801" How should I start to find where in my program could be causing this? 20:23
FROGGS_ kthakore: github.com/PerlGameDev/SDL6
kthakore oh right
is it on panda? 20:24
or what is that called?
diakopter where in my program could be calling Numeric?
FROGGS_ ya, you can install it using panda, but there is a bug in rakudo that causes some trouble (interaction between Inline::C and NativeCall)
kthakore ok 20:25
how do I install, test etc?
jnthn diakopter: Do you have a $max?
diakopter what is a $max
FROGGS_ diakopter: maybe if you have a string containing a number and doing maths on it?
jnthn diakopter: Anything that puts something in numeric context calls .Numeric
r: my $a; say $a * 3
p6eval rakudo cf2761: OUTPUT«use of uninitialized variable $a of type Any in numeric context in block at /tmp/LL0KH8hnI7:1␤␤0␤»
diakopter no $max
FROGGS_ kthakore: github.com/tadzik/panda/ 20:26
jnthn OK, then one of the built-ins you're calling must have a $max
Which is a fairly general problem that I'm not sure how to solve 20:27
FROGGS_ diakopter: do you use another module? if not, then it just could be an internal var
diakopter I wish the unitialized warning would have a full stack trace
no other modules
FROGGS_ diakopter: maybe it is in a regex? I believe you dont get backtraces when bad things happen in regexes 20:28
diakopter it's not in a regex
diakopter well, it's not in a regex in my program 20:28
FROGGS_ the last option would be to move "exit;" from blok to block or line to line to find the place where it is happening 20:29
or use the debugger and skip through
japhb jnthn++ # Excellent advent calendar post 20:32
While many of them show off cool bits, or get new users started, this one had enough good programming practices that it's likely to change the way I code the very next time I sit down at an editor.
GlitchMr perl6: sub term:<2 + 2> { 5 }; say 2 + 2; say 2 + 3;
p6eval niecza v24-12-g8e50362: OUTPUT«===SORRY!===␤␤Unable to parse term:sym<2 + 2> at /tmp/gdQP5D_NSm line 1:␤------> sub term:<2 + 2> { 5 }; say 2 + 2; say ⏏2 + 3;␤Couldn't find final '+ 2'; gave up at /tmp/gdQP5D_NSm line 1 (EOF):␤------> erm:<2 + 2…
..rakudo cf2761: OUTPUT«5␤5␤»
diakopter FROGGS_: one problem is I wrote 70 lines before running it once.
GlitchMr std: sub term:<2 + 2> { 5 }; say 2 + 2; say 2 + 3; 20:33
p6eval std a8bc48f: OUTPUT«===SORRY!===␤Two terms in a row at /tmp/NKDB7pLXVp line 1:␤------> sub term:<2 + 2> { 5 }; say 2 + ⏏2; say 2 + 3;␤ expecting any of:␤ infix or meta-infix␤ infixed function␤ statement modifier loop␤Parse failed␤FAILED 00:00
..48m␤…
kthakore FROGGS_: resolve stage failed for SDL6: Project SDL6 not found in the ecosystem
FROGGS_ kthakore: it is called SDL
kthakore ooh
japhb really loves that after all these years of programming, I still get the wonderful enjoyment of learning that kind of new way to look at everyday tasks. 20:34
masak +1 20:34
kthakore FROGGS_: it le fails. Cannot import symbol &trait_mod:<is> 20:37
lue hello world o/
kthakore how to fix it?
FROGGS_ kthakore: find the bug in rakudo 20:38
kthakore where do I look?
is the other compiler working?
FROGGS_ niecza? it has no NativeCall afaik 20:39
kthakore: the code is on github (rakudo and nqp)
but it is not that easy to track dont, I spent about 25 hours and then gave up 20:40
jnthn knows about it
kthakore dang ok
what is the smallest test case for this bug?
maybe an Strace can pinpoint? Did you do that? 20:41
diakopter how could I get "Odd number of elements found where hash expected" from this; %hash = %hash{$coord};
jnthn japhb: Glad you took something from it. :)
FROGGS_ kthakore: create two modules, put a trade_mod:<is> to each (with different signatures), and try to use both from a third module
jnthn diakopter: Easily? :) 20:42
geekosaur diakopter, doesn't that just get you the value at %hash{$coord} ?
FROGGS_ diakopter: what is in %hash{$coord} ?
diakopter a hash
geekosaur unless that heppens to be a hash...
jnthn diakopter: You're looking up a single thing from a hash.
If it turns out to be something other than a hash, you'll get that error
diakopter even if it is a hash, is it the hash object that gets put in %hash? or some copy? 20:43
lue jnthn++ # advent post
diakopter erm.
lue (I'm definitely using now - INIT now from now on)
jnthn diakopter: It copies the things. 20:44
diakopter how do I not copy the things
jnthn Do binding.
diakopter ah
kthakore FROGGS_: okie 20:45
GlitchMr github.com/perl6/book/downloads
Just wondering, what will happen with Perl 6 Book?
jnthn GlitchMr: Whatever people have time/interest/motivation to make happen 20:46
GlitchMr Well, the problem is that it uses GitHub Downloads 20:47
jnthn Oh, I see...
FROGGS_ kthakore: there is somewhere in the code a XXX todo about this, if you remove the "die" that follow it, you will see that you only import the trait_mod:<is> from the module that you imported at last, so the merging is then just missing
japhb jnthn: re: irclog.perlgeek.de/perl6/2012-12-14#i_6243989 any more brilliant ideas in the last day or so? 20:52
jnthn japhb: I'm wondering if sink context will help too. 20:53
japhb I was hoping that would be the case. :-) 20:54
jnthn The fix I did may help some other things, fwiw. 20:54
GlitchMr > [X]([0, 1] xx 3).tree.perl
([0, 0, 0], [0, 0, 1], [0, 1, 0], [0, 1, 1], [1, 0, 0], [1, 0, 1], [1, 1, 0], [1, 1, 1]).list
Binary :-)
masak hm, in src/core/Set.pm, I don't see the operators being given any associativity at all... 20:56
jnthn masak: Grammar.pm 20:57
GlitchMr: cute :)
japhb jnthn, What else might the X fix help?
jnthn r: ((1, 2, 3) Z (4, 5, 6)).perl.say 20:58
p6eval rakudo cf2761: OUTPUT«((1, 4), (2, 5), (3, 6)).list␤»
jnthn That also
Basically, anything that produces a list of parcels.
japhb Ah, OK
jnthn And then puts them in flattening context.
masak jnthn: I see. 21:00
jnthn: I expected to find something like 'is equiv' in src/core. 21:01
jnthn masak: Not sure if we can use those traits inside the setting at the moment. 21:02
GlitchMr I actually used [X] trick in t01.
Anyway, bye
t1*
FROGGS_ bye
masak advent post for tomorrow scheduled over at Wordpress. 21:04
feel free to review and comment.
FROGGS_ cool!
pmurias what's the value of try when an exception is thrown? 21:06
(and caught) 21:07
masak pmurias: could you construct a case where that happens? 21:08
the question seems meaningless or obvious to me at first glance.
r: say try 42
p6eval rakudo cf2761: OUTPUT«42␤»
masak r: say try die "whoa!"; CATCH { default { say "oh well" } } 21:09
p6eval rakudo cf2761: OUTPUT«whoa!␤ in block at /tmp/mc843rVuCZ:1␤␤»
masak r: sub foo { say try die "whoa!"; CATCH { default { say "oh well" } } }; foo
p6eval rakudo cf2761: OUTPUT«whoa!␤ in sub foo at /tmp/4DKWr1516F:1␤ in block at /tmp/4DKWr1516F:1␤␤»
masak hm, I thought this was the way to handle exceptions...
jnthn you want the block form of try
masak does it matter? 21:10
jnthn If you want that CATCH to handle the exception in the try, yes.
masak r: sub foo { say try { die "whoa!" ; CATCH { default { say "oh well" } } }; foo
pmurias masak: experimentation suggests it's NQPMu
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Unable to parse expression in block; couldn't find final '}'␤at /tmp/puKIxIgF2b:1␤------> TCH { default { say "oh well" } } }; foo⏏<EOL>␤ expecting any of:␤ argument list␤ postfix␤ infix or m…
masak r: sub foo { say try { die "whoa!" }; CATCH { default { say "oh well" } } }; foo
p6eval rakudo cf2761: OUTPUT«whoa!␤ in sub foo at /tmp/P7z1xT0ocA:1␤ in block at /tmp/P7z1xT0ocA:1␤␤»
jnthn pmurias: Don't rely on NQP to get anything exceptiony to spec.
masak r: sub foo { say try { die "whoa!"; CATCH { default { say "oh well" } } } }; foo
p6eval rakudo cf2761: OUTPUT«oh well␤whoa!␤ in sub foo at /tmp/DgXQ59d72c:1␤ in block at /tmp/DgXQ59d72c:1␤␤»
jnthn pmurias: As in, it'll do different things to Rakudo, and Rakudo is righter.
masak I must be too tired to understand this. 21:11
jnthn I think Rakudo presently hands back the exception.
Which .gists as masak showed.
pmurias but in nqp I should return NQPMu?
jnthn pmurias: Yeah, that's fine.
I think the right answer for Perl 6 may be Nil 21:12
And we've no Nil in NQP
pmurias japhb: you had problems with building nqp-js do they persist under current rakudo-star? (that's what I'm using ATM) 21:19
japhb: This is nqp version 2012.11 built on parrot 4.6.0 revision 0
dalek kudo-js: 45ac09b | (Paweł Murias)++ | / (3 files):
[nqp] pass test 44, resumable exceptions
21:33
lue r: say "A " ~~ /<.alpha>+/ 21:34
p6eval rakudo cf2761: OUTPUT«「A」␤␤»
lue r: grammar G { rule TOP { <ad> }; rule ad { <.alpha>+ };}; say G.parse("ABcd ");
p6eval rakudo cf2761: OUTPUT«「ABcd 」␤ ad => 「ABcd 」␤␤»
lue just realized he mixed up the meanings of rule, regex, and token 21:36
jnthn r: /<[a-z]>/ 21:37
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Unsupported use of - as character range; in Perl 6 please use .. for range, for explicit - in character class, escape it or place as last thing␤at /tmp/dimNziKIY0:1␤------> /<[a-⏏z]>/␤»
pmurias doesn't $_,$!,$/ hurt inlining? 21:47
as even when we inline a sub we have to keep those from it so OUTER works correctly? 21:48
masak not if we know that we don't reference them. 21:48
pmurias sub foo {bar()} 21:49
foo has a set of $_,$!,$/ which bar can access 21:50
pmurias masak: you mean if we can prove that &bar doesn't use outer, or is there something in the spec I'm missing? 21:50
FROGGS_ japhb: my S11 implementation is working so far! see github.com/FROGGS/p6-S11Versioning 21:51
masak hm, isn't OUTER merely a lexical thing?
in that case, what does it have to do with bar()? 21:52
pmurias masak: sorry meant CALLER
masak the relation between &foo and &bar here is a CALLER relation, not OUTER.
ah.
FROGGS_ japhb: next step is to add more tests and installed modules, and if all these are good than patching panda to create these MANIFESTs
masak pmurias: but aren't $_ et al. lexically scoped? 21:53
oh, I think I see what you mean.
yes, we'd have to prove that &bar doesn't use CALLER in order to inline without changing anything.
put differently, any use of CALLER would make a function like &bar ineligible for inlining. 21:54
pmurias masak: but it's &foo we want to inline 21:55
masak: $_ et al. are lexically scoped, but they are also dynamic
masak pmurias: when I said "if we know we don't reference them", I was thinking of simpler cases than functions with calls to other functions. 21:56
pmurias: something like sub foo { $x + 2 }
where it's clear that we don't use $_,$!,$/ 21:57
and so we can inline it.
I agree that it's problematic if we have a bar() call in there.
masak the conservative thing to do is not to inline &foo then. maybe we can improve on that. 21:57
but in that sense, yes, the presence of those variables hurt inlining, because it gets harder to do it. 21:58
jnthn At the moment, the inliner doesn't inline things that make calls.
masak 'night, #perl6
jnthn 'night, masak
pmurias 'night
lue r: my @a[*;3]; @a = [1,2,3],[4,5,6]; say @a;
p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Shaped variable declarations is not yet implemented. Sorry. ␤at /tmp/bsl2thmpUU:1␤------> my @a[*;3]⏏; @a = [1,2,3],[4,5,6]; say @a;␤»
lue :(
pmurias is there a workaround around that problem? other than analysing the use of caller/OUTER/etc.? 22:01
jnthn Think it's probably just a matter of more analysis. 22:03
pmurias it seems we will need tons of analysis for good performance ;) 22:04
would declaring $!,$_,$/ only when mentioned be a big problem for users? (like with @_ and %_) 22:08
jnthn $/ is often set by a callee 22:10
pmurias is it accessed by a callee often? 22:21
dalek kudo/stdier: 9ca1831 | jnthn++ | src/Perl6/World.pm:
Prevent infinite errors when compiling setting.

It used to be OK to call panic if we couldn't construct the error object. However, now panic always throws an X::Comp::AdHoc, so that made an infinite loop of trying to throw.
22:29
kudo/stdier: 66b8383 | jnthn++ | src/Perl6/World.pm:
Split exception construction and throwing.
kudo/stdier: c9a977a | jnthn++ | src/Perl6/Grammar.pm:
Provide panic/sorry/worry versions of things.

They all currently do what panic does, but this will let us start to split out the semantics of them.
kudo/stdier: d23ab1e | jnthn++ | src/Perl6/Grammar.pm:
panic/sorry/worry delegate to typed variants.
kudo/stdier: d7c2661 | jnthn++ | src/Perl6/ (2 files):
Switch panic to sorry where STD does.

They don't behave differently just yet; this is just preparation.
pmurias jnthn: changing the spec the way I proposed would hurt composability so it's likely a bad idea 22:31
jnthn sleep & 23:17