Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-02-22

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 Koven is now known as Kovensky
00:06 donri )
00:16 molaf_ joined #perl6
00:19 molaf left #perl6
00:24 awoodland left #perl6
00:35 solarion_ left #perl6
00:35 solarion_ joined #perl6
00:35 jtbraun1 joined #perl6
00:35 solarion_ is now known as Solarion
00:36 cdarroch left #perl6
00:36 icwiener left #perl6
00:38 arlinius joined #perl6
00:43 envi joined #perl6
01:02 MayDaniel left #perl6
01:04 jtbraun1 left #perl6
01:11 lopaway is now known as lopnor
01:13 hudnix left #perl6
01:13 arlinius left #perl6
01:14 hudnix joined #perl6
01:23 zykes- left #perl6
01:23 zykes- joined #perl6
01:30 mtk left #perl6
01:31 zykes- left #perl6
01:35 lopnor is now known as lopaway
01:36 _twitch joined #perl6
01:38 mtk joined #perl6
01:39 Rotwang left #perl6
01:41 zykes- joined #perl6
01:43 lopaway is now known as lopnor
01:47 drbean left #perl6
01:49 drbean joined #perl6
01:50 lopnor is now known as lopaway
01:54 lopaway is now known as lopnor
02:00 noganex_ joined #perl6
02:01 donri left #perl6
02:03 noganex left #perl6
02:04 envi left #perl6
02:14 jtbraun1 joined #perl6
02:38 whiteknight left #perl6
02:49 takadonet joined #perl6
02:53 lopnor is now known as lopaway
02:55 takadonet phenny: tell donri I would admin the /r/perl6 subreddit if you need more people
02:55 phenny takadonet: I'll pass that on when donri is around.
02:56 Chillance left #perl6
02:56 silent_h_ joined #perl6
03:11 jtbraun1 left #perl6
03:22 VXZ joined #perl6
03:22 donri joined #perl6
03:23 donri Is there [plans for] anything in Perl 6 or Parrot that would make persistence of objects work well without hacks?
03:23 phenny donri: 02:55Z <takadonet> tell donri I would admin the /r/perl6 subreddit if you need more people
03:23 donri takadonet: yes please!
03:25 donri added
03:25 jdhore donri, I will as well if you'd like
03:25 jdhore donri, my Reddit username is jdhore1
03:25 Tene donri: feel free to add me if you like; there's a small chance I may do something.
03:26 donri jdhore: added
03:26 Tene donri: good serialization of objects is part of the plans for the nom refactor
03:26 donri Tene: username?
03:26 * Tene
03:26 jdhore :D
03:26 donri ;)
03:26 jdhore thanks
03:27 donri So, for object persistence to work well you need serialization and mutation tracking
03:28 Tene donri: I don't know of anyone planning to work on persistence specifically.
03:28 newguyhere joined #perl6
03:28 donri Tene: Nah, but I'm curious if perhaps Parrot or Perl 6 already has [plans for] the features that would make that work well
03:28 donri Like, tracking changes to arbitrary objects
03:31 newguyhere left #perl6
03:33 silent_h_ left #perl6
03:34 takadonet donri: user name is takadonet
03:34 donri re r/perl6: do whatever you feel is right to it, and please don't think of it as "donri's"
03:34 donri takadonet: already added :)
03:35 takadonet i just saw thanks
03:35 donri i checked if there was such a user and saw perl6 posts
03:35 PZt left #perl6
03:35 takadonet ya... i have lots
03:35 donri and made the reckless gamble that it might be you
03:36 PZt joined #perl6
03:40 takadonet good night everyone
03:40 takadonet left #perl6
03:55 lopaway is now known as lopnor
04:13 cls_bsd left #perl6
04:14 cls_bsd joined #perl6
04:23 Su-Shee_ joined #perl6
04:24 cosimo left #perl6
04:24 cosimo joined #perl6
04:25 donri left #perl6
04:26 Tene jnthn: I get a failure in nqp tests for t/hll/02-modules.t btw
04:26 satyavvd joined #perl6
04:27 Su-Shee left #perl6
04:30 woosley joined #perl6
04:30 diakopter niecza: rule a($b) { { say($b) } }
04:30 p6eval niecza v2-99-g1e36fcc: OUTPUT«Unhandled exception: trying to dereference null␤  at /home/p6eval/niecza/boot/lib/SAFE.setting line 377 (SAFE die @ 2)␤  at /home/p6eval/niecza/src/Metamodel.pm6 line 648 (Metamodel Unit.deref @ 2)␤  at /home/p6eval/niecza/src/NieczaPassBegin.pm6 line 276
04:30 p6eval ..(NieczaPassBegin C113_ANON…
04:30 diakopter rakudo: rule a($b) { { say($b) } }
04:31 p6eval rakudo 050ce7: OUTPUT«Useless declaration of has-scoped rule in a module; add our or my to install it in the lexpad or namespace␤»
04:31 diakopter rakudo: my rule a($b) { { say($b) } }
04:31 p6eval rakudo 050ce7:  ( no output )
04:41 arlinius joined #perl6
04:44 mfollett joined #perl6
04:44 mfollett left #perl6
04:51 gbacon left #perl6
05:02 dalek rakudo: 5959cd6 | perlpilot++ | src/Perl6/Grammar.pm:
05:02 dalek rakudo: Panic on shape declarations.
05:02 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/5959cd6c59
05:02 dalek rakudo: 10d86d7 | perlpilot++ | src/cheats/relops.pir:
05:02 dalek rakudo: Make =:= return Bool  (Fix RT #84594)
05:02 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/10d86d78d7
05:19 * diakopter ponders parametric grammar rules (other than protos)
05:26 kanishka joined #perl6
05:28 sorear diakopter: you mean like src/STD.pm6 lines 6068-6073 in niecza?
05:30 sorear I complained about not being able to write parametric rules once, TimToady responded that he'd already come up with a syntax and semantics, and amazingly it was <<1 day implementable
05:32 HarryS left #perl6
05:36 masonkramer left #perl6
05:36 masonkramer joined #perl6
05:38 diakopter sorear: cool
05:41 HarryS joined #perl6
05:48 diakopter perl6: grammar GG { say(55) }
05:48 p6eval pugs, rakudo 050ce7, niecza v2-99-g1e36fcc: OUTPUT«55␤»
05:50 sorear diakopter: S10:88 - the specs don't get much clearer than this.
05:51 diakopter true enough
05:52 baest left #perl6
05:52 diakopter perlesque: class GG { say 55; say 10 }
05:52 p6eval perlesque: OUTPUT«55␤10␤»
05:55 dalek sprixel: 53ff55a | diakopter++ | / (9 files):
05:55 dalek sprixel: grammar declarations are "live"; lots of regex progress
05:55 dalek sprixel: review: https://github.com/diakopter/sprixel/commit/53ff55aee3
05:56 dalek sprixel: 8168ef4 | diakopter++ | sprixel/src/compiler/Env.cs:
05:56 dalek sprixel: forgot to press save
05:56 dalek sprixel: review: https://github.com/diakopter/sprixel/commit/8168ef48eb
05:58 diakopter perlesque: grammar GG { say(55) }
05:58 p6eval perlesque: OUTPUT«55␤»
06:09 sftp left #perl6
06:09 clkao left #perl6
06:22 obra joined #perl6
06:41 lue left #perl6
06:48 kaare_ joined #perl6
06:56 gfldex left #perl6
06:56 gfldex joined #perl6
06:57 cjk101010 joined #perl6
06:59 JohnGalt2600 joined #perl6
07:05 gfldex left #perl6
07:05 gfldex joined #perl6
07:05 JimmyZ joined #perl6
07:14 cosimo left #perl6
07:14 hanekomu joined #perl6
07:23 clkao joined #perl6
07:25 JimmyZ left #perl6
07:26 moritz_ good morning
07:26 * moritz_ bemoans the lack of new MoR chapters
07:29 fhelmberger joined #perl6
07:36 baest joined #perl6
07:36 baest left #perl6
07:37 baest joined #perl6
07:46 dalek nqp: a007136 | moritz++ | src/HLL/Compiler.pm:
07:46 dalek nqp: rewrite parse_name in nqp
07:46 dalek nqp: review: https://github.com/perl6/nqp/commit/a00713648f
07:53 fhelmberger left #perl6
08:02 kjeldahl joined #perl6
08:04 Axius joined #perl6
08:04 Axius left #perl6
08:04 Su-Shee_ is now known as Su-Shee
08:05 Axius joined #perl6
08:06 Axius left #perl6
08:06 Axius joined #perl6
08:09 wtw joined #perl6
08:14 Mowah joined #perl6
08:21 lopnor is now known as lopaway
08:21 Solarion left #perl6
08:22 Solarion joined #perl6
08:30 yves left #perl6
08:39 noganex_ is now known as noganex
08:44 justatheory left #perl6
08:44 justatheory joined #perl6
08:49 justatheory left #perl6
09:04 am0c joined #perl6
09:07 Axius left #perl6
09:07 satyavvd left #perl6
09:17 mtk left #perl6
09:19 daxim joined #perl6
09:26 cosimo joined #perl6
09:26 mtk joined #perl6
09:30 agentzh joined #perl6
09:32 dakkar joined #perl6
09:33 envi joined #perl6
09:33 coldhead left #perl6
09:38 woosley left #perl6
09:40 perplexa joined #perl6
09:42 woosley1 joined #perl6
09:42 tadzik hello zebras
09:43 jnthn o/, tadzik
09:44 perplexa hello weasel
09:44 perplexa i think i've accidentally joined #zoo
09:44 tzhs joined #perl6
09:44 tadzik (:
09:45 jdhore They have zebras in zoos?
09:45 perplexa is perl6 supposed to be perl5's successor or to be treated as a rather new, totally incompatible language?
09:45 tadzik I think so
09:45 tadzik perplexa: yes and yes
09:45 perplexa good point jd
09:45 jdhore (I should qualify that by saying that i have not visited a zoo in ~12 years)
09:45 perplexa i think there aren't any in zoos
09:45 moritz_ jdhore: depends on the zoo, of course
09:46 tadzik I've been hacking cardinal all night long instead of sleeping, and I wasn't tired at all, not before I spent to hours on Java lectures :|
09:46 perplexa protection of species and all that stuff :)
09:46 am0c left #perl6
09:46 * perplexa should have a look at perl6 :)
09:46 perplexa still doing my stuff with p5
09:46 moritz_ perplexa: to some degree, Perl 6 is meant as a successor to most dynamic programming languages, not just Perl 5. Though of course people disagree :-)
09:47 moritz_ but it's not a successor in the sense that we'll silently roll out an upgrade so that people who had perl 5 installed suddenly have Perl 6 on their machines
09:48 perplexa yeah that's of course logical :)
09:48 perplexa i was just curious if it aims to replace perl 5 at some point
09:48 perplexa or if people are meant to keep perl5 :)
09:48 perplexa what i was trying to say was basically if it's backwards compatible
09:48 moritz_ it's not
09:49 perplexa fine, gonna have lots of fun porting my shit :)
09:49 * perplexa shudders
09:49 moritz_ but neither is python3 backwards compatible to python2, and still the developers expect people to upgrade
09:49 perplexa yeah, well
09:49 moritz_ perplexa: there's no compelling reason to port large amounts of code
09:49 perplexa there are scripts that do the porting for you
09:50 moritz_ there'll be some cross-calling solutions (a limited solution actually exists)
09:50 perplexa nah well, i consider it to learn new stuff easily
09:50 moritz_ that's a much better approach :-)
09:52 perplexa just had a loot at some rather old perl i wrote and realised that i'm a bad guy :/
09:52 perplexa look*
09:52 perplexa on the other side, my perl has always been a mess
09:52 perplexa foreach ( @{ ${ ${ $self->{modules} }{$name} }->get_facilities() } ) { @{ $self->{$_} } = map { $_ eq $name ? () : $_ } @{ $self->{$_} }; }
09:52 perplexa :/
09:53 moritz_ that map could be replaced by grep
09:53 perplexa yeah?
09:53 moritz_ but even then it's ugly
09:53 moritz_ yes, it's just   grep { $_ eq $name } @{ $self->{$_} }
09:53 perplexa yeah well that's from a module interface when modules remove all their registered entities :)
09:54 perplexa ah cool
09:54 perplexa didn't know perl had a grep command :)
09:54 perplexa for me, perl alwas WAS grep
09:54 moritz_ the grep built-in works on lists, not files
09:55 perplexa makes sense :)
09:55 woosley1 left #perl6
09:56 flussence nothing a tie()'d array can't fix :)
09:57 perplexa are there any good books yet?
09:58 moritz_ we're writing one
09:58 perplexa :D
09:58 perplexa so i guess that's a no
09:58 moritz_ you can find snapshots on https://github.com/perl6/book/downloads
09:58 moritz_ you'll be the judge if you find it good
09:59 perplexa thx :)
09:59 moritz_ if you find something that's not good, tell us on https://github.com/perl6/book/issues
09:59 am0c joined #perl6
09:59 perplexa i will
09:59 perplexa i guess any feedback is welcome
10:00 moritz_ yes
10:00 moritz_ even praise :-)
10:16 nymacro joined #perl6
10:17 agentzh left #perl6
10:29 awoodland joined #perl6
10:31 JohnGalt2600 nice... hmm.. but only 1k downloads..
10:33 TiMBuS clearly you need to link more people to it
10:34 moritz_ JohnGalt2600: if you sum up the download numbers for the previous snapshots too, you'll get quite a number
10:34 moritz_ especially considering that we haven't released it as "finished" yet
10:36 Patterner left #perl6
10:37 snarkyboojum is there a rough date for the "finished" book? Or is that a taboo subject :D
10:38 Psyche^ joined #perl6
10:38 Psyche^ is now known as Patterner
10:39 moritz_ we had a date, and we missed it
10:39 JohnGalt2600 is there any need for a finished book? updates to an online book is better than a finalized book...
10:40 moritz_ and now it seems we've lost steam
10:40 moritz_ JohnGalt2600: think s/finished/printed/
10:40 snarkyboojum moritz_: right, I thought chromatic was talking about a date a while back
10:40 moritz_ people like paper
10:40 JohnGalt2600 I cant ctrl-f paper
10:41 moritz_ but you can smash mosquitos with paper :-)
10:41 snarkyboojum I'd even love an edition of a book that is a work in progress :)
10:41 snarkyboojum I suspect most publishers wouldn't
10:41 JohnGalt2600 true heh
10:41 snarkyboojum moritz_: there are lots of uses for paper :O
10:42 moritz_ JohnGalt2600: the idea is also to sell the paper version... the profit won't be huge, but it'll be enough to pay an editor, which in turns improves the quality
10:42 snarkyboojum I've noticed masak-san committing to the book lately
10:42 moritz_ indeed
10:43 snarkyboojum masak++ then :D
10:43 cosimo left #perl6
10:43 snarkyboojum it is discussed as a roadmap item in the phasers meetings?
10:43 tornadovj joined #perl6
10:44 moritz_ we've discussed it
10:44 moritz_ but we should do it again
10:44 moritz_ btw to have even more distractions, I've applied for a Hague grant today
10:44 snarkyboojum moritz_: w00t - link?
10:44 colomon \o/
10:45 moritz_ snarkyboojum: it's not yet online, but I've nopasted it here during YAPC::EU time last year
10:45 moritz_ about exceptions and error messages
10:45 snarkyboojum ah - right - sweeet
10:46 jnthn moritz_: yay :)
10:52 Tene jnthn: I've been experimenting with implementing a ruby object model on nqp, but mostly all I get are crashes :(
10:52 Tene jnthn: https://gist.github.com/838498
10:53 barika left #perl6
10:56 * Tene afk bed
10:57 jnthn Tene: Can't look right now, but will do a bit later one. :) Sleep well.
10:57 Tene jnthn: no hurries
10:57 Tene jnthn: I expect I'm getting a lot wrong there, and missing the point in at least one place.
10:59 barika joined #perl6
11:02 TiMBuS who is responsible for IO::Socket::INET ? i think it is starting to bitrot
11:02 moritz_ all rakudo developers are responsible for it, in some sense
11:03 TiMBuS well its just, id patch it up but im not entire sure how it's supposed to work..
11:04 moritz_ "just like in perl 5", more or less
11:04 moritz_ if it has a bit more convenience here and there, that wouldn't hurt
11:04 moritz_ TiMBuS: and you can talk to tewk; he's working on non-blocking sockets in parrot, and hopefully then rakudo
11:04 moritz_ maybe he has some unification plans
11:05 TiMBuS that would be fantastic
11:07 TiMBuS the only issue i have with io::socket::inet is (aside from the fact its not working), that most of the functions create a new socket? like regardless of there being an existing one or not..
11:07 TiMBuS it should at lease close the old one =/
11:07 TiMBuS least*
11:08 moritz_ which methods are you talking about?
11:10 TiMBuS bind, open, socket?
11:10 moritz_ yep, seems like new, socket and bind all share that code
11:10 TiMBuS actually socket seems to return a parrot socket
11:10 TiMBuS thats not a good idea
11:10 moritz_ it does not
11:10 moritz_ it calls .new
11:10 moritz_ and passes a new socket to it
11:11 moritz_ anyway, it would be much nicer to have a private method that create a parrot level socket
11:11 moritz_ and call that when needed
11:11 moritz_ and don't duplicate all that PIR code all over the file
11:12 TiMBuS ah i see, didnt see the new up there.
11:13 TiMBuS but yeah it seems parrot requires you to call Socket.socket now and open is not doing that
11:13 TiMBuS resulting in my irc bot being for offline use only :<
11:14 literal left #perl6
11:16 literal joined #perl6
11:18 donri joined #perl6
11:23 tadzik eh, the slowness of neutro makes it barely possible to test and debug
11:43 hanekomu left #perl6
11:44 pmurias joined #perl6
11:59 shi joined #perl6
12:12 hanekomu joined #perl6
12:16 bluescreen joined #perl6
12:21 jaldhar left #perl6
12:21 jaldhar joined #perl6
12:23 jnthn tadzik: Do you know what bit is the slow part?
12:24 jnthn Or just everything?
12:25 tadzik jnthn: JSON, sadly
12:25 tadzik adds like 30 seconds to the runtime
12:25 jnthn Oh, wow.
12:25 jnthn How much of JSON?
12:25 jnthn (e.g. file size)
12:25 tadzik jnthn: http://feather.perl6.nl:3000/projects.json
12:26 jnthn 17 KB. Nie je velmi velke...
12:26 jnthn :/
12:27 * jnthn wonders if NQP parses it as slowly
12:27 jnthn I guess the grammar probably works as an nqp or nqp-rx one as well as a Rakudo one, mostly.
12:28 MayDaniel joined #perl6
12:28 MayDaniel left #perl6
12:28 MayDaniel joined #perl6
12:31 moritz_ and if not, it could at least be easily be made to work
12:32 jnthn Right
12:32 donri parse json with some NativeCall?
12:32 jnthn I'm curious if there's a bit difference between NQP and Rakudo there. And if so, why.
12:32 moritz_ we have a layer of etra wrappers are Regex::Match objects
12:33 tadzik I'm afraid using some C lib through NativeCall will just move the slowness to the amount of method calls needed
12:34 donri oh
12:35 donri the slowness of parsing json is just because of lack of optimization as of yet right?
12:35 donri or are grammars going to be noticably slow for larger data?
12:36 moritz_ there's no reason why they need to be slow in principle
12:37 jnthn Aye
12:37 jnthn moritz_: Would anything in them make it likely they'd be way slower?
12:38 jnthn I'm pretty sure Rakudo doesn't take 30 seconds to compile 17 KB of Perl 6 code. :)
12:38 moritz_ jnthn: you mean in the Match wrappers?
12:38 jnthn moritz_: yes
12:38 moritz_ I'm not aware of anything expensive in the initialization ...
12:39 moritz_ except maybe that we use Perl 6 arrays instead of RPAs
12:39 donri I mean some parsing techniques are slow "by design"
12:39 moritz_ (which is overkill, because we don't need no stinkin' laziness)
12:39 moritz_ donri: only backtracking in grammars is slow, but most grammars work nearly without backtracking
12:40 donri and you can often speed it up with memoization right=
12:41 moritz_ "depends"
12:42 moritz_ conceptually the fastest way is to compile it to an equivalent automaton that doesn't backtrack
12:42 moritz_ but that only works for regular languages
12:42 moritz_ and fails for things like backreferences and code assertions
12:42 moritz_ in which case you're pretty much lost
12:43 moritz_ if you do something like primality testing with regexes, you're in O(2**n) land, and no amount of caching will save you
12:43 moritz_ it's just that real parsers don't need such cracy stuff
12:44 moritz_ for example for parsing XML, you do need backreferences to test if a pair of tags match
12:44 moritz_ but if it doesn't match, you don't backtrack
12:44 moritz_ but you throw an error
12:46 moritz_ so it's more like  '<' $<open> = (\w+) '> ... '</' $<close> = (\w+) { $/.CUROSR.panic('unmatched tags') if $<open> ne $<close> } '>'
12:56 takadonet joined #perl6
12:57 takadonet morning all
12:57 tadzik morning
13:02 pmurias left #perl6
13:13 hanekomu left #perl6
13:19 JimmyZ joined #perl6
13:21 * flussence wonders if the HTML5 parsing spec is doable with just grammars...
13:21 takadonet that would be sweet
13:22 moritz_ if not, it's utterly broken
13:22 moritz_ after all you can parse nearly everything with just grammars :-)
13:23 arnsholt Indeed. And if there are any really, really tricky parts, you can insert a method to do the custom munging you need =)
13:24 * [Coke] yawns.
13:24 flussence the hard part is that HTML5's parsing has to be backward compatible with... well, the likes of geocities and worse
13:24 takadonet geocities is dead my friend :(
13:25 takadonet http://geocities.yahoo.com/index.php
13:25 JimmyZ o
13:25 flussence (they actually have </sarcasm> specced)
13:28 kanishka left #perl6
13:29 sftp joined #perl6
13:32 [Coke] left #perl6
13:35 MayDaniel left #perl6
13:36 TiMBuS left #perl6
13:39 [Coke] joined #perl6
13:39 plobsing left #perl6
13:40 plobsing joined #perl6
13:41 TiMBuS joined #perl6
13:54 fhelmberger joined #perl6
14:09 cjk101010 left #perl6
14:09 bluescreen left #perl6
14:09 cjk101010 joined #perl6
14:14 arlinius left #perl6
14:17 Axius joined #perl6
14:24 isBEKaml joined #perl6
14:30 jaldhar left #perl6
14:39 Chillance joined #perl6
14:49 PacoLinux left #perl6
15:04 shi left #perl6
15:09 kaare_ left #perl6
15:12 am0c left #perl6
15:12 risou joined #perl6
15:13 ggoebel left #perl6
15:18 wtw left #perl6
15:22 ggoebel joined #perl6
15:24 ggoebel left #perl6
15:24 orafu joined #perl6
15:29 am0c joined #perl6
15:31 moritz_ niecza: my $x = 5; say ~m/\d/
15:31 p6eval niecza v2-99-g1e36fcc: OUTPUT«Bool::False␤»
15:31 moritz_ perl6: my $x = 5; say ~m/\d/
15:31 p6eval rakudo 10d86d: OUTPUT«Method 'match' not found for invocant of class ''␤  in main program body at line 22:/tmp/x2mm8F9oWV␤»
15:31 p6eval ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
15:31 p6eval ..niecza v2-99-g1e36fcc: OUTPUT«Bool::False␤»
15:32 moritz_ perl6: $_ = 5; say ~m/\d/
15:32 p6eval niecza v2-99-g1e36fcc: OUTPUT«Bool::True␤»
15:32 p6eval ..rakudo 10d86d: OUTPUT«5␤»
15:32 p6eval ..pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.16/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
15:32 moritz_ sorear: why does prefix ~ boolifies?
15:33 spq joined #perl6
15:33 sorear moritz_: the boolification happens in m//
15:34 Axius left #perl6
15:34 moritz_ why?
15:34 sorear moritz_: I wanted if m// {} and if $str ~~ m// {} to both work, so m// had to return an object $x such that $x.ACCEPTS(anything) = $x
15:34 sorear Bool was the obvious choice
15:35 sorear s/// returns Bool for the same reason
15:35 moritz_ sorear: the specced choice is Match, and instead Match.ACCEPTS is a bit... weird
15:36 isBEKaml niecza: $_ = 5; say m/\d/; # prefix ~ is superfluous?
15:36 p6eval niecza v2-99-g1e36fcc: OUTPUT«Bool::True␤»
15:36 Axius joined #perl6
15:36 moritz_ isBEKaml: yes, it is
15:36 moritz_ isBEKaml: but since niecza's Match objects behaved unexpected in list context in the past, I'm careful
15:37 isBEKaml rakudo: $_ = 5; say m/\d/;
15:37 p6eval rakudo 10d86d: OUTPUT«5␤»
15:38 isBEKaml moritz_: unexpected behaviour in list context with niecza. I'm curious, how so?
15:38 sorear Match objects return a their positional captures in list context
15:38 moritz_ isBEKaml: Match.list would return a list of all captures, so in the case above it would return the empty list. So say() would print nothing
15:39 sorear in order to stop suprising moritz, I added a special case for Match objects with no positional captures
15:39 * moritz_ suddenly feels important :-)
15:39 isBEKaml (sorear,moritz_)++
15:39 isBEKaml :-)
15:40 isBEKaml well, I was wondering you two were speaking different scenarios. sorear++ nicely backed it up with a special case. :)
15:41 gbacon joined #perl6
15:42 colomon speaking of what one might do with grammars -- I was just thinking the other day that we ought to get a C++ parsing grammar module up and running.  That might constitute a pretty good killer app for p6...
15:42 clkao_ joined #perl6
15:42 clkao_ left #perl6
15:43 JimmyZ E:\rakudo>perl6 ..\roast\S02-builtin_data_types\hash.t
15:43 JimmyZ ===SORRY!===
15:43 JimmyZ Unicode rindex not implemented
15:43 JimmyZ :(
15:43 isBEKaml colomon: of all the languages in the world, why C++? (just kiddin') :-)
15:43 moritz_ ouch
15:43 colomon isBEKaml: because parsing C++ is notoriously hard.  :)
15:43 PerlJam isBEKaml: that's exactly what I was thinking  ;)
15:44 mux s/hard/messy/ maybe? :-)
15:44 PerlJam parameterized types require an indeterminant amount of look-ahead IIRC
15:44 * moritz_ knew immediately what colomon++ meant
15:45 bluescreen joined #perl6
15:45 PerlJam "Only Perl can parse C++"  ??
15:45 PerlJam :)
15:45 sorear isBEKaml: there are about 3 C++ parsers in existance today.  2 of them are expensive proprietary libraries and 1 of them was deliberately designed to be difficult to reuse.
15:46 moritz_ sorear: are you talking about g++? :-)
15:46 isBEKaml sorear: are you talking about g++?
15:46 sorear although clang++ is trying to change this
15:46 isBEKaml ah, moritz_ ! :o)
15:47 isBEKaml I have heard good things about clang, but never got around to trying it out.
15:47 isBEKaml PerlJam: I'd say only Perl6 can run C++! /more awesomeness/ !
15:48 isBEKaml ( parse != run ) but heck, why not? :)
15:48 PerlJam There's a joke in there somewhere about C++ being slow ...  I can just feel it!
15:48 PerlJam ;)
15:50 colomon afk # cross-country skiing!
15:51 isBEKaml I'm not very strong willed to actually program in C++. I remember forgetting to insert destructors in classes and quickly ran into memory issues. (that was when turbo c++  was all the rage)
15:51 PerlJam wow.
15:51 * PerlJam hasn't heard mention of turbo c++ in over 15 years, easy
15:51 cjk101010 left #perl6
15:53 isBEKaml I can now safely say I don't know C++. :)
15:54 slavik1 isBEKaml: nobody 'knows' C++
15:54 moritz_ just like with perl :-)
15:54 slavik1 moritz_: yes, but some of us can claim to come close
15:54 isBEKaml slavik1: I think I know what you're referring to. Even the author himself confessed as much in his programming book. :)
15:55 slavik1 I am sure TimToady can claim to come close to knowing something about Perl ...
15:55 moritz_ did you know that in perl 5, a - followed by an identifier is a valid string literal, even under 'use strict;'?
15:55 PerlJam "knowing perl" is really having a good base of meta-knowledge (i.e. know where to look to find out something)
15:55 justatheory joined #perl6
15:55 slavik1 as in my $a = -blah; ?
15:55 moritz_ slavik1: correct
15:55 huf yeah why is that anyway?
15:55 slavik1 PerlJam: but that is basic "having a brain" knowledge
15:56 moritz_ huf: there's somebody in this channel you could ask...
15:56 isBEKaml speaking of meta knowledge, anybody tried out magpie? the author says that's his USP in magpie( as of now)
15:56 jtbraun1 joined #perl6
15:56 huf moritz_: i'm sure i'd get a vague pun as an answer ;)
15:56 moritz_ oh, and -"foo" returns 0 (plus warning), but -"-foo" returns "+foo"
15:56 moritz_ anybody wants to say "huh"? :-)
15:57 isBEKaml http://magpie.stuffwithstuff.com
15:57 am0c left #perl6
15:57 PerlJam huf: I think the answer is so that my %hash = (  -foo => 1 );  would work properly.
15:57 PerlJam But don't really remember why
15:57 huf PerlJam: but that already works properly due to =?
15:57 huf =>
15:58 PerlJam like I said.  I don't really remember why
15:59 PerlJam but!  I'm sure the answer is buried in the perl documentation somewhere ;0)
15:59 PerlJam er, ;-)
15:59 kjeldahl left #perl6
15:59 huf :D
16:00 moritz_ perlop (not perlsyn, mind you) explain what it does, but not why
16:02 moritz_ I collect weird Perl 5 things on my perlmonks homenode
16:02 moritz_ for example I was also quite surprised that you can have whitespace afters sigils in p5
16:02 snearch joined #perl6
16:02 moritz_ my $ x = 3;
16:04 PerlJam I still think -blah was so that hash keys could be specified like  ( -foo => 1 )      => stringifies its LHS, but unary minus would have already mangled it if it didn't work the way it does.
16:06 PerlJam moritz_: do you like "foo" =~ s xooxaax;   # too ?  :)
16:06 jtbraun1 left #perl6
16:07 moritz_ PerlJam: I find that hilarious too, but not sufficiently weird for my collection
16:07 isBEKaml hilarious!
16:09 PerlJam moritz_: what about this?  echo "foo" | perl -nE '} continue { say "hi"'
16:09 am0c joined #perl6
16:10 isBEKaml I don't regularly follow perlmonks. But on occasional visits to the site, I've found it to be down or just plain unresponsive  (probably down to maintenance windows or mostly due to my timezones)
16:10 PerlJam Or any variation where there are apparently unmatched curly braces on the command line
16:10 dalek roast: f47e392 | jimmy++ | S02-builtin_data_types/hash.t:
16:10 dalek roast: added test for RT #61412
16:10 dalek roast: review: https://github.com/perl6/roast/commit/f47e392c19
16:11 moritz_ PerlJam: nice too, but I've known this one for a long time, so it wasn't really surprising
16:11 * JimmyZ couldn't make spectest on windows :(
16:11 moritz_ JimmyZ: what stopped you?
16:11 PerlJam moritz_: There's lots of things that I know about Perl that are no longer surprising, but would certainly cause surprise in others :)
16:11 JimmyZ moritz_: I guess 'Unicode rindex not implemented'
16:12 PerlJam Perl is full of surprises if you'd just keep looking for them.
16:12 moritz_ JimmyZ: does that happen for all test files?
16:12 obra left #perl6
16:13 JimmyZ moritz_: t\spec\S02-names\identifier.t ...................... Dubious, test returned 1 (wstat 256, 0x100)
16:13 JimmyZ moritz_: all the same
16:13 moritz_ JimmyZ: that's... ouch. Do you have icu installed?
16:14 JimmyZ moritz_: nope.
16:14 JimmyZ icu blocked all test running?
16:14 moritz_ it shouldn't
16:15 moritz_ I'm just looking for possible explanations
16:15 isBEKaml moritz_: shouldn't it be that all unicode tests run only when icu is installed? ( I vaguely remember having a switch like that)
16:15 moritz_ isBEKaml: it should, yes
16:15 isBEKaml so I find it confusing that JimmyZ says that it runs on his non-icu machine. :(
16:16 Patterner left #perl6
16:16 isBEKaml or are they just part of a separate test file?
16:17 JimmyZ I guess the new parrot string refactor breaked it.
16:17 bluescreen left #perl6
16:17 moritz_ isBEKaml: he says it doesn't run on his non-icu machine
16:17 JimmyZ 'Unicode rindex not implemented' is from there.
16:18 JimmyZ moritz_: RT #61412 is closable now?
16:18 Psyche^ joined #perl6
16:18 Psyche^ is now known as Patterner
16:18 isBEKaml moritz_: I'm just asking if that should be shown at all. If that's specific to unicode, that test would have been skipped.
16:19 moritz_ JimmyZ: yes
16:20 hanekomu joined #perl6
16:20 JimmyZ moritz_: you have the power. :)
16:22 moritz_ closed.
16:22 moritz_ JimmyZ++
16:22 JimmyZ rakudo: my %h=<a b c> Z 1,2,3; for %h { .say }
16:22 p6eval rakudo 10d86d: OUTPUT«a 1␤b     2␤c     3␤»
16:23 Mowah left #perl6
16:23 MayDaniel joined #perl6
16:24 baest away DND - afk
16:24 baest whoops
16:24 isBEKaml rakudo: my $a=-blah; say $a; # :o)
16:24 p6eval rakudo 10d86d: OUTPUT«Could not find sub &blah␤  in main program body at line 22:/tmp/iMq80XjFbG␤»
16:25 risou left #perl6
16:25 isBEKaml baest: that's okay. I occasionally do :wq anyway. ;)
16:25 isBEKaml like
16:25 isBEKaml :wq
16:25 * hugme hugs isBEKaml, good vi(m) user!
16:27 diakopter :wq!
16:27 * hugme hugs diakopter, good vi(m) user!
16:29 hanekomu left #perl6
16:29 [Coke] :s/hugme//g
16:30 diakopter heh
16:31 isBEKaml diakopter: you must be pretty used to savepoints very much. ;)
16:31 isBEKaml I just can't stop myself from hitting ctrl+S everytime when on windows.
16:34 [Coke] ^S works fine in gvim!
16:35 nymacro left #perl6
16:35 Axius left #perl6
16:36 ggoebel joined #perl6
16:37 isBEKaml "It's a trap!" :D
16:38 tzhs left #perl6
16:42 JimmyZ left #perl6
16:46 JimmyZ joined #perl6
16:46 bluescreen joined #perl6
16:48 ab5tract joined #perl6
16:50 donri evim
16:51 JimmyZ left #perl6
16:53 * tadzik is disappointed for the movement on perl6-users@ not being about Perl6::Critic :)
16:55 donri :q!
16:55 * hugme hugs donri, good vi(m) user!
16:55 donri I'd say that's a bad vim user.
16:55 alester joined #perl6
16:59 sbp ZZ
17:05 mtk left #perl6
17:06 PacoLinux joined #perl6
17:08 plobsing left #perl6
17:08 plobsing joined #perl6
17:15 mtk joined #perl6
17:16 shi joined #perl6
17:16 ggoebel left #perl6
17:18 isBEKaml left #perl6
17:20 bluescreen left #perl6
17:25 allbery_b "perl6 critic" still means nitpicking the spec :)
17:32 jtbraun1 joined #perl6
17:35 bluescreen joined #perl6
17:36 dwhipp joined #perl6
17:36 masonkramer left #perl6
17:36 masonkramer joined #perl6
17:49 envi left #perl6
17:50 cdarroch joined #perl6
17:50 cdarroch left #perl6
17:50 cdarroch joined #perl6
17:59 mberends joined #perl6
18:01 awoodland left #perl6
18:09 mkramer1 joined #perl6
18:11 donri What does := really do/mean?
18:12 donri Seems necessary for recursively defined lists
18:12 arnsholt Bind, instead of assign
18:13 diakopter it connects all the Midi-chlorians everywhere
18:13 arnsholt (By-reference instead of by-value is an ok first approximation I think)
18:13 arnsholt But I don't quite grok the finer points of the distinction yet. Not enough Lisp experience =)
18:16 dakkar left #perl6
18:22 donri http://paste.pocoo.org/show/342907 why syntax error?
18:23 donri "missing block"
18:24 donri seems to be the newline before given
18:31 ColloquyUser_ joined #perl6
18:32 dalek sprixel: 4de54aa | diakopter++ | / (9 files):
18:32 dalek sprixel: grammars have rules that work as their methods
18:32 dalek sprixel: review: https://github.com/diakopter/sprixel/commit/4de54aa542
18:34 masak joined #perl6
18:34 masak evening, zebras. of all kinds and stripings.
18:36 donri rakudo: say (1 .. ceiling sqrt $_ ==> grep $_ %% * ==> map { $^a, $_ div $^a }).perl given 13195;
18:36 p6eval rakudo 10d86d: OUTPUT«((1, 13195), (5, 2639), (7, 1885), (13, 1015), (29, 455), (35, 377), (65, 203), (91, 145))␤»
18:37 donri rakudo: my @factors = 1 .. ceiling sqrt $_ ==> grep $_ %% * ==> map { $^a, $_ div $^a } given 13195; say @factors.perl
18:37 p6eval rakudo 10d86d: OUTPUT«[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
18:37 p6eval ..72, 73…
18:37 donri what's up with this?
18:37 donri is it because of the @list-context somehow
18:39 daxim left #perl6
18:42 jnthn god kvell, masak o/
18:43 mkramer1 left #perl6
18:44 mkramer joined #perl6
18:50 masak what is that? Danish? :P
18:51 masak phenny: "god kvell, masak o/"?
18:51 phenny masak: "good evening, Masaka o /" (no to en, translate.google.com)
18:52 masak apparently, Google Translate is not well-versed in the International Waving Sign Language.
18:52 colomon #phasers in 8?
18:52 masak ooh!
18:53 jnthn masak: Generic Scandinavian. :P
18:53 masak ;)
18:57 orafu left #perl6
18:57 ColloquyUser_ left #perl6
19:01 bluescreen left #perl6
19:01 kaare_ joined #perl6
19:05 dwhipp I was wondering if anyone had time to look at my patch from last week (rt #84362), which added higher-arity limit functions to sequences
19:05 ColloquyUser joined #perl6
19:07 getgrnam left #perl6
19:08 silent_h_ joined #perl6
19:12 jevin left #perl6
19:13 jevin joined #perl6
19:15 MayDaniel left #perl6
19:16 alester left #perl6
19:17 masak dwhipp: I saw it flash by, and found it a good idea. haven't reviewed it, though.
19:17 kanishka joined #perl6
19:18 dwhipp OK, thanks
19:19 alester joined #perl6
19:19 dalek sprixel: 1b6ea71 | diakopter++ | sprixel/src/ (4 files):
19:19 dalek sprixel: <.rulename> works
19:19 dalek sprixel: review: https://github.com/diakopter/sprixel/commit/1b6ea715c1
19:21 pmichaud good afternoon, #perl6
19:21 jnthn pmichaud! \o/
19:22 ymasory left #perl6
19:23 jnthn brb
19:26 molaf_ left #perl6
19:28 impious joined #perl6
19:30 impious left #perl6
19:35 silent_h_ left #perl6
19:39 Axius joined #perl6
19:41 ColloquyUser_ joined #perl6
19:41 ColloquyUser left #perl6
19:41 ColloquyUser_ is now known as ColloquyUser
19:44 ColloquyUser left #perl6
19:45 ColloquyUser joined #perl6
19:47 stepnem left #perl6
19:47 _sri left #perl6
19:48 _sri joined #perl6
19:49 stepnem joined #perl6
19:55 Vlavv left #perl6
19:56 pnu left #perl6
19:56 pnu joined #perl6
19:57 * masak liked http://blogs.perl.org/users/jeffrey_kegler/2011/02/perl-and-parsing-7-do-list-operators-have-leftright-precedence.html
19:58 masak I wonder where the previous six "Perl and Parsing" posts are at, though...
19:58 _sri left #perl6
19:58 newbieUno joined #perl6
20:00 newbieUno rakudo: say "monty";
20:00 p6eval rakudo 10d86d: OUTPUT«monty␤»
20:00 _sri joined #perl6
20:01 newbieUno how can i make my perl6 tests not visible to others here? I wish to try it a little before i install.
20:01 masak newbieUno: /msg p6eval rakudo: say "monty";
20:02 cognominal joined #perl6
20:02 masak newbieUno: there's also try.rakudo.org
20:02 newbieUno try.rakudo.org sounds nice i will test
20:02 noganex left #perl6
20:03 noganex joined #perl6
20:03 barika left #perl6
20:04 newbieUno masak: how can i know what build i am testing in try.rakudo?
20:04 barika joined #perl6
20:04 masak probably the same as here; bleeding edge.
20:04 masak or as near as not to matter.
20:05 donri why doesn't take default to taking $_
20:06 masak donri: because in Perl 6, no function defaults to taking $_.
20:06 pmichaud I wonder if .&take works, though :-)
20:06 donri then I want an Any.take ;)
20:06 masak pmichaud: it does
20:06 masak donri: me too :)
20:07 masak Perl 6 tries to minimize the amount of things you have to learn by rote. such as which functions default to $_ and which don't.
20:07 Vlavv joined #perl6
20:08 donri and $x.&foo == foo($x) ?
20:09 masak yes.
20:09 masak we sort of... discovered that half a year or so ago :P
20:09 donri cool. still, simply .take would be nice :)
20:09 masak yes :)
20:10 donri $_ is neat but ugly in itself :D
20:10 donri which also makes me abuse the shit out of Whatever
20:10 donri using when instead of if, for example
20:10 pmichaud as long as you're aware that 'when' and 'if' are different :-)
20:10 donri that's the point of using when
20:11 newbieUno left #perl6
20:12 arnsholt when $x is roughly the same as if $_ ~~ $x, IIRC
20:12 arnsholt (Modulo given and such)
20:12 pmichaud except for the implied break out of the enclosing block.  :-)
20:12 donri why does "do for" work similar to gather/take?
20:13 stkowski joined #perl6
20:16 spq left #perl6
20:17 masak pmichaud: ...and the implied break is in effect for the block-style 'when' but not for the statement-modifier 'when'... ;)
20:18 masak implied 'succeed', I should say.
20:19 donaldh joined #perl6
20:21 mberends left #perl6
20:24 fhelmberger left #perl6
20:26 tylercurtis joined #perl6
20:28 ab5tract left #perl6
20:29 Tedd1 left #perl6
20:33 dalek sprixel: b8f0c11 | diakopter++ | / (5 files):
20:33 dalek sprixel: debug/cleanup
20:33 dalek sprixel: review: https://github.com/diakopter/sprixel/commit/b8f0c11f24
20:37 dual left #perl6
20:38 masak I have a kvetch about S09.
20:39 masak one has to read all the way to "Multidimensional arrays" to be certain that something like 'my @a[-5 .. 15];' is a valid declaration.
20:39 masak but I don't think it's a stretch at all to assume that it is.
20:40 masak given that, (it is my contention that) it's wrong of S09 to say that * means 'length of array'.
20:40 masak S09:660
20:40 masak if it is, then it won't be possible to index easily from the end of non-0-based arrays.
20:41 alester left #perl6
20:41 jevin left #perl6
20:41 mkramer left #perl6
20:41 TiMBuS left #perl6
20:41 zykes- left #perl6
20:41 szabgab left #perl6
20:41 ponbiki left #perl6
20:41 nadim left #perl6
20:41 pjcj left #perl6
20:41 Lorn left #perl6
20:41 betterworld left #perl6
20:41 charsbr__ left #perl6
20:41 cookys_ left #perl6
20:41 pochi left #perl6
20:41 dsp_ left #perl6
20:41 pmichaud left #perl6
20:41 tty234 left #perl6
20:41 dukeleto left #perl6
20:41 szbalint left #perl6
20:41 Grimnir_ left #perl6
20:41 Juerd left #perl6
20:41 Util left #perl6
20:41 bbkr left #perl6
20:41 rblackwe left #perl6
20:41 breinbaas left #perl6
20:43 JohnGalt2600 left #perl6
20:44 snearch left #perl6
20:44 donri take * taking $_ would also look better, but duno if that's bad for some reason
20:45 JohnGalt2600 joined #perl6
20:46 dual joined #perl6
20:49 cognominal left #perl6
20:51 Vlavv left #perl6
20:52 arnsholt Indeed. It should probably mean "last index of array", or perhaps "last index of array+1" to keep [*-1] meaning the same
20:52 masak donri: term:<*> generally either means "the option I want" or "make a closure around me".
20:53 masak donri: though the former might fit, it seems to me to be an unnecessary kind of mangic, just to get rid of $_
20:53 masak arnsholt: yes, I would suggest the latter.
20:54 flussence left #perl6
20:55 donri masak: doesn't 'when' do that exactly though?
20:55 flussence joined #perl6
20:55 donri "when * > 5" same as "when $_ > 5"
20:55 donri or is it actually "when $_ ~~ -> $x { $x > 5 }"
20:55 masak technically, it means 'when { $_ > 5 }'
20:55 masak that's the "create closure here" part.
20:55 donri yea
20:56 masak it's more like 'if $_ ~~ -> $x { $x > 5 }', but yes.
20:56 tty234 joined #perl6
20:57 masak plus the implicit 'succeed' semantics pmichaud was talking about ;)
20:57 tylercurtis It does have the same effect as "when $_ > 5", though. (Unless Bool.ACCEPTS's weirdness has changed since last I've heard).
20:57 Tene donri: for is the same as map, except for is a statement and map is just a function (or method)
20:57 masak tylercurtis: right.
20:58 masak tylercurtis: but the point here was whether $_ was synonymous to *. it isn't.
20:58 donri Tene: but isn't 'do' do-once?
20:58 Tene donri: yes, and the thing you're doing once is the for loop
20:58 donri and why does it "take" the return of each iteration
20:58 moritz_ because it's more useful that way
20:59 Tene 13:57 < Tene> donri: for is the same as map
20:59 donri oh i get it, thanks
20:59 Tene donri: the return value of for is a list of the return values of each iteration
20:59 Vlavv joined #perl6
20:59 bluescreen joined #perl6
20:59 Tene donri: incidentally, the other answer is that map is implemented with gather/take
21:00 alester joined #perl6
21:00 jevin joined #perl6
21:00 mkramer joined #perl6
21:00 zykes- joined #perl6
21:00 szabgab joined #perl6
21:00 ponbiki joined #perl6
21:00 nadim joined #perl6
21:00 pjcj joined #perl6
21:00 Lorn joined #perl6
21:00 betterworld joined #perl6
21:00 charsbr__ joined #perl6
21:00 cookys_ joined #perl6
21:00 pochi joined #perl6
21:00 dsp_ joined #perl6
21:00 pmichaud joined #perl6
21:00 dukeleto joined #perl6
21:00 szbalint joined #perl6
21:00 Grimnir_ joined #perl6
21:00 Util joined #perl6
21:00 Juerd joined #perl6
21:00 bbkr joined #perl6
21:00 rblackwe joined #perl6
21:00 breinbaas joined #perl6
21:00 mkramer1 joined #perl6
21:00 Rotwang joined #perl6
21:00 Axius left #perl6
21:00 masak though 'for' in void context doesn't need to capture its results.
21:00 Axius__ joined #perl6
21:00 Rotwang left #perl6
21:00 Rotwang joined #perl6
21:00 donri left #perl6
21:00 donri joined #perl6
21:01 masak or is indistinguishable from something that is ;)
21:01 * masak puts down the hair-splitter
21:01 _twitch left #perl6
21:02 mkramer left #perl6
21:04 estrabd left #perl6
21:05 phenny left #perl6
21:05 meraxes left #perl6
21:05 takesako left #perl6
21:05 yahooooo left #perl6
21:05 Intensity left #perl6
21:05 nrr left #perl6
21:05 mux left #perl6
21:05 aloha left #perl6
21:05 kolibrie left #perl6
21:05 cibs left #perl6
21:05 JohnGalt2600 left #perl6
21:05 barika left #perl6
21:05 ruoso left #perl6
21:05 rbuels left #perl6
21:05 chitragupt left #perl6
21:05 simcop2387 left #perl6
21:05 tewk left #perl6
21:05 nothingmuch_ left #perl6
21:05 jql left #perl6
21:05 hatseflats left #perl6
21:05 diakopter left #perl6
21:05 allbery_b left #perl6
21:05 apejens left #perl6
21:05 knewt2 left #perl6
21:05 silug left #perl6
21:05 Helios- left #perl6
21:05 moritz_ left #perl6
21:05 cxreg left #perl6
21:05 rokoteko left #perl6
21:05 lestrrat left #perl6
21:05 broquaint left #perl6
21:05 woldrich left #perl6
21:05 hcchien left #perl6
21:05 dwhipp left #perl6
21:05 mkramer1 left #perl6
21:05 Chillance left #perl6
21:05 Solarion left #perl6
21:05 VXZ left #perl6
21:05 dju__ left #perl6
21:05 jjore left #perl6
21:05 Rotwang left #perl6
21:05 alester left #perl6
21:05 jevin left #perl6
21:05 zykes- left #perl6
21:05 szabgab left #perl6
21:05 ponbiki left #perl6
21:05 nadim left #perl6
21:05 pjcj left #perl6
21:05 Lorn left #perl6
21:05 betterworld left #perl6
21:05 charsbr__ left #perl6
21:05 cookys_ left #perl6
21:05 pochi left #perl6
21:05 dsp_ left #perl6
21:05 pmichaud left #perl6
21:05 dukeleto left #perl6
21:05 szbalint left #perl6
21:05 Grimnir_ left #perl6
21:05 Juerd left #perl6
21:05 Util left #perl6
21:05 bbkr left #perl6
21:05 rblackwe left #perl6
21:05 breinbaas left #perl6
21:05 skangas left #perl6
21:05 tylercurtis left #perl6
21:05 takadonet left #perl6
21:05 HarryS left #perl6
21:05 awwaiid left #perl6
21:05 thepler left #perl6
21:05 lamstyle left #perl6
21:05 c1sung left #perl6
21:05 shortcircuit left #perl6
21:05 cotto_work left #perl6
21:05 lopaway left #perl6
21:05 colomon left #perl6
21:05 shabble left #perl6
21:05 Eevee left #perl6
21:05 shachaf left #perl6
21:05 vert2 left #perl6
21:05 edenc left #perl6
21:05 hillu_ left #perl6
21:05 krunen left #perl6
21:05 aindilis left #perl6
21:05 ilogger2 left #perl6
21:05 sjn left #perl6
21:05 IRSeekBot left #perl6
21:05 ingy left #perl6
21:05 Woody4286 left #perl6
21:05 pumphaus left #perl6
21:05 dual left #perl6
21:05 stepnem left #perl6
21:05 clkao left #perl6
21:05 domidumont left #perl6
21:05 flatwhatson left #perl6
21:05 perigrin left #perl6
21:05 fith left #perl6
21:05 jasonmay left #perl6
21:05 starcoder2 left #perl6
21:05 mj41 left #perl6
21:05 Khisanth left #perl6
21:05 zb left #perl6
21:05 gabiruh left #perl6
21:05 BinGOs left #perl6
21:05 PerlJam left #perl6
21:05 Maddingue left #perl6
21:05 necrodearia left #perl6
21:05 uniejo left #perl6
21:05 ascent_ left #perl6
21:05 TimToady left #perl6
21:05 nsh- left #perl6
21:05 jpr5 left #perl6
21:05 krakan_ left #perl6
21:05 revdiablo left #perl6
21:05 tty234 left #perl6
21:05 am0c left #perl6
21:05 xinming left #perl6
21:05 eternaleye left #perl6
21:05 sbp left #perl6
21:05 ribasushi left #perl6
21:05 kanishka left #perl6
21:05 cdarroch left #perl6
21:05 gfldex left #perl6
21:05 cls_bsd left #perl6
21:05 jrockway left #perl6
21:05 araujo left #perl6
21:05 cotto left #perl6
21:05 zostay left #perl6
21:05 bartolin left #perl6
21:05 DarthGandalf left #perl6
21:05 16WAAGL8K left #perl6
21:05 mathw left #perl6
21:05 flussence left #perl6
21:05 masak left #perl6
21:05 justatheory left #perl6
21:05 [Coke] left #perl6
21:05 hudnix left #perl6
21:05 wooden left #perl6
21:05 jedai_ left #perl6
21:05 ddima left #perl6
21:05 huf left #perl6
21:05 LoRe left #perl6
21:05 llabthgie left #perl6
21:05 Grrrr left #perl6
21:05 Bucciarati left #perl6
21:05 frooh left #perl6
21:05 donaldh left #perl6
21:05 ColloquyUser left #perl6
21:05 kaare_ left #perl6
21:05 masonkramer left #perl6
21:05 shi left #perl6
21:05 mtk left #perl6
21:05 plobsing left #perl6
21:05 PacoLinux left #perl6
21:05 Patterner left #perl6
21:05 tornadovj left #perl6
21:05 Kovensky left #perl6
21:05 gimix left #perl6
21:05 bacek left #perl6
21:05 dalek left #perl6
21:05 JodaZ left #perl6
21:05 hugme left #perl6
21:05 p6eval left #perl6
21:05 jdhore left #perl6
21:05 larsen_ left #perl6
21:05 Tene left #perl6
21:05 frodwith left #perl6
21:05 avuserow left #perl6
21:05 Raynes left #perl6
21:05 cjk101013 left #perl6
21:05 [particle] left #perl6
21:05 sjohnson left #perl6
21:05 tadzik left #perl6
21:05 patch left #perl6
21:05 mdxi left #perl6
21:05 Axius__ left #perl6
21:05 _sri left #perl6
21:05 literal left #perl6
21:05 baest left #perl6
21:05 nsh_ left #perl6
21:05 kcwu left #perl6
21:05 sunnavy left #perl6
21:05 arnsholt left #perl6
21:05 sorear left #perl6
21:05 pnu left #perl6
21:05 PZt left #perl6
21:05 wolverian left #perl6
21:05 f00li5h left #perl6
21:05 tomaw left #perl6
21:05 Alias left #perl6
21:05 kfo left #perl6
21:05 jnthn left #perl6
21:05 felipe left #perl6
21:05 slavik1 left #perl6
21:05 Gothmog_ left #perl6
21:05 frettled_ left #perl6
21:05 ashleydev left #perl6
21:05 perplexa left #perl6
21:05 meteorjay left #perl6
21:05 snarkyboojum left #perl6
21:05 nrr joined #perl6
21:05 cibs joined #perl6
21:05 bluescreen left #perl6
21:06 kolibrie joined #perl6
21:06 aloha joined #perl6
21:06 meraxes joined #perl6
21:06 knewt2 joined #perl6
21:06 silug joined #perl6
21:06 Helios- joined #perl6
21:06 woldrich joined #perl6
21:06 cxreg joined #perl6
21:06 moritz_ joined #perl6
21:06 lestrrat joined #perl6
21:06 rokoteko joined #perl6
21:06 broquaint joined #perl6
21:06 hcchien joined #perl6
21:07 takesako joined #perl6
21:07 mux joined #perl6
21:07 Axius__ joined #perl6
21:07 Rotwang joined #perl6
21:07 mkramer1 joined #perl6
21:07 breinbaas joined #perl6
21:07 rblackwe joined #perl6
21:07 bbkr joined #perl6
21:07 Juerd joined #perl6
21:07 Util joined #perl6
21:07 Grimnir_ joined #perl6
21:07 szbalint joined #perl6
21:07 dukeleto joined #perl6
21:07 pmichaud joined #perl6
21:07 dsp_ joined #perl6
21:07 pochi joined #perl6
21:07 cookys_ joined #perl6
21:07 charsbr__ joined #perl6
21:07 betterworld joined #perl6
21:07 Lorn joined #perl6
21:07 pjcj joined #perl6
21:07 nadim joined #perl6
21:07 ponbiki joined #perl6
21:07 szabgab joined #perl6
21:07 zykes- joined #perl6
21:07 jevin joined #perl6
21:07 alester joined #perl6
21:07 tty234 joined #perl6
21:07 flussence joined #perl6
21:07 dual joined #perl6
21:07 tylercurtis joined #perl6
21:07 donaldh joined #perl6
21:07 _sri joined #perl6
21:07 pnu joined #perl6
21:07 stepnem joined #perl6
21:07 ColloquyUser joined #perl6
21:07 kanishka joined #perl6
21:07 kaare_ joined #perl6
21:07 masak joined #perl6
21:07 cdarroch joined #perl6
21:07 masonkramer joined #perl6
21:07 dwhipp joined #perl6
21:07 shi joined #perl6
21:07 mtk joined #perl6
21:07 plobsing joined #perl6
21:07 PacoLinux joined #perl6
21:07 Patterner joined #perl6
21:07 am0c joined #perl6
21:07 justatheory joined #perl6
21:07 Chillance joined #perl6
21:07 [Coke] joined #perl6
21:07 takadonet joined #perl6
21:07 literal joined #perl6
21:07 tornadovj joined #perl6
21:07 perplexa joined #perl6
21:07 Solarion joined #perl6
21:07 baest joined #perl6
21:07 clkao joined #perl6
21:07 gfldex joined #perl6
21:07 HarryS joined #perl6
21:07 cls_bsd joined #perl6
21:07 PZt joined #perl6
21:07 VXZ joined #perl6
21:07 hudnix joined #perl6
21:07 wolverian joined #perl6
21:07 Kovensky joined #perl6
21:07 awwaiid joined #perl6
21:07 thepler joined #perl6
21:07 lamstyle joined #perl6
21:07 xinming joined #perl6
21:07 gimix joined #perl6
21:07 domidumont joined #perl6
21:07 f00li5h joined #perl6
21:07 flatwhatson joined #perl6
21:07 c1sung joined #perl6
21:07 dju__ joined #perl6
21:07 bacek joined #perl6
21:07 jjore joined #perl6
21:07 tomaw joined #perl6
21:07 dalek joined #perl6
21:07 JodaZ joined #perl6
21:07 Alias joined #perl6
21:07 hugme joined #perl6
21:07 jrockway joined #perl6
21:07 kfo joined #perl6
21:07 p6eval joined #perl6
21:07 eternaleye joined #perl6
21:07 jdhore joined #perl6
21:07 larsen_ joined #perl6
21:07 jnthn joined #perl6
21:07 Tene joined #perl6
21:07 araujo joined #perl6
21:07 sbp joined #perl6
21:07 nsh_ joined #perl6
21:07 perigrin joined #perl6
21:07 frodwith joined #perl6
21:07 shortcircuit joined #perl6
21:07 cotto_work joined #perl6
21:07 lopaway joined #perl6
21:07 skangas joined #perl6
21:07 cotto joined #perl6
21:07 avuserow joined #perl6
21:07 felipe joined #perl6
21:07 kcwu joined #perl6
21:07 wooden joined #perl6
21:07 fith joined #perl6
21:07 jasonmay joined #perl6
21:07 Raynes joined #perl6
21:07 sunnavy joined #perl6
21:07 colomon joined #perl6
21:07 zostay joined #perl6
21:07 slavik1 joined #perl6
21:07 cjk101013 joined #perl6
21:07 Gothmog_ joined #perl6
21:07 jedai_ joined #perl6
21:07 arnsholt joined #perl6
21:07 starcoder2 joined #perl6
21:07 mj41 joined #perl6
21:07 Khisanth joined #perl6
21:07 shabble joined #perl6
21:07 Eevee joined #perl6
21:07 frettled_ joined #perl6
21:07 ddima joined #perl6
21:07 shachaf joined #perl6
21:07 bartolin joined #perl6
21:07 vert2 joined #perl6
21:07 edenc joined #perl6
21:07 hillu_ joined #perl6
21:07 zb joined #perl6
21:07 krunen joined #perl6
21:07 gabiruh joined #perl6
21:07 DarthGandalf joined #perl6
21:07 aindilis joined #perl6
21:07 [particle] joined #perl6
21:07 sorear joined #perl6
21:07 BinGOs joined #perl6
21:07 PerlJam joined #perl6
21:07 pumphaus joined #perl6
21:07 Woody4286 joined #perl6
21:07 ingy joined #perl6
21:07 IRSeekBot joined #perl6
21:07 sjn joined #perl6
21:07 ilogger2 joined #perl6
21:07 ashleydev joined #perl6
21:07 Maddingue joined #perl6
21:07 16WAAGL8K joined #perl6
21:07 ribasushi joined #perl6
21:07 necrodearia joined #perl6
21:07 meteorjay joined #perl6
21:07 sjohnson joined #perl6
21:07 tadzik joined #perl6
21:07 uniejo joined #perl6
21:07 huf joined #perl6
21:07 ascent_ joined #perl6
21:07 LoRe joined #perl6
21:07 snarkyboojum joined #perl6
21:07 llabthgie joined #perl6
21:07 TimToady joined #perl6
21:07 Grrrr joined #perl6
21:07 revdiablo joined #perl6
21:07 krakan_ joined #perl6
21:07 jpr5 joined #perl6
21:07 nsh- joined #perl6
21:07 patch joined #perl6
21:07 mathw joined #perl6
21:07 frooh joined #perl6
21:07 Bucciarati joined #perl6
21:07 mdxi joined #perl6
21:07 phenny joined #perl6
21:07 yahooooo joined #perl6
21:07 estrabd joined #perl6
21:07 JohnGalt2600 joined #perl6
21:07 barika joined #perl6
21:07 tewk joined #perl6
21:07 ruoso joined #perl6
21:07 rbuels joined #perl6
21:07 chitragupt joined #perl6
21:07 simcop2387 joined #perl6
21:07 nothingmuch_ joined #perl6
21:07 jql joined #perl6
21:07 hatseflats joined #perl6
21:07 diakopter joined #perl6
21:07 allbery_b joined #perl6
21:07 apejens joined #perl6
21:09 kaare_ left #perl6
21:10 kaare_ joined #perl6
21:12 coldhead joined #perl6
21:22 ggoebel joined #perl6
21:23 ggoebel left #perl6
21:30 colomon I'm getting "Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace," which is certainly true, though it wasn't that long ago this code worked.
21:30 colomon But it seems like nothing else is happening in the code, which is very confusing to me.
21:30 colomon Is that error actually a "Shut down and do nothing else" error?
21:31 masak has-methods in modules last worked in alpha.
21:31 moritz_ rakudo: module A { method foo() { } }; say "alive"
21:31 p6eval rakudo 10d86d: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤alive␤»
21:31 masak a module simply doesn't have the MOP to handle has-methods.
21:31 masak and we stopped cheating in the alpha->ng switch.
21:32 colomon I'm fairly certain this code does not go back to alpha.
21:33 masak extraordinary claims require extraordinary evidence... ;)
21:33 colomon errr... though I may be wrong.  geez, I've been working on this for THAT long?!
21:33 masak the real question is... why do you have methods in your module?
21:34 colomon it's not a module, it's a class.
21:34 colomon errr... at least, that's what I've been assuming is causing the error.
21:35 colomon Hmmm... though the class name does not match the filename in case.
21:35 colomon it's a class in a module, I mean.
21:38 masak are the methods in the class?
21:38 masak whether the class matches the file name shouldn't matter, really.
21:38 Tene rakudo: module A { class B { method foo() { } }; say "dood";
21:38 colomon They are, and making them "our" has not fixed the error at all.
21:38 p6eval rakudo 10d86d: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 22␤»
21:38 Lorn left #perl6
21:38 Tene rakudo: module A { class B { method foo() { } } }; say "dood";
21:38 p6eval rakudo 10d86d: OUTPUT«dood␤»
21:39 Lorn joined #perl6
21:39 Tene colomon: you've got something else going on; are you *sure* they're in the class?
21:39 colomon masak: this is sort of dodging my larger question: Why does a "useless declaration" apparently shut down my script's execution?  Or is something completely different going on here?
21:40 colomon ooo, that may be it.
21:40 masak colomon: could you try to golf the error and then post it here?
21:40 colomon one moment, I think I've got it.
21:41 colomon rakudo: method foo($a) { say $a; };
21:41 p6eval rakudo 10d86d: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤»
21:41 colomon there, golfed to a tee.
21:41 Tene std: method foo($a) { say $a; };
21:41 colomon So it's a real error, with a LTA error message.
21:41 p6eval std 4608239: OUTPUT«ok 00:01 122m␤»
21:41 Tene std: method foo() { };
21:41 p6eval std 4608239: OUTPUT«ok 00:01 119m␤»
21:41 Tene rakudo: method foo() { };
21:41 p6eval rakudo 10d86d: OUTPUT«Useless declaration of has-scoped Method in a module; add our or my to install it in the lexpad or namespace␤»
21:42 Tene erm, what's wrong with that error message?
21:42 colomon First, it says "module" where you would normally say "script" or "program".
21:42 _twitch joined #perl6
21:42 Tene No I wouldn't?
21:43 Tene Maybe it should say "outside of a class or role", though?
21:43 colomon Second, it doesn't mention the name of the method in question or provide a line number, either of which would have instantly pinpointed the actual problem.
21:43 Tene That would be nice, yes. :)
21:49 mkramer1 left #perl6
21:49 Chillance left #perl6
21:49 Solarion left #perl6
21:49 VXZ left #perl6
21:49 dju__ left #perl6
21:49 jjore left #perl6
21:49 coldhead left #perl6
21:49 Rotwang left #perl6
21:49 alester left #perl6
21:49 jevin left #perl6
21:49 zykes- left #perl6
21:49 szabgab left #perl6
21:49 ponbiki left #perl6
21:49 nadim left #perl6
21:49 pjcj left #perl6
21:49 betterworld left #perl6
21:49 charsbr__ left #perl6
21:49 cookys_ left #perl6
21:49 pochi left #perl6
21:49 dsp_ left #perl6
21:49 pmichaud left #perl6
21:49 dukeleto left #perl6
21:49 szbalint left #perl6
21:49 Grimnir_ left #perl6
21:49 Juerd left #perl6
21:49 Util left #perl6
21:49 bbkr left #perl6
21:49 rblackwe left #perl6
21:49 breinbaas left #perl6
21:49 wolverian left #perl6
21:49 kfo left #perl6
21:49 frettled_ left #perl6
21:49 frettled joined #perl6
21:50 coldhead joined #perl6
21:50 Rotwang joined #perl6
21:50 mkramer1 joined #perl6
21:50 breinbaas joined #perl6
21:50 rblackwe joined #perl6
21:50 bbkr joined #perl6
21:50 Juerd joined #perl6
21:50 Util joined #perl6
21:50 Grimnir_ joined #perl6
21:50 szbalint joined #perl6
21:50 dukeleto joined #perl6
21:50 pmichaud joined #perl6
21:50 dsp_ joined #perl6
21:50 pochi joined #perl6
21:50 cookys_ joined #perl6
21:50 charsbr__ joined #perl6
21:50 betterworld joined #perl6
21:50 pjcj joined #perl6
21:50 nadim joined #perl6
21:50 ponbiki joined #perl6
21:50 szabgab joined #perl6
21:50 zykes- joined #perl6
21:50 jevin joined #perl6
21:50 alester joined #perl6
21:50 Chillance joined #perl6
21:50 Solarion joined #perl6
21:50 VXZ joined #perl6
21:50 dju__ joined #perl6
21:50 jjore joined #perl6
21:50 kfo joined #perl6
21:50 mathw left #perl6
21:50 mathw joined #perl6
21:50 wolv joined #perl6
21:53 Axius__ left #perl6
21:56 ColloquyUser left #perl6
21:56 donri So my Perl 6 Euler #3 solution is damn slow, not sure if my code is to blame or not. :D
21:57 Tene donri: Just run it under Devel::NYTProf... ;)
21:57 Tene donri: (perl 5 profiling library; perl 6 doesn't have good profiling tools)
21:57 donri And that thing runs Perl 6 code??
21:58 donri Anyway my code runs "fast enough for Perl 6" for lower numbers, and uses RAM steadily
21:59 donri if my code is to blame it's because it maybe does computations that aren't necessary
21:59 donri Pondering trying it in Haskell
22:01 colomon show us the code!   ;)
22:03 MayDaniel joined #perl6
22:05 Tene donri: No, it doesn't run Perl 6 code.  It was a bad suggestion intended as a joke, and then I remembered that you're not that familiar with Perl 5.
22:05 donri Ah you meant port to v5
22:06 ColloquyUser joined #perl6
22:06 Tene donri: You seem to be under the impression that I was being helpful.  I was trolling, and making a side comment on the pool tools infrastructure in Perl 6 right now.
22:07 donri :)
22:07 Tene Man, you'd think you'd know me better by now. ;P
22:07 donri Trollne
22:08 donri colomon: http://paste.pocoo.org/show/343029/
22:11 masak today's mini-challenge: write a version of http://rosettacode.org/wiki/Hamming_numbers#Perl_6 that does not use lazy lists.
22:11 donri _ should be disallowed in terms :D
22:12 jtbraun1 left #perl6
22:14 kjeldahl joined #perl6
22:14 masak donri: you mean in identifiers?
22:14 donri yea
22:14 colomon masak: but.... that would require work!
22:15 masak colomon: yes, I bet any such solution would be far less elegant, too.
22:15 donri so come on, rate my code, does it suck?
22:15 colomon masak: work == less elegant.  ;)
22:15 masak colomon: thing is, I have an idea for how to do it. I just haven't tried it yet.
22:15 arnsholt As I was going to say: But why on Earth would want to -not- use lazy lists =)
22:15 donri it's admittedly greatly plagiarized from rosettacode examples
22:15 colomon donri: I don't think it's terrible.
22:16 masak arnsholt: here's one possible reason: because you're running Perl 5 :)
22:16 masak arnsholt: I'm sure there are others...
22:16 donri i make a point though of understanding both syntax and semantics, and not just copy-paste
22:16 colomon donri: you can look at Math::Prime for an example of how to create @primes that we actually tried to optimize a bit.
22:17 colomon donri: I don't see anything obvious that should make it slow, you're probably just running into general Rakudo slowness.
22:17 donri I thought so
22:18 donri it's actually still not finished after maybe 40+ minutes
22:18 masak donri: with @factors, what is it that the ...^ enumerates?
22:18 colomon masak: actually, I think that ma...
22:18 masak donri: I'm not convinced you'll get multiplicity that way...
22:18 tadzik any neat idea to transform a string into a regex in nqp?
22:18 colomon donri: wait, that's got to be something wrong!
22:19 donri yea might be completely wrong
22:19 cosimo joined #perl6
22:19 colomon masak: as I was saying, actually, I think the doing a better lazy version of Hamming might be more interesting than doing a non-lazy version.
22:19 masak donri: recall that ... is a list operator. so putting @primes before it like that is probably Wrong.
22:19 donri I was aiming for "all primes lower than square root of the number we're decomposing"
22:19 colomon @primes ... * > blah is perfectly correctly.
22:20 masak colomon: oh, you think the lazy version can be improved? interesting.
22:20 colomon the sequence operator can take a (possibly lazy) list on either side.
22:20 * colomon 's grammar is not perfectly correctly, however.
22:20 masak colomon: oh, and it won't iterate over the whole list?
22:20 masak @primes, in this case.
22:20 colomon masak: nope.
22:21 masak nice.
22:21 colomon it's actually a very handy usage of the sequence operator.
22:21 masak I should have known that.
22:21 donri rakudo: say (^* ...^ * > 10).perl
22:21 p6eval rakudo 10d86d: OUTPUT«Can't take numeric value for object of type Whatever␤  in 'Any::Numeric' at line 1462:CORE.setting␤  in 'prefix:<^>' at line 7467:CORE.setting␤  in main program body at line 22:/tmp/Y5E4veDVi5␤»
22:21 donri rakudo: say (^Inf ...^ * > 10).perl
22:21 p6eval rakudo 10d86d: OUTPUT«(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10)␤»
22:21 colomon nice example
22:22 masak donri++ colomon++
22:22 masak yeah, that's a cool usage.
22:22 masak 'night, #perl6
22:22 masak left #perl6
22:22 colomon night
22:22 donri rakudo: say ((0, 2 .. *) ... * > 10).perl
22:22 p6eval rakudo 10d86d: OUTPUT«(0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11)␤»
22:23 colomon rakudo: say ((0, 2 ... *) ... * > 10).perl
22:23 p6eval rakudo 10d86d: OUTPUT«(0, 2, 4, 6, 8, 10, 12)␤»
22:23 donri oh, right
22:24 donri haha nice "cheating" in math::prime
22:24 colomon :)
22:25 colomon the algorithm works, but it's nice to have it primed with a bunch of easy answers.  ;)
22:25 donri what's up with is export(:DEFAULT), isn't :DEFAULT the, uh, default? :)
22:25 colomon donri: actually, I'd be very worried about your use of $_ %% *
22:25 colomon donri: (re :DEFAULT) me paranoid.
22:26 donri $_ is set by the "given"
22:26 colomon and $_ is set by grep
22:26 colomon maybe not in this case, I admit.
22:26 colomon I don't know exactly what gets bound when.
22:27 donri :D
22:27 donri it works, i've tested it on smaller numbers
22:27 colomon was just going to ask that.
22:27 donri maybe you're thinking grep { closure without explicit args or $^ordered args }
22:28 donri ==> seems to have weird precedence or something
22:29 donri rakudo: my @nums = ^10 ==> grep * %% 2; say @nums.perl
22:29 p6eval rakudo 10d86d: OUTPUT«[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]␤»
22:29 colomon donri: I might be wrong, because of some twisty binding thing I don't understand.  But at the very least, it's worrisome-looking code, even if it's right.
22:29 donri rakudo: my @nums = (^10 ==> grep * %% 2); say @nums.perl
22:29 p6eval rakudo 10d86d: OUTPUT«[0, 2, 4, 6, 8]␤»
22:29 donri whyever wouldn't assignment take like the lowest precedence?
22:29 donri or is this a rakudo bug?
22:30 colomon grep very definitely binds $_, but if you're getting $_ from before that binding you're okay.
22:31 _twitch left #perl6
22:32 donri does it really set $_ itself though or isn't it more that it takes a code object and those can grab arguments via $_?
22:32 colomon oooo, your primes calculation is very slow.
22:32 donri I sorta wish (or have missed that there is) a Haskell-like 'where' clause
22:33 diakopter perlesque: my $frontierSet = SortedSet[BigInteger].new; say $frontierSet
22:33 p6eval perlesque: OUTPUT«System.Collections.Generic.SortedSet`1[System.Numerics.BigInteger]␤»
22:33 diakopter o_O
22:33 colomon donri: I don't know.  but let me suggest that if you've got to parse obscure areas of what's going on like that, your code might be less than ideal.  :)
22:33 diakopter masak: I see a hamming heading your way
22:34 donri that is, I'd like statement-local after-thought scope
22:34 gbacon left #perl6
22:35 donri do-stuff-to $n with { my $n = 'temp' }
22:35 diakopter perlesque: say BigInteger.One # o_O
22:35 p6eval perlesque: OUTPUT«1␤»
22:35 donri is there anything like that?
22:35 moritz_ donri: it's spelled 'given' and sets $_
22:36 moritz_ rakudo: .say given 7 + 4
22:36 p6eval rakudo 10d86d: OUTPUT«11␤»
22:36 donri that's what I'm (possibly ab-) using already and it only sets one variable
22:36 colomon moritz_: he knows that, and is looking for something which can have a different name.
22:36 moritz_ ah, it's called 'my' :-=)
22:37 colomon moritz_: because I'm objecting to his use of "grep $_ %% *"
22:37 moritz_ my $x = 4 + 7;
22:37 kanishka left #perl6
22:37 donri Yes but then I need to do it imperatively which feels less elegant ;) and I might also need to use {} if I'm gonna be truely OCD about the namespace
22:38 shi left #perl6
22:38 moritz_ so doing things in order is "imperatively"?
22:38 donri yea ;)
22:38 donri nah but ; as in statements = imperatively
22:39 donri more elegant to do "single units" in a single expression
22:39 donri I should of course write subs instead, but shoot me
22:40 molaf joined #perl6
22:41 colomon donri: In fact, I instinctively rewrote your code into a sub almost the second it hit my editor.  :)
22:46 donri I just like the sub-free style for these euler problems
22:46 donri treating the whole file as a sub in a way
22:47 donri hm blocks in a way do this thing i was talking about before
22:48 donri { do-stuff-to $^a }('temp')
22:49 donri colomon: are my @primes slow because of the code or because of only two hardcoded primes?
22:49 colomon donri: investigating.
22:50 colomon but your code takes 10m18s (on my MacBook Pro) to calculate the primes up to 10000.
22:52 colomon oh, duh.
22:52 colomon you say "$a is copy"
22:53 colomon never mind, that's not it.
22:53 kaare_ left #perl6
22:53 colomon I'm not sure where the slow is, but Math::Primes calculates the primes to 10000 in 1m34s
22:53 colomon so it's pretty drastically faster.
22:54 colomon the hardcoded primes only go up to 541, so that's only a tiny portion of the difference.
22:54 donri but the following primes rely on the previous primes
22:54 donri hm but i'd expect it somewhat quickly goes up to 541 anyway
22:55 colomon using "@primes ...^ * > sqrt $a" in your inner loop is probably killing you.
22:55 colomon getting up to 541 is the easy part.
22:56 colomon Math::Prime's next-prime function is designed to work fast, not look pretty.  :)
22:59 donri but you're doing the same with last if $_ > $sqrt;
23:02 dukeleto colomon: there are many prime-checking optimizations in Math::Primality on CPAN
23:02 dukeleto colomon: all well-documented as well
23:03 colomon donri: same math, but very different p6 code.
23:04 colomon using the sequence operator is drastically slower than a hand-coded loop.
23:08 alester left #perl6
23:09 donri ah
23:09 donri because it needs to or because its implementation is less optimized?
23:15 kjeldahl left #perl6
23:20 whiteknight joined #perl6
23:20 skangas_ joined #perl6
23:22 Rotwang left #perl6
23:23 donri colomon: why is sequence op slower, is it because using smartmatching?
23:24 donri i think the code that's still running on my machine was earlier code that used @primes.map { last when * > sqrt $^a; ... }
23:24 skangas left #perl6
23:24 skangas_ is now known as skangas
23:25 donri which similarly uses smartmatching
23:27 jferrero joined #perl6
23:28 diakopter perlesque: https://gist.github.com/839655
23:28 p6eval perlesque: OUTPUT«First 20 Hamming numbers: ␤1␤2␤3␤4␤5␤6␤8␤9␤10␤12␤15␤16␤18␤20␤24␤25␤27␤30␤32␤36␤1691st Hamming number: 2125764000␤One millionth Hamming number: 519312780448388736089589843750000000000000000000000000000000000000000000000000000000␤»
23:28 dju_ joined #perl6
23:29 diakopter phenny: ask masak take a look at the clog from here - hamming perlesque
23:29 phenny diakopter: I'll pass that on when masak is around.
23:30 diakopter phenny: tell masak (blatantly ported from the Java solution)
23:30 phenny diakopter: I'll pass that on when masak is around.
23:31 dju__ left #perl6
23:33 JodaZ left #perl6
23:39 ColloquyUser left #perl6
23:40 ColloquyUser joined #perl6
23:41 ColloquyUser left #perl6
23:47 donaldh left #perl6
23:49 wolv is now known as wolverian

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

Perl 6 | Reference Documentation | Rakudo