Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-03-29

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:07 timotimo TimToady: can you identify the obvious mistake here? https://gist.github.com/2230981
00:10 TimToady the only obvious mistake is thinking the mistake is obvious
00:11 timotimo thinking thinking the mistake is obvious is the obvious mistake is obviously a mistake, through its own logic
00:12 baest joined #perl6
00:13 felher timotimo: when do you get this error? Buidling rakudo?
00:13 felher *building
00:13 timotimo yes, it comes after "make"
00:13 timotimo ./perl6 --setting=NULL --optimize=3 --target=pir  --output=src/gen/CORE.setting.pir src/gen/CORE.setting
00:13 timotimo maximum recursion depth exceeded
00:14 * felher tries this here
00:14 felher timotimo: does the gist include the full patch?
00:14 timotimo i even tried to make clean it before that :)
00:15 timotimo yes, that's all git diff outputs
00:23 envi_ joined #perl6
00:26 moritz timotimo: there's a 'my' missing before the stub
00:26 moritz not sure if it causes the error though
00:27 * felher is just compiling with 'my'
00:27 timotimo i'll remake, too
00:28 moritz timotimo: you can also try to run the compilation step with --ll-exception
00:28 timotimo what does ll stand for?
00:28 moritz low level
00:29 moritz ./perl6 --ll-exception  --setting=NULL --optimize=3 --target=pir  --output=src/gen/CORE.setting.pir src/gen/CORE.setting
00:31 felher adding my seems to compile forever instead of failing on my machine...
00:31 timotimo how can you tell? :)
00:31 felher i can't :)
00:31 felher But it 'seems' :)
00:31 moritz I watch the compilation with 'top' or 'htop'
00:31 timotimo it's still chugging away at the cpu
00:32 moritz and if the memory consumption stays constant for a minute or longer, it's usually a hang
00:32 timotimo ah.
00:33 moritz timotimo: fwiw the error you are getting usually comes from using a type a string that hasn't set up its stringification method, or something. That can happen during error reporting :/
00:33 moritz *as a string
00:35 moritz having Perl6::World.throw in the backtrace is
00:35 moritz an indicator that it really loops during error reporting
00:35 timotimo memory has not changed yet. can actually be a hang :\
00:35 moritz and the caller of .throw is src/Perl6/Grammar.pm:1227
00:36 moritz which is a redeclaration error
00:36 timotimo oh? so that class already exists somewhere? or something similar?
00:37 localhost joined #perl6
00:37 moritz timotimo: yes
00:37 moritz timotimo: because operators.pm comes *after* Exception.pm
00:37 moritz timotimo: so by the time you write the stub, the real thing has already been declared
00:37 timotimo ah, so the stub class is not needed
00:37 moritz correct
00:38 timotimo i thought i had gotten an error before i added that stub
00:39 japhb_ I just merged the nom changes for the last several months into the str-numeric branch, up to the point that moritz started doing things to src/core/Str.pm.
00:40 japhb_ Basically I've managed to merge in everything up to about 10 commits ago from nom.
00:41 moritz those commits might require some hand merging/tuning
00:41 japhb_ moritz, we should figure out a good path forward here, because I'd hate to lose all the work I did in that branch, but str-numeric was not merged back precisely because we didn't have a decent plan for how to deal with all the spec failures.
00:42 timotimo cool, it went through
00:42 moritz japhb_: agreed
00:42 moritz timotimo: \o/
00:42 timotimo thanks!
00:42 timotimo i'll know what's up in the future now
00:43 moritz japhb_: how much work would it be to make the str-numeric branch laxer for now and merge it?
00:44 moritz japhb_: then we can take care of the spectest failures, and then make it strict again
00:44 japhb_ Give me a few minutes to take a look at the current state ...
00:44 timotimo i even have a passing test now. great!
00:45 felher timotimo++ :)
00:45 moritz japhb_: fwiw I also won't mind terribly if you undo my fail() changes in the branch, I can always add them in later
00:47 japhb_ moritz, is there a good (easy and clean) way for me to merge just your changes outside Str.pm?
00:48 moritz japhb_: I don't know
00:48 moritz japhb_: are you using git rebase? or merge?
00:49 japhb_ merge -- didn't want to screw everyone by rebasing a published branch
00:51 moritz japhb_: the only idea I have is to not merge nom, but the last revision before I touched Str.pm
00:51 japhb_ Already did that -- that's the "10 commits ago" I was referring to.
00:51 japhb_ I'm trying a new tack:
00:51 japhb_ Merge everything, but take my version of Str.pm.
00:51 moritz japhb_: ah. And then cherry-pick the unrelated commits since then
00:52 moritz japhb_: that's probably even better :-)
00:52 japhb_ :-)
00:52 moritz at least, if you use only your version of Str.Numeric; I guess there were other worthwhile changes in Str.pm
00:52 moritz (like, the .match refactor)
00:54 japhb_ moritz, You didn't do that in the last 10 commits, did you?
00:54 japhb_ (Because everything else is already merged up to that point)
00:55 moritz ah, correct
00:55 moritz never mind then
00:56 moritz you can probably do something along the lines of
00:57 moritz git show str-numeric:src/core/Str.pm > src/core/Str.pm
00:57 moritz git add src/core/Str.pm
00:57 moritz that should resolve all conflicts in that file with the version from the str-numeric branch
00:58 timotimo under what circumstance do i do is Exception and when do i do does X::Comp instead?
00:59 moritz timotimo: 'does X::Comp' is for compilation errors
00:59 moritz ie stuff detected at compile time
00:59 timotimo ah, ok.
00:59 timotimo not actually sure how to decide that :\
01:00 timotimo well, the pull request discussion will show.
01:00 moritz for 'does'?
01:00 moritz or a different error=
01:00 moritz s/=/?/
01:00 timotimo "cannot bind to a zen array/hash slice"
01:01 timotimo seems runtime to me
01:01 moritz yes, runtime
01:01 moritz if the error is triggered from src/core/*.pm, it's nearly always runtime
01:01 timotimo good
01:01 timotimo now i need to figure out how to trigger this error
01:02 havenn joined #perl6
01:02 moritz (and if not, we're in trouble anyway, because we don't have the line number of the error when we are in core/*.pm)
01:02 moritz nom: my @a; @a[] := (1, 2, 3);
01:02 p6eval rakudo 099d30: OUTPUT«Cannot bind to a zen array slice␤  in method postcircumfix:<[ ]> at src/gen/CORE.setting:1125␤  in block <anon> at /tmp/234UU_AtPS:1␤␤»
01:02 moritz in this case, 'zen' just means 'empty'
01:02 timotimo ah, and := means binding?
01:03 moritz I guess it wouldn't hurt to change the error message to "Cannot bind to an empty {array,hash} slice"
01:03 moritz timotimo: yes
01:04 timotimo i have two exceptions for that, is that okay, too?
01:04 japhb_ OK, pushed a new str-numeric
01:04 japhb_ ... and learned a bit about git mergetool
01:05 moritz timotimo: I think I'd prefer one exception, with an attribute to distinguish the array and hash cases
01:05 timotimo would a bool flag be okay for that?
01:06 moritz my class X::Bind::ZenSlice is Exception { has $.type = 'array'; method message() { "Cannot bind to a zen $.type slice" } }
01:06 japhb_ moritz, so now we should be about as merged as we can be.  Only your changes to Str.Numeric() would have been lost, and not much there.
01:06 timotimo OK.
01:06 moritz timotimo: that way it's extensible to more future data types
01:06 moritz japhb_: great
01:07 moritz now that my daughter sleeps again, I'll try that "sleep" thing too
01:07 japhb_ Good thinking
01:07 sorear good night
01:07 timotimo good luck ;)
01:08 moritz thanks
01:08 moritz &
01:12 * felher heads for bed, too
01:12 felher good night, #perl6
01:14 * timotimo bikes home or something
01:18 wolfman2000 joined #perl6
01:22 jaldhar joined #perl6
01:28 fgomez joined #perl6
01:30 libertyprime joined #perl6
01:33 lichtkind good night
01:48 BruceZu joined #perl6
01:51 benabik joined #perl6
01:55 jnthn hello, for a short moment :)
01:55 * jnthn has reached the end of the world :)
01:58 sorear hello, jnthn
01:58 sorear which end?
02:00 au the middle end?
02:01 jnthn sorear: Ushuaia, which claims to be the southernmost city in the world. :)
02:02 timotimo what.
02:03 sjn Argentina, eh
02:03 jnthn sjn: Yeah. Been vacationing. :)
02:03 jnthn Back to hacking in a week or so though. Unless I get eaten by penguins or something.
02:04 * jnthn is in theory going on a trip to see some in a day or two :)
02:05 sorear In view of the Earth's oblateness, I think Quito has a better claim to being a city closest to the end of the world
02:05 sjn jnthn: ask your hosts about their opinion of the city of Puerto Williams :)
02:06 jnthn sjn: :P
02:06 sjn "What? That's no city, it's barely a hovel!" :)
02:07 sjn oh, the entertainment one can find on wikipedia :D
02:08 jnthn I could actually trip to Puerto Williams from here, but it see
02:09 jnthn s/,.+//
02:09 timotimo hum. would this be wrong? throws_like 'my @a; @a[] := <foo bar baz>', X::Bind::ZenSlice, what => 'array';
02:09 timotimo because that test line blows up saying: # Got:      X::Syntax::Confused()
02:10 timotimo oh, actually, wrong test i'm looking at!
02:20 timotimo how would i initialize a role that has a single public attribute? :\
02:21 timotimo (trying to cause "can only supply an initialization value for a role if it has a single public attribute")
02:23 jnthn nom: role R { }; 42 but R('omg')
02:23 p6eval rakudo 099d30: OUTPUT«Can only supply an initialization value for a role if it has a single public attribute␤  in sub infix:<but> at src/gen/CORE.setting:9794␤  in block <anon> at /tmp/DRf_ixD4Zv:1␤␤»
02:23 jnthn nom: role R { has $.x; }; 42 but R('omg')
02:23 p6eval rakudo 099d30:  ( no output )
02:24 timotimo oh, it's not for does, it's for but!
02:24 timotimo huh. but it's thrown in infix:<does>. i'm confuse
02:24 timotimo okay, i clearly need sleep, because that was just wrong.
02:26 timotimo oh, there's one in infix:<but> and one in infix:<does>, too!
02:26 jnthn oh, you can trigger it with does too
02:26 timotimo can you tell me how to trigger that? the signature is multi infix:<does>(Mu:D \$obj, Mu:U \$role, :$value! is parcel) is rw {
02:26 jnthn nom: role R { }; class C { }; C.new does R(42)
02:26 p6eval rakudo 099d30: OUTPUT«Can only supply an initialization value for a role if it has a single public attribute␤  in sub infix:<does> at src/gen/CORE.setting:9773␤  in block <anon> at /tmp/GNRd8Y5RPl:1␤␤»
02:27 timotimo weird. what did i do wrong here? > role foo {}; my $a does foo(99);
02:27 timotimo Contextual %*PARAM_INFO not found
02:29 timotimo i feel X::Role::Initialization is not sufficiently good, but i can't come up with anything else that's not at least 80 characters long ...
02:29 jnthn timotimo: I think you found a compiler NYI with a crappy message
02:30 timotimo i don't know how to file a sufficiently good bug, so i suppose whoever wants to can do that for me if they feel like it
02:31 jnthn timotimo: Well, the reasl answer is I need to implement traits on variables. :)
02:31 geekosaur I think the %*PARAM_INFO is a known bug, yeh
02:31 timotimo good, then
02:32 jnthn Wouldn't surprise me if it's already ticketed. Var traits being NYI sure are.
02:32 jnthn *surely
02:39 * timotimo sends pull request and goes to bed
02:42 * jnthn figures he'll get some rest now too
02:42 jnthn 'najt
02:44 timotimo gnite :)
02:50 sorear n: print Str
02:51 p6eval niecza v16-4-gd48d4a8:  ( no output )
02:51 sorear n: print <2.3>.WHAT
02:51 p6eval niecza v16-4-gd48d4a8: OUTPUT«Rat()»
02:53 lestrrat joined #perl6
03:05 orafu joined #perl6
03:25 tyatpi joined #perl6
03:38 derrazo_ joined #perl6
03:46 lestrrat joined #perl6
04:03 leprevost joined #perl6
04:08 elkng joined #perl6
04:09 elkng is there 5to6 ?
04:12 sorear http://perlgeek.de/blog-en/perl-5-to-6/ ?
04:15 elkng tool, there is 2to3 "a Python program that reads Python 2.x source code and applies a series of *fixers* to transform it into valid Python 3.x code.", isnt there same tool for perl ?
04:15 sorear No.
04:16 sorear 6/5 are much more different, and 6 isn't going to replace 5 anyway
04:18 TimToady there was a translator from GSoC several years ago written in Haskell, but it's probably bitrotted and specrotted by now
04:25 Teratogen is it true that cosmic rays can cause actual bit rot?
04:26 benabik Yes, although the odds of significant damage occurring due to cosmic rays on earth is fairly low.
04:26 benabik The atmosphere is pretty good at blocking them, which is good news for life in general.
04:30 japhb Note that IIUC large servers now have *so many* bits of RAM and motherboard traces, both stuffed into quite small spaces, that the chance of random bit-flips of RAM in a large server is enough that you'd basically be nuts not to design in error correction these days.  Hard drive error correction has actually gotten to be such a major percentage of the platter space that they had to change sector size recently in order to improve the useful
04:30 japhb data/error correction ratio.
04:35 sorear Teratogen: iirc they discovered that alpha particles from thorium contamination in chip encapsulation packages are more significant than cosmic rays
04:35 benabik Quantum tunneling is a major consideration for error these days.  It's crazy.
04:35 sorear the "cosmic ray" explanation came into vogue well before chip features reached the nanoscale
04:42 envi_ joined #perl6
04:42 fgomez joined #perl6
04:59 cxreg hiring perl people in seattle, if anyone knows someone looking
05:06 colomon joined #perl6
05:09 Teratogen joined #perl6
05:09 Teratogen oops
05:10 Teratogen don't type ctrl-c in the terminal that you start X Windows from
05:10 Teratogen it shuts down X Windows
05:10 Teratogen =/
05:19 sorear cxreg: if only, if only
05:24 colomon joined #perl6
05:28 birdwindupbird joined #perl6
05:36 GlitchMr joined #perl6
05:40 japhb Putting my hands where my mouth is (or something like that):
05:40 japhb https://github.com/japhb/perl6-bench
05:41 japhb ^^ A rough sketch of a tool to benchmark and compare various Perl 6 implementations against perl5, so that it becomes possible to make "no more than 10x slower than perl5" a verifiable goal
05:42 japhb Perhaps I should have called it perl65-bench or perl6-perl5-bench or something.
05:43 japhb Well in any case, masak:  I'm looking for objections, if any.  And also help expanding it.  :-)
05:43 GlitchMr Heh, I would like to see more :)
05:43 GlitchMr Perhaps I could make something... for example file processing related...
05:43 GlitchMr Where is my UNIX dictionary...
05:44 japhb FWIW, I'm happy to move the repo to the perl6 github org, if prefered, under whatever name makes sense to everyone.
05:45 GlitchMr We have https://github.com/perl6/bench-scripts, but it's about testing performace of various Perl 6 implementations and it's sort of old...
05:46 japhb GlitchMr, it helps if new tests actually run in both Rakudo and Niecza now.  ISTR not all file ops are supported in Niecza yet.
05:47 GlitchMr ... hmmm... that could be issue...
05:50 GlitchMr niecza> while (<STDIN>) {}
05:50 GlitchMr This appears to be Perl 5 code at (eval) line 1:
05:50 GlitchMr ... really helpful warning...
05:50 sorear that
05:51 sorear that's an error, not a warning.  please learn the difference.
05:51 sorear HINT: look for SORRY! or Potential difficulties:
05:51 GlitchMr At least, it's good that it doesn't make loop (string 'STDIN' is always truthy)...
06:03 kaleem joined #perl6
06:04 derrazo_ left #perl6
06:07 mj41 joined #perl6
06:07 moritz good morning
06:07 moritz timotimo++ # rakudo and roast pull requests
06:07 mucker joined #perl6
06:07 sorear good morning moritz
06:08 sorear what is the status of dalek, and how well can I help?
06:08 wtw joined #perl6
06:09 moritz sorear: I have no idea hwo to migrate dalek.
06:09 moritz sorear: basically i know nothing about what kind of infrastructure it needs, where it lives and what the prerequs are
06:10 sorear ugh
06:10 moritz correct
06:10 sorear can you get me an acct on feather3?
06:10 moritz sorear: yes
06:11 moritz sorear: is dalek in any way risky to run?
06:11 sorear no
06:11 moritz sorear: then we should run it on feather1 instead
06:11 moritz hm, OTOH that would make it harder to couple dalek and p6eval
06:16 sorear niecza: [Z]
06:16 p6eval niecza v16-5-ge2f3bfa: OUTPUT«(timeout)»
06:16 sorear niecza: [X]
06:16 p6eval niecza v16-5-ge2f3bfa:  ( no output )
06:20 birdwindupbird joined #perl6
06:21 sporous joined #perl6
06:40 tarch joined #perl6
06:44 dalek joined #perl6
06:45 dalek joined #perl6
06:47 dalek joined #perl6
06:48 dalek hi
06:48 sorear dalek core seems to be working now
06:50 moritz \o/
06:51 moritz I guess the notification URL will change :/
06:51 sorear yes
06:51 sorear (I haven't gotten the http listener working anyway)
06:52 sorear sid, eh
06:54 moritz aye :/
06:58 sorear what?
06:58 sorear no zlib-dev?
07:07 dalek niecza: ede8b6d | (Solomon Foster)++ | lib/CORE.setting:
07:07 dalek niecza: Fix Bag.Str and KeyBag.Str to conform to TimToady's suggestions.
07:07 dalek niecza: review: https://github.com/sorear/niecza/commit/ede8b6d8f2
07:07 dalek niecza: d48d4a8 | (Solomon Foster)++ | src/NieczaActions.pm6:
07:07 dalek niecza: Appropriate error message for out-of-range digits in a radix.  This should probably be merged with the CORE.setting verison of the same function in the long run, but for now this makes things work.
07:07 dalek niecza: review: https://github.com/sorear/niecza/commit/d48d4a8937
07:07 dalek niecza: e2f3bfa | sorear++ | lib/CORE.setting:
07:07 dalek niecza: Stop Str.say from crashing (GlitchMr++ for fuzz testing)
07:07 dalek niecza: review: https://github.com/sorear/niecza/commit/e2f3bfa510
07:07 dalek niecza: f585b26 | sorear++ | lib/Builtins.cs:
07:07 dalek niecza: Stop [Z] from hanging
07:07 dalek niecza: review: https://github.com/sorear/niecza/commit/f585b2644a
07:08 moritz sorear: is there a new push URL?
07:09 dalek std: 292f669 | larry++ | STD.pm6:
07:09 dalek std: disallow anonymous constant declarations
07:09 dalek std: review: https://github.com/perl6/std/commit/292f669905
07:09 dalek std: 1ad3292 | larry++ | STD.pm6:
07:09 dalek std: give modern advice on \p and \P
07:09 dalek std: review: https://github.com/perl6/std/commit/1ad3292d73
07:09 dalek std: 3c2fb9c | larry++ | STD.pm6:
07:09 dalek std: obs updates; move ident checks to explain_mystery
07:09 dalek std:
07:09 dalek std: Obsolescence messages based on identifiers now done from explain_mystery
07:09 dalek std: so that user-defined subs of the same name aren't impacted.  Added messages
07:09 dalek std: for new P5 regex modifiers, qr, local, and new (as function call).
07:09 dalek std: review: https://github.com/perl6/std/commit/3c2fb9c2d4
07:09 sorear moritz: yes
07:09 sorear I'm in the process of updating all the perl6/ repositories
07:09 sorear just change the hostname
07:12 moritz phenny: ask pmichaud to please change the hostname of the notification URLs of the rakudo/rakudo and rakudo/star repos to feather3.perl6.nl
07:12 phenny moritz: I'll pass that on when pmichaud is around.
07:12 moritz or give me admin privs right away :-)
07:17 dalek mu: 74e91c9 | sorear++ | misc/dalek-push.txt:
07:17 dalek mu: Update URLs in dalek-push.txt documentation
07:17 dalek mu: review: https://github.com/perl6/mu/commit/74e91c9b16
07:18 jai joined #perl6
07:18 agentzh joined #perl6
07:19 sorear just mailed diakopter to say that dalek is moved
07:19 moritz sorear++
07:20 Teratogen aren't the daleks evil?
07:20 Teratogen or are the just alien?
07:20 sorear canonically, yes
07:20 Teratogen Doctor Who, right?
07:20 sorear no, they're no-holds-barred nazi expies
07:20 sorear no alienness about them
07:20 fglock joined #perl6
07:21 jai hi..
07:21 jai have a nice day to all
07:22 jai any one help me to learn perl language..
07:22 sorear Hello and welcome jai.
07:22 sorear o/ fglock
07:22 sorear jai: are you sure you didn't want #perl?
07:22 jai hi.. sorear.. i hope you are good
07:23 jai i want perl
07:23 sorear so why #perl6?
07:24 sorear this is a specialized channel
07:24 jai ok.. sorry
07:24 GlitchMr Perl 6 is work in progress
07:25 GlitchMr While compilers are sort of usable, you would likely want way more stable Perl 5.
07:25 jai sorear: i am having some query. can i ask now..
07:25 sorear don't ask to ask
07:26 sorear just ask
07:26 daxim joined #perl6
07:27 fglock o/
07:28 jai if i learn perl,, it is good for my career or not?
07:28 sorear yes, good
07:29 GlitchMr Well, it's always new experience.
07:29 Teratogen Perl > Java
07:30 GlitchMr Perl is glue language, even if your company doesn't use it for project itself, there is possibility of using Perl for operating on files and stuff like this.
07:33 dalek niecza: faba63b | sorear++ | src/Op.pm6:
07:33 dalek niecza: Fix substatement block for (say (for ... { ... }))
07:33 dalek niecza: review: https://github.com/sorear/niecza/commit/faba63b037
07:42 NamelessTee joined #perl6
07:47 mj41 joined #perl6
08:14 dalek niecza: b4b916a | sorear++ | src/ (2 files):
08:14 dalek niecza: Make say ($_*$_ for 0..9) DTRT (only for for now)
08:14 dalek niecza: review: https://github.com/sorear/niecza/commit/b4b916ab69
08:15 * sorear -> sleep
08:28 liuchong joined #perl6
08:30 tadzik good morning #perl6
08:30 NamelessTee joined #perl6
08:31 moritz \o tadzik
08:45 dakkar joined #perl6
08:53 alvis`` joined #perl6
08:54 cognominal http://plato.stanford.edu/entries/cellular-automata/  # may be of interest for some people here
09:08 lestrrat joined #perl6
09:14 zipf joined #perl6
09:18 zipf joined #perl6
09:23 mdupont joined #perl6
09:35 kaleem joined #perl6
09:38 replore_ joined #perl6
09:41 GlitchMr perl6: printf '%v08b', ':)'
09:41 p6eval pugs: OUTPUT«00000000»
09:41 p6eval ..niecza v16-8-gb4b916a: OUTPUT«Unhandled exception: invalid format specifier␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (sprintf @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 1237 (printf @ 3) ␤  at /tmp/4ojgQapVcj line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.set…
09:41 p6eval ..rakudo f2004a: OUTPUT«'0' is not a valid sprintf format␤  in sub sprintf at src/gen/CORE.setting:1936␤  in sub printf at src/gen/CORE.setting:1941␤  in block <anon> at /tmp/urUxH5xlBd:1␤␤»
09:41 GlitchMr :)
09:41 GlitchMr r: printf '%0v8b', ':)'
09:41 p6eval rakudo f2004a: OUTPUT«'8' is not a valid sprintf format␤  in sub sprintf at src/gen/CORE.setting:1936␤  in sub printf at src/gen/CORE.setting:1941␤  in block <anon> at /tmp/9lw32P0T82:1␤␤»
09:41 GlitchMr ... uhmmm...
09:42 araujo joined #perl6
09:42 araujo joined #perl6
09:43 GlitchMr Perhaps I would insert some sprintf tests :P.
09:47 GlitchMr https://github.com/perl6/roast/blob/master/S32-str/sprintf.t#L73-82
09:47 GlitchMr I don't know if I've missed something, but I don't see %C in printf documentation.
09:47 GlitchMr Any printf() documentation, not even S32 or perldoc...
09:48 Teratogen what is %C supposed to do?
09:48 GlitchMr I don't know
09:48 Teratogen neither do I
09:48 Teratogen maybe it is undefined
09:48 GlitchMr It's... just mentioned in one test...
09:48 Teratogen ?
09:49 GlitchMr But niecza seems to do something, I just don't know what...
09:49 GlitchMr niecza> sprintf '%C', '2'
09:49 GlitchMr niecza> sprintf '%q', '2'
09:49 GlitchMr invalid format specifier
09:49 GlitchMr I've got... nothing at %C...
09:49 GlitchMr I'm... confused...
09:50 GlitchMr sprintf "%d%C is %d digits long",
09:50 GlitchMr 1234,
09:50 GlitchMr sub ($s, @args is rw) { @args[2] = $s.elems },
09:50 GlitchMr ... sub {}... interesting...
09:50 Teratogen I don't see it in perlfunc
09:50 Teratogen oh
09:50 Teratogen Perl 6
09:50 Teratogen hm
09:50 Teratogen sorry I thought I was on #perl
09:50 GlitchMr lol
09:50 Teratogen it probably does do something in Perl 6
09:50 moritz I think it's been removed
09:51 Teratogen maybe %undefined becomes undefined
09:51 moritz commit 8ef142f7f49fc62be17dd0569d34e7e17e02bc7b
09:51 Teratogen like %C just becomes a C
09:52 GlitchMr "I challenge the world to come up with a use case for '%C'." :)
09:52 GlitchMr So, I guess it can be removed from tests?
09:53 dalek roast: 91d1b92 | moritz++ | S32-str/sprintf.t:
09:53 dalek roast: remove test for deprecated %C sprintf format
09:53 dalek roast: review: https://github.com/perl6/roast/commit/91d1b92e61
09:53 moritz it has been removed from the tests :-)
09:53 GlitchMr Heh, I wanted to insert few other tests anyways :P
09:54 kaleem joined #perl6
09:56 moritz you can still do that.
09:58 GlitchMr I know...
09:59 GlitchMr I wouldn't even notice that %C is there if I wouldn't want to add few tests.
10:01 GlitchMr Perhaps I will add few completely untested features like vectors...
10:04 GlitchMr perl6: sprintf
10:04 p6eval niecza v16-8-gb4b916a: OUTPUT«Unhandled exception: System.IndexOutOfRangeException: Array index is out of range.␤  at Builtins.sprintf (Niecza.Variable[] args) [0x00000] in <filename unknown>:0 ␤  at Run.CORE.C603sprintf (Niecza.Frame ) [0x00000] in <filename unknown>:0 ␤  at Niecza.Ker…
10:04 p6eval ..pugs: OUTPUT«*** No compatible multi variant found: "&sprintf"␤    at /tmp/1TTQ3twTNb line 1, column 1 - line 2, column 1␤»
10:04 p6eval ..rakudo f2004a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'sprintf' will never work with no arguments (line 1)␤    Expected: :(Cool $format, *@args)␤»
10:07 PacoAir joined #perl6
10:09 GlitchMr #    Failed test
10:09 GlitchMr #           got: string
10:09 GlitchMr #      expected:  st
10:09 GlitchMr I love edge cases :)
10:24 GlitchMr perl6: use Test; is sprintf('%I32d %hhd', 3, 257), '3 1',    'type argument';
10:24 p6eval pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/xJUqIuqbh9 line 1, column 1␤»
10:24 p6eval ..rakudo f2004a: OUTPUT«'I' is not a valid sprintf format␤  in sub sprintf at src/gen/CORE.setting:1936␤  in block <anon> at /tmp/P_ifgELDf4:1␤␤»
10:24 p6eval ..niecza v16-8-gb4b916a: OUTPUT«Unhandled exception: invalid format specifier␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (sprintf @ 1) ␤  at /tmp/gQf8Jafj8A line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setti…
10:25 GlitchMr perl6: use Test; is sprintf('%hhd', 257), '3 1',    'type argument';
10:25 p6eval niecza v16-8-gb4b916a: OUTPUT«Unhandled exception: invalid format specifier␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (sprintf @ 1) ␤  at /tmp/9nW6vumXBJ line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setti…
10:25 p6eval ..pugs: OUTPUT«pugs: *** Unsafe function 'use' called under safe mode␤    at /tmp/44OQPBz8DQ line 1, column 1␤»
10:25 p6eval ..rakudo f2004a: OUTPUT«not ok 1 - type argument␤#      got: '257'␤# expected: '3 1'␤»
10:25 GlitchMr ... wait... specification doesn't mention %hh... weird...
10:26 GlitchMr So I shouldn't test it...
10:29 GlitchMr perl6: printf('%.0f', 0)
10:29 p6eval pugs, rakudo f2004a: OUTPUT«0»
10:29 p6eval ..niecza v16-8-gb4b916a: OUTPUT«??»
10:29 GlitchMr That "??" doesn't make sense...
10:30 moritz %.0f doesn't make sense either, do it?
10:30 GlitchMr It does
10:30 GlitchMr It rounds numbers
10:30 GlitchMr irb(main):002:0> sprintf '%.0f', 5.6
10:30 GlitchMr => "6"
10:30 GlitchMr irb(main):003:0> sprintf '%d', 5.6
10:30 GlitchMr => "5"
10:31 tadzik r: printf('%.0f', 5.6)
10:31 p6eval rakudo f2004a: OUTPUT«6»
10:31 GlitchMr .0 may be used to control precission
10:31 GlitchMr That's sort of hacky, but whatever...
10:32 GlitchMr perl6: printf('%3.2s', 'string')
10:32 p6eval niecza v16-8-gb4b916a: OUTPUT«string»
10:32 p6eval ..pugs, rakudo f2004a: OUTPUT« st»
10:32 GlitchMr This is more hacky :P
11:03 zipf joined #perl6
11:44 kaleem joined #perl6
11:44 GlitchMr perl6: method object($/) { make $<pairlist>.ast ?? hash ( $<pairlist>.ast ) !! {}; }
11:44 p6eval rakudo f2004a: OUTPUT«Useless declaration of a has-scoped method in mainline␤»
11:44 p6eval ..pugs:  ( no output )
11:44 p6eval ..niecza v16-8-gb4b916a: OUTPUT«[31m===[0mSORRY![31m===[0m��Methods must be used in some kind of package at /tmp/loHel_9iuF line 1:�------> [32mmethod object[33m�[31m($/) { make $<pairlist>.ast ?? hash ( $<[0m��Ternary !! seems to be missing its ?? at /tmp/loHel_9iuF line 1:�-----…
11:44 GlitchMr perl6: class ACME::Blah; method object($/) { make $<pairlist>.ast ?? hash ( $<pairlist>.ast ) !! {}; }
11:45 p6eval pugs, rakudo f2004a:  ( no output )
11:45 p6eval ..niecza v16-8-gb4b916a: OUTPUT«[31m===[0mSORRY![31m===[0m��Ternary !! seems to be missing its ?? at /tmp/pXSjtgcTDK line 1:�------> [32mlist>.ast ?? hash ( $<pairlist>.ast ) !![33m�[31m {}; }[0m��Parse failed��»
11:45 GlitchMr ... but... I see that !!...
11:45 colomon std: class acme::Blah; method object($/) { make $<pairlist>.ast ?? hash ( $<pairlist>.ast ) !! {}; }
11:45 p6eval std 3c2fb9c: OUTPUT«[31m===[0mSORRY![31m===[0m�Ternary !! seems to be missing its ?? at /tmp/s9Wfmmm2f_ line 1:�------> [32mlist>.ast ?? hash ( $<pairlist>.ast ) !![33m�[31m {}; }[0m�Parse failed�FAILED 00:01 115m�»
11:47 GlitchMr perl6: #=... what?
11:47 p6eval niecza v16-8-gb4b916a: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Action method comment:sym<#=> not yet implemented at /tmp/KjGAiu6f1c line 1 (EOF):â�¤------> [32m#=... what?[33mâ��[31m<EOL>[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1366 (die…
11:47 p6eval ..pugs, rakudo f2004a:  ( no output )
11:48 Trashlord joined #perl6
11:49 benabik joined #perl6
12:02 zhu_yj joined #perl6
12:03 havenn joined #perl6
12:03 zhu_yj left #perl6
12:07 GlitchMr perl6: IO::Socket::INET.new
12:07 p6eval rakudo f2004a: OUTPUT«Could not find symbol 'IO::Socket::&INET'␤  in block <anon> at /tmp/uFg6Q0JttN:1␤␤»
12:07 p6eval ..niecza v16-8-gb4b916a: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤  at /tmp/iJPTJQEcyf line 1 (mainline @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3838 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3839 (module-CORE @ 65)…
12:07 p6eval ..pugs: OUTPUT«*** No such subroutine: "&IO::Socket::INET"␤    at /tmp/vHfLz5C3lt line 1, column 1 - line 2, column 1␤»
12:09 tadzik GlitchMr: forbidden in SAFE.setting I think
12:09 GlitchMr Whatever, I get exactly this same message on niecza...
12:09 GlitchMr For some reason, I cannot start IO Socket...
12:10 GlitchMr Perhaps it doesn't exist...
12:10 benabik GlitchMr: That use of printf isn't hacky.  It's spec.  printf works in weird and wonderful ways.
12:10 GlitchMr I know :P
12:11 GlitchMr https://github.com/perl6/roast/pull/17
12:11 GlitchMr But I've made more evil stuff :P
12:12 benabik GlitchMr: And, yes, IO::Socket::INET doesn't exist in niecza.  I'd say that error message is a bug though.
12:14 benabik (Or at least it doesn't exist as far as `ack -a Socket` will tell me.)
12:15 moritz and in rakudo, the IO package is replaced by a stub in SAFE.setting
12:45 timotimo std: class acme::Blah { method object($/) { make $<pairlist>.ast ?? hash ( $<pairlist>.ast ) !! {}; } }
12:45 p6eval std 3c2fb9c: OUTPUT«[31m===[0mSORRY![31m===[0m�Ternary !! seems to be missing its ?? at /tmp/bgWxA2mjX1 line 1:�------> [32mlist>.ast ?? hash ( $<pairlist>.ast ) !![33m�[31m {}; } }[0m�Parse failed�FAILED 00:01 115m�»
12:51 moritz that looks like code from JSON::Tiny
12:51 moritz ah, not quite
12:51 GlitchMr42 joined #perl6
12:51 moritz if you worry that $<pairlist> might not be defined, you can write  $<pairlist>.?ast.?hash // {}
12:52 moritz though I don't quite understand the source of the error
12:53 mikemol joined #perl6
12:53 moritz std: make $<pairlist>.ast ?? hash ( $<pairlist>.ast ) !! {}
12:53 p6eval std 3c2fb9c: OUTPUT«[31m===[0mSORRY![31m===[0m�Ternary !! seems to be missing its ?? at /tmp/lx37FLOoo5 line 1:�------> [32mlist>.ast ?? hash ( $<pairlist>.ast ) !![33m�[31m {}[0m�Parse failed�FAILED 00:01 112m�»
12:53 moritz std: $<pairlist>.ast ?? hash ( $<pairlist>.ast ) !! {}
12:53 p6eval std 3c2fb9c: OUTPUT«[31m===[0mSORRY![31m===[0m�Ternary !! seems to be missing its ?? at /tmp/w85ye890TX line 1:�------> [32mlist>.ast ?? hash ( $<pairlist>.ast ) !![33m�[31m {}[0m�Parse failed�FAILED 00:01 112m�»
12:53 moritz std: $<pairlist>.ast ?? $<pairlist>.ast.hash !! {}
12:53 p6eval std 3c2fb9c: OUTPUT«ok 00:01 110m␤»
12:53 moritz ah, precedence problem
12:53 moritz std: $<pairlist>.ast ?? ( hash  $<pairlist>.ast ) !! {}
12:53 p6eval std 3c2fb9c: OUTPUT«ok 00:01 111m␤»
12:54 colomon space between hash and (  ?
12:54 moritz hash is a listop, and ?? !! has tighter precedence than listops
12:54 moritz colomon: removing that is also an option
13:08 derrazo joined #perl6
13:19 icwiener joined #perl6
13:24 sftp joined #perl6
13:26 zipf joined #perl6
13:29 spider-mario joined #perl6
13:34 icwiener joined #perl6
13:41 fgomez joined #perl6
13:42 fgomez joined #perl6
13:47 flussence heh, D seems to have discovered $obj.&func()... :)
13:51 spider-mario what does it look like in D ?
13:51 flussence obj.func()
13:52 flussence here's the article - http://drdobbs.com/blogs/cpp/232700394
13:52 spider-mario thanks
13:53 flussence it looks like it calls a function with that name if there's no matching method. I'm not sure that's a great idea...
13:54 moritz just got to that point in that article, and I have to agree
13:54 moritz it's not safe against addition of methods
13:54 moritz "different things should look different"
14:06 elkng joined #perl6
14:08 alvis``` joined #perl6
14:12 cosimo joined #perl6
14:14 thou joined #perl6
14:17 GlitchMr42 joined #perl6
14:28 zipf joined #perl6
14:37 icwiener joined #perl6
14:41 kaleem joined #perl6
14:42 GlitchMr42 joined #perl6
14:50 pomysl_ joined #perl6
14:55 tokuhiro_ joined #perl6
14:59 GlitchMr joined #perl6
15:12 masak evening, #perl6.
15:14 colomon o/
15:19 moritz \o masak, colomon
15:19 spider-mario afternoon here
15:20 colomon morning here, but who's counting?
15:20 masak japhb++ # http://github.com/japhb/perl6-bench
15:23 icwiener joined #perl6
15:40 pnu joined #perl6
15:43 kaare_ joined #perl6
15:43 havenn joined #perl6
15:44 spider-mario joined #perl6
15:46 Psyche^ joined #perl6
15:56 ponbiki joined #perl6
16:02 masak nom &
16:09 fsergot joined #perl6
16:13 fglock_ joined #perl6
16:14 MayDaniel joined #perl6
16:23 GlitchMr42 joined #perl6
16:23 bbkr joined #perl6
16:25 zipf joined #perl6
16:25 [Coke] guten abend, masak.
16:29 PerlJam .oO( Coke is wishing masak a good ABnormal END? )
16:29 PerlJam ;)
16:30 [Coke] phenny: "abend"?
16:30 phenny [Coke]: "evening" (de to en, translate.google.com)
16:31 geekosaur so if evening's an AbEnd, what's a normal end in German? :p
16:32 PerlJam geekosaur: beer!
16:33 REPLeffect joined #perl6
16:34 birdwind1pbird joined #perl6
16:34 tokuhiro_ joined #perl6
16:35 sjn PerlJam: "aBend" (i.e. a Banana or something similarly bendy :)
16:36 sjn so when the .de's say hello in the evening, they actually say "good banana"
16:36 * sjn is obviously in the rational corner today
16:39 xinming joined #perl6
16:41 bonsaikitten sjn: so what is a morgen? ;)
16:41 moritz c vcb gfv s<77gg yy<dasssss
16:42 moritz a "morgen" is an areal unit, usually used for land
16:42 [Coke] "tag" - you're it.
16:43 moritz http://en.wikipedia.org/wiki/Morgen
16:44 [Coke] S26-documentation/why.t - this shouldn't have bare skips in it.
16:44 [Coke] (nothing in the suite should)
16:45 [Coke] most of the hard skips are from pugs days, but I suspect all the doc ones are from rakudo
16:59 havenn joined #perl6
17:01 fgomez joined #perl6
17:01 [Coke] +# 03/29/2012 - rakudo++ ; niecza (96.12%); pugs (38.93%)
17:02 [Coke] colomon: that's another 0.01%!
17:03 colomon o|
17:03 colomon (that's me shaking my fist)
17:03 colomon doubt I'll be any help this weekend, I'm packed and ready to leave for Ambercon...
17:04 dalek std: 5740094 | larry++ | STD.pm6:
17:04 dalek std: catch listop in ??!!; remove unused .<sub> hack
17:04 dalek std: review: https://github.com/perl6/std/commit/5740094473
17:13 lichtkind joined #perl6
17:15 japhb masak, glad you like the nascent perl6-bench.
17:15 japhb Anyone: Comments? Suggestions?  Changes/features/tests you'd like to see on the short list?
17:16 moritz r: my $b = KeyBag.new({ foo => 2, baz => 1}); say $b.pairs.perl
17:16 p6eval rakudo f2004a: OUTPUT«("foo" => 2, "baz" => 1).list␤»
17:17 moritz r: my $b = KeyBag.new({ foo => 2, baz => 1}); say ~($b.map: { .key xx .value })
17:17 p6eval rakudo f2004a: OUTPUT«Method 'value' not found for invocant of class 'KeyBag'␤  in block <anon> at /tmp/zEVgKDMmJX:1␤␤»
17:17 moritz r: my $b = KeyBag.new({ foo => 2, baz => 1}); say ~($b.pairs.map: { .key xx .value })
17:17 p6eval rakudo f2004a: OUTPUT«foo foo baz␤»
17:19 moritz nom: my %h = a => 1, b => 2; eager %h.map: {say .WHAT }
17:19 p6eval rakudo f2004a: OUTPUT«Pair()␤Pair()␤»
17:31 REPLeffect joined #perl6
17:47 havenn joined #perl6
17:59 lichtkind is there a way to fetch html woth perl 6?
18:07 masak lichtkind: have you tried using IO::Socket::INET?
18:08 lichtkind not yet
18:08 lichtkind i gound hust today that for simple on line scripting thing perl 6 was more convinient than perl 5
18:08 Gothmog_ joined #perl6
18:09 sjohnson joined #perl6
18:09 moritz "gound hust"?
18:09 * moritz can't parse that
18:10 moritz I'm afraid that LWP::Simple is currently broken on nom
18:10 masak moritz: "found just"
18:10 masak shifted one position to the left.
18:10 lichtkind shit i wanted say found out but my hands were one key to right
18:11 lichtkind masak is genious
18:11 masak I get by.
18:11 lichtkind how to install IO::Socket
18:11 sjohnson masak.hi
18:12 masak IO::Socket::INET comes bundled with Rakudo compiler.
18:12 masak sjohnson! \o/
18:12 lichtkind iv not seen it on modules.perl6
18:12 lichtkind great
18:12 sjohnson looks like rakudo is coming along smoothly as I suspected
18:16 lichtkind does modules also get updates with every fetch
18:17 MayDaniel joined #perl6
18:17 lichtkind and my second question where is actually that lib, cuz: Could not find IO::Socket::INET in any of: lib, /home/lichtkind/.perl6/lib, /home/lichtkind/code/perl/six/rakudo/install/lib/parrot/4.1.0-devel/languages/perl6/lib, .
18:17 moritz lichtkind: no need to 'use' it, it's built-in
18:17 lichtkind ah
18:17 lichtkind thank you
18:18 [Coke] moritz: should that error out, though?
18:18 [Coke] or just return true, already loaded?
18:18 [Coke] star: use IO::Socket::INET;
18:18 p6eval star 2012.01: OUTPUT«===SORRY!===␤Could not find IO::Socket::INET in any of: lib, /home/p6eval/.perl6/lib, /home/p6eval/rakudo-star-2012.01/install/lib/parrot/3.11.0/languages/perl6/lib, .␤»
18:18 moritz [Coke]: dunno
18:20 havenn joined #perl6
18:21 cbk1090 moritz, it would be nice to see IO::Socket::INET to help us understand how it works.
18:21 moritz cbk1090: it's in rakudo's sources in src/core/Socket.pm and src/core/Socket/INET.pm
18:21 leprevost joined #perl6
18:22 [Coke] cbk1090: http://perlcabal.org/syn/S32/IO.html#IO%3A%3ASocket%3A%3AINET
18:22 [Coke] spec's a little light.
18:22 cbk1090 cool thanks
18:22 [Coke]  =encoding ALREADYDONE ??
18:23 [Coke] (looks like a htmlification glitch.
18:28 lichtkind what wrong with IO::Socket::INET.new('host'=>'http://www.perlfoundation.org/perl6/index.cgi?perl_6_index_tablet'); ?
18:29 masak lichtkind: you tell us.
18:32 thou joined #perl6
18:33 mj41 joined #perl6
18:33 lichtkind it sayd Too many positional parameters passed;
18:34 lichtkind but i cant believe it even if put in a hash it still tells that
18:35 lichtkind even if tell just the host
18:35 lichtkind it say it got 2 args
18:36 benabik lichtkind: `IO::Socket::INET.new(:host<google.com>, :port(80))` works for me
18:39 sjohnson tadzik: still have that fat face emot?
18:39 sjohnson i have to reset it now that I've migrated to another shell during my long absence
18:39 lichtkind why it doesnt take the other syntac for pairs?
18:39 * benabik wonders if google minds me poking their web servers as network connectivity and library tests.
18:40 flussence .u 1f616
18:40 phenny flussence: Sorry, no results for '1f616'.
18:41 benabik lichtkind: The syntax is host => 'localhost' not 'host' => 'localhost'
18:41 benabik The fat arrow converts the LHS to a string automagically.
18:41 lichtkind oh that changes
18:42 lichtkind p5 handeled that differently
18:42 masak yes.
18:42 benabik Hm.
18:42 benabik Although that appears to be only different in a call?
18:44 masak yes. captures are a bit of a sublanguage of their own.
18:46 PerlJam It's languages all the way down.
18:46 masak perl6: say (:()).WHAT
18:46 lichtkind thanks you a lot but i have 2 new problems
18:46 p6eval pugs: OUTPUT«Scalar::Perl5␤»
18:46 p6eval ..niecza v16-8-gb4b916a: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method fakesignature not yet implemented at /tmp/hLhVCQbpvY line 1:�------> [32msay (:([33m�[31m)).WHAT[0m��Action method sigterm not yet implemented at /tmp/hLhVCQbpvY line 1:�------> [32msay (:()[33m�[31m).WHA…
18:46 p6eval ..rakudo 018b27: OUTPUT«Signature()␤»
18:46 masak perl6: say (\()).WHAT
18:46 p6eval pugs: OUTPUT«Scalar::Perl5␤»
18:46 p6eval ..rakudo 018b27, niecza v16-8-gb4b916a: OUTPUT«Capture()␤»
18:47 lichtkind can i put the timeout up?
18:47 masak lichtkind: you should've listened to Jamie Zawinski :P
18:47 lichtkind i just read about him this week
18:47 lichtkind thats enough :)
18:48 lichtkind what he said?
18:48 lichtkind second is how i get html of the socket
18:48 lichtkind get doesnt seemes to do what i expect
18:48 masak he said "...now you've got two problems."
18:48 s1n joined #perl6
18:48 lichtkind that classic
18:49 lichtkind i expected something fresh like the 9 people
18:49 masak well, you started it :)
18:49 masak 20:46 < lichtkind> thanks you a lot but i have 2 new problems
18:51 lichtkind i know
18:51 lichtkind but u prefer to run that p6 script that i write
18:52 masak lichtkind: maybe the spectests will help you find out how to use IO::Net::INET?
18:53 lichtkind didnt found it
18:56 moritz lichtkind: are you aware of tools like grep and ack?
18:57 masak lichtkind: t/spec/S32-io/IO-Socket-INET.t
18:58 masak let us know if you know of a more intuitive name and place for that file :P
18:59 brrt joined #perl6
19:04 lichtkind ah its in the spec
19:11 GlitchMr rule statement_mod_loop:given {<sym> <modifier_expr> }
19:11 GlitchMr I'm confused...
19:11 GlitchMr Why `given` is loop statement modifier?
19:13 moritz because it's a useful categorization
19:13 PerlJam maybe because it's a topicalizer?
19:13 masak what moritz said.
19:13 GlitchMr Heh, I've checked that "looping", and it only seems to be used to determine if do { } while 1 is obsolete...
19:14 masak if it helps your imagination, consider it a one-iteration loop. (but without next/last/redo semantics)
19:14 lichtkind help! the more i read https://github.com/perl6/roast/blob/master/S32-io/IO-Socket-INET.t#L6-L156 the less i understand
19:14 moritz GlitchMr: I think there's a second application
19:14 GlitchMr r: do { } given 'something'
19:14 p6eval rakudo 018b27: OUTPUT«===SORRY!===␤Unsupported use of do...given;  in Perl 6 please use repeat...given␤at /tmp/2k0KdBDXXh:1␤»
19:14 moritz GlitchMr: Perl 6 allows using of a conditinal and of a loop statement modifier in the same statement
19:15 moritz ie say $_ if $_ %% 2 for ...;
19:15 moritz nom: say $_ if $_ %% 2 for 1..4;
19:15 p6eval rakudo 018b27: OUTPUT«2␤4␤»
19:15 moritz nom: say $_ if $_ %% 2 given 4
19:15 p6eval rakudo 018b27: OUTPUT«4␤»
19:16 GlitchMr | $<wu>=['while'|'until']<.keyspace>
19:16 GlitchMr Perphaps do { } should check for those two words...
19:17 icwiener joined #perl6
19:18 lichtkind i really see there no example in it does anybody know here how to fetch a html page?
19:18 [Coke] b: say 3.7/9.7
19:18 p6eval b 1b7dd1: OUTPUT«0.381443298969072␤»
19:18 moritz lichtkind: it's trivial with LWP::Simple, which currently doesn't work.
19:18 lichtkind allright so i wait
19:19 lichtkind i just wanted script that checks the tablets for sanity and stats
19:19 lichtkind and i wanted know if example extraction actually works
19:19 [Coke] moritz: what is LWP::Simple blocking on?
19:19 moritz [Coke]: URI
19:20 moritz which, last I checked, had some weird compilation error
19:20 * [Coke] will not continue to play this game. ;)
19:20 [Coke] ah, good.
19:21 * [Coke] kicks off a rebuild of his "hack on rakudo" checkout in hopes of getting back to it ever.
19:21 moritz eeks, it dies inside the ModuleLoader
19:22 moritz hm
19:25 moritz nom: our %escapes; for 0 .. 255 -> $c { %escapes{ chr($c) } = sprintf '%%%02X', $c; }
19:25 p6eval rakudo 018b27: OUTPUT«Method 'at_key' not found for invocant of class 'Any'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1185␤  in block <anon> at /tmp/IjDSbedXUx:1␤␤»
19:25 moritz that's the error :/
19:25 moritz r: printf '%%%02X', 0'
19:25 p6eval rakudo 018b27: OUTPUT«===SORRY!===␤Confused␤at /tmp/Bj1Y25C50T:1␤»
19:25 moritz r: printf '%%%02X', 0
19:25 p6eval rakudo 018b27: OUTPUT«%00»
19:26 moritz nom: our %escapes := {}; for 0 .. 255 -> $c { %escapes{ chr($c) } = sprintf '%%%02X', $c; }
19:26 p6eval rakudo 018b27: OUTPUT«===SORRY!===␤Cannot use bind operator with this left-hand side␤at /tmp/ps7guoDxOq:1␤»
19:26 birdwindupbird joined #perl6
19:26 moritz r: our %a; %a<b> = 'c';
19:26 p6eval rakudo 018b27: OUTPUT«Method 'at_key' not found for invocant of class 'Any'␤  in method postcircumfix:<{ }> at src/gen/CORE.setting:1185␤  in block <anon> at /tmp/mm0N2fXvBI:1␤␤»
19:26 moritz masak: do you know if that's known?
19:26 moritz r: our %a = (); %a<b> = 'c';
19:26 p6eval rakudo 018b27: OUTPUT«Method 'STORE' not found for invocant of class 'Any'␤  in block <anon> at /tmp/4dgXPFVBT7:1␤␤»
19:27 moritz n: our %a = (); %a<b> = 'c';
19:27 p6eval niecza v16-8-gb4b916a:  ( no output )
19:27 [Coke] file a bug and see if it attracts pmichaud. ;)
19:27 fsergot joined #perl6
19:28 fsergot hi #perl6 o/
19:29 masak fsergocie! \o/
19:29 masak moritz: I think so, yes.
19:30 moritz URI.pm now compiles again (locally)
19:33 masak moritz++
19:35 masak moritz: http://rt.perl.org/rt3/Ticket/Display.html?id=102876 seems to capture the above buggy semantics.
19:36 moritz masak++
19:36 moritz t/november-urlencoded.t .. ok
19:38 tyatpi joined #perl6
19:39 moritz one passing test file
19:40 thou joined #perl6
19:45 birdwindupbird joined #perl6
19:47 havenn joined #perl6
19:51 lichtkind good night
19:54 mcero joined #perl6
19:54 moritz t/escape.t now passes
19:58 tyatpi joined #perl6
19:59 moritz t/01.t now passes
20:00 japhb moritz++ # Knockin' 'em down, one test file at a time ...
20:03 moritz ... except that I don't know how to tackle that last one
20:03 moritz oh hell, I'll just TODO it for now
20:05 moritz pull request sent.
20:08 havenn joined #perl6
20:12 moritz r: constant %escapes = (^255).map({
20:12 p6eval rakudo 018b27: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2␤»
20:13 moritz r: constant %escapes = (^255).map({; .chr => sprintf '%%%02X', $_ }).hash; say %escapes<e>
20:13 p6eval rakudo 018b27: OUTPUT«===SORRY!===␤invoke() not implemented in class 'Undef'␤»
20:13 [Coke] moritz: were you avoiding regressions in rakudo?
20:13 moritz r: constant %escapes = (^256).hash; say %escapes<e>
20:13 p6eval rakudo 018b27: OUTPUT«Any()␤»
20:13 moritz [Coke]: the one with 'our %hash'
20:14 Chillance joined #perl6
20:14 moritz [Coke]: apart from that it was mostly exceptions and object initialization
20:14 moritz [Coke]: and I removed some workarounds around old rakudo bugs
20:15 moritz r: constant %escapes = (^255).map({; chr($_) => sprintf '%%%02X', $_ }).hash; say %escapes<e>
20:15 p6eval rakudo 018b27: OUTPUT«===SORRY!===␤invoke() not implemented in class 'Undef'␤»
20:15 moritz r: constant %escapes = (^255).map({; $_ => $_ }).hash; say %escapes<e>
20:15 p6eval rakudo 018b27: OUTPUT«===SORRY!===␤invoke() not implemented in class 'Undef'␤»
20:15 moritz r: (^255).map({; $_ => $_ }).hash;
20:15 p6eval rakudo 018b27:  ( no output )
20:15 moritz r: constant $a = (^255).map({; $_ => $_ }).hash;
20:15 p6eval rakudo 018b27: OUTPUT«===SORRY!===␤invoke() not implemented in class 'Undef'␤»
20:15 moritz r: constant $a = (^255).hash;
20:15 p6eval rakudo 018b27: OUTPUT«===SORRY!===␤Odd number of elements found where hash expected␤»
20:16 moritz r: constant $a = (^256).hash;
20:16 p6eval rakudo 018b27:  ( no output )
20:16 moritz masak: wanna submit rakudobug?
20:17 * masak submits rakuodbug
20:34 tyatpi joined #perl6
20:35 tyatpi joined #perl6
20:36 spider-mario r: (^255).map({$_ => $_ }).hash;
20:36 p6eval rakudo 018b27: OUTPUT«use of uninitialized variable $!key of type Any in string context␤Method 'count' not found for invocant of class 'Hash'␤  in method reify at src/gen/CORE.setting:4628␤  in method reify at src/gen/CORE.setting:4553␤  in method reify at src/gen/CORE.setting:4553␤  in…
20:36 spider-mario r: constant $x = [*] 2 .. 6; say $x;
20:36 p6eval rakudo 018b27: OUTPUT«720␤»
20:38 spider-mario oh, rakudo from git now handles that, indeed
20:38 spider-mario in rakudo star 2012.02, I got :
20:38 spider-mario Cannot handle constant $x with non-literal value yet at line 1, near ";\n"
20:38 spider-mario nice :)
20:38 fgomez joined #perl6
20:38 moritz well, we do improve the compiler from time to time :-)
20:38 moritz jnthn++
20:39 PacoAir_ joined #perl6
20:39 xinming_ joined #perl6
20:50 TimToady spider-mario: {$_ => $_ } is not supposed to be considered a hash, according to S04:1569, so that's a bug
20:51 spider-mario joined #perl6
20:52 TimToady spider-mario: did you see what I just said?
20:52 spider-mario yes
20:53 spider-mario but isn’t a list of pairs (to-hash)able?
20:53 TimToady not if parameterized, and according to S04:1569, $_ counts as a parameter
20:53 spider-mario the block is parameterized
20:53 spider-mario but map applies it
20:54 spider-mario so what results should be a list of (1 ⇒ 1), should it not?
20:54 TimToady and returns a pair each time
20:54 spider-mario r: (^255).map({$_ => $_ }).perl
20:54 p6eval rakudo 018b27: OUTPUT«use of uninitialized variable $!key of type Any in string context␤Method 'count' not found for invocant of class 'Hash'␤  in method reify at src/gen/CORE.setting:4628␤  in method reify at src/gen/CORE.setting:4553␤  in method gimme at src/gen/CORE.setting:4941␤  in…
20:54 moritz but rakudo constructs a Hash right away, so .map doesn't get a block in teh first place
20:54 TimToady the bug is that it's already been turned into a hash, so map can't call it
20:54 spider-mario oh
20:55 TimToady and $_ isn't set before the hash is made, hence the uninit error
20:55 TimToady r: (^255).map( -> $_ { $_ => $_ } ).perl
20:55 p6eval rakudo 018b27:  ( no output )
20:55 TimToady r: (^255).map( -> $_ { $_ => $_ } ).perl.say
20:55 p6eval rakudo 018b27: OUTPUT«(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23, 24 => 24, 25 => 25, 26 => 26, 27 => 27, 28 =…
20:55 TimToady it's supposed to behave like that
20:55 spider-mario r: (map {$_ => $_}, (^256)).perl.say
20:55 p6eval rakudo 018b27: OUTPUT«use of uninitialized variable $!key of type Any in string context␤Cannot call 'map'; none of these signatures match:␤:(Callable &code, *@values)␤␤  in block <anon> at /tmp/mEsgiEgb_2:1␤␤»
20:56 moritz same problem
20:56 spider-mario r: (map {$^x => $^x}, (^256)).perl.say
20:56 p6eval rakudo 018b27: OUTPUT«(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23, 24 => 24, 25 => 25, 26 => 26, 27 => 27, 28 =…
20:56 TimToady r: (^255).map( { $^a => $^a } ).perl.say
20:56 p6eval rakudo 018b27: OUTPUT«(0 => 0, 1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10, 11 => 11, 12 => 12, 13 => 13, 14 => 14, 15 => 15, 16 => 16, 17 => 17, 18 => 18, 19 => 19, 20 => 20, 21 => 21, 22 => 22, 23 => 23, 24 => 24, 25 => 25, 26 => 26, 27 => 27, 28 =…
20:56 benabik r: $_=1; say {$_ => $_}.WHAT
20:56 p6eval rakudo 018b27: OUTPUT«Hash()␤»
20:56 TimToady another workaround
20:56 timotimo p6: sub infix:<W T F>($a, $b, $c, $d) { say "a: $a, b: $b, c: $c, d: $d"; }; 99 W 88 T 77 F 66;
20:56 spider-mario we thought about it at the same time
20:56 p6eval niecza v16-8-gb4b916a: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row at /tmp/Ihb1syvoVi line 1:�------> [32ma: $a, b: $b, c: $c, d: $d"; }; 99 W 88 [33m�[31mT 77 F 66;[0m��Parse failed��»
20:56 benabik r: $_=1; say (-> $_ {$_ => $_}).WHAT
20:56 p6eval ..pugs: OUTPUT«*** ␤    Unexpected "W"␤    expecting operator␤    at /tmp/_KVpZqggKG line 1, column 77␤»
20:56 p6eval ..rakudo 018b27: OUTPUT«===SORRY!===␤Confused␤at /tmp/158iYnOdSL:1␤»
20:56 timotimo is this supposed to work?
20:56 p6eval rakudo 018b27: OUTPUT«Block()␤»
20:56 TimToady no
20:57 timotimo do operators have to have non-alphanumeric characters?
20:57 benabik I don't think non-binary infix is allowed.
20:57 timotimo ternary operator?
20:57 TimToady not even ??!! works that way
20:57 benabik Is not defined like that.
20:57 timotimo oke
20:58 benabik Ternary is closest to an infix macro with a custom parse rule (as I understand it)
20:59 TimToady line 3856 in STD.pm6
21:01 timotimo oh, okay
21:02 sjohnson TimToady: hi
21:15 fgomez joined #perl6
21:15 fgomez joined #perl6
21:16 tadzik sjohnson: should have it somewhere
21:16 tadzik ( `ー´)
21:16 tadzik ( ° ー°)
21:16 tadzik (´ー` )
21:16 tadzik there you go
21:18 masak aww
21:19 tadzik :)
21:19 sjohnson nice
21:19 sjohnson sweet
21:19 * sjohnson missed those emots
21:19 sjohnson (i lost my last irc shell)
21:21 timotimo can someone rebuild a current version of the perl6 book? i wasn't able to build it myself the last time i tried and a few changes and enough time have already accumulated to warrant a newer edition i think
21:25 zipf joined #perl6
21:26 masak very few people can actually build the book :/
21:26 tadzik :)
21:26 tadzik I remember the hassle when I compiled the kindle version
21:30 masak 'night, #perl6
21:30 tadzik g'night
21:32 fsergot good night! :)
21:55 derrazo joined #perl6
22:03 bacek_ joined #perl6
22:21 ponbiki joined #perl6
22:27 vlixes joined #perl6
22:36 whiteknight joined #perl6
22:38 fsergot nn #perl6 ! o/
22:40 cardcha joined #perl6
22:43 cardcha Ugh
22:43 cardcha windows you suck
22:43 cardcha to bad your pretty much required for gaming
22:44 cardcha ):
22:45 spider-mario I play Lugaru
22:45 spider-mario :D
22:45 spider-mario and on consoles (mainly GameCube and Dreamcast).
22:45 spider-mario (perhaps a bit of emulation on PSP too)
22:45 timotimo are you following the development of overgrowth?
22:45 spider-mario (emulating GB, GBA and SNES)
22:46 spider-mario not often, but I am interested, indeed
22:46 cardcha noes
22:46 cardcha what is overcast
22:46 cardcha It's such a pain to program on windows
22:46 timotimo i recently upgraded my computer and installed a windows for the first time in at least 5 years to play tribes: ascend. turns out all i play is natural selection 2 ...
22:48 cardcha Whenever someone asks me what my computer specs are I say 82.5 billion floating point operations per second because it sounds important
22:48 fgomez joined #perl6
22:49 havenn joined #perl6
22:51 benabik left #perl6
22:55 cardcha I just GeoIPED youi
23:02 timotimo is s04 the right place to look for how exceptions work in perl6? the book says almost nothing about it and s04:exceptions is really, really short
23:06 icwiener_ joined #perl6
23:14 libertyprime joined #perl6
23:22 timotimo there's the 2011 advent post on exceptions, but it doesn't cover how to rethrow an error that was matched by a when block and it doesn't explain the "magic" behind the decision to mark an exception as handled when it has been matched
23:28 timotimo so, if there's an implicit loop inside CATCH; that would set $_ to each exception, but $! will sometimes not-equal $_, because $! is only the "latest" exception, not the one currently being handled?
23:33 colomon joined #perl6
23:37 tokuhiro_ joined #perl6
23:38 timotimo aaah - If you test a Failure for .defined or .Bool, the Failure marks itself as handled - this will cause the when statements in the CATCH block to mark the exception as handled?
23:38 timotimo or is a Failure object something different from an exception that was thrown with di?
23:39 havenn joined #perl6
23:40 timotimo maybe i don't know enough about perl itself, but the part on exceptions in s04 is a bit too short for my tastes
23:47 timotimo can this be correct?
23:47 timotimo is +($!.pending.grep( ! *.handled )), 4,
23:47 timotimo '$!.pending has three unhandled exceptions';
23:47 timotimo shouldn't it say "four" in the string or 3 in the line above?
23:49 timotimo https://github.com/perl6/roast/blob/master/S04-exceptions/pending.t#L30 is the line btw
23:55 timotimo oh, of course there's a whole segment on "exception handlers" directly above it that i just didn't see

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

Perl 6 | Reference Documentation | Rakudo