Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2011-01-25

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:07 felliott joined #perl6
00:09 Kodi left #perl6
00:31 kst left #perl6
00:31 kst joined #perl6
00:38 kfo_ joined #perl6
00:41 kfo left #perl6
00:43 molaf__ joined #perl6
00:46 molaf_ left #perl6
00:48 cdarroch left #perl6
00:57 QinGW joined #perl6
01:02 kst left #perl6
01:03 kst joined #perl6
01:18 felliott left #perl6
01:24 felliott joined #perl6
01:31 starcoder left #perl6
01:32 felliott left #perl6
01:38 starcoder joined #perl6
01:42 arlinius joined #perl6
01:50 dukeleto left #perl6
01:50 dukeleto joined #perl6
01:54 _jaldhar joined #perl6
01:55 drbean joined #perl6
01:55 kst left #perl6
01:57 kst joined #perl6
02:07 whiteknight left #perl6
02:08 flussence I was poking around the rakudo source and found "as" used inside a signature, what does that mean? The only place in the spec I can find mention of it is for return value types.
02:08 flussence (and it's not the most greppable of keywords...)
02:09 Tene flussence: coerced to type
02:10 Tene rakudo: sub foo($n as Str) { say $n.WHAT }; my $x = 1; say $x.WHAT; foo($x);
02:10 p6eval rakudo 723986: OUTPUT«Int()␤Str()␤»
02:10 flussence oh... that's useful to know :)
02:10 Tene flussence: like that: ^
02:14 colomon woah, I didn't know that was implemented yet.
02:14 Tene colomon: Neither did I. ;)
02:15 colomon rakudo: sub foo($n as Str) { say $n.WHAT; say :$n.perl; }; my $x = 1; say $x.WHAT; foo($x);
02:15 p6eval rakudo 723986: OUTPUT«Int()␤Str()␤"n" => "1"␤»
02:15 colomon rakudo: sub foo($n as Rat) { say $n.WHAT; say :$n.perl; }; my $x = 1; say $x.WHAT; foo($x);
02:15 p6eval rakudo 723986: OUTPUT«Int()␤Rat()␤"n" => 1/1␤»
02:16 colomon rakudo: sub foo($n as Complex) { say $n.WHAT; say :$n.perl; }; my $x = 1; say $x.WHAT; foo($x);
02:16 p6eval rakudo 723986: OUTPUT«Int()␤Complex()␤"n" => Complex.new(1, 0)␤»
02:16 colomon dang, it's good.
02:18 flussence rakudo: sub foo($n as IO) { say :$n.perl }; my Int $x = 1; foo($x); # wondering how it breaks
02:18 p6eval rakudo 723986: OUTPUT«"n" => IO.new(PIO => Any, ins => Any, autoflush => Any, path => "1", stat => IO;Stat.new(path => "1"))␤»
02:18 flussence oh, probably won't do that with builtin types.
02:18 flussence rakudo: class A {}; sub foo($n as A) { say :$n.perl }; my Int $x = 1; foo($x); # wondering how it breaks
02:18 p6eval rakudo 723986: OUTPUT«Unable to coerce value for '$n' from Int to A; no coercion method defined␤  in 'foo' at line 1:/tmp/gcRL90y4nT␤  in main program body at line 22:/tmp/gcRL90y4nT␤»
02:18 flussence yey
02:19 flussence s/e/*
02:20 flussence rakudo: sub foo($x as Int where { $_ > 0 }) { say $x }; foo("0x10")
02:20 p6eval rakudo 723986: OUTPUT«16␤»
02:21 flussence ooh, I am *so* going to use that.
02:23 leprevost left #perl6
02:34 flussence Ick. (-1).sqrt == NaN and (i ** 2) is -1 + (float rounding error)i.
02:42 Tene rakudo: say i * i
02:42 p6eval rakudo 723986: OUTPUT«-1 + 0i␤»
02:44 [Coke] rakudo: say pi * e
02:44 p6eval rakudo 723986: OUTPUT«8.53973422267357␤»
02:44 [Coke] rakudo: say pi e
02:44 p6eval rakudo 723986: OUTPUT«===SORRY!===␤Confused at line 22, near "say pi e"␤»
02:47 cafesofie joined #perl6
02:53 kst left #perl6
02:53 kst joined #perl6
02:55 felliott joined #perl6
03:00 jferrero left #perl6
03:29 am0c joined #perl6
04:03 agentzh joined #perl6
04:07 mtk left #perl6
04:16 mtk joined #perl6
04:25 cotto left #perl6
04:27 Su-Shee left #perl6
04:28 Su-Shee joined #perl6
04:32 GinoMan joined #perl6
04:46 Chillance left #perl6
05:04 envi joined #perl6
05:04 felliott left #perl6
05:19 coldhead left #perl6
05:20 stifynsemons joined #perl6
05:20 stifyn joined #perl6
05:21 zevpl left #perl6
05:31 jfried left #perl6
05:31 jfried joined #perl6
05:37 cotto joined #perl6
05:37 tomaw left #perl6
05:37 jfried left #perl6
05:40 stifyn left #perl6
05:40 stifynsemons left #perl6
05:43 Patterner left #perl6
05:46 Psyche^ joined #perl6
05:46 Psyche^ is now known as Patterner
05:49 woosley joined #perl6
05:50 JimmyZ joined #perl6
05:52 jfried joined #perl6
05:54 JimmyZ left #perl6
05:54 dalek niecza: f1f77ce | sorear++ | / (2 files):
05:54 dalek niecza: Implement .method automatic $_ form
05:54 dalek niecza: review: https://github.com/sorear/niecza/commit/f1f77cead5
06:12 kaare_ joined #perl6
06:18 cjk101010 joined #perl6
06:19 f00li5h left #perl6
06:31 mberends left #perl6
06:33 dju left #perl6
06:40 orafu left #perl6
06:40 orafu joined #perl6
06:45 dju joined #perl6
06:47 ponbiki left #perl6
06:47 ponbiki joined #perl6
06:59 wtw joined #perl6
07:05 drbean left #perl6
07:05 ravic joined #perl6
07:07 tomaw joined #perl6
07:07 ravic i got a perl qquestion. and i m unable to login into #perl
07:07 ravic m ashamed to ask it here as its nt perl6. can any help me dodging into #perl
07:08 perigrin why are you unable to login to #perl?
07:08 moritz_ ravic: there's also irc.perl.org with lots of channels
07:08 perigrin including a #perl-help
07:20 ravic on it.
07:20 ravic 'how to copy a file to all 10 remote machines simulataneoulsy?' -> need somehelp in this context
07:21 sorear you don't need Perl for that
07:21 sorear man bash_builtins
07:21 sorear look up "for"
07:21 sorear man scp
07:21 moritz_ or search for ntfs :-)
07:22 moritz_ erm, nfs
07:22 * moritz_ not quite awake
07:22 * sorear -> sleep
07:26 plobsing moritz_: if you could do that using only ntfs, I'd be impressed
07:30 cosimo left #perl6
07:31 cosimo joined #perl6
07:31 PZt left #perl6
07:34 moritz_ plobsing: not only nfs, but nfs for distributing the file
07:37 ravic nfs doesnt work out for me. architechure limitations
07:37 ravic yes scp can push file
07:37 ravic rsync as well
07:38 ravic but u need a way to push it parllelly
07:41 plobsing ravic: have you heard of job control? your shell should have it.
07:50 coldhead joined #perl6
07:52 Tene ravic: man parallel
07:53 Tene ravic: man bash, /^JOB
07:54 Tene ravic: man xargs, /-P
08:18 kst left #perl6
08:18 kst joined #perl6
08:23 cafesofie left #perl6
08:24 TiMBuS is there a way to unload or overwrite a module in perl6?
08:25 jnthn morning, #perl6
08:26 jnthn TiMBuS: You could use a different version of it in a nested lexical scope, maybe. Dunno how far that helps. Guess if you only use it within a given scope then it's "unloaded" outside that scope. But that's not unloaded as such I guess, only not in scope...
08:27 TiMBuS that could eventually get a bit bulky..
08:28 bacek left #perl6
08:31 jnthn TiMBuS: What's the use case?
08:32 bacek joined #perl6
08:33 TiMBuS jnthn, irc bot, modules are used for callbacks
08:33 TiMBuS so being able to load/unload features would be mighty handy
08:36 Mowah joined #perl6
08:40 TiMBuS or, if you need a more exact usage example: require 'the/module'; modulelist.push(the::module.new)
08:41 TiMBuS i guess hiding the name works
08:41 PZt joined #perl6
08:47 daxim joined #perl6
08:47 Mowah left #perl6
08:48 masak joined #perl6
08:49 drbean joined #perl6
08:49 kensanata joined #perl6
08:49 masak morning, zebras.
08:51 daxim now that sixers have a sizable toolchain, how about applying for the QA hackathon?  interested/does something need fixing with facetime?  http://www.nntp.perl.org/group/perl.qa/2011/01/msg12675.html
08:52 masak daxim: that's a splendid idea. daxim++
08:52 masak daxim: especially since we have lots of tricks to learn from the Perl 5 people who have gone before us.
09:03 masak rakudo: my $foo = [5]; for $foo { .shift }; say +$foo
09:03 p6eval rakudo 723986: OUTPUT«0␤»
09:03 masak \o/
09:11 ravic left #perl6
09:27 REPLeffect left #perl6
09:29 REPLeffect joined #perl6
09:35 drbean left #perl6
09:36 timbunce joined #perl6
09:47 noganex_ is now known as noganex
09:47 masak http://twitter.com/supernovus/status/29666617625419776 -- I know the feeling. I've solved this by searching out problems where CPU isn't the bottleneck.
09:56 timbunce left #perl6
09:58 * jnthn is speed away from using Rakudo for more stuff
09:59 masak ...which is why Niecza is interesting to me. it seems to run faster, which can be a plus even with fewer features than Rakudo.
10:00 jnthn *nod*
10:02 QinGW left #perl6
10:02 jnthn The Rakudo 6model branch will be made in a week or so.
10:02 timbunce joined #perl6
10:09 masak that's excellent news. ++jnthn!
10:11 jnthn We'll also get the multi semantics updated in with that lot. :)
10:11 masak \o/
10:11 masak finally!
10:11 jnthn nqp-rx/nom supports them already ;)
10:12 masak yes, I've tried them. :)
10:13 jnthn ooh :)
10:13 tzhs joined #perl6
10:13 jnthn It's still dead slow in nqp-rx though.
10:13 jnthn I didn't port the multi cache from /nom
10:13 jnthn er
10:13 jnthn to /nom
10:13 jnthn from nqpclr :)
10:14 dakkar joined #perl6
10:14 masak jnthn: see, even you are confused by the naming! :P
10:15 jnthn :P
10:15 * jnthn looks forward to pmichaud++'s forthcoming post to clear it all up :)
10:17 justatheory left #perl6
10:20 cognominal joined #perl6
10:23 masak jnthn: http://www.angryduck.com/pictures/2010_11/Coding_Drunk.jpg :P
10:27 jnthn That fish looks like it's fin-ished plenty of beer. :P
10:35 masak :P
10:43 f00li5h joined #perl6
10:43 f00li5h left #perl6
10:43 f00li5h joined #perl6
10:46 daxim http://www.oreillymaker.com/   # have fun
10:46 masak :)
10:49 daxim old idea, though, I think I used this one the last time:  http://web.archive.org/web/20020124124713/http://www.ilbbs.com/oracovers/
10:49 mathw jnthn: I read your blog post about 6model with great interest.
10:50 jnthn daxim: Oh, cool :)
10:51 jnthn mathw: Glad it was interesting. :)
10:52 * jnthn tries not to swear too loudly at TFS
10:52 mathw It was also rather exciting
10:53 mathw does prove the value of the dispatch cache doesn't it :)
10:53 jnthn mathw: Very much so
10:53 jnthn mathw: It was exacberbated by the fact that I hadn't done anything much to optimize the non-dispatch-cache case.
10:54 mathw mmm
10:54 dukeleto left #perl6
10:54 jnthn (e.g. it shoudln't have been quite that much slower anyway)
10:54 mathw well hopefully there'll be some wins there in the future :)
10:54 jnthn (but I'd not prioritized that bit yet as I expected to be hitting the cache lots :))
10:54 dukeleto joined #perl6
10:57 mathw well, what's the rule? make it work, then make it fast
10:57 mathw hopefully :)
10:57 mathw with a load of caveats about trying to avoid implementations which are impossible to make faster
11:02 jnthn *nod*
11:03 dju left #perl6
11:04 dju joined #perl6
11:10 coldhead left #perl6
11:12 mathw jnthn: you're learning Russian, IIRC?
11:12 jnthn Trying to :)
11:12 mathw I'm trying to learn how to pronounce it
11:13 mathw I joined a choir, and the first piece we're doing has four movements in Russian (and two in Latin)
11:13 mathw It's... got some interesting sounds
11:14 dukeleto ipv6 just landed in Parrot
11:14 jnthn mathw: :)
11:14 jnthn And all the palleted things
11:15 * jnthn bbs - lunch
11:15 arnsholt And lots of weird sibilants
11:15 mathw mmm
11:15 masak mathw: I agree, singing in Russian is fun.
11:15 mathw so of course when we have a whole load of consonants that don't exist in English
11:15 mathw Prokofiev puts them on a load of very fast notes
11:16 arnsholt There are some Polish placenames where I acknowledge only the German versions (because I can pronounce the real Polish names =)
11:16 masak mathw: live with it, anglophone. :P
11:16 mathw pfft
11:16 mathw I can handle some of them better than my immediate neighbours in the tenor section
11:16 mathw because they're in Lojban :)
11:17 masak :)
11:17 mathw and I have no idea what the man next to me thought he was singing last night
11:17 mathw but it wasn't what we've been taught
11:17 masak mathw: consider how well-suited the Cyrillic orthography is to the Russian phonology.
11:18 mathw certainly seems to fit it better than English is served by Latin alphabet
11:18 mathw I'm trying to wean myself off the transliteration, because that's really misleading
11:19 arnsholt The problem with English isn't as much the alphabet as the orthography
11:19 mathw I'm also trying to avoid the temptation to sing the German translation, which is also printed in my edition of the score
11:19 mathw it's all fun though
11:19 arnsholt Essentially, the Great Vowel Shift and the codification of written English occured in the wrong order =)
11:19 mathw heh yes
11:19 mathw we also didn't mangle our loanwords enough
11:20 arnsholt (Unfortunately for anyone born after Shakespeare)
11:20 arnsholt Yeah, that's a pain as well
11:20 arnsholt But less so for me, since I know both French and Latin =)
11:20 masak mathw: no, you definitely shouldn't pay attention to the transliteration. :/
11:21 woosley left #perl6
11:22 mathw Ultimately it's going to be better to learn how to pronounce what's written in Russian
11:22 mathw the transliteration takes too long to interpret at the speed this thing goes
11:22 mathw At least I have no existing assumptions about how to pronounce things written in Cyrillic
11:22 mathw Rather than having to remember what the transliterator meant when he wrote "l(y)oo"
11:23 masak :(
11:23 noganex reminds me somehow of the time when i learned thai...
11:23 gfldex i was teached russian in school and i can tell you that english transliteration is a joke
11:23 masak thai doesn't even have a standardized transliteration...
11:23 masak joke or not.
11:23 mathw gfldex: we figured that out :)
11:24 jpike left #perl6
11:24 mathw we hired a Russian-speaker to help with the learning
11:24 noganex masak: i remember driving in the wrong direction for ~40 miles because i misread a sign ;)
11:24 mathw his pronunciation is nothing like you'd think from the transliteration, so it's really not very helpful at all
11:24 woosley1 joined #perl6
11:25 noganex and thai has a transliteration.
11:25 masak oh?
11:27 gfldex around my hometown in eastern germany there are quite a few town with slavic names left
11:27 gfldex that helped a lot :)
11:27 gfldex Tschopau, Tschochern and the like
11:27 masak left #perl6
11:28 arnsholt Thai script is Brahmic, so it should be transcribable with something similar to IAST I'd think
11:29 drbean joined #perl6
11:30 daxim all hail ISO-9
11:35 agentzh left #perl6
11:42 tzhs left #perl6
11:43 masak joined #perl6
12:05 jnthn mathw: Yes, learning the Cyrillic is probably a better way to go, if you have the time to do so.
12:25 sECuRE hm, i’m currently trying to use my patch from #77992 on the current rakudo. i get a NULL PMC access in set_integer_native() in some of my code (the line numbers don’t seem to be precise). how can i debug this further?
12:31 masak sECuRE: a very good question.
12:31 masak sECuRE: what I end up doing is trying to get the failing code down to its bare minimum.
12:32 sECuRE :-\
12:32 flussence .oO( I like how Vim just magically makes sense sometimes - transposing 2 characters is "xp" )
12:33 masak flussence: right, and two lines is "ddp".
12:34 flussence it's the way 2 independent actions spell out a mnemonic for the thing putting them together does :)
12:39 masak oh, "x" can mean "trans-". cute. :)
12:44 daxim xh, "o" can means "cis-". grave. :(
12:44 moritz_ sECuRE: start rakudo with the --ll-backtrace option
12:44 moritz_ (needs very latest parrot)
12:44 sECuRE moritz_: alright, will try
12:46 bluescreen joined #perl6
12:46 moritz_ it gives you a PIR level backtrace
12:47 moritz_ which is more fine grade than the normal ones
12:47 sECuRE http://p.nnev.de/1700 < this is what i get
12:48 moritz_ do you have a quick link to the getaddrinfo code in IO::Socket::INET
12:49 sECuRE http://rt.perl.org/rt3/Ticket/Attachment/736814/354158/0001-Adapt-IO-Socket-INET-to-the-IPv6-supporting-rakudo-A.patch
12:50 moritz_ sECuRE: must be an assignment of the form   $P0 = $I0
12:51 sECuRE hm, ok
12:51 moritz_ where the RHS can be anything that returns an int
12:51 sECuRE ok
12:52 sECuRE and you’re sure it’s $P0, not maybe $P1?
12:52 moritz_ not at all
12:52 moritz_ can be any PMC container on the left
12:53 sECuRE to be clear: are $P0 etc. only for PMCs?
12:54 moritz_ if you write $P0 = someInteger, theset_integer_native vtable is called
12:54 moritz_ on the PMC that's previously in $P0
12:54 sECuRE uhm, oh. i misunderstood the concept, then, i think
12:54 moritz_ s/theset/the set/
12:54 moritz_ and set_string_native for strings etc.
12:55 accel joined #perl6
12:55 accel left #perl6
12:55 takadonet morning all
12:55 flussence I'm not convinced a dual-stack-supporting thing should be called INET, especially after seeing this - http://www.reddit.com/r/perl/comments/f7f39/ipv6_in_perl/
12:55 accel joined #perl6
12:55 masak takadonet: \o
12:55 sECuRE flussence: yeah, but let’s focus on getting ipv6 support merged at all, right? ;)
12:56 flussence sECuRE: of course :)
12:58 moritz_ #perl6 is always a funny mixture of "how can I achieve $x now?" and "Can't we do much better in future, somehow?"
12:59 daxim duct-tape and bugs
12:59 sECuRE moritz_: have a look at my method getaddrinfo() please. i need to call sock.'getaddrinfo'(…) with the arguments provided. how would i use find_lex correctly?
13:01 moritz_ sECuRE: Perl 6 level functions always need PMCs as arguments
13:01 tzhs joined #perl6
13:01 moritz_ s/functions/routines/
13:02 moritz_ sECuRE: it would be much easier to ony create sock in Q:PIR, return it from the PIR block, and then do the actual call in Perl 6 code
13:02 moritz_ my $sock = Q:PIR { %r = root_new ['parrot';'Socket'] }
13:02 moritz_ ( plus newlines, I think)
13:03 moritz_ and then if pir::isnull($sock) { raise error } else { $sock.getaddrinfo($hostname, $port, ...) }
13:03 moritz_ or something along these lines
13:03 moritz_ hm, maybe the null check needs to be inside Q:PIR too
13:03 moritz_ but not the whole call
13:04 y3llow left #perl6
13:05 y3llow joined #perl6
13:07 sECuRE moritz_: ok, i’ll try
13:12 plobsing left #perl6
13:13 sECuRE compiling core.pir takes ages :\
13:14 masak yes. :/
13:14 masak it's likely to get better with jnthn++'s improvements.
13:17 MayDaniel joined #perl6
13:20 felliott joined #perl6
13:22 sECuRE moritz_: i now reduced it to the following code: http://p.nnev.de/1703
13:22 sECuRE moritz_: new backtrace here: http://p.nnev.de/1704
13:23 bluescreen left #perl6
13:23 bluescreen joined #perl6
13:26 stifyn joined #perl6
13:26 stifynsemons joined #perl6
13:30 bluescreen }
13:30 sECuRE moritz_: hm, now i changed it to http://p.nnev.de/1705 and get http://p.nnev.de/1706
13:33 y3llow left #perl6
13:33 y3llow joined #perl6
13:39 moritz_ sECuRE: sorry, just had a bit local stress, will try to take a look
13:39 sECuRE no worries
13:39 sECuRE just trying to compile a minimal %r = root_new …, like you suggested
13:40 moritz_ sECuRE: sholdn't you have %r = sock somewhere?
13:40 sECuRE ok, it survives the call now and errors in the open() itself. probably a similar error there
13:40 sECuRE yeah, that was what i changed just now ;)
13:45 accel left #perl6
13:45 moritz_ unless sock goto ERR # maybe should be "unless null sock goto ERR"
13:45 plobsing joined #perl6
13:48 plainhao joined #perl6
13:51 mtk left #perl6
13:51 mathw jnthn: concert's on the 16th of March... I may have managed to memorise the words by then, which would be far more helpful.
13:51 mathw there aren't, in the grand scheme of things, very many of them
13:52 jnthn mathw: :)
13:52 jnthn mathw: Sounds like fun. :)
13:52 * jnthn can't sing at all
13:52 jnthn :(
13:52 mathw it is fun :)
13:53 stifyn what are you singing?
13:53 mathw the fourth movement is "Arise, ye Russian People!" and encourages all of Russia to rise up and hack the invading enemies into tiny pieces
13:53 mathw stifyn: Prokofiev, Alexander Nevsky
13:53 jnthn Awesome!
13:54 mathw The only thing I don't like about it is the orchestra's part, which I think is a bit detracting from the singing
13:54 mathw jnthn: in all of Russia no foe shall live! We shall beat them to death! etc.
13:54 jnthn How many references to Vodka does it have? :)
13:54 mathw some of it sung very sweetly and angelic
13:54 stifyn sounds like not as many as to death :-)
13:54 mathw jnthn: none, according to our semi-literal translation
13:54 mathw at the end it mentions a festival
13:55 mathw but that's only after all the beating to death has been accomplished
13:55 jnthn Well, of course.
13:55 jnthn Need to celebrate such things. :)
13:55 mathw well they win
13:55 mathw that's the story, anyway
13:55 jnthn \o/
13:55 mathw and even let some of the prisoners go home alive
13:55 jnthn Wow, that's generous. :)
13:56 mathw mmm
13:56 mathw especially after all the stuff about how no foe shall live
13:56 sECuRE hm, when i do both calls in perl, i do get an UnManagedStruct by getaddrinfo() (that’s correct), but when i pass it to connect(), the code path which checks for address->vtable->base_type == enum_class_UnManagedStruct does not get run
13:58 jnthn Do you put it into a scalar?
13:58 sECuRE yes
13:58 jnthn If so, you're likely ending up passing the container containing the UnmanagedStruct.
13:58 sECuRE how would i directly pass it?
13:58 jnthn Look up descalarref
13:58 jnthn As in, search for usage of it in the codebase
13:58 mtk joined #perl6
13:58 jnthn May be some in IO.pm
13:59 sECuRE yep
14:00 sECuRE yes, indeed, that helps
14:00 sECuRE thanks
14:00 sECuRE yay, i can get heise.de using IPv6 \o/
14:00 sECuRE (in rakudo)
14:03 moritz_ \o/
14:03 moritz_ submit the patch, I'll apply it :-)
14:04 sECuRE cool. let me clean up stuff first and add some error handling
14:04 sECuRE btw: the necessary rakudo changes are also merged already :)
14:04 moritz_ you mean parrot changes?
14:04 sECuRE err, yes
14:05 moritz_ yes, I follow the parrot-dev mailing list
14:05 moritz_ and #parrot too :-)
14:05 sECuRE alright
14:05 sECuRE hm, in the places where root_new is used i don’t see checks if it’s null or not. is there maybe a reason that root_new can never return null?
14:06 moritz_ just try it with a random name
14:06 moritz_ I guess it'll thrown an error instead of returning new
14:06 drbean left #perl6
14:06 sECuRE yes, indeed
14:07 timbunce left #perl6
14:08 kaare_ left #perl6
14:10 GinoMan_ joined #perl6
14:11 GinoMan left #perl6
14:11 GinoMan_ left #perl6
14:21 skangas_ joined #perl6
14:22 skangas left #perl6
14:22 skangas_ is now known as skangas
14:23 cognominal left #perl6
14:23 nrr left #perl6
14:23 am0c left #perl6
14:23 cognominal joined #perl6
14:24 am0c joined #perl6
14:25 nrr joined #perl6
14:25 barika left #perl6
14:26 barika joined #perl6
14:27 cognominal left #perl6
14:29 ggoebel left #perl6
14:31 cafesofie joined #perl6
14:31 cognominal joined #perl6
14:34 ddima joined #perl6
14:34 ddima hi
14:35 ggoebel joined #perl6
14:37 takadonet ddima: hey
14:48 felliott left #perl6
14:51 kaare_ joined #perl6
14:51 kst` joined #perl6
14:52 sECuRE moritz_: done now. you can find my patch at http://t.zekjur.net/0001-Adapt-IO-Socket-INET-to-the-IPv6-supporting-rakudo-A.patch
14:52 dukeleto left #perl6
14:53 cjk101010 left #perl6
14:53 kst left #perl6
14:53 rbuels left #perl6
14:53 dukeleto joined #perl6
14:53 bluescreen left #perl6
14:54 dukeleto left #perl6
14:54 dukeleto joined #perl6
14:55 bluescreen joined #perl6
14:57 stifyn left #perl6
14:57 stifynsemons left #perl6
14:57 bluescreen left #perl6
15:00 ggoebel left #perl6
15:02 Mowah joined #perl6
15:04 mtk left #perl6
15:04 mtk joined #perl6
15:04 ggoebel joined #perl6
15:07 kst` left #perl6
15:08 kst` joined #perl6
15:08 timbunce joined #perl6
15:12 spq1 joined #perl6
15:15 timbunce left #perl6
15:15 IllvilJa left #perl6
15:16 IllvilJa joined #perl6
15:19 wtw left #perl6
15:25 Psyche^ joined #perl6
15:26 Patterner left #perl6
15:26 Psyche^ is now known as Patterner
15:28 plobsing left #perl6
15:30 stifyn joined #perl6
15:30 stifynsemons joined #perl6
15:36 plobsing joined #perl6
15:47 justatheory joined #perl6
15:48 timbunce joined #perl6
16:01 MayDaniel left #perl6
16:08 icwiener joined #perl6
16:08 pmichaud good morning, #perl6
16:08 masak morning, pmichaud.
16:09 icwiener left #perl6
16:09 icwiener joined #perl6
16:10 pmichaud lots of joins/quits this morning.... do I feel a tremor in the intertubes?
16:11 masak could be the IPcalypse starting early.
16:14 uniejo joined #perl6
16:14 jnthn o/ pmichaud
16:14 icwiener_ joined #perl6
16:16 colomon \o
16:17 icwiener left #perl6
16:28 kst` left #perl6
16:28 icwiener joined #perl6
16:29 kst` joined #perl6
16:31 timbunce left #perl6
16:32 icwiener_ left #perl6
16:32 stifyn left #perl6
16:32 stifynsemons left #perl6
16:34 am0c left #perl6
16:34 jnthn decommute &
16:35 tzhs left #perl6
16:35 uniejo left #perl6
16:37 JimmyZ joined #perl6
16:37 timbunce joined #perl6
16:39 TimToady /e
16:43 icwiener_ joined #perl6
16:43 icwiener_ left #perl6
16:43 icwiener_ joined #perl6
16:46 icwiener left #perl6
16:46 pmurias joined #perl6
16:47 pmurias what's the difference between contextual variables and Perl 5 local style ones?
16:47 pmichaud "contextual variables" are now called "dynamic variables", iirc.
16:47 pmurias contextual variables are not shared between threads
16:47 uniejo joined #perl6
16:48 masak dynamic variables can be, if they're read-only.
16:48 pmichaud anyway, dynamic variables are located by looking at lexicals in the dynamic caller frames.  I don't think there's any close equivalent in p5.
16:49 TimToady dynamic variables can be shared as long as there's a clear pecking order
16:49 TimToady even if rw
16:49 TimToady but yes, sharing ro variables is pretty easy :)
16:50 pmurias are dynamic attributes supported?
16:50 TimToady p5 locals are really just globals
16:50 masak 'local' variables in p5 are really just package gl... right.
16:50 TimToady we could have p5-style attributes if we ever implement temp
16:51 pmurias i'm reading about "Contextual Programming" and i'm trying to determin what the real difference between a dynamic variable and just setting and resetting a normal variable is
16:51 masak there is at least a little code smell inherent in p6 dynamic variables, since these are not namespaced at all. it'd be nice to see a solution for namespacing dynamic variables.
16:51 masak pmurias: url?
16:51 TimToady dynamic var is a lexical, not a global
16:52 cafesofie left #perl6
16:53 pmurias http://common-lisp.net/project/closer/contextl.html
16:53 masak thank you.
16:53 wooden left #perl6
16:54 pmurias i have to make a presentation about that tommorrow
16:54 TimToady masak: I don't think dynamic variables are useful enough to warrant the baggage of namespacing
16:54 TimToady dynamic hashes and common prefixes are probably good enough
16:54 masak TimToady: maybe.
16:55 masak TimToady: but I'd be wary every time I used both dynamicals and callbacks.
16:55 TimToady esp if we allow :: in a dynamic name :)
16:55 masak :D
16:55 masak then I'm fine :)
16:55 TimToady we can think about that
16:56 TimToady might also be useful to target the final default to a package other than GLOBAL
16:56 TimToady which makes it slightly less smelly, I suspect
16:57 TimToady std: my $*FOO::BAR = 2;
16:57 p6eval std 625303c: OUTPUT«ok 00:01 121m␤»
16:57 TimToady heh
16:57 flussence takadonet++ # looks like Text::Tabs is going to be helpful after all
16:58 masak rakudo: my $*FOO::BAR = 42; say $*FOO::BAR
16:58 p6eval rakudo 723986: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/2PoIAPndlk␤»
16:58 envi left #perl6
16:58 * masak submits rakudobug
16:58 TimToady not clear that it parsed it correctly though
16:58 TimToady s/it/std/
16:59 masak should it error out on FOO:: not being predeclared?
16:59 icwiener joined #perl6
17:00 JimmyZ left #perl6
17:00 TimToady there's definitely something wonky in the STD parse of that
17:00 pmurias where are dynamic variables specced?
17:00 TimToady nevertheless it can probably be made to work someday
17:01 uniejo left #perl6
17:01 TimToady package globals don't generally care about whether FOO:: exists yet for normal variables
17:01 masak TimToady: well, Rakudo parsed it too, since it got to runtime.
17:02 TimToady std: $FOO::bar = 42;
17:02 p6eval std 625303c: OUTPUT«ok 00:01 120m␤»
17:02 masak ok.
17:02 pmurias rakudo: my $*foo = 123;sub foo {my $*foo = 145;bar()};sub bar {say $*foo};foo()
17:02 p6eval rakudo 723986: OUTPUT«145␤»
17:02 TimToady but the tree from viv looks very strange to me
17:02 icwiener_ left #perl6
17:02 pmurias rakudo: my $*foo = 123;sub foo {my $*foo = 145;bar()};sub bar {say $*foo};foo();say $*foo;
17:02 p6eval rakudo 723986: OUTPUT«145␤123␤»
17:02 pmurias rakudo: {my $*foo = 123;sub foo {my $*foo = 145;bar()};}sub bar {say $*foo};foo();say $*foo;
17:02 p6eval rakudo 723986: OUTPUT«===SORRY!===␤Confused at line 22, near "{my $*foo "␤»
17:02 pmurias rakudo: {my $*foo = 123;sub foo {my $*foo = 145;bar()}};sub bar {say $*foo};foo();say $*foo;
17:03 p6eval rakudo 723986: OUTPUT«Could not find sub &foo␤  in main program body at line 22:/tmp/DKyZ45XZP1␤»
17:03 TimToady I see two ways to implement it
17:03 pmurias rakudo: sub bar {say $*foo};{my $*foo = 123;sub foo {my $*foo = 145;bar()};foo()}
17:03 p6eval rakudo 723986: OUTPUT«145␤»
17:03 pmurias is the last example correct?
17:03 TimToady one is by forcing $*FOO::BAR to parse "FOO::BAR" as a string
17:04 masak right.
17:04 TimToady the other is to turn $*FOO:: into a shadow package
17:04 masak hm.
17:04 TimToady I think viv is parsing consistent with the latter interpretation
17:04 icwiener_ joined #perl6
17:04 TimToady if we had shadowed hashes, it might just fall out of that
17:04 masak what would be the advantage of the latter approach?
17:05 masak shadowed hashes?
17:05 TimToady if it's not in this hash, fail over to that hash
17:05 icwiener left #perl6
17:05 TimToady so you get a chain of %*FOO:: symbol tables out to the FOO one
17:06 masak rakudo: module Foo {}; my $*Foo::bar = 42; say $*Foo::bar
17:06 p6eval rakudo 723986: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/jTBUjIfID7␤»
17:06 TimToady one problem is that package symbol tables have a slightly different sigil policy, iirc
17:07 plobsing left #perl6
17:07 TimToady pmurias: yes, it's correct
17:08 hudnix joined #perl6
17:09 hudnix left #perl6
17:09 hudnix joined #perl6
17:09 TimToady I guess the basic problem is that my %*FOO doesn't know that it's supposed to shadow its ancestor, but maybe we can force it in the :: case
17:09 icwiener_ left #perl6
17:10 icwiener joined #perl6
17:10 felliott joined #perl6
17:10 TimToady er, $*FOO does lookup in %*FOO:: I mean, and that's what doesn't necessarily know to shadow %CALLER::FOO
17:10 TimToady %CALLER::FOO:: rather
17:11 TimToady CALLER<%*FOO::> is perhaps clearer
17:11 masak aye.
17:12 dalek rakudo: 86f61b9 | (Michael Stapelberg)++ | src/core/IO/Socket/INET.pm:
17:12 dalek rakudo: Adapt IO::Socket::INET to the IPv6-supporting rakudo API
17:12 dalek rakudo:
17:12 dalek rakudo: Signed-off-by: Moritz Lenz <moritz@faui2k3.org>
17:12 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/86f61b936f
17:12 masak moritz_++
17:12 flussence yay
17:13 moritz_ sECuRE++ # he did all the work
17:13 masak \o/
17:13 TimToady anyway, probably no for 6.0.0.0.0...
17:13 TimToady *t
17:13 masak agreed.
17:14 pmurias so a dynamic var is a lexical which also looks in the callers scopes if it can't find the var?
17:14 kensanata left #perl6
17:14 TimToady something like that
17:15 TimToady it's a lexical that is declared with a * twigil as part of its name, and mentioning the * twigil in an rvalue does the lookup for the funny name up the dynamic scope
17:15 masak rakudo: my $a = 1; say $a; my $a = 2; say $a
17:15 p6eval rakudo 723986: OUTPUT«===SORRY!===␤Redeclaration of symbol $a at line 22, near " = 2; say "␤»
17:15 masak rakudo: my $*a = 1; say $*a; my $*a = 2; say $*a
17:15 p6eval rakudo 723986: OUTPUT«===SORRY!===␤Redeclaration of symbol $*a at line 22, near " = 2; say "␤»
17:16 pmurias rakudo: my $*a =1;say $a
17:16 masak std: my $*a = 1; say $*a; my $*a = 2; say $*a
17:16 p6eval rakudo 723986: OUTPUT«===SORRY!===␤Symbol '$a' not predeclared in <anonymous> (/tmp/4aRnH9xNAp:22)␤»
17:16 p6eval std 625303c: OUTPUT«Potential difficulties:␤  Useless redeclaration of variable $*a (see line 1) at /tmp/ApN9d13hU4 line 1:␤------> [32mmy $*a = 1; say $*a; my $*a[33m⏏[31m = 2; say $*a[0m␤ok 00:01 121m␤»
17:16 pmurias rakudo: my $*a =1;say $*a
17:16 p6eval rakudo 723986: OUTPUT«1␤»
17:16 masak TimToady: should pmurias' 'say $a' find $*a?
17:16 TimToady no
17:17 masak phew. :)
17:17 TimToady Sanity is overrated, but that doesn't mean it's worthless.  :)
17:17 pmurias is $*foo derived from the lisp tradition of calling dynamic vars *foo*
17:17 pmurias ?
17:18 PerlJam TimToady: would looking for $*a find an $a in an outer scope?
17:18 TimToady no
17:18 TimToady only in the final global package would it find a $a
17:18 PerlJam excellent
17:18 TimToady it strips the * before the final lookup
17:19 masak left #perl6
17:19 impious joined #perl6
17:19 TimToady I guess that's what I was thinking of earlier, so $*FOO::bar shouldn't have a problem, if package FOO is in GLOBAL
17:19 cotto_work2 joined #perl6
17:20 TimToady (and if we do the failover on not finding it)
17:20 cotto_work left #perl6
17:20 TimToady deleting keys from a shadowed hash is a bit dicey though
17:20 TimToady might need a :deleteall
17:20 TimToady if :delete defaults to the first hash that contains the key
17:21 PerlJam :obliterate
17:22 TimToady shadow hashes are basically a user-view generalization of what lexical scopes already do
17:23 TimToady so maybe hashes can have two different default policies as add ons
17:23 TimToady 1) use this default value
17:23 TimToady 2) use this default hash
17:23 PerlJam except with lexical scopes, you can look up-scope only so many levels with appropriate syntax.  How do you do that with shadow hashes?
17:24 PerlJam (I'm not even sure of the utility of this, just trying to stretch the analogy a bit)
17:26 TimToady %hash.defhash.defhash<foo>
17:26 masak joined #perl6
17:27 PerlJam ah.  Equally dehuffmanized too  :)
17:27 PerlJam though with less shouting :)
17:27 rbuels joined #perl6
17:27 sECuRE moritz_: thanks for merging!
17:28 moritz_ sECuRE: thanks for creating the patch
17:29 kst` left #perl6
17:29 rgrau joined #perl6
17:29 kst` joined #perl6
17:29 MayDaniel joined #perl6
17:30 sECuRE moritz_: you can now close #77992 :)
17:30 Tedd1 left #perl6
17:31 moritz_ sECuRE: I'm already on it
17:32 TimToady hmm, %hash<foo>:delete would automatically delete from the hash it found 'foo' in
17:32 TimToady since it's a subscript modifier, not a method on %hash
17:32 MayDaniel left #perl6
17:32 diakopter want: http://www.newegg.com/Product/Product.aspx?Item=N82E16820148349
17:32 TimToady %hash.alldefhashes»<foo>:delete would do the other thing
17:33 TimToady or just make people write the loop
17:33 pmichaud have:  http://www.newegg.com/Product/Product.aspx?Item=N82E16820167031   :-P
17:33 PerlJam did you really mean %hash.defhash»<foo>:delete  ?
17:34 TimToady that only finds one def hash, and I want the whole pedigree
17:34 PerlJam Hmm.
17:34 * masak is slightly unnerved and thinks that shadowed hashes should be opt-in
17:34 TimToady they would be
17:34 TimToady at least explicit ones
17:35 masak consider me re-nerved, then.
17:35 TimToady but dynamic hashes with :: might be an opt-in
17:35 TimToady that's what I was saying earlier
17:35 masak *nod*
17:35 masak I got that.
17:35 TimToady just trying to make you namespacehappy
17:36 masak yes, I probably shouldn't complain while you're solving my problems. :P
17:36 * diakopter just got a core-i7-2600 with sata3, and the disk is loud compared to the rest of it. so I want a sata3 and 256GB. eh, maybe the 128GB is enough.
17:36 TimToady and I do think shadow hashes are the right way to go, not lying to ourselves about ::
17:36 pmichaud diakopter: I find I get by just fine on 80gb
17:36 pmichaud diakopter: I have a standard spinning-disk drive for storage
17:36 pmichaud although I'm thinking of replacing that with an ultra-quiet drive
17:36 * diakopter looks at the sata3 intels
17:37 mberends joined #perl6
17:37 diakopter just crucial
17:37 pmichaud so, I have my OS, home dir, and working file set on the 80gb ssd for speed.  Then I keep lesser-used files and archive storage on the 320GB hdd
17:37 PerlJam TimToady: I tend to agree, but I'm not enamored of the names you've used today  :)
17:38 TimToady method names?  those are certainly negotiable
17:38 pmichaud (and I'm thinking of getting a 1TB caviar green drive)
17:38 pmichaud afk for a bit
17:38 Tedd1 joined #perl6
17:39 PerlJam TimToady: unfortunately, I have nothing to negotiate with at the moment.  Just my general dislike.
17:40 TimToady the spot where the names show up to the user will be in the declaration with "is", generally: my %foo is default(42)
17:40 TimToady that's probably the right name for the default value
17:41 TimToady for the other, I dunno, "is shadowing(%OUTER::FOO)" is a bit long
17:42 TimToady maybe it's huffmanly correct though
17:42 PerlJam that's what I think
17:42 pmichaud huffmanly correct +1
17:42 TimToady might be there's a better metaphor than "shadow" though
17:43 TimToady anyway, I should finish backlogging and then work on my talk slides for India
17:44 TimToady I'm gonna try to import into OOo, btw, since the .odf is just a zip of xmls, and I can reverse engineer the markup I want
17:45 TimToady and it'll act like a real presenter tool, hopefully
17:48 pmichaud so far I'm not giving many presentations this year, so my need for a presentation tool has lessened  :=|
17:48 pmichaud but I still want to write one :-)
17:48 masak in Perl 6?
17:48 pmichaud ideally, yes.
17:49 pmichaud I'll use whatever tool works best... but I think it'd be good to push Perl 6 development a teeny bit with it
17:49 * jnthn home :)
17:49 jnthn o/ pmichaud
17:49 jnthn #phasers in...70 mins?
17:51 mberends \o/ +1
17:51 jnthn 71 mins? ;)
17:51 pmurias left #perl6
17:51 mberends :)
17:53 pmichaud I may be late to #phasers
17:57 dalek 6model: b3bdc96 | (Martin Berends)++ | java/ (13 files):
17:57 dalek 6model: [java] augment FindMethod and Invoke with SpecialFindMethod and SpecialInvoke, still passing 45 NQP tests out of the 299 that dotnet/ does
17:57 dalek 6model: review: https://github.com/jnthn/6model/commit/b3bdc96cb0
18:01 plobsing joined #perl6
18:03 jnthn mberends: yay :)
18:04 felliott left #perl6
18:08 mberends jnthn: your recent 6guts post is very encouraging for 6model/java as well :)
18:11 felliott joined #perl6
18:14 icwiener Hi, is there a Perl6 user channel?
18:14 PerlJam This is it.
18:14 icwiener Oh. :)
18:14 PerlJam (so far)
18:14 masak we decided to do everything in one channel.
18:14 TimToady s/user/abuser/
18:14 masak :P
18:14 masak we might decide otherwise as Perl 6 grows, but right now having everything in one place has its advantages.
18:15 icwiener Sounds reasonable. :)
18:15 TimToady well, we already have two places, if you count #phasers
18:16 masak also, if you're a Yapsi developer, you're both a Perl 6 user and a Perl 6 dev. :P
18:17 icwiener Just a small question. I saw http://pastebin.com/11K6KW4k on learningperl6.com and am a bit confused. Isn't the line written to the file unchanged and then scrambled afterwards?
18:18 dakkar left #perl6
18:18 masak first off, that's old Perl 6.
18:19 masak 'for =$input -> $line' is now 'for $input.lines -> $line'.
18:19 icwiener Meh ... :) Times fly by these days.
18:19 masak second, the $line parameter as declared is read-only, so you can't just go s/// on it and expect it to work.
18:20 masak either that code was never tested against an implementation, or it ran against Pugs at some point.
18:20 masak if you do want to modify $line, you should do '-> $line is copy'.
18:21 masak but you'd still need to write it back to the/a file, if that's what you want.
18:21 masak icwiener: does that answer your question?
18:21 tadzik =$input looks like POD :)
18:22 masak long live the death of prefix:<=>!
18:22 flussence reminds me of <?=$var?> from somewhere... :)
18:22 icwiener masak: Fully. :) Thanks for the advice. I will try (rakudo just finished compiling) to use it.
18:22 masak icwiener: let us know how it goes. we're eager to fix issues and help with stuff.
18:23 icwiener masak: Are there more up-to-date introductions to the language features? Maybe https://github.com/perl6/book
18:24 icwiener masak: Sure. :)
18:25 * PerlJam wonders if merlyn or bdf still have any interest in that book.
18:25 PerlJam the proposal was written a little over 4 years ago
18:25 masak icwiener: yes, that one is up-to-date. if you're willing to take some serious technical lingo, the synopses at http://perlcabal.org/syn/ are very good as well.
18:26 woosley1 left #perl6
18:26 icwiener Thanks. :)
18:33 jarfhy joined #perl6
18:33 dalek 6model: a6a9a49 | (Martin Berends)++ | java/ (2 files):
18:33 dalek 6model: [java] add definedness and defaultValue arguments to Parameter constructor
18:33 dalek 6model: review: https://github.com/jnthn/6model/commit/a6a9a497f8
18:34 cafesofie joined #perl6
18:34 Mowah left #perl6
18:38 * moritz_ foegot to bump PARROT_REVISION after the v6 patch
18:40 cjk101010 joined #perl6
18:43 moritz_ could somebody please bump it to RELEASE_3_0_0-235-g102e7e2?
18:44 kst` is now known as kst
18:47 impious left #perl6
18:49 timbunce left #perl6
18:51 rgrau left #perl6
18:52 rgrau joined #perl6
18:53 icwiener_ joined #perl6
18:55 icwiener left #perl6
18:56 timbunce joined #perl6
18:56 tadzik I can :)
18:57 moritz_ tadzik: I was faster
18:57 tadzik yeah, just pulled :)
18:57 moritz_ tadzik: handed the small off to her mother, and now I have my hands free again :-)
18:57 vmspb joined #perl6
18:58 moritz_ masak: did you read my blog post with comments on the p6cc solutions and reviews?
18:58 dalek rakudo: 188755a | moritz++ | build/PARROT_REVISION:
18:58 dalek rakudo: bump parrot version to something that can deal with IPv6
18:58 dalek rakudo: review: https://github.com/rakudo/rakudo/commit/188755abab
18:59 * dukeleto hopes to see ipv6 support in the next rakudo dev release
18:59 tadzik :)
19:00 moritz_ dukeleto: it's already in
19:00 moritz_ dukeleto: the bump should have been included in the previous commit, I just forgot it
19:01 masak moritz_: no, I'm srsly backlogged on the blogosphere. url?
19:02 moritz_ planetsix :-)... I'll get the URL for you
19:02 moritz_ masak: http://perlgeek.de/blog-en/perl-6/thoughts-on-p6cc.html
19:03 * masak reads voraciously
19:04 masak moritz_: already on the first bullet point, it strikes me that I might want to incorporate some of these things (with attribution) into my review notes. would that be OK?
19:04 moritz_ masak: sure
19:05 masak \o/
19:05 masak "Just strange that he then reinvented subtraction" -- I didn't even think of that!
19:06 masak well, it only goes to show that *conceptually*, colomon didn't think of the Complex numbers as number data types, but just as a container data structure.
19:06 masak could as well have used Pair.
19:06 colomon masak: actually (as I just commented on in moritz_'s blog post) it's more an artifact of how the code was written.
19:07 masak oh, Complex was a late addition?
19:07 moritz_ retrospect knows always best
19:07 colomon Switching the points to a Complex type was something like the third different representation I used for them in that script.
19:07 masak moritz_: "hindsight is 20-20"
19:13 icwiener joined #perl6
19:16 colomon masak: by the way, the quick summary of my version of p2 is that almost the entire thing is attempting to get the result of fox's ($x < ($b[0]-$a[0]) * ($y-$a[1]) / ($b[1]-$a[1]) + $a[0]) carefully.  But I admit it's hard for me to explicitly justify my instinct that that expression is just begging for floating point issues.
19:16 icwiener_ left #perl6
19:20 stkowski joined #perl6
19:23 masak colomon: I readily confess to not being an expert in computational geometry, so I don't have much preference for either long or short solutions. but I'd be interested in a case where the two algorithms differed in some significant way.
19:24 colomon that's the thing.  barring the boundary cases, I think they only differ in extreme cases.
19:25 colomon If you don't care about the boundary and can live with occasional weird results given weird data, fox's solution is brilliant.
19:25 colomon and crazily enough ( as you realized) you could make it better by golfing it a bit more!
19:29 icwiener Yay. :) I struggled a bit with the output to a file but after "say $out: $line" and "$out.say $line" I found "$out.say($line)" :) Are parens mandatory there because say is used as a method?
19:30 colomon icwiener: you can also say   $out.say: $line
19:31 tylercurtis joined #perl6
19:31 icwiener_ joined #perl6
19:32 icwiener_ colomon: I think $out.say($line) comes more naturally to me for now. :)
19:33 * icwiener_ hates his roommate who reconnects all the time for being able to download more files from some mega download website. :/
19:33 icwiener_ Anyway, next stop: regexp :)
19:34 icwiener_ left #perl6
19:34 daxim left #perl6
19:34 icwiener left #perl6
19:35 jlaire left #perl6
19:37 jarfhy left #perl6
19:37 jevin joined #perl6
19:38 cafesofie left #perl6
19:54 V15170R joined #perl6
19:56 hans_ joined #perl6
19:56 klunky joined #perl6
20:11 MayDaniel joined #perl6
20:11 timbunce left #perl6
20:16 cdarroch joined #perl6
20:16 cdarroch left #perl6
20:16 cdarroch joined #perl6
20:16 MayDaniel left #perl6
20:18 timbunce joined #perl6
20:24 coldhead joined #perl6
20:25 shi joined #perl6
20:29 timbunce left #perl6
20:31 cjk101010 left #perl6
20:35 timbunce joined #perl6
20:44 plainhao left #perl6
20:44 _jaldhar left #perl6
21:01 timbunce left #perl6
21:03 kst left #perl6
21:03 kst joined #perl6
21:04 fhelmberger left #perl6
21:08 timbunce joined #perl6
21:08 hans_ left #perl6
21:10 masak quiet evening.
21:11 Kodi joined #perl6
21:11 [Coke] LALALALALALAICANTHEARYOU
21:11 tadzik sleepy evening
21:15 Kodi Locally, I've got ^^ and xor all fixed and spiffed up except for one snag: *-currying. The problem is that in order to turn Parrot Undefs into Perl 6 Falses, I wrap a subroutine call around the PAST node for the infix op, which hides the structure that Action.pm's &whatever_curry expects. But if I were to implement ^^ and xor myself as a subroutine call instead of using the "xor" pasttype, that would destroy short-circuiting. So,
21:15 Kodi anybody know of a good equivalent to the "call" pasttype that doesn't automatically evaluate every child node?
21:17 masak huh. wish I did.
21:18 pothos left #perl6
21:19 y3llow left #perl6
21:20 y3llow joined #perl6
21:21 pothos joined #perl6
21:21 Kodi I guess I could wrap every child node up in a block before passing them to my custom xor, but that sounds pretty kludgey.
21:22 masak hey, if it passes the tests... :)
21:23 molaf__ left #perl6
21:23 tylercurtis How are && and || implemented?
21:23 Kodi tylercurtis: With special, magical pasttypes.
21:23 Kodi tylercurtis: The one for xor is deficient only in that it returns a Parrot Undef when it has more than one true argument.
21:24 moritz_ Kodi: a PAST::Block isn't automatically called, afaict
21:24 moritz_ so you'd have to promote all statements to blocks or "thunks"
21:24 masak Kodi: sounds like it's the xor pasttype that ought to be fixed, then.
21:24 moritz_ and then call them from infix:<^^>
21:24 * moritz_ -> sleep
21:24 Kodi moritz_: Right, that's the idea, I think.
21:25 PerlJam Kodi: if nothing else, you'll make a pattern for short circuiting that other people can use  :)
21:26 Kodi masak: Y'know, I'm thinking you're right. The xor pasttype should probably take an additional special argument meaning "language-specific false value to be returned when we get multiple true arguments".
21:26 plobsing left #perl6
21:26 masak Kodi: why is this a problem only for xor?
21:27 masak Kodi: as you yourself said, || also returns one of the operands when given an alternative.
21:27 Kodi masak: Whenever one of the other short-circuiting operators returns a value, that value was one of its arguments.
21:27 masak hm. right.
21:27 Kodi xor is special in that when it returns false, the false value comes from nowhere.
21:28 masak Kodi: if the additional special value is optional, I don't see the harm.
21:28 Kodi Unfortunately, I'm not a Parrot developer.
21:28 PerlJam Kodi: surely you can wrap xor in a sub that does:  if  xor == Undef, return False
21:28 PerlJam or soemthing like that
21:29 Kodi PerlJam: That's exactly what I did, and which led to the Whatever-currying problem.
21:29 PerlJam oh.
21:30 felliott left #perl6
21:32 rindolf joined #perl6
21:32 rindolf Hi all.
21:33 masak rindolf, hi.
21:33 rindolf masak: what's up?
21:34 masak rindolf: I have a belly full of noms and roof over my head. not complaining :)
21:34 masak what about you?
21:34 rindolf masak: well, I was finally able to boot my laptop with kernel 2.6.37 .
21:34 rindolf masak: and I've been working on Lingua::IT::Ita2heb.
21:34 rindolf Which transliterates Italian to Hebrew.
21:35 rindolf A friend of mine created a project for it on github and I joined him.
21:35 rindolf It's not on CPAN yet.
21:35 rindolf I moosified it.
21:35 rindolf And defined my first two roles in the process.
21:35 rindolf roles seem nice.
21:36 masak they are.
21:36 PerlJam rindolf: you have to be careful about composition in Moose land sometimes, but generally they are very nice
21:37 masak PerlJam: isn't there some way to make Moose touchy about composition?
21:37 felliott joined #perl6
21:37 masak felliott++! \o/
21:38 felliott masak++!!
21:38 masak "Warning. Karma addition cycle detected."
21:38 rindolf masak: why does felliott deserve a ++?
21:39 masak rindolf: he was the only one doing things in RT and in the test suite a couple of days back.
21:39 rindolf masak: ah, OK.
21:39 rindolf felliott++
21:39 masak it was nice to see the activity roll by, and I feel he deserves karma for it.
21:40 masak pro tip: cause activity in RT and/or spectest suite, and I will give you lots of karma. :)
21:40 masak probably others as well.
21:43 Chemtox joined #perl6
21:49 Mowah joined #perl6
21:50 tylercurtis PerlJam: ooc, what is it about composition in Moose that one must be careful about?
21:51 Chemtox left #perl6
21:59 Kodi left #perl6
22:07 tylercurtis left #perl6
22:14 dalek nqp-rx/nom: 227012d | jonathan++ | / (3 files):
22:14 dalek nqp-rx/nom: Start clearing up the grammar migration. Remove the now-disused original protoregex bit.
22:14 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/227012d261
22:14 dalek nqp-rx/nom: 96bf49d | jonathan++ | / (4 files):
22:14 dalek nqp-rx/nom: Remove pre-port cursor code.
22:14 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/96bf49d5bd
22:14 dalek nqp-rx/nom: ca48590 | jonathan++ | src/Regex/Cursor.pm:
22:14 dalek nqp-rx/nom: Toss initial experimental port of Cursor to NQP. See 6model repo for diakopter++'s work on this, which is blazing the Cursor-in-NQP trail.
22:14 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/ca48590a12
22:14 dalek nqp-rx/nom: 7ef57d5 | jonathan++ | src/Regex/Cursor2.pir:
22:14 dalek nqp-rx/nom: Install the migrated Cursor, so far just installed as Regex::Cursor2, also as Regex::Cursor.
22:14 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/7ef57d52c3
22:15 MayDaniel joined #perl6
22:18 c1sung_ left #perl6
22:19 vmspb left #perl6
22:20 bacek left #perl6
22:24 c1sung joined #perl6
22:27 shi left #perl6
22:32 dalek nqp-rx/nom: 5cb2f1f | jonathan++ | src/Regex/Cursor2 (2 files):
22:32 dalek nqp-rx/nom: Eliminate Regex::Cursor2 namespace; now just the Cursor2 type object alias installation remains, plus some vestigal naming references.
22:32 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/5cb2f1f419
22:32 dalek nqp-rx/nom: 4f57429 | jonathan++ | src/ (3 files):
22:32 dalek nqp-rx/nom: Track down remaining uses of Cursor2 type object and eliminate them.
22:32 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/4f57429e87
22:32 dalek nqp-rx/nom: aa8293f | jonathan++ | src/Regex/Cursor2 (2 files):
22:32 dalek nqp-rx/nom: Eliminate use of Cursor2 in sub IDs.
22:32 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/aa8293f6fe
22:34 c1sung left #perl6
22:34 bacek joined #perl6
22:34 c1sung joined #perl6
22:34 george8 joined #perl6
22:35 george8 left #perl6
22:36 estrabd left #perl6
22:38 estrabd joined #perl6
22:39 noganex_ joined #perl6
22:40 shi joined #perl6
22:40 snearch joined #perl6
22:42 noganex left #perl6
22:43 c1sung left #perl6
22:44 kaare_ left #perl6
22:44 snearch left #perl6
22:45 MayDaniel left #perl6
22:45 dalek nqp-rx/nom: beeb40a | jonathan++ | src/stage0/ (4 files):
22:45 dalek nqp-rx/nom: Update bootstrap to eliminate usage of Regex::Cursor2 type object alias, so it can finally be removed.
22:45 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/beeb40a2ef
22:45 dalek nqp-rx/nom: 40c4ce9 | jonathan++ | src/Regex/Cursor2.pir:
22:45 dalek nqp-rx/nom: Remove installation of Regex::Cursor2.
22:45 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/40c4ce9aa8
22:45 dalek nqp-rx/nom: 5239c81 | jonathan++ | / (6 files):
22:45 dalek nqp-rx/nom: Rename files that had Cursor2 in the name.
22:45 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/5239c81428
22:46 masak jnthn++
22:46 jnthn Bootstraps. They're like walking on dominos carefully arranged in a circle.
22:46 masak you could say that again.
22:47 jnthn Bootstraps. They're like walking on dominos carefully arranged in a circle.
22:47 masak ...and you did. :)
22:47 jnthn Hey, you said I could. :P
22:50 dalek nqp-rx/nom: 619c67d | jonathan++ | src/stage0/ (4 files):
22:50 dalek nqp-rx/nom: Final bootstrap update to completely eliminate Cursor2's legacy from the source tree.
22:50 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/619c67db3a
22:50 bacek left #perl6
22:50 timbunce left #perl6
22:51 felliott left #perl6
22:53 jnthn Now I can do something interesting... :)
22:54 felliott joined #perl6
22:54 masak std: my Int ($a, $b)
22:54 p6eval std 625303c: OUTPUT«ok 00:01 120m␤»
22:55 masak rakudo: my Int ($a, $b); $b = 3.4; say $b
22:55 p6eval rakudo 188755: OUTPUT«Type check failed for assignment␤  in '&infix:<=>' at line 1␤  in main program body at line 22:/tmp/b5eEvRPLWW␤»
22:55 masak rakudo: class A { has Int ($.a, $.b) }; say A.new(:b(3.4)).b
22:56 p6eval rakudo 188755: OUTPUT«3.4␤»
22:56 jnthn Somebody should fix objects. :P
22:56 masak jnthn: is it just that attr typechecking is off?
22:56 jnthn masak: ja
22:56 masak I'm pretty sure there's a ticket for that somewhere.
22:56 jnthn Me too.
23:03 kst left #perl6
23:04 kst joined #perl6
23:15 c1sung joined #perl6
23:19 bacek joined #perl6
23:21 c1sung left #perl6
23:25 dukeleto left #perl6
23:25 dukeleto joined #perl6
23:27 c1sung joined #perl6
23:27 cotto_work2 is now known as cotto_work
23:28 masak rakudo: my %h = 1..5 Z <a> xx *; say %h.perl
23:28 p6eval rakudo 188755: OUTPUT«{"1" => "a", "2" => "a", "3" => "a", "4" => "a", "5" => "a"}␤»
23:28 masak rakudo: my %h = 1..5 Z <a> xx *; %h.delete(<2 3 4>); say %h.perl
23:28 p6eval rakudo 188755: OUTPUT«{"1" => "a", "5" => "a"}␤»
23:28 masak \o/
23:32 Mowah left #perl6
23:34 c1sung left #perl6
23:37 dalek nqp-rx/nom: a9206dd | jonathan++ | / (4 files):
23:37 dalek nqp-rx/nom: Add NQPNativeHOW meta-object for native types and native package declarator to go with it.
23:37 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/a9206dd641
23:37 dalek nqp-rx/nom: 510f09f | jonathan++ | src/ (3 files):
23:37 dalek nqp-rx/nom: Make it possible to give an attribute a type constraint. Currently only the P6opaque REPR pays attention to this.
23:37 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/510f09f0d7
23:37 dalek nqp-rx/nom: 21c8f5b | jonathan++ | src/NQP/Actions.pm:
23:37 dalek nqp-rx/nom: Cleanup some leftovers from the 6model migration.
23:37 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/21c8f5b3f7
23:37 dalek nqp-rx/nom: 4683d55 | jonathan++ | src/stage0/ (3 files):
23:37 dalek nqp-rx/nom: Push native into the bootstrap.
23:37 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/4683d55158
23:39 masak rakudo: sub foo(@a = [1, 2, 3], *@b) {}; foo()
23:39 p6eval rakudo 188755:  ( no output )
23:39 masak rakudo: sub foo(@a = [1, 2, 3], *@b) {}; foo(42)
23:39 p6eval rakudo 188755: OUTPUT«Nominal type check failed for parameter '@a'; expected Positional but got Int instead␤  in 'foo' at line 1:/tmp/eJDCjCKYyX␤  in main program body at line 22:/tmp/eJDCjCKYyX␤»
23:39 masak right.
23:44 shi left #perl6
23:46 c1sung joined #perl6
23:46 masak rakudo: sub foo(@a is copy where { .elems == 0 | 4 }) { @a ||= -1, -1, +1, +1; say @a }; foo([1,2,3,4]); say "alive"
23:46 p6eval rakudo 188755: OUTPUT«alive␤»
23:46 * masak submits rakudobug
23:46 jnthn masak: er.
23:47 jnthn You're expecting the constraint to get attached to the container?
23:47 masak rakudo: sub foo(@a is copy where { True }) { @a ||= -1, -1, +1, +1; say @a }; foo([1,2,3,4]); say "alive"
23:47 p6eval rakudo 188755: OUTPUT«alive␤»
23:47 masak jnthn: I'm expecting &foo to output something.
23:48 jnthn masak: ...oh.
23:48 jnthn er, yeah, me too. :/
23:48 Franek joined #perl6
23:48 masak rakudo: sub foo(@a is copy) { @a ||= -1, -1, +1, +1; say @a }; foo([1,2,3,4]); say "alive"
23:48 p6eval rakudo 188755: OUTPUT«alive␤»
23:48 masak huh. no where clause needed.
23:48 jnthn is it the is copy?
23:48 masak otherwise we can't assign.
23:49 masak this feels familiar...
23:49 * masak czechs
23:49 masak I might have been remembering http://rt.perl.org/rt3/Ticket/Display.html?id=74430
23:50 jnthn oh
23:50 jnthn looks related.
23:50 masak yeah.
23:51 masak this goes in too, though.
23:51 jnthn Please add a ref to the other ticket.
23:51 masak sure thing :)
23:52 jnthn rakudo: sub foo(@a) { say PARROT(@a) }; sub bar(@a is copy) { say PARROT(@a) }; foo([1,2]); bar([1,2])
23:52 p6eval rakudo 188755: OUTPUT«ObjectRef->ObjectRef->Array␤Array␤»
23:52 jnthn FAIL
23:52 masak rakudo: my @a; @a ||= -1, -1, +1, +1; say @a.perl
23:52 p6eval rakudo 188755: OUTPUT«[-1]␤»
23:53 masak not what I expected, but better than the other one :)
23:53 masak is ||= always item assignment?
23:53 dalek nqp-rx/nom: d5dc5d8 | jonathan++ | / (2 files):
23:53 dalek nqp-rx/nom: Add int, num, str.
23:53 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/d5dc5d88e5
23:53 dalek nqp-rx/nom: 1e3ab6a | jonathan++ | src/metamodel/how/NQPNativeHOW.pm:
23:53 dalek nqp-rx/nom: Add int.^name et al.
23:53 dalek nqp-rx/nom: review: https://github.com/perl6/nqp-rx/commit/1e3ab6a48a
23:53 jnthn Not sure off hand.
23:54 jnthn std: my @a; @a = my $a, my $b;
23:54 p6eval std 625303c: OUTPUT«ok 00:01 122m␤»
23:54 jnthn std: my @a; @a ||= my $a, my $b;
23:54 p6eval std 625303c: OUTPUT«ok 00:01 122m␤»
23:54 jnthn oh, hmm
23:54 * jnthn wanted to make std spit out an unused warning or something :)
23:54 masak not sure STD does sink checks.
23:54 jnthn Yeah...it does *something* but not that. :)
23:56 c1sung left #perl6
23:56 jnthn masak: See if STD.pm6 around 3326 makes any sense to you :)
23:57 * masak looks
23:57 jnthn There's some condition in there that determines whether it's list or item assignment.
23:58 masak makes a lot of sense.
23:58 jnthn Rakudo gets it RONG
23:59 jnthn token infix_postfix_meta_operator:sym<=> { '=' <O('%item_assignment')> }
23:59 jnthn Unconditionally item ass.
23:59 jnthn Not sure how hard it is to port the STD thingy.
23:59 kst left #perl6
23:59 jnthn Probably not too bad.
23:59 masak right. ||= should be item ass., though.

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

Perl 6 | Reference Documentation | Rakudo