Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-08-06

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:02 quietfanatic that sounds like a syntax error though
00:02 quietfanatic don't know why
00:02 nebuchadnezzar arf, I just must not use multi
00:03 nebuchadnezzar r: http://pastebin.com/raw.php?i=eJ7gF8Bc
00:03 p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Confused␤at /tmp/IoeSuTjAVl:1␤»
00:03 quietfanatic ah,,I can see why using multis would make disambiguation difficult
00:03 quietfanatic Yeah, rakudo's not parsing that for some reason
00:03 Khisanth joined #perl6
00:04 nebuchadnezzar ok, my mistake, role should not declare multi if we want to override them
00:04 geekosaur that should be throwing a different error; I believe that situation is illegal (but not a syntax error)
00:04 quietfanatic Can "Confused" mean something that's not syntax?
00:05 nebuchadnezzar perl book: 7.2.1: Otherwise, if the class has a method of the same name that is not declared as a multi, then the method in the class alone­as usual­will take precedence.
00:06 nebuchadnezzar ok, so according to this, my case is a bug ;-)
00:06 geekosaur Confused may mean rakudo thinks it has a syntax error, when it;s actually a semantic error + a parsing bug in rakudo
00:06 nebuchadnezzar Cannot have a multi candidate for 'boo' when an only method is also in the package 'Boo'
00:06 geekosaur hmmmm
00:07 quietfanatic But that stlil shouldn't be a parsing issue
00:07 nebuchadnezzar geekosaur: even a working example make it confused
00:07 geekosaur n: http://pastebin.com/raw.php?i=eJ7gF8Bc
00:07 p6eval niecza v19-15-g051783d: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Confused at /tmp/0pdnIHBeJQ line 1:â�¤------> [32mhttp[33mâ��[31m://pastebin.com/r​aw.php?i=eJ7gF8Bc[0mâ�¤â�¤Undeclared routine:â�¤     'http' used at line 1â�¤â�¤Parse failedâ�¤â�¤Â»
00:07 geekosaur oh, that's not supported by niecza, I was hoping it was something the bot did for it :/
00:08 quietfanatic Oh, maybe that's Rakudo's problem too.
00:08 quietfanatic I know evalbot does github gists, but I don't know about pastebins
00:09 nebuchadnezzar hmm
00:09 nebuchadnezzar I'll try gist
00:09 quietfanatic r:  role boo1 { multi method boo () { say "Boo1"; } };  role boo2 { multi method boo () { say "Boo2"; } };  class Boo does boo1 does boo2 { method boo () { say "Boo"; } };  my $booable = Boo.new; $booable.boo
00:09 p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Cannot have a multi candidate for 'boo' when an only method is also in the package 'Boo'␤»
00:09 quietfanatic there you go
00:10 quietfanatic r: http://pastebin.com/L2p6aGwG
00:10 p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Confused␤at /tmp/C_MUEJsFM7:1␤»
00:10 quietfanatic nope
00:10 quietfanatic (tried it without the raw.php part)
00:10 nebuchadnezzar r: https://gist.github.com/3268320
00:10 p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Cannot have a multi candidate for 'boo' when an only method is also in the package 'Boo'␤»
00:10 quietfanatic yeah
00:11 nebuchadnezzar ok, either the perl book needs some update, either there is a bug
00:12 nebuchadnezzar it only support parsing gist
00:12 quietfanatic how old is the book?
00:12 nebuchadnezzar 2012.05.23
00:13 quietfanatic oh
00:13 nebuchadnezzar https://github.com/perl6/book/downloads
00:13 quietfanatic that's pretty new.  The spec shouldn't have changed that recently
00:14 nebuchadnezzar my rakudo is 0.1~2012.04.1-2
00:14 nebuchadnezzar so older than the edition of that book
00:15 quietfanatic oh, then if anything, it'd have changed the other direction :)
00:16 nebuchadnezzar so it's not working on my old rakudo and on the new one
00:16 nebuchadnezzar hmm
00:16 nebuchadnezzar n: https://gist.github.com/3268320
00:16 p6eval niecza v19-15-g051783d: OUTPUT«Boo2␤»
00:16 nebuchadnezzar ok, this should have been "Boo"
00:18 sudokode joined #perl6
00:19 nebuchadnezzar earlier today (well in fact yesterday), masak was happy with a fun bug I found trying examples in the book, hope this one is a bug to make him happier ;-)
00:19 nebuchadnezzar karma: nebuchadnezzar
00:19 nebuchadnezzar erf
00:20 tokuhiro_ joined #perl6
00:22 [Coke] karma nebuchadnezzar
00:22 aloha nebuchadnezzar has karma of 0.
00:22 quietfanatic nebuchadnezzar++
00:25 nebuchadnezzar hmm, the masak ++ was not taken... ;-)
00:36 nebuchadnezzar night perl6
00:37 quietfanatic night
00:41 aindilis joined #perl6
00:57 benabik joined #perl6
01:04 jeffreykegler joined #perl6
01:21 sorear nebuchadnezzar: does the book say p6eval supports pastebin?
01:22 sorear I can confirm the code is gist-only
01:24 benabik joined #perl6
01:29 vinian joined #perl6
01:42 sivoais joined #perl6
01:59 benabik joined #perl6
02:02 quietfanatic I think he was referencing the book for role+multi behavior, not p6eval
02:16 HarryS joined #perl6
02:37 Psyche^ joined #perl6
02:53 orafu joined #perl6
03:03 fgomez joined #perl6
03:44 colomon joined #perl6
03:45 sivoais joined #perl6
03:55 adu joined #perl6
03:57 diakopter masak: tell phenny I think my brain is running in a simulation in your brain.
04:08 quietfanatic diakopter: No, I'm pretty sure it's my brain.
04:08 diakopter um.
04:08 diakopter swap/masak/phenny/
04:09 quietfanatic lol
04:09 quietfanatic I didn't see that
04:09 diakopter yeah me neither
04:09 diakopter yeah no; yeah, no
04:09 diakopter yeah, no; no, yeah
04:14 diakopter phenny: tell masak caught you backlogging!
04:14 phenny diakopter: I'll pass that on when masak is around.
04:16 quietfanatic wait, but you didn't catch him backlogging if phenny tells him
04:18 diakopter d'oh.
04:19 diakopter quietfanatic: btw, I can get you 3 quintillion twitter followers *yesterday*
04:22 HarryS joined #perl6
04:24 crab2313 joined #perl6
04:26 sivoais joined #perl6
04:38 ingy joined #perl6
04:48 sivoais joined #perl6
04:55 jdrab joined #perl6
05:07 moritz \o
05:08 crab2313 o/
05:14 Khisanth joined #perl6
05:20 birdwindupbird joined #perl6
05:24 diakopter argh; the mars lander news site is ... down
05:27 benabik nasa.gov/ntv for a video feed
05:28 diakopter augh. dns on the iphone is failing for that domain.
05:28 diakopter stupid verizon.
05:28 cognominal joined #perl6
05:34 benabik "Touchdown confirmed.  We are safe on Mars."
05:35 benabik (Spoiler alert?)
05:35 diakopter hopefully it didn't land in a crevasse or on top of a boulder
05:37 benabik It was guided down, so it's supposed to be on a nice flat surface.
05:37 benabik First picture back: 64x64 of a wheels on Mars
05:37 diakopter I'm not seeing it on http://www.nasa.gov/mission_pages/​mars/images/first_images_mars.html
05:38 benabik Saw it on the JPL monitors on the live feed.  Probably hasn't been sent to the web team yet.  :-D
05:42 diakopter well, at least the little green men are smart enough to stay out of sight for now
05:43 diakopter hopefully nasa sent a chimp to Mars in secret. I mean, what's one more chimp with the tens of thousands killed in drug and surgery testing
05:44 benabik heh.  Web page still doesn't have it, but twitter does: pic.twitter.com/894ouNJt
05:46 moritz \o/ marsfeed on #perl6
05:46 diakopter hopefully they also sent a nuke, to protect nasa's intellectual property and advanced technology lest it fall into enemy hands
05:48 benabik Well, it is powered by a RTG
05:48 benabik (which means nuclear, for those not up on the lingo)
05:49 benabik @MarsCuriosity: No photo or it didn't happen? Well lookee here, I'm casting a shadow on the ground in Mars' Gale crater #MSL http://t.co/cj1zFJty
05:50 sorear What would be the point of sending a chimp to mars?
05:50 benabik Animal cruelty?
05:50 benabik I find it somewhat depressing that these photos are appearing on Twitter faster than on nasa.gov
05:50 sorear That's not a point
05:51 diakopter to test whether the life support systems would work for that long
05:51 sivoais joined #perl6
05:52 diakopter and keep the animal in some kind of stasis for months, presumably
05:52 diakopter flexing its muscles for it..
05:53 sorear MSL is not part of the manned Mars programme
05:54 moritz OH HAI MARS. HUMANITY SENT ME AND I AM NUKULAR!!!
05:55 diakopter sorear: I'm sorry it wasn't obvious I was initially joking but then playing along
05:57 adu mars?
05:57 adu the planet?
05:57 jeffreykegler joined #perl6
05:57 benabik Mystery solved.  moritz is a robot.  Specifically, the Curiosity Rover.  :-D
06:01 xdbr joined #perl6
06:01 moritz benabik: actually the clone that was left behind on earth
06:01 moritz TCP doesn't work out well between Mars and freenode
06:02 benabik Yeah, the ping times via the DSN are ridiculous.
06:03 tadzik good morning #perl6
06:03 moritz \o tadzik
06:03 tadzik . o O ( TCP over hailing frequencies )
06:05 benabik Has to be more efficient than RFC1149
06:06 tadzik I don't even have to look it up to know what it is:)
06:07 benabik IPoAC: high latency, but high theoretical bandwidth
06:08 sorear DSN doesn't have great bandwidth either, the noise floor is just too high
06:09 sorear apparently the MSL has a 10W transmitter driver
06:09 sorear i'm actually suprised by this
06:09 benabik MSL primarily just has to communicate to orbit...  There are three orbiters that are doing repeater duty,
06:12 sivoais joined #perl6
06:14 SamuraiJack joined #perl6
06:19 sorear diakopter: sorry
06:27 fgomez joined #perl6
06:35 cognominal joined #perl6
06:36 sivoais joined #perl6
06:45 wtw joined #perl6
06:46 xinming joined #perl6
06:49 kaleem joined #perl6
07:10 brrt joined #perl6
07:16 GlitchMr joined #perl6
07:24 adu joined #perl6
07:32 arnsholt Bah. It's annoying that make doesn't support several wildcards
07:33 cognominal joined #perl6
07:34 moritz it doesn't?
07:34 cognominal joined #perl6
07:34 moritz # Run a single test
07:34 moritz t/*.t t/*/*.t t/*/*/*.t: all spectest_checkout @$(HARNESS_WITH_FUDGE) --verbosity=1 $@
07:34 moritz that's from rakudo's Makefile
07:36 arnsholt There is that
07:36 arnsholt But my rule wants to be "sv-train-o%-p%.conll: ..." (which isn't called wildcards, I recall now)
07:36 arnsholt Suffix rule? Something like that
07:41 moritz arnsholt: write your own make replacement :-
07:41 moritz )
07:42 moritz with regex support in rule
07:42 moritz s
07:42 moritz m/sv-train-o(\w+)-p(\w+).conll/:  # use $0 and $1 here
07:42 arnsholt Yeah. I've thought about it more than once =)
07:43 arnsholt But more seriously, I've considered trying redo
07:43 moritz and while you are at it, please include proper support for commands that produce more than one output file :-)
07:45 arnsholt Yeah, that one's annoying as well
07:45 arnsholt Although "file1 file2:\n\tcommand" gets close enough for me
07:48 xinming joined #perl6
07:52 fhelmberger joined #perl6
08:00 GlitchMr joined #perl6
08:09 jnthn morning, #perl6
08:11 moritz mrnng, jnthn
08:15 tadzik hello hello
08:21 nodmonkey joined #perl6
08:30 sorear hello hello jnthn moritz & tadzik
08:34 masak morning, #Perl6
08:34 phenny masak: 04:14Z <diakopter> tell masak caught you backlogging!
08:35 masak how deep :)
08:39 sorear masak!
08:39 masak \o/
08:39 sorear fff.  I accidentally let MSL preempt trip planning.  hopefully I still have enough time
08:40 masak so, I hear we put some robot on Mars. that's nice.
08:40 masak what kind of software does it run?
08:40 moritz do US citizens need a visa for visiting .de?
08:40 sorear moritz: no, that was the first thing I checked actually :)
08:41 moritz that's wise, because it's what takes the longest time
08:41 sorear well, we do if the trip is longer than 90 days or we intend to become employed there
08:42 sorear I also already got my passport and made room sharing plans with masak
08:42 sorear I think the most important thing I'm missing now is plane tickets
08:42 GlitchMr joined #perl6
08:43 moritz sorear: are you 18 years or older?
08:43 sorear moritz: yes
08:43 moritz good
08:43 moritz then you're legally of age in Germany, which makes stuff much easier
08:44 mhasch Is there an alternative for feather.perl6.nl:3000 using some standard port, 80, say?
08:44 moritz mhasch: do you need that because of firewalling?
08:45 mhasch yep, (though I could set up an ssh tunnel)
08:45 sorear moritz: apparently Liz wants me in Luxembourg, and mberends has been saying ... something I haven't quite fully understood ... about visiting .uk, .nl, and/or masak in .se
08:46 moritz sorear: or you could visit me after YAPC::EU, it's just 200km from Frankfurt :-)
08:46 moritz (iirc mberends has a house in .nl, but currently does much of his work in .uk, so that would make sense)
08:47 mucker joined #perl6
08:47 sorear it's only like a week before the PRS, this may be a bit too close
08:48 mucker joined #perl6
08:48 mhasch moritz: Erlangen is nice
08:48 sorear mm, Erlangen
08:49 sorear I should correct my low level of knowlege about that someday
08:50 sorear "I've heard of the Erlangen Program, that's something right?"
08:50 moritz it's a town with 100k inhabitants, so not too big
08:50 xinming joined #perl6
08:50 moritz just special because it happens to be my home town :-)
08:50 moritz and has hosted the German Perl Workshop in 2008 and 2012
08:51 sorear sounds pretty big by EU standards :D
08:51 moritz sorear: you do have some knowledge updating to do :-)
08:51 * mhasch did not know there was an EU standard for Perl workshops :-)
08:53 moritz r: say 230.5 / 31.6 # population density of DE/USA
08:53 p6eval rakudo 0eea68: OUTPUT«7.294304␤»
08:53 * jnthn has a talk accepted at YAPC::Asia! o/
08:53 tadzik \o/
08:54 brrt completely unrelated to anything here, but did anyone else notice javascript developers effectively all started programming in CPS?
08:55 brrt (and call it 'asynchronous')
08:55 * moritz did :-)
08:55 tadzik :>
08:55 sorear my home town has 2300k.
08:55 brrt funny, eh? :-)
08:56 tadzik mine's 1,802,398, 3,326/km2
08:56 brrt my city has about has about 200k
08:56 brrt 2300k is alot
08:56 masak brrt: http://hyperboleandahalf.blogspot.se/2010/04​/alot-is-better-than-you-at-everything.html
08:56 tadzik 3,054,678 counting "Metropolitan area", * that means
08:56 jnthn heh, where I grew up had 3k :)
08:57 masak where I grew up had 0.2k
08:57 sorear in the US, 200k is a medium town.  we have a strange way of doing things
08:57 brrt lol
08:57 sorear I'm not certain Frankfurt would be called a city
08:57 jnthn masak: Ö RLY?
08:58 masak :P
08:58 sorear (in colloquial usage, that is.  legally a city is anything with a city charter, and you could probably make a city with 1 inhabitant if you lived out in the countryside and were really bored.)
08:59 masak sorear: in .cn, 1000k seems to be a smallish town.
09:01 moritz I've asked a Russian friend of mine where she came from. She answered "a small town you've never heard of".
09:01 moritz turned out to have 1.5 Mio inhabitants or so
09:01 moritz and indeed I've never heard of it before :-)
09:03 * moritz can't solve the majority of recaptha challenges
09:04 tadzik moritz: I like that blog post alot
09:05 brrt masak: thanks for that link
09:05 bonsaikitten sorear: in luxemburg there's a city called Rumelingen/Rumelange that still has city charter with about, err, 5k inhabitants iirc?
09:05 bonsaikitten sometimes those things are quite absurd
09:05 moritz tadzik: did you mean masak?
09:06 tadzik moritz: oh, yes, pardon :)
09:06 tadzik masak: ^
09:08 sorear bonsaikitten: those names are de/fr?
09:09 * sorear looks up "Mio".  interesting but unsuprising.
09:09 bonsaikitten sorear: yes, and the first one should have a diaresis on the u
09:10 moritz sorear: million
09:12 sorear I was talking money with an American acquaintance not long ago and the figure of '3 MM $' came up.  my response, "WTF? I think you mistyped that.  Also, double prefixes have been discouraged since the 60s, you're supposed to use T$ now"
09:15 masak tadzik: I like it alot too.
09:15 sorear I am amused that alot has made it here
09:16 masak alot makes it here ;)
09:16 tadzik it's funny when someone really makes a typo, and everyone assumes that it's a deliberate, evil error
09:16 moritz you just have to earn a reputation for typo-ing a lot :-)
09:16 sorear tadzik: apparently MM=million is a legit US thing, insane as it is
09:17 tadzik sorear: hm, I've never seen "MM" before
09:17 * masak neither
09:17 sorear also apparently I'm the only person in my generation who remembers kilomegacycles and micromicrofarads
09:17 tadzik and speaking of typos, I meant "alot" :P
09:17 sorear too much time spent with my grandfather :P
09:17 * moritz used Mm (mega meters) in one physics test, and was called out for it
09:18 moritz apparently you aren't supposed to prefix m with anything higher than k :(
09:18 masak shoulda used attoparsecs :P
09:18 masak or beard seconds.
09:19 fgomez joined #perl6
09:21 sorear moritz: huh, I've never heard of people having a problem with megametres.
09:22 bonsaikitten attoparsec <-- superb unit
09:22 moritz iirc that's about 20cm, no?
09:22 moritz (or similar order of magnitude)
09:22 masak no, about 3 cm.
09:23 tadzik http://www.wolframalpha.com/input/?i=attoparsec
09:23 moritz ok, just one order of magnitude off :-)
09:23 moritz that's acceptable for a theoretician :-)
09:23 masak and a beard second is somewhere between 5 and 10 nanometers.
09:23 masak so, one Angstrom :)
09:23 moritz is that how far a beard growth in a second?
09:23 moritz s/far/long/
09:24 masak oh, sorry. 100 Angstrom.
09:24 masak moritz: yes.
09:24 jnthn Doesn't that vary from person to person? :)
09:24 masak jnthn: yeah, that's why it's 5..10 nm.
09:24 moritz average of 1cm/month iirc
09:25 jnthn .oO( nm? My beard is nanotechnology! )
09:25 tadzik nanobots building beards
09:26 masak r: say 0.01 #`(m) / (30 #`(days/month) * 24 #`(hours/day) * 3600 #`(seconds/hour))
09:26 p6eval rakudo 0eea68: OUTPUT«0.0000000039␤»
09:26 masak r: say 3.9e-9
09:26 p6eval rakudo 0eea68: OUTPUT«3.9e-09␤»
09:26 TBA joined #perl6
09:26 TBA morning #p6
09:26 tadzik hello TBA
09:26 masak be announced, TBA.
09:26 moritz r: say 0.0000000039.Num
09:27 p6eval rakudo 0eea68: OUTPUT«3.9e-09␤»
09:27 masak \o/
09:27 masak moritz++ # was thinking how to do that
09:27 TBA r: say "f" ~~ "f"|"g"|"h";
09:27 p6eval rakudo 0eea68: OUTPUT«True␤»
09:27 moritz r: say 0.0000000039.fmt('%f')
09:27 p6eval rakudo 0eea68: OUTPUT«0.000000␤»
09:27 TBA r: say "f" ~~ [any]<f g h>;
09:27 p6eval rakudo 0eea68: OUTPUT«False␤»
09:27 moritz r: say 0.0000000039.fmt('%e')
09:27 p6eval rakudo 0eea68: OUTPUT«3.900000e-09␤»
09:28 moritz r: say "f" ~~ [any] <f g h>;
09:28 p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Confused␤at /tmp/cQfgl8dlK3:1␤»
09:28 TBA should they work the same?
09:28 moritz TBA: any is not an infix operator
09:28 moritz TBA: so you can't reduce it with []
09:28 TBA ahh, makes sense, thx!
09:28 moritz it actually parsed as   [ any() ]
09:28 moritz just say
09:28 moritz r: say "f" ~~ any <f g h>
09:28 p6eval rakudo 0eea68: OUTPUT«True␤»
09:29 moritz (and the <...> was a postcircufmix to the array, just like a hash key)
09:32 sorear sleep&
09:34 mucker hi #perl6, what is the official way to embed perl5 in perl6 ... like __asm__ in C ??
09:34 mucker sorear: sweet dreams :)
09:34 moritz mucker: use v5; in an inner scope. But, as you said, "sweet dreams"
09:35 moritz (ie nobody supports that yet)
09:35 mucker moritz: I'm working on embedding perl5 into perlito
09:35 moritz there's also eval($string, :lang<perl5>)
09:35 moritz mucker: \o/
09:36 mucker i've succeded, but with the tokens PERL text __PERL__
09:36 mucker now i need to make it match the spec :)
09:38 nsh joined #perl6
09:46 xinming_ joined #perl6
09:47 masak r: role B1 { multi method x($m) {} }; role B2 { multi method x { say "OH NOES" } }; class C does B1 does B2 { method x { say "OH HAI" } }; C.new.x
09:47 p6eval rakudo 0eea68: OUTPUT«===SORRY!===␤Cannot have a multi candidate for 'x' when an only method is also in the package 'C'␤»
09:48 masak well, I think I actually agree with Rakudo there.
09:48 masak n: role B1 { multi method x($m) {} }; role B2 { multi method x { say "OH NOES" } }; class C does B1 does B2 { method x { say "OH HAI" } }; C.new.x
09:48 p6eval niecza v19-15-g051783d: OUTPUT«Potential difficulties:â�¤  $m is declared but not used at /tmp/7HuFNgPFXj line 1:â�¤------> [32mrole B1 { multi method x([33mâ��[31m$m) {} }; role B2 { multi method x { say[0mâ�¤â�¤Unhandled exception: Cannot call x; none of these signatures match:â�¤    Any, Any…
09:48 jnthn Me too
09:49 masak nebuchadnezzar: so, no bug AFAICS.
09:49 jnthn Well, possibly bookbug...
09:53 masak there is that.
09:54 moritz ok, suppose I want to compose two roles, one has an only method, one has a multi method, both of the same name
09:54 moritz what do I do?
09:57 jnthn You can use "proto" to force multiness on all
09:57 jnthn Then the only will just be added to the candidate list.
09:59 moritz r: role R1 { method a() { 1 } }; role R2 { multi method a($) { 2 } }; class A does R1 does R2 { proto method a(|$) {*} }; say A.new.a, A.new.a(1)
09:59 p6eval rakudo 0eea68: OUTPUT«Cannot call 'a'; none of these signatures match:␤:(A , , Mu *%_)␤␤  in method a at /tmp/iXk_8pXFBb:1␤  in block  at /tmp/iXk_8pXFBb:1␤␤»
09:59 moritz r: role R1 { method a() { 1 } }; role R2 { multi method a($) { 2 } }; class A does R1 does R2 { proto method a(|$) {*} }; say A.new.a(1)
09:59 p6eval rakudo 0eea68: OUTPUT«2␤»
09:59 moritz that seems to lose the only method
09:59 moritz I guess that's acceptable
10:00 jnthn Hmm...that's surprising.
10:00 moritz not to me
10:00 jnthn OK :)
10:00 moritz just like   role R { method a() { } }; class A { method a() {} }
10:00 moritz also loses the method A from R
10:01 jnthn True
10:01 masak is there a way to call R1.a from A?
10:01 moritz it's only subs where a proto forces all others of the sam name to be multis
10:01 moritz masak: self.R1::a
10:01 jnthn Should just be a qualified method call
10:01 masak then I think I'm fine with it too.
10:02 masak though it's tricky to see all the consequences of this one.
10:02 moritz I kinda think of an only-method as a proto with just one candidate
10:02 moritz which is backwards (but not wrongly) from the usual definition, where a proto is an only method that internally redispatches to its candidates
10:03 masak aye.
10:03 masak an only is like a singleton multi.
10:11 crab2313 joined #perl6
10:16 vinian left #perl6
10:19 spider-mario joined #perl6
10:34 nodmonkey joined #perl6
10:47 xinming joined #perl6
11:08 tokuhiro_ joined #perl6
11:22 mhasch can panda be configured to use a HTTP proxy?
11:23 masak never heard of it being able to. what would it take to make it do so?
11:24 tadzik I think there's a guide in the README file, no?
11:25 tadzik "If you are behind a proxy, you neet to configure git and configure wget to use the proxy."
11:25 tadzik there are links to guides as well
11:25 tadzik Siddhant++ for adding those
11:26 mhasch Ah, should have looked there, but thanks anyway. So it is hard-coded to use wget (which gives us our loop-hole).
11:27 daxim joined #perl6
11:27 tadzik yeah :/
11:27 tadzik I don't have any better ideas for it though, patches welcome
11:27 daxim please review http://stackoverflow.com/questions/1​1825458/is-there-anything-like-regex​pgrammars-for-net/11826626#11826626 for accuracy
11:28 tadzik I think I once wrote a .pir script (brr) that could be used instead of wget
11:29 jnthn tadzik: How hard would it be to just use Rakudo's socket support instead? Or ship a very minimal module (like we do with JSON)?
11:29 jnthn "just" a matter of tuits?
11:29 masak daxim: looks good.
11:31 rjbs someone mistakenly contacted perladvent.pm.org about perl6advent; to whom should she be directed?
11:33 moritz me, for example
11:33 moritz moritz@faui2k3.org
11:33 rjbs thanks
11:33 masak moritz++ rjbs++
11:33 tadzik jnthn: I'd just go for using LWP::Simple I think
11:34 moritz tadzik: cosimo has talked about abandoning LWP::Simple in favor of HTTP::Client
11:34 moritz afaict there's no decision yet
11:35 moritz but HTTP::Client is worth investigating
11:35 tadzik well, it's mostly the matter of adding one more dependency to panda
11:36 tadzik no big deal, *but*(
11:36 tadzik we already have problems with bootstraping all this stuff :/
11:36 tadzik especially on windows, where nothing seems to work anyway
11:36 tadzik so, what do you think about merging offline-bootstrap while we're talking about it?
11:36 tadzik since neither branch appears to be working on windows
11:36 jnthn I'm pretty sure not depending on wget will help on the windows side.
11:36 jnthn tadzik: You'll be at YAPC?
11:37 tadzik jnthn: yes
11:37 tadzik heh, true that
11:37 jnthn We could try and find some time to hack together on Windows support for Panda.
11:37 tadzik sure
11:37 tadzik I can take my external HDD and you'll show me how to setup a working env there
11:38 tadzik or maybe an .msi will be enough?
11:38 moritz panda is already shipped with R*, no?
11:38 tadzik it is
11:40 mhasch For bootstrapping, I would be content with a route involving perl5.  This should work on Windows.
11:41 moritz p5 doesn't help in this case
11:42 mhasch (talking about bootstrapping panda, not perl6 of course)
11:42 moritz yes
11:42 moritz the prolem is more to fiddle with the include paths and doing stuff in the right order etc.
11:47 JimmyZ joined #perl6
11:47 JimmyZ What's the difference between panda and ufo?
11:48 xinming_ joined #perl6
11:48 jnthn The panda eats shoots and leaves. The ufo just shoots and leaves.
11:49 mhasch That's neat :-)
11:50 jnthn I suspect the answer I was meant to give is, panda is a module installer, ufo makes makefiles.
11:53 masak jnthn++ # shoots and leaves
11:53 masak ufo is a developer-only Makefile laziness tool.
11:53 masak panda is a module installer for Perl 6 module users.
11:53 nebuchadnezzar masak: thanks for the answer, so 7.2.1 in the perlbook 2012.05.23.a4.pdf is wrong ;-)
11:54 masak what does it say?
11:56 MayDaniel joined #perl6
11:57 nebuchadnezzar perl book: 7.2.1: Otherwise, if the class has a method of the same name that is not declared as a multi, then the method in the class alone­as usual­will take precedence.
12:01 flussence regarding the wget-in-panda thing: the rakudo makefile also has curl hardcoded, maybe we should change one so they're both using the same
12:01 masak nebuchadnezzar: that... makes a certain amount of sense, too.
12:01 * masak wonders what S12 and S14 have to say about this
12:02 * nebuchadnezzar is looking S14
12:04 nebuchadnezzar r: role R1 { method x ($m) { say "MSG: $m"; } }; role R2 { method x (Int $i) {say "Int: $i"; } }; class C1 does R1 does R2 { proto method x () { say "Hay!"; }; }; C1.new.x(1);
12:04 p6eval rakudo 0eea68: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method x at /tmp/7Ttor_bzCu:1␤  in block  at /tmp/7Ttor_bzCu:1␤␤»
12:04 * flussence checks what distros tend to use by default, seems to be wget...
12:05 nebuchadnezzar hmm, using proto in the class to force multi in roles should works according to S14
12:06 flussence rn: my $len = 6; my $str = ('a'..'z').join; my $substr = rx/ ^ . ** {0..$len} /; say $str ~~ $substr
12:06 p6eval niecza v19-15-g051783d: OUTPUT«#<match from(0) to(6) text(abcdef) pos([].list) named({}.hash)>␤»
12:06 p6eval ..rakudo 0eea68: OUTPUT«===SORRY!===␤Quantifier quantifies nothing at line 2, near " {0..$len}"␤»
12:06 mhasch flussence: what does rakudo use curl for? It worked for me w/o curl being present.
12:06 cognominal the ufo is more like "Mars attack"?
12:06 flussence mhasch: automatic spectesting
12:06 moritz no, it uses git for fetching the spectests
12:06 flussence moritz: it uses curl for uploading the tar.gz
12:07 mhasch but maybe curl for reporting success.
12:07 moritz ah, but only for 'spectest_smolder'
12:09 t0rn left #perl6
12:09 nebuchadnezzar r: role R1 { method x ($m) { say "MSG: $m"; } }; role R2 { method x (Int $i) {say "Int: $i"; } }; class C1 does R1 does R2 { proto method x () { say "Hay!"; }; }; C1.new.x;
12:09 p6eval rakudo 0eea68: OUTPUT«Hay!␤»
12:09 nebuchadnezzar r: role R1 { method x ($m) { say "MSG: $m"; } }; role R2 { method x (Int $i) {say "Int: $i"; } }; class C1 does R1 does R2 { proto method x () { say "Hay!"; }; }; C1.new.x("Hou");
12:09 p6eval rakudo 0eea68: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method x at /tmp/XTEs5ouXCc:1␤  in block  at /tmp/XTEs5ouXCc:1␤␤»
12:13 tokuhiro_ joined #perl6
12:23 cognominal joined #perl6
12:32 nebuchadnezzar erf, I knew it will happened https://lh3.googleusercontent.com/-hQwvriYA5bI/U​B9be-zfsWI/AAAAAAAAWLM/1OcIL_hTGH4/s407/mars.jpg
12:34 mtk joined #perl6
12:35 [Coke] (backscroll) I find I see MM a lot in the financial industry, and in every case, we have a big UK presence as well.
12:38 rafl joined #perl6
12:39 masak yes, but... *how* is "MM" short for "millions"?
12:39 huf a thousand thousand?
12:39 huf M*M
12:40 jnthn a thousand thousand
12:40 huf roman imperialist culture!
12:40 huf isnt pp short for pages though? so maybe it's just "to get a plural, double the abbreviation for the singular"
12:40 flussence Metric Million? :)
12:41 moritz huf: nono, you're confusing that with vim, where doubling a character applies the operation to the whole line :-)
12:42 huf oh, so that's my opinion then
12:42 huf thanks :)
12:43 arnsholt pp is short for pages, yes. But I think the convention is to double the last page. For example the plural of ms (for manuscript) is mss
12:43 huf yes, so M is for Million, MM is for Millions. works out
12:44 arnsholt There's also § for paragraph and §§ for paragraphs, seq for following and seqq for more than one following
12:45 rjbs the OED has an entry for "08:31 <@mst> new server announcement
12:45 rjbs 08:39 >@mst< rjbs: we name machines after authors
12:45 rjbs 08:40 >@mst< rjbs: and announce new servers by picking an epigraph worthy quote  from one of their books
12:45 rjbs "er, oops
12:45 rjbs @#$#@ OED.app
12:45 rjbs The OED has an entry for "milliardaire"
12:46 masak r: sub kilo{1e3};sub mega{1e6};sub giga{1e9};sub postfix:<second>($unit){ap​propriate-unit($unit)};sub appropriate-unit($s){my ($q, $u)=$s,"seconds";for <minutes 60 hours 60 days 24 years 365.24> ->$nu,$d {last if $q/$d <1;$q/=$d;$u=$nu};"$q $u"};say kilo\second;say mega\second;say giga\second
12:46 p6eval rakudo 0eea68: OUTPUT«16.6666666666667 minutes␤11.5740740740741 days␤31.6889554103441 years␤»
12:46 masak \o/
12:47 masak r: sub kilo{1e3};sub mega{1e6};sub giga{1e9};sub postfix:<second>($s){my ($q, $u)=$s,"seconds";for <minutes 60 hours 60 days 24 years 365.24> ->$nu,$d {last if $q/$d <1;$q/=$d;$u=$nu};"$q $u"};say kilo\second;say mega\second;say giga\second
12:47 p6eval rakudo 0eea68: OUTPUT«16.6666666666667 minutes␤11.5740740740741 days␤31.6889554103441 years␤»
12:53 arnsholt I read a book earlier this summer which used Msec and so on as standard units of time
12:54 arnsholt Good book too
12:54 leprevost joined #perl6
12:57 masak arnsholt: "Accelerando"?
12:58 arnsholt A deepness in the sky, actually
12:58 masak ooh
12:58 masak must try that one, then.
12:58 masak arnsholt: and you must try "Accelerando" :)
12:58 arnsholt Although Accelerando is a book I'll probably read soon-ish too
12:58 arnsholt Charlie Stross is a recent fave of mine
12:59 arnsholt Though I might read rule 34 and the other one whose name escapes me first
13:01 * colomon <3s Deepness in the Sky and Accelerando.
13:01 arnsholt Yeah, Deepness was fantastic
13:02 arnsholt A couple of the climaxes towards the end gave me more of a rush than most exciting movies =D
13:02 arnsholt A fire upon the deep was nifty as well
13:02 lorn_ joined #perl6
13:02 arnsholt My most recent book was The apocalypse codex. The laundry files are pretty cool
13:03 mucker joined #perl6
13:03 * colomon can never remember which laundry books he's read.  I mean, the first one and the James Bond one, sure.  And one other?  And random short stories?
13:03 * colomon is not awake enough to talk about himself in the first person.
13:04 arnsholt Well, if you've read the first two and one more, you've read all of them except the one that came out last month, probably
13:05 arnsholt There are two short ones according to Wikipedia, as well
13:05 colomon Ah.  I definitely have not read one in the last month.
13:05 arnsholt The best one is the one where he goes into the Laundry's insane asylum
13:06 arnsholt The best clue I can give to whether you've read the third one is that it has a pretty important plot point about Angleton
13:07 colomon oh, right.
13:07 bluescreen10 joined #perl6
13:07 arnsholt The latest one is pretty cool too. A few nifty parallels between dominionist christian sects and Cthulhu worksip, among others
13:11 xinming joined #perl6
13:13 * colomon tries to remember what he has read in the last month.  Range of Ghosts (E. Bear), The Lost Hero and Neptune's Son (Riordan), Soldier of Sidon (Wolfe), It Happened On A Train (Barnett), The Devil's Art (Cooper and Nyborg), finished the Fantine section of Les Miserables (Hugo), and is working on A Knight of Ghosts and Shadows (Anderson)
13:14 arnsholt Speaking of Perl 6, are any other sixers considering submitting to the Italian Perl Workshop?
13:14 moritz colomon: I envy you for reading this much
13:14 arnsholt I think colomon's days have more hours than mine ^_^
13:15 moritz There are only 30 hours a day -- HPMoR
13:15 colomon Well, I did spend the week before last in fishing camp.  And I may have gone back a little further than a month.  And three of those are kids books.  :)
13:16 colomon But I've definitely been reading more than usual lately.
13:17 colomon It's also been a particularly good run of books, IMO.
13:17 atrodo joined #perl6
13:20 [Coke] I'm pretty sure MM is "mille mille"
13:21 masak oh, that's horrible.
13:21 [Coke] ah, not just financial, but also oil/gas, which would explain it at Enron, also.
13:22 [Coke] masak: "industry standard". <shrug>
13:25 [Coke] masak: see the similarly fun CPM.
13:25 dalek doc: 5922a03 | moritz++ | htmlify.pl:
13:25 dalek doc: [htmlify] embed type graph images
13:25 dalek doc:
13:25 dalek doc: requires the very latest Pod::To::HTML
13:25 dalek doc: review: https://github.com/perl6/doc/commit/5922a03131
13:25 moritz http://doc.perl6.org/type/Array # for example
13:26 masak Wikipedia gives me 502 Bad Gateway. :/
13:26 masak moritz++ # nice!
13:27 moritz japhb++ did most of the work
13:29 [Coke] moritz++ japhb++
13:31 skids joined #perl6
13:34 GlitchMr joined #perl6
13:38 brrt joined #perl6
14:00 mhasch whow, almost 34 hours of talks (not counting lightning) already accepted to yapc::eu. at last, including four p6 talks.
14:10 thou joined #perl6
14:11 moritz science. It's hard.
14:12 * moritz has just falsified a peer's conference talk
14:13 mhasch moritz: which one?
14:14 moritz mhasch: something about flat-top gain phase sensitive all-optical amplifiers
14:20 mhasch moritz: cool.  Now there can be two talks.  Did he/she like your findings?
14:21 moritz mhasch: I haven't informed the author (and not sure I will, I'll finish/abort my academic career in a month)
14:29 mhasch moritz: What a pity you should leave just when you were onto something.
14:30 moritz mhasch: "onto something" is a bit overstated. It took me about 2 hours (with lots of procrastination in between while the simulations were running) to destroy a PhD-students 2 months of work
14:31 bonsaikitten amusing
14:32 bonsaikitten moritz: you should turn that into a career
14:32 mhasch moritz: out of curiousity, does your career change mean doing more or less cool perl stuff?
14:32 bonsaikitten when I was involved in P2P stuff I had a feeling that at least half the papers were using cooked data, but I never found the time for a systematic disassembly of things
14:32 moritz mhasch: more perl5 stuff
14:33 moritz bonsaikitten: well, it only worked because I had very similar simulation already running
14:33 moritz bonsaikitten: not applicable to many papers out there
14:33 kaare_ joined #perl6
14:34 masak well, falsification may hurt and feel harsh, but it's *very* important. moritz++
14:34 bonsaikitten moritz: in p2p stuff most things I saw were smelly ... oh you claim higher throughput, but in your simulation upload speed is unbounded? might that not shift things badly, hmm?
14:35 moritz bonsaikitten: I know that kind of paper
14:38 GlitchMr joined #perl6
14:39 [Coke] if you know their thesis is wrong, and you let them get a doctorate, doesn't that make you evil? ;)
14:39 kaleem joined #perl6
14:39 mhasch moritz: two similar setups producing antipodal results should at least account for a closer look on both setups.
14:45 Chillance joined #perl6
14:54 mhasch [Coke]: There can be wrong, as in "I rigged my data to support some nonsense", or wrong as in "I started out with a hypothesis that supported my initial data, but new data forced me to revise it".
14:55 GlitchMr joined #perl6
14:55 birdwindupbird joined #perl6
14:55 _sri joined #perl6
14:55 pnu_ joined #perl6
14:55 _fall0ut_ joined #perl6
14:55 shachaf joined #perl6
14:55 baest joined #perl6
14:57 GlitchMr perl6 -e'loop {say @*ARGS||"y"}'
14:57 GlitchMr I guess I have fun with this
14:58 sftp joined #perl6
14:59 mhasch GlitchMr: /usr/bin/yes is faster :-)
15:07 kaare__ joined #perl6
15:07 thou joined #perl6
15:09 [Coke] yes.
15:10 [Coke] ww.
15:10 [Coke] ... but excellent timing.
15:10 masak yes.
15:11 PerlJam .oO( #perl6 is full of yes-men? )
15:12 masak phenny: en sv "yes-man"?
15:12 phenny masak: "Ja -man" (en to sv, translate.google.com)
15:12 masak :P
15:22 Tedd1^ joined #perl6
15:29 * [Coke] finds it slightly nifty that https://github.com/coke/perl6-roast-data/com​mit/fa88935f44aa9b6213065d1c4a18b31b1214bafa shows rakudo fixing a bug and that niecza didn't change.
15:38 atrodo joined #perl6
15:38 masak does anyone know what programming language(s) the software of the Curiosity rover is written in?
15:39 brrt java, ada, or fortran, probably :-)
15:39 brrt ... probably not java
15:39 hoelzro ada is present
15:39 hoelzro http://en.wikipedia.org/wiki/Vxworks
15:39 hoelzro holy crap, Java *is* on there
15:39 PerlJam hoelzro: why would this be a surprise?
15:40 * hoelzro shrugs
15:40 PerlJam now ... if there were some Perl 6 on there ....  ;)
15:40 huf is there some sh in it?
15:40 huf everything needs a bit of sh fudging
15:41 brrt java is famous for coming with statements that it should not be used for mission-critical software
15:41 brrt i.e., nuclear reactors and stuff
15:41 [Coke] that just means "you can't blame us if your code explodes"
15:41 brrt i'd thought NASA to have been more conservative
15:42 * masak likes Ovid's old post about how Ada feels less powerful and less type safe than Perl 6
15:42 huf heh.
15:42 [Coke] if you are you relying on your own tests, that's less of a concern, no?
15:42 hoelzro masak: link, please?
15:42 huf that article comes to mind where the author presents ada as a secret project to collapse the soviet union...
15:43 masak hoelzro: tricky, because use.perl.org is no longer operational.
15:43 masak hoelzro: I don't know if archive.org will retreive old use.perl posts.
15:44 masak oh, seems it does.
15:44 kaare_ joined #perl6
15:46 masak http://web.archive.org/web/20081027005144​/http://use.perl.org/~Ovid/journal/37699
15:46 masak archive++
15:46 hoelzro masak: thanks!
15:47 mhasch masak: I tried to install Game::Crypt with panda but the test suite failed.
15:47 mhasch t/crypt.t .. 1/? Could not find symbol 'X::Adventure::&NoExitThere' in block <anon> at t/crypt.t:120
15:49 masak mhasch: yes, because of module precompilation fucking up symbols.
15:50 masak I complained very loudly about it, and jnthn++ told me to figure out a way to increase the bus number.
15:50 jnthn Well, the other option is to be patient while I figure out how to fix it. :)
15:50 jnthn Well, figure out why it's wrong probably comes first.
15:50 masak no rush but hurry dammit
15:50 jnthn :P
15:50 masak :P
15:51 thelazydeveloper joined #perl6
15:51 mhasch I don't know about bus numbers but will be patient for now :-)
15:52 orafu joined #perl6
15:52 hoelzro joined #perl6
15:52 masak jnthn: I don't think I ever submitted that one, due to a strong similarity with moritz++' ticket.
15:53 masak jnthn: would a golfing of it and a separate RT ticket help?
15:54 jnthn masak: I suspect it's the same issue moritz++ submitted. Any further analysis/golfing is welcome.
15:54 jnthn Comparing contents of packages (which it's easy to do by looking into .WHO) could help.
15:54 crab2313 joined #perl6
15:54 masak gotcha.
15:55 masak will make a few experiments after $work.
15:58 [Coke] bus number: the number of people that can be hit by a bus before a team loses the ability to know how to do something.
15:58 [Coke] for many things on a team this size, it's usually 1.
16:00 mhasch Thanks [Coke]++, I was thinking of something much more technical for a moment :-)
16:00 masak in terms of evolutionary bottlenecks, it's still very risky to have a low bus number.
16:01 huf with all the code and all the conversations about the code being available online
16:01 huf i dont think your bus number can really go as low as 1
16:01 huf but it would take a considerable effort for a new team to figure it all out and pick up where you left off, in case of bus
16:01 huf so don't bus.
16:02 PerlJam huf: It can go lower than 1 if you're not careful  (Pugs was that way for a while)
16:02 huf heh :)
16:03 * jnthn will try to fly and train instead of bus :)
16:03 huf :)
16:03 huf train yourself to fly
16:04 mhasch huf: half baked code can be a dead end no matter how much you put it online. jnthn++: the trick with flying is to miss the ground when you are about to hit it
16:05 huf but that's not a trick to flying
16:05 huf that's falling.
16:05 [Coke] huf douglas adams reference.
16:06 huf yes, i think so too
16:06 huf :)
16:06 masak huf: there's a wide gap between "could be picked up" and "someone picks it up".
16:06 huf masak: yep.
16:06 [Coke] "Do not listen to what anybody says to you at this point because they are unlikely to say anything helpful.
16:06 huf so i suppose bus number is like portability. it's all relative.
16:09 imarcusthis joined #perl6
16:16 arnsholt masak: http://programmers.stackexchange.co​m/questions/159637/what-is-the-mars​-curiosity-rovers-software-built-in (via HN)
16:17 masak \o/
16:17 masak arnsholt++
16:17 dalek rakudo/nom: d9c09e8 | (Geoffrey Broadwell)++ | src/core/Main.pm:
16:17 dalek rakudo/nom: First step of val() work: replace grammar CLIVal in hack-val() with direct use of Str.Numeric()
16:17 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d9c09e8db0
16:19 jnthn the nilpotent page on wikipedia is odd :)
16:19 jnthn er, wrong window
16:21 * masak .oO( try viagra )
16:23 [Coke] I cialis you did there?
16:24 jnthn .oO( Can we raise the quality of the humor? )
16:24 masak so, Curiosity runs on 2.5..3.5 megalines of C, some of it generated probably by Python, but 1 megaline hand-written.
16:25 flussence 1 MMLL?
16:25 masak aaaurghhh
16:26 flussence it sounds like a lot, but most of it's going to be recycled from older missions...
16:27 masak aye.
16:30 kaare_ joined #perl6
16:32 * geekosaur under strong impression there is a lot of custom hand written code in use for this stuff, the core of which goes back many years but which is tweaked for every single mission.
16:33 geekosaur there is not a lot of actual software design/engineering involved
16:35 fridim_ joined #perl6
16:39 PerlJam except where they have to change from english units to metric units  ;)
16:41 masak (oops)
16:45 GlitchMr joined #perl6
16:50 Chillance joined #perl6
17:17 masak ha ha ha, oh right Perl 5 requires parentheses around all the conditional expressions, how hilarious. *sob*
17:17 moritz except for statement modifiers
17:18 masak I turned this one into a statement modifier. incidentally.
17:18 masak by the way, I feel much more comfortable about 'unless' these days. though I only ever use it in its statement modifier form.
17:28 Juerd For some reason, I still prefer "if not"
17:29 Juerd I have no idea what that reason could be, though.
17:31 [Coke] if not unless then what?
17:32 masak for me, the determiner isn't so much "will I avoid an extra negation here?", but "is the statement an assertion that is best specified in the positive?"
17:32 masak 'next unless <some condition holds>;'
17:33 Juerd I tend to write that as <some condition holds> or next
17:33 masak yeah. I don't do that at all.
17:33 Juerd In non-trivial code, I put the "or next" on the next line, indented.
17:33 geekosaur that's kinda where I am; I see some sense to the claims against "unless" but at the same time the code often *reads* better if I phrase it that way
17:33 masak I know the boolean ops are powerful enough to do that, but I only use 'or' and 'and' for side-effectful expressions, like 'open' or 'system'.
17:34 masak I guess I'm using Damian's rule there of what's the most important thing to emphasize.
17:35 masak with a conditional return, the 'return' is most important, so I use 'unless' rather than 'or'.
17:35 masak with an open that might fail, the 'open' is most important, so I use 'or' rather than 'unless'.
17:36 masak I don't expect that argument will sway anyone, but that's how my thinking goes :)
17:38 Juerd masak: I tend not to think in terms of what's most important, but of patterns.
17:38 masak that's a very vague thing to say :)
17:38 Juerd To me, "die", "next", and "return" all feel the same.
17:39 Juerd Once I have "or die ..." in code, it feels wrong to write "die ... if" or even "next ... if".
17:39 Juerd So after a while I decided to just go with "or die", "or next" and "or return".
17:40 masak ah. interesting.
17:40 Juerd Trying to pick the "most important" of the condition and conditional is strange. They're equally important.
17:41 masak that's where I disagree, and I think I have good reasons.
17:41 Juerd The condition is most important because without it, the code would break.
17:41 Juerd The conditional is most important because without it, the code would break.
17:41 huf put them both on the left.
17:42 masak the 'open' is what I want to do. the 'die' is off to the side because then I'm already outside of the main flow. that's why 'autodie' is possible for that case; we shouldn't really have to care about 'or die' for open.
17:42 Juerd huf: That's sort of what I do.
17:42 huf clearly code needs a 3rd dimension so you can write in a layer above another...
17:42 Juerd masak: I do have a lot of "open or next" in my code.
17:42 masak in the case of 'next unless', I'm still in control and basically defending my block-or-whatever from failed preconditions using control flow.
17:42 Juerd If opening the file didn't work, I usually don't care for that and will just ignore it.
17:43 masak Juerd: ok. I've never done that one. feels a bit risky, to be honest. but maybe in your use cases it's the right thing.
17:43 Juerd It is risky if you have nothing else to detect that something's off.
17:44 Juerd But in these use cases, simply doing a chmod -r to skip files is very useful :)
17:46 Juerd I'll often use directories as queues. The completed jobs are moved to another directory.
17:48 masak oh, I do that too occasionally.
17:48 masak hadn't thought of the chmod -r thing, though.
17:48 dalek perl6-roast-data: bd4703a | coke++ | p (2 files):
17:48 dalek perl6-roast-data: today
17:48 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/bd4703a20f
17:48 [Coke] seen pmichaud ?
17:48 aloha pmichaud  was last seen in  15558 days 17 hours ago .
17:48 [Coke] seen pmichaud?
17:48 aloha pmichaud was last seen in #perl6 3 days ago saying "anyway, I'm afk for a bit".
17:48 [Coke] aloha--
17:48 aloha [Coke]: Pbbbbtt!
17:49 benabik karma aloha
17:49 aloha aloha has karma of -70.
17:50 masak aloha--
17:50 aloha masak: Pbbbbtt!
17:55 masak aloha: Pbbbbtt!
17:55 arnsholt Having modules so that A uses B uses A will just cause Rakudo to loop endlessly, right?
17:55 masak ideally, no.
17:55 masak does it?
17:55 arnsholt I suspect so
17:55 arnsholt Could be something else that's broken in my code
17:57 arnsholt Yeah, it hangs.
17:57 arnsholt Tried with A and B being just the uses and -e 'use A; say "alive"'
17:59 fgomez joined #perl6
18:00 masak arnsholt: care to submit a rakudobug?
18:01 moritz maybe the "module A is loaded now" is set *after* A has finished loading
18:02 masak it wasn't always like that, though. I'm pretty sure this used to work.
18:04 arnsholt masak: Will do
18:05 adu joined #perl6
18:07 jnthn Wait, what?
18:08 arnsholt Oh, it's a jnthn =)
18:08 arnsholt Yeah, it breaks here
18:08 jnthn If you need the declarations from A in order to parse B, and you need the declarations from B in order to parse A, how is that gonna work?
18:09 TimToady poorly
18:09 arnsholt struct A has members of type struct B which has members of type A (it's Zavolaj stuff, just to make it extra fun)
18:09 arnsholt But yeah, that's a good point
18:10 jnthn Within a file such circularities are fine.
18:10 jnthn Just stub.
18:10 arnsholt It just seems that class A is repr('CStruct') { ... } doesn't quite work
18:10 jnthn Hm
18:10 jnthn That's surprising...it shouldn't be at all REPR-dependent.
18:10 benabik Doe the repr need to be defined when it's stubbed or when it's fleshed out?
18:10 jnthn When it's stubbed.
18:11 jnthn That's the point the type object comes into existence.
18:11 arnsholt Yeah, it complains that "The following packages were stubbed but not defined"
18:12 arnsholt And then my classes
18:13 jnthn Did you define them?
18:13 jnthn That is, in the same compilation unit?
18:13 jnthn r: class A is repr('CStruct') { ... }; class A { }
18:13 p6eval rakudo d9c09e:  ( no output )
18:13 jnthn r: class A is repr('CStruct') { ... };
18:13 p6eval rakudo d9c09e: OUTPUT«===SORRY!===␤The following packages were stubbed but not defined:␤    A␤at /tmp/wx6sZnnz_K:1␤»
18:14 arnsholt r: use NativeCall; class A is repr('CStruct') { ... }; class A { }
18:14 p6eval rakudo d9c09e: OUTPUT«===SORRY!===␤Could not find NativeCall in any of: /home/p6eval/.perl6/lib, /home/p6eval/nom-inst/lib/parrot/​4.4.0-devel/languages/perl6/lib␤»
18:14 arnsholt rs: use NativeCall; class A is repr('CStruct') { ... }; class A { }
18:14 jnthn "star"
18:14 arnsholt star: use NativeCall; class A is repr('CStruct') { ... }; class A { }
18:14 p6eval star 2012.07:  ( no output )
18:14 arnsholt Thanks =)
18:14 arnsholt Huh. That's odd
18:14 jnthn np :)
18:17 arnsholt star: module Lib; use NativeCall; class Lib::A is repr("CStruct") { ... }; class Lib::A { }
18:17 p6eval star 2012.07: OUTPUT«===SORRY!===␤The following packages were stubbed but not defined:␤    Lib::A␤at /tmp/cOtsTnOyyC:1␤»
18:17 arnsholt There, relatively golfed
18:18 benabik module Lib; class Lib::A ?  Wouldn't that produce a class Lib::Lib::A ?
18:18 arnsholt Not sure. "module Lib; class Lib::A {}" let's me instantiate a Lib::A in the using code, at least
18:19 jnthn That one does indeed look buggy.
18:19 arnsholt But killing the class Lib:: does fix it
18:20 jnthn star: module Lib; use NativeCall; module Lib { class A is repr("CStruct") { ... }; class A { } }
18:20 p6eval star 2012.07:  ( no output )
18:20 jnthn there's that workaround.
18:20 masak heh. "Quantum Mechanics obeys the Law of Conservation of Weirdness" :)
18:20 jnthn But the bug deserves a ticket.
18:20 lorn joined #perl6
18:21 UncleFester6 joined #perl6
18:22 UncleFester6 perl6: sub foo(Str $s is rw) { $s ~= "C"; say $s }; my Str $s = "AB"; foo($s); foo(Str.new())
18:22 p6eval rakudo d9c09e: OUTPUT«ABC␤Cannot assign to a non-container␤  in block  at src/gen/CORE.setting:11682␤  in sub foo at /tmp/3_iqJdzwkS:1␤  in block  at /tmp/3_iqJdzwkS:1␤␤»
18:22 p6eval ..niecza v19-15-g051783d: OUTPUT«ABC␤Unhandled exception: Binding '$s' in 'foo', cannot bind read-only value to is rw parameter␤  at /tmp/yidbCTkxEP line 0 (foo @ 1) ␤  at /tmp/yidbCTkxEP line 1 (mainline @ 8) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3) ␤  at /home/p6e…
18:23 arnsholt Yeah, there's some oddness here. Now I have "module Lib; class A is repr('CStruct') { ... }; class B is repr('CStruct') { ... }; class A {}; class B{};" but say Lib::A.new outputs "A.new()"
18:26 arnsholt Right. Another module Lib inside
18:26 arnsholt Nope. Still strips the Lib prefix
18:29 PerlJam How does one inspect the execution environment?  Like to find out what modules have been declared/defined?  or subroutines or classes or whatever?
18:29 jnthn r: use Test; say ::.keys
18:29 p6eval rakudo d9c09e: OUTPUT«&isa_ok &ok &dies_ok &nok &lives_ok &is GLOBALish &eval_dies_ok &isnt EXPORT &eval_lives_ok &is_approx $?PACKAGE &is_deeply &todo ::?PACKAGE &done_testing &skip $_ &done $/ &skip_rest $=pod $! &diag !UNIT_MARKER &plan &flunk &pass␤»
18:29 jnthn r: use Test; say GLOBAL::.keys
18:29 p6eval rakudo d9c09e: OUTPUT«Test␤»
18:29 jnthn Like that
18:30 Coleoid_aside joined #perl6
18:30 PerlJam ah
18:30 avarab joined #perl6
18:31 BinGOs_ joined #perl6
18:31 TimToady_ joined #perl6
18:32 UncleFester6 Just to be clear my second call to foo(Str.new()) was legit and should work ...
18:33 sivoais_ joined #perl6
18:34 jnthn UncleFester6: No, it should not work.
18:34 jnthn There's no scalar container to assign it into
18:34 jnthn Did you want "is copy"?
18:34 PerlJam UncleFester6: you didn't allocate storage.
18:35 Ulti_ joined #perl6
18:36 UncleFester6 OK - I think I see - sorry, bit of an out of date C/Perl perspective I guess
18:36 HarryS_ joined #perl6
18:37 BinGOs joined #perl6
18:37 UncleFester6 perl6: sub foo(Str $s is rw) { $s ~= "C"; say $s }; my Str $s = "AB"; foo($s); foo(my $t = Str.new())
18:37 p6eval niecza v19-15-g051783d: OUTPUT«Potential difficulties:â�¤  $t is declared but not used at /tmp/rCHpZ8YcA8 line 1:â�¤------> [32m$s }; my Str $s = "AB"; foo($s); foo(my [33mâ��[31m$t = Str.new())[0mâ�¤â�¤ABCâ�¤Câ�¤Â»
18:37 p6eval ..rakudo d9c09e: OUTPUT«ABC␤C␤»
18:38 nsh- joined #perl6
18:38 jdrab_ joined #perl6
18:39 nsh joined #perl6
18:39 Celelibi joined #perl6
18:46 UncleFester6 perl6: sub foo(Str $s is rw) { $s ~= "C"; say $s }; sub baz  { my Str $s = "AB"; return $s }; foo(baz())
18:46 p6eval niecza v19-15-g051783d: OUTPUT«ABC␤»
18:46 p6eval ..rakudo d9c09e: OUTPUT«Cannot assign to a readonly variable or a value␤  in block  at src/gen/CORE.setting:11682␤  in sub foo at /tmp/ckBIrx4IZf:1␤  in block  at /tmp/ckBIrx4IZf:1␤␤»
18:49 UncleFester6 Anyone else think that niecza is better here?
18:53 jnthn return is meant to strip containers
18:53 jnthn perl6: sub foo(Str $s is rw) { $s ~= "C"; say $s }; sub baz  { my Str $s = "AB"; return-rw $s }; foo(baz())
18:53 p6eval rakudo d9c09e, niecza v19-15-g051783d: OUTPUT«ABC␤»
18:54 benabik Does return-rw still exist?
18:54 jnthn Yes
18:54 benabik Oh.  Bah, you just used it.
18:55 jnthn Well, you coulda meant "still exist in the spec" :)
18:55 jnthn dinner, bbiab
18:57 UncleFester6 Hmm ... I was taking a buffer read from an IO::Socket::INET and passing it to a routine that tried to append to the rw parm and blew up.  Why would the Socket people think of using return-rw?
19:01 nebuchadnezzar blup!
19:02 nebuchadnezzar should I open somebug somewhere for something which seems not compliant with S14?
19:02 nebuchadnezzar r: role R1 { method x ($m) { say "MSG: $m"; } }; role R2 { method x (Int $i) {say "Int: $i"; } }; class C1 does R1 does R2 { proto method x () { say "Hay!"; }; }; C1.new.x("Hou");
19:02 p6eval rakudo d9c09e: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method x at /tmp/snCczrwA9b:1␤  in block  at /tmp/snCczrwA9b:1␤␤»
19:07 masak nebuchadnezzar: that looks right to me.
19:07 masak nebuchadnezzar: consider giving the proto a wider signature.
19:07 sorear good * #perl6
19:07 masak sorear! \o/
19:12 colomon o/
19:13 nebuchadnezzar masak: a wider signature? I want to force roles methods to be multi by defining a proto in my class, I make my proto less specific because I do not want to use it, or at a last ressort, like explained in http://perlcabal.org/syn/S14.html#line_207
19:15 japhb moritz, I say your commit adding the thumbnails to the doc HTML, and needing blead of Pod::To::HTML to process it.  Does this also mean linking the thumbs to the full-size SVGs is possible soon?
19:15 phenny japhb: 05 Aug 16:35Z <TimToady> tell japhb I think niecza's design of val() seems to work pretty well, as far as I've used it, though I think there should be method form
19:16 japhb TimToady_, duly noted, and makes sense to me too.
19:17 nebuchadnezzar Is there a way to find out where, in the build process, the compilation fails? To figure out what part of the compiler does not like my code?
19:17 masak nebuchadnezzar: as far as I know, the proto must have a signature that is at least the union of the signatures you want to intercept in your multis.
19:21 nebuchadnezzar r: role R1 { method x ($m) { say "MSG: $m"; } }; role R2 { method x (Int $i) {say "Int: $i"; } }; class C1 does R1 does R2 { proto method x (Any $) { say "Hay!"; }; }; C1.new.x("Hou");
19:21 p6eval rakudo d9c09e: OUTPUT«Hay!␤»
19:21 masak r: role R1 { method x ($m) { say "MSG: $m"; } }; role R2 { method x (Int $i) {say "Int: $i"; } }; class C1 does R1 does R2 { proto method x (Any $) { {*} }; }; C1.new.x("Hou");
19:21 p6eval rakudo d9c09e: OUTPUT«===SORRY!===␤{*} may only appear in proto at line 2, near " }; }; C1."␤»
19:22 masak it *appears* in a proto! >:(
19:22 nebuchadnezzar r: role R1 { method x (Str $m) { say "MSG: $m"; } }; role R2 { method x (Int $i) {say "Int: $i"; } }; class C1 does R1 does R2 { proto method x (Any $) { say "Hay!"; }; }; C1.new.x("Hou");
19:22 p6eval rakudo d9c09e: OUTPUT«Hay!␤»
19:22 nebuchadnezzar erf, I must have missed something
19:24 nebuchadnezzar SIGSTOMACK
19:24 nebuchadnezzar I wondered why my brain does not work very well...
19:25 jnthn r: role R1 { method x ($m) { say "MSG: $m"; } }; role R2 { method x (Int $i) {say "Int: $i"; } }; class C1 does R1 does R2 { proto method x (Any $) { * }; }; C1.new.x("Hou");
19:25 p6eval rakudo d9c09e: OUTPUT«Cannot call ''; none of these signatures match:␤␤  in method x at /tmp/akGSRZ9UAE:1␤  in block  at /tmp/akGSRZ9UAE:1␤␤»
19:26 dalek nqp: 3abd848 | (Arne Skjærholt)++ | src/ (2 files):
19:26 dalek nqp: Fix segfault bug when write-barriering CStruct REPRd objects.
19:26 dalek nqp:
19:26 dalek nqp: child_objs is now allocated with mem_sys_allocate_zeroed, and a child object
19:26 dalek nqp: is ignored if child_objs[i] is NULL. This fixes a bug where write-barriering
19:26 dalek nqp: would trip over a bogus pointer when write-barriering a struct returned from C
19:26 dalek nqp: and a field was unread before passing it to another C function.
19:26 dalek nqp: review: https://github.com/perl6/nqp/commit/3abd848a71
19:26 Chillance joined #perl6
19:27 moritz japhb: where "soon" = "when somebody comes up with a good way to do it, and implements it"
19:35 japhb moritz, Hmmm.  I guess that means a bit of design discussion about how we want it to look, followed by one of us doing the needed hacking.  And I'm going to be tuit-constrained this week.  Can we for now just have an explicit link next to the thumbnail to the larger (and navigable) version?
19:36 moritz japhb: +1
19:50 nsh joined #perl6
20:07 birdwindupbird joined #perl6
20:17 PacoAir joined #perl6
20:40 benabik joined #perl6
20:55 moritz $ panda install Net::IRC::Bot
20:55 moritz Mu()
20:55 moritz resolve stage failed for Net::IRC::Bot: Project Net::IRC::Bot not found in the ecosystem
20:55 moritz what's wrong?
20:56 moritz according to http://modules.perl6.org/ the name is correct
20:56 jnthn moritz: Do other module installs work?
20:56 moritz jnthn: yes, installing URI worked
20:57 popl joined #perl6
20:57 jnthn Oddness
21:03 ingy joined #perl6
21:04 dju joined #perl6
21:11 dalek doc: 1b3ffe4 | moritz++ | htmlify.pl:
21:11 dalek doc: link to SVG version of type graph images
21:11 dalek doc: review: https://github.com/perl6/doc/commit/1b3ffe4b4a
21:11 dalek doc: 9596fde | moritz++ | htmlify.pl:
21:11 dalek doc: show progress while writing type graph images
21:11 dalek doc: review: https://github.com/perl6/doc/commit/9596fdef6f
22:04 sivoais_ joined #perl6
22:20 colomon joined #perl6
22:44 sivoais joined #perl6
22:50 Chillance joined #perl6
22:51 masak '♞, #perl6
22:51 colomon o/
22:51 shachaf o⎠
22:52 * colomon thinks "'black knight, #perl6" is an odd thing to say.  ;)
22:52 sorear o/
22:52 shachaf I wish Unicode has BLACK versions of all the WHITE characters.
22:53 fgomez joined #perl6
22:54 * geekosaur observes that it's a white knight here...
22:54 * shachaf is annoyed that his IRC client doesn't support non-BMP characters.
22:55 sorear .oO( My IRC client system mostly uses TTF characters )
22:56 shachaf What, s/haracter/odepoint/?
23:00 sivoais joined #perl6
23:09 popl My font is 12pt so it's more like an irregular white blob here. :D
23:12 * [Coke] yawns.
23:13 popl joined #perl6
23:40 ggoebel p5: print 'ok'
23:40 ggoebel p5eval: print 'ok'
23:40 ggoebel hmm...
23:40 ggoebel masak mentioned "Perl 5 requires parentheses around all the conditional expressions"
23:40 ggoebel what about... print 'ok' if 1==1
23:41 benabik eval print 'ok'
23:41 buubot_backup benabik: ok1
23:41 ggoebel thx
23:42 ggoebel eval print 'ok' if 1==1
23:42 buubot_backup ggoebel: ok1
23:42 benabik he did also say "except for statement modifiers"
23:42 benabik eval if 1 == 1 { print 'ok' }
23:42 buubot_backup benabik: ERROR: syntax error at (eval 20) line 1, near "if 1"
23:42 benabik eval if (1 == 1) { print 'ok' }
23:42 buubot_backup benabik: ok1
23:42 ggoebel oh right, moritz says that in the next line down...
23:47 skids joined #perl6

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

Perl 6 | Reference Documentation | Rakudo