Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-12-26

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:03 kivutar joined #perl6
00:07 jnap joined #perl6
00:08 hummeleB1 joined #perl6
00:09 kaare_ joined #perl6
00:17 finanalyst joined #perl6
00:18 gfldex joined #perl6
00:18 rurban1 joined #perl6
00:46 colomon joined #perl6
01:08 jnap joined #perl6
01:33 rurban1 joined #perl6
02:02 dalek nqp: 8e407b3 | dwarring++ | examples/rubyish/ (3 files):
02:02 dalek nqp: rubyish; 2.x like named parameters
02:02 dalek nqp: review: https://github.com/perl6/nqp/commit/8e407b3e1a
02:07 colomon joined #perl6
02:09 jnap joined #perl6
02:21 ggoebel118 joined #perl6
02:24 kst`` joined #perl6
02:25 DrEeevil joined #perl6
02:26 sivoais_ joined #perl6
02:27 TimToady r: say 'foo'.IO.read(1024)
02:27 camelia rakudo-parrot 6d54dc: OUTPUT«No such method 'read_bytes' for invocant of type 'Any'␤  in method read at gen/parrot/CORE.setting:13123␤  in block  at /tmp/be1uuc_eWf:1␤␤»
02:27 camelia ..rakudo-jvm 6d54dc: OUTPUT«readfh requires an object with the IOHandle REPR␤␤»
02:28 retupmoc1 joined #perl6
02:28 TimToady get the same error locally despite 'foo' existing
02:29 dayangkun_ joined #perl6
02:31 TimToady moarvm-support branch, will try again with star as soon as it compiles
02:31 Bucciarati_ joined #perl6
02:35 TimToady r: say $*CWD
02:35 camelia rakudo-jvm 6d54dc: OUTPUT«IO::Path</home/p6eval_eval>␤»
02:35 camelia ..rakudo-parrot 6d54dc: OUTPUT«IO::Path</home/p6eval>␤»
02:35 TimToady r: say dir('.');  # allowed?
02:36 camelia rakudo-parrot 6d54dc: OUTPUT«IO::Path<.lesshst> IO::Path<.viminfo> IO::Path<.ghc> IO::Path<rakudo> IO::Path<rakudo-inst-2> IO::Path<rakudo-inst-1> IO::Path<std> IO::Path<.bash_history> IO::Path<log> IO::Path<.selected_editor> IO::Path<.ssh> IO::Path<nom-inst> IO::Path<.profile> IO::…»
02:36 camelia ..rakudo-jvm 6d54dc: OUTPUT«IO::Path<.viminfo> IO::Path<p6eval-token> IO::Path<nohup.out> IO::Path<.bash_history> IO::Path<.selected_editor> IO::Path<.config> IO::Path<hs_err_pid18610.log>␤»
02:36 TimToady r: '.viminfo'.IO.s.say
02:36 camelia rakudo-jvm 6d54dc: OUTPUT«734␤»
02:36 camelia ..rakudo-parrot 6d54dc: OUTPUT«6346␤»
02:36 TimToady r: '.viminfo'.IO.read(1024).say
02:36 camelia rakudo-parrot 6d54dc: OUTPUT«No such method 'read_bytes' for invocant of type 'Any'␤  in method read at gen/parrot/CORE.setting:13123␤  in block  at /tmp/YxYuO0Wr8m:1␤␤»
02:36 camelia ..rakudo-jvm 6d54dc: OUTPUT«readfh requires an object with the IOHandle REPR␤␤»
02:37 TimToady rakudobug ^^^ ?
02:37 TimToady r: open('.viminfo').read(1024).say
02:37 camelia rakudo-parrot 6d54dc: OUTPUT«open is disallowed in restricted setting␤  in sub restricted at src/RESTRICTED.setting:2␤  in sub open at src/RESTRICTED.setting:5␤  in block  at /tmp/pwPNC3Umaj:1␤␤»
02:37 camelia ..rakudo-jvm 6d54dc: OUTPUT«Buf:0x<23 20 54 68 69 73 20 76 69 6d 69 6e 66 6f 20 66 69 6c 65 20 77 61 73 20 67 65 6e 65 72 61 74 65 64 20 62 79 20 56 69 6d 20 37 2e 34 2e 0a 23 20 59 6f 75 20 6d 61 79 20 65 64 69 74 20 69 74 20 69 66 20 79 6f 75 27 72 65 20 63 61 72 65 66 75 6c 21 0a 0…»
02:38 TimToady okay, I guess
02:38 BenGoldberg joined #perl6
02:38 felher joined #perl6
02:38 TimToady r: '.viminfo'.IO.lines.elems.say
02:38 camelia rakudo-parrot 6d54dc: OUTPUT«260␤»
02:38 camelia ..rakudo-jvm 6d54dc: OUTPUT«37␤»
02:39 TimToady r: '.viminfo'.IO.blocks.elems.say;   # is there any equivalent to this?
02:39 camelia rakudo-jvm 6d54dc: OUTPUT«No such method 'blocks' for invocant of type 'IO::Handle'␤␤»
02:39 camelia ..rakudo-parrot 6d54dc: OUTPUT«No such method 'blocks' for invocant of type 'IO::Handle'␤  in block  at /tmp/oZ7Xzs_ZkJ:1␤␤»
02:39 Rix joined #perl6
02:39 cotto joined #perl6
02:39 daxim joined #perl6
02:40 TimToady one doesn't really wish to use either .lines or .slurp to compare binary files of arbitarary size
02:51 raiph joined #perl6
02:51 sivoais joined #perl6
03:14 cognominal joined #perl6
03:19 BenGoldberg For binary files, one would probably want to read in fixed-sized chunks... maybe a .bufs method, which returns a lazy list of bufs?
03:24 BenGoldberg At the very least, there hsould be a slurp-like method which returns the contents of entire file a buf
03:24 TimToady slurp(:bin) probably is already specced for that
03:24 vinian joined #perl6
03:25 TimToady r: '.viminfo'.IO.slurp(:bin).WHAT.say
03:25 camelia rakudo-parrot 6d54dc, rakudo-jvm 6d54dc: OUTPUT«(Buf[uint8])␤»
03:25 TimToady and, in fact, works :)
03:25 BenGoldberg Oh, ok, nevermind ;)
03:26 BenGoldberg r: '.viminfo'.IO.lines(:bin).elems.say
03:26 camelia rakudo-parrot 6d54dc: OUTPUT«260␤»
03:26 camelia ..rakudo-jvm 6d54dc: OUTPUT«37␤»
03:27 BenGoldberg Clearly :bin is ignored
03:27 BenGoldberg Well, probably
03:27 vinian hi, there is a typo in the page  http://rakudo.org/2013/12/25/rakudo-star-2013-12-released/            line 95 :  <p>There is an online resource at <a href="http://http://perl6.org/compilers/features">http://perl6.org/compilers/features</a> that lists the known implemented and missing features of Rakudo and<br />
03:27 BenGoldberg r: '.viminfo'.IO.lines(:bin)[0].say
03:27 camelia rakudo-parrot 6d54dc, rakudo-jvm 6d54dc: OUTPUT«# This viminfo file was generated by Vim 7.4.␤»
03:28 vinian <a href=""   has a addition http://
03:30 Vlavv_ joined #perl6
03:35 TimToady lue: ^^^
03:39 lue vinian, TImToady: got it!
03:39 kaleem joined #perl6
03:43 gfldex joined #perl6
04:01 raiph joined #perl6
04:11 jnap joined #perl6
04:50 xenoterracide joined #perl6
04:51 preflex_ joined #perl6
05:11 jnap joined #perl6
05:12 hoverboard joined #perl6
05:16 xenoterracide joined #perl6
05:21 kaleem joined #perl6
05:28 xenoterracide joined #perl6
05:40 rurban1 joined #perl6
05:40 SamuraiJack joined #perl6
05:56 preflex joined #perl6
06:12 jnap joined #perl6
07:13 jnap joined #perl6
07:27 darutoko joined #perl6
07:40 dmol joined #perl6
07:56 fridim_ joined #perl6
08:01 FROGGS[mobile] joined #perl6
08:08 kaare_ joined #perl6
08:12 FROGGS[mobile] joined #perl6
08:14 jnap joined #perl6
08:17 FROGGS[mobile] joined #perl6
08:21 kaare_ joined #perl6
09:00 kaare_ joined #perl6
09:23 kaare_ joined #perl6
09:25 Rotwang joined #perl6
10:14 vinian left #perl6
10:15 jnap joined #perl6
10:22 kivutar joined #perl6
10:27 dagurval r: '.viminfo'.IO.slurp(:bin)[*-10].say
10:27 camelia rakudo-parrot 6d54dc: OUTPUT«104␤»
10:27 camelia ..rakudo-jvm 6d54dc: OUTPUT«10␤»
10:28 dagurval Different output o_o
10:28 FROGGS different directories?
10:28 dagurval oh, right :)
10:28 FROGGS r: '.viminfo'.IO.m.say
10:28 camelia rakudo-parrot 6d54dc: OUTPUT«No such method 'm' for invocant of type 'IO::Handle'␤  in block  at /tmp/u_rvdbIZkw:1␤␤»
10:28 camelia ..rakudo-jvm 6d54dc: OUTPUT«No such method 'm' for invocant of type 'IO::Handle'␤␤»
10:29 FROGGS r: '.viminfo'.IO.modified.say
10:29 camelia rakudo-parrot 6d54dc: OUTPUT«1386077547␤»
10:29 camelia ..rakudo-jvm 6d54dc: OUTPUT«1382520406␤»
10:30 felipe joined #perl6
10:32 rindolf joined #perl6
10:44 spider-mario joined #perl6
10:48 spider-mario joined #perl6
11:16 jnap joined #perl6
11:25 timotimo the 5 minute slots fro the lightning talks are already completely booked :(
11:25 timotimo only some 180-second slots are left
11:26 FROGGS timotimo: for which event?
11:31 timotimo 30l3
11:33 FROGGS hmmm, google doesn't know about it :/
11:36 Rotwang hi
11:36 FROGGS hi
11:37 Rotwang did someone report any problems with latest release regarding building it?
11:38 FROGGS I dunno, I was afk mostly
11:38 Rotwang ok, I'll be probably the first one then [;
11:39 FROGGS :/
11:42 FROGGS Rotwang: are you going to debug it?
11:43 Rotwang that's what I usually do first
11:43 FROGGS but probably it is just that you have another perl6/nqp-p/parrot in path?
11:43 daxim FROGGS, https://events.ccc.de/congress/2013
11:44 FROGGS daxim: thanks
11:46 timotimo sorry, 30c3
11:46 timotimo typo'd it
11:47 vinian joined #perl6
11:48 vinian joined #perl6
11:51 colomon joined #perl6
11:53 Rotwang FROGGS: yeah, nqp 2013.12.1 is needed and I had 2013.12
11:53 Rotwang however, the Configure.pl error message was completely undescriptive
11:54 FROGGS :/
11:59 vinian joined #perl6
12:01 vinian joined #perl6
12:01 vinian joined #perl6
12:02 moritz Rotwang: what did it say?
12:02 Rotwang moritz: I'll try to patch it and will probably do a bug report
12:05 denisboyun joined #perl6
12:14 atroxaper joined #perl6
12:17 jnap joined #perl6
12:21 finanalyst joined #perl6
12:22 timotimo i have no idea what i've done, but somehow my laptop is now exactly as fast at stage parse than my desktop was, rather than 3x slower ....... wat?!
12:22 timotimo i mean, i'% happy about that, but ... how?! why?!
12:22 FROGGS O.o
12:23 dalek rakudo/multi_arity_sequence_endpoint: 53c60ca | (Timo Paulssen)++ | src/core/operators.pm:
12:23 dalek rakudo/multi_arity_sequence_endpoint: fix thinko about direction
12:23 dalek rakudo/multi_arity_sequence_endpoint: review: https://github.com/rakudo/rakudo/commit/53c60ca336
12:24 dalek rakudo/nom: 6c13c21 | (Timo Paulssen)++ | src/core/operators.pm:
12:24 dalek rakudo/nom: start working on higher arity endpoint codes for SEQUENCE
12:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6c13c21093
12:24 dalek rakudo/nom: c248769 | (Timo Paulssen)++ | / (2 files):
12:24 dalek rakudo/nom: finish up multi-arity-limit, run the pre-existing tests
12:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/c2487697fe
12:24 dalek rakudo/nom: bc572cd | (Timo Paulssen)++ | src/core/operators.pm:
12:24 dalek rakudo/nom: towards @_ support and increasing seqs by default
12:24 dalek rakudo/nom:
12:24 dalek rakudo/nom: if the arity of the code for the limit is 0 and the count
12:24 dalek rakudo/nom: is Inf, I try to pass all values so far into the code.
12:24 dalek rakudo/nom:
12:24 dalek rakudo/nom: in addition, lists that start with a single number and then
12:24 dalek rakudo/nom: have a limit block will now be increasing, rather than
12:24 dalek rakudo/nom: decreasing (strange to have ... * be increasing and ... * > 5
12:24 dalek rakudo/nom: be decreasing instead)
12:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/bc572cd6dd
12:24 dalek rakudo/nom: 53c60ca | (Timo Paulssen)++ | src/core/operators.pm:
12:24 dalek rakudo/nom: fix thinko about direction
12:24 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/53c60ca336
12:24 timotimo yays
12:24 dalek roast: dbb32bb | (Timo Paulssen)++ | S03-sequence/limit-arity-2-or-more.t:
12:24 dalek roast: Revert "fudge two hanging WIP spectests for sequences"
12:24 dalek roast:
12:24 dalek roast: This reverts commit a734f7ccdcefc6b426fc0daa6bda243cda1f9dc1.
12:24 dalek roast: review: https://github.com/perl6/roast/commit/dbb32bb361
12:31 dalek specs: dec4bda | (Timo Paulssen)++ | S03-operators.pod:
12:31 dalek specs: spec multi-arity limit closures for sequence operator
12:31 dalek specs: review: https://github.com/perl6/specs/commit/dec4bda22b
12:36 timotimo now i'll resolve #35 as well
12:37 FROGGS timotimo++
12:40 timotimo https://gist.github.com/timo/945ca69bf250920349e7 - is that worded well?
12:42 FROGGS don't ask me :o)
12:42 timotimo http://perlcabal.org/syn/S05.html#Indirectly_quantified_subpattern_captureshttp://perlcabal.org/syn/S05.html#Indirectly_quantified_subpattern_captures
12:42 zakharyas joined #perl6
12:43 sqirrel joined #perl6
12:47 Rotwang Data::Dumper is the best thing ever (since sliced bread of course)
13:04 denis_boyun joined #perl6
13:05 rurban1 joined #perl6
13:16 dmol joined #perl6
13:17 jnap joined #perl6
13:19 corecatcher joined #perl6
13:19 grep0r joined #perl6
13:20 nam_ joined #perl6
13:21 nam_ do we have a rough ETA on when rakudo will be on JVM?
13:23 moritz nam_: it already is
13:23 moritz nam_: and, in fact, passes more spectests than rakudo on parrot
13:23 moritz it's just lack of nativecall support that prevents R* from running on rakudo-jvm
13:25 kaare_ joined #perl6
13:27 kaleem joined #perl6
13:29 denis_boyun joined #perl6
13:35 anuby_h joined #perl6
13:47 denis_boyun joined #perl6
13:54 Ulti is there a split on a filehandle that just does something like lines but with a given character or regex?
13:58 timotimo thereis no comb method for that? :(
13:58 lue joined #perl6
14:02 ajr joined #perl6
14:05 rurban1 joined #perl6
14:07 denisboyun joined #perl6
14:09 moritz no, you have to .slurp.split or so
14:09 moritz the problem with regexes is that currently we have no method to say "end of string reached, give me more"
14:10 moritz so if a regex match fails, we'd have to read more input, and do the whole match again
14:11 FROGGS I think there is something like open( :nl($delim) ) specced..., though it is NYI
14:18 jnap joined #perl6
14:20 colomon moritz: you thinking of Cat?
14:21 moritz colomon: that's kinda related, yes
14:21 colomon yeah, that's a definite area where work is needed, IMO
14:36 rurban1 joined #perl6
14:37 sqirrel joined #perl6
14:37 timotimo it's also what we need to implement so that we can get a more proper / comfortable repl experience
14:38 timotimo as in: "please enter the next line of the command you want to issue"
14:38 timotimo so we can have multiline class nand sub definitions on the repl
14:38 smash_ joined #perl6
14:38 timotimo of course, multiline editing is a whole 'nother beast to tackle :)
14:38 timotimo moritz: what do you think of my latest gist i linked?
14:38 moritz timotimo: haven't seen it yet
14:38 moritz timotimo: just a sec
14:39 timotimo :)
14:39 timotimo my network connection is acting up a little
14:42 timotimo so many shirds/hoodies from the previous congresses on this train :D
14:46 moritz timotimo: https://gist.github.com/moritz/60669e77eb2085ba0a18 if I got the context right, that's how I'd formulate it
14:47 erkan joined #perl6
14:54 denis_boyun_ joined #perl6
14:55 Rotwang joined #perl6
14:55 timotimo great, i'll push it then :)
15:06 logie joined #perl6
15:14 odoacre joined #perl6
15:19 jnap joined #perl6
15:20 lue joined #perl6
15:33 atroxaper joined #perl6
15:39 jnap joined #perl6
16:03 ajr joined #perl6
16:05 rurban1 joined #perl6
16:10 timotimo *now* i'll push it
16:11 dalek specs: a3b2ac0 | (Timo Paulssen)++ | S05-regex.pod:
16:11 dalek specs: fixes issue #35 - handling ? inside indirectly quantified groups
16:11 dalek specs: review: https://github.com/perl6/specs/commit/a3b2ac0150
16:11 timotimo \o/
16:11 timotimo congress is amazing
16:11 timotimo there's *so much* more space than last time
16:11 timotimo and last time it was already frighteningly large
16:13 SamuraiJack_ joined #perl6
16:28 treehug88 joined #perl6
16:39 ajr_ joined #perl6
16:52 vinian left #perl6
16:56 FROGGS[mobile] timotimo: have fun!
16:58 gfldex joined #perl6
16:59 timotimo i surely will!
16:59 timotimo one person in the congress irc channel already asked me if i want to do a workshop :D
16:59 timotimo i think i'll try to get something set up
17:04 FROGGS[mobile] joined #perl6
17:05 FROGGS[mobile] that sounds nice :o)
17:05 ajr joined #perl6
17:18 xenoterracide joined #perl6
17:34 fribeiro joined #perl6
17:35 fribeiro Hello there, does anyone know if there is a bug opened for the issue discussed at http://irclog.perlgeek.de/perl6/2013-08-18#i_7467343?
17:36 fribeiro it just hit me while playing with the current code in master
17:40 fribeiro joined #perl6
17:53 timotimo fribeiro: i have no idea what that refers to, unfortunately :(
17:53 * moritz doesn't understand it either
17:53 TimToady you have to take the ? off the link
17:53 moritz yes, that much I managed
17:53 timotimo mhm
17:53 timotimo and it seems to refer to the java interop
17:54 TimToady something about calling a Java interface instead of something proxying it, maybe?
17:54 timotimo i found that problem (well, something similar to it) in my branch that's supposed to implement arity-based dispatchers
17:54 * TimToady doesn't follow it entirely either, but sorear++ seemed ot have an idea of what was going on
17:55 denis_boyun joined #perl6
17:55 timotimo in that the interop will expose functions with wrong return values if they were overriden by a deriving class
17:55 timotimo but the error i got was different
17:56 FROGGS[mobile] joined #perl6
17:56 timotimo fribeiro: can you paste some example code that shows the problem?
17:56 TimToady but sounds like it's related to the fact that Java really doesn't grok the importance of being virtual
17:58 TimToady (or values performance with wrong results over correct results, maybe :)
17:58 ssutch joined #perl6
17:59 timotimo :)
17:59 timotimo hey ssutch :)
17:59 timotimo how are you doing?
17:59 ssutch hey, good morning
18:00 ssutch recovering from family
18:00 timotimo heh :)
18:00 * TimToady is still with family, but retreats frequently to a back bedroom :)
18:00 timotimo this year i only had to put up with the people closest to me, which i hold very dear
18:01 timotimo and some people i missed. but some I didn't mind missing
18:02 TimToady at least I only have to put up with people younger than me this year, who are largely my fault, one way or another :)
18:02 ssutch hah
18:02 hummeleB1 joined #perl6
18:03 timotimo are you up to any new exciting perl6 things in the coming year? :)
18:03 ssutch as much as possible
18:04 timotimo cool!
18:04 ssutch the potential for jvm work is really intriguing as i do much of my work on the jvm
18:05 timotimo that's very nice! :)
18:05 ssutch lots of clojure and java
18:05 ajr joined #perl6
18:05 timotimo i've been working on improved call-jvm-stuff-from-rakudo support
18:05 ssutch oh sweet
18:05 timotimo but i ran into a wall trying to move the thing over from nqp to rakudo where jnthn says it belongs
18:06 ssutch any 2014 perl6 aspirations for yourself?
18:06 timotimo yeah, until now you had to specify the whole method name + signature if there's overloading happening; now you can use the short method name if the given arity has an unambiguous dispatch it can do
18:07 timotimo ideally, it would try to resolve the number of arguments at compile time if it can (it should be able to do that in any case except with | arguments), but i don't know how to communicate that properly
18:10 timotimo 2014 aspirations? nothing in particular. just always do nice improvements :)
18:21 colomon joined #perl6
18:25 fribeiro joined #perl6
18:25 fribeiro oops, I am back
18:26 fribeiro timotimo: here is the code that I was working on when I hit the issue:
18:26 fribeiro use org::apache::activemq::ActiveMQConnectionFactory:from<java>:jar('activemq-all-5.9.0.jar');
18:26 fribeiro my $connFactory = ActiveMQConnectionFactory.'constructor/new/(Ljava/lang/String;)V'('tcp://localhost:61616');
18:26 fribeiro my $conn = $connFactory.'method/createConnection/()Ljavax/jms/Connection;'();
18:26 fribeiro $conn.'method/close/()V'();
18:26 fribeiro javax.jms.Connection is a interface type
18:27 raiph joined #perl6
18:28 moritz have you tried using the class name instaed?
18:29 fribeiro moritz: I guess I did, but let me do it again real quick and get back to you
18:31 fribeiro No such method 'method/createConnection/()Lorg/apache/activemq/ActiveMQConnection;' for invocant of type 'org.apache.activemq.ActiveMQConnectionFactory'
18:32 fribeiro moritz: that is what you wanted me to try, right?
18:32 moritz fribeiro: yes
18:34 fribeiro moritz: it seems not be evaluating $conn to the actual object
18:34 moritz fribeiro: then maybe the invocant isn't what you think it is/should be?
18:36 fribeiro the method createConnection returning a javax.jms.Connection instance really exists in ActiveMQConnectionFactory
18:36 fribeiro it is defined in an interface that is implemented by that class
18:39 colomon joined #perl6
18:42 TimToady does the interface need to be punned (as we pun roles into classes)?
18:42 ajr joined #perl6
18:44 timotimo TimToady: java works a bit differently, i fear
18:47 timotimo you get an "actual object" that
18:47 timotimo ~
18:47 TimToady I meant, punned in the glue code somehow, not forcing Java to do something it can't
18:47 timotimo ~
18:47 timotimo sorry, unreliable network :P
18:47 timotimo hey!
18:47 timotimo i should totally 3dprint a camelia action figure
18:48 FROGGS timotimo: you do have a 3d printer?
18:48 FROGGS[mobile] joined #perl6
18:48 timotimo i'm sitting one table away from currently 5
18:48 TimToady we'd have to figure out what camelia's backside looks like...
18:48 FROGGS hehe, cool :o)
18:48 timotimo across the room is another one that's about as tall as a maxi tower and cube-sized
18:49 FROGGS TimToady: do we wanna know its backside at all?
18:49 timotimo there's also 3 foil cutting plotters, 3 embroidery machines, probably a cnc laser
18:49 FROGGS I have an embroidery machine too
18:50 TimToady or are you just thinking 2.5d like a wall carving?
18:50 FROGGS and a friend owns a plotter... but a 3d printer or a cnc laser would be damn awesome to have
18:50 FROGGS "wall carving", lol
18:51 TimToady or are you just thinking a projection of the 2d image into 3d?
18:51 FROGGS that would be the easiest
18:51 ssutch joined #perl6
18:52 FROGGS should look nice to have a camelia image lasered into a cube of clear plastic
18:52 broquaint joined #perl6
18:52 itz joined #perl6
19:06 mtk joined #perl6
19:10 Ulti hmm how is newline defined for something like .lines? does it rely on the actual compiled definition within NQP? I can't see anything in IO.Spec stuff for defining line endings
19:12 Ulti Str.chomp appears to have it there :S
19:12 timotimo someone wrote it today already: in open, you're supposed to be able to specify a character to replace \n
19:12 FROGGS Ulti: nqp::readlinefh is in charge to return a line, and I think it has \r\n, \n and \n\r hardcoded
19:13 Ulti k k
19:17 Ulti timotimo do you mean implemented in NQP?
19:19 thou joined #perl6
19:19 timotimo not yet implemented :)
19:21 Ulti so should this be part of readlinefh in nqp or just implemented using readfh in Rakudo?
19:21 timotimo good question.
19:21 hoverboard joined #perl6
19:22 timotimo probably the latter, as it's not that important for nqp itself
19:22 Ulti because the latter I was just playing around doing
19:22 Ulti but feels like NQP would be a better place and just pass down the :$nl
19:22 Ulti then again the chomp is done only in Rakudo
19:23 hoverboard I was surprised to see this channel's run by an entirely different group than #perl
19:23 Ulti guess readlinefh unless :$nl is defined is the least impacting thing
19:24 colomon joined #perl6
19:32 FROGGS I think it should be implemented in nqp
19:32 FROGGS you stick the :nl information to the file handle created by open(), and that is what nqp::readlinefh gets
19:38 Ulti dunno you might want to change it after opening the file too its basically on the call to get you do anything with it
19:38 Ulti is looping over nqp::read going to be slower in Rakudo?
19:42 Ulti the code is essentially already in Str.lines
19:43 FROGGS Ulti: there is an nqp::setencodingfh or so, which will update such an information on a filehandle
19:43 FROGGS would be the same thing to implement a nqp::setlinedelimfh and call this in rakudo's open()
19:57 shinobicl joined #perl6
20:00 colomon joined #perl6
20:06 ajr joined #perl6
20:08 sjn_ joined #perl6
20:15 census2 joined #perl6
20:17 japhb hoverboard: Yup -- there's actually a number of people here who don't speak Perl 5, just Perl 6.  And the culture differs too.
20:22 xenoterracide joined #perl6
20:22 Ulti FROGGS for NQP it means per VM code by the looks of it... for something that goes into Rakudo naturally enough in its own Handle object, does it make that much difference using nqp::index and nqp::readfh from Rakudo?
20:24 FROGGS Ulti: how exactly do you want to read a line then in rakudo?
20:24 FROGGS char by char?
20:25 FROGGS or do you want to read everything, and hope that it does not block?
20:25 FROGGS or do you want to read a line up to a \n, and then split it apart?
20:48 raiph joined #perl6
21:08 dagurval rp: my Str @h is default("Hello"); @h[1] = "World"; say @h;
21:08 camelia rakudo-parrot 53c60c: OUTPUT«(Any) World␤»
21:08 dagurval should it not be Hello World?
21:09 FROGGS rp: my @h is default("Hello"); @h[1] = "World"; say @h;
21:09 camelia rakudo-parrot 53c60c: OUTPUT«(Any) World␤»
21:09 hoverboard joined #perl6
21:09 FROGGS hmmm, weird
21:11 dagurval No type checking either
21:11 dagurval rp: my Int @b is default(False);
21:11 camelia rakudo-parrot 53c60c: ( no output )
21:11 dagurval rp: my Int $b is default(False);
21:11 camelia rakudo-parrot 53c60c: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/5R5gpVye5f�Type check failed in assignment to '$b'; expected 'Int' but got 'Bool'�at /tmp/5R5gpVye5f:1�------> �»
21:12 kivutar joined #perl6
21:12 dagurval oh, that's mentioned in the advent blog post :)
21:17 dayangkun_ joined #perl6
21:19 TimToady p: my @h is default("Hello"); @h[1] = "World"; say @h[0];
21:19 camelia rakudo-parrot 53c60c: OUTPUT«Hello␤»
21:19 TimToady huh
21:19 TimToady p: my @h is default("Hello"); @h[1] = "World"; say @h[*];
21:20 camelia rakudo-parrot 53c60c: OUTPUT«Hello World␤»
21:20 TimToady obviously the defaulting code is in .[] or thereabouts, and say @h doesn't use it
21:20 lue p: my @h is default("Hello"); @h[1] = "World"; say @h;
21:20 camelia rakudo-parrot 53c60c: OUTPUT«(Any) World␤»
21:21 TimToady that's what dagurval++ was trying above
21:22 TimToady (the type constraint has nothing to do with the bug, methinks)
21:22 lue ah, didn't notice the "no constraint" test earlier
21:22 TimToady p: my @h is default("Hello"); @h[1] = "World"; say @h[];
21:22 camelia rakudo-parrot 53c60c: OUTPUT«(Any) World␤»
21:23 TimToady p: my @h is default("Hello"); @h[1] = "World"; print @h, "\n";
21:23 camelia rakudo-parrot 53c60c: OUTPUT«use of uninitialized value of type Any in string context  in block  at /tmp/7PWqB9Mx7P:1␤␤World␤»
21:23 TimToady heh
21:24 FROGGS p: my @h is default("Hello"); @h[1] = "World"; say join ' ', map { $_.gist }, @h # that is what List.gist does
21:24 camelia rakudo-parrot 53c60c: OUTPUT«(Any) World␤»
21:27 TimToady arguably, what should happen here is that assignment to @h[1] should fill in missing elements with the default rather than the type
21:28 lue TimToady: It doesn't even fill with the type (see my Str @h earlier)
21:28 lue rp: my Str @h; @h[1] = "World"; say @h;
21:28 camelia rakudo-parrot 53c60c: OUTPUT«(Any) World␤»
21:29 TimToady p: my @h is default(42); @h[1] = 582; @h[0] += 1; say @h
21:29 camelia rakudo-parrot 53c60c: OUTPUT«43 582␤»
21:29 TimToady that works right though
21:29 FROGGS because .at_pos does the right thing...
21:29 TimToady subscripting
21:30 TimToady p: my @h is default(42); @h[1] = 582; say ++«@h
21:30 camelia rakudo-parrot 53c60c: OUTPUT«Cannot modify an immutable value␤  in sub prefix:<++> at gen/parrot/CORE.setting:1734␤  in sub prefix:<++> at gen/parrot/CORE.setting:1732␤  in sub hyper at gen/parrot/CORE.setting:16769␤  in sub hyper at gen/parrot/CORE.setting:16712␤  in sub …»
21:30 TimToady hmm
21:30 TimToady p: my @h is default(42); @h[1] = 582; say @h X+ 1
21:30 camelia rakudo-parrot 53c60c: OUTPUT«use of uninitialized value of type Any in numeric context  in block  at /tmp/qYYC31mYiV:1␤␤1 583␤»
21:31 TimToady p: my @h is default($(42)); @h[1] = 582; say ++«@h
21:31 camelia rakudo-parrot 53c60c: OUTPUT«Cannot modify an immutable value␤  in sub prefix:<++> at gen/parrot/CORE.setting:1734␤  in sub prefix:<++> at gen/parrot/CORE.setting:1732␤  in sub hyper at gen/parrot/CORE.setting:16769␤  in sub hyper at gen/parrot/CORE.setting:16712␤  in sub …»
21:31 jeffreykegler joined #perl6
21:32 TimToady p: my @h is default(42); @h[1] = 582; say ++@h[0]
21:32 camelia rakudo-parrot 53c60c: OUTPUT«43␤»
21:32 TimToady it really needs to be a bit more general than just via subscripting
21:32 FROGGS p: my @h is default("Hello"); @h[1] = "World"; say join ' ', map { @h.at_pos($_) }, @h.keys;  # that is my proposed fix for rakudo/src/core/List.pm:462:    multi method gist(...
21:32 camelia rakudo-parrot 53c60c: OUTPUT«Hello World␤»
21:33 FROGGS that would not fix print() though :/
21:33 lue FROGGS: TimToady's last comment suggest to me that perhaps that we shouldn't rely on .at_pos to Do the Right Thing™.
21:33 TimToady oughta work in hypers too
21:34 TimToady and from a .list
21:35 TimToady so X and Z should also work, methinks
21:35 FROGGS TimToady: is the default supposed to be changeable?
21:35 TimToady initializing missing entries to the default should fix all that
21:36 TimToady but is not the only way to fix it, I suppose
21:36 denis_boyun__ joined #perl6
21:37 TimToady maybe it should depend on the array implementation (sparse vs non-sparse), but for normal arrays, I'd say initialize, and then you don't have to put an extra call on every element
21:38 TimToady you'd like printing out lists and arrays to be fast
21:38 timotimo i just vocally spammed a 30c3 visitor about perl6 for about an hour
21:38 timotimo poor guy. but he just didn't say "stop" :(
21:38 timotimo actually ... two hours almost
21:39 TimToady maybe he was actually interested :)
21:39 Celelibi joined #perl6
21:39 TimToady or maybe he was entertained by the spectacle :)
21:39 lue +1 for initialize missing elements. (If you want a truly sparse array, you're probably already using a SparseArray class)
21:40 TimToady it seems the simplest solution, unless someone can point to a downside other than (perhaps) a slight increase in memory usage
21:41 TimToady FROGGS: no, it's a compile-time constant
21:41 TimToady shapes, however, might be run-time
21:44 TimToady on a parameter, in fact, a shape might actually bind the actual size of the array, sub foo(@a[|a-shape]) { say a-shape }
21:44 timotimo oooooh
21:45 TimToady or sub foo(@a[$x-max,$y-max]) would require a 2-dim, and bind the sizes
21:45 TimToady while @a[10] would simply require an array sized 10
21:46 TimToady @a[$x where $x %% 2]
21:46 TimToady lotta power there...
21:46 timotimo i like that
21:47 TimToady otoh, my @a[$x;$y] would kinda want to use exising $x and $y to size the array
21:47 TimToady not sure how to combine those ideas
21:47 timotimo if we can get a method that gives us the shape, we already can use the pre-existing subsignature binding, no?
21:48 TimToady yeah, but that's ucky
21:48 BenGoldberg joined #perl6
21:49 timotimo aye.
21:49 lue TimToady: the where clause inside @a[] feels useful on in signatures. Elsewhere you could do  $x %% 2 ?? my @a[$x] !! die;  or something
21:49 lue s/on/only/
21:52 lue .oO(sub foo(@a[shape])  feels like it's going to be awkward with non-literal values, for some reason.)
21:54 timotimo TimToady: i didn't have much structure to my ... impromptu introduction
21:54 timotimo so i covered lots of things briefly and lots of tiny special things
21:54 TimToady what was his background?
21:55 timotimo a bit of haskell
21:55 timotimo a bit of undetermined size
21:55 timotimo so i told him a bunch about the type system and multiple dispatch
21:56 timotimo i also showed him how powerful the new regex stuff is, but unfortunately didn't get to say much about how tokens and rules group together to form grammars
21:56 timotimo but i did show, briefly again, action classes
21:58 lue O.O "There's also a variant for the smartlink syntax:   # L<syn/sec/key phrases>>" ...why? Why, Text::SmartLinks?
22:01 Ulti FROGGS read a kernel buffers worth and split or concatenate up to the line delim, keep the remainder and read again for the next line concatenating up to the line delim repeat
22:02 Ulti readfh lets you just read upto some number of bytes?
22:02 johnmilton joined #perl6
22:03 timotimo yeah, readfh gives you "read this many bytes, at most", nothing else
22:03 * lue would love to know how L< ... >> happened
22:03 timotimo wat.
22:03 timotimo that's a typo on your end i hope
22:05 lue oh, wow. I think I just stumbled upon an almost 6-year-old typo O.o
22:06 lue (judging from the git log -p)
22:06 lue Thing is, I can't tell if the typo is an extra > or a missing <
22:10 dalek rakudo-star-daily: eb17c74 | coke++ | log/ (5 files):
22:10 dalek rakudo-star-daily: today (automated commit)
22:10 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/eb17c74d6f
22:10 dalek perl6-roast-data: 65e847f | coke++ | / (5 files):
22:10 dalek perl6-roast-data: today (automated commit)
22:10 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/65e847f729
22:24 lue tadzik: how correctly is M<> handled at this time?
22:38 colomon joined #perl6
22:39 FROGGS[mobile] joined #perl6
22:49 FROGGS[mobile] joined #perl6
22:49 tadzik lue: I think it's not handled at all, any differently than any other formatting code
22:50 lue tadzik: yeah, I did a quick test and, in HTML output, it's copied over verbatim, with code-snippet formatting.
22:51 kaare_ joined #perl6
22:53 timotimo lue: look closer
22:54 timotimo it probably has a class="error" or something
22:54 xenoterracide joined #perl6
22:55 lue timotimo: what I mean is that M<foo:bar> is output as M<foo:bar>, with a monospaced font
22:55 lue Why do I get the sense that DOC blocks are a bit of an old relic...? /me dives into git blame
23:01 lue Hrm. Does anyone else get the feeling that the DOC prefix is... wrong, somehow? I understand what it's meant to do, I'm just not convinced a magic prefix is the way to go about it :/
23:02 timotimo lue: is that the pod6 or POD?
23:02 lue Pod6
23:03 timotimo ah
23:03 timotimo did you look at the source of the html tag?
23:03 lue no
23:04 cognominal__ joined #perl6
23:04 lue timotimo: :)    <kbd class="pod2html-todo">M&lt;foo:bar&gt;</kbd>
23:05 labster_ joined #perl6
23:07 lue tadzik: is handling M<> for defined schemes supposed to be a converter's issue or a Pod6 parsing issue?
23:08 FROGGS[mobile] joined #perl6
23:08 lue r: DOC INIT { 1 }; say "alive!";
23:08 camelia rakudo-parrot 53c60c, rakudo-jvm 53c60c: OUTPUT«alive!␤»
23:14 BenGoldberg n: DOC INIT { 1 }; say 'alive!';
23:14 camelia niecza v24-108-g17d73e4: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Undeclared name:â�¤       'DOC' used at line 1â�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1502 (die @ 5) â�¤  at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit…»
23:15 timotimo gotta go now :)
23:45 skids joined #perl6

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

Perl 6 | Reference Documentation | Rakudo