Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-08-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:00 abercrombie joined #perl6
00:02 Trashlord joined #perl6
00:21 cexsum joined #perl6
00:32 benabik std: /<.*>/
00:32 p6eval std e3c970e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse metachar at /tmp/rRNjsvYMDv line 1:â�¤------> [32m/[33mâ��[31m<.*>/[0mâ�¤Couldn't find final '>'; gave up at /tmp/rRNjsvYMDv line 1:â�¤------> [32m/<.[33mâ��[31m*>/[0mâ�¤    expecting any of:â�¤ assertionâ�¤      dotty method or post…
00:38 soh_cah_toa perl6: say 'foobar' if "foo" ~~ m:P5/[a-z]/
00:38 p6eval niecza v8-62-g9e4b0e4: OUTPUT«Unhandled exception: Autoloading NYI␤  at /home/p6eval/niecza/boot/lib/CORE.setting line 685 (CORE die @ 2) ␤  at /home/p6eval/niecza/src/STD.pm6 line 4606 (STD Regex.tweak @ 6) ␤  at /home/p6eval/niecza/src/STD.pm6 line 489 (STD C191_ANON @ 2) ␤  at /home/…
00:38 p6eval ..rakudo a55346: OUTPUT«===SORRY!===␤Confused at line 22, near "if \"foo\" ~"␤»
00:38 p6eval ..pugs: OUTPUT«foobar␤»
00:39 soh_cah_toa had a feeling :P5 was nyi
00:42 cexsum joined #perl6
01:09 woosley joined #perl6
02:32 soh_cah_toa joined #perl6
02:52 lichtkind joined #perl6
02:52 lichtkind nom does not @.categorize
02:56 mkramer joined #perl6
03:06 abercrombie Hi, in P5 we can do radix conversion using functions like oct(). What's the according one in P6? I know adverb :8() works for single target. How can I convert a batch of numbers?
03:06 phenny abercrombie: 28 Aug 19:08Z <moritz> tell abercrombie about http://irclog.perlgeek.de/​perl6/2011-08-28#i_4337460 (calling functions by name)
03:08 TimToady well, there's always map
03:09 abercrombie yeah, so there is no conversion function taking an array as argument?
03:09 TimToady not yet
03:10 abercrombie Oh, Thanks.
03:10 sorear why should there be?
03:11 TimToady it might happen by accident :)
03:11 TimToady like it did in the other direction
03:12 TimToady rakudo: say <1 3 5 9>.fmt('%b')
03:12 p6eval rakudo a55346: OUTPUT«1 11 101 1001␤»
03:14 imbafrog joined #perl6
03:16 abercrombie How to use adverb with map please?
03:18 abercrombie oh, i see. my bad
03:18 [Coke] joined #perl6
03:19 sorear I don't think map takes adverbs
03:20 abercrombie I mean @a.map({:8($_)})
03:24 sorear ah.
03:24 sorear FWIW, that's not considered an adverb
03:24 sorear Adverbs are when a colon-pair is used to modify a call, such as %hash{$key} :exists
03:25 abercrombie Isnt :8($var) an adverb?
03:29 sorear abercrombie: no
03:29 sorear :8($var) is a colonpair
03:29 sorear a colonpair only becomes an adverb when it is used in a syntactic infix position
03:30 abercrombie Ah, then I just misunderstood the SYN. It calls :8() "adverbial forms" and I treated it as "adverb". Thanks for correcting me.
03:31 sorear hmm, some oddity
03:35 frhodes joined #perl6
03:37 abercrombie (TimToady,sorear,moritz)>>++ for helping. Good night #perl6.
03:37 sorear bye
03:52 [Coke] masak: (testing) how do you test your web apps?
04:07 HarryS joined #perl6
04:13 DarthGandalf joined #perl6
04:18 kaare_ joined #perl6
04:20 dalek niecza: 4cbf060 | sorear++ | lib/ (2 files):
04:20 dalek niecza: Reimplement &warn using resumable control exceptions; allows for CONTROL blocks to catch warnings, and adds backtrace capability
04:20 dalek niecza: review: https://github.com/sorear/niecza/commit/4cbf060f9e
04:21 sorear rakudo: ~Any;
04:21 p6eval rakudo a55346:  ( no output )
04:21 sorear rakudo: Any.Str
04:21 p6eval rakudo a55346:  ( no output )
04:21 sorear rakudo: +Any
04:21 p6eval rakudo a55346: OUTPUT«Use of uninitialized value in numeric context  in 'Any::Numeric' at line 1498:src/gen/core.pm␤»
04:22 sorear nom: ~Any
04:22 p6eval nom 184833: OUTPUT«Use of uninitialized value in string context␤»
04:23 sorear evalbot rebuild niecza
04:23 p6eval OK (started asynchronously)
04:25 sorear niecza: ~Any
04:25 p6eval niecza v8-63-g4cbf060: OUTPUT«Use of uninitialized value in string context␤  at /home/p6eval/niecza/lib/CORE.setting line 588 (CORE warn @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 21 (CORE Mu.Str @ 12) ␤  at  line 0 (ExitRunloop @ 0) ␤  at /tmp/V7CPMCOatu line 0 (MAIN mainline…
04:27 birdwindupbird joined #perl6
04:33 jevin joined #perl6
05:09 jevin joined #perl6
05:31 [particle]1 joined #perl6
05:37 odoacre joined #perl6
05:39 wamba joined #perl6
05:48 wtw joined #perl6
05:53 araujo joined #perl6
05:57 dalek niecza: a39a953 | sorear++ | src/ (5 files):
05:57 dalek niecza: Suppress all undef warnings triggered by the compiler reboot procedure
05:57 dalek niecza: review: https://github.com/sorear/niecza/commit/a39a9530ea
06:01 HarryS joined #perl6
06:07 ZaphrodZenovka joined #perl6
06:14 koban joined #perl6
06:14 koban left #perl6
06:17 sayu joined #perl6
06:28 Vlavv joined #perl6
06:37 frhodes joined #perl6
06:54 baest joined #perl6
06:55 mj41 joined #perl6
06:58 mberends joined #perl6
07:06 mberends phenny, tell lichtkind the reason nom does not have categorize() is probably that no tests exist for it at all to remind the developers (I plan to fix that today)
07:06 phenny mberends: I'll pass that on when lichtkind is around.
07:11 sorear mm, 4 failing test files
07:11 sorear will fix those tomorrow and ship
07:11 sorear also need to write an announce
07:11 * sorear out.
07:12 wamba joined #perl6
07:17 mishin joined #perl6
07:51 moritz good morning
07:52 moritz \o/ new HPMoR chapter!
08:02 im2ee joined #perl6
08:03 domidumont joined #perl6
08:13 daxim joined #perl6
08:23 zamolxes joined #perl6
08:23 cexsum joined #perl6
08:34 agentzh joined #perl6
08:49 mls morning perl6!
08:49 wamba joined #perl6
08:52 moritz good morning mls
08:53 SHODAN joined #perl6
08:55 bbkr_ good morning()
09:10 orafu joined #perl6
09:11 cexsum joined #perl6
09:14 moritz phenny: tell [Coke] that I've blogged a new grant progress report at http://perlgeek.de/blog-en/per​l-6/grant-report-errors-3.html
09:14 phenny moritz: I'll pass that on when [Coke] is around.
09:20 frhodes joined #perl6
09:20 daxim moritz, $blog_entry =~ s/Bactrace/Backtrace/
09:24 moritz daxim: thanks, fixing...
09:24 moritz fixed.
09:32 daxim can I see some examples for error messages in action?
09:36 Searle3 joined #perl6
09:36 Searle3 left #perl6
09:36 moritz daxim: sure, just use nom to hack some Perl 6 scripts
09:37 * moritz prepares an example
09:39 moritz daxim: http://nopaste.snit.ch/75672
09:40 moritz I have no idea why it reports something for line 1
09:41 moritz and it doesn't yet know about the mainline
09:41 moritz so not perfect yet
09:47 masak joined #perl6
09:48 masak [Coke]: "how do you test your webapps?" is almost as general a question as "how do you test your programs?". a webapp could be anything. :)
09:49 masak but my general principle is always to seek out and isolate, as much as possible, the side-effect-free "business logic". this often turns out to be the reason for building the webapp in the first place, and the thing where tests have the highest ROI.
09:51 masak I was surprised today to discover that &exit in Perl 5 isn't a listop, but acts more like a prefix op, like &defined.
09:51 masak perl6: exit 0 || (say "OH HAI")
09:52 p6eval pugs:  ( no output )
09:52 p6eval ..rakudo a55346, niecza v8-64-ga39a953: OUTPUT«OH HAI␤»
09:52 masak rakudo++ niecza++
09:52 frettled_ masak: Why would exit() operate on lists?
09:54 masak no need, of course.
09:54 masak but I didn't expect it to be a prefix.
09:55 masak just like, say, prefix:<->
09:56 frettled_ But it isn't really an operator, it's a function, so, uhm?
09:56 frettled_ (IDGI)
10:00 masak frettled_: perl -e 'exit 0 || 7'; echo $?
10:00 masak frettled_: what's the exit code?
10:00 cognominal joined #perl6
10:01 moritz frettled_: nearly all built-ins in Perl 5 are operators
10:01 moritz for example open()
10:02 masak I think using Perl 6 has given me the expectation that things should be listops most of the time.
10:05 whiteknight joined #perl6
10:06 masak whiteknight: greetings.
10:06 whiteknight hello masak
10:08 masak whiteknight: how's things going with 6model?
10:10 whiteknight masak: it's going reasonably well. I need to take another look at it today
10:13 masak \o/
10:14 uasi joined #perl6
10:21 mberends what's the p6 equivalent of isupper() ?
10:26 mberends rakudo: my $a = "A"; say ?($a ~~ /<[A..Z]>/) # ugly, not Unicode friendly and probably inefficient
10:26 p6eval rakudo a55346: OUTPUT«Bool::True␤»
10:27 dukeleto joined #perl6
10:28 snarkyboojum could do $a ~~ $a.uc?
10:28 phenny snarkyboojum: 25 Aug 18:18Z <moritz> tell snarkyboojum about the nom branch in https://github.com/moritz/Perl6-MIME-Base64 (but it breaks it on master :/ -- I don't think there's a way to fix it for nom without breaking it on rakudo/master)
10:29 masak yes, $a ~~ .uc would do it, I think.
10:29 snarkyboojum ah.. ~~ .uc lovely
10:30 mberends snarkyboojum++
10:32 im2ee joined #perl6
10:39 koban` joined #perl6
10:39 koban` left #perl6
10:39 mls argh! the mem leak is gone if I put a "sweep 1" op in the code!
10:41 mls (or parrot is just so slow afterwards that I don't see it anymore...)
10:41 mberends mls: what would that imply about parrot's GC routines?
10:42 mls dunno. must investigate further...
10:50 satyavvd joined #perl6
10:53 satyavvd joined #perl6
10:57 satyavvd joined #perl6
11:03 frettled_ masak: Well, according to perldoc -f exit, exit expects an expression as its argument.  As with other listing EXPR as its argument, I expect exit to follow expression precedence rules.  So while print() accepts LIST as its argument, exit accepts EXPR.  (There may be precedence goblins that I don't se here, though.)
11:06 frettled_ moritz: What you mean is that exit(), open() etc. are implemented as operators, although they are not "specified" as such in the Perl documentation?
11:06 frettled_ Perl 5, that is
11:08 frettled_ masak: Regarding your example, though, I'd consider it bad style, and a high risk of gremlins, since  0 || b can give you 0, "true" or b, depending on context.  :)  Is it more consistent with Perl 6?
11:08 dakkar joined #perl6
11:09 mberends because exit is flow control I would want it to behave like return, only stronger
11:10 cosimo joined #perl6
11:13 MayDaniel joined #perl6
11:18 Reaganomicon joined #perl6
11:24 Tedd1 joined #perl6
11:25 masak frettled_: you didn't answer my question and I don't understand your objection.
11:25 frettled_ masak: which objection?
11:26 masak that it's bad style.
11:26 masak and might give different results in different contexts.
11:26 frettled_ masak: I'd expect gremlins when you use a notation like that, and I'd probably avoid typing it out like that in the first place.
11:26 masak I see that it can, I just think the context is clear here.
11:26 masak but that's not at all pertinent to what I wanted to show with my example.
11:32 frettled_ Okay
11:33 masak my point is that it parses as (exit 0) || 7, not exit(0 || 7)
11:34 frettled masak: to answer your question with another question: how do you expect: open(my $F, '|filename') || 7; to work in Perl 5?
11:34 frettled With or without parentheses :)
11:34 frettled Synopsis: open FILEHANDLE,EXPR
11:35 masak I generally expect things to be listops.
11:36 frettled Surprise: it behaves exactly as exit().
11:36 frettled And AFAICR, it has to do with the EXPR thing
11:36 masak the only exception I can think of is that I liked that defined is actually an operator.
11:37 frettled So yes, Perl 5 holds some surprises, because different builtins behave differently, and you can't program «intuitively».
11:51 mberends so I write this first test for categorize(), and only then discover that it's not even implemented! D'oh!
11:52 masak no, it's fairly newly spec'd.
11:52 JimmyZ_ joined #perl6
11:52 mberends phenny, tell lichtkind I'll get you for this! (categorize)
11:52 phenny mberends: I'll pass that on when lichtkind is around.
11:53 JimmyZ_ is there a destructor method in perl 6?
11:54 masak JimmyZ_: a DESTROY submethod, yes.
12:04 icwiener joined #perl6
12:17 [Coke] joined #perl6
12:20 djanatyn *yawn*
12:20 djanatyn I woke up early today, specifically to have some time for playing with perl6. :)
12:22 cexsum joined #perl6
12:23 masak yay
12:25 JimmyZ_ joined #perl6
12:27 djanatyn ...hmm. Think I just overwrote my .emacs file.
12:38 lateau_ joined #perl6
12:39 [Coke] I am reminded that I need to put all that into a git repo.
12:39 phenny [Coke]: 09:14Z <moritz> tell [Coke] that I've blogged a new grant progress report at http://perlgeek.de/blog-en/per​l-6/grant-report-errors-3.html
12:40 im2ee joined #perl6
12:46 [Coke] what, am I everybody's grant cop?
12:46 [Coke] that reminds me.
12:46 [Coke] phenny, ask pmichaud if that grant thing is still ongoing and if I should poke him about it.
12:46 phenny [Coke]: I'll pass that on when pmichaud is around.
12:52 [Coke] joined #perl6
12:55 bluescreen10 joined #perl6
13:19 drbean joined #perl6
13:24 hatseflats joined #perl6
13:28 mls hah! found the while(1) {} mem leak
13:28 masak \o/ mls++
13:29 mls I don't think it's responsible for the slowness, though
13:29 moritz mls: 1.Bool leaks
13:30 moritz mls: since the patch that added :D to the invocant
13:30 mls all multis leak
13:30 lateau_ joined #perl6
13:30 moritz extra points for a patch :-)
13:30 mls since jnthn changed the way protos get called
13:31 wamba joined #perl6
13:31 mls patch: https://gist.github.com/1178393
13:32 mls BUT: parrot currently doesn't export Parrot_pcc_free_registers
13:32 mls the invoke() call clobbers the current registers, so they need to be freed first
13:33 mls that was really hard to track down...
13:35 moritz I can imagine
13:36 * moritz tests
13:36 moritz iirc some windows compilers or linkers are stricter about non-exported symbols
13:36 moritz so that might get us into trouble
13:37 [Coke] I can try a build on windows if you need.
13:37 mls you need to add an "EXPORT" to parrot
13:37 moritz already fails on linux
13:37 mls yes.
13:37 * [Coke] is happy moritz has commit bits there. ;)
13:40 mls actually rakudo is doing some evil parrot hacks in the perl6_enter_multi_dispatch_from_onlystar_block op, maybe we should ask the parrot guys to add an "official" way for us
13:40 mls we basically want to do a tailcall without changing the already set arguments
13:41 mls i.e. we want to reuse the callcontext
13:49 mtk joined #perl6
13:49 JimmyZ joined #perl6
13:59 PacoLinux joined #perl6
14:07 woosley joined #perl6
14:10 M_o_C joined #perl6
14:13 uasi joined #perl6
14:21 uasi_ joined #perl6
14:30 woosley joined #perl6
14:30 thou joined #perl6
14:41 jevin joined #perl6
14:47 Holy_Cow joined #perl6
14:49 tokuhirom joined #perl6
14:56 jevin joined #perl6
14:59 mtk joined #perl6
15:03 mtk joined #perl6
15:11 mkramer left #perl6
15:11 aloha joined #perl6
15:14 pernatiy joined #perl6
15:16 im2ee joined #perl6
15:33 mkramer joined #perl6
15:34 mkramer left #perl6
15:35 mtk joined #perl6
15:39 Holy_Cow left #perl6
15:44 wamba joined #perl6
15:46 TimToady today seems very...mondayish...
15:46 [Coke] TimToady: funny thing about that.
15:47 [Coke] TimToady: how's things? Looking forward to the Hobbit movie?
15:47 TimToady it's not really on my radar yet--still recovering from my spring and summer
15:47 JimmyZ will be tuesday after 13 mins
15:48 TimToady JimmyZ: I thought about you specially when I said it :)
15:48 [Coke] I have no idea when it's even coming out, but hopefully I will have finished reading the book to my youngest before then. ;)
15:48 JimmyZ yeah, I'm from the near futher
15:49 TimToady though I guess it's already tomorrow in .jp
15:51 PerlJam [Coke]: I hope Peter Jackson gets the Hobbit righter than he got the ending of The Return of the King
15:55 TimToady "a novel is a prose narrative of some length that has something wrong with it."  --Randall Jarrell
15:56 jedai joined #perl6
15:58 whiteknight joined #perl6
16:01 im2ee joined #perl6
16:07 woosley left #perl6
16:13 TimToady btw, niecza++ runs http://rosettacode.org/wiki/Resistor_mesh 96 times faster than rakudo; couldn't get it to work under nom (but didn't try very hard)
16:15 TimToady C, of course, runs it much faster than niecza  :)
16:15 JimmyZ parrot--
16:24 donri joined #perl6
16:29 whiteknight joined #perl6
16:38 flussence I'm about ¼ finished with these graphs now - https://github.com/flussence/specgra​phs/raw/bd1bed15ac50df98ec62aa6ac9f2​06fd777eeda4/output/rakudo-tests.png
16:39 flussence (would've been slightly further along, but some tests were getting stuck in infinite loops so I had to rig something up to babysit the process)
16:39 daxim svg plox
16:40 flussence k
16:40 plobsing oooh shiny
16:40 sjn joined #perl6
16:41 flussence here you go, I don't think github serves the correct mimetype though... https://github.com/flussence/specgraph​s/blob/master/output/rakudo-tests.svg
16:56 mls vi
16:56 mls (oops, wrong window)
16:56 sjohnson vi == good
17:00 mls about the setting compilation being slow: it seems to use 20% of the time for find_method
17:00 plobsing vii == better ;)
17:00 mls (i.e. the method_cache is often not set)
17:01 avi_ joined #perl6
17:01 mls jnthn, where art thou? ;)
17:02 tadzik oh, the backlogging...
17:02 phenny tadzik: 26 Aug 14:01Z <moritz> tell tadzik that https://github.com/perl6/modul​es.perl6.org/commit/ed348b4f9b makes IO::Select show up on modules.perl6.org again.
17:02 tadzik hello #perl6
17:02 flussence yay it's tadzik o/
17:03 tadzik moritz: good catch, moritz++
17:04 * [Coke] grumbles about grumbling about parrot's speed.
17:05 moritz tadzik:  btw I think your last Pod patch broke a test
17:05 tadzik oh?
17:06 moritz S02-whitespace_and_comments/begin_end_pod.t iirc
17:06 moritz no wait, S02-whitespace_and_comments/end-pod.t
17:07 tadzik what did I introduce last time, hmm
17:07 tadzik specialcasing of =config I believe
17:07 tadzik I'll look into that, let me just sort out dozen of emails and dozens of RSSes ;)
17:08 moritz don't hurry :-)
17:08 moritz hope you had a nice weekend
17:08 masak joined #perl6
17:08 ZaphrodZenovka left #perl6
17:08 masak g'devening.
17:08 tadzik oh, masak-san!
17:09 masak tadzik! \o/
17:09 masak I've *missed* you! how long've you been away? three days.
17:09 tadzik ;)
17:09 tadzik don't worry, I'm back for some timez
17:09 masak feels like four days, at least.
17:09 tadzik my physics exam is starting to look angry at me from the calenda
17:09 tadzik r
17:10 masak oh, you studious you.
17:10 mls afk...
17:10 avi_ left #perl6
17:12 tadzik oh, new hpotamor
17:13 masak I got halfway through it on the bus home.
17:13 sftp joined #perl6
17:14 tadzik I just read the previous one on the metro back home
17:20 tadzik Please contact your mentor to discuss the results of
17:20 tadzik your evaluation and to plan your goals and development plan for the rest of
17:20 tadzik the program
17:20 tadzik intredasting
17:20 masak hi :)
17:22 tadzik (:
17:24 sftp joined #perl6
17:28 dalek panda: 88c01da | duff++ | bin/panda:
17:28 dalek panda: Add ability to search module names/decriptions using regex
17:28 dalek panda: review: https://github.com/tadzik/panda/commit/88c01da546
17:28 dalek panda: c57f79b | duff++ | bin/panda:
17:28 dalek panda: Add simple word-wrap on searched descriptions
17:28 dalek panda: review: https://github.com/tadzik/panda/commit/c57f79b1f2
17:28 dalek panda: f0748e6 | tadzik++ | bin/panda:
17:28 dalek panda: Merge pull request #10 from perlpilot/search
17:28 dalek panda:
17:28 dalek panda: Search
17:28 dalek panda: review: https://github.com/tadzik/panda/commit/f0748e6298
17:30 sftp_ joined #perl6
17:34 moritz tadzik: I feel contacted. :-)
17:34 moritz the result is awesome, but not perfect
17:34 * tadzik still swims through the high seas of emails
17:34 * masak .oO( LTP )
17:34 tadzik okay, I'm all ears then
17:35 moritz somebody (flussence?) noted that formatting codes don't nest correctly
17:36 moritz sorry, I'm being called to dinner, bbl
17:36 tadzik oh, look, chromatic is bashing Perl 6 again
17:36 masak url?
17:37 tadzik http://www.modernperlbooks.com/mt/2011/08/​why-my-side-project-doesnt-use-perl-6.html
17:38 masak actually, that looks like reasoned consideration, not bashing.
17:38 tadzik maybe I detect too much offence in that
17:38 tadzik flussence: pingy
17:38 masak I disagree that Rakudo Star isn't/wasn't what it was supposed to be.
17:39 masak but beyond that, it was a good read.
17:39 benabik Looks more like "I'd like to use Perl 6 but can't because ___", which is useful as it provides input as to what modules R* should add.
17:39 masak getting to Perl 5's level of module goodness takes time, that's all.
17:39 tadzik maybe my angriness meter is playing silly after a few days of not-caring
17:42 masak maybe.
17:42 masak with me, it's the other way around. if I'm here too much, I start caring too much.
17:43 masak no, we need more users like chromatic, who say "I'd use Rakudo, but it currently lacks these things".
17:44 tadzik agreed
17:45 sorear good * #perl6
17:46 flussence I hit a brick wall while working on Pod::To::HTML... but I was on my netbook at the time so it was more of a slight bump :)
17:46 colomon \o, colomon
17:46 sorear benabik: it's pretty clear to me that async IO and full-featured networking are the #1 enabling factors we're missing.  I'll attack that next month.
17:46 colomon sorear++
17:46 benabik sorear++, indeed
17:47 sorear btw, undef warnings in niecza have backtraces now.
17:48 sorear oh, the reason niecza no longer passes p5chop and p5chomp... the test files are gone
17:49 flussence 3 things I've come across: the nested stuff is misparsed as moritz mentioned for me, various things ignore config and either parse too much or too little (C<...> mainly), and it'd make my life much saner if the Pod parser parsed L<foo|bar> and D<foo|bar> label/thing bits instead of having to do it myself
17:49 cognominal_ joined #perl6
17:49 dalek roast: 8f9a98d | (Martin Berends)++ | S32-list/categorize.t:
17:49 dalek roast: [S32-list/categorize.t] four tests for categorize (added to spec 2011-01-14)
17:49 dalek roast: review: https://github.com/perl6/roast/commit/8f9a98da1c
17:52 tadzik flussence: I'm quite sure everything ignores =config, if that's what you mean :)
17:53 tadzik +1 on L<foo|bar> and friends
17:53 tadzik could you provide a testcase for failnesting?
17:53 flussence C<C<...>> misparses, I think
17:54 tadzik let me see that
17:54 * flussence checks local copy of s26.html...
17:55 tadzik flussence: well, C<> doesn't treat it's content as verbatim, that's correct
17:55 tadzik but is that what you mean?
17:55 tadzik the insides look fine to me
17:56 tadzik I tried C<C<foo>>, and $=POD[0].content[0].conten​t[1].content[1].content[0] indeed gives you "foo" :P
17:56 dalek rakudo/nom: ebd4957 | (Martin Berends)++ | / (2 files):
17:56 dalek rakudo/nom: [src/core/List.pm] categorize() method and sub, add test to spectest.data
17:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ebd49572be
17:56 flussence hm, I might be looking at the wrong thing
17:57 flussence oh, found one
17:57 flussence "<p>The <code>U&lt;</code>&gt; formatting code specifies[...]"
17:57 tadzik hmm
17:58 flussence from "The C<U<>> formatting code"
17:58 tadzik I assume that's "The C<U<>>" formatting code specifies"?
17:58 tadzik yeah, I can understand the misparsing issue
17:59 flussence oh, a few lines down there's "C< <em>...<em/> >" which gets pretty messed up in output
17:59 sorear rakudo: 1/0; say "alive"
17:59 p6eval rakudo a55346: OUTPUT«alive␤»
17:59 sorear perl6: 1/0; say "alive"
17:59 p6eval rakudo a55346, niecza v8-64-ga39a953: OUTPUT«alive␤»
17:59 p6eval ..pugs: OUTPUT«*** Illegal division by zero␤    at /tmp/U_5PcLLx4G line 1, column 1-4␤»
17:59 flussence (if they're not meant to be verbatim, is that a bug in S26.pod?)
18:00 tadzik hmm
18:00 sorear I'd like a show of hands for "pugs is right"
18:00 benabik rakudo: say 1/0
18:00 p6eval rakudo a55346: OUTPUT«Inf␤»
18:00 tadzik verbatimness is less of an issue here, it's more like the document should be probably using «»
18:00 tadzik so it can nest >
18:01 tadzik otherwise, it's quite logical that a > ends what < has started
18:01 benabik …  Isn't 1/0 NaN, not Inf?
18:01 benabik nom: say 1/0
18:01 p6eval nom 184833: OUTPUT«Inf␤»
18:01 flussence but S26 says I I<can> use balanced delimiters :)
18:01 tadzik hmm
18:02 tadzik I'll look into that in a second
18:02 sftp_ joined #perl6
18:02 flussence sorear: I agree with pugs. I don't think we should be emulating IEEE854 float semantics with arbitrary-precision numeric objects....
18:03 flussence (maybe with native types though)
18:06 tadzik fix memory leaks, patch by mls++
18:06 tadzik woo!
18:06 tadzik you mean it doesn't need 1.5 GB anymore? :P
18:06 colomon oooo, is it verified the patch works?
18:07 flussence oh, I'm compiling right now actually...
18:07 flussence oh wait, this is one of those old revisions, never mind :)
18:07 mberends memory size is down some, but still high, almost 800MB on 32 bit, more on 64
18:07 tadzik nihil novi it seems
18:11 jevin joined #perl6
18:26 sorear apparently, I accidentally made lives_ok/dies_ok treat warnings as "die"
18:26 bbkr joined #perl6
18:29 * sorear wonders if we want routines for testing warning-nature
18:29 flussence I want one of those!
18:30 sorear ?
18:30 flussence (there's one test in Text-Tabs-Wrap that checks whether a thing that's supposed to warn actually does. It doesn't work properly)
18:31 sorear flussence: I'd like your input on a sensible API
18:32 moritz sorear: maybe lives_ok/dies_ok need to become throws_ok/lives_ok with an optional :warn flag
18:32 flussence that sounds a bit more sensible than what I had in mind
18:32 moritz sorry, throws-ok/lives-ok
18:33 tadzik :)
18:33 sorear no, it's lives_ok
18:34 * moritz doesn't care, as long as we are strangely consistent in some way
18:34 masak \o/
18:35 moritz (straight forward consistent would be OK too)
18:36 * moritz -> afk agian
18:36 sorear the user should design this
18:38 masak I'm busy
18:39 masak :P
18:41 dalek roast: 27b15f5 | sorear++ | S04-declarations/my.t:
18:41 dalek roast: [S04-declarations/my.t] Niecza unfudging, warning suppression, do not rely on 1/0 throwing, SETTING::<> has two :s
18:41 dalek roast: review: https://github.com/perl6/roast/commit/27b15f575c
18:41 sorear masak: the user is flussence.
18:41 sorear and now I have to leave.
18:43 flussence hm, I was originally thinking of a warns_ok function, but having an exception type mask on lives_ok/etc. sounds better for everyone
18:45 flussence (except implementors :)
18:46 tadzik oh, I thought you were volunteering?
18:46 tadzik :P
18:47 REPLeffect joined #perl6
18:48 flussence I'm keeping myself busy already, trying to turn this Pod tree-walking/html-emitting stuff into two slightly more sane modules...
18:48 birdwindupbird joined #perl6
18:49 tadzik ooh, ++
18:50 tadzik we really need something to detect Lists properly
18:50 tadzik for now, we can detect elements
18:51 tadzik how much that sucks for HTML or LaTeX, you know already :)
18:52 masak huh? it sucks for HTML or LaTeX?
18:52 flussence masak: =item doesn't have a grouping thing, so the best we've got at the moment is wrapping each list item in a <ul>
18:54 masak oh, that little problem. :)
18:55 tadzik yeah, to say it gently
18:56 masak I believe it has a nice solution, and that you'll find it.
19:07 dorlamm joined #perl6
19:12 flussence maybe I could borrow from the html5 parsing algorithm, they'll have something for loose <li> tags...
19:17 [particle]1 joined #perl6
19:34 TiMBuS joined #perl6
19:34 lichtkind joined #perl6
19:35 lichtkind masak ping
19:35 phenny lichtkind: 07:06Z <mberends> tell lichtkind the reason nom does not have categorize() is probably that no tests exist for it at all to remind the developers (I plan to fix that today)
19:35 phenny lichtkind: 11:52Z <mberends> tell lichtkind I'll get you for this! (categorize)
19:35 dorlamm joined #perl6
19:35 lichtkind mberends: you want tests?
19:36 * lichtkind jsut finished his slides, last one is a big thank you to jnthn++ and pmichaud++
19:37 mberends lichtkind: I wrote 4 tests today, but more might be useful if they cover different code
19:37 lichtkind mberends: link pls
19:38 masak lichtkind: you pang?
19:38 lichtkind hahah
19:39 mberends lichtkind: https://github.com/perl6/roast/b​lob/master/S32-list/categorize.t
19:39 lichtkind masak: i just wanted show you the slides
19:39 masak \o/
19:43 lichtkind masak: http://kepher.kilo028.server4yo​u.de/nightly/datastructures.pdf
19:43 lichtkind its up in 30 sec or so
19:44 lichtkind mberends: thanks
19:45 * masak looks
19:47 masak lichtkind: those are excellent slides :)
19:48 thou joined #perl6
19:48 masak *@( ... ) ? really?
19:48 lichtkind masak: im happy you like it
19:48 dukeleto joined #perl6
19:48 lichtkind but still tweaking it a bit
19:48 masak isn't flattening just prefix:<|>?
19:49 lichtkind masak: *@ doesnt work in nom
19:49 lichtkind but thats what i got from the syn
19:49 lichtkind | is something different
19:49 lichtkind thats just positional context for parcels
19:50 lichtkind thats slightly different to *@
19:50 lichtkind or it was changed, iwasnt around for some month
19:51 masak lichtkind: s/How many elements has this list\?/How many elements does this list have?/
19:52 masak lichtkind: I thought prefix:<*> for flattening arrays was killed looooong ago.
19:52 tadzik where did you get Lego Larry?
19:54 lichtkind tadzik: from the interwebs, i stole it from one of my older slides
19:54 tadzik tee hee
19:54 masak lichtkind: @digits = 0..9 without the parentheses works in Perl 5 too.
19:55 masak the common term for a "linear skipping" sequence is "arithmetic". you already have "geometric" in there.
19:56 lichtkind masak yes
19:56 lichtkind i corrected the other too
19:56 lichtkind +otehr changes
19:56 lichtkind its 10% funnier in 2 minutes
19:57 masak lichtkind: "Works Ob Seq() Too"... "Ob"?
19:58 masak whoa, those pictures of jnthn and pmichaud both appear to be a few years old.
19:59 masak anyway, lichtkind++
20:00 lichtkind masak
20:00 lichtkind you have better
20:01 lichtkind that of jnthn i would change
20:01 lichtkind but not that one of pm because there hes looks more fresh :)
20:01 lichtkind masak which slides is ob?
20:02 whiteknight joined #perl6
20:03 mj41 joined #perl6
20:03 lichtkind masak: vound and corrected to : Works On Parcel() Too
20:03 masak goodie
20:05 mberends lichtkind: categorize() implemented today in nom
20:06 lichtkind good so i remove the npot implemented yet warning too
20:06 soh_cah_toa joined #perl6
20:07 masak whoa, mberends++!
20:07 masak lichtkind: I still think you're working on very old information with prefix:<*> and prefix:<**>, and that you should check that with someone.
20:08 lichtkind yes i planed to do that
20:09 * masak .oO( spec changes are not to be taken lichtly )
20:11 mberends :)
20:12 lichtkind if i can find it in syn i change it
20:14 lichtkind allright everything corrected unless the **, reload the pdf and spot the 2 new jokes
20:15 lichtkind its up in 20 sec
20:18 lichtkind looks like lol ist now written LoL
20:21 lichtkind but *@ is still used in syn3 ?
20:21 lichtkind ist just slurpy or fossils?
20:22 moritz *@ in a signature is slurpy, and not a fossile
20:22 lichtkind mberends++ for implementing categorize
20:22 moritz but that's not prefix:<*>
20:24 lichtkind moritz: just wanted to clear that up :)
20:24 moritz (signatures are parsed sepcially, not with the operator precdence parser
20:24 moritz *specially
20:24 moritz )
20:24 masak they're like... a DSL... :)
20:26 jferrero joined #perl6
20:28 lichtkind | seems to not be implemented in nom+
20:28 masak nom: my @a = 1, 2, 3; sub foo($x, $y, $z) { say "$x $y $z" }; foo(|@a)
20:29 p6eval nom ebd495: OUTPUT«1 2 3␤»
20:29 masak seems it is.
20:29 bluescreen10 joined #perl6
20:29 moritz nom: sub f(*@a) { say @a.perl }; f 1, 2, 3
20:29 p6eval nom ebd495: OUTPUT«Array.new(1, 2, 3)␤»
20:29 moritz that's slurpy
20:29 moritz masak++ showed argument interpolation
20:30 masak I never *really* understood why slurpy could be * but argument interpolation couldn't.
20:30 moritz std: |(my @foo)
20:30 p6eval std e3c970e: OUTPUT«ok 00:01 120m␤»
20:31 moritz perhaps we didn't want a prefix:<*> in the normal grammar?
20:31 masak yes, but why?
20:32 moritz oh, because * is a term already?
20:32 moritz having both a prefix and a term of the same name is bound to cause trouble, no?
20:32 masak this was before term:<*> existed.
20:33 masak maybe just maybe we had @a[*-1], but we had no conception that it was as unsugared as it is now.
20:33 lichtkind maybe your new is fresher
20:33 lichtkind i just compile again
20:33 lichtkind but here | doesnt work
20:33 masak but no, even @a[*-1] came after argument interpolation switched to being |
20:34 masak lichtkind: well, it works here :)
20:35 lichtkind ist there a operator for LoL ?
20:35 moritz masak: ah, but we do have (|$x) in signatures
20:35 djanatyn Do I need to put a semicolon on the ending curly brace of an if statement in perl 6?
20:36 moritz djanatyn: only if there's no newline after it
20:36 djanatyn Or do I only have to do that to make cperl-mode happy?
20:36 djanatyn Ah. Is it considered good practice, then?
20:36 moritz only if there's no newline after it :-)
20:37 tadzik our best practices are built-in in the spec :)
20:37 masak djanatyn: I put in the semicolon after the closing brace sometimes even when it's not needed. but that's not very often at all.
20:37 masak djanatyn: if the statement is an assignment, I might, for example. otherwise it looks so weird.
20:37 masak but it's mostly a nostalgic reaction.
20:37 moritz masak: to your p5 trained eye :-)
20:37 djanatyn Hmm. Maybe cperl-mode is just freaking out because I'm writing Perl 6.
20:37 masak or some foolish consistency.
20:37 djanatyn It's also doing *weird* things to my indentation.
20:38 * tadzik sleeps
20:38 moritz masak: what if you pass a block as argument?
20:38 lichtkind tadzik: good night
20:38 masak moritz: I'm not *that* well-versed in Perl 5, you know :P
20:38 masak moritz: yes, probably then too. I dunno.
20:38 moritz do-something { \n code here \n } \n
20:38 moritz semicolon before the final \n ?
20:38 masak oh! it depends.
20:39 masak is do-something a quasi-keyword? then no.
20:39 masak is it just a "normal sub" that happens to take a code block as its argument? then yes.
20:39 masak for me, it's more about usage than about extreme consistency.
20:39 masak essentially I want the code to lie consistently :P
20:40 * lichtkind fixed **@ in tablets too
20:41 masak yay
20:41 djanatyn does anyone here write perl 6 in emacs?
20:41 masak lichtkind: it's infix:<||> now
20:41 masak djanatyn: when I do, I use cperl too.
20:42 masak but mostly I use vim with stubbornly crappy Perl 5 highlighting :(
20:42 djanatyn Hmm.
20:42 * moritz uses vim + perl6.vim
20:42 moritz unless it hits a pathologically slow case (very seldom), then I switch off syntax hilighting entirely
20:43 djanatyn Hmm.
20:43 djanatyn I don't even care about incorrect syntax highlighting very much - cperl-mode is doing some very, very weird things with indetation.
20:43 djanatyn Also, I apologize for saying "Hmm." twice. ;)
20:44 djanatyn I'm in four different IRC channels, sometimes I get confused as to what I've already said.
20:44 moritz no problem
20:44 djanatyn (four channels simultaneously, I mean)
20:44 * moritz 's channel count as at 14, though not all of them are active simultaneously
20:44 djanatyn I've heard lots of good things about perl6.vim.
20:44 * djanatyn checks his channel chat
20:44 moritz it is maintained!
20:45 djanatyn 9 right now in ERC.
20:45 djanatyn Still, I really don't want to switch from emacs to vim just to write perl 6. I'm really comfortable in emacs.
20:45 djanatyn I saw an elisp file specifically for perl 6 highlighting and indentation on the emacs wiki.
20:46 djanatyn It was hosted on the pug site's svn, and I wasn't able to access it. :(
20:46 masak ooh, a fellow ERC user! finally! \o/
20:46 masak djanatyn: I use Emacs for prose and vim for programming. YMMV.
20:47 djanatyn Yeah, emacs has some really good features, even besides writing code.
20:47 masak yeah.
20:48 masak I don't even look at editors without macro capabilities anymore.
20:48 djanatyn I personally have an emacs session running in tmux on a remote host that I ssh to - it's constantly running.
20:48 masak and regex-based commands feel like a requirement, too.
20:48 lichtkind i think i delete that flatening and non flatening section completely
20:48 lichtkind have way too much slides anyway
20:48 djanatyn I write my code locally, and use org-mode pretty frequently too.
20:49 moritz djanatyn: fwiw the files from the pugs svn repo are now in the perl6/mu repo on github
20:49 djanatyn Hmm, maybe I can find it there.
20:49 moritz file util/cperl-mode.el
20:52 wamba joined #perl6
20:52 djanatyn Awesome! :D
20:55 djanatyn woo, it's working :D
20:55 masak woo!
20:57 frhodes joined #perl6
21:01 djanatyn So, I was bored, and read an artice on coding horror that said 199/200 people that interview for coding jobs couldn't even write FizzBuzz.
21:01 djanatyn So I said, "Huh. That's crazy."
21:01 djanatyn "I wonder if I could do that in perl 6..."
21:01 masak so you implemented it.
21:02 masak ooh, let's spend the rest of the evening writing FizzBuzz in different ways!
21:02 plobsing is there a p6 fizzbuzz implementation on rosettacode yet?
21:02 masak I'd be surprised if not.
21:02 masak I mean, if there's an article on RC about FizzBuzz, and I'd be surprised if there wasn't :)
21:03 masak djanatyn: shall I post a solution, or shall I wait for you to do it? ;)
21:03 djanatyn https://gist.github.com/1179403 <-- is it possible to get rid of those "$_"?
21:03 masak djanatyn: well, you can do .say
21:03 masak in the last case.
21:03 djanatyn ".say"?
21:04 djanatyn what is that?
21:04 plobsing shorthand for $_.say
21:04 flussence nom: 'a'.say
21:04 p6eval nom ebd495: OUTPUT«a␤»
21:04 djanatyn it gives a binary subroutine/function-thing the $_ as an argument?
21:04 djanatyn ...oooohhh
21:04 flussence nom: 'a'.print
21:04 djanatyn I see
21:04 p6eval nom ebd495: OUTPUT«Method 'print' not found for invocant of class 'Str'␤  in <anon> at /tmp/oQSH8nIGMa:1␤  in <anon> at /tmp/oQSH8nIGMa:1␤␤»
21:04 flussence eh
21:04 masak hah!
21:04 flussence nom: 'a'.^methods(:local)
21:04 p6eval nom ebd495:  ( no output )
21:04 flussence nom: 'a'.^methods(:local)».name.say
21:04 p6eval nom ebd495: OUTPUT«Int Num chomp chop substr pred succ ll-match ords lines samecase samespace trim-leading trim-trailing trim words capitalize Bool Str ACCEPTS Numeric gist perl comb match subst split␤»
21:05 masak and you people say nom is ready for prime time! it doesn't even have .print! :P
21:05 * plobsing wonders how many spec failures nom could fix by implementing .say
21:05 flussence zero!
21:05 plobsing really?
21:05 plobsing it is untested?
21:05 flussence I think you meant .print :)
21:05 masak :P
21:05 plobsing yes. that would be it
21:06 masak flussence: wise-ass. I like you :)
21:08 flussence huh, it seems there really aren't any Str.prints in roast
21:08 flussence there's filehandle.print but no strings AFAICT
21:09 plobsing isn't that a feature thats used fairly frequently? why is it untested?
21:10 masak nom: sub fizzbuzz { return "FizzBuzz!" if $^n %% 15; return "Fizz!" if $n %% 3; return "Buzz!" if $n %% 5; return $n }; say .&fizzbuzz for 1..100
21:10 p6eval nom ebd495: OUTPUT«1␤2␤Fizz!␤4␤Buzz!␤Fizz!␤7␤8␤Fizz!␤Buzz!​␤11␤Fizz!␤13␤14␤FizzBuzz!␤16␤17␤Fizz!␤19␤Buzz!​␤Fizz!␤22␤23␤Fizz!␤Buzz!␤26␤Fizz!␤28␤29␤FizzBu​zz!␤31␤32␤Fizz!␤34␤Buzz!␤Fizz!␤37␤38␤Fizz!␤Buz​z!␤41␤Fizz!␤43␤44␤FizzBuzz!␤46␤47␤Fizz!␤49␤Buz​z!␤Fizz!␤52␤53␤Fizz!␤Buzz!␤56␤Fizz!␤58␤59␤Fiz…
21:10 masak \o/
21:10 masak djanatyn: TIMTOWTDI.
21:10 * djanatyn runs away to #python
21:10 flussence plobsing: not that frequent when there's a shorter function that DWIM more often...
21:10 djanatyn what's that "$^n"?
21:11 masak djanatyn: oh, it just says "this is a parameter".
21:11 flussence $^n says to the compiler "I'm too lazy to put a signature on this sub, go figure it out yourself"
21:11 plobsing djanatyn: it is like $a and $b in perl5's sort
21:11 flussence and they work in alphabetical order
21:11 masak well, Unicode order :)
21:11 djanatyn so, there's also a $^a?
21:12 plobsing djanatyn: if you type it, it is there
21:12 flussence std: $^Æ
21:12 p6eval std e3c970e: OUTPUT«[31m===[0mSORRY![31m===[0m�Placeholder variable $^Æ may not be used outside of a block at /tmp/xljdL1Dui5 line 1:�------> [32m$^Æ[33m�[31m<EOL>[0m�Check failed�FAILED 00:01 118m�»
21:12 flussence std: {$^Æ}
21:12 p6eval std e3c970e: OUTPUT«ok 00:01 118m␤»
21:12 plobsing masak: is that locale-specific?
21:12 masak plobsing: no.
21:12 masak plobsing: the code points are ordered.
21:12 PerlJam djanatyn: variables like $^a automatically create a signature for the sub with those vars in unicode-order as parameters
21:13 plobsing aw. that was an opening for so much evil...
21:13 masak plobsing: it's not evil enough!?
21:13 flussence I think (or at least hope) the Unicode people have all that sorting stuff defined already...
21:13 plobsing masak: it is never enough
21:13 flussence (unicode's evil enough already :)
21:15 masak nom: say { $^n %% 15 ?? "FizzBuzz!" !! $n %% 3 ?? "Fizz!" !! $n %% 5 ?? "Buzz!" !! $n }($_) for 1..100
21:15 p6eval nom ebd495: OUTPUT«1␤2␤Fizz!␤4␤Buzz!␤Fizz!␤7␤8␤Fizz!␤Buzz!​␤11␤Fizz!␤13␤14␤FizzBuzz!␤16␤17␤Fizz!␤19␤Buzz!​␤Fizz!␤22␤23␤Fizz!␤Buzz!␤26␤Fizz!␤28␤29␤FizzBu​zz!␤31␤32␤Fizz!␤34␤Buzz!␤Fizz!␤37␤38␤Fizz!␤Buz​z!␤41␤Fizz!␤43␤44␤FizzBuzz!␤46␤47␤Fizz!␤49␤Buz​z!␤Fizz!␤52␤53␤Fizz!␤Buzz!␤56␤Fizz!␤58␤59␤Fiz…
21:15 masak a bit shorter.
21:16 wk joined #perl6
21:16 masak nom: say $_ %% 15 ?? "FizzBuzz!" !! $_ %% 3 ?? "Fizz!" !! $_ %% 5 ?? "Buzz!" !! $_ for 1..100
21:16 p6eval nom ebd495: OUTPUT«1␤2␤Fizz!␤4␤Buzz!␤Fizz!␤7␤8␤Fizz!␤Buzz!​␤11␤Fizz!␤13␤14␤FizzBuzz!␤16␤17␤Fizz!␤19␤Buzz!​␤Fizz!␤22␤23␤Fizz!␤Buzz!␤26␤Fizz!␤28␤29␤FizzBu​zz!␤31␤32␤Fizz!␤34␤Buzz!␤Fizz!␤37␤38␤Fizz!␤Buz​z!␤41␤Fizz!␤43␤44␤FizzBuzz!␤46␤47␤Fizz!␤49␤Buz​z!␤Fizz!␤52␤53␤Fizz!␤Buzz!␤56␤Fizz!␤58␤59␤Fiz…
21:16 masak shorter still.
21:17 djanatyn Is this a round of perl 6 golf? :)
21:18 flussence nom: say $_ %% 15 ?? "FizzBuzz!" !! $_ %% 3 ?? "Fizz!" !! $_ %% 5 ?? "Buzz!" !! $_ for ^100
21:18 p6eval nom ebd495: OUTPUT«FizzBuzz!␤1␤2␤Fizz!␤4␤Buzz!␤Fizz!␤7␤8␤F​izz!␤Buzz!␤11␤Fizz!␤13␤14␤FizzBuzz!␤16␤17␤Fizz​!␤19␤Buzz!␤Fizz!␤22␤23␤Fizz!␤Buzz!␤26␤Fizz!␤28​␤29␤FizzBuzz!␤31␤32␤Fizz!␤34␤Buzz!␤Fizz!␤37␤38​␤Fizz!␤Buzz!␤41␤Fizz!␤43␤44␤FizzBuzz!␤46␤47␤Fi​zz!␤49␤Buzz!␤Fizz!␤52␤53␤Fizz!␤Buzz!␤56␤Fizz!…
21:18 flussence hm, not the same...
21:18 TimToady http://rosettacode.org/wiki/FizzBuzz#Perl_6  <-- of course there's an RC entry for that, several in fact
21:19 * masak rests his case
21:19 jaldhar joined #perl6
21:19 TimToady none of which use ??!!
21:20 djanatyn I have a friend who was going through the project euler questions using perl6, and pushed all his solutions to a git repo.
21:20 flussence nom: use FizzBuzz qw(100);
21:20 p6eval nom ebd495: OUTPUT«===SORRY!===␤arglist case of use not yet implemented at line 1, near ";"␤»
21:20 djanatyn I did a couple project euler problems in haskell, and learned a lot by comparing my solutions with the solutions given in the wiki.
21:20 masak TimToady: infix:<x>. that's cute, but Merlyn wouldn't like it. :P
21:20 djanatyn I learned to appreciate a lot of things in Perl after using Python for a bit.
21:21 djanatyn for one, string interpolation in Python *SUCKS*.
21:21 masak TimToady: he once said Bool::True should be 43 or something, so that people wouldn't abuse it in exactly this way...
21:21 y3llow joined #perl6
21:22 flussence std: use Acme::FizzBuzz:from<perl5>; # there, that's as short as it gets in p6 for now.
21:22 p6eval std e3c970e: OUTPUT«[31m===[0mSORRY![31m===[0m�Can't locate module Acme::FizzBuzz at /tmp/vLZiCn3IKc line 1:�------> [32muse Acme::FizzBuzz:from<perl5>[33m�[31m; # there, that's as short as it gets in[0m�Check failed�FAILED 00:01 118m�»
21:22 TimToady mapping Yes/No to There/NoThere is perfectly natural
21:22 [Coke] well, if you're going to make it non-1, make it 42. sheesh. ;)
21:22 TimToady *Not
21:22 djanatyn Also, I was very saddened to discover there was no qw() in python.
21:22 djanatyn Is that just a perl thing?
21:23 flussence yep
21:23 masak [Coke]: I can't swear that he didn't actually write 42.
21:23 PerlJam djanatyn: doesn't python have %w() or something ?
21:23 flussence does it?
21:23 PerlJam or am I thinking of ruby?
21:23 plobsing djanatyn: shell somewhat has that by design
21:23 djanatyn PerlJam: Not sure.
21:23 masak Ruby definitely has it.
21:23 djanatyn Ruby has some interesting things, especially with string interpolation.
21:24 djanatyn IIRC, you can embed a Ruby statement in a string.
21:24 TimToady we can do it easier
21:24 djanatyn Oh?
21:24 djanatyn (v5 or v6?)
21:24 TimToady v6
21:24 plobsing v5 does it, but it ain't pretty
21:25 PerlJam djanatyn: v6 of course (check the channel you're in :)
21:25 djanatyn :D
21:25 masak it's almost too easy in Perl 6! :P
21:25 djanatyn how is it done? :)
21:25 TimToady perl6: say "The answer is { 7 * 3 * 2 }"
21:25 lichtkind mberends: im very grateful but excuse me had lot of other things to do
21:25 p6eval pugs, rakudo a55346, niecza v8-64-ga39a953: OUTPUT«The answer is 42␤»
21:26 flussence .oO(works in PHP too, you just have to prefix your statements with a useless variable...)
21:26 djanatyn hmm...
21:26 TimToady perl6: say "The answer is { $_ for 1..10 }"
21:26 p6eval pugs, niecza v8-64-ga39a953: OUTPUT«The answer is ␤»
21:26 p6eval ..rakudo a55346: OUTPUT«The answer is 1 2 3 4 5 6 7 8 9 10␤»
21:26 masak nieczabug!
21:26 djanatyn perl6: $foo = 1; $string = "the number is { $foo }"; $foo += 1; say $string
21:26 p6eval rakudo a55346: OUTPUT«===SORRY!===␤Symbol '$foo' not predeclared in <anonymous> (/tmp/K9glA0Nkm8:22)␤»
21:26 p6eval ..niecza v8-64-ga39a953: OUTPUT«[31m===[0mSORRY![31m===[0m��Variable $foo is not predeclared at /tmp/XAAGri65kD line 1:�------> [32m<BOL>[33m�[31m$foo = 1; $string = "the number is { $fo[0m��Variable $string is not predeclared at /tmp/XAAGri65kD line 1:�------> [32m$foo = 1; [33…
21:26 p6eval ..pugs: OUTPUT«*** ␤    Unexpected " ="␤    expecting "::"␤    Variable "$foo" requires predeclaration or explicit package name␤    at /tmp/dZ7PQ_mgTh line 1, column 5␤»
21:27 djanatyn ...oh
21:27 djanatyn I suppose I did that wrong
21:27 TimToady need my
21:27 djanatyn ah, use strict is predeclared :D
21:27 TimToady no, it's not that lazy
21:27 djanatyn perl6: my $foo =1; my $string = "the number is { $foo }"; $foo += 1; say $string
21:27 p6eval pugs, rakudo a55346, niecza v8-64-ga39a953: OUTPUT«the number is 1␤»
21:28 djanatyn So, it interpolates the string at the time of it's declaration?
21:28 TimToady assignment
21:28 TimToady when the string is eval'd
21:28 TimToady we don't automatically close over strings
21:29 TimToady you can always write a closure for htat
21:29 TimToady *that even
21:29 plobsing perl6: my $builder = "the number is { * }"; say $builder(2);
21:29 masak Groovy closes over strings, IIRC.
21:30 p6eval niecza v8-64-ga39a953: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Str␤  at /tmp/LK5PIopNb8 line 1 (MAIN mainline @ 7) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2045 (CORE C954_ANON @ 2) ␤  at /home/p6eval/niecza/lib/CORE.setting line 2046 (CO…
21:30 p6eval ..rakudo a55346: OUTPUT«invoke() not implemented in class 'Perl6Str'␤  in main program body at line 22:/tmp/k4LhEhX_rQ␤»
21:30 p6eval ..pugs: OUTPUT«*** Cannot cast from VStr "the number is Inf" to Pugs.AST.Types.VCode (VCode)␤    at /tmp/rd6zLdeC83 line 1, column 42-53␤»
21:30 masak it confuses the heck out of most Groovy developers :)
21:30 TimToady perl6: my $foo = 1; my $closure = {"the number is $foo"}; $foo++; say $closure();
21:30 p6eval pugs, rakudo a55346, niecza v8-64-ga39a953: OUTPUT«the number is 2␤»
21:31 TimToady perl6: my $foo =1; my $string = "the number is { lazy $foo }"; $foo++; say $string
21:31 p6eval niecza v8-64-ga39a953: OUTPUT«[31m===[0mSORRY![31m===[0m��Action method statement_prefix:lazy not yet implemented at /tmp/jxWSY1L7HI line 1:�------> [32mmy $string = "the number is { lazy $foo [33m�[31m}"; $foo++; say $string[0m��Unhandled exception: Unable to resolve method sta…
21:31 p6eval ..pugs: OUTPUT«*** Cannot cast from VInt 1 to Pugs.AST.Types.VCode (VCode)␤    at /tmp/bypCtZcCi4 line 1, column 43-53␤»
21:31 p6eval ..rakudo a55346: OUTPUT«Could not find sub &lazy␤  in main program body at line 22:/tmp/uWntd9_2YY␤»
21:31 plobsing so whatever-star in a string interpolation doesn't turn into a closure?
21:31 TimToady aw
21:32 TimToady no, isolated * is always just a Whatever
21:32 masak nom: say "This is just an asterisk: *"
21:32 p6eval nom ebd495: OUTPUT«This is just an asterisk: *␤»
21:32 TimToady you'd have to write it with concat
21:33 plobsing I mean, you can't do it with "{ * }"? Does "{ }" work different from concat?
21:33 TimToady it's more like ~ do { * } ~
21:34 plobsing ah
21:34 TimToady you could use ~ * ~ though
21:34 masak 'night, #perl6
21:34 TimToady perl6: my $closure = "foo " ~ * ~ " bar"; say $closure(42)
21:34 p6eval pugs: OUTPUT«*** Cannot cast from VStr "foo Inf bar" to Pugs.AST.Types.VCode (VCode)␤    at /tmp/1EMrRKdXdJ line 1, column 40 - line 2, column 1␤»
21:34 p6eval ..rakudo a55346, niecza v8-64-ga39a953: OUTPUT«foo 42 bar␤»
21:48 lue joined #perl6
21:48 lue hello planet o/
21:49 TimToady I don't think we've cleared our orbit yet
21:52 bluescreen10 joined #perl6
22:03 sorear good * #perl6
22:03 im2ee Could I make something with TCP connection in perl6? :)
22:04 im2ee Using sockets e.g.?
22:04 sorear flussence: mock up some code for me and I'll make it run
22:09 frhodes joined #perl6
22:10 flussence (ooc: are "return;" and falling off the end of a block treated differently by CONTROL?)
22:10 plobsing im2ee: you could. google suggests looking at 'IO::Socket::INET'
22:11 im2ee plobsing, p6 has it?
22:11 flussence (oh, maybe I should read more than the latter half of a sentence.)
22:11 flussence (answer: yes)
22:12 sorear flussence: in niecza, they are differnet
22:12 flussence I wonder what rakudo does...
22:12 sorear rakudo doesn't have CONTROL, iirc.
22:12 im2ee plobsing, I use IO::Socket::INET in perl 5. :)
22:13 plobsing rakudo star includes an LWP::Simple implementation, so I'd assume it would have that
22:13 flussence perl6: sub a($b); { return 1 if $b; CONTROL { say 'control'; return 0 } }; say a(True); say a(False);
22:13 p6eval rakudo a55346: OUTPUT«Could not find sub &a␤  in main program body at line 22:/tmp/61YvleS8rw␤»
22:13 p6eval ..niecza v8-64-ga39a953: OUTPUT«[31m===[0mSORRY![31m===[0m��Malformed block at /tmp/35C74XzD0M line 1:�------> [32msub a($b)[33m�[31m; { return 1 if $b; CONTROL { say 'contr[0m��Parse failed��»
22:13 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ";"␤    expecting bare trait, trait or block␤    at /tmp/xV7sV5rhsZ line 1, column 10␤»
22:13 sorear Rakudo has an IO::Socket::INET, but it's horrendously feature-poor
22:13 plobsing im2ee: I would expect some slight API differences
22:13 flussence whoops
22:13 flussence perl6: sub a($b) { return 1 if $b; CONTROL { say 'control'; return 0 } }; say a(True); say a(False);
22:14 p6eval rakudo a55346: OUTPUT«(timeout)control␤control␤control␤contro​l␤control␤control␤control␤control␤control␤cont​rol␤control␤control␤control␤control␤control␤co​ntrol␤control␤control␤control␤control␤control␤​control␤control␤control␤control␤control␤contro​l␤control␤control␤control␤control␤control␤…
22:14 p6eval ..niecza v8-64-ga39a953: OUTPUT«1␤Nil␤»
22:14 p6eval ..pugs: OUTPUT«1␤␤»
22:14 flussence niecza++, looks good to me
22:15 flussence well, good-er than an infinite loop
22:15 sorear flussence: niecza generates a return handler inside &a which is slightly smaller than the entire block, so it takes precednce over the CONTROL, which does scope over the entire block
22:17 flussence (control exceptions are weird, I'm going to pretend they're not there for today.)
22:20 sorear lichtkind: slide 53 is slighty out of date
22:21 sorear perl6: my @cities = <roma milano turino>; say @cities
22:21 sorear nom: my @cities = <roma milano turino>; say @cities
22:21 p6eval pugs, rakudo a55346: OUTPUT«romamilanoturino␤»
22:21 p6eval ..niecza v8-64-ga39a953: OUTPUT«roma milano turino␤»
22:21 p6eval nom ebd495: OUTPUT«roma milano turino␤»
22:21 lichtkind sorear: you mean say @cities.perl;  ?
22:21 sorear lichtkind: no, look at the say output.
22:22 sorear lichtkind: page 53/158 of your slideset gives 'say' output without spaces.
22:22 lichtkind sorear: yes as checked with my version of nom
22:23 lichtkind sorear: is what niecza does really the specced?
22:23 lichtkind sorear: its now 49/154
22:24 flussence interesting... perl6.vim highlights "throws_ok" as a special function but it's not in any Test.pm6 I know of...
22:24 sorear lichtkind: nom and niecza give the same answer
22:24 sorear rakudo master is lagging
22:25 sorear lichtkind: I just redownloaded, still 158 pages.
22:26 lichtkind yes the last version is not up
22:26 lichtkind i could swear nom did too
22:26 jevin joined #perl6
22:26 lichtkind but i checked and you right
22:26 lichtkind i changed it and will be up soon
22:26 lichtkind thank you
22:27 lichtkind sorear: you will come also to turino or frankfurt?
22:29 sorear I have no plans at this time.
22:30 lichtkind new version is up,  sorear++
22:31 sorear perl6: sub mysub(*@arr) { say @arr.elems }; mysub(1, (2, [3, 4]), 5);
22:31 p6eval pugs, rakudo a55346, niecza v8-64-ga39a953: OUTPUT«4␤»
22:34 sorear perl6: my $number = 0 .. *; say $number; # lichtkind?
22:34 p6eval pugs: OUTPUT«Stack space overflow: current size 8388608 bytes.␤Use `+RTS -Ksize -RTS' to increase it.␤»
22:34 p6eval ..niecza v8-64-ga39a953: OUTPUT«0..Infinity␤»
22:34 p6eval ..rakudo a55346: OUTPUT«␤»
22:35 sorear nom: my $number = 0 .. *; say $number; # lichtkind?
22:35 p6eval nom ebd495: OUTPUT«0..Inf␤»
22:35 sorear lichtkind: page 145/158, "With eval" is slightly misleading since it doesn't use eval().  "With interpolation" may be better
22:40 lichtkind sorear: you mean on slide 143
22:40 lichtkind where its about hash slices?
22:42 sorear yes
22:45 lichtkind sorear: so its fixed now too, thanks
22:49 sorear \o/ All tests successful.
22:49 lichtkind yeah
22:49 dalek niecza: 4e8d22a | sorear++ | / (2 files):
22:49 dalek niecza: Remove deleted test files, and make lives_ok et al not intercept warnings
22:49 dalek niecza: review: https://github.com/sorear/niecza/commit/4e8d22ae96
22:51 frhodes joined #perl6
22:54 [Coke] joined #perl6
23:09 frhodes joined #perl6
23:11 lichtkind new version is up
23:11 lichtkind with yet 5% more fun
23:21 jevin joined #perl6
23:23 flussence I'll leave this in the hands of people who know what they're talking about - some ramblings on what to do with control exceptions: https://raw.github.com/gist/1179681/5e80f38edf8​13472501a974b04d5ba54d7b2bb3d/control-tests.p6
23:24 jferrero joined #perl6
23:25 Helios joined #perl6
23:34 Psyche^ joined #perl6
23:39 * flussence ^Zzz
23:48 tokuhirom joined #perl6
23:59 lichtkind good night you brave ones

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

Perl 6 | Reference Documentation | Rakudo