Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-12-15

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 Psyche^ joined #perl6
00:10 benabik joined #perl6
00:25 diakopter masak: yer base-test script doesn't work on windows
00:25 diakopter there's no /dev/null
00:30 wamba joined #perl6
00:36 diakopter er. typed yer without thinking.
00:44 stevan_ joined #perl6
00:47 diakopter unhelpful rakudo error: Can not bind attribute '$!signature' declared in class 'Code' with this object
00:48 diakopter no reference to where in the source might have this problem
00:51 diakopter oh lol.
00:51 diakopter I declared a class named Block. no warning on that. just the above error.
00:51 diakopter see, I have learned there is a Block class many times.
00:51 diakopter but I forget.
01:01 benabik joined #perl6
01:01 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.
01:01 skids joined #perl6
01:02 sorear lue: Total water collected in cubic meters.
01:03 bluescreen__ joined #perl6
01:03 lue Ah. Didn't see that in t4 (was skimming for the word "output", and didn't see the first line either)
01:04 sorear the main one I'm worried about is t2
01:40 wamba joined #perl6
01:40 Targen joined #perl6
01:40 tadzik joined #perl6
01:40 lestrrat joined #perl6
01:50 skids joined #perl6
01:50 sftp joined #perl6
01:50 xilo_ joined #perl6
01:50 baest joined #perl6
01:50 p6eval joined #perl6
01:50 smash joined #perl6
01:50 bbkr__ joined #perl6
01:50 spacebat joined #perl6
01:50 Ulti joined #perl6
01:50 robinsmidsrod joined #perl6
01:50 LordV joined #perl6
01:50 [particle] joined #perl6
01:50 aloha joined #perl6
01:50 mj41 joined #perl6
01:50 _sri joined #perl6
01:50 pnu joined #perl6
01:50 rking joined #perl6
01:50 japhb joined #perl6
01:50 arnsholt joined #perl6
01:50 nwc10 joined #perl6
01:50 xdbr_ joined #perl6
01:50 au joined #perl6
01:50 cibs joined #perl6
01:50 xinming_ joined #perl6
01:50 sorear joined #perl6
01:59 popl joined #perl6
01:59 LoRe joined #perl6
01:59 PZt joined #perl6
01:59 Vlavv joined #perl6
01:59 kst joined #perl6
01:59 cxreg joined #perl6
01:59 Pleiades` joined #perl6
01:59 Hor|zon joined #perl6
01:59 infosophy joined #perl6
01:59 pjcj_ joined #perl6
01:59 MikeyG joined #perl6
01:59 mst joined #perl6
02:00 daxim joined #perl6
02:00 Krunch joined #perl6
02:00 c1sung joined #perl6
02:02 rummik joined #perl6
02:02 silug joined #perl6
02:02 mikemol joined #perl6
02:02 rurban joined #perl6
02:02 Pompel joined #perl6
02:02 takesako joined #perl6
02:02 twinshadow joined #perl6
02:03 benabik joined #perl6
02:03 groky joined #perl6
02:03 noggle joined #perl6
02:03 arlinius joined #perl6
02:03 lue joined #perl6
02:03 cosimo joined #perl6
02:03 PerlJam joined #perl6
02:03 awwaiid joined #perl6
02:03 araujo joined #perl6
02:03 ingy joined #perl6
02:03 odoacre joined #perl6
02:03 zb joined #perl6
02:03 timotimo joined #perl6
02:03 krunen joined #perl6
02:03 ironcamel joined #perl6
02:03 rhr joined #perl6
02:03 charsbar_____ joined #perl6
02:03 `patch` joined #perl6
02:04 66MAAC06G joined #perl6
02:05 wamba joined #perl6
02:05 Targen joined #perl6
02:05 tadzik joined #perl6
02:05 lestrrat joined #perl6
02:05 telex joined #perl6
02:05 crazedpsyc joined #perl6
02:05 quietfan1tic joined #perl6
02:05 moritz joined #perl6
02:05 Maddingue joined #perl6
02:05 huf joined #perl6
02:05 phenny joined #perl6
02:05 ivan``_ joined #perl6
02:05 shachaf joined #perl6
02:05 perigrin joined #perl6
02:05 ilogger2 joined #perl6
02:05 sivoais joined #perl6
02:09 FROGGS_ joined #perl6
02:11 Guest1509 joined #perl6
02:13 popl :O
02:13 sorear popl: your first netsplit?
02:14 popl sorear: No. I think it may have been a DDoS.
02:14 popl *result of
02:15 popl According to what I've gleaned in #freenode, anyways.
02:15 popl Either that or somebody tripped over a power cord.
02:16 _jaldhar_ joined #perl6
02:19 timotimo oooh, "$c div= 2". it's neat how you can even use word-based operators like that!
02:21 sorear There's no difference between word-based operators and symbol operators in perl 6
02:21 soy_dominicana joined #perl6
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.
02:21 timotimo while $d %% 2 {(PrimeCandidate $n, Int $k) - was that a paste mistake?
02:22 timotimo seems like it was accidentally pasted from the function signature
02:22 soy_dominicana joined #perl6
02:22 soy_dominicana hola
02:22 sorear Hola
02:22 timotimo hola señor
02:22 soy_dominicana de 25 30
02:23 diakopter heh
02:23 sorear que?
02:23 timotimo mi na compreñde
02:23 soy_dominicana chico de 25 a 30
02:24 sorear timotimo: portugués?
02:24 diakopter [looking for?] a boy between 25 and 30
02:24 popl wat
02:24 timotimo da, sorear
02:24 huf that's amazing
02:24 soy_dominicana yees
02:24 popl soy_dominicana: no
02:25 soy_dominicana si
02:25 popl soy_dominicana: http://nambla.net
02:25 soy_dominicana k
02:25 sorear This is a programming language channel, not a dating channel
02:25 popl sorear++
02:26 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)?
02:26 diakopter very long ones
02:26 popl Camilla?
02:26 sorear huf: what's amazing?  I live smack on the US/Mexico border, I can understand Spanish quite well
02:26 huf sorear: not that
02:27 sorear can hardly speak/write it though
02:27 soy_dominicana juju
02:27 huf the fact that someone decides to look for boys between 25 and 30 *here*
02:27 huf i just find the fact that such people exist amazing
02:27 diakopter boys who want to chat with boys?
02:27 timotimo people between 25 and 30? surprises me, too
02:27 huf no no
02:27 sorear huf: do you remember the chatmosphere era?
02:28 popl Camelia
02:28 popl sorry
02:28 huf i dont remember anything by that name
02:28 sorear huf: statistically, a large fraction of programmers are young males
02:28 huf but i remember dark days on java applet chats
02:28 popl huf: It puts the lotion in the basket.
02:29 soy_dominicana que s nambla
02:29 sorear rich white young males specifically
02:29 popl soy_dominicana: It was a joke. You are in the wrong channel.
02:30 sorear soy_dominicana: https://es.wikipedia.org/wiki/North​_American_Man/Boy_Love_Association
02:30 soy_dominicana y para k ees esa pajina
02:31 popl Parakeets are cool.
02:31 sorear interesting.  it's pagina down here.
02:31 popl Is he speaking Spanish or Portuguese?
02:31 hash_table joined #perl6
02:31 diakopter soy_dominicana: Você está no canal errado. Usted se encuentra en el canal erróneo
02:31 sorear popl: Spanish I think
02:32 soy_dominicana spanish
02:32 popl soy_dominicana: gracias
02:32 diakopter aha!
02:32 popl chatmosphere
02:32 huf what is that?
02:33 diakopter a world of fun
02:33 popl huf: It's like adult friend finder
02:33 huf aha
02:33 sorear huf: a chat client that automatically recommends #perl6 to people looking for dates
02:33 huf on IRC?!
02:33 huf aight
02:34 sorear interesting, their IP resolves to Texas
02:35 sorear that explains the heavy english influence
02:35 popl Probably somewhere near El Paso or the panhandle.
02:35 diakopter it's a phone app I thought
02:35 popl diakopter: 18:32 -!- soy_dominicana [cfujhg@69.41.182.140] has quit [Quit: Chatmosphere for Blackberry]
02:35 sorear popl: Dallas, insofar as geoip data can be trusted
02:36 diakopter a person/device's gateway doesn't necessarily have anything to do with where it is
02:36 diakopter even if the geoip is correct
02:37 sorear freenode has rules that public gateways have to publish the IP in the irc name fields
02:38 diakopter I wasn't talking about only public gateways
02:39 timotimo also, the advent calendar post about prime numbers should get a "Day 14 - " in front for consistency i think
02:40 popl prime number post should be on day 17
02:40 popl :)
02:40 timotimo of course :)
02:44 anuby_h joined #perl6
04:53 diakopter japhb: did I ask for method form of push vs. sub form of push
05:00 * japhb checks ...
05:00 japhb You did not.
05:01 * japhb adds it
05:04 japhb Still missing dalek, eh?
05:04 japhb Pity ...
05:16 japhb Add colomon++'s bag/set and 'is cached' test ideas to the TODO list as well
05:16 japhb s/Add/I added/
05:18 am0c joined #perl6
05:25 SamuraiJack joined #perl6
05:35 telex joined #perl6
05:42 fgomez joined #perl6
05:44 xinming joined #perl6
06:01 eternaleye masak: If I had time, I would *so* do the p6cc.
06:02 eternaleye For one thing, knights/knaves immediately made me think "Huh, the list metaops would probably be a neat way to do Gaussian elimination..."
06:08 sorear eternaleye: Would you stop giving my competitors ideas? :P
06:09 sorear (also, I already have a better way)
06:09 eternaleye sorear: I have become overly tempted and ame joining.
06:09 eternaleye *am
06:10 eternaleye sorear: Which is bad because I ought to do other things, but...
06:10 eternaleye p6 is so *nice*
06:10 sorear ok, if you're joinign then I won't tell you my idea.
06:10 sorear :D
06:10 eternaleye sorear: np. I look forward to seeing it in the final!
06:11 eternaleye Now to gow download Star...
06:11 eternaleye It's been over a year since I last had time to use p6.
06:14 eternaleye 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:49 * lue sees how p6cc checks for error strings and is reminded of why there are exception types in P6.
06:56 xenoterracide joined #perl6
07:13 asdf12 joined #perl6
07:47 chee joined #perl6
07:47 chee joined #perl6
08:09 wamba joined #perl6
08:58 felher PerlJam++ # Prime blog post :0
09:06 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:09 kaare_ joined #perl6
09:19 PacoAir joined #perl6
09:24 GlitchMr joined #perl6
09:24 GlitchMr glitchmr@strawberry ~/g/p/t2> perl6 base-test
09:24 GlitchMr ===SORRY!===
09:24 GlitchMr Could not find strict in any of: lib, /home/glitchmr/.perl6/lib, /home/glitchmr/rakudo/lib/parrot​/4.7.0-devel/languages/perl6/lib
09:24 GlitchMr Interesting. I cannot run tests.
09:36 sorear GlitchMr: base-test is a perl 5 script
09:36 sorear hence the #! /usr/bin/env perl at the top
09:47 spider-mario joined #perl6
09:55 spider-mario joined #perl6
09:58 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:59 GlitchMr I like haikus my code generates
10:06 anuby_h_ joined #perl6
10:10 GlitchMr glitchmr@strawberry ~/g/p/t2> perl6 code
10:10 GlitchMr today thing perl six
10:10 GlitchMr positional radix map
10:10 GlitchMr variable constraints
10:15 masak good morning, #perl6.
10:15 phenny masak: 01:01Z <lue> ask masak what is t4 supposed to output, exactly? (The number of pools?)
10:16 masak lue: the volume, in cubic lengths, of collected water.
10:16 GlitchMr hi, masak
10:16 masak GlitchMr: nice haiku ;)
10:17 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:18 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:19 masak 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
10:19 masak backlogs* :)
10:21 GlitchMr Now other challenges could be more difficult
10:21 GlitchMr But they sound possible
10:22 GlitchMr https://github.com/masak/p6cc201​2/blob/master/t3/description.md
10:22 GlitchMr But if I think about it... it's easy
10:23 * masak smiles at soy_dominicana in the backlog
10:24 masak GlitchMr: in that case, I advise you to think about it ;)
10:25 * masak loves how p6cc drags people into (or sometimes back into) Perl 6
10:26 masak that's the point of it, of course. doing non-trivial things for fun, making you have to learn the language.
10:30 jnthn hola chicos!
10:30 jnthn :P
10:30 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
10:30 sorear I'll probably fail it by virtue of not making a satisfactory t2
10:32 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 FROGGS_ it is amazing what you can do within a few hours on sunday afternoon
10:33 GlitchMr t2 was easiest task in this to me.
10:33 GlitchMr I did it using brute force, but as long it's fast enough...
10:33 jnthn Does anyone know what happened to dalek?
10:34 sorear feather kernel panicked and rebooted
10:37 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... :)
10:37 FROGGS_ jnthn: on the github service hook page, can't you see the address it is pointing to?
10:37 jnthn FROGGS_: oh, good point
10:38 FROGGS_ maybe you see his/her homedir
10:38 jnthn http://feather3.perl6.nl:5​000/dalek?t=freenode,perl6
10:38 jnthn ah, and I didn't connect to feather3...
10:39 jnthn uh, and don't have an account there
10:39 jnthn Guess having feather.perl.nl account wouldn't imply that... :)
10:39 jnthn *perl6.nl
10:39 jnthn ah well, I tried...
10:40 masak timotimo: your powers of deduction leave something to be desired... :P
10:42 GlitchMr std: $_ = "a"; say;
10:42 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0m�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:�------> [32m$_ = "a"; say[33m�[31m;[0m�Check failed�FAILED 00:00 43m�»
10:42 GlitchMr What if I just want to print newline?
10:43 FROGGS_ std: $_ = "a"; .say;
10:43 p6eval std a8bc48f: OUTPUT«ok 00:00 43m␤»
10:43 FROGGS_ right?
10:43 FROGGS_ r: ''.say
10:43 p6eval rakudo fc9c3b: OUTPUT«␤»
10:44 FROGGS_ brb
10:47 masak yay, http://www.reddit.com/r/programming/commen​ts/14v368/the_2012_perl_6_coding_contest/ is gaining some traction.
10:49 timotimo masak: i'm wondering, how's your last name pronounced?
10:49 timotimo is the ä like what i'm used to in german?
10:49 masak yes, it is.
10:49 masak this is an Estonian ä, but by a stroke of luck it has the same pronunciation.
10:52 timotimo i see, thanks :)
10:52 timotimo oh, and is the s like in the english word "mess" or more like "mass"?
10:52 timotimo wait, that's the same
10:53 masak :P
10:53 timotimo never mind :|
10:53 jnthn phenny: tell moritz I took the liberty of merging latest nom into qast-sink-1. The tests look good here.
10:53 phenny jnthn: I'll pass that on when moritz is around.
10:53 masak the ä is long and carries the stress.
10:53 masak but I'm perfectly fine with people calling me "masak" in the Internet.
10:53 timotimo ah, i was thinking of words like "razor"
10:54 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 :)
10:54 GlitchMr 'Readability matters in a Perl programming contest..? So, this is one of those "no-win scenarios" that Kirk was talking about...'
10:54 GlitchMr hahaha
10:54 GlitchMr Why people think that Perl is unreadable?
10:54 masak no, the "s" isn't voiced like a "z".
10:55 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.
10:55 masak GlitchMr: and maybe there's a meme or two going around saying that Perl looks like modem line noise.
10:55 timotimo well, to be honest, perl 5 with its lack of function signatures would lead to a bit of confusion, don't you say?
10:56 masak I've seen beautifully written Perl 5 without function signatures.
10:56 GlitchMr Perl is actually one most consistent languages I've seen.
10:56 masak actually, the first beautiful Perl 5 I remember seeing is "Higher Order Perl".
10:57 timotimo GlitchMr: stop comparing every language to PHP! :(
10:57 GlitchMr one of*
10:57 GlitchMr timotimo: I don't even mean PHP.
10:57 GlitchMr In this case, I mean Ruby, Python 2 or C++.
10:58 GlitchMr Especially Ruby
10:58 GlitchMr When PHP has at most 1 alias for function, Ruby has LOTS of aliases.
10:59 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?
10:59 masak GlitchMr: so "consistent" means "non-redundant" to you? in that case, Perl 6 fails in some regards.
11:00 GlitchMr Yeah, I think it's less consistent than Perl 5.
11:00 * masak gives the .ords method the evil eye
11:00 GlitchMr I don't even mean ords.
11:01 GlitchMr I mainly mean lots of array and hash types
11:01 GlitchMr I'm confused about this.
11:01 GlitchMr Perl 5 only had arrays and references to those.
11:02 GlitchMr Also, .elems method.
11:02 jnthn masak: The ROADMAP still has:
11:02 jnthn 2 ***   quasiquote splicing
11:02 jnthn masak: Do you consider that done by now?
11:02 masak 11 signups so far. not bad for the first 14 hours.
11:02 masak jnthn: yes.
11:04 masak 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')
11:05 Su-Shee_ joined #perl6
11:05 masak Su-Shee_! \o/
11:06 timotimo the more i think about the cube world rain thingie, the harder it seems to be
11:06 timotimo since it says air can escape between cubes, caves would fill up even around bends up to the point where water escapes ...
11:07 sorear the cube world rain thing is not impossible.
11:07 sorear I think it's in FP, but I'm not certain yet
11:07 sorear definitely in EXPSPACE
11:08 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.
11:08 masak jnthn++
11:08 jnthn masak+= for making it work
11:08 jnthn uh, ++
11:10 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
11:11 sorear I'm sure masak++ already has a solution
11:11 sorear or maybe hakank
11:11 masak :)
11:11 masak in either case, think of the speed of the rain and/or drainage as being irrelevant to the problem.
11:11 timotimo ok
11:13 sorear the main case which I'm fighting with now is ... do Swedish bathroom sinks have P-traps below them?
11:13 wamba joined #perl6
11:14 sorear https://en.wikipedia.org/wiki/File:Vattenlaas.png
11:14 masak of course. we're not barbarians.
11:14 masak heh, that image even has a Swedish file name :P
11:15 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 sorear s/you/you Swedes/
11:17 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
11:17 masak there was a referendum.
11:18 masak the result of which was, "yeah, let's power down our nuclear plants and not build new ones".
11:18 masak that was several decades ago. the power plants are still up and running.
11:18 jnthn :/
11:18 sorear https://en.wikipedia.org/wiki/Swed​ish_nuclear_power_referendum,_1980
11:18 masak it's very hard to do nuclear power research in Sweden, because of laws which prevent you from actually building new power plants.
11:19 masak 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?
11:20 masak no, I have not.
11:20 moritz is there one?
11:20 phenny moritz: 10:53Z <jnthn> tell moritz I took the liberty of merging latest nom into qast-sink-1. The tests look good here.
11:20 masak I have heard James Bond's "strictly plutonic" pun, though.
11:20 moritz jnthn: thanks
11:20 jnthn Such laws mostly serve to keep old plants running when we really could replace them with much better designs.
11:20 jnthn er, much better designed ones
11:20 masak yes, as I understand it, fusion power has taken leaps and bounds in recent decades.
11:20 moritz jnthn: are you aware that it's your turn to post a p6advent post today?
11:21 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.
11:21 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
11:21 masak :(
11:21 sorear moritz: there are about 16.8 kg of the necessary isotope left in the world (as of 2009)
11:21 masak wow.
11:21 jnthn moritz: Just been doing a few little tasks while I wake up propertly today. About to start on it now :)
11:22 moritz jnthn: 's ok, no hurry. Just wanted to be sure you didn't forget
11:22 jnthn :)
11:22 masak ooh, I'm writing about operator precedence tomorrow! \o/
11:24 MayDaniel joined #perl6
11:25 masak PerlJam++ # is-prime advent post
11:25 GlitchMr My t3 can solve simplest case of 0123456789... this is progress :-)
11:26 * 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
11:27 GlitchMr The only t I've solved yet is t2.
11:27 GlitchMr It's actually simple.
11:27 sorear though I wouldn't object too much to a 1000kg reactor I could use on my Uranus-orbiting space station
11:28 * 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. :)
11:29 GlitchMr My t2 solution is 23 lines.
11:29 GlitchMr 13 actual lines.
11:31 GlitchMr The most interesting part is actual "dictionary" I'm using.
11:39 smi1er joined #perl6
11:39 masak hola, smiler.
11:40 masak nice to see your happy face here on #perl6.
11:40 masak rn: say "\x263a"
11:40 p6eval rakudo 8d4704, niecza v24-12-g8e50362: OUTPUT«☺␤»
11:44 masak p6cc contestants: I updated https://github.com/masak/p6​cc2012/blob/master/notes.md with two corrections.
11:44 masak tl;dr: the "on the form" phrasing stands. apostrophes are OK in haikus.
12:05 wamba joined #perl6
12:06 xinming joined #perl6
12:07 GlitchMr https://gist.github.com/4294244
12:07 GlitchMr The fun begins :-).
12:09 moritz X
12:09 masak ronja?
12:10 GlitchMr Now to support more complex cases, like 1234567890
12:10 moritz masak: no, there were lots of Xs in the gist :-)
12:11 grondilu joined #perl6
12:11 GlitchMr https://gist.github.com/4294274
12:11 GlitchMr I'm sure it's wrong
12:11 moritz t3 is more interesting than it seemed at first
12:12 GlitchMr I made lambda by accident
12:13 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:14 grondilu I mean, I like to show off but I feel a bit bad if I spoil.
12:16 grondilu ahh my tendency to show off wins:
12:17 xinming joined #perl6
12:18 masak ESTILLNODALEK
12:18 grondilu (?)  dalek did not show my update on perl6-examples
12:19 masak dalek did not show anything lately.
12:19 grondilu ok
12:19 grondilu well, here is what I was talking about:  https://github.com/perl6/perl6-examples​/blob/master/rosalind/afrq-grondilu.pl
12:20 dalek joined #perl6
12:20 tadzik hooray
12:20 jnthn \o/
12:20 jnthn (whoever did that)++ :)
12:21 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 :-)
12:27 GlitchMr https://gist.github.com/4294394
12:27 masak walk &
12:27 GlitchMr I know, it's just wrong
12:28 dalek perl6-examples: 2acf3e2 | (L. Grondin)++ | rosalind/README:
12:28 dalek perl6-examples: adding spoiler warning
12:28 dalek perl6-examples: review: https://github.com/perl6/perl​6-examples/commit/2acf3e2a2b
12:37 bowtie joined #perl6
12:40 hoelzro good afternoon, #perl6
12:41 FROGGS_ hi hoelzro
12:42 hoelzro so when I've finished with this advent calendar entry, how do I post it?
12:43 FROGGS_ you need editor privs
12:43 FROGGS_ masak, moritz and jnthn can give you
12:45 moritz hoelzro: I need either a wordpress.com username or an email address from you
12:46 hoelzro moritz: rob@hoelz.ro
12:46 hoelzro I'm guessing that people will be around today and tomorrow to review my writings? ;)
12:48 moritz I'm guessing so too
12:48 moritz hoelzro: invitation sent
12:51 GlitchMr I know, it's just wrong
12:51 GlitchMr ...
12:51 GlitchMr oops
12:51 GlitchMr Wrong tab
12:54 hoelzro moritz: thanks
12:54 wamba joined #perl6
12:56 hoelzro also, is anyone writing a post on the native code FFI?
12:56 hoelzro because that would be really cool
12:56 tadzik I wrote one last year
12:56 hoelzro to me, that's one of Perl 6's killer features
12:56 hoelzro oh, ok
12:56 hoelzro maybe a refresher couldn't hurt ;)
12:57 tadzik :) it could be updated for callbacks maybe
12:57 tadzik so, who wrote a cool binding recently?
12:58 geekosaur joined #perl6
13:02 tadzik are arrays of structs working?
13:03 tadzik implementing epoll() would be a win-win :)
13:05 rindolf joined #perl6
13:06 wamba joined #perl6
13:08 moritz tadzik: yes, I think they work
13:15 FROGGS_ tadzik: who is responsible for the structure of META.info?
13:18 tadzik FROGGS_: uh, me :)
13:18 ababo joined #perl6
13:19 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
13:20 tadzik basically, there are never too many fields there, a module manager may just ignore them
13:20 tadzik do you have a commit access to it?
13:21 FROGGS_ depends what "it" you mean
13:21 tadzik the spec, wherever it is :P
13:21 FROGGS_ hehe
13:22 FROGGS_ here it is, and I have commit access
13:22 FROGGS_ https://github.com/perl6/eco​system/blob/master/spec.pod
13:22 tadzik ok, feel free to add it :)
13:23 FROGGS_ ahh, author is optional there
13:23 FROGGS_ hmmm
13:24 tadzik it also talks about doc/, which I think I nuked some time ago :P
13:24 tadzik and the Makefile
13:25 FROGGS_ ya
13:28 FROGGS_ okay, for now I added a note in my proposal
13:29 moritz masak++ # t3 was fun
13:29 tadzik where is your proposal?
13:29 jnthn Done today's advent post :)
13:29 jnthn http://perl6advent.wordpress.com/201​2/12/15/day-15-phasers-set-to-stun/
13:29 FROGGS_ tadzik: https://github.com/FROGGS/p6-S11Versioning
13:29 jnthn Hopefully it's fine :)
13:30 felher \o/ new advent post
13:30 FROGGS_ jnthn++
13:30 dalek ecosystem: 8d0644d | tadzik++ | spec.pod:
13:30 dalek ecosystem: Update spec.pod to match the implementation
13:30 dalek ecosystem:
13:30 dalek ecosystem: This should probably be the other way around. I know, I know.
13:30 dalek ecosystem: review: https://github.com/perl6/e​cosystem/commit/8d0644d56d
13:31 tadzik FROGGS_: oh, good
13:31 tadzik jnthn++
13:31 tadzik speaking of advent, if anyone wants a sneak peek at coroutines post, please have it :)
13:32 bowtie joined #perl6
13:32 moritz jnthn: couldn't you have solved the $in_prompt stuff with a contextual instead?
13:32 tadzik (https://gist.github.com/4280548)
13:32 moritz fwiw I found LEAVE to be very handy in a case where I always need to adjust the current working directory before leading
13:33 moritz jnthn++ # nice post
13:34 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
13:35 tadzik wow, lots of good stuff in there :)
13:41 felher jnthn++ # yeah, nice post :)
13:47 GlitchMr http://dl.dropbox.com/u/63913412/cubeworld.png
13:47 GlitchMr This is so confusing...
13:48 moritz what's confusing about it?
13:50 GlitchMr I'm still trying to understand description
13:50 GlitchMr oh..
13:50 GlitchMr So I'm supposed to count water that is stuck in the blocks
13:50 moritz correct
14:00 pmurias joined #perl6
14:01 GlitchMr is run("bzzt\n"), qq[Unrecognized line: "bzzt"\n];
14:01 GlitchMr Fun test!
14:03 * moritz finds the obligation to do error handling rather annoying
14:04 GlitchMr I was using .eval... looks like it was incorrect
14:08 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…
14:08 p6eval ..rakudo cf2761: OUTPUT«().hash␤»
14:10 grondilu rn: say .perl given hash foo => "bar";
14:10 p6eval rakudo cf2761: OUTPUT«("foo" => "bar").hash␤»
14:10 p6eval ..niecza v24-12-g8e50362: OUTPUT«{"foo" => "bar"}.hash␤»
14:32 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␤»
14:32 p6eval ..rakudo cf2761: OUTPUT«bar foo␤»
14:33 * grondilu was expecting bar bar
14:33 spider-mario joined #perl6
14:33 GlitchMr https://github.com/masak/p6cc201​2/blob/master/t5/description.md
14:33 GlitchMr Somehow this reminds me t2, except they don't have to be equal.
14:34 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␤»
14:34 grondilu rn: sub f($str) { $_ = $str; return $_ if s/x/y/ or s/foo/bar/ }; say f "foo";
14:34 p6eval rakudo cf2761: OUTPUT«foo␤»
14:34 p6eval ..niecza v24-12-g8e50362: OUTPUT«bar␤»
14:35 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␤»
14:43 kaare__ joined #perl6
15:00 cosimo what's the "canonical way" of reading input from stdin?
15:05 pmurias jnthn: how can I check if something has QAST::SpecialArg mixed in?
15:06 Rotwang joined #perl6
15:15 GlitchMr https://gist.github.com/4296235
15:15 GlitchMr I've feeling that masak likes trolling me
15:16 cosimo http://stackoverflow.com/questions/13893392
15:16 GlitchMr Answering your question O_o.
15:16 cosimo if you have something to add :)
15:17 cosimo I decided to do this while I work on the contest
15:17 Rotwang wut?
15:18 cosimo there's nothing wrong in answering your own questions on SO
15:18 kivutar joined #perl6
15:19 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.
15:19 tadzik it seems to be answered in the same second as it was asked, which is even weirder
15:20 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
15:20 cosimo and, tadzik, the point is to make sure the next person that searches for it, finds it
15:20 GlitchMr http://blog.stackoverflow.com/2011/07/its​-ok-to-ask-and-answer-your-own-questions/
15:21 Rotwang it is a bit like masturbation
15:21 cosimo wtf?
15:21 tadzik I see
15:25 jnthn pmurias: nqp::istype($thingy, QAST::SpecialArg)
15:26 bpalmer joined #perl6
15:33 SamuraiJack joined #perl6
15:35 cosimo in a way, it's using SO as a searchable notepad
15:35 cosimo I thought of it when I saw http://www.learningperl6.com/​Chapters/07.input-output.html and all it had was wrong solutions
15:35 cosimo kind of sad
15:38 GlitchMr http://www.learningperl6.com/
15:56 cosimo right, but web searches turn up these results, with no frontpage explanation...
15:57 wamba joined #perl6
16:03 cosimo does perl6 have sets?
16:03 cosimo that is, lists that only have one instance of an element?
16:03 jnthn r: my $a = set(1,1,3,2); say $a.perl
16:03 p6eval rakudo cf2761: OUTPUT«set("1", "3", "2")␤»
16:04 felher cosimo: funny enough, there was a advent calendar blogpost just a few days ago about sets, bags, ...: http://perl6advent.wordpress.com/​2012/12/13/day-13-bags-and-sets/
16:05 cosimo cool
16:06 cosimo felher: jnthn: thanks
16:06 kivutar joined #perl6
16:14 Chillance joined #perl6
16:17 swanstomp joined #perl6
16:19 GlitchMr > (<a b> X 1, 2).map(*[0])
16:19 GlitchMr a 1 a 2 b 1 b 2
16:19 GlitchMr I'm trying to use X operator, except I want to access either 'a' or 'b'.
16:19 GlitchMr But .map flattens list to me
16:20 GlitchMr How can I protect the list I receive with X from flattening?
16:20 moritz .tree
16:20 GlitchMr Thanks
16:22 cosimo I didn't get it. example?
16:26 hoelzro so perl6.ops in the Rakudo tree; those implement custom opcodes for the Parrot VM to use?
16:32 cosimo what am I doing wrong here? https://gist.github.com/4296890
16:32 cosimo trying to add elements to a Set
16:36 timotimo need a KeySet, no?
16:37 timotimo oh
16:38 lichtkind joined #perl6
16:38 stevan_ joined #perl6
16:38 lichtkind there is still $() and @() ?
16:39 cosimo works if the set is a normal variable
16:39 cosimo r: my Set $x; $x := $x (|) 1; say $x.perl
16:39 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…
16:39 cosimo r: my $x = set(); $x := $x (|) 1; say $x.perl
16:39 p6eval rakudo cf2761: OUTPUT«set("1")␤»
16:39 cosimo aha
16:39 cosimo r: my $x = set(); $x = $x (|) 1; say $x.perl
16:39 p6eval rakudo cf2761: OUTPUT«set()␤»
16:40 cosimo now that i don't understand either
16:41 jnthn hoelzro: Yes
16:41 felher cosimo: you have to do:
16:41 jnthn hoelzro: A few small parts of Rakudo are written in C
16:41 felher r: my Set $x = Set.new(); $x := $x (|) 1; say $x.perl
16:41 p6eval rakudo cf2761: OUTPUT«set("1")␤»
16:41 lichtkind masak: can i have a chat?
16:42 hoelzro so, naively speaking, Rakudo creates opcodes with values greater than PARROT_MAX_OPCODE and provides the C implementation, right?
16:42 hoelzro I'm guessing that this is done for efficiency reasons?
16:43 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.
16:44 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)
16:44 hoelzro ok, good to know
16:44 hoelzro and that's what pir::method_name(...) is, yes?
16:45 cosimo r: my Set $x = set(); $x := $x (|) 1; say $x.perl
16:45 p6eval rakudo cf2761: OUTPUT«set("1")␤»
16:45 cosimo felher: right, thanks
16:45 felher cosimo: this works too, because 'set()' calls a function that creates a Set with 'Set.new()' :)
16:45 jnthn hoelzro: Yes, that's how they're called, but we hide most of them behind nqp::foo(...)
16:45 felher or better: 'set()' is a function that creates a set with 'Set.new()'
16:46 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" :)
16:47 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 :)
16:48 pmurias hoelzro: the former
16:48 hoelzro pmurias: so it's basically like an inline function call?
16:48 jnthn hoelzro: More like a macro. They're handled by QAST::Compiler.
16:48 pmurias they are turned into QAST::Op nodes
16:49 jnthn Right, that. The idea is they abstract the underlying VM.
16:49 hoelzro ok
16:49 hoelzro and what does QAST stand for?
16:49 jnthn pmurias++ is working on turning them into JavaScript, for example :)
16:49 hoelzro Quasi AST?
16:49 hoelzro ;)
16:49 jnthn Just "Q" :)
16:49 hoelzro heh
16:49 jnthn It replaced something known as PAST
16:49 jnthn P++ is Q :)
16:49 hoelzro ha
16:50 hoelzro so PAST was the Parrot AST, and the QAST is the improved version that NQP uses?
16:50 benabik PAST++ is PASS  ;-)
16:50 benabik Urrr...  PASU
16:50 benabik Stupid braino.
16:50 jnthn hoelzro: Yeah, I think that was the original naming.
16:51 jnthn 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 jnthn Also, we learned a few things in the years since PAST was created. :)
16:51 hoelzro I see
16:51 hoelzro it's a lot to take in
16:52 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
16:52 jnthn :)
16:53 hoelzro so when I type some code into the Rakudo REPL
16:53 hoelzro it's NQP that's doing the parsing, right?
16:55 * masak is back
16:55 hash_table joined #perl6
16:55 * masak logs back
16:55 jnthn hoelzro: The grammar is written in NQP yes
16:55 hoelzro ok
16:56 hoelzro 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:57 pmurias yes
16:57 pmurias assuming you count a single opcode as a series
16:58 hoelzro oh, right
16:58 hoelzro I was thinking if nqp::foo did more than just wrap pir::foo
16:59 Ultus joined #perl6
16:59 jnthn hoelzro: Sometimes it does, sometimes it doesn't.
16:59 hoelzro ok, makes sense
17:00 hoelzro jnthn, pmurias: thanks for the input =)
17:00 hoelzro I'm sure I'll have more questions later
17:02 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
17:02 zby_home_ joined #perl6
17:02 lichtkind masak: yes
17:03 hoelzro pmurias: such as?
17:03 masak in that case, just go ahead and chat. don't ask to ask. :)
17:03 pmurias hoelzro: setting up exception handling
17:04 pmurias hoelzro: nqp/src/QAST/Operations.nqp contains the op definitions
17:05 cosimo felher: thx :)
17:05 lichtkind masak: i kinda have to because my other chatclient is broken and i cant open private chats
17:06 masak lichtkind: uhm.
17:06 cosimo r: my Set $x = set(); $x := $x (|) 1; say $x.perl
17:06 p6eval rakudo cf2761: OUTPUT«set("1")␤»
17:06 masak r: my $in_prompt; sub issue_prompt { say ENTER { $in_prompt = True } }; issue_prompt
17:06 p6eval rakudo cf2761: OUTPUT«Nil␤»
17:06 cosimo r: class A { my Set $.x = set(); } my $a = A.new(); $a.x := $a.x (|) 1; say $a.x.perl
17:06 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/yvCOjUJWEC:1â�¤------> [32mclass A { my Set $.x = set(); } [33mâ��[31mmy $a = A.new(); $a.x := $a.x (|) 1; say[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤     …
17:07 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«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/sBckA2dwrZ:1â�¤------> [32mclass A { my Set $.x = set(); } [33mâ��[31mmy $a = A.new(); $a.x = $a.x (|) 1; say [0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤     …
17:07 masak r: my $in_prompt; sub issue_prompt { say ENTER { $in_prompt = True; 42 } }; issue_prompt
17:07 p6eval rakudo cf2761: OUTPUT«Nil␤»
17:07 masak jnthn: why is the return value of the ENTER block Nil?
17:07 jnthn masak: Probably 'cus it doesn't support r-value use.
17:08 cosimo r: class A { my Set $.x = set(); } my $a = A.new(); say $a.x.perl
17:08 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/wraw70UAjV:1â�¤------> [32mclass A { my Set $.x = set(); } [33mâ��[31mmy $a = A.new(); say $a.x.perl[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        stateme…
17:08 jnthn masak: Feel free to research in the spec if it should. :)
17:08 masak hokay.
17:08 jnthn And if the spec thinks it should, feel free to file a ticket :)
17:08 cosimo r: class A { my Set $.x = set(); } my $a = A.new(); say $a.x;
17:08 jnthn cosimo: missing ;
17:08 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/hAgWUi2cIq:1â�¤------> [32mclass A { my Set $.x = set(); } [33mâ��[31mmy $a = A.new(); say $a.x;[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement e…
17:09 jnthn Right where the yellow marker is
17:09 cosimo r: class A { my Set $.x = set(); }; my $a = A.new(); say $a.x;
17:09 p6eval rakudo cf2761: OUTPUT«set()␤»
17:09 cosimo aha :)
17:09 masak jnthn: I don't see anything in S04 says they're not rvalues.
17:10 masak jnthn: in fact, I'd expect ENTER to work as either an rvalue or lvalue in block form.
17:10 masak r: say ENTER { 42 }
17:10 p6eval rakudo cf2761: OUTPUT«Nil␤»
17:10 jnthn masak: Well, clearly a bunch of phasers are useless as l-values.
17:10 masak r: say ENTER 42
17:10 p6eval rakudo cf2761: OUTPUT«Nil␤»
17:10 jnthn er, rvalues I mean
17:10 masak jnthn: those that haven't happened yet, yes.
17:10 jnthn Like LEAVE :)
17:10 masak of course.
17:11 jnthn But yeah, I think ENTER should work
17:11 masak I'm not arguing against that :)
17:11 jnthn There's probably some nice things to do with it.
17:11 jnthn LEAVE say "We took {now - ENTER now}s to run";
17:11 jnthn For example
17:13 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")␤»
17:13 cosimo r: class A { my Set $.x = set(); }; my $a = A.new(); $a.x (|)= 1; say $a.x.perl
17:13 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/nEcXyMvMgs:1â�¤------> [32mt $.x = set(); }; my $a = A.new(); $a.x [33mâ��[31m(|)= 1; say $a.x.perl[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix or meta-infixâ�¤        infix…
17:14 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")␤»
17:14 GlitchMr https://gist.github.com/4297293
17:14 GlitchMr Now all I've to do is adding error checking
17:14 GlitchMr Why masak expects 'A mentions B but B doesn't say anything.' when I can give multiple solutions?
17:15 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:16 masak :)
17:16 GlitchMr Because it's English.
17:16 masak from what I've understood of haikus, the Japanese and western understandings of them are quite different.
17:16 masak Japanese count mori or whatever they're called.
17:17 TimToady I guess it's bandwidth revenge for not being able to use kanji on twitter.
17:18 TimToady they're still syllables, psychologically speaking, whatever you call 'em
17:18 masak you... can't use kanji on twitter!? o.O
17:19 TimToady Oh, I can, but most English speakers seem to have a bit of difficulty in that regard...
17:20 masak jnthn++ # nice p6advent post
17:20 masak TimToady: I guess they're holding out for a keyboard with all the kanji on it for easier typing. :)
17:22 hoelzro speaking of advent posts, does anyone want to proofread mine? ;)
17:22 masak sure thing.
17:22 hoelzro \o/
17:23 lichtkind r: "123.234.345.456" ~~ m/\d+ % '.'/;say $();
17:23 p6eval rakudo cf2761: OUTPUT«␤»
17:23 lichtkind r: "123.234.345.456" ~~ m:g/\d+ % '.'/;say $();
17:23 p6eval rakudo cf2761: OUTPUT«␤»
17:23 lichtkind r: "123.234.345.456" ~~ m:g/\d+ % '.'/;say $/;
17:23 p6eval rakudo cf2761: OUTPUT«Any()␤»
17:23 lichtkind r: "123.234.345.456" ~~ m:g/\d+ % '.'/;say $/[0];
17:23 p6eval rakudo cf2761: OUTPUT«Any()␤»
17:24 lichtkind r: "123.234.345.456" ~~ m:g/\d+/;say $/;
17:24 p6eval rakudo cf2761: OUTPUT«Any()␤»
17:24 masak lichtkind: you won't get any numbered captures if you don't have () inside the regex.
17:24 masak (\d+), probably.
17:24 lichtkind r: "123.234.345.456" ~~ m:g/\d+/;say $();
17:24 p6eval rakudo cf2761: OUTPUT«␤»
17:24 lichtkind ah
17:24 flussence oh wow, that phaser post is cool stuff
17:24 moritz also I don't think that m:g currently sets $/ in rakudo
17:24 lichtkind r: "123.234.345.456" ~~ m:g/(\d+) % '.'/;say $/;
17:24 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unrecognized regex metacharacter % (must be quoted to match literally)â�¤at /tmp/nQIYJQUFWP:1â�¤------> [32m"123.234.345.456" ~~ m:g/(\d+) [33mâ��[31m% '.'/;say $/;[0mâ�¤    expecting any of:â�¤        colon pair (restricted)â�¤        infix …
17:25 GlitchMr https://gist.github.com/4297375 :-)
17:25 moritz r: $_ = "123.234.345.456"; .say for m:g/\d+ % '.'/
17:25 p6eval rakudo cf2761: OUTPUT«「1」␤␤「2」␤␤「3.2」␤␤「3」␤␤「​4.3」␤␤「4」␤␤「5.4」␤␤「5」␤␤「6」␤␤»
17:25 moritz r: $_ = "123.234.345.456"; .say for m:g/[\d+]+ % '.'/
17:25 p6eval rakudo cf2761: OUTPUT«「123.234.345.456」␤␤»
17:25 flussence r: sub timer(&foo) { LEAVE say "{now - ENTER now} seconds"; &foo(); }; say timer({ sleep 5; 'bar' });
17:25 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 $/;
17:26 p6eval rakudo cf2761: OUTPUT«Any()␤»
17:26 flussence hm
17:26 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.
17:26 moritz lichtkind: as I said, m:g doesn't set $/
17:26 hoelzro masak: oh, ok
17:26 masak hoelzro: especially when you're the one writing the FAQ ;)
17:26 masak some small rewrite would probably fix it.
17:27 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..."
17:27 lichtkind r: $_ = "123.234.345.456"; .say for m/[\d+]+ % '.'/
17:27 p6eval rakudo cf2761: OUTPUT«「123.234.345.456」␤␤»
17:27 GlitchMr Now to think about hardest problem. The wires problem. While I already pass tests, my program isn't valid.
17:28 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+]+ % '.'/
17:28 flussence {now - INIT now} works, but {now - ENTER now} doesn't :(
17:28 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/ZNIYxIMIXw:1â�¤------> [32m$_ = "123.234.345.456"; .say [33mâ��[31mm/[\d+]+ % '.'/[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        â€¦
17:28 hoelzro masak: so you currently need NQP to build NQP?
17:28 hoelzro or is there yet another Perl 6 implementation that's used to bootstrap it?
17:28 masak hoelzro: I forget the exact steps to bootstrap NQP from nothing.
17:28 jnthn None of NQP is written in PIR any more.
17:29 masak oh, even what jnthn said.
17:29 jnthn It's all written in NQP, a few Q:PIR blocks aside.
17:29 moritz you need NQP to compile NQP
17:29 flussence r: sub timer(&foo) { my \then = now; LEAVE say "{now - then} seconds"; &foo(); }; say timer({ sleep 2; 'bar' });
17:29 p6eval rakudo cf2761: OUTPUT«2.0143803 seconds␤bar␤»
17:29 lichtkind r: $_ = "123.234.345.456"; .say m:g/[\d+]+ % '.'/
17:29 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/q2abYLc0ux:1â�¤------> [32m$_ = "123.234.345.456"; .say [33mâ��[31mm:g/[\d+]+ % '.'/[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤      â€¦
17:29 jnthn The way we do it is to ship the compiled PIR output
17:29 hoelzro oh, I see
17:29 jnthn You build that, then use it to build NQP
17:29 lichtkind r: $_ = "123.234.345.456"; .say if m:g/[\d+]+ % '.'/
17:29 p6eval rakudo cf2761: OUTPUT«123.234.345.456␤»
17:29 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;
17:29 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse expression in block; couldn't find final '}'â�¤at /tmp/4iz4qEOhrW:1â�¤------> [32mmy $a = A.new(); $a.y(1); say $a.x.perl;[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤        infix o…
17:29 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;
17:29 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␤␤»
17:29 jnthn The compiled output we provide tends to be some versions old, but it's always good enough to build the latest thing.
17:29 lichtkind thanks moritz
17:29 lichtkind r: $_ = "123.234.345.456"; .say if m/[\d+]+ % '.'/
17:29 p6eval rakudo cf2761: OUTPUT«123.234.345.456␤»
17:30 lichtkind r: $_ = "123.234.345.456"; .say if m/[\d+] % '.'/
17:30 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unrecognized regex metacharacter % (must be quoted to match literally)â�¤at /tmp/9PyVEXknGx:1â�¤------> [32m$_ = "123.234.345.456"; .say if m/[\d+] [33mâ��[31m% '.'/[0mâ�¤    expecting any of:â�¤        method argumentsâ�¤        postfixâ�¤    â€¦
17:30 lichtkind r: $_ = "123.234.345.456"; .say if m/[\d]+ % '.'/
17:30 p6eval rakudo cf2761: OUTPUT«123.234.345.456␤»
17:32 cosimo i need help, why is this a readonly variable?
17:32 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;
17:32 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␤␤»
17:32 masak cosimo: because all attributes are readonly by default.
17:33 masak cosimo: need to declare them 'is rw' to make them writable after construction.
17:33 masak hm, all public ('.') attributes, I should say.
17:33 masak the private ('!') ones are read-write by default.
17:34 masak (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
17:34 cosimo 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;
17:34 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␤␤»
17:35 masak hm. it should.
17:35 cosimo masak: obviously I'm ignoring something
17:35 masak cosimo: try changing the assignment to be '$!x = ...'
17:35 masak shouldn't be necessary, but it may help.
17:35 wamba joined #perl6
17:35 cosimo I tried moving the initial assignment to a method BUILD, but I got other more mysterious errors
17:37 cosimo 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«[31m===[0mSORRY![31m===[0mâ�¤Cannot use ! twigil on my variableâ�¤at /tmp/w8Bphf2tvv:1â�¤------> [32mclass A { my Set $!x is rw [33mâ��[31m= set(); method y($e) { $!x = $!x (|) $e[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤        constraintâ�¤Â»â€¦
17:38 cosimo private var seems to work, despite this error
17:38 cosimo r: class A { my Set $!x = set(); method y($e) { $!x = $!x (|) $e; say $!x.perl } }; my $a = A.new(); $a.y(1);
17:38 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Cannot use ! twigil on my variableâ�¤at /tmp/gTdNQ4TVjg:1â�¤------> [32mclass A { my Set $!x [33mâ��[31m= set(); method y($e) { $!x = $!x (|) $e[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤        constraintâ�¤Â»
17:38 cosimo r: class A { has Set $!x = set(); method y($e) { $!x = $!x (|) $e; say $!x.perl } }; my $a = A.new(); $a.y(1);
17:38 p6eval rakudo cf2761: OUTPUT«set()␤»
17:38 masak cosimo: oh!
17:39 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'.
17:39 cosimo but set is empty
17:40 dalek rakudo-js: bedc2f8 | (Paweł Murias)++ | / (2 files):
17:40 dalek rakudo-js: [nqp] change the calling convetion to pass ctx along
17:40 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/bedc2f81de
17:40 dalek rakudo-js: c6551d2 | (Paweł Murias)++ | / (2 files):
17:40 dalek rakudo-js: [nqp] remove a unused method
17:40 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/c6551d23cb
17:41 masak r: my $s = set; my $e = 5; $s = $s (|) $e; say $s.perl
17:41 p6eval rakudo cf2761: OUTPUT«set()␤»
17:41 masak huh!
17:41 masak not how I expect (|) to work... :/
17:41 * masak reads source
17:41 masak r: my $s = set; my $e = 5; say ($s (|) $e).perl
17:41 p6eval rakudo cf2761: OUTPUT«set("5")␤»
17:42 masak something is wrong when doing both '=' and '(|)'
17:42 * masak submits rakudobug
17:42 jnthn masak: iirc, colomon++ mentioned he copied the precedence from STD
17:42 jnthn masak: But it's suspect.
17:42 * masak submits the ENTER rakudobug, too
17:43 jnthn Or something like...
17:43 colomon Not from STD.
17:43 jnthn Ah, where from?
17:43 colomon I think that was the precedence TimToady had on it.
17:43 jnthn OK
17:43 * colomon wonders were the original Set implementation is on his hard drive.
17:43 jnthn Seems a bit surprising to me.
17:43 colomon definitely feels wrong to me after having tried it.
17:44 jnthn yeah
17:44 colomon What is the precedence of X and Z?
17:44 colomon rn: my @a = 1, 2, 3 X 2, 3, 6; say @a;
17:44 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␤»
17:44 colomon rn: my @a = 1, 2, 3 (|) 2, 3, 6; say @a;
17:45 p6eval niecza v24-12-g8e50362: OUTPUT«set(1, 2, 3, 6)␤»
17:45 p6eval ..rakudo cf2761: OUTPUT«1 2 3 6␤»
17:45 jnthn oh
17:45 jnthn r: my $s = set; my $e = 5; $s = $s (|) $e; say $s.perl
17:45 p6eval rakudo cf2761: OUTPUT«set()␤»
17:45 jnthn r: my :s := set; my $e = 5; $s := $s (|) $e; say $s.perl
17:45 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Malformed myâ�¤at /tmp/jPa6RgLy4t:1â�¤------> [32mmy [33mâ��[31m:s := set; my $e = 5; $s := $s (|) $e; s[0mâ�¤    expecting any of:â�¤        scoped declaratorâ�¤Â»
17:45 jnthn grr
17:45 jnthn r: my @s := set; my $e = 5; @s := @s (|) $e; say $s.perl
17:45 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable $s is not declared�at /tmp/H1Qsawf9wD:1�------> [32m set; my $e = 5; @s := @s (|) $e; say $s[33m�[31m.perl[0m�»
17:46 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␤␤»
17:46 jnthn ah, yeah
17:46 colomon rn: my @a = 1, 2, 3 (|) 2, 3, 6; say @a.perl;
17:46 p6eval rakudo cf2761: OUTPUT«Array.new("1", "2", "3", "6")␤»
17:46 p6eval ..niecza v24-12-g8e50362: OUTPUT«[set("1", "2", "3", "6")].list␤»
17:46 jnthn I wonder if it's the $ meaning that it's item assignment that blows it.
17:47 colomon did i get the precedence wrong in Rakudo?  I would have thought they'd behave the same.
17:48 jnthn colomon: That looks like a list assignment issue not a precedence one.
17:48 jnthn 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
17:50 masak because people upvoted, p6cc is now number 12 on http://www.reddit.com/r/programming/ \o/
17:51 masak people++
17:51 * hoelzro goes to upvote
17:52 masak ...and suddenly we're number 11! :D
17:53 pmurias jnthn: I get a strange error http://pastie.org/5536018
17:54 benabik upbeats from everyone!
17:54 benabik Uhm.  *upboats
17:54 pmurias "Cannot take a substring outside a string"
17:55 pmurias and there is no substring anywhere
17:55 pmurias (under current rakudo-star)
17:55 jnthn pmurias: Odd. Just ran it with nqp 80fed8e and it worked fine.
17:56 jnthn pmurias: Can't think of anything that woulda broke/fixed it of late.
17:57 pmurias hmm
17:58 pmurias we need an nqpbrew ;)
17:59 jnthn .oO( I want to start a project called "micro", just so we can be like, "I need a microbrew" )
18:00 pmurias that will be a grant proposal title? ;)
18:01 masak "I need a microbrew", grant proposal by jnthn. :D
18:01 jnthn :D
18:01 masak someone give this man a microbrew! :P
18:06 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?
18:08 moritz jnthn: release is in the upcoming week, right?
18:09 jnthn moritz: Thu
18:09 jnthn moritz: I think if it's going into the release, I'd rather see it merged this weekend.
18:09 jnthn So we've some days to notice any issues.
18:10 moritz I think I'd prefer to wait until after the release
18:10 moritz because there'll be lots of module code with dodgy assumptions
18:10 jnthn moritz: Yeah, I can imagine that.
18:11 jnthn 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
18:11 jnthn We've got a good amount of stuff to be happy about in the December release.
18:11 jnthn Especially the improved errors.
18:13 moritz aye, I like those :-)
18:13 jnthn and 30x faster junction auto-threading... :)
18:13 jnthn ooh, and terms :)
18:14 moritz they were a surprisingly easy patch
18:16 jnthn Did you get chance to think any more on the throwing multiple errors for the panic/sorry/worry distinction?
18:17 jnthn 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 colomon rn: my $a = 1, 2, 3 (|) 2, 4, 6; say $a.perl
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
18:17 p6eval rakudo cf2761, niecza v24-12-g8e50362: OUTPUT«1␤»
18:17 colomon rn: my %a := 1, 2, 3 (|) 2, 4, 6; say %a.perl
18:17 p6eval rakudo cf2761, niecza v24-12-g8e50362: OUTPUT«set("1", "2", "3", "4", "6")␤»
18:18 jnthn moritz: Any idea for a name?
18:18 diakopter XX ?
18:18 jnthn :P
18:18 moritz X::Group ?
18:18 jnthn X::Comp::Group maybe?
18:19 moritz hm yes
18:19 jnthn Not sure Group quite rings right but...renaming is easy I guess
18:19 jnthn The only thing that worries me is...
18:20 jnthn 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
18:20 p6eval rakudo cf2761: OUTPUT«===SORRY!===␤Can not bind attribute '$!signature' declared in class 'Code' with this object␤»
18:20 p6eval ..niecza v24-12-g8e50362: OUTPUT«Block()␤»
18:21 jnthn Now the test will break because the thing it used to get is inside the X::Comp::Group.
18:21 jnthn Also if we worry about something, the same.
18:21 moritz true
18:21 diakopter rn: my $a = Block; class Block { }; say Block === $a
18:21 p6eval niecza v24-12-g8e50362: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤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…
18:21 p6eval ..rakudo cf2761: OUTPUT«===SORRY!===␤Can not bind attribute '$!signature' declared in class 'Code' with this object␤»
18:22 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
18:23 jnthn We've discussed this plenty of times before.
18:23 moritz becaues the compiler uses Block for, well, constructing blocks :-)
18:23 jnthn Right
18:23 moritz same with most other built-in classes
18:23 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".
18:23 jnthn But there's no spec to say so, and the usual Perl 6 behavior is "nearest definition wins".
18:24 moritz panda doesn't work on qast-sink-1
18:24 jnthn eek
18:24 moritz now rebuilding nom to compare
18:29 jnthn store, bbiab
18:36 masak moritz++ had a question about the rain and the cube world: https://gist.github.com/c90dc8d7596e4551faf7
18:36 masak posting it here. I may throw it into notes.md, too.
18:37 am0c joined #perl6
18:41 popl joined #perl6
18:49 masak oh, by the way. if no-one else volunteers for slot 24 of the advent calendar, I will write it.
18:49 masak 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.
18:50 moritz ++masak
18:50 masak oh, and it seems I'm cutting the release on Thursday :)
18:55 colomon masak++
19:15 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:19 SamuraiJack joined #perl6
19:47 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:52 erkan joined #perl6
19:52 erkan joined #perl6
19:55 sorear masak: what would 24 be about?
19:56 FROGGS_ maybe .wrap and .unwrap?
19:56 FROGGS_ if there is something interesting to tell
20:04 larks joined #perl6
20:04 larks joined #perl6
20:06 kthakore joined #perl6
20:06 kthakore hi guys
20:06 sorear yo kthakore
20:06 kthakore I am going through the perl6 book. And in ch2 I was looking at 'string'.split
20:06 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
20:06 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)␤»
20:06 japhb er, that was a weird braino
20:06 kthakore so I tried 'string'.match('n'); It gives back this: > 'string'.match('n');
20:06 kthakore 「n」
20:06 kthakore what does that mean?
20:07 kthakore hi sorear
20:07 sorear kthakore: it matched "n"
20:07 kthakore oh what are the chracters before and after the n ?
20:07 REPLeffect joined #perl6
20:07 sorear halfwidth Japanese corner quotes
20:07 kthakore ooooooooooooh
20:07 * kthakore facepalms
20:08 kthakore 」?
20:08 FROGGS_ hi kthakore
20:08 kthakore hi FROGGS_
20:08 sorear I wasn't really paying attention but I think we decided to use them because they're virtually never used in real text
20:08 sorear .u 」
20:08 phenny U+FF63 HALFWIDTH RIGHT CORNER BRACKET (」)
20:08 FROGGS_ these things are just there to show you the output
20:08 kthakore OOOh so they are not in the output?
20:08 japhb re: http://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
20:08 FROGGS_ kthakore: right
20:09 kthakore my @found = 'string'.match('n'); should be just ['n'] ?
20:09 kthakore IT IS
20:09 kthakore I am learning
20:09 kthakore \o/
20:09 sorear kthakore: the Match object gistifies to the matched text wrapped in angle brackets
20:09 kthakore cool
20:10 sorear if you do 'string'.match('n').Str you will get just the matched text
20:10 kthakore so my $found = 'string'.match('n')
20:10 sorear if you do 'string'.match('n').from you will get the position
20:10 kthakore will ahve the angle bracket in them
20:10 sorear no, $found will have a Match object
20:10 sorear not a string
20:10 FROGGS_ r: say 'string'.match('n').WHAT
20:10 p6eval rakudo cf2761: OUTPUT«Match()␤»
20:10 FROGGS_ r: say 'string'.match('n').perl
20:10 p6eval rakudo cf2761: OUTPUT«Match.new(orig => "string", from => 4, to => 5, ast => Any, list => ().list, hash => EnumMap.new())␤»
20:10 kthakore oh cool
20:11 kthakore look at you all fancy mr. FROGGS_
20:11 FROGGS_ ;o)
20:11 kthakore ^5 FROGGS_
20:11 FROGGS_ welcome to Perl 5++ :P
20:11 kthakore cool
20:11 masak sorear: 24 would be about "What Perl 6 has taught me about programming and PL design"
20:15 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:16 FROGGS_ ... where I would get Decrease, Same or Increase
20:17 TimToady cmp
20:17 cogno joined #perl6
20:17 FROGGS_ thanks, I thought I tried that and had weird results... will try again
20:17 TimToady could certainly be buggy
20:17 FROGGS_ r: say Version.new('1.0.3') cmp Version.new('1.0.5')
20:17 p6eval rakudo cf2761: OUTPUT«Increase␤»
20:18 FROGGS_ looks good
20:19 FROGGS_ ahh, I was stupid, I must do reverse ordering for what I am doing -.-
20:21 kthakore 0o
20:21 FROGGS_ kthakore: sup?
20:21 kthakore FROGGS_: what are you talking? *shakes FROGGS_ *
20:21 FROGGS_ I have a list of installed modules, and want to get the one with the highest version when I do: use Dog
20:21 kthakore oh how is SDL6 module? Is all my old work borked?
20:22 FROGGS_ well, I started from scratch, yes
20:22 FROGGS_ no pir stuff, so it will be portable
20:22 kthakore cool
20:22 kthakore repo?
20:23 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: https://github.com/PerlGameDev/SDL6
20:23 kthakore oh right
20:24 kthakore is it on panda?
20:24 kthakore or what is that called?
20:24 diakopter where in my program could be calling Numeric?
20:24 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)
20:25 kthakore ok
20:25 kthakore how do I install, test etc?
20:25 jnthn diakopter: Do you have a $max?
20:25 diakopter what is a $max
20:25 FROGGS_ diakopter: maybe if you have a string containing a number and doing maths on it?
20:25 jnthn diakopter: Anything that puts something in numeric context calls .Numeric
20:25 jnthn r: my $a; say $a * 3
20:25 p6eval rakudo cf2761: OUTPUT«use of uninitialized variable $a of type Any in numeric context  in block  at /tmp/LL0KH8hnI7:1␤␤0␤»
20:25 diakopter no $max
20:26 FROGGS_ kthakore: https://github.com/tadzik/panda/
20:26 jnthn OK, then one of the built-ins you're calling must have a $max
20:27 jnthn 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
20:27 diakopter I wish the unitialized warning would have a full stack trace
20:27 diakopter no other modules
20:28 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
20:28 diakopter well, it's not in a regex in my program
20:29 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 FROGGS_ or use the debugger and skip through
20:32 japhb jnthn++ # Excellent advent calendar post
20:32 japhb 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.
20:32 GlitchMr perl6: sub term:<2 + 2> { 5 }; say 2 + 2; say 2 + 3;
20:32 p6eval niecza v24-12-g8e50362: OUTPUT«[31m===[0mSORRY![31m===[0m��Unable to parse term:sym<2 + 2> at /tmp/gdQP5D_NSm line 1:�------> [32msub term:<2 + 2> { 5 }; say 2 + 2; say [33m�[31m2 + 3;[0m�Couldn't find final '+ 2'; gave up at /tmp/gdQP5D_NSm line 1 (EOF):�------> [32merm:<2 + 2…
20:32 p6eval ..rakudo cf2761: OUTPUT«5␤5␤»
20:32 diakopter FROGGS_: one problem is I wrote 70 lines before running it once.
20:33 GlitchMr std: sub term:<2 + 2> { 5 }; say 2 + 2; say 2 + 3;
20:33 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a row at /tmp/NKDB7pLXVp line 1:â�¤------> [32msub term:<2 + 2> { 5 }; say 2 + [33mâ��[31m2; say 2 + 3;[0mâ�¤    expecting any of:â�¤       infix or meta-infixâ�¤    infixed functionâ�¤       statement modifier loopâ�¤Parse failedâ�¤FAILED 00:00
20:33 p6eval ..48m␤…
20:33 kthakore FROGGS_: resolve stage failed for SDL6: Project SDL6 not found in the ecosystem
20:33 FROGGS_ kthakore: it is called SDL
20:33 kthakore ooh
20:34 * 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:37 kthakore FROGGS_: it le fails. Cannot import symbol &trait_mod:<is>
20:37 lue hello world o/
20:37 kthakore how to fix it?
20:38 FROGGS_ kthakore: find the bug in rakudo
20:38 kthakore where do I look?
20:38 kthakore is the other compiler working?
20:39 FROGGS_ niecza? it has no NativeCall afaik
20:39 FROGGS_ kthakore: the code is on github (rakudo and nqp)
20:40 FROGGS_ but it is not that easy to track dont, I spent about 25 hours and then gave up
20:40 FROGGS_ jnthn knows about it
20:40 kthakore dang ok
20:40 kthakore what is the smallest test case for this bug?
20:41 kthakore 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};
20:41 jnthn japhb: Glad you took something from it. :)
20:41 FROGGS_ kthakore: create two modules, put a trade_mod:<is> to each (with different signatures), and try to use both from a third module
20:42 jnthn diakopter: Easily? :)
20:42 geekosaur diakopter, doesn't that just get you the value at %hash{$coord} ?
20:42 FROGGS_ diakopter: what is in %hash{$coord} ?
20:42 diakopter a hash
20:42 geekosaur unless that heppens to be a hash...
20:42 jnthn diakopter: You're looking up a single thing from a hash.
20:42 jnthn If it turns out to be something other than a hash, you'll get that error
20:43 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
20:43 diakopter erm.
20:43 lue (I'm definitely using  now - INIT now  from now on)
20:44 jnthn diakopter: It copies the things.
20:44 diakopter how do I not copy the things
20:44 jnthn Do binding.
20:44 diakopter ah
20:45 kthakore FROGGS_: okie
20:45 GlitchMr https://github.com/perl6/book/downloads
20:45 GlitchMr Just wondering, what will happen with Perl 6 Book?
20:46 jnthn GlitchMr: Whatever people have time/interest/motivation to make happen
20:47 GlitchMr Well, the problem is that it uses GitHub Downloads
20:47 jnthn Oh, I see...
20:47 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
20:48 Chillance joined #perl6
20:52 japhb jnthn: re: http://irclog.perlgeek.de/​perl6/2012-12-14#i_6243989 any more brilliant ideas in the last day or so?
20:53 jnthn japhb: I'm wondering if sink context will help too.
20:54 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
20:54 GlitchMr ([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
20:54 GlitchMr Binary :-)
20:56 masak hm, in src/core/Set.pm, I don't see the operators being given any associativity at all...
20:57 jnthn masak: Grammar.pm
20:57 jnthn GlitchMr: cute :)
20:57 japhb jnthn, What else might the X fix help?
20:58 jnthn r: ((1, 2, 3) Z (4, 5, 6)).perl.say
20:58 p6eval rakudo cf2761: OUTPUT«((1, 4), (2, 5), (3, 6)).list␤»
20:58 jnthn That also
20:58 jnthn Basically, anything that produces a list of parcels.
20:58 japhb Ah, OK
20:58 jnthn And then puts them in flattening context.
21:00 masak jnthn: I see.
21:01 masak jnthn: I expected to find something like 'is equiv' in src/core.
21:02 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.
21:02 GlitchMr Anyway, bye
21:02 GlitchMr t1*
21:02 FROGGS_ bye
21:04 masak advent post for tomorrow scheduled over at Wordpress.
21:04 masak feel free to review and comment.
21:04 FROGGS_ cool!
21:06 pmurias what's the value of try when an exception is thrown?
21:07 pmurias (and caught)
21:08 masak pmurias: could you construct a case where that happens?
21:08 masak the question seems meaningless or obvious to me at first glance.
21:08 masak r: say try 42
21:08 p6eval rakudo cf2761: OUTPUT«42␤»
21:09 masak r: say try die "whoa!"; CATCH { default { say "oh well" } }
21:09 p6eval rakudo cf2761: OUTPUT«whoa!␤  in block  at /tmp/mc843rVuCZ:1␤␤»
21:09 masak r: sub foo { say try die "whoa!"; CATCH { default { say "oh well" } } }; foo
21:09 p6eval rakudo cf2761: OUTPUT«whoa!␤  in sub foo at /tmp/4DKWr1516F:1␤  in block  at /tmp/4DKWr1516F:1␤␤»
21:09 masak hm, I thought this was the way to handle exceptions...
21:09 jnthn you want the block form of try
21:10 masak does it matter?
21:10 jnthn If you want that CATCH to handle the exception in the try, yes.
21:10 masak r: sub foo { say try { die "whoa!" ; CATCH { default { say "oh well" } } }; foo
21:10 pmurias masak: experimentation suggests it's NQPMu
21:10 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse expression in block; couldn't find final '}'â�¤at /tmp/puKIxIgF2b:1â�¤------> [32mTCH { default { say "oh well" } } }; foo[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        argument listâ�¤        postfixâ�¤        infix or m…
21:10 masak r: sub foo { say try { die "whoa!" }; CATCH { default { say "oh well" } } }; foo
21:10 p6eval rakudo cf2761: OUTPUT«whoa!␤  in sub foo at /tmp/P7z1xT0ocA:1␤  in block  at /tmp/P7z1xT0ocA:1␤␤»
21:10 jnthn pmurias: Don't rely on NQP to get anything exceptiony to spec.
21:10 masak r: sub foo { say try { die "whoa!"; CATCH { default { say "oh well" } } } }; foo
21:10 p6eval rakudo cf2761: OUTPUT«oh well␤whoa!␤  in sub foo at /tmp/DgXQ59d72c:1␤  in block  at /tmp/DgXQ59d72c:1␤␤»
21:10 jnthn pmurias: As in, it'll do different things to Rakudo, and Rakudo is righter.
21:11 masak I must be too tired to understand this.
21:11 jnthn I think Rakudo presently hands back the exception.
21:11 jnthn Which .gists as masak showed.
21:11 pmurias but in nqp I should return NQPMu?
21:11 jnthn pmurias: Yeah, that's fine.
21:12 jnthn I think the right answer for Perl 6 may be Nil
21:12 jnthn And we've no Nil in NQP
21:15 Rotwang joined #perl6
21:19 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 pmurias japhb: This is nqp version 2012.11 built on parrot 4.6.0 revision 0
21:33 dalek rakudo-js: 45ac09b | (Paweł Murias)++ | / (3 files):
21:33 dalek rakudo-js: [nqp] pass test 44, resumable exceptions
21:33 dalek rakudo-js: review: https://github.com/pmurias/​rakudo-js/commit/45ac09bd1d
21:34 lue r: say "A " ~~ /<.alpha>+/
21:34 p6eval rakudo cf2761: OUTPUT«「A」␤␤»
21:34 lue r: grammar G { rule TOP { <ad> }; rule ad { <.alpha>+ };}; say G.parse("ABcd ");
21:34 p6eval rakudo cf2761: OUTPUT«「ABcd 」␤ ad => 「ABcd 」␤␤»
21:36 * lue just realized he mixed up the meanings of rule, regex, and token
21:37 jnthn r: /<[a-z]>/
21:37 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0m�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�------> [32m/<[a-[33m�[31mz]>/[0m�»
21:45 cogno joined #perl6
21:47 pmurias doesn't $_,$!,$/ hurt inlining?
21:48 pmurias as even when we inline a sub we have to keep those from it so OUTER works correctly?
21:48 cogno_ joined #perl6
21:48 masak not if we know that we don't reference them.
21:49 pmurias sub foo {bar()}
21:50 pmurias 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:51 FROGGS_ japhb: my S11 implementation is working so far! see https://github.com/FROGGS/p6-S11Versioning
21:51 masak hm, isn't OUTER merely a lexical thing?
21:52 masak in that case, what does it have to do with bar()?
21:52 pmurias masak: sorry meant CALLER
21:52 masak the relation between &foo and &bar here is a CALLER relation, not OUTER.
21:52 masak ah.
21:52 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
21:53 masak pmurias: but aren't $_ et al. lexically scoped?
21:53 masak oh, I think I see what you mean.
21:53 masak yes, we'd have to prove that &bar doesn't use CALLER in order to inline without changing anything.
21:54 masak put differently, any use of CALLER would make a function like &bar ineligible for inlining.
21:55 pmurias masak: but it's &foo we want to inline
21:55 pmurias masak: $_ et al. are lexically scoped, but they are also dynamic
21:56 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 masak pmurias: something like sub foo { $x + 2 }
21:57 masak where it's clear that we don't use $_,$!,$/
21:57 masak and so we can inline it.
21:57 masak I agree that it's problematic if we have a bar() call in there.
21:57 masak the conservative thing to do is not to inline &foo then. maybe we can improve on that.
21:58 masak 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.
21:58 masak 'night, #perl6
21:58 jnthn 'night, masak
21:58 pmurias 'night
21:58 lue r: my @a[*;3]; @a = [1,2,3],[4,5,6]; say @a;
21:58 p6eval rakudo cf2761: OUTPUT«[31m===[0mSORRY![31m===[0m�Shaped variable declarations is not yet implemented. Sorry. �at /tmp/bsl2thmpUU:1�------> [32mmy @a[*;3][33m�[31m; @a = [1,2,3],[4,5,6]; say @a;[0m�»
21:58 lue :(
22:01 pmurias is there a workaround around that problem? other than analysing the use of caller/OUTER/etc.?
22:03 jnthn Think it's probably just a matter of more analysis.
22:04 pmurias it seems we will need tons of analysis for good performance ;)
22:08 pmurias would declaring $!,$_,$/ only when mentioned be a big problem for users? (like with @_ and %_)
22:10 jnthn $/ is often set by a callee
22:21 pmurias is it accessed by a callee often?
22:21 PacoAir_ joined #perl6
22:23 AndChat|356841 joined #perl6
22:29 dalek rakudo/stdier: 9ca1831 | jnthn++ | src/Perl6/World.pm:
22:29 dalek rakudo/stdier: Prevent infinite errors when compiling setting.
22:29 dalek rakudo/stdier:
22:29 dalek rakudo/stdier: It used to be OK to call panic if we couldn't construct the error
22:29 dalek rakudo/stdier: object. However, now panic always throws an X::Comp::AdHoc, so that
22:29 dalek rakudo/stdier: made an infinite loop of trying to throw.
22:29 dalek rakudo/stdier: review: https://github.com/rakudo/rakudo/commit/9ca1831de3
22:29 dalek rakudo/stdier: 66b8383 | jnthn++ | src/Perl6/World.pm:
22:29 dalek rakudo/stdier: Split exception construction and throwing.
22:29 dalek rakudo/stdier: review: https://github.com/rakudo/rakudo/commit/66b8383cfb
22:29 dalek rakudo/stdier: c9a977a | jnthn++ | src/Perl6/Grammar.pm:
22:29 dalek rakudo/stdier: Provide panic/sorry/worry versions of things.
22:29 dalek rakudo/stdier:
22:29 dalek rakudo/stdier: They all currently do what panic does, but this will let us start to
22:29 dalek rakudo/stdier: split out the semantics of them.
22:29 dalek rakudo/stdier: review: https://github.com/rakudo/rakudo/commit/c9a977a762
22:29 dalek rakudo/stdier: d23ab1e | jnthn++ | src/Perl6/Grammar.pm:
22:29 dalek rakudo/stdier: panic/sorry/worry delegate to typed variants.
22:29 dalek rakudo/stdier: review: https://github.com/rakudo/rakudo/commit/d23ab1ea98
22:29 dalek rakudo/stdier: d7c2661 | jnthn++ | src/Perl6/ (2 files):
22:29 dalek rakudo/stdier: Switch panic to sorry where STD does.
22:29 dalek rakudo/stdier:
22:29 dalek rakudo/stdier: They don't behave differently just yet; this is just preparation.
22:29 dalek rakudo/stdier: review: https://github.com/rakudo/rakudo/commit/d7c26610a0
22:31 pmurias jnthn: changing the spec the way I proposed would hurt composability so it's likely a bad idea
22:41 AndChat|356841 joined #perl6
22:41 wamba joined #perl6
22:43 _jaldhar_ joined #perl6
22:59 _jaldhar_ joined #perl6
23:17 jnthn sleep &
23:36 PacoAir joined #perl6
23:56 Targen joined #perl6

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

Perl 6 | Reference Documentation | Rakudo