Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2015-01-09

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:21 cognominal joined #perl6
00:21 skids joined #perl6
00:26 frew joined #perl6
00:29 TimToady masak: your premise "expressions are the only things that can call macros" is a bit suspicious to me; I think any protoregex can dispatch to a macro defined in its slot, with the surrounding expectations maintained, since each such protoregex manages its own little lexer
00:31 TimToady and quasi interpolations can be handled much the same way, as little (presumably parameterless?) macro calls from the quasi parser
00:33 TimToady for regex that are not proto, I think you have to rely on method shadowing, and fallback to the standard one if your special one doesn't match
00:34 TimToady but most macros will want to fit into an existing grammatical category
00:35 * TimToady heading out to craigslist's (belated) holiday party, which got stormed in December...
00:35 TimToady afk &
00:36 adu TimToady: what is the secret to Perl6 understanding?
00:37 Mouq Zen & The Art of Perl6 Hacking
00:40 b2gills adu: it may be too early yet for anyone to have figured it out completely
00:40 adu b2gills: or maybe the answer is "42"
00:59 raiph joined #perl6
01:03 b2gills m: say "Life, the Universe, and Everything".WHY
01:03 camelia rakudo-moar c5dcdf: OUTPUT«42␤»
01:08 yeahnoob joined #perl6
01:16 tinyblak joined #perl6
01:19 Mso150_p joined #perl6
01:21 dayangkun joined #perl6
01:57 cognominal joined #perl6
02:16 BenGoldberg joined #perl6
02:19 cognominal joined #perl6
02:22 dalek nqp: 5bda620 | (Geoffrey Broadwell)++ | t/concurrency/02-lock.t:
02:22 dalek nqp: Remove LTA error comment since psch++ fixed the error
02:22 dalek nqp: review: https://github.com/perl6/nqp/commit/5bda62074c
02:23 rmgk_ joined #perl6
02:29 JimmyZ .tell japhb  I updated the pull request.
02:29 yoleaux JimmyZ: I'll pass your message to japhb.
02:38 japhb JimmyZ: Ah, OK, I'll take a look
02:38 yoleaux 02:29Z <JimmyZ> japhb: I updated the pull request.
02:45 dalek perl6-bench: d2f48ad | (Jimmy Zhuo)++ | / (6 files):
02:45 dalek perl6-bench: Add Point class benchmark
02:45 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/d2f48add9f
02:45 dalek perl6-bench: 90c07ed | (Jimmy Zhuo)++ | / (3 files):
02:45 dalek perl6-bench: Update Point class benchmark, add multi method version for NQP, because it's 2x slow, but Perl 6 multi method version one is the same speed
02:45 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/90c07edc16
02:45 dalek perl6-bench: a2cd0bd | (Jimmy Zhuo)++ | / (9 files):
02:45 dalek perl6-bench: adjust point-class-add*
02:45 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/a2cd0bdd7e
02:45 dalek perl6-bench: 25425c0 | japhb++ | / (9 files):
02:45 dalek perl6-bench: Merge pull request #16 from zhuomingliang/master
02:45 dalek perl6-bench:
02:45 dalek perl6-bench: add point_class_add
02:45 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/25425c0abd
02:49 andreoss joined #perl6
02:51 andreoss is there one more way to do "take while" than gather while ... { take }?
02:53 JimmyZ @a = []; while ... { $a.push: ... } ?
02:53 JimmyZ s/$/@/
02:54 adu oo
02:54 adu ppl
02:55 adu or commits, I'm not quite sure
02:56 dayangkun joined #perl6
03:08 dalek perl6-bench: 327272c | (Geoffrey Broadwell)++ | perl6/point_class_add_README:
03:08 dalek perl6-bench: Clean up perl6/point_class_add_README
03:08 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/327272c2e6
03:08 dalek perl6-bench: b86885f | (Geoffrey Broadwell)++ | minibenchmarks.pl:
03:08 dalek perl6-bench: Clean up point-class-add minibenchmarks.pl entry, and default to disabled until all variants are converted to SCALE
03:08 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/b86885fb11
03:09 japhb JimmyZ: I'll need to do a couple more commits before re-enabling the tests, but the above ought to reduce confusion a bit.  Thank you for the PR!
03:10 adu japhb: what's a PR?
03:10 andreoss m: sub foo() { [1,2,3] }; my ($a,$b,$c) = foo(); say $b;
03:10 camelia rakudo-moar c5dcdf: OUTPUT«(Any)␤»
03:11 japhb Also, I note that there are some subtle differences between test files (like some using 'return' and others just dropping off the end of the method)
03:11 moritz adu: pull request
03:11 andreoss how is such thing done?
03:11 japhb return actually has a significant performance effect, so that may be skewing results
03:11 adu ah
03:11 japhb moritz: thank you
03:11 moritz m: sub foo() { [1,2,3] }; my ($a,$b,$c) = foo().list; say $b;
03:11 camelia rakudo-moar c5dcdf: OUTPUT«2␤»
03:12 adu japhb: is return faster than progn?
03:12 japhb return is slower
03:12 adu what?!?
03:12 adu so progn is faster?
03:12 japhb Wait, 'progn', what is that?
03:12 JimmyZ japhb: Thanks :)
03:13 japhb I had mentally substituted the other thing I mentioned, which is falling off the end of the method
03:13 adu http://www.lispworks.com/documentati​on/HyperSpec/Body/s_progn.htm#progn
03:13 andreoss moritz: what if foo is gather?
03:13 japhb return is slower than falling off the end, because it is a "control exception".
03:13 adu japhb: "progn" is in my opinion the oldest name for "evaluate a bunch of statements, and then return an expression"
03:14 japhb adu: Yes, in those terms, progn is faster.
03:14 andreoss m: sub foo() { [1,2,3] }; my ($a,$b,$c) <== foo(); say $b;
03:14 camelia rakudo-moar c5dcdf: OUTPUT«(Any)␤»
03:14 moritz m: my ($a, $b, $c) = gather { take [1, 2, 3] }.list; say $b
03:14 camelia rakudo-moar c5dcdf: OUTPUT«(Any)␤»
03:14 adu japhb: Scheme renamed Lisp's progn to begin
03:14 andreoss such syntax would be nice
03:15 * japhb hasn't seriously used Scheme since 1989, so is perhaps a bit out of practice.  :-)
03:15 adu japhb: in GNU C it's called ({ a; b; c; })
03:15 moritz m: sub foo() { [1,2,3] }; my ($a,$b,$c) <== foo().list; say $b
03:15 camelia rakudo-moar c5dcdf: OUTPUT«(Any)␤»
03:16 adu my point is: progn, begin, ({}), "falling off the end", it's all the same idea
03:16 japhb Sure.  It's not that I didn't understand the concept, I just didn't understand the LISP name for it.
03:16 japhb .oO( The name of a thing is not the thing .... )
03:17 adu lol
03:17 adu but Lisp and Scheme are really old
03:17 japhb So am I, but not as old as LISP.  :-)
03:17 adu I've been a listener in debates over which is older
03:17 moritz defun!
03:18 japhb Note my habit of capitalizing LISP, heh.
03:18 adu because the first Scheme impl was definitely after Lisp, but the Scheme papers were published before Lisp
03:19 * japhb shrugs ... his Scheme experience was a semester of SaIoCP
03:21 japhb In any case, if you look through the setting, you'll find lots of places where we intentionally end a function with an expression instead of a return statement.
03:22 adu makes sense
03:23 japhb &  #  The bus.  It stops.
03:24 adu japhb: are you having a siesure?
03:29 * JimmyZ wonders when we need the 'return' keyword
03:30 moritz JimmyZ: for returning from inner constructs
03:31 JimmyZ Is there a example code?
03:31 moritz sub f(*@v) { for @v -> $x { return 2 * $x if $x > 10 }; 'no such vaule' }
03:31 moritz *value
03:32 noganex joined #perl6
03:33 JimmyZ Is there a way to return from inner constructs without causing 'control exception'?
03:35 JimmyZ just like without the 'return
03:35 JimmyZ ' keyword in the bottom of sub
03:35 moritz well, with non-control exceptions
03:36 araujo joined #perl6
03:38 JimmyZ I mean just by using return op code
03:38 moritz if the return opcode throws a control exception, why not?
03:41 JimmyZ hmm, let's change the question: Is there a way to return without calling 'return' sub, like without 'return' sub in the bottom of a sub which returns a value without calling 'return' sub.
03:43 moritz JimmyZ: I'm not aware of one
03:43 JimmyZ like a sub returns a value in the bottom without calling 'return' sub
03:58 cognominal joined #perl6
04:00 moritz JimmyZ: the problem is that for example 'for' executes its block through several layers of routines
04:00 moritz JimmyZ: so the 'return' must traverse all the layers
04:11 gfldex joined #perl6
04:14 sirdancealot joined #perl6
04:36 tinyblak joined #perl6
05:03 JimmyZ moritz: Thanks, I hope there will be a way that  acts as the same as implicit return
05:08 andreoss how to properly indent chained method calls?
05:08 andreoss $a.b.c.d.e(1)
05:10 andreoss wow. it's backslash
05:13 andreoss m: "hello".\    say;
05:13 camelia rakudo-moar c5dcdf: OUTPUT«hello␤»
05:15 andreoss left #perl6
05:25 kaleem joined #perl6
05:28 yeahnoob joined #perl6
05:46 JimmyZ hmm, maybe it's an opitimization
05:49 IllvilJa joined #perl6
06:01 bjz joined #perl6
06:02 adu joined #perl6
06:10 dj_goku joined #perl6
06:22 Mso150_p joined #perl6
06:45 fwilson joined #perl6
06:50 Rounin joined #perl6
06:56 yeahnoob joined #perl6
06:57 yeahnoob joined #perl6
06:58 xinming joined #perl6
07:05 dj_goku joined #perl6
07:05 dj_goku joined #perl6
07:05 jluis joined #perl6
07:11 Patterner joined #perl6
07:33 dalek perl6-bench: c13ab05 | (Jimmy Zhuo)++ | perl6/point_class_add2:
07:33 dalek perl6-bench: Fix P6opaque: no such attribute '$!x'
07:33 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/c13ab0520f
07:33 dalek perl6-bench: bedc8ed | FROGGS++ | perl6/point_class_add2:
07:33 dalek perl6-bench: Merge pull request #17 from zhuomingliang/master
07:33 dalek perl6-bench:
07:33 dalek perl6-bench: Fix P6opaque: no such attribute '$!x'
07:33 dalek perl6-bench: review: https://github.com/japhb/pe​rl6-bench/commit/bedc8ed851
07:41 cognominal joined #perl6
07:49 tinyblak joined #perl6
07:51 tinyblak_ joined #perl6
08:17 darutoko joined #perl6
08:27 dalek joined #perl6
08:28 zakharyas joined #perl6
08:31 tinyblak joined #perl6
08:31 virtualsue joined #perl6
08:34 telex joined #perl6
08:43 tinyblak joined #perl6
08:53 tinyblak joined #perl6
09:03 spider-mario joined #perl6
09:05 Ovid joined #perl6
09:06 CurtisOvidPoe Morning all.
09:07 raydiak \o CurtisOvidPoe
09:07 CurtisOvidPoe \o?
09:07 CurtisOvidPoe Ah, is that a wave?
09:07 raydiak aye
09:07 CurtisOvidPoe :)
09:08 CurtisOvidPoe For string overloading, isn’t it supposed to be a simple matter of overloading the Str method? (https://perl6advent.wordpress.com/200​9/12/22/day-22-operator-overloading/)
09:08 raydiak yes
09:09 CurtisOvidPoe I tried that, but I’m doing something wrong: https://gist.github.com/Ovid/a935ab3b93300d75d501
09:10 psch CurtisOvidPoe: &say calls .gist
09:10 psch m: class Foo { method Str { "foo" }; method gist { "bar" } }; say Foo.new
09:10 camelia rakudo-moar c5dcdf: OUTPUT«bar␤»
09:11 psch m: class Foo { method Str { "foo" }; method gist { "bar" } }; my $foo = Foo.new; say "$foo"
09:11 camelia rakudo-moar c5dcdf: OUTPUT«foo␤»
09:13 JimmyZ 200~m: class Foo { method Str { "foo" }; method gist { "bar" } }; say~ Foo.new
09:13 JimmyZ m: class Foo { method Str { "foo" }; method gist { "bar" } }; say~ Foo.new
09:13 psch (or the other way around: &say doesn't force Str context)
09:13 camelia rakudo-moar c5dcdf: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/FUekCcopnB�Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument�at /tmp/FUekCcopnB:1�------> [32m { "foo" }; method gist { "bar" }…»
09:13 rurban joined #perl6
09:13 JimmyZ m: class Foo { method Str { "foo" }; method gist { "bar" } }; say ~Foo.new
09:13 camelia rakudo-moar c5dcdf: OUTPUT«foo␤»
09:13 JimmyZ m: class Foo { method Str { "foo" }; method gist { "bar" } }; say Foo.new
09:13 camelia rakudo-moar c5dcdf: OUTPUT«bar␤»
09:14 raydiak sometimes when I want to be able to say an object directly and get a string, I'll overload .gist to call .Str, too
09:15 JimmyZ so you may want 'say ~$point'
09:15 raydiak m: class Foo { method gist { .Str }; method Str { "foo" } }; say Foo.new # like that
09:15 camelia rakudo-moar c5dcdf: OUTPUT«␤»
09:15 CurtisOvidPoe Thanks all.
09:16 raydiak m: class Foo { method gist { self.Str }; method Str { "foo" } }; say Foo.new # like that
09:16 camelia rakudo-moar c5dcdf: OUTPUT«foo␤»
09:17 CurtisOvidPoe Why is the output of my code then “[0,0]\nTrue”?
09:17 psch S29:420 # "used as a last-ditch string coercion" i wonder if that means say should .Str first
09:17 synopsebot Link: http://perlcabal.org/syn/S29.html#line_420
09:18 psch CurtisOvidPoe: say say ~$point
09:18 psch CurtisOvidPoe: in the paste at least :)
09:18 raydiak CurtisOvidPoe: iow Str should return the string, not print it out
09:19 CurtisOvidPoe Oh, duh! :)
09:19 raydiak :)
09:20 CurtisOvidPoe I am a bear of little brain.
09:20 jnthn https://github.com/perl6/specs/blob/​master/S02-bits.pod#the-gist-method may be a worthwhile read on the role of .gist
09:21 CurtisOvidPoe Thanks, jnthn.
09:26 kjs_ joined #perl6
09:27 rindolf joined #perl6
09:36 TuxCM joined #perl6
09:36 cognominal joined #perl6
09:38 mathw morning
09:39 dakkar joined #perl6
09:44 FROGGS_ hi mathw
09:48 abraxxa joined #perl6
10:08 tinyblak joined #perl6
10:15 nwc10 10:12 <@osfameron> does anyone fancy helping out with https://github.com/mysociety/hassleme ?
10:15 nwc10 10:12 <@osfameron> but it's quite a fun project (written in old-fashioned, but I think relatively clean CGI Perl)
10:15 nwc10 10:13 <@Lee> oh, this could be a good candidate for a case study in converting CGI to something new(er)
10:15 nwc10 and, that's the on-topic bit :-)
10:15 osfameron ah... *that* much newer :D
10:16 nwc10 would anyone think it fun to convert something simple in Perl 5 to Perl 6?
10:16 virtualsue joined #perl6
10:16 CurtisOvidPoe Yeah, take a swing at DBIx::Class, please ;)
10:17 CurtisOvidPoe (er, but skip the whole inheritance bit, use roles internally, and have objects delegate to dbic6 rather than inherit. :)
10:19 mvuets joined #perl6
10:21 moritz CurtisOvidPoe: you missed that "simple" part :-)
10:21 CurtisOvidPoe :)
10:22 nwc10 "SMOP" has taught us that "simple" is now permitted to have various values.
10:23 moritz nwc10: the "S" in "SMOP" stood for "strategic", I believe :-)
10:28 FROGGS_ the next thing I am (continuing) to work on is the port of XML::LibXML+XML::Compile...
10:28 FROGGS_ (after testers.perl6.org hackery)
10:29 tinyblak joined #perl6
10:30 tinyblak_ joined #perl6
10:32 mathw I'm writing an ncurses binding, and a convenience module atop it
10:32 mathw because I am utterly insane
10:32 FROGGS_ *g*
10:33 FROGGS_ we all are
10:33 psch i ditched readline because i'm not insane enough for that :P
10:33 psch bindings for the gnu one that is
10:33 mathw ncurses is fun
10:33 FROGGS_ psch: you'll get back to that, trust me :o)
10:33 mathw for some value of fun most people wouldn't recognise
10:34 mathw it does some things with macros which just shouldn't be allowed
10:34 FROGGS_ hehe
10:34 moritz mathw: hey, we have people here in the channel who write VMs, codegen, and finite automaton transformations :-)
10:34 FROGGS_ bbiab # lunch
10:34 moritz or even docs :-)
10:34 mathw moritz: all those things are sane and understandable, if complex
10:35 psch docs?!
10:35 mathw ncurses, on the other hand, is an API from the depths of hell
10:35 moritz psch: yes, like, writing things in prose about how to use stuff
10:35 FROGGS_ I hope it is not as bad as the hellboy movies >.<
10:36 mathw FROGGS_: it's incomparable
10:36 mathw it's one of the most baffling things I've ever done
10:36 mathw although part of that is some sort of argument between the Perl 6 I/O system and the ncurses one I think
10:36 mathw if you ask ncurses to read a key from the keyboard, it returns immediately with an error
10:37 mathw however, ncurses console read mode alteration commands appear to affect $*IO.getc
10:37 mathw which at least means I can do what I want to do :)
10:37 psch maybe i can get something howto-ish out of bringing the JavaHOW more towards perl6-land...
10:38 psch although maybe i'm missing some MOP docs.  what exists on doc.perl6.org doesn't look too helpful to me
10:38 psch moritz++ # prose explaining how to use stuff
10:39 moritz psch: well, documenting MOP is a slow and painful process
10:40 psch moritz: yeah, i'd assume so.  i'm still far from confident i understand enough to actually decide if what i'm thinking of doing with the JavaHOW actually makes sense...
10:40 moritz psch: mostly because most of it is not specced, and I understand it only half-ways, and because there are quite many methods (even if many of them are rather simple in nature, but still non-trivial to explain precisely)
10:41 moritz psch: do you want to expose only java classes, or also interfaces?
10:42 psch moritz: well, in the end i imagine we want a complete two-way interop, and every half-arsed solution in between makes that much more complicated later on...
10:42 moritz psch: so you'd likely need a JavaClassHOW and a JavaInterfaceHOW, with the latter acting a bit likes p6 roles
10:43 psch moritz: and currently i have a JavaHOW which basically just says "we did this all in the vm and we don't expose anything, you better know what you're doing"
10:44 tinyblak joined #perl6
10:45 psch HOW.name is pretty much all that does what it should atm
11:08 tinyblak joined #perl6
11:17 denis_boyun joined #perl6
11:17 prime joined #perl6
11:25 masak good mo^Wante^Wafternoon, #perl6
11:27 moritz \o masak
11:42 masak Mouq: re http://irclog.perlgeek.de/​perl6/2015-01-08#i_9907773 -- the advantages... in Perl 6? I guess they are that HLL::Grammar already has the expression parser Perl 6 needs. the advantages... in 007? none, and 007 doesn't use HLL::Grammar's EXPR, it defines its own.
11:43 masak TimToady: I should have said "*currently*, with what we know, what we can consistently imagine, and what we have implemented, expressions are the only things that can call macros".
11:43 masak I am always willing to change my outlook based on consistent spec.
12:01 IllvilJa joined #perl6
12:17 saba joined #perl6
12:19 masak I have a new solution to my 007 macro/quasi/scoping conundrum: https://github.com/masak/007/i​ssues/7#issuecomment-69327526
12:19 gfldex joined #perl6
12:22 moritz arent  ⦃...⦄ just a do { ... } block?
12:22 moritz (except that 007 probably doesn't have 'do')
12:24 pmurias it could be required to have an expression at the end
12:26 tinyblak joined #perl6
12:38 BenGoldberg joined #perl6
12:42 vendethiel that does sound like a do block to me too
12:42 masak I guess it can be thought of that way, yes.
12:42 masak plus OUTER:: meddling.
12:43 xfix joined #perl6
12:43 masak but note that 007 syntactically still would have neither `do`, nor self-executing blocks, nor blocks that when executed return a value.
12:47 psch https://gist.github.com/pe​schwa/0f8830ba3c6a2eb852ba \o/
12:47 psch now i just gotta do that automatically for every field in all generated adaptors
12:48 vendethiel psch++
12:48 psch ...i'm pretty sure that's the actually hard part :)
12:48 masak pmurias: interesting notion.
12:49 masak pmurias: I might also require it not to have any exotic control flow, until I understand those bits better.
12:49 arnsholt I think I missed a memo somewhere; what's 007?
12:49 arnsholt (Besides James Bond =p)
12:49 FROGGS_ psch: and you've got a Foo.jar somewhere?
12:49 masak arnsholt: http://masak.github.io/007/
12:50 arnsholt "it's perhaps easiest to think of 007 as the secret love child of Perl 6 and Python." =D
12:51 psch FROGGS_: no, just a .class;  the multiline comment is the contents
12:51 FROGGS_ is it a Perlthon or more a Pytherl?
12:51 xfix It's Parrot.
12:51 FROGGS_ psch: ahh, cool
12:51 FROGGS_ xfix: :P
12:52 xfix Are semicolons mandatory in 007?
12:52 masak oh yes,
12:52 masak we may like Python in some ways, but we're not barbarians.
12:52 FROGGS_ then it is more a PHPerlthon
12:53 masak xfix: last semicolon (in block and in compunit) can be skipped, though.
12:53 FROGGS_ ohh, I was think about mandatory trailing semicolon... can you omit semicolons in Python between statements?
12:53 masak FROGGS_: yes, you can.
12:53 masak FROGGS_: as long as they are not on the same line ;)
12:53 FROGGS_ "nice"
12:53 moritz FROGGS_: python is very line-oriented
12:53 moritz or whitespace-oriented
12:53 moritz that's more like it
12:53 masak note that Python allows semicolons, though. not many people are aware of this.
12:54 xfix I personally like braces, but dislike semicolons.
12:54 * masak smiles at the idea of a JS-influenced school of thought flaring up within the Python community, putting in all the semicolons everywhere
12:54 vendethiel *g*
12:54 FROGGS_ I think I do like semicolons... I always feel uneasy when writing VBScript
12:54 masak I really like semicolons.
12:55 masak they give me the courage to lay out my statements as I want.
12:55 * vendethiel doesn't like semicolons very much, but understand they're (mostly) necessary for (sane) postfixes... :)
12:55 moritz well, inserting semicolons in javascript is no clear win
12:55 xfix (I probably use not standard JavaScript coding style without semicolons, because I don't like them)
12:55 moritz because the mere fact that they are optional can mean that the parser might insert one for you anyway
12:55 masak moritz: actually, I would be fine with it all (and I would use semicolons everywhere just for clarity)
12:55 moritz and inserting more yourself doesn't change that in the slightest
12:55 masak moritz: but the `return\nvalue` thing bites me often, and I hate it.
12:56 moritz I insert semicolons in javascript too, but it's more habit / sentimental value, I guess
12:56 FROGGS_ why would you do `return\nvalue`?
12:56 zakharyas joined #perl6
12:56 masak FROGGS_: I've done it in real code, not thinking anything of it.
12:57 xfix I usually do `return (\n` if I have huge value to return. Or just write that return value into a variable.
12:57 masak FROGGS_: I think the case was this: the thing I was returning had three similar function calls, so I laid them out vertically.
12:57 masak FROGGS_: and it looked better if I started on the next line.
12:57 FROGGS_ the only reason is when the `value` expression is very long, but then your might break it up anyway
12:57 FROGGS_ I see
12:57 btyler_ FROGGS_: if you return an object literal and your have a convention of next-line-brace
12:57 btyler_ boom undefined
12:57 btyler_ *you have
12:57 masak the point is, it was a legitimate case.
12:57 xfix return\n{ is ugly IMO.
12:57 masak and that simple *whitespace refactor* broke my code.
12:58 masak good thing I had tests.
12:58 masak but it was during a live demo, so it was still a bit unfortunate :)
12:58 xfix This is a good argument for not allowing statements that do nothing, I guess.
12:58 moritz but return\n does *something*
12:58 masak xfix: `return;` doesn't do nothing.
12:58 xfix I'm aware.
12:58 FROGGS_ but the thing afterwards
12:58 FROGGS_ it is unreachable code at least
12:59 FROGGS_ and that's worth a warning
12:59 btyler_ warnings? in my js? :P
12:59 btyler_ use strict; does a bit, but nothing to that degree
12:59 masak I think there should be two "levels" for errors in compilers: code that oughtn't be *run*, and code that oughtn't be *checked in*.
12:59 xfix "use strict", you mean.
12:59 masak dead code would be of the latter kind.
12:59 moritz btyler_: that's what linters are for
13:00 masak oh right, "linter" was what I was after. moritz++
13:00 btyler_ yeah, of course. a linter would probably also yell about return \n {foo: "bar"};
13:00 FROGGS_ I'd love to see a clang-like mode for perl6...
13:00 masak of course, all that should be baked into a goodenuf IDE anyway.
13:01 FROGGS_ even if most warnings by clang are just annoying and not quite useful, you find quite some real bugs
13:01 FROGGS_ masak: creating a good IDE is one of the hardest things there is sadly
13:02 masak yes.
13:02 masak but it's the logical endpoint of this whole development endeavour.
13:02 xfix I also legitimately used `if (condition) return` without semicolon at end in JavaScript (quick return) once. But I guess it's confusing if somebody doesn't know about automatic semicolon insertion.
13:03 masak xfix: if you were on my team and you did that, I would ask you to stop doing that.
13:03 moritz IDEs always felt weird to me
13:03 moritz they are a way to manage the complexity of a software system
13:04 * colomon has never really used an IDE
13:04 moritz and I always wonder if one couldn't simply reduce the complexity instead
13:04 * colomon does like it when his editor has a simple way to compile his code
13:04 IllvilJa jedit + perltidy + perlcritic :-)
13:04 xfix masak: It's a code that I wrote for my own purposes, written just by me. I use coding style of a project I contribute to, even if I write JavaScript without semicolons, I accept that other projects do use semicolons, and I use semicolons in code I write for those.
13:04 IllvilJa that's my perl IDE.
13:04 IllvilJa spray some 'perl -d' over it and there's debugging/step by step testing.
13:07 FROGGS_ I only use debuggers at the last resort...
13:07 xfix console.log best debugger, obviously.
13:08 xfix Or .perl.say. Or p. Or printf. Or whatever the language uses.
13:08 FROGGS_ but an editor that highlights todo's of my code and github issues besides a proper code highlighting would be very sweet
13:09 FROGGS_ (I just realize that the raid migration of my server at home will take about a week in total /o\)
13:10 FROGGS_ btw, I don't need an output window in my ISE of choice... I don't usually run my code in an IDE anyway
13:10 FROGGS_ IDE*
13:10 FROGGS_ so, I should probably fork SciTE and add buttons :o)
13:10 FROGGS_ and yes, the more I use eclipse the more I hate it
13:13 masak IllvilJa: heeey! long time no see! :D
13:13 masak xfix: good.
13:14 kaleem joined #perl6
13:14 psch FROGGS_: do you know about http://eclim.org/ ?
13:15 psch for when everything is only in eclipse and you *have* to use it from there... :)
13:19 FROGGS_ psch: I don't like vim either :o)
13:20 psch "third party clients have been created to add eclim support to other editors as well (emacs, sublime text 2, textmate)." :P
13:22 * moritz wonders if there's some rule that any sufficiently advanced application gets its own package manager eventually
13:23 moritz I'm sure eclipse has one for its plugins, as do most (all?) modern browsers
13:23 mathw moritz: I often think like that about IDEs when I use Visual Studio and it's trying to be magical and failing.
13:23 moritz there are vim plugins that act as vim package managers
13:24 moritz mathw: I guess the java IDEs are a pretty extreme example, which generate and the later refactor boilerplate code for you
13:24 psch does common lisp contain a package manager and does that package manager belong to the slow, bug-ridden half referenced in greenspun's tenth rule..?
13:25 psch oh, nvm, that rule limits itself to C and Fortran programs
13:26 vendethiel psch: it does not "contain" one, but there are several. asdf is the most widely used, i guess
13:26 vendethiel (usually with quicklisp)
13:26 vendethiel and yes, it's slow :P
13:27 arnsholt psch: You're thinking of the *corollary* to Greenspun's tenth rule: Any sufficiently advanced CL program contains a buggy, informally specified version of half of Prolog" =)
13:28 masak darn smug Prolog weenies
13:31 FROGGS_ even Notepad++ has its own package manager... which is certainly useful for windows peeps
13:31 CurtisOvidPoe m: my Rat $foo = 2.0; say $foo
13:31 camelia rakudo-moar c5dcdf: OUTPUT«2␤»
13:31 CurtisOvidPoe m: my Rat $foo = 2; say $foo
13:31 camelia rakudo-moar c5dcdf: OUTPUT«Type check failed in assignment to '$foo'; expected 'Rat' but got 'Int'␤  in block <unit> at /tmp/rVpGy4Kh2g:1␤␤»
13:32 CurtisOvidPoe Why does that second one fail? An Int can always be represented as a Rat, can’t it?
13:33 pecastro joined #perl6
13:33 moritz it can be represented, but it isn't one
13:33 FROGGS_ well, (mostly?) everything can be represented as a string, but that does not mean there that a coercing is taking place
13:33 moritz just as you can represent any string or number as a string
13:33 FROGGS_ m: my Rat $foo = 2.Rat; say $foo
13:33 camelia rakudo-moar c5dcdf: OUTPUT«2␤»
13:36 masak CurtisOvidPoe: everyone seems to assume that Num <: Rat <: Int in Perl 6.
13:37 moritz CurtisOvidPoe: use Real as a type constraint if you want to allow Rat, Int, Num
13:37 moritz and Numeric if you also want to allow Complex
13:37 CurtisOvidPoe The reason I ask is that this complicates the Point example. If I declare the x and y as Rats, I can’t do Point.new( x = 2, y = 3 )
13:38 CurtisOvidPoe m: class Point {has Rat $.x; has Rat $.y;}; my $p = Point.new(x=2,y=3)
13:38 camelia rakudo-moar c5dcdf: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/09Gzp1T3fm�Unsupported use of y///; in Perl 6 please use tr///�at /tmp/09Gzp1T3fm:1�------> [32m; has Rat $.y;}; my $p = Point.new(x=2,y[33m�[31m=3)[0m�»
13:38 CurtisOvidPoe And I’ve hit an entirely different issue there.
13:38 FROGGS_ m: class Point {has Rat $.x; has Rat $.y;}; my $p = Point.new(x=>2,y=>3)
13:38 camelia rakudo-moar c5dcdf: OUTPUT«Type check failed in assignment to '$!x'; expected 'Rat' but got 'Int'␤  in block  at src/gen/m-CORE.setting:980␤  in method BUILDALL at src/gen/m-CORE.setting:963␤  in method bless at src/gen/m-CORE.setting:951␤  in method new at src/gen/m-CORE.se…»
13:38 moritz CurtisOvidPoe: don't constrain it to Rat if it shouldn't just accept Rat
13:39 moritz CurtisOvidPoe: that's how types work :-)
13:39 FROGGS_ m: class Point {has Real $.x; has Real $.y;}; my $p = Point.new(x=>2,y=>3)
13:39 camelia rakudo-moar c5dcdf: ( no output )
13:39 masak CurtisOvidPoe: what you're going through is something we see often here on channel. something of a FAQ.
13:39 masak CurtisOvidPoe: subtypes != number tower
13:39 CurtisOvidPoe Cheers.
13:40 masak (fwiw, I sometimes also feel it's a very stubborn distinction to uphold... but I've resigned to it being the "right" one)
13:40 CurtisOvidPoe So generally speaking, are most apps going to stick with Int and Real?
13:41 masak yeah.
13:41 masak maybe at some point a module could exist that said "just DWIM these number conversions for me, doggonnit"
13:41 moritz well, one could always use a coercion type Real(Rat) once they are implemented
13:42 CurtisOvidPoe It’s the sort of thing that’s going to trip up many devs who are used to DWIM.
13:42 moritz well, adding type annotations does require thoughts
13:43 CurtisOvidPoe Agreed.
13:43 moritz and it's something that I often got wrong in the beginning
13:43 CurtisOvidPoe “thoughts” is something I’m apparently not very good at lately :)
13:44 moritz mostly I was so glad that I had types that I used them everywhere, and later found out that many of those constraints simply don't hold up
13:45 hoelzro good morning #perl6!
13:46 CurtisOvidPoe Agreed, but when they do, they really make life easier. I love that I can create a well-thought out subset and remove a huge amount of manual error checking in my code (at the expense of error messages which are less verbose)
13:46 kjs_ joined #perl6
13:47 CurtisOvidPoe Morning hoelzro.
13:47 donaldh joined #perl6
13:49 moritz CurtisOvidPoe: FTR, I think the types in Perl 6 are awesome. I just can't see how a type system can both always DWIM *and* be useful
13:50 donaldh how do I iterate a hash's keys in NQP ?
13:51 psch donaldh: my $iter := nqp::iterator($hash); while $iter { my $key := nqp::iterkey_s(nqp::shift($iter)) } # is what i usually do
13:51 donaldh thanks
13:51 moritz iirc you can also use a for-loop
13:52 psch yeah, i think so.  iterkey_s goes on the loop variable
13:52 moritz nqp-m: my $h := nqp::hash('a', 1, 'b', 2); for $h { say($_) }
13:52 camelia nqp-moarvm: OUTPUT«a␤b␤»
13:52 psch oh it works like that
13:52 moritz nqp-m: my $h := nqp::hash('a', 1, 'b', 2); for $h { say(nqp::iterkey_s($_)) }
13:52 camelia nqp-moarvm: OUTPUT«a␤b␤»
13:52 moritz nqp-m: my $h := nqp::hash('a', 1, 'b', 2); for $h { say($_.key) }
13:52 camelia nqp-moarvm: OUTPUT«a␤b␤»
13:52 moritz (I guess nqp::iterkey_s is faster, and doesn't box in-between)
13:52 masak I still think we have some ways to go to make subtyping error messages awesome.
13:53 moritz masak: agreed
13:53 masak my ideal would be "Assignment to variable $x fails subtype constraint `$_ > 0`"
13:54 masak preferably it would even split up && clauses and error on the failing one.
13:55 donaldh nqp-m: my $h := nqp::hash('a', 1, 'b', 2); for $h { say($_.key ~ '=' ~ $_.value) }
13:55 camelia nqp-moarvm: OUTPUT«a=1␤b=2␤»
13:55 donaldh thanks psch++, moritz++
14:00 pmurias masak: re baked into a good enough ide, I disagree I think we optimaly want the code refactoring/analysis part pluggable so we can get it to work a bunch of editors/ides
14:00 xfix_ joined #perl6
14:01 Alina-malina joined #perl6
14:01 xfix joined #perl6
14:03 pmurias masak: instead of having a case where people use some IDE which is at best mediocre just because it has awesome Perl 6 support
14:07 masak *nod*
14:07 masak I'm not against pluggability as such.
14:07 masak just note that re-use is frightfully hard.
14:08 masak like, if you are currently thinking about how hard it is -- it's harder than that.
14:09 moritz the typical approach is to make it work in one situation, and then in the second when second situation arises, and then maybe in the third situation you have some idea on how to make it truely reusable
14:10 tinyblak_ joined #perl6
14:12 zakharyas joined #perl6
14:14 xinming joined #perl6
14:15 pmurias there are approaches that make reuse much harder, like writting a big pile of horrible vimscript instead of having the backend part seperated in a seperate process that sends json
14:17 masak moritz: yes. as far as I know, Josh Bloch coined "three clients" in one of his talks. it's online somewhere.
14:17 masak this one, I think: https://www.youtube.com/watch?v=heh4OeB9A-c
14:26 mathw A type system which can DWIM and be useful at the same time would have to be telepathic, and involve time travel too.
14:28 mathw And yes, code reuse is hard
14:28 mathw VERY HARD
14:32 tinyblak joined #perl6
14:37 huf code reuse is hard when you're thinking of it as code reuse
14:37 masak r: say 6103515625/5; say ((((6103515625/5) * 4 + 123327057) ** 2) % 6103515625); say (((1220703125 * 4 + 123327057) ** 2) % 6103515625)
14:37 camelia rakudo-{parrot,moar} c5dcdf: OUTPUT«1220703125␤0␤6103515624␤»
14:37 masak ok -- between those three expressions, something is quite wrong.
14:37 huf but then you just string together a long-ass shell pipeline using pretty old and standard unix tools
14:38 masak note that the third is just the second but with the evaluated result from the first inserted.
14:38 masak the second and the third should show up the same.
14:38 masak (don't ask me what I was doing when I discovered this) :P
14:38 FROGGS_ calculated your salary? :P
14:39 masak close, but no cigar.
14:39 masak I was finding the square root of -1 among the 5-adics.
14:40 * masak submits rakudobug
14:43 FROGGS_ m: say ((((6103515625  /  5) * 4 + 123327057) ** 2) % 6103515625)
14:43 camelia rakudo-moar c5dcdf: OUTPUT«0␤»
14:43 FROGGS_ m: say ((((6103515625 div 5) * 4 + 123327057) ** 2) % 6103515625)
14:43 camelia rakudo-moar c5dcdf: OUTPUT«6103515624␤»
14:44 masak FROGGS_: you're implying I'm suffering from bignum/rounding effects?
14:44 FROGGS_ I'm implying nothing atm
14:44 masak anyway, FROGGS_++ for interesting data point. that goes in the ticket, too.
14:44 FROGGS_ m: say ((((6103515625 / 5).Int * 4 + 123327057) ** 2) % 6103515625)
14:44 camelia rakudo-moar c5dcdf: OUTPUT«6103515624␤»
14:45 FROGGS_ m: say ((((6103515625 div 5).Num * 4 + 123327057) ** 2) % 6103515625)
14:45 camelia rakudo-moar c5dcdf: OUTPUT«0␤»
14:45 FROGGS_ :o)
14:45 masak heh.
14:47 masak someone with a tuit is welcome to apply the patch suggested by Edsger in https://rt.perl.org/Ticket/Display.html?id=123569
14:47 masak &
14:47 gtodd FROGGS_: you calculated *my* salary
14:48 FROGGS_ hehe
14:49 moritz does that patch still work on good-old cmd?
14:50 FROGGS_ moritz: I've got an windows xp box too, I can check
14:51 pecastro joined #perl6
14:53 geekosaur that was my question too; pretty sure that will not fly in cmd.exe on older windows
14:54 colomon m: say (6103515625  /  5) * 4
14:54 camelia rakudo-moar c5dcdf: OUTPUT«4882812500␤»
14:54 colomon m: say (6103515625  div  5) * 4
14:54 camelia rakudo-moar c5dcdf: OUTPUT«4882812500␤»
14:54 geekosaur but I don't know how much older; it might have been added to win7 or win8, I doubt it works in xp
14:54 colomon m: say ((6103515625  /  5) * 4).WHAT
14:54 camelia rakudo-moar c5dcdf: OUTPUT«(Rat)␤»
14:54 colomon m: say ((6103515625  /  5) * 4).gist
14:54 camelia rakudo-moar c5dcdf: OUTPUT«4882812500␤»
14:54 colomon m: say ((6103515625  /  5) * 4).perl
14:54 camelia rakudo-moar c5dcdf: OUTPUT«4882812500.0␤»
14:55 moritz is powershell the default shell on win7/8 ?
14:55 colomon m: say (6103515625  div  5) * 4 + 123327057
14:55 camelia rakudo-moar c5dcdf: OUTPUT«5006139557␤»
14:55 colomon m: say (6103515625  / 5) * 4 + 123327057
14:55 camelia rakudo-moar c5dcdf: OUTPUT«5006139557␤»
14:55 geekosaur not as far as I know
14:55 colomon oh!
14:55 colomon m: say ((6103515625  / 5) * 4 + 123327057) ** 2
14:55 camelia rakudo-moar c5dcdf: OUTPUT«25061433264160156249␤»
14:55 moritz then maybe the problem is executing .bat files with powershell
14:55 colomon m: say ((6103515625 div 5) * 4 + 123327057) ** 2
14:55 camelia rakudo-moar c5dcdf: OUTPUT«25061433264160156249␤»
14:56 colomon m: say ((6103515625  / 5).Num * 4 + 123327057) ** 2
14:56 camelia rakudo-moar c5dcdf: OUTPUT«2.50614332641602e+19␤»
14:57 colomon say ((((6103515625/5) * 4 + 123327057) ** 2) % 6103515625).WHAT
14:57 colomon m: say ((((6103515625/5) * 4 + 123327057) ** 2) % 6103515625).WHAT
14:57 camelia rakudo-moar c5dcdf: OUTPUT«(Num)␤»
14:57 colomon m: say (((6103515625  / 5) * 4 + 123327057) ** 2).WHAT
14:57 camelia rakudo-moar c5dcdf: OUTPUT«(Rat)␤»
14:59 colomon m: say ((1/2) % 3).WHAT
14:59 camelia rakudo-moar c5dcdf: OUTPUT«(Num)␤»
14:59 colomon easy fix
14:59 colomon (maybe)
15:02 colomon absolutely a rakudobug
15:08 * colomon starts to wonder if he is talking to himself
15:09 zakharyas1 joined #perl6
15:09 * colomon means online, of course he is IRL
15:21 mathw I had to go and find a new pen. It involved delving carefully past piles of unwanted highlighters and staples, and I had to be very slow and quiet lest I wake them up.
15:27 osfameron hehe
15:28 FROGGS_ maybe that explains the behaviour of my co-workers.... perhaps they are searching for pens?
15:29 mathw Or they've been bitten by the highlighters
15:29 kurahaupo joined #perl6
15:42 rindolf joined #perl6
15:45 mr-foobar joined #perl6
15:49 dalek roast: 8f0853b | colomon++ | S03-operators/arith.t:
15:49 dalek roast: More tests for infix:<%> on Rats.
15:49 dalek roast:
15:49 dalek roast: Previously only had one test on the type returned from calling
15:49 dalek roast: infix:<%> on Rats and maybe Ints.
15:49 dalek roast: review: https://github.com/perl6/roast/commit/8f0853b05f
15:53 jluis joined #perl6
15:54 colomon working on fix for the code right now
15:59 colomon spectesting fix...
16:03 FROGGS_ colomon++
16:05 colomon hmmm… presumably we need FatRat tests for this too.
16:08 * colomon is going to run to the nom-store while the spectest is running.  :)
16:09 dalek perl6-roast-data: 5362d1c | coke++ | / (5 files):
16:09 dalek perl6-roast-data: today (automated commit)
16:09 dalek perl6-roast-data: review: https://github.com/coke/perl6​-roast-data/commit/5362d1caf9
16:16 andreoss joined #perl6
16:17 rmgk joined #perl6
16:19 masak colomon: not talking to yourself. glad you're on the case.
16:25 PerlJam even if he is talking to himself, I too am glad he's on the case  :)
16:36 treehug88 joined #perl6
16:40 yeahnoob joined #perl6
16:40 masak yes, those two statements were unrelated ;)
16:44 masak oh, and there's an oeis sequence for the calculations I was doing. of course. http://oeis.org/A048898
16:45 * masak 's law of oeis sequences: no matter how crazy/original the math thing you're trying is, there's an oeis sequence for that
16:45 masak (it's an approximate law, just like Moore's law)
16:45 colomon oh, interesting!
16:45 colomon t/spec/S32-temporal/DateTime-Instant-Duration.rakudo.moar   (Wstat: 0 Tests: 33 Failed: 0)
16:45 colomon TODO passed:   7, 28-30
16:46 colomon hadn't expected that
16:46 cognominal joined #perl6
16:48 japhb colomon: Because you fixed infix:<%> ?
16:49 colomon japhb: it's the only thing I changed
16:49 japhb Nice!
16:49 colomon doh!
16:49 colomon fatal: remote error:
16:49 japhb Though that feels like people have set the bar too low for marking TODO
16:49 colomon You can't push to git://github.com/rakudo/rakudo.git
16:50 japhb .oO( TODO it and forget it )
16:50 dalek rakudo/nom: beb41a0 | colomon++ | src/core/Rat.pm:
16:50 dalek rakudo/nom: Add Rational versions of infix:<%>.
16:50 dalek rakudo/nom:
16:50 dalek rakudo/nom: It's probably possible to do it faster by getting some sort of direct
16:50 dalek rakudo/nom: NQP support for doing it.  This merely makes the operator's behavior
16:50 dalek rakudo/nom: correct.
16:50 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/beb41a0498
16:50 jluis joined #perl6
16:50 colomon japhb: A TODO audit would probably be a very good thing.
16:53 PerlJam heh ... *merely* makes the operator's behavior correct.
16:53 hoelzro m: my @notes; @notes .= sort.uniq;
16:53 camelia rakudo-moar c5dcdf: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/rhcM0M5tC0â�¤Two terms in a rowâ�¤at /tmp/rhcM0M5tC0:1â�¤------> [32mmy @notes; @notes .= sort[33mâ��[31m.uniq;[0mâ�¤    expecting any of:â�¤        infix stopperâ�¤        infix or meta-infix…»
16:54 hoelzro should something like .= sort.uniq work?
16:54 japhb I should think so
16:54 japhb .oO( I should, and it happens that I do also. )
16:56 hoelzro =)
16:57 adu joined #perl6
17:01 [Coke] .unique
17:03 rindolf joined #perl6
17:13 colomon PerlJam: what can I say, I'm very sensitive to performance issues.  :)
17:13 colomon masak:
17:13 colomon > ) ** 2) % 6103515625); say (((1220703125 * 4 + 123327057) ** 2) % 6103515625)
17:13 colomon 1220703125
17:13 colomon 6103515624
17:13 colomon 6103515624
17:16 adu colomon: what are those numbers?
17:18 colomon adu: they're masak's
17:19 colomon adu: the point is the middle one was wrong before, and now it's right.  :)
17:21 pyrimidine joined #perl6
17:28 raydiak morning #perl6
17:28 adu hi raydiak
17:28 telex joined #perl6
17:29 raydiak \o adu
17:29 adu o/
17:33 TimToady FROGGS_: removing Unicode from a .java program feels like an ever-so-slightly wrongish fix to me; why not just change the encoding from ASCII somehow?  Or is the "fix" to recode in UTF-16? <shudders> If so, I retract my qualm... :)
17:33 rindolf joined #perl6
17:34 adu removing? that seems wrong
17:35 TimToady well, changing a non-breaking space to an ASCII space
17:35 adu was it a string literal? or part of source code?
17:36 TimToady if it's in an ordinary comment, that's fine, but if it were going to turn into documentation, I'd want the NB space preserved
17:36 TimToady it was probably an ordinary comment, but it just gave me a cold grue
17:37 * TimToady is specializing in trivialities today :)
17:38 adu TimToady: I once spent a week getting all the MOTDs on all my servers perfect
17:38 masak colomon++ # swift response as can be called for
17:42 TimToady seeing the term "footgun", I want to coin the term "footrope" to mean enough rope to shoot yourself in the foot, but I fear that it will be taken as a bungee cord instead... :)
17:44 raydiak speaking of trivialities, random Pray rendering I did last night: http://data.cyberuniverses.com/stuff/scene-09.png
17:44 skids joined #perl6
17:44 raydiak nothing new, but it turned out kinda cool so thought I'd share, maybe someone else will get inspired to make something cooler :)
17:44 PerlJam TimToady: just contract it a little to "frope" or "footope" or something and it will be sufficiently dissimilar to warrant looking up what it means and thus unambiguously cementing that meaning to the word
17:45 TimToady I suppose we could define footrope as something that works like a footgun, but you have to work a lot harder to pull the trigger
17:46 colomon so, tests for infix:<%> and FatRats -- should they got in S03-operators/arith.t or S32-num/fatrat.t?
17:47 TimToady when you fire a footgun, people blame the footgun, but when you fire a footrope, they blame you instead
17:47 PerlJam or they blame Perl because it gave you the footrope to begin with
17:48 TimToady we just gotta weave all those footropes into a safety net
17:48 TimToady then we could give you enough rope to shoot yourself from a cannon
17:49 * TimToady is not sure he should drink more coffee, if it'll just make things worse...
17:50 * TimToady wonders what's on the far side of trivial...
17:50 adu raydiak: povray?
17:50 raydiak adu: http://cyberuniverses.com/pray/
17:50 adu oh, cool
17:51 PerlJam TimToady:  I dunno ... it seems to me that you need a boost of entropy every now and then so that you can congeal a useful order from the chaos.   Maybe worse is better?
17:51 TimToady maybe it's my backbrane trying to write a FOSDEM talk...
17:55 adu raydiak: so how is Math::Symbolic going?
17:56 adu raydiak: can it solve PDEs yet?
17:58 moritz that's a nasty one, because it requires integration
18:00 raydiak adu: eh, not so much on the progress recently, on much of anything, but hopefully more soonish
18:01 raydiak what is a PDE?
18:02 masak a partial differential equation
18:03 raydiak I'll have to learn more calculus before I worry about such things
18:04 raydiak I've only managed to teach myself a tiny subset of it so far
18:04 molaf joined #perl6
18:06 rindolf joined #perl6
18:10 adu raydiak: well, it's pretty simple, really, its an equation that has partial derivatives
18:12 masak simple as that, huh? :P
18:12 adu I was a math major
18:13 FROGGS__ joined #perl6
18:13 adu so it really is that simple for me
18:14 Mso150 joined #perl6
18:16 KCL_ joined #perl6
18:17 kjs_ joined #perl6
18:17 itz https://github.com/rakudo/rakudo/pull/349
18:17 * itz coughs
18:19 raydiak adu: when I clean the thing up, I'd be happy to have your help if you have spare tuits
18:19 [Coke] itz, that seems safe enough.
18:19 adu tuits?
18:19 raydiak adu: http://design.perl6.org/S99.html#tuit
18:19 FROGGS__ TimToady: I just wanted to unbust the jvm build very quickly... and since I know very little about Java in general, my guess was that Java might have a problem with unicody stuff in its source files
18:20 * [Coke] will give a go when the travis build finishes.
18:20 raydiak adu: your skills as a math major likely far exceed my skills as an autodidactic highschool dropout :)
18:21 adu raydiak: well, I'm a 3rd year university dropout, so I'm not sure I'm any better
18:21 adu raydiak: it also took me 10 years to get a 2-year degree
18:22 raydiak adu: well if partial differential equations are simple for you, it's probably safe to say you have a leg up on me :)
18:23 raydiak though /me admits to not having tried much to learn those parts of math yet...maybe it is simple and I just don't know yet *shrug*
18:23 FROGGS__ TimToady: stackoverflow suggests we could try to pass -Dfile.encoding=UTF8 to our runner... I'll try this in a bit
18:24 raydiak taught myself everything I know about vectors and matrices though...enough to write Pray and such (heh maybe why it is so slow)
18:25 adu raydiak: I've written a few OpenGL apps myself, and I can use matrices effectively, but I still don't claim to "grok" matrices, they're bizarre beasts
18:25 dalek rakudo/nom: 488178c | (Steve Mynott)++ | src/core/Distro.pm:
18:25 dalek rakudo/nom: if lsb_release isn't in path send this to /dev/null
18:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/488178c982
18:25 dalek rakudo/nom: b718ee9 | (Will Coleda)++ | src/core/Distro.pm:
18:25 dalek rakudo/nom: Merge pull request #349 from stmuk/nom
18:25 dalek rakudo/nom:
18:25 dalek rakudo/nom: if lsb_release isn't in path send this to /dev/null
18:25 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/b718ee9fa8
18:27 [Coke] seen whiteknight
18:27 [Coke] .seen whiteknight
18:27 yoleaux I haven't seen whiteknight around.
18:28 itz ty
18:29 tinyblak_ joined #perl6
18:31 raydiak adu: I re-taught them to myself enough times over enough years that I now have the illusion that I kinda understand how they work :)
18:31 mvuets joined #perl6
18:33 adu raydiak: well, then maybe I have a similar illusion about PDEs
18:33 dalek roast: ad2a81c | colomon++ | S32-num/fatrat.t:
18:33 dalek roast: Add tests for infix:<%> on FatRats.
18:33 dalek roast: review: https://github.com/perl6/roast/commit/ad2a81cd09
18:33 dalek roast: 95a6419 | colomon++ | S (2 files):
18:33 dalek roast: Unfudge.
18:33 dalek roast: review: https://github.com/perl6/roast/commit/95a6419afb
18:36 raydiak adu: apparently my illusions are solid enough to project with a rendering algorithm, so similar illusions for PDEs would cut it in Math::Symbolic I think...it's really only up to elementary algebra or so right now
18:36 raydiak also need to figure out how it will handle composite objects like sets, vectors, matrices, etc
18:36 tgt joined #perl6
18:38 raydiak but pretty much all the fun stuff is on hold until I catch back up on the cleaning chores
18:39 tgt joined #perl6
18:43 rurban joined #perl6
18:52 bartolin 9~
18:52 bartolin oops
18:52 masak m: say "9~">>.ord
18:52 camelia rakudo-moar c5dcdf: OUTPUT«57␤»
18:52 masak m: say "9~".comb>>.ord
18:52 camelia rakudo-moar c5dcdf: OUTPUT«57 126␤»
18:52 TimToady m: say "9~".ords
18:52 camelia rakudo-moar c5dcdf: OUTPUT«57 126␤»
18:53 jercos m: say :256["9~".ords]
18:53 camelia rakudo-moar c5dcdf: OUTPUT«14718␤»
18:54 masak m: say :128["9~".ords]
18:54 camelia rakudo-moar c5dcdf: OUTPUT«7422␤»
18:54 TimToady m: say :256["␤".ords]
18:54 camelia rakudo-moar c5dcdf: OUTPUT«10␤»
18:54 TimToady oh, heh
18:55 masak that's the evalbot interfering :)
18:55 TimToady m: say :256["☺".ords]
18:55 camelia rakudo-moar c5dcdf: OUTPUT«9786␤»
18:56 TimToady m: say :256[0x263a]
18:56 camelia rakudo-moar c5dcdf: OUTPUT«9786␤»
18:56 leont joined #perl6
18:56 TimToady seems we could use a check there...
18:56 TimToady m: say :256[256,256]
18:56 camelia rakudo-moar c5dcdf: OUTPUT«65792␤»
18:57 * masak submits rakudobug
18:58 Mouq joined #perl6
18:58 TimToady masak: http://irclog.perlgeek.de/​perl6/2015-01-09#i_9909653 sounds like the setup for a no true Scotsman defense :P
18:58 TimToady no *consistent* spec would every say that...
18:58 TimToady *ever
18:59 masak heh.
19:00 masak no, I meant, I will get behind almost any spec that is closer to directly specifying how to implement stuff than to handwaving.
19:00 masak the macro spec is still too much handwaving.
19:01 masak and wanting other things than expressions to function as macros is all fine, but so far what we have is a bunch of examples of expressions working like macros.
19:02 * leont is looking for a roommate for FOSDEM, anyone else looking for one?
19:02 masak as far as I know, no-one has ever created a macro of some more exocic category such as sigil:sym<%> or trait_mod:sym<does>, or even thought about how to do so.
19:03 jercos m: say Buf.new((->$word is copy {reverse gather while $word > 0 { take $word % 256; $word div= 256 }})(:256["foo".ords])).decode
19:03 camelia rakudo-moar c5dcdf: OUTPUT«foo␤»
19:03 leont woolfy: what's up with the schedule of the perl devroom? It still looks empty on the FOSDEM website
19:03 jercos hrm, there's probably a cleaner way to get .base(256) :p
19:04 jercos m: say Buf.new((->$word is copy {reverse gather while $word > 0 { take $word % 256; $word div= 256 }})(:256["Snowman says hello: ☃".encode.list])).decode
19:04 camelia rakudo-moar c5dcdf: OUTPUT«Snowman says hello: ☃␤»
19:05 jercos och
19:06 arnsholt masak: A macro sigil feels more like a reader macro than a standard macro (to appropriate CL terminology), I think
19:06 jercos m: say :256["lol".encode]
19:06 camelia rakudo-moar c5dcdf: OUTPUT«3␤»
19:06 jercos oh good. my rather aged star install OOM'd itself on that.
19:06 * moritz still wants a more low-level way to cast a Buf[uint16] into a Buf[uint8]
19:06 beastd joined #perl6
19:07 jercos moritz: like javascript typedarray views?
19:09 rindolf joined #perl6
19:09 arnsholt Or a primitive to copy the underlying  storage with a different element size on top?
19:10 arnsholt Incidentally, I think we'd need something more or less like that for NativeCall too
19:11 moritz jercos: what arnsholt said
19:11 masak arnsholt: in not too many words, what distinguishes a reader macro from a standard macro?
19:12 TimToady m: say "{"☃".&uniname.tclc} says hello"
19:12 camelia rakudo-moar c5dcdf: OUTPUT«Snowman says hello␤»
19:13 adu m: say "💩".&uniname.tclc
19:13 camelia rakudo-moar c5dcdf: OUTPUT«Pile of poo␤»
19:14 TimToady it didn't say hello
19:14 FROGGS__ maybe it is rude
19:14 adu m: say "says hello";
19:14 camelia rakudo-moar c5dcdf: OUTPUT«says hello␤»
19:14 masak m: say "{"☃".&uniname.tclc} says hell-oo"; say "💩".&uniname.tclc
19:14 camelia rakudo-moar c5dcdf: OUTPUT«Snowman says hell-oo␤Pile of poo␤»
19:14 El_Che hehe, TimToady is boasting with perl6's utf8 19:54 < TimToady> oh, heh
19:14 El_Che 19:55 < masak> that's the evalbot interfering :)
19:14 El_Che crap
19:14 masak :)
19:15 * masak hands El_Che a "trigger paste finger" badge
19:15 arnsholt masak: Reader macros hook into the lexer, while the others hook into the parser
19:15 El_Che I wanted to add: "perl6's utf8 support, second to none" but copy-paste came along.
19:15 masak arnsholt: that distinction isn't so clear in Perl 6, though.
19:15 arnsholt True, true
19:16 masak arnsholt: still, I think there can be a distinction there somewhere. just not sure it cuts along the same parallels.
19:17 adu masak: in Scheme, macros are defined as a transformation from AST -> AST, whereas a reader macro is defined as CharString -> AST
19:17 masak arnsholt: our "normal" macros that are like subs wait for their arguments to be parsed before they are called. I imagine there'll be plenty of forms of macros that don't do that.
19:17 masak adu: oh, that makes sense.
19:17 arnsholt Yeah, some kind of distinction there would probably make sense
19:17 El_Che TimToady: today I met an old perl4 user all exited by your fosdem talk
19:18 masak El_Che: what, he only digs even versions? :P
19:18 adu masak: well, maybe not CharString, but some kind of character-based peekable I/O
19:18 TimToady by definition, any perl4 user is old :)
19:18 masak El_Che: was he very into Perl 2 as well?
19:19 El_Che masak: I think he followed the old-perl -> old-java -> middle management road :)
19:19 masak my pary are with him
19:19 masak more for the Java than for the middle management, by the way
19:19 adu El_Che: old-java? what is this you speak of
19:19 El_Che hehe
19:19 TimToady that's...not a road...more of a swamp...
19:20 kjs_ joined #perl6
19:20 adu Java has changed very little over the past decade, the only things I can think of is the invokedynamic instruction
19:20 El_Che hehe
19:20 adu s/things/thing/
19:21 El_Che well, working with files is now pretty ok to what it used to be before 7
19:22 El_Che before everytime you opened a file was synonime with 20 cigarettes for your life span
19:22 virtualsue joined #perl6
19:23 adu El_Che: Synonymous?
19:24 masak or "tantamount"
19:24 El_Che :)
19:25 adu Synonymous would make a great hacker group name, and when CNN interviews them about how they distinguish themselves with Anonymous, they can simply say "we don't"
19:25 El_Che hahaha
19:26 masak also, Pseudonymous and Eponymous
19:26 El_Che what did you say about pseudhashes? :)
19:26 TimToady Retronymous
19:26 El_Che throw an o somethere
19:27 adu Antonymous
19:27 * masak .oO( Retronymous: we were legion )
19:27 masak Patronymous
19:27 adu Backronymous
19:28 masak the latter being part of the BLA, but no-one has any expansion for that acronym.
19:28 masak ...yet.
19:28 dj_goku joined #perl6
19:28 FROGGS__ bla? like the color?
19:29 TimToady Backronymous Lags Acronymous
19:29 masak ooh, Acronymous!
19:29 masak they are not in the least bitter, oh no.
19:30 adu TimToady: wow that sounds Latin
19:33 El_Che ab asino lanam
19:34 TimToady something about east and southeast asia, I think
19:35 adu dolorem ipsum
19:35 El_Che (like getting) wool from a donkey
19:35 El_Che although the 'ass' translation is funnier
19:35 * psch .oO( we have always been saying that south east asia must destroy carthage )
19:36 El_Che :)
19:37 El_Che that could be a good end for a talk
19:37 El_Che [Language of choice here] delenda est
19:37 adu it always hurts my humanity when I see "Lorem ipsum"
19:40 Mso150 joined #perl6
19:41 adu the original words were "dolorem ipsum", and "do-" was hyphenated on the previous page, and so what might have been "Wednesday poker nights" is now "Nesday Poker", which is synonymous with nonsense text.
19:42 TimToady not as bad as hyphenating horsemen after the r
19:43 adu TimToady: huh?
19:43 adu r-hosemen?
19:44 huf you know, pen is mightier, japan-us relations, an album cover
19:44 geekosaur hor-semen
19:44 huf that sort of thing.
19:44 adu ooh
19:45 El_Che wasn't hor a pharao?
19:45 adu anal bum cover?
19:46 huf yes, unlike the other bums
19:46 adu huf: I feel like everyone here has already made a list of hyphenation mistakes
19:46 huf sinners, all of us
20:00 spider-mario joined #perl6
20:01 tgt joined #perl6
20:01 TimToady hoelzro: @notes .= sort.uniq; should say 'Useless use of .uniq in sink context' probably
20:02 TimToady @notes.=sort.=unique might do what you want
20:05 TimToady m: my @notes = < a b a b b a c d a d b c >; @notes.=sort.=unique; say @notes
20:05 camelia rakudo-moar c5dcdf: OUTPUT«a b c d␤»
20:05 TimToady er, actually, that's a waste
20:05 TimToady m: my @notes = < a b a b b a c d a d b c >; @notes.=sort.=squish; say @notes
20:05 camelia rakudo-moar c5dcdf: OUTPUT«a b c d␤»
20:05 hoelzro TimToady: why would .uniq be in sink context there?
20:05 hoelzro because it would parse as (@notes .= sort).uniq?
20:06 TimToady probably
20:06 TimToady .= is not a real operator
20:06 hoelzro is it weird that I interpret @notes .= .sort.uniq as @notes = @notes.sort.uniq?
20:06 TimToady insofar as it forces the next word to be taken as a method call
20:07 TimToady it's a natural enough error that we should think about whether it's possible it could dwym
20:08 lizmat hoelzro: not weird to me
20:08 lizmat m: my @a; @a .= sort.=unique
20:08 camelia rakudo-moar c5dcdf: OUTPUT«===SORRY!===␤Method call node requires at least one child␤»
20:08 lizmat that's at least LTA  :-)
20:10 TimToady m: my $x = 42; $x .= sqrt++; say $x
20:10 camelia rakudo-moar c5dcdf: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/CJAh0Sife0�Preceding context expects a term, but found infix + instead�at /tmp/CJAh0Sife0:1�------> [32mmy $x = 42; $x .= sqrt++[33m�[31m; say $x[0m�»
20:11 TimToady m: my $x = 42; ($x .= sqrt)++; say $x
20:11 camelia rakudo-moar c5dcdf: OUTPUT«7.48074069840786␤»
20:12 TimToady trying to make it dwim might only increase confusion
20:12 TimToady .= as an operator is already high in bogonic density
20:15 masak joined #perl6
20:15 esaym153 joined #perl6
20:15 jack_rabbit joined #perl6
20:19 adu maybe there's something I'm still not understanding
20:19 adu so QAST can represent things like constants, variables, and expressions
20:20 adu but how are things like Modules, Classes, Grammars, Methods, Subs, and the like represented?
20:21 jnthn Objects.
20:21 FROGGS__ they are added to the SC, and referenced by a lexical lookup for example
20:21 adu what's SC?
20:21 [Coke] SC is our giant internal company wide intranet, so I am frequently wondering what the hell is going on here until I remember where I am.
20:22 jnthn haha
20:22 jnthn Serialization Context
20:22 [Coke] HA. didn't see adu's question first.
20:22 FROGGS__ serialization context
20:22 masak_grr serialization context
20:22 jnthn Basically "the set of objects that we created during the compile that should be persisted if we compile the program to bytecode"
20:22 jnthn masak_grr: such slow!
20:22 masak_grr jnthn: it means "Serialization Context"
20:22 adu so serialization context == compilation unit?
20:23 masak_grr no, "compilation unit" is a file or eval string.
20:23 jnthn Well, a compilation unit has a serialization context, if you want to be precise.
20:23 jnthn QAST::CompUnit has a :sc(...) that you set when constructing it
20:23 FROGGS__ and a CU/SC can/does refer to other SC's
20:23 FROGGS__ SCs*
20:23 adu when going from String -> AST shouldn't it be called a deserialization context?
20:23 jnthn That's the top-level linkage between declarative and executive stuff.
20:24 denis_boyun joined #perl6
20:24 moritz masak_grr: what's up with your nick?
20:24 jnthn It never becomes an AST, or a string for that matter
20:24 jnthn It's all about objects.
20:24 adu jnthn: then what does it have anything to do with "serialization"?
20:24 masak_grr moritz: proper one got temporarily unavaliablized during an IRC storm.
20:25 FROGGS__ the .moarvm file that gets created is a serialized blob
20:25 FROGGS__ ... of moarvm instructions
20:25 adu oh
20:25 adu do you mean the environment?
20:25 FROGGS__ no
20:26 adu FROGGS__: do you know what I mean by environment?
20:26 FROGGS__ I am talking about what we usually call precompilation
20:26 FROGGS__ adu: perhaps not, now that you ask :o)
20:26 jnthn FROGGS__: That's only half true. It's also containing a bunch of bytes representing serialized objects.
20:26 jnthn Basically, QAST is all about executional stuff.
20:27 jnthn Every declaration you write in your program becomes an object.
20:27 jnthn QAST is always turned into bytecode for the target VM, whether we run immediately or save to disk.
20:28 jnthn The objects created by declarations are, if we precompile, also serialized (to a bunch of bytes).
20:28 jnthn The MoarVM file contains both of these (same for the .jar on the JVM)
20:29 adu FROGGS__: well, there are 2 common uses: a Bash environment is a hashtable available to all processes (usually with getenv or setenv), a Scheme environment is a linked list of hashtables, and are unique to all lexical scopes. (when you are evaluating Scheme code and start evaluating a function body, for example, a new environment would be pushed on the stack, and when you return from a function body, then the environment would be pop'
20:29 jnthn The QAST tree can reference objects created by declaratoins using a QAST::WVal. This actually compiles into an index into a serialization context.
20:29 FROGGS__ adu: like a callframe?
20:30 adu FROGGS__: kind of, only that makes me think of assembly
20:30 FROGGS__ (WVal mean World Value)
20:30 jnthn *nod*
20:31 adu FROGGS__: frames in asm would be the same idea only local variables are represented in a list instead of a hashtable
20:31 jnthn In MoarVM, most lexical accesses are done with a list
20:31 jnthn The hash to list index is kept statically and only used if we ever do a named lookup.
20:31 adu doesn't Parrot do that too?
20:32 jnthn I'm not sure.
20:32 jnthn I know on JVM we also do the same as on Moar.
20:33 lizmat Q: is BUILDALL an implementation detail, or do we expect classes to be able to subclass that ??
20:34 adu jnthn: so are there similarities between this SC and lexical envionments?
20:34 jnthn adu: Not really. An SC is just an array of objects, and an array of code refs.
20:34 jnthn And also an implementation detail.
20:35 jnthn lizmat: Well, technically you *can* subclass it, but you'll really, really, need to know what you're doing. :)
20:35 jnthn It's in the spec.
20:35 lizmat jnthn: so I was thinking of turning BUILDALL into a private method
20:35 jnthn lizmat: How does that help?
20:36 jnthn And, uh, you can't.
20:36 lizmat faster ?
20:36 lizmat ah, subclassing
20:36 jnthn That is SO not where the cost is.
20:36 jnthn Remember that spesh can devirtualize a lot of method calls anyway.
20:36 jnthn And indy on the JVM
20:37 lizmat ok, *plonk* for that one then
20:37 jnthn Also, keeping it virtual is an important part of my idea for speeding object construction up
20:38 adu jnthn: so classes are represented as ClassHOW's, grammars as GrammarHOW's, and they get added to something called the "SC" which has nothing to do with lexical context?
20:38 jnthn adu: Correct. They may *additionally* be installed in lexpads, packages, etc. But anonymous classes cannot be, for example.
20:38 jnthn Well, s/cannot be/are not/ :)
20:38 adu and a lexpad, I think, is exactly what Scheme calls lexical environments
20:39 jnthn lizmat: I've been pondering (was discussing with timotimo++ on #moarvm yesterday) that we should compile the BUILDPLAN into a BUILDALL method specific to the class in question.
20:39 jnthn lizmat: Rather than having a generic BUILDALL that interprets the plan.
20:40 lizmat jnthn: ok, ah, I see
20:40 jnthn lizmat: Which could be a huge improvement.
20:40 lizmat the reason is that I found that making BUILD a private method called in a custom new() is much faster
20:40 lizmat than it being a submethod (at least in the simple case)
20:40 jnthn Yes, though I suspect that's 'cus it circumvents the interpretation in BUILDALL, primarily.
20:41 lizmat now that the dispatcher:<!> is optimized
20:41 lizmat again
20:41 jnthn If you call the submethod in a custom new, I'd expect it'd also be fast?
20:42 lizmat let me test that again (to be 100% sure :-)
20:44 itz has moar been tried much on PPC? I have access
20:44 jnthn OK. I'll be a bit surprised, 'cus submethod dispatches should be hitting the method cache at the very least.
20:44 jnthn itz: I know a bunch of work was done by nwc10++ on PPC support
20:44 jnthn itz: We could do with regular builds to make sure it stays working.
20:45 jnthn itz: I dunno if you're in a position to do that; if you are it'd help.
20:46 itz yeah I have shell access to a friend's linux box and will give it a go
20:46 hoelzro $^var are auto declared positional block params, right? should they work in a block provided to for?
20:46 hoelzro ex. for 1 .. 5 -> { say $^v }
20:46 lizmat jnthn: indeed, no diff between private and submethod BUILD
20:46 lizmat mucho difference calling BUILD directly in new
20:47 jnthn lizmat: There, then that matches my analysis of where the cost is.
20:47 jnthn hoelzro: Not if you write ->
20:48 jnthn hoelzro: that already is specifying a sig.
20:48 jnthn m: for 1 .. 5 -> { say $^v }
20:48 camelia rakudo-moar c5dcdf: OUTPUT«[31m===[0mSORRY![31m===[0m Error while compiling /tmp/kmD8Jn74GZ�Placeholder variable '$^v' cannot override existing signature�at /tmp/kmD8Jn74GZ:1�------> [32mfor 1 .. 5 -> { say $^v }[33m�[31m<EOL>[0m�»
20:48 jnthn Yay. Correct error :)
20:48 hoelzro ahhhhh
20:48 jnthn m: for 1 .. 5 { say $^v }
20:48 camelia rakudo-moar c5dcdf: OUTPUT«1␤2␤3␤4␤5␤»
20:48 hoelzro thank you for pointing that out jnthn
20:48 jnthn np :)
20:48 hoelzro I didn't look at my own code closely enough =)
20:50 FROGGS__ 'pointing that out' - that covers it :o)
20:50 skids now there's a pointed comment.
20:51 hoelzro buh dum tsch
20:51 jnthn At least it unblocked him :P
20:52 * skids groans
20:52 * masak_grr .oO( someone got the point? )
20:54 mst jnthn: I guess that's a reasonable position to take
20:55 FROGGS__ gather around, gather around, that wasnt the last
20:55 adu jnthn: so it sounds like the SC has a lot in common with DSOs
20:59 denis_boyun___ joined #perl6
21:03 dalek rakudo/nom: 667cfa4 | lizmat++ | src/core/ (2 files):
21:03 dalek rakudo/nom: Don't need extra variable in .new
21:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/667cfa45b4
21:03 dalek rakudo/nom: 318be42 | lizmat++ | src/core/MapIter.pm:
21:03 dalek rakudo/nom: Don't need lexical nor optional parameters
21:03 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/318be42100
21:11 Mso150_f joined #perl6
21:12 masak_grr what, the point puns just dies out? we didn't even reach peak point!
21:13 lizmat I guess someone just punted it away
21:14 skids We didn't want to belabor the point that hoelzro missed the big arrow pointing right at the problem.
21:15 raydiak There is no point.
21:17 * TimToady started to feel listless
21:18 geekosaur next up, the great listless refactor...
21:19 TimToady the native arrays are listless tonight...
21:19 kaare__ joined #perl6
21:20 skids .oO(if this flash drive doesn't hurry up I may be stuck here for the whole friday punorama.  yikes.)
21:21 TimToady that would be NFG
21:21 FROGGS__ raydiak: that's one poїnt to many!
21:22 FROGGS__ gnight &
21:23 TimToady ô/
21:24 kjs_ joined #perl6
21:28 lizmat a nick may lose its _grrr, but not its ....
21:29 masak you can take the grrr out of the masak, but you can't take the masak out of the grrr!
21:30 lizmat :-
21:30 lizmat )
21:30 masak that's the laziest smiley I've ever seen.
21:30 masak delivered on demand!
21:30 TimToady kind of the opposite of a Cheshire smiley
21:31 skids It's a litsless smiley.
21:31 * masak decides to start off a discussion
21:31 masak SQL table names: singular, or plural?
21:32 TimToady they should be named things like master, and slave, and auxiliary
21:32 skids definitely not both.
21:33 bcode the solution is to find some language that doesn't have separate plural forms and name your tables in that language, of course
21:33 bcode everyone will be happy!
21:33 jnthn masak: About https://rt.perl.org/Ticket/Display.html?id=123078 - do we really want errors to reveal private stuff inside the object?
21:34 masak jnthn: oh! it was evident to me, so I left it unsaid: the private method has to have *been able to be called*.
21:34 masak jnthn: either because we're in the object itself, of because we trust that class.
21:34 masak no wait, the other way around: because that other class trusts us.
21:35 skids Use proper nouns.  They looked funny when pluralized so nobody will do it.
21:35 TimToady is one of the class members named Bobby Tables?
21:35 jnthn masak: Uh, so that means producing the errors also needs to introspect the backtrace of the point the method was called to decide whether or not to mention it?
21:36 * jnthn wonders if this error is worth the cost of writing/maintaining the code to produce it :)
21:36 jnthn Well, s/error/hint/
21:37 denis_boyun_ joined #perl6
21:38 [Coke] I prefer singular names for tables that are nouns.
21:38 masak if errors were judged against the cost of writing/maintaining the code to produce it, we'd have lots worse errors than we do, and we wouldn't keep repeating the maxim "torment the devs".
21:39 masak s/'it,'/them,/
21:39 jnthn There's gotta be a line somewhere, and for me this is on the "not worth it" side of the line, is all.
21:40 jnthn If anyone writes a patch to do it, I won't object, I guess.
21:40 masak [Coke]: the style guide I just found says they should be plural, because a table consists of several whatevers.
21:41 skids name all your tables with different spellings of Bruce and be done with it.
21:43 noganex joined #perl6
21:44 dalek rakudo/nom: 90f3778 | lizmat++ | src/core/Match.pm:
21:44 dalek rakudo/nom: Give Match its own new/BUILD
21:44 dalek rakudo/nom:
21:44 dalek rakudo/nom: This improves the Text::CSV benchmark with 2%, and should have a noticeable
21:44 dalek rakudo/nom: effect on other Match heavy applications.
21:44 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/90f3778d85
21:44 [Tux] :)
21:45 [Coke] lizmat: ^^ Should that have a comment or something indicating it was added soley for performance reasons?
21:45 [Coke] does it change the functionality at all?
21:45 lizmat no functionality change
21:46 dalek rakudo/nom: 0061eda | lizmat++ | src/core/Match.pm:
21:46 dalek rakudo/nom: Mention new/BUILD are there only for performance
21:46 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0061eda726
21:47 TimToady that looks completely bogus to me
21:48 TimToady BUILD is supposed to have named parameters, so you've prevented anyone from ever deriving from Match
21:49 lizmat TimToady: but it;s a submethod BUILD ?
21:49 * lizmat changes
21:52 El_Che lizmat: not too much I hope :)
21:52 lizmat no, been there, done that  :-)
21:55 denis_boyun joined #perl6
21:55 raydiak lizmat: why do you name it BUILD if you are entirely circumventing all the bless/BUILDALL stuff which is responsible for calling BUILD?  could just name it something else and un-break it for inheriting classes, if I'm not mistaken
21:56 lizmat I've considered that, but found other cases in the core that took the same approach
21:57 lizmat so I considered it to be confusing to change that meme
21:57 dalek rakudo/nom: cd0614e | lizmat++ | src/core/Match.pm:
21:57 dalek rakudo/nom: Make Match subclassable again, TimToady++
21:57 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cd0614e4a3
21:58 noganex joined #perl6
22:00 nwc10 1 file changed, 4 insertions(+), 7 deletions(-)
22:00 lizmat ?
22:00 nwc10 less code, same functionality
22:00 nwc10 that's good ,right?
22:01 lizmat yes, but all of those lines were added just 2 commits before that  :-)
22:01 nwc10 I'm OK with that downside
22:01 nwc10 I more meant, that the new way of doing the optimisation is also pleasingly shorter
22:02 nwc10 (as well as fixing the problem TimToady noted)
22:03 nwc10 I'm not good enough at Perl 6 stuff to know what the other implications are
22:03 denis_boyun_ joined #perl6
22:07 lizmat there shouldn't be other implications, and the spectest thinks so as well
22:10 nwc10 win!
22:10 * jnthn spectests today's little fix. :)
22:11 lizmat .oO( that sounds promising! )
22:17 [Coke] Promise-ing?
22:18 lizmat .oO( only if jnthn keeps it )
22:22 avuserow_ I agree with arnsholt and moritz's comments about going from Buf[uint16]  to Buf[uint8] and it being needed for NativeCall. In particular, my attempt at making Compress::Snappy handle non-utf8 data was frustrated by this.
22:22 raiph joined #perl6
22:22 jnthn I'm not masochistic enough to debug conc bugs on vacation :P
22:23 dalek rakudo/nom: 47f3252 | jnthn++ | src/ (3 files):
22:23 dalek rakudo/nom: Exporting an enum should export the values.
22:23 dalek rakudo/nom:
22:23 dalek rakudo/nom: Fixes RT#123114.
22:23 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/47f3252d3d
22:23 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=123114
22:23 masak (yay)
22:23 masak jnthn++
22:23 lizmat jnthn++ indeed!
22:23 donaldh joined #perl6
22:24 psch jnthn++ # looks less horrid than my attempt at that bug
22:24 masak can we now submit a follow-up ticket about poisoned enum values not working properly? :P
22:24 * masak <-- evil
22:25 jnthn masak: If you like, especially as you'll need to come up with a concise example, which basically means a test case :)
22:25 masak aye.
22:25 jnthn Also the code that needs fixing for that is in a totally different place, so it didn't make sense to tackle the two together.
22:25 jnthn (It's an importer thing, this was all export side)
22:26 jnthn Anyway, tagged the ticket testneeded.
22:26 jnthn If somebody fancies turning the example into a test, please do. Then we can close it. :)
22:27 masak more and more, I see the actions centering around RT as a small ecology. there are producers, consumers, and decomposers. just like in nature.
22:27 * masak .oO( it's the ci-i-i-rcle of life... )
22:27 IllvilJa joined #perl6
22:30 jnthn Sleep time here. 'night
22:31 masak 'night, jnthn++
22:33 lizmat night jnthn
22:35 IllvilJa joined #perl6
22:37 masak m: module M1 { enum A is export <B C> }; module M2 { enum X is export <Y Z> }; import M1; import M2; say B
22:37 camelia rakudo-moar c5dcdf: OUTPUT«===SORRY!===␤cannot stringify this␤Error while constructing error object:Could not locate compile-time value for symbol Undeclared::Symbols␤»
22:37 masak I'm sorry?
22:37 masak :(
22:37 masak temporary glitch? or... international conspiracy?
22:38 masak m: say "do you even lift?"
22:38 camelia rakudo-moar c5dcdf: OUTPUT«do you even lift?␤»
22:38 masak m: module M1 { enum A is export <B C> }; module M2 { enum X is export <Y Z> }; import M1; import M2; say B
22:38 camelia rakudo-moar c5dcdf: OUTPUT«===SORRY!===␤cannot stringify this␤Error while constructing error object:Could not locate compile-time value for symbol Undeclared::Symbols␤»
22:38 masak hrm.
22:38 masak works locally, fwiw.
22:40 dalek rakudo/nom: d1a5151 | lizmat++ | src/core/ (5 files):
22:40 dalek rakudo/nom: Make Set/Bag/Mix creation faster
22:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/d1a5151127
22:40 dalek rakudo/nom: 0459ebd | lizmat++ | src/core/Capture.pm:
22:40 dalek rakudo/nom: Make Capture creation faster
22:40 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/0459ebd267
22:42 donaldh Finally tracked down the cause of NQPMatch objects getting serialized in the setting.
22:42 lizmat donaldh: and?
22:43 donaldh QAST::Node.shallow_clone is copying the Node annotations by reference and the before_promotion annotation references QAST::Node that contains an NQPMatch.
22:44 donaldh Question is, should the clone's annotations be cleared?
22:45 donaldh Or should the annotations be kept, but cleaned up - problematic because there are cyclic references to deal with it seems.
22:46 lizmat I have no idea, jnthn FROGGS__ moritz  might ?
22:46 donaldh I'm guessing that it's okay to clear the annotations. But I'd like some guidance on whether it's okay to have QAST::Node.shallow_clone always clear the annotations.
22:47 donaldh Yeah, I probably need to ask jnthn and I see he's off to bed.
22:51 masak m: module M1 { enum A is export <B C> }; module M2 { enum X is export <Y Z> }; import M1; import M2; say B
22:51 camelia rakudo-moar c5dcdf: OUTPUT«===SORRY!===␤cannot stringify this␤Error while constructing error object:Could not locate compile-time value for symbol Undeclared::Symbols␤»
22:51 masak :/
22:51 lizmat $ 6 'module M1 { enum A is export <B C> }; module M2 { enum X is export <Y Z> }; import M1; import M2; say B'
22:51 lizmat B
22:52 masak right, same here.
22:52 lizmat so camelia is just behind, right ?
22:53 masak oh, two days behind.
22:53 masak something is failing to update camelia.
22:53 masak lizmat++
22:53 Mouq_ joined #perl6
22:54 lizmat maybe moritz can do something about that
22:54 * lizmat is going to bed now
22:54 lizmat so good night, #perl6!
22:54 masak 'night, liz
22:54 donaldh 'night o/
22:54 raydiak good night lizmat
22:55 dalek nqp: 636872f | peschwa++ | src/HLL/Compiler.nqp:
22:55 dalek nqp: Fix RT #77894 the most obvious way.
22:55 dalek nqp: review: https://github.com/perl6/nqp/commit/636872ff37
22:55 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=77894
22:55 psch g'night lizmat
22:55 dalek roast: b1490b5 | peschwa++ | S19-command-line/arguments.t:
22:55 dalek roast: Add test for RT #77894.
22:55 dalek roast: review: https://github.com/perl6/roast/commit/b1490b59b5
22:55 synopsebot Link: https://rt.perl.org/rt3//Publ​ic/Bug/Display.html?id=77894
23:01 raiph .ask psch Do you have ideas about why jnthn's util::zip::CRC32 example fails? His original code yields "No such method 'method/update/(B)V' for invocant of type 'java.util.zip.CRC32'"; replacing that expression with the shortname'd `$crc.update($_)` instead yields "Couldn't parse arguments in Java call. (Did you pass a type object?)"
23:01 yoleaux raiph: I'll pass your message to psch.
23:02 psch raiph: yes, the descriptor is wrong.  afair i corrected it for my advent post but neglected to mention in needed correcting
23:02 yoleaux 23:01Z <raiph> psch: Do you have ideas about why jnthn's util::zip::CRC32 example fails? His original code yields "No such method 'method/update/(B)V' for invocant of type 'java.util.zip.CRC32'"; replacing that expression with the shortname'd `$crc.update($_)` instead yields "Couldn't parse arguments in Java call. (Did you pass a type object?)"
23:02 psch raiph: or i might be misremembering this again...
23:02 timotimo did anybody measure the speed improvements lizmats constructor work have given?
23:03 psch timotimo: she said 2% i think?
23:03 abraxxa joined #perl6
23:03 timotimo only for one benchmark and one of the improvements
23:04 timotimo tell japhb i've started a run of perl6-bench ("quickstart") on the weekend, now i'm finally watching the output and it gives me lots and lots of lines with Run command did not produce expected output: install/bin/nqp-m -e my @a; nqp::push(@a,42); my $i := 0; while ($i := $i + 1) <= 378453 { nqp::push(@a, @a) }; say(+@a);
23:04 Mso150_f joined #perl6
23:04 timotimo and the number in the <= * always increases by one
23:04 psch raiph: this is about http://stackoverflow.com/questions/27156329/ right?  the answer by the asker resolves this.  i fixed the unbox error
23:05 psch raiph: unless the example with "method/update/(I)V" still doesn't work, in that case i'd have to dig
23:05 timotimo tell japhb i'd be interested in some kind of way to control what perl6-bench does; like a signal handler for USR1 to cancel the current implementation perhaps?
23:05 psch timotimo: s/^/./
23:06 berekuk joined #perl6
23:06 timotimo oh
23:07 timotimo .tell japhb i've put a few tell messages here that didn't go through. lookie here: http://irclog.perlgeek.de/​perl6/2015-01-09#i_9913027
23:07 yoleaux timotimo: I'll pass your message to japhb.
23:07 psch raiph: uh, apologies, i should've finished reading your tell... :)
23:11 timotimo .tell japhb also, since the output of perl6-bench can be pretty darn verbose, maybe writing a log file automatically would be nice; otherwise i'd just get used to using tee
23:11 yoleaux timotimo: I'll pass your message to japhb.
23:12 psch m: my Buf $x = "f".encode('utf-8'); say "y" if nqp::isint($x[0])
23:12 camelia rakudo-moar c5dcdf: OUTPUT«Type check failed in assignment to '$x'; expected 'Buf' but got 'utf8'␤  in block <unit> at /tmp/Y3QGfY3GWO:1␤␤»
23:12 psch m: my $x = "f".encode('utf-8'); say "y" if nqp::isint($x[0])
23:12 camelia rakudo-moar c5dcdf: ( no output )
23:12 psch raiph: ^^^ that's half of the problem.  the other half is that the generic unboxing doesn't work for Blob (i think that's what utf8 is?)
23:20 * psch will look closer at that example tomorrow
23:20 psch i think it's about container types to java, but i'm not sure
23:20 psch although i did test that, but only with Int @foo
23:21 psch well, writing more tests etc.
23:21 psch g'night o/
23:23 raiph psch: sorry, was afk, thanks and goodnight
23:35 adu joined #perl6
23:37 Rounin joined #perl6
23:38 cognominal joined #perl6
23:46 Mouq joined #perl6
23:48 skids joined #perl6
23:54 BenGoldberg joined #perl6

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

Perl 6 | Reference Documentation | Rakudo