Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2014-09-20

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:05 slmult0_z_y_h_g joined #perl6
00:14 raiph joined #perl6
00:15 Akagi201 joined #perl6
00:27 Akagi201 joined #perl6
01:11 FROGGS_ joined #perl6
01:24 xenoterracide joined #perl6
01:47 ilbot3 joined #perl6
01:47 Topic for #perl6 is now »ö« Welcome to Perl 6! | http://perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:,  niecza:, std:, or /msg camelia perl6: ... | irclog: http://irc.perl6.org | UTF-8 is our friend!
02:02 aborazmeh joined #perl6
02:18 araujo joined #perl6
02:32 slmult0_z_y_h_g joined #perl6
02:42 noganex joined #perl6
02:47 firnsy joined #perl6
02:47 firnsy joined #perl6
03:21 FROGGS[mobile] joined #perl6
03:22 jnthn morning, #perl6
03:26 FROGGS[mobile] morning jnthn
03:27 firnsy joined #perl6
03:27 firnsy joined #perl6
03:28 slmult0_z_y_h_g_ joined #perl6
03:37 ingy jnthn: where on earth are you?
03:37 jnthn ingy: Shenzhen, China.
03:37 ingy aha
03:38 ingy no way you'd be waking up at 4am in sweden
03:39 ingy tell all the Chinese people that Ingy sez HAI
03:39 ingy better get started!
03:39 jnthn :P
03:39 jnthn Not sure I@m here long enough to get round all billion :P
03:40 FROGGS[mobile] saying "hallo" would be worse
03:43 ingy Auf Wiedersehen would really multiply the syllables
03:47 FROGGS[mobile] additionally you'd have to explain everytime
03:58 tinyblak joined #perl6
04:08 Guest16580 left #perl6
04:09 colomon joined #perl6
04:09 no-doz joined #perl6
04:27 dalek nqp: b87a73b | usev6++ | 3rdparty/dyncall/configure:
04:27 dalek nqp: compile dyncall with -fPIC on DragonFly BSD
04:27 dalek nqp: This fixes a build problem on DragonFly BSD.
04:27 dalek nqp: It's the same fix as in commit 5ed99d26b3c3ac2d65bc622afdbd987a547046f5 for FreeBSD and 008f60c31bbd82ca090486468e8ffc8cd51bfb11 for NetBSD.
04:27 dalek nqp: review: https://github.com/perl6/nqp/commit/b87a73bfed
04:27 dalek nqp: 034304d | (Tobias Leich)++ | 3rdparty/dyncall/configure:
04:27 dalek nqp: Merge pull request #184 from usev6/master
04:27 dalek nqp:
04:27 dalek nqp: compile dyncall with -fPIC on DragonFly BSD
04:27 dalek nqp: review: https://github.com/perl6/nqp/commit/034304d7d2
04:29 FROGGS joined #perl6
04:40 itz_ joined #perl6
04:51 dalek star: 77018e1 | (Tobias Leich)++ | modules/perl6-digest-md5:
04:51 dalek star: bump Digest::MD5 revision
04:51 dalek star: review: https://github.com/rakudo/star/commit/77018e1bf1
04:53 FROGGS joined #perl6
04:56 FROGGS [Coke]: in order to unbreak NativeCall on star-daily, I have to port nqp::nativecallglobal to parrot and jvm... will do that ASAP
04:58 jnthn FROGGS: Hmm...what does that mean for the Star release? Just ship a NativeCall without the C globals patch?
05:00 FROGGS jnthn: yes, I intentionally did the cglobals merge after the compiler release
05:00 FROGGS jnthn: and star uses NativeCall HEAD^
05:00 FROGGS so that's fine
05:00 jerrycheung joined #perl6
05:00 FROGGS just the star-daily shows it, since it smokes most recent versions
05:02 FROGGS bbl
05:16 FROGGS[mobile] joined #perl6
05:28 molaf joined #perl6
05:33 tinyblak joined #perl6
05:51 [Sno] joined #perl6
05:53 xenoterracide joined #perl6
06:13 tinyblak joined #perl6
06:15 isacloud______ joined #perl6
06:16 pnu_ joined #perl6
06:18 clkao joined #perl6
06:21 tinyblak joined #perl6
06:22 ggherdov___ joined #perl6
06:27 xinming_ joined #perl6
06:28 tinyblak joined #perl6
06:34 slmult0_z joined #perl6
06:37 tinyblak_ joined #perl6
06:40 darutoko joined #perl6
06:40 kaare_ joined #perl6
07:05 uniejo joined #perl6
07:08 bjz joined #perl6
07:10 tinyblak joined #perl6
07:23 mr-foobar joined #perl6
07:30 tinyblak_ joined #perl6
07:43 Isp-sec joined #perl6
07:49 mr-foobar joined #perl6
07:51 [Sno] joined #perl6
07:56 mr-foobar joined #perl6
08:03 tinyblak joined #perl6
08:08 anaeem1 joined #perl6
08:10 kurahaupo joined #perl6
08:30 telex joined #perl6
08:34 anaeem1 joined #perl6
08:41 anaeem1 joined #perl6
08:45 virtualsue joined #perl6
08:45 spider-mario joined #perl6
08:46 lizmat good *, #perl6
08:47 lizmat itz++ for setting up http://pl6anet.org/hackday/
08:50 virtualsue \o/
08:51 jnthn o/ lizmat
08:54 lizmat jnthn virtualsue o/
08:56 diego_k joined #perl6
08:59 * diego_k is trying to compile p6-moarvm on osx but having some problems...
08:59 leont joined #perl6
09:00 * lizmat assumes diego_k has Xcode installed ?
09:00 diego_k lizmat: sure :)
09:01 diego_k now I'm using brew to update gcc, just in case :-/
09:02 lizmat gcc ?   afaik, clang is used with Xcode
09:02 diego_k ouch :D
09:04 diego_k It's strange all seems to be ok, but at some point of make, it says "write error" :-/
09:05 lizmat which version are you trying to compile?
09:06 lizmat does the file 'tools/build/moar_core_sources exist ?
09:08 diego_k I'm trying with  2014.08
09:08 diego_k I got some warns -> clang: warning: argument unused during compilation: '-fno-optimize-sibling-calls'
09:09 lizmat ah, then please ignore the make error
09:09 lizmat it was fixed in 2014.09
09:09 lizmat it always was just a nuisance
09:09 lizmat yes, also known ignorables
09:10 diego_k I don't have tools/build/moar_core_sources
09:10 * jnthn guesses diego_k may be doing the r* build, in which case trying make again is maybe a little less easy (I guess cd rakudo && make install would do it though). Guess there isn't a 2014.09 r* yet.
09:11 diego_k jnthn: Oh, I'm just following README :-)
09:11 diego_k let me try...
09:11 jnthn If it's just the compiler then there#s a 2014.09 that fixes it.
09:12 diego_k make goes well for a while, but ends with make[1]: write error / make: *** [rakudo/perl6-m] Error 1
09:14 diego_k cd rakudo; make install workerd
09:14 diego_k thanks!, time to play :)
09:15 carlin m: my $buf = $*IN.slurp(:bin); if $buf eq "foo" { say 1 }; say 'alive'
09:15 camelia rakudo-moar 7a381f: OUTPUT«(timeout)»
09:16 anaeem1 joined #perl6
09:29 lizmat m: "a:b".words.say
09:29 camelia rakudo-moar 7a381f: OUTPUT«a:b␤»
09:30 lizmat m: "a:b".words.elems.say
09:30 camelia rakudo-moar 7a381f: OUTPUT«1␤»
09:30 lizmat that feels wrong...
09:30 lizmat would have expected 'a b' and 2
09:31 lizmat oddly enough, the spec test doesn't check for non-alphanumeric / non-whitespace cases
09:38 anaeem1 joined #perl6
09:39 anaeem___ joined #perl6
09:48 sergot mo/rning
09:50 bjz joined #perl6
09:51 anaeem1_ joined #perl6
09:52 jerrycheung joined #perl6
09:54 jnthn lizmat: I thought words was about splitting on whitespace
09:54 lizmat that's the spec, right
09:54 jnthn lizmat: Do it the other way and can't can't be a word and maybe we don't want that... :)
09:55 lizmat true: I guess I will have to adjust my mental image  :-)
09:56 mr-foobar joined #perl6
09:58 lizmat fwiw: a datapoint wrt to push performance
09:58 lizmat working on IO::Handle.words: I can't get the eager version to outperform the lazy one
09:58 jnthn How is that push related ooc? :)
09:59 lizmat well, if I use an rpa, and nqp::push, I need to create a loop, which is slower
10:00 lizmat and if I create a HLL array, with a .push, it's a bit faster, but slower still than the gather / take combo (1.6x slower)
10:01 lizmat jnthn: nothing to worry about, just a datapoint  :-)
10:03 denis_boyun_ joined #perl6
10:06 pmurias joined #perl6
10:08 pmurias jnthn: the hack I'm using to make the serialization do what I want on MoarVM: https://github.com/pmurias/nqp-js/commit/a3cf6e7ca7
10:09 virtualsue joined #perl6
10:13 anaeem1 joined #perl6
10:15 itz_ joined #perl6
10:17 jnthn pmurias: Nice hack ;)
10:18 jnthn pmurias: While we maybe could find a more elegant solution, given this is temporary until nqp-js self-hosts I guess it's not pressing to do so? :)
10:20 darutoko- joined #perl6
10:20 jnthn timotimo: Maybe you could try a perl6-bench run of abc97dbcc2fec (or just HEAD) too? Your run took in my work to get push performance back to how it was, but my follow-up patch was a further factor of 2 improvement for me here...
10:21 bjz joined #perl6
10:24 dalek joined #perl6
10:24 itz "The following step can take a long time, please be patient." <=- is this still true? :)
10:24 FROGGS[mobile]2 joined #perl6
10:24 tadzik joined #perl6
10:26 MilkmanDan joined #perl6
10:26 jnthn itz: Depends on what backend you build and how fast your hardware is :)
10:26 jnthn itz: It only says it can take a long time, not that it will. :)
10:26 lizmat on parrot, definitely  :-)
10:27 jnthn dinner &
10:28 cxreg joined #perl6
10:28 SHODAN joined #perl6
10:29 BinGOs joined #perl6
10:34 vendethiel joined #perl6
10:34 MilkmanDan joined #perl6
10:35 Akagi201 joined #perl6
10:37 vendethiel o/, #perl6 :)
10:37 lizmat vendethiel o/
10:39 pmurias vendethiel: hi
10:39 vendethiel masak: do macros in P6 (currently) have sublexical scope?
10:48 dalek nqp: 783e870 | (Elizabeth Mattijsen)++ | docs/ops.markdown:
10:48 dalek nqp: Add documentation stub for nqp::encode
10:48 dalek nqp: review: https://github.com/perl6/nqp/commit/783e8703a0
10:51 jaffa4 joined #perl6
10:52 jaffa4 hi all
10:54 jaffa4 How can I reference aub parameter by position?
10:55 petercommand joined #perl6
10:56 lizmat sub a (*@positionals) { say @positionals[42] }    ??
10:57 timotimo aye
10:57 timotimo another thing you can do:
10:58 cognome joined #perl6
10:58 timotimo m: sub a(*@positionals ($one, $two)) { say "$one, $two!"; say @positionals.perl }
10:58 camelia rakudo-moar 7a381f: ( no output )
10:58 timotimo m: sub a(*@positionals ($one, $two)) { say "$one, $two!"; say @positionals.perl }; a(1, 2)
10:58 camelia rakudo-moar 7a381f: OUTPUT«1, 2!␤Array.new(1, 2)␤»
10:58 timotimo m: sub a(*@positionals ($one, $two)) { say "$one, $two!"; say @positionals.perl }; a(1, 2, "extra nonsense")
10:58 camelia rakudo-moar 7a381f: OUTPUT«Too many positionals passed; expected 2 arguments but got 3 in sub-signature of parameter @positionals␤  in sub a at /tmp/3RnGe1A2qr:1␤  in block <unit> at /tmp/3RnGe1A2qr:1␤␤»
10:58 timotimo m: sub a(*@positionals ($one, $two)) { say "$one, $two!"; say @positionals.perl }; a("too few")
10:58 camelia rakudo-moar 7a381f: OUTPUT«Too few positionals passed; expected 2 arguments but got 1 in sub-signature of parameter @positionals␤  in sub a at /tmp/wftKLGG8R8:1␤  in block <unit> at /tmp/wftKLGG8R8:1␤␤»
10:59 timotimo jnthn: will run the benchmarks now :)
11:00 jaffa4 so there is no @_
11:00 timotimo you can have a @_
11:00 timotimo m: sub foobar { say @_.perl }; foobar(1, 2, 3)
11:00 camelia rakudo-moar 7a381f: OUTPUT«Array.new(1, 2, 3)␤»
11:00 dalek specs: 65bdb0f | (Stéphane Payrard)++ | S99-glossary.pod:
11:00 dalek specs: Update S99-glossary.pod
11:00 dalek specs: review: https://github.com/perl6/specs/commit/65bdb0fd7a
11:01 timotimo but you cannot have a signature *and* @_
11:01 jaffa4 m: sub f ($a.$b) { print $_[0]} ; f(1,2);
11:01 camelia rakudo-moar 7a381f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/hj1CmebZPqâ�¤Missing blockâ�¤at /tmp/hj1CmebZPq:1â�¤------> [32msub f ($a[33mâ��[31m.$b) { print $_[0]} ; f(1,2);[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤ …»
11:01 jaffa4 m: sub f ($a,$b) { print $_[0]} ; f(1,2);
11:01 camelia rakudo-moar 7a381f: ( no output )
11:01 vendethiel jaffa4: sigil invariance ;-)
11:02 jaffa4 How do I reference a function pointer?
11:02 vendethiel &fn
11:02 vendethiel (and that's not a pointer)
11:02 jaffa4 whic his passed in as a parameter
11:03 jaffa4 sub AppendClipboard(Str $format,Value $data,&render(Value $data1)--> Str )
11:03 jaffa4 $render does not seem to work
11:05 FROGGS[mobile] joined #perl6
11:05 jaffa4 : sub f ($a,$b) { print @_[0]} ; f(1,2);
11:06 jaffa4 m: sub f ($a,$b) { print @_[0]} ; f(1,2);
11:06 camelia rakudo-moar 7a381f: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/ItYu74gU9Tâ�¤Placeholder variable '@_' cannot override existing signatureâ�¤at /tmp/ItYu74gU9T:1â�¤------> [32msub f ($a,$b) { print @_[0]}[33mâ��[31m ; f(1,2);[0mâ�¤    expecting any of:â�¤    â€¦Â»
11:06 diakopter how do you read that error?
11:06 jaffa4 yes, just checking
11:19 Ven joined #perl6
11:22 lizmat timotimo: perhaps a question for you while jnthn is nomming
11:22 jaffa4 this does not seem to work http://pastebin.com/t0ziKCju
11:22 lizmat so I've read 64K from a filehandle into a Buf
11:22 lizmat how do I make it a native str ?
11:22 lizmat my str $str = nqp::unbox_s(nqp::encode($buf, $utf8, $utf8_type));   # gives me: This representation (VMArray) cannot unbox to a native string
11:23 jaffa4 can you think of a work around?
11:24 * lizmat is a complete NativeCall noob  :-(
11:29 pflanze joined #perl6
11:30 pflanze Hi. lizmat, I'm the guy from London.pm working on functional modules.
11:30 lizmat hi pflanze !
11:31 pflanze I haven't followed Perl6 for some years, so I don't know what or if anything has been going on re functional in Perl6.
11:32 lizmat Perl6 caters for most different methodologies
11:32 lizmat m: <a b c d e e f f g g g>.Bag.pairs.say
11:32 camelia rakudo-moar 7a381f: OUTPUT«"a" => 1 "b" => 1 "c" => 1 "d" => 1 "e" => 2 "f" => 2 "g" => 3␤»
11:33 lizmat answering my own question: my str $str = nqp::unbox_s($buf.decode);
11:36 pflanze In my modules, I'm following how things are done in Scheme pretty closely: linked lists, what Scheme calls promises (structure containing thunk when unevaluated and result when evaluated) as building blocks for lazy algorithms, then streams (lazy lists) on top.
11:38 pflanze I know many languages use generators for lazy sequence generation; does Perl6 it that way? I feel that approach less elegant than lazy lists, but perhaps it has its own benefits that I'm not aware of.
11:38 pflanze generators or, more to the point, yield.
11:40 lizmat you probably want to read: S17:01
11:40 synopsebot Link: http://perlcabal.org/syn/S17.html#line_01
11:40 lizmat most of that is implemented
11:51 pflanze Note that what Perl6 calls "Promise" is generally called a "future" in the FP world; whereas the Scheme "promise" has nothing to do with concurrency; Haskell calls them "thunks" (Scheme people call a parameter-less function a thunk; when wrapped with struct that swaps the thunk for a value on eval, it's called promise).
11:55 pflanze Well "nothing to do" is maybe too strong since the use of a promise can be changed to a use of a future when wanting to evaluate speculatively; that doesn't *always* make sense though.
11:55 raiph joined #perl6
11:57 * pflanze reading the section about "supplies"
11:59 pflanze (I just realized you're one of the authors.)
12:00 lizmat hehe...  well, mostly following jnthn implementation  :-)
12:16 diakopter lizmat: I think you need to use the chr routine on the resulting array and join the strings? or if there's an optimized version of that?
12:16 timotimo jnthn: http://t.h8.lv/p6bench/2014-09-20-post_release_rakudo_2.html  -  http://t.h8.lv/p6bench/2014-09-20-history_rakudo_2.html
12:17 timotimo i still wonder what the heck happened to the parse json benchmarks
12:17 lizmat diakopter: you mean my str $str = nqp::unbox_s($buf.decode);  ???
12:17 diakopter lizmat: like chrs(array of codepoints -> Str)
12:17 diakopter encode is returning the array
12:18 diakopter [I'm thinking of a mythical aggregate-form of chr()]
12:19 lizmat I'm not interested in chrs per se, I'm interested in something I can run nqp::findcclas on
12:19 lizmat *class
12:21 diakopter that can only run on strings, I thought
12:21 lizmat yup
12:23 virtualsue joined #perl6
12:27 diakopter I don't know of a way to go from an array of codepoints to a string without using chrs
12:27 diakopter is chrs too slow?
12:28 lizmat isn't that what .encode is meant to do ?
12:29 diakopter that runs on a string..?
12:29 lizmat on a Buf
12:30 diakopter I don't see an encode method on Buf
12:31 diakopter just on Str
12:35 ggoebel11111113 joined #perl6
12:35 Ven joined #perl6
12:37 lizmat what can I say: it works for me...
12:47 * grondilu would have expected such a Buf method to be called rather "decode"
12:48 grondilu Str->Blob is encode, Blob->Str is decode, isn't it?
12:48 lizmat ah, du
12:48 lizmat yes, decode
12:48 lizmat my str $str = nqp::unbox_s($buf.decode);
12:49 spider-mario joined #perl6
12:56 anaeem1_ joined #perl6
12:59 anaeem1__ joined #perl6
13:03 diakopter oh
13:04 jnthn lizmat: Did you figure out what you wanted with the string/buf thing?
13:05 jnthn timotimo: Nice, we do better on all the push benchmarks now, it seems :)
13:05 timotimo yup, i'm impressed
13:05 timotimo good work!
13:06 dalek rakudo/nom: 48244cc | (Elizabeth Mattijsen)++ | src/core/IO/Handle.pm:
13:06 dalek rakudo/nom: Implement IO::Handle.words
13:06 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/48244cc748
13:06 lizmat jnthn:  ^^^
13:06 timotimo i don't have the time necessary to get the parse json benchmark bisected or something
13:07 jnthn timotimo: You could maybe see if it's the CAPHASH elimination patch. While in theory it should be a speedup, it's maybe possible something in it is accidentally costly...
13:08 jnthn lizmat: Why read a buf and decode it, ooc?
13:08 lizmat jnthn: are you implying that I can read directly into a str ?
13:09 jnthn nqp::readcharsfh
13:10 lizmat aha, another undocumented nqp function :-)
13:10 timotimo oh, right
13:10 timotimo that's a good hint, i'll check that
13:10 jnthn Yeah, I actually knew moar has an op called read_fhs and looked it up that way in QASTOperationsMAST.nqp... :)
13:11 lizmat does that work on JVM and parrot as well ?
13:11 jnthn timotimo: I'd guess it may be accidental boxing. I did pour over the NQP one with the profiler for quite a while after getting it working.
13:11 timotimo ah
13:11 timotimo good to know
13:12 jnthn lizmat: Oh...no :(
13:12 jnthn lizmat: Seems they both miss it.
13:12 masak vendethiel: "sublexical" relates to "lexical" how? macros have lexical scope AFAIK.
13:12 lizmat yeah, looking at IO::Socket
13:12 lizmat it's moarvm only
13:12 Ven masak: sublexical is basically the ... "visible" lexical scope from a macro.
13:12 yoleaux 18 Sep 2014 21:29Z <ingy> Ven: applied,thanks!
13:12 yoleaux 18 Sep 2014 21:34Z <ingy> Ven: join #lingy
13:12 jnthn That's unfortunate.
13:13 lizmat I'll use nqp::readcharsfh in the case of moar only then
13:13 masak Ven: in order to clarify your question, could you give me a concrete case where different answers would make a difference?
13:13 Ven masak: I'm writting one up :)
13:13 jnthn lizmat: Yeah. Feel free to file an NQP ticket requesting availability of that on the other backends?
13:13 lizmat will do
13:14 Ven writing*, even
13:14 anaeem1_ joined #perl6
13:15 Ven masak: i.e., (defmacro foo () (let (name (gensym)) `(+ 1 2 ,(some-macro name))))
13:16 Ven masak: here, the code generated by the macro `some-macro` won't have the let's lexical scope at disposal
13:16 Ven http://letoverlambda.com/textmode.cl/guest/chap6.html
13:19 SamuraiJack joined #perl6
13:21 masak hold on, distracted
13:30 camelia joined #perl6
13:32 dalek specs: 1c17220 | (L. Grondin)++ | create_contents.p6:
13:32 dalek specs: S99/create-contents.p6, explicitely specify encoding, avoid .pod~ files, and add a blanck line before =end pod
13:32 dalek specs: review: https://github.com/perl6/specs/commit/1c1722044e
13:33 grondilu ^hope it's OK.  it was generated errors in contents.pod so I fixed it.
13:35 lizmat grondilu++
13:37 BenGoldberg joined #perl6
13:37 JimmyZ joined #perl6
13:39 anaeem1 joined #perl6
13:41 SamuraiJack_ joined #perl6
13:44 masak http://letoverlambda.com/textmode.cl/guest/chap6.html looks very interesting, but is too long for me to read right now.
13:44 masak it's also telling me that I should read 'On Lisp' at some point.
13:44 masak sooner rather than later.
13:45 masak <Ven> masak: here, the code generated by the macro `some-macro` won't have the let's lexical scope at disposal
13:45 masak Ven: could you clarify "at disposal"?
13:45 Ven masak: just jump to "sublexical"
13:45 Ven (ctrl-F, I mean :P)
13:46 Ven masak: On Lisp is pretty bad, tbh. "Pratical Common Lisp" and "50 years of lisp" are much better
13:47 timotimo jnthn: your supposition was correct, the "if $match.Bool" block in the MATCH method allocates a gigantic crapton of Int objects
13:47 Ven masak: the basic difference between lexical scope and sub-$0 is macro expansion: if I'm traversing a body of some sort in a macro, it hasn't been macro-expanded yet
13:48 masak I jumped to "sub-lexical", but it feels exactly like jumping into something the surrounding context of which I don't have.
13:48 Ven right, my bad
13:49 masak oh, but by the definition you just gave, I don't think macro expension is sub-lexical in p6.
13:49 masak ...by current spec.
13:49 masak I'm glad you mention it, though, because I'm gearing up to rethink macros and the way we want to do them.
13:50 masak and I'll especially be looking towards having something that composes in ways we find useful.
13:50 Ven so i.e., in a macro "(do-replacement-onbody 'a)", if your "do-replacement-onbody" wants to change 'a, it'll work
13:50 Ven but if you change `'a` with " "(defmacro say-foo () 'a)", it'll blow up: the macro hasn't been expanded yet, and it won't see the "final" 'a
13:50 masak the sub-lexical thing seems to be a kind of (non-)composition that might sometimes be useful.
13:50 Ven ...and sometimes bit you :)
13:50 masak *nod*
13:51 molaf joined #perl6
13:51 Ven the solution proposed here (with sublet and sublet*) is to manually macroexpand(-1) the macro so that you can walk into its expansion code
13:52 Ven I was just thinking things through stuff like that while commuting
13:52 Ven and I actually thought about something else: how do you want to "disable" hygiene?
13:52 timotimo roar
13:52 timotimo there is hardly something more annoying than a b0rked tab key
13:52 Ven because, as I understood it, we want hygiene by default (scheme-like, cl-unlike). But we still need a way to break hygiene sometimes (I can think of anaphoric macros being the "simplest" example)
13:53 masak Ven: I refer you to current S06 for current ideas about that.
13:53 Ven I'll just finish my sentence then :)
13:53 masak Ven: the mechanism today is the COMPILING:: namespace.
13:54 Ven there are several solutions: scheme allow you to fall back to a "cl-like defmacro", elixir has a `var!()`, but racket has another very interesting mechanism: `define-syntax-parameter`
13:54 Ven (actually, scheme should have it now too, but it's a pretty recent addition. around 2011)
13:55 dalek rakudo/nom: 6499f8d | (Elizabeth Mattijsen)++ | src/core/IO/Handle.pm:
13:55 dalek rakudo/nom: use nqp::readcharsfh on Moar, fix some logic issues
13:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6499f8d309
13:55 Ven http://www.schemeworkshop.org/2011/papers/Barzilay2011.pdf <- the basic idea is that you predefine, outside of the macro, the reserved identifiers, and you give them a "default value" (when they've not been by-macro-shadowed) (which might be a `(raise)` if you only want it to be used in said macros), and then in the macro you override their value
13:55 masak by the name alone, `define-syntax-parameter` sounds like something TimToady has proposed numerous times.
13:56 masak ok, I clearly need to research all of the above a bit.
13:56 masak thanks for the pointers.
13:56 Ven sorry for the pointers :P.
13:56 masak Ven++
13:56 masak no, don't be sorry.
13:56 Ven well, it's quite a big area
13:56 masak prior art in this case is some of the best input I can get.
13:58 Ven masak: I really recommend 50 years of lisp. reading "on lisp" isn't really necessary: it's basically just a bunch of macros threw in there, with little to no explanations on language features. I've been told PCL (practical CL) is a good book, though I havn't read it. And anyway, I'd be happy to chat some more about that :-)
13:58 timotimo i can't really see anything boxing any ints here :\
13:58 Ven timotimo: maybe they're waiting for christmas
13:58 Ven you sure there aren't gift boxes :p?
14:01 anaeem1 joined #perl6
14:01 timotimo %)
14:02 timotimo the little block inside MATCH is in 1st place for routines allocating Int, MATCH itself is in 2nd place with about a quarter of the amount of the block inside itself ...
14:02 dalek roast: b4fc0fe | (Steve Mynott)++ | S0 (4 files):
14:02 dalek roast: RT # 76608, 75370, 77158 and 67222 were testneeded should be closable in RT
14:02 dalek roast: review: https://github.com/perl6/roast/commit/b4fc0fe9f1
14:04 lizmat itz++
14:06 jaffa4 masak: I found a nasty bug
14:09 itz hmmm if I login RT with bitcard I seem to have *less* access than as an anon user! (I can't see any tickets at all)
14:10 timotimo i was looking at the spesh log of MATCH and i don't see any hllboxtype_i or box_i or anything like that :(
14:10 timotimo how does it allocate int boxes?
14:22 FROGGS joined #perl6
14:28 FROGGS o/
14:31 lizmat FROGGS /o
14:31 timotimo hey FROGGS
14:31 timotimo do you know how to investigate allocations?
14:31 timotimo the MATCH method we have in use now for rakudo allocates a gigantic crapton of Int objects
14:31 FROGGS eww
14:32 FROGGS timotimo: no, I don't
14:32 timotimo that is likely the cause of the gigantic performance drop
14:32 timotimo have you seen it? %)
14:33 FROGGS timotimo: no, I've not seen that
14:33 FROGGS timotimo: I've even benched MATCH intense stuff without noticing anything
14:33 FROGGS well that's not true
14:34 FROGGS it allocated less objects, but the runtime was identical
14:34 FROGGS lizmat said that stage parse would take .5s more time
14:35 lizmat tha's my impression, yes
14:35 FROGGS but I recompiled rakudo ten times with, and ten times without the patch
14:35 timotimo huh.
14:35 FROGGS showing that all stages were about 0.02s "faster"
14:35 lizmat but if you don't see it...
14:35 lizmat then it's probably something special on OS X / SSD's
14:35 timotimo well, look at a profile of parse-json, it'll show a gigantic amount of allocations of Int
14:35 FROGGS lizmat: scratch SSD :P
14:35 timotimo like 3x as many as Scalar
14:36 FROGGS parse-json? is that in p6bench?
14:36 timotimo (gimme and reify are the top allocators of Scalar, fwiw)
14:36 timotimo yes, it is
14:36 FROGGS k
14:36 FROGGS I'll do that tonight
14:36 timotimo http://t.h8.lv/p6bench/2014-09-20-history_rakudo_2.html - have a look
14:36 lizmat timotimo: gimme / reify on Scalar ?
14:37 timotimo lizmat: indeed
14:37 lizmat that feels, *odd*
14:37 FROGGS ohh wow
14:37 timotimo 239032 Scalar in gimme, 110556 in reify, 38798 in bind_one_param
14:38 JimmyZ yeah, as I said, run reify once causes a GC, while twice didn't, which is odd
14:39 JimmyZ err, I meant samecase, which runs reify
14:40 dalek nqp: 53515d6 | (Elizabeth Mattijsen)++ | docs/ops.markdown:
14:40 dalek nqp: Add documentation stub for nqp::readcharsfh
14:40 dalek nqp: review: https://github.com/perl6/nqp/commit/53515d6ed0
14:40 PZt joined #perl6
14:41 timotimo FROGGS: for comparison, the numbers i gave were from entering MATCH 167103 times
14:41 timotimo and we spent 6.81% exclusive time there
14:41 timotimo The profiled code ran for 6920.76ms. Of this, 1014.51ms were spent on garbage collection and dynamic optimization (that's 14.66%). - OTOH, it doesn't seem like allocation alone would be responsible for such bad performance?!
14:47 pmurias joined #perl6
14:47 MikeFair joined #perl6
14:48 lucvn joined #perl6
14:51 dalek rakudo/nom: ae35377 | (Elizabeth Mattijsen)++ | src/core/ (2 files):
14:51 dalek rakudo/nom: Make $limit always imply eager
14:51 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/ae35377ef3
14:52 timotimo m: say "that's { (489876 + 167103) / 167103 } Int objects per run of Match. "
14:52 camelia rakudo-moar 6499f8: OUTPUT«that's 3.931581 Int objects per run of Match. ␤»
14:53 FROGGS joined #perl6
14:53 FROGGS time perl6 --profile perl6/parse-json components.json 128 # 13.9s without my patch
14:54 FROGGS time perl6 --profile perl6/parse-json components.json 128 # 25.2s with my patch
14:54 FROGGS alloc without my patch: Int 664_880, Scalar 1_611_344, with my patch: Int 2_932_839, Scalar 2_322_004
14:54 timotimo oh wow.
14:54 FROGGS much wow
14:55 lizmat that's 2 for the price of 1 !
14:55 lizmat Scalar
14:55 lizmat Int would be more like 4 for the price of 1 ?
14:57 timotimo maybe we need more := to get rid of scalar containers?
14:57 colomon lizmat: does that leave a way to call .lines with a $limit and get a lazy list as a result?
14:57 timotimo colomon: you could just [^100]
14:57 colomon timotimo: so .lines()[^100] would be lazy?
14:58 timotimo yes
14:58 colomon guess that works for me
14:58 * colomon doesn't have a use case in mind, just hates to presume no one else ever might.
14:58 FROGGS timotimo: but I already bind anything that is not a native...
14:59 * FROGGS .oO( maybe we just need more cowbell )
14:59 timotimo hmm
15:01 FROGGS there is nothing obvious to me that I could optimize...
15:03 timotimo nothing obvious to me either
15:03 timotimo i wanted to look back at some boxing-lessening commits to figure out how they worked
15:03 lizmat colomon: no, but if you want a limit, you're probably not being lazy anyway, was my thoiught
15:03 timotimo i think sometimes in if or while we can't be sure that the result of something can give us a bool "the right way" and so we have to box and call a method or something?
15:04 FROGGS we call .Bool, aye
15:04 FROGGS that's why it is invokish...
15:04 timotimo that shouldn't be responsible for the Int creation, though
15:04 FROGGS I remember a discussion  about exactly that on #moarvm
15:04 timotimo https://github.com/rakudo/rakudo/commit/6b8aac1094ebaa43e91a1574d19ce8839a8ed72b - look at this commit for example
15:04 FROGGS +$name maybe?
15:06 FROGGS hmmm, I should try nqp::coerce_si
15:07 FROGGS m: my str $foo = "42"; say nqp::coerce_si($foo)
15:07 camelia rakudo-moar 6499f8: OUTPUT«===SORRY!===␤No registered operation handler for 'coerce_si'␤»
15:07 FROGGS eww
15:08 FROGGS m: my str $foo = "42"; say nqp::fromstr_I($foo)
15:08 camelia rakudo-moar 6499f8: OUTPUT«===SORRY!===␤Arg count 1 doesn't equal required operand count 3 for op 'coerce_sI'␤»
15:08 FROGGS m: my str $foo = "42"; say nqp::fromstr_I($foo, Int)
15:08 camelia rakudo-moar 6499f8: OUTPUT«42␤»
15:10 pmurias joined #perl6
15:10 FROGGS that seems to help a good bit...
15:11 FROGGS time: bad 25.2s, now 20.5s, before: 13.9s
15:11 timotimo ah, we're getting there
15:12 timotimo maybe nqp::istrue in a few places?
15:12 FROGGS hmmm
15:12 FROGGS Int allocs a slightly more
15:12 FROGGS but we only have 340_000 Parcels instead of 880_000
15:13 FROGGS no, 340_000 and about 680_000
15:13 itz is there anything on github to do https .. I thought I saw something?
15:13 itz (client I mean)
15:13 FROGGS itz: HTTP::UserAgent supports it
15:13 FROGGS via OpenSSL
15:14 itz ty
15:14 FROGGS timotimo: testing nqp::istrue now
15:18 FROGGS timotimo: nqp::istrue only has the effect of allocation more Ints (just a few), the others stayed the same
15:18 FROGGS timotimo: that's why I have so far: https://gist.github.com/FROGGS/6b9bf1faa006aeed0c1b
15:19 FROGGS (I reverted the istrue changes)
15:20 FROGGS It is hard to concentrate on that train...
15:21 timotimo don't concentrate on the train, concentrate on your code! :P
15:22 timotimo i'll be AFK for a bit.
15:22 FROGGS *g*
15:28 dalek rakudo/nom: 9926536 | (Elizabeth Mattijsen)++ | docs/ChangeLog:
15:28 dalek rakudo/nom: Mention IO::Handle.words
15:28 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/9926536a8e
15:28 TimToady timotimo: my new pushme test didn't show up :'(
15:29 TimToady did you not pull it, or did it not work?
15:29 anaeem1_ joined #perl6
15:38 guru joined #perl6
15:41 dalek specs: 8d48f69 | (Elizabeth Mattijsen)++ | S32-setting-library/Str.pod:
15:41 dalek specs: The basis of changes I'd like to make to IO spec
15:41 dalek specs:
15:41 dalek specs: - Str.IO gives an IO::Path that only does absolutifying paths *once*
15:41 dalek specs: - IO::Path gets a caching "isDir" and "exists" attribute
15:41 dalek specs: - IO::Path.lines/words open/close handle from IO::Path.path
15:41 dalek specs: - IO::Handle.lines/words give lines / words from current file position
15:41 dalek specs: - $*SPEC contains the appropriate IO::Spec::filesystem object
15:41 dalek specs: - IO::Path gets a $.SPEC from a given IO::Spec object, default to $*SPEC
15:41 dalek specs: - IO::Path.methods become wrappers around $!SPEC rather than $.SPEC
15:41 dalek specs:
15:41 dalek specs: This should allow for better optimizations (e.g. doing rel2abs only *once*)
15:41 dalek specs: and for better resource usage (e.g having .lines/words close handles).
15:42 dalek specs: This should also make all filetest methods much faster.
15:42 dalek specs: review: https://github.com/perl6/specs/commit/8d48f69457
15:43 FROGGS lizmat: IO::Spec::*file*system?
15:44 lizmat ::Unix, ::Win32   what would you call that?
15:44 lizmat perhaps just IO::Spec::system ?
15:44 FROGGS I can't say OS, because TimToady would slap me :P
15:45 lizmat we have currently 4 of those: IO::Spec::Cygwin/QNX/Unix/Win32.pm
15:46 FROGGS I guess 'system' would do, yeah
15:46 FROGGS because Cygwin really is not a filesystem
15:46 * Ven used windows for quite a good numbers of years, and can't understand how people stomach cygwin
15:47 FROGGS it is usually what the user think of when they hear operating system
15:47 FROGGS Ven: I used cygwin...
15:47 FROGGS ... to test that my stuff works
15:47 FROGGS but I'm also a windows+strawberry fan
15:47 Ven just cmd.exe works fine :p
15:47 Ven or powershell if you want
15:48 FROGGS +putty.. what else do you need
15:48 FROGGS I have like zero powershell experience
15:48 FROGGS and no time to improve it
15:48 Ven (I far prefer cmd.exe to cygwin...)
15:49 FROGGS nwc10: btw, I just ordered an (old) IBM BladeCenter... so you might hear from me about smoking perl6-m/p on weird platforms
15:49 FROGGS Ven: me too
15:51 jnthn Me three. :)
15:51 colomon FROGGS: how do you order something like that?  and what would be weird about it?
15:51 FROGGS colomon: ebay actually
15:52 FROGGS colomon: I think AIX is weird in some sense
15:52 colomon FROGGS: oh!  yes, yes it is
15:52 FROGGS have to do some research what OSes are still in use
15:52 FROGGS like, is HP/UX still alive? on what arch does it run etc...
15:53 colomon probably ever evil thing you can think of is still being used somewhere.
15:53 FROGGS I'll have 14 xeon blades, one opteron blade and three powerpc blades
15:53 * colomon had terrible troubles with his software on AIX once upon a time.
15:54 FROGGS IRIX is also a thing, right?
15:54 colomon yes
15:54 FROGGS all these *X-es...
15:54 * colomon used all mentioned so far back in the 90s
15:54 FROGGS wow :D
15:54 * colomon is very glad Linux has mostly taken over that corner of the market
15:54 FROGGS colomon: thanks for offering support *g*
15:55 lizmat cycling&
15:55 colomon FROGGS: many (most?) of my college programming classes were done on a timesharing IBM mainframe.
15:56 colomon and everyplace had different Unix-y workstations.
15:57 colomon and all those machines had siginicantly better capabilities than the PCs of the day, and sucky *nix clones.
15:57 FROGGS yeah, it is a wonder that there is not a huge disaster about all these different unixes
15:57 colomon and of course, each was its own incompatiable dialect
15:58 colomon Linux conquering all the *X-es but OS X is a huge win.
15:59 FROGGS I need to get an OS X that runs on such a powerpc box...
15:59 colomon FROGGS: assuming you didn't have to take out a mortgage to get the BladeCenter, I'm kind of sorry I didn't get it instead.  :)
16:00 FROGGS colomon: there are more :o)
16:00 colomon lots of Xeon cores would be great for running my $work test suite
16:00 FROGGS 1 € -> http://www.ebay.de/itm/321527220795
16:00 colomon and PowerPC would be awesome to have around for portability testing.
16:00 FROGGS I just paid 106€ plus shipping
16:00 FROGGS made back in 2007 or so
16:01 colomon FROGGS: Google's English translation claims it cannot be shipped?
16:02 FROGGS colomon: he/she states that you have to ask before bidding
16:02 FROGGS because its weight is about 50kg
16:02 colomon gotcha
16:02 jnthn 50kg?!
16:03 FROGGS but I'd recommend you look at ebay.us or so :o)
16:03 FROGGS jnthn: yes, why not?
16:03 FROGGS a single blade is up to 5kg
16:03 FROGGS and there are 14 in it :o)
16:03 colomon FROGGS: yeah, I never thought of trying to get machines like this there.
16:03 jnthn Oh...right...
16:03 jnthn Yes, the picture explains it nicely :)
16:04 FROGGS I even doubt that it is just 50kg, I bet it is almost twice that many
16:04 FROGGS my biggest problem will be the noise... its blowers are extreem
16:04 FROGGS EXTEEM, even
16:04 FROGGS +R
16:05 FROGGS you normally can't talk when it is switched on, so I have to modify it a bit, and then only run four blades at once or so
16:05 colomon huh.  prices are more expensive on ebay.com, but still almost sane.
16:06 colomon I mean, 14 quad core 2.7 GHZ opterons for $4,049 seems pretty reasonable, assuming they actually work well.
16:07 FROGGS I can buy a single opteron blade here for 20€, but without ram and hdd - and these are expensive on their own
16:07 colomon Bet that could get my test suite down to under an hour, if I could figure out how to load balance it
16:07 FROGGS so I'm happy to get a complete bladecenter for just 106€
16:07 jnthn 14 quad cores would probably do the spectest in good time :D
16:07 colomon whoops, actually it's 28 quad core opterons.  dang.
16:08 jnthn Even better :)
16:08 FROGGS jnthn: problem is... its power supplies might be at max then... which means 4 times 2_000 Watts
16:09 FROGGS but it would be funny to see that working :o)
16:09 itz is there any perl6  short cut to print "foo=$foo" or similar from $foo (like Perl 5 Data::Dumper::Names)
16:09 FROGGS hmmm
16:09 jnthn m: my $foo = 42; say :$foo
16:09 camelia rakudo-moar ae3537: OUTPUT«Unexpected named parameter 'foo' passed␤  in sub say at src/gen/m-CORE.setting:15401␤  in block <unit> at /tmp/_8ujF0YrnG:1␤␤»
16:09 jnthn m: my $foo = 42; say :$foo.perl
16:09 camelia rakudo-moar ae3537: OUTPUT«"foo" => 42␤»
16:10 itz sweet
16:10 BinGOs FROGGS: HP-UX runs on Itanium
16:10 FROGGS ohh
16:10 FROGGS maybe I can get such a blade one day
16:10 FROGGS BinGOs: you've got one I bet :o)
16:11 BinGOs nope, but TuX likely has
16:11 BinGOs definitely in fact
16:11 FROGGS hehe, yeah
16:12 BinGOs I have a PowerPC Mac sat a foot or so from me
16:12 FROGGS BinGOs: with or without EFI?
16:13 FROGGS must be the older without EFI I guess
16:14 FROGGS I was able to run an OSX in a VM on my old dual core laptop, but it sadly doesnt work on my core i5 :o(
16:15 * colomon has been meaning to set up a Raspberry Pi for $work and p6 testing on ARM
16:15 BinGOs FROGGS: its one of these http://en.wikipedia.org/wiki/Power_Mac_G4
16:17 FROGGS ahh, OS X 10.4.something, yeah, that's what I thought
16:22 * colomon actually has a PowerPC Mac sitting in the basement too, probably the sane solution is to get it running again rather than buying a bladecenter….
16:30 FROGGS *g*
16:30 * itz overuses :$foo.perl when he should be using the debugger :)
16:31 Ven :D!
16:42 colomon itz: me too -- in fact, I pretty much never use the debugger.  :)
16:46 kaare__ joined #perl6
16:55 bartolin joined #perl6
16:59 bartolin joined #perl6
17:05 raiph joined #perl6
17:31 kjs_ joined #perl6
17:31 raiph joined #perl6
17:33 zakharyas joined #perl6
17:37 Ven joined #perl6
17:41 raiph https://github.com/jnthn/rakudo-debugger/pull/21 # I'd appreciate a response to the "if there's an easier/quicker/proper/better way" question from anyone (doesn't need to be jnthn)
17:52 FROGGS joined #perl6
18:04 timotimo FROGGS: were you able to improve MATCH further?
18:21 pmurias joined #perl6
18:22 molaf_ joined #perl6
18:50 pmurias joined #perl6
18:55 gtodd a cluster of Raspberry Pi's would be nice ...
18:55 Ven a clusterpie
18:57 timotimo i don't think so
18:57 timotimo raspberry pis are vastly underpowered
18:57 gtodd a raspberry bush ...
18:57 timotimo maybe a cluster of cubieboards or beaglebone blacks, though ...
19:01 camelia joined #perl6
19:09 * colomon was idly looking at refurbished PowerPC Macs after the previous conversation.  They're almost cheap enough that buying one to play with is a no-brainer...
19:14 telex joined #perl6
19:20 panchiniak joined #perl6
19:21 anaeem1_ joined #perl6
19:42 anaeem1 joined #perl6
19:45 Psyche^_ joined #perl6
19:45 dalek rakudo/nom: 8a55aea | (Elizabeth Mattijsen)++ | src/core/Int.pm:
19:45 dalek rakudo/nom: Implement Range coercer for Int types
19:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8a55aeae75
19:50 vendethiel joined #perl6
19:55 raiph joined #perl6
19:56 dalek rakudo/nom: 77e4f64 | (Elizabeth Mattijsen)++ | src/core/Int.pm:
19:56 dalek rakudo/nom: Add Range coercers for unsigned int types
19:56 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/77e4f64884
20:00 raiph .ask grondilu Does it make sense to you to remove https://github.com/perl6/modules/blob/master/Digest/lib/Digest.pm?
20:00 yoleaux raiph: I'll pass your message to grondilu.
20:06 vukcrni joined #perl6
20:07 xragnar_ joined #perl6
20:08 anaeem1 joined #perl6
20:09 anaeem1_ joined #perl6
20:11 dalek rakudo/nom: 8ad504c | (Elizabeth Mattijsen)++ | src/core/Any.pm:
20:11 dalek rakudo/nom: Remove type.min/max/minmax experiment
20:11 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/8ad504c659
20:13 kurahaupo joined #perl6
20:14 panchiniak left #perl6
20:28 dolmen joined #perl6
20:28 raiph .ask pmurias Does it make sense to remove https://github.com/perl6/simple-tests ?
20:28 yoleaux raiph: I'll pass your message to pmurias.
20:37 raiph .ask rurban Does it make sense to remove http://github.com/perl6/nqp-rx ?
20:37 yoleaux raiph: I'll pass your message to rurban.
20:38 vendethiel .oO( Reactive NQP; back in 2012? )
20:43 vendethiel hehehe. A friend of mine had to do some parsing in python (a project for about a week)
20:43 lizmat colomon, itz: how about: $ 6 'my $foo = 42; my @bar = <a b c>; dd $foo,@bar'
20:43 lizmat $foo = 42
20:43 lizmat @bar = Array.new("a", "b", "c")
20:43 vendethiel he told me "since you showed me p6, I couldn't stop thinking about how easier it'd be" :D
20:44 lizmat colomon, itz: as a debugging aid ?
20:46 lizmat vendethiel: :-)
20:46 vendethiel lizmat: we're currently going over it, but this time in P6. He's quite receptive :P
20:46 lizmat cool!
20:49 colomon lizmat: yes, :$variable.perl is a lovely debugging aid.
20:49 lizmat but: 'dd $variable' would be shorter, no?
20:49 leont joined #perl6
20:49 lizmat but: 'dd $variable, $var2, @array' would be shorter, no?
20:50 colomon lizmat: sorry, I wasn't clear in the commit comment, I meant in your implementation.  Once I figured out what unit.Range (for example) was meant to do, it makes sense to me.
20:50 colomon lizmat: what is dd?
20:51 lizmat short for datadumper
20:52 colomon is it a built-in in rakudo?
20:52 lizmat it could be
20:52 colomon m: my $a = [1, 2]; dd $a
20:52 camelia rakudo-moar 77e4f6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/7U8740cBgbâ�¤Undeclared routine:â�¤    dd used at line 1â�¤â�¤Â»
20:54 Ven joined #perl6
20:54 dalek rakudo/nom: e630782 | (Elizabeth Mattijsen)++ | src/core/Any.pm:
20:54 dalek rakudo/nom: Naive implementation of dd() tiny data dumper
20:54 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/e630782f55
20:54 lizmat colomon: ^^^
20:55 colomon lizmat: good service!  ;)
20:57 colomon lizmat: Just finally followed all your links.
20:57 colomon afk # family
21:01 woolfy joined #perl6
21:02 mads- left #perl6
21:04 woolfy left #perl6
21:04 gtodd couldn't one make "dd" into prefix operator that's short for :$whatever.perl
21:05 TimToady would need to be a macro to get the variable names
21:06 woolfy joined #perl6
21:07 lizmat m: my @a = <a b c>; say :@a.perl   # doesn't say it was an array
21:07 camelia rakudo-moar 77e4f6: OUTPUT«"a" => ["a", "b", "c"]␤»
21:07 lizmat $ 6 'my @a = <a b c>; dd @a'
21:07 lizmat @a = Array.new("a", "b", "c")
21:09 gtodd oh you have dd :-)
21:09 lizmat I've added that in e630782f55
21:09 gtodd :-D  builtin
21:09 lizmat I hope I'll be forgiven for adding that  :-)
21:11 gtodd heh ... just keep giving examples in here of using dd and people will get addicted
21:11 colomon lizmat: okay, family off to Toys R Us
21:12 colomon lizmat: so the idea is instead of Int.max, it's Int.Range.max?
21:12 lizmat m: int32.Range.say
21:12 camelia rakudo-moar 77e4f6: OUTPUT«-2147483648..2147483647␤»
21:13 Ven TimToady: would it?
21:13 lizmat so yes, I think
21:13 Ven m: dd($v) { say $v.VAR.name => $v }; my $a = 1; dd $a;
21:13 camelia rakudo-moar 77e4f6: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/oRXwQMwUlpâ�¤Variable '$v' is not declaredâ�¤at /tmp/oRXwQMwUlp:1â�¤------> [32mdd($v[33mâ��[31m) { say $v.VAR.name => $v }; my $a = 1; [0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
21:13 Ven m: sub dd($v) { say $v.VAR.name => $v }; my $a = 1; dd $a;
21:13 camelia rakudo-moar 77e4f6: OUTPUT«"\$v" => 1␤»
21:13 Ven TimToady: ^ a bit of a hack
21:13 lizmat Ven: that's basically how I implemented multi dd
21:14 Ven oh, lizmat++ actually added it
21:14 Ven annnd spooked me
21:15 colomon lizmat++
21:29 gtodd m:  sub dd2($v) { say $v.VAR.name ~ "=>" ~ "$v" }; my $a = 1; dd2 $a;
21:29 camelia rakudo-moar e63078: OUTPUT«$v=>1␤»
21:30 lizmat gtodd: I chose to do .perl for the value, so that you can do arrays/hashes and see what they are better
21:30 gtodd right
21:31 gtodd better that way
21:31 dalek rakudo-star-daily: de28d60 | coke++ | log/ (15 files):
21:31 dalek rakudo-star-daily: today (automated commit)
21:31 dalek rakudo-star-daily: review: https://github.com/coke/rakudo-star-daily/commit/de28d60e04
21:32 dalek perl6-roast-data: 742582c | coke++ | / (4 files):
21:32 dalek perl6-roast-data: today (automated commit)
21:32 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/742582c44c
21:44 BenGoldberg joined #perl6
21:49 aborazmeh joined #perl6
22:05 Ven joined #perl6
22:18 colomon joined #perl6
22:27 lizmat :m my $foo = 42; my @bar = [<a b c>]; dd $foo, @bar
22:28 lizmat m: my $foo = 42; my @bar = [<a b c>]; dd $foo, @bar
22:28 camelia rakudo-moar e63078: OUTPUT«$foo = 42, @bar = Array.new(["a", "b", "c"])␤»
22:28 lizmat :-)
22:28 lizmat m: my $foo = 42; my @bar = <a b c>; dd $foo, @bar
22:28 camelia rakudo-moar e63078: OUTPUT«$foo = 42, @bar = Array.new("a", "b", "c")␤»
22:28 lizmat dd has landed   :-)
22:28 lizmat good night, #perl6!
22:29 grondilu wth?
22:29 yoleaux 20:00Z <raiph> grondilu: Does it make sense to you to remove https://github.com/perl6/modules/blob/master/Digest/lib/Digest.pm?
22:29 lizmat grondilu: a debug helper, tiny data dumper
22:30 lizmat sleep&
22:33 grondilu .tell raiph I'm not sure what this is.  It's not mine anyway.  Still, I notice this uses Parrot-specific code.  If it can be shown that the pure P6 version is as least as good, it should prevail, shouldn't it?
22:33 yoleaux grondilu: I'll pass your message to raiph.
22:33 [Coke] m: dd.WHY.say
22:33 camelia rakudo-moar e63078: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/s1Rnmdm2RNâ�¤Calling 'dd' requires arguments (if you meant to operate on $_, please use .dd or use an explicit invocant or argument)â�¤    Expected any of: â�¤    :(Any \a) â�¤    :(Any \a, Any \b) …»
22:33 bobbinnumerous joined #perl6
22:34 DarthGandalf joined #perl6
22:44 ctlM joined #perl6
22:52 SamuraiJack_ joined #perl6
23:02 cognome joined #perl6
23:29 ctlM joined #perl6
23:35 ctlM joined #perl6
23:43 eupcan277 joined #perl6
23:47 eupcan277 joined #perl6
23:57 cognome joined #perl6
23:58 colomon joined #perl6

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

Perl 6 | Reference Documentation | Rakudo