Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2013-01-04

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:07 leont joined #perl6
00:13 FROGGS gnight
00:15 stevan_ joined #perl6
00:20 leont left #perl6
00:20 rurban bbkr: Looks like parrot wants to follow the established POSIX and perl5 behaviour. The specs need to changed.
00:21 rurban socket.read returns max len bytes
00:21 rurban but not guaranteed len bytes
00:21 rurban http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html
00:23 rurban The size argument is for languages which do not malloc buffers by themselves. The receiving buffer must be preallocated and the recv() function writes into it.
00:25 rurban But I'm not sure what the high-level parrot socket.read() method should do, since we provide the low-level recv() method also.
00:41 bbkr rurban: thanks for explanation. I've created Rakudo bug - https://rt.perl.org/rt3/Public/Bug/Display.html?id=116288 because now Perl 6 spec is different than Rakudo behavior - ergo a bug (even if it may be rejected if perl 6 spec will change to follow POSIX way in the future)
00:42 bbkr I will copy/paste your above explanation there if you don't mind
00:45 [particle] joined #perl6
00:45 doy perl 6 doesn't really have to follow posix
00:46 wk joined #perl6
00:47 doy the spec behavior does seem more useful, given the wider variety of language features available to deal with the issues that the posix api is designed to work around
00:49 bbkr doy: i agree
00:49 FROGGS joined #perl6
00:51 [particle]1 joined #perl6
00:52 bbkr FROGGS: https://rt.perl.org/rt3/Ticket/Display.html?id=116288 ticket about IO::Socket.read that we discussed earlier
01:08 anuby joined #perl6
01:10 hypolin joined #perl6
01:16 thou joined #perl6
01:51 timotimo so, *tomorrow*, i'll so totally do that screencast. for Reals. or maybe for Nums or maybe even just for Integers.
01:52 diakopter joined #perl6
01:52 Exodist joined #perl6
02:26 colomon joined #perl6
02:30 FROGGS_ joined #perl6
02:38 japhb_ joined #perl6
02:39 japhb_ timotimo, Pick one: http://doc.perl6.org/images/type-graph-Real.svg   ;-)
02:42 marloshouse_ joined #perl6
02:44 fgomez joined #perl6
02:46 thou joined #perl6
02:49 cognominal joined #perl6
02:52 fgomez joined #perl6
02:54 xinming joined #perl6
02:55 tomaw joined #perl6
02:58 fgomez joined #perl6
03:07 [particle] joined #perl6
03:19 wtw joined #perl6
03:20 cognominal joined #perl6
03:45 dayangkun joined #perl6
03:54 Chillance joined #perl6
03:56 orafu joined #perl6
04:39 cognominal_ joined #perl6
04:50 fgomez joined #perl6
05:04 FROGGS_ joined #perl6
05:15 skids_ joined #perl6
05:17 hash_table joined #perl6
05:20 telex joined #perl6
05:38 xilo_ joined #perl6
05:49 telex joined #perl6
05:51 thou joined #perl6
06:06 alec joined #perl6
06:19 FROGGS_ joined #perl6
06:29 wtw joined #perl6
06:32 LoRe joined #perl6
06:36 SamuraiJack joined #perl6
06:39 ismail joined #perl6
06:46 Pleiades` joined #perl6
07:11 kaleem joined #perl6
07:16 Chillance joined #perl6
07:54 MayDaniel joined #perl6
07:54 felher Good morning, #perl6 :)
07:54 felher masak: I took a look at your solution. Very nice :)
08:07 moritz \o
08:08 felher o/
08:12 xenoterracide joined #perl6
08:14 FROGGS morning
08:15 moritz rakudo: say :10(':16<bad.decaf>')
08:15 p6eval rakudo cdb0fa: OUTPUT«Type check failed for return value; expected 'Numeric' but got 'Failure'␤  in sub unbase at src/gen/CORE.setting:4850␤  in block  at /tmp/GgNNi1iR0o:1␤␤»
08:16 moritz rakudo: say ( { 1 + 1 }, { 2 + 2 } )>>()
08:16 p6eval rakudo cdb0fa: OUTPUT«===SORRY!===␤Error while compiling block : Error while compiling op call: Error while compiling block : Error while compiling op call: Error while compiling op call: Unknown QAST node type NQPMu␤»
08:17 dalek rakudo/froggs_mergemulti: 758537f | (Tobias Leich)++ | t/spectest.data:
08:17 dalek rakudo/froggs_mergemulti: added test file import-multi.t
08:17 dalek rakudo/froggs_mergemulti:
08:17 dalek rakudo/froggs_mergemulti: These tests cover the import and merging of multi subs and traits.
08:17 dalek rakudo/froggs_mergemulti: review: https://github.com/rakudo/rakudo/commit/758537f062
08:18 JJ_Brain joined #perl6
08:20 moritz std: my @a = 1, 2; say $a[0]
08:20 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0m�Variable $a is not predeclared (did you mean @a?) at /tmp/c_jGu1H0In line 1:�------> [32mmy @a = 1, 2; say [33m�[31m$a[0][0m�Check failed�FAILED 00:00 45m�»
08:21 moritz r: my $j='A'|'B'; my $pair = $j=>'k'; $pair.kv.say
08:21 p6eval rakudo cdb0fa: OUTPUT«any(A, k, B, k)␤»
08:21 moritz r: my $j='A'|'B'; my $pair = $j=>'k'; $pair.perl
08:21 p6eval rakudo cdb0fa:  ( no output )
08:21 moritz r: my $j='A'|'B'; my $pair = $j=>'k'; say $pair.perl
08:21 p6eval rakudo cdb0fa: OUTPUT«any("A" => "k", "B" => "k")␤»
08:22 moritz r: my $junc = 'A' | 'B' | 'C'; my %foo = $junc => 'a value'; say %foo.perl
08:22 p6eval rakudo cdb0fa: OUTPUT«("C" => "a value").hash␤»
08:22 FROGGS moritz: you're checking RT tickets?
08:22 moritz FROGGS: yes
08:27 dalek roast: 06074b4 | moritz++ | S04-statements/for.t:
08:27 dalek roast: RT #78406, block parameter ro/rw issues
08:27 dalek roast: review: https://github.com/perl6/roast/commit/06074b4b93
08:36 dbr joined #perl6
08:39 brrt joined #perl6
08:48 Woodi morning # :)
08:50 Woodi is there in Perl6 something like Delphi 'with' ? eg.: with: is native( 'libfoo' ) is export { sub foo1(); sub foo2() }
08:51 Grrrr joined #perl6
08:52 sorear Woodi: use sub 'options' is specced to behave in that sort of way, but it's very slushy
08:53 Woodi checking...
09:00 Woodi cannot find anything in C tags... this feature adds something to block ({}) which should be textually applied to things inside. in Delphi it worked for objects, something like { .foo } or { foo } work on $_.
09:01 Woodi something like:  ax + bx == x(a+b) but for blocks :)
09:03 Woodi hmm, macro ?
09:04 bapa joined #perl6
09:05 robins joined #perl6
09:06 shachaf joined #perl6
09:06 perigrin joined #perl6
09:06 BooK joined #perl6
09:06 steven_ joined #perl6
09:06 moritz joined #perl6
09:06 doy joined #perl6
09:06 quietfanatic joined #perl6
09:06 Maddingue joined #perl6
09:17 JJ_Brain joined #perl6
09:25 rindolf joined #perl6
09:27 FROGGS joined #perl6
09:30 wk joined #perl6
09:42 Psyche^ joined #perl6
09:49 dalek roast: 6d4ae89 | moritz++ | S32-exceptions/misc.t:
09:49 dalek roast: RT #79162: two terms in a row error message
09:49 dalek roast: review: https://github.com/perl6/roast/commit/6d4ae89600
09:51 Pleiades` joined #perl6
09:57 bitonic joined #perl6
10:01 SmokeMachine joined #perl6
10:13 moritz std: say "Hello"\#`[Fnord],"World!"
10:13 p6eval std a8bc48f: OUTPUT«ok 00:00 43m␤»
10:14 moritz r: / a :: b /
10:14 p6eval rakudo cdb0fa: OUTPUT«[31m===[0mSORRY![31m===[0m�:: not yet implemented�at /tmp/mkn8z2MUXF:1�------> [32m/ a ::[33m�[31m b /[0m�»
10:37 Pleiades` joined #perl6
11:15 JJ_Brain joined #perl6
11:16 SmokeMac_ joined #perl6
11:24 dayangkun joined #perl6
11:25 moritz rakudo: my $a = 42; say "$a [<file>]"
11:25 p6eval rakudo cdb0fa: OUTPUT«42 [<file>]␤»
11:27 SmokeMachine joined #perl6
11:28 dalek roast: b741f8d | moritz++ | S02-literals/quoting.t:
11:28 dalek roast: RT #85506, interpolation followed by whispace and brackets
11:28 dalek roast: review: https://github.com/perl6/roast/commit/b741f8df08
11:31 kresike joined #perl6
11:32 kresike hello all you happy perl6 people
11:32 moritz \o kresike
11:32 moritz r: say "OH HAI @a<"
11:32 p6eval rakudo cdb0fa: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse quote-words subscript; couldn't find right angle quoteâ�¤at /tmp/DYuG2g5j2V:1â�¤------> [32msay "OH HAI @a<"[33mâ��[31m<EOL>[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
11:32 kresike moritz, o/
11:32 moritz std: say "OH HAI @a<"
11:32 p6eval std a8bc48f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Unable to parse quote-words subscript; couldn't find right angle quote at /tmp/w2LM11xhlt line 1:â�¤------> [32msay "OH HAI @a<[33mâ��[31m"[0mâ�¤    expecting escapeâ�¤Parse failedâ�¤FAILED 00:00 42mâ�¤Â»
11:35 spider-mario joined #perl6
11:35 dalek roast: 472b0b8 | moritz++ | S02-literals/quoting.t:
11:35 dalek roast: RT #90124, unclosed quote after array variable is an error
11:35 dalek roast: review: https://github.com/perl6/roast/commit/472b0b8029
11:36 moritz rakudo: my $i; sub foo { say $i if ++$i %% 50; eval "foo" }; foo
11:36 p6eval rakudo cdb0fa: OUTPUT«(timeout)50␤100␤150␤200␤250␤300␤»
11:39 dalek roast: 7d22621 | moritz++ | integration/weird-errors.t:
11:39 dalek roast: RT #90522: recurse into eval
11:39 dalek roast: review: https://github.com/perl6/roast/commit/7d226216c0
11:45 dalek rakudo/nom: 70262f8 | moritz++ | src/utils/perl6doc (3 files):
11:45 dalek rakudo/nom: delete old perl6doc files
11:45 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/70262f899c
11:46 moritz r: my $x; sub foo () { $x }; foo = 5
11:46 p6eval rakudo cdb0fa: OUTPUT«[31m===[0mSORRY![31m===[0m�Preceding context expects a term, but found infix = instead�at /tmp/GhK2ZJJVmA:1�------> [32mmy $x; sub foo () { $x }; foo =[33m�[31m 5[0m�»
11:46 GlitchMr joined #perl6
11:49 masak good time unit, #perl5
11:50 masak er, #perl6 :)
11:50 * masak .oO( the keys are, like, right next to each other )
11:50 colomon o\
11:50 masak moritz: I never did ask you how you derived that analytical formula yesterday. how did you do it? :)
11:51 moritz masak: let P(x) be the probability that the loop length is x
11:51 masak ah, I thought so :)
11:51 moritz then the expectation value is sum x * P(x)
11:51 masak yes, I was doing some errands today and thinking about it.
11:51 moritz so, P(1) = 1 / N
11:51 masak aye.
11:52 moritz P(2) = (N - 1) / N * 1 / N
11:52 masak moritz++
11:52 moritz and so on
11:52 masak et cetera ad -Ofunum.
11:52 moritz the generalization is  P(x) = N! / (N - x)! * x/N^x # plus or minus a factor N
11:53 masak now all that remains is finding a closed form :)
11:53 * masak wishes he were better at generatingfunctionology
11:53 SmokeMachine joined #perl6
11:54 moritz fwiw, wolframalpha didn't find a closed form
11:55 masak Knuth essentially says there is one. (but I think he remembers it wrong)
11:55 moritz he could very well be right
11:55 moritz it totally smells like it could have one
11:55 masak aye.
11:56 moritz though my statistical physics knowledge isn't of much help here
11:56 moritz because I can't just substitute the sum by an integral :-)
11:57 masak :)
11:59 moritz off topic remark: statistical physics is a rather beautiful field, in a sense of theoretical purity, because you need only one assumption for the whole field, and that's a very sensible one
11:59 cognominal joined #perl6
11:59 moritz the math is a bit ugly, occasionally, but that's OK :-)
12:01 masak what's the assumption?
12:01 moritz http://en.wikipedia.org/wiki/Ergodic_hypothesis # this one
12:01 masak the most beautiful math I've studied, by far, is complex analysis.
12:02 moritz simplified a bit, it means that non-degenerate states of the same energy mean same propability of finding a particle/system there
12:02 dalek roast: 0d9fc5d | moritz++ | S32-exceptions/misc.t:
12:02 dalek roast: RT #92408: detect obsolete use of . as concatenation operator
12:02 dalek roast: review: https://github.com/perl6/roast/commit/0d9fc5ddc5
12:03 moritz masak: you should have received a few emails from RT :-)
12:04 masak I did. each one is like a new flavor of happy. :>
12:04 moritz :-)
12:05 masak (the #perl6 community is like a big multi-national machine geared towards one thing: fixing my bug reports) :P
12:06 moritz we even do analytical calculations to solve your mini-challenges :-)
12:06 masak :D
12:07 moritz r: enum A <b c d>; say b.succ.WHAT
12:07 p6eval rakudo cdb0fa: OUTPUT«Int()␤»
12:07 masak one more observation on chromatic/reddit from the last few days: it seems to me that there should be a name for the bias that happens when someone looks at a project, thinking "how hard could it be?"
12:07 moritz overconfidence
12:08 moritz no, that's not quite it
12:08 masak if there's one thing that my ~1440 bug report have taught me, it's that implementing anything of this size is *hard*.
12:08 masak like really, really, hard.
12:09 masak it's not that the Rakudo core developers are incompetent. in fact, they some of the best developers I know.
12:09 masak they're
12:09 masak *
12:09 masak and Niecza and Pugs exhibit bugs too.
12:09 moritz there are two types of projects: those with lots of (discovered) bugs, and those that nobody uses
12:10 masak something like that :)
12:10 masak errand, bbl &
12:11 moritz r: class A { has $!b = 10; method foo() { say self!b }; }; my $b = A.new; $b.foo
12:11 p6eval rakudo 70262f: OUTPUT«No such private method '!b' for invocant of type 'A'␤  in method foo at /tmp/Rhhnue_16p:1␤  in block  at /tmp/Rhhnue_16p:1␤␤»
12:13 moritz rakudo: class A { multi trait_mod:<is>( $r, :$rwr!) { $r.set_rw(); }; sub b is rwr { }; };
12:13 p6eval rakudo 70262f:  ( no output )
12:17 moritz I've been pondering (and partially practising) this for a while now, but I'd also like to talk about it now: include a bit of background information in error messages
12:18 moritz for example, don't just write "cannot open file $filename for writing: $!"
12:18 moritz but give some hint *why* you are trying to write to $filename in the first place
12:19 moritz is it some state file? lock file? saved history? internal database?
12:19 cognominal joined #perl6
12:19 moritz often that can make it much easier for the user to find out what's going on
12:20 moritz </pondering>
12:24 JJ_Brain joined #perl6
12:25 arnsholt Speaking of chromatic's latest, I'm not sure what he means with "impedance mismatch of an alien memory model". Anyone know what he's referring to?
12:27 * moritz shakes his head
12:27 cognominal_ joined #perl6
12:31 jaldhar_ joined #perl6
12:33 cognominal_ Adding a rule to the Perl 6 grammar to detect bad decimal number gets the setting parsing to fail :  https://gist.github.com/4452294
12:33 SmokeMachine joined #perl6
12:33 cognominal_ can someone shed light on that?
12:34 cognominal_ someone already spammed my gist. :( Deleted the spam.
12:40 FROGGS cognominal_: is there a method .malformed in nqp?
12:41 cognominal_ FROGGS:   src/Perl6/Grammar.pm:232:    method malformed($what) {
12:42 cognominal_ but the problem is not calling malformed. It is that the modified dec_number rule is incapable to parse the line :     nqp::sleep(1e16) while True;
12:42 FROGGS ahh, sorry, thought you are talking about nqp
12:43 FROGGS maybe the precedence of | and || ?
12:43 cognominal_ I think I tried that to.
12:45 SmokeMac_ joined #perl6
12:45 cognominal_ …meaning using | instead of ||
12:46 FROGGS I would try adding [ ] around the first three parts
12:47 jaldhar_ joined #perl6
12:48 FROGGS hmmm, no
12:55 cognominal_ joined #perl6
12:56 cognominal_ adding the [] makes it to fail to recognized a range. It fails in the setting at              range => (0..0)
12:56 felipe joined #perl6
12:58 cognominal_ that proves that my approach is naive anyway.
12:59 timotimo a
12:59 timotimo (er, why are backspace and return so close to each other?)
13:00 timotimo my gut feeling tells me "you need to match a white space there, too", but that may be wrong, too.
13:02 cognominal__ joined #perl6
13:03 cognominal__ My approach breaks the LTM philosophy.  I would like to be able to say : "if the parse fails later, that was because of a wrong decimal number:.
13:04 pmurias joined #perl6
13:05 SmokeMachine joined #perl6
13:05 dalek rakudo-js: e213611 | (Paweł Murias)++ | run_tests:
13:05 dalek rakudo-js: [nqp] add passing test 59 to run_tests
13:05 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/e21361163f
13:05 dalek rakudo-js: ff593aa | (Paweł Murias)++ | run (2 files):
13:05 dalek rakudo-js: [nqp] support :p in NQPCursor.parse, <alpha> (not yet for unicode), pass test 50
13:05 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/ff593aa6dd
13:05 dalek rakudo-js: a033d1b | (Paweł Murias)++ | t/99-test-basic.t:
13:05 dalek rakudo-js: remove leftover
13:05 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/a033d1bb87
13:05 dalek rakudo-js: 0ee5667 | (Paweł Murias)++ | / (4 files):
13:05 dalek rakudo-js: start of switching to using 6model serialization, nqp::say("Hello World") works
13:05 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/0ee5667bd5
13:05 dalek rakudo-js: 6b668cd | (Paweł Murias)++ | / (4 files):
13:05 dalek rakudo-js: [nqp] parse parts the serialized objects format, emit code to load the setting
13:05 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/6b668cd316
13:05 dalek rakudo-js: 4067912 | (Paweł Murias)++ | / (7 files):
13:05 dalek rakudo-js: Loading of a minimial nqp setting works. We pass 2 tests.
13:05 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/40679127e3
13:06 masak moritz: I've seen the tip "give a hint of why" before. I believe it's a sound one. I try to aim for "wanted to do <task X> but <error condition Y>" in most of my error messages.
13:13 SmokeMac_ joined #perl6
13:17 stevan_ joined #perl6
13:36 SmokeMachine joined #perl6
13:39 wk joined #perl6
13:40 cognominal__ what I need is some kind of "forward backtracking" so that when the parser backtrack into dec_number it  matches <decint> '.'   <.malformed: 'decimal number'>
13:41 cognominal__ so that   1..2 will succeed and 1. + 2 fails
13:42 timotimo have you tried if matching a whitespace or some kind of terminator or negative lookahead would help?
13:42 timotimo also, are you making sure to check that there's no postfix:<.> operator?
13:43 SmokeMac_ joined #perl6
13:43 cognominal__ I say forward backtracking because  for  "1. + 2", dec_number first succeeds but the calling rule fails so  "1." is matched next and fail because of the .malformed
13:43 cognominal__ timotimo: I am not sure to understand what you propose
13:44 timotimo i'm not sure if i understand what i propose, either :|
13:44 cognominal__ :)
13:45 SmokeMa__ joined #perl6
13:45 kresike timotimo++ #trying ☺
13:46 cognominal__ timotimo: I need a scheme so that   1..2 will succeed and 1. + 2 fails   and I want the fail to happen in the rule dec_number
13:46 timotimo kresike: do or do not, there is no try :P
13:47 cognominal__ I learn a lot by analysing my repeated fails. I wish I could be right the first time.
13:47 kresike yes, Master ☺
13:48 SmokeMachine joined #perl6
13:53 SmokeMac_ joined #perl6
13:57 masak I would be content with learning after the first failure ;)
13:58 cognominal__ so would I
14:06 masak moritz: hakank did a curve fitting of the sum, and got -0.236701 + 1.22197 n^0.504039
14:06 SmokeMachine joined #perl6
14:08 PacoAir joined #perl6
14:08 moritz r: say exp(0.504039)
14:08 p6eval rakudo 70262f: OUTPUT«1.65539392226111␤»
14:08 moritz r: say exp(0.504039) * 2
14:08 p6eval rakudo 70262f: OUTPUT«3.31078784452222␤»
14:17 moritz r: say 9 % -9
14:17 p6eval rakudo 70262f: OUTPUT«0␤»
14:17 moritz r: say 9 % (-9)
14:17 p6eval rakudo 70262f: OUTPUT«0␤»
14:18 cognominal__ joined #perl6
14:18 masak moritz: I think we can safely assume that the exponent is actually 0.5
14:19 masak I attacked the 1.22197 factor, but with no luck.
14:19 * [Coke] fails to install Curses.pm in a perlbrew on feather. hurm.
14:19 moritz libncurses5-dev is installed
14:20 masak if Knuth's formula were correct, then the 1.22197 factor should actually be 0.8862269
14:20 masak r: say sqrt(pi)/2
14:20 p6eval rakudo 70262f: OUTPUT«0.886226925452758␤»
14:22 [Coke] moritz: thank you for reminding me that sysperl might actually do what I want! ;)
14:24 dalek roast: 288969f | moritz++ | S05-capture/named.t:
14:24 dalek roast: RT #107746, named capture when proceeded by a quantified capture
14:24 dalek roast: review: https://github.com/perl6/roast/commit/288969f8cf
14:26 moritz it's amazing how many of the open bugs are about error message not being (quite) right
14:27 Bucciarati joined #perl6
14:28 JJ_Brain joined #perl6
14:32 JJ_Brain Hi.  I have reworked my proof of P=NP http://mathbin.net/136918
14:32 masak JJ_Brain: please stop bothering us with this.
14:33 JJ_Brain was kicked by moritz: JJ_Brain
14:34 masak moritz++ # I was going to give him one more chance, but I doubt it'd've helped
14:36 cognominal__ some get it wrong and don't learn from it
14:39 masak well, this is a kind of double error, too. (a) submitting a word-salad P=NP proof for people's perusal, and (b) doing it here.
14:40 * PerlJam starts composing his proof that proofs that contain the phrase "most likely" aren't real proofs  ;)
14:42 [Coke] seemslegit.com
14:42 SmokeMachine joined #perl6
14:48 dalek roast: 6ec4397 | moritz++ | S12-attributes/instance.t:
14:48 dalek roast: RT #110096, attributes in a sub in a class
14:48 dalek roast: review: https://github.com/perl6/roast/commit/6ec4397afb
14:48 dalek perl6.org: cac35bf | Carlin++ | source/about/index.html:
14:48 dalek perl6.org: Update source/about/index.html
14:48 dalek perl6.org:
14:48 dalek perl6.org: update my domain
14:48 dalek perl6.org:
14:48 dalek perl6.org: theintersect.org will expire soon and could end up pointing anywhere
14:48 dalek perl6.org: review: https://github.com/perl6/perl6.org/commit/cac35bfc76
14:51 moritz perl6: ?(all() ~~ /^ \d+ $/)
14:51 p6eval rakudo 70262f: OUTPUT«This type cannot unbox to a native string␤  in any  at src/gen/BOOTSTRAP.pm:99␤  in any !cursor_init at src/stage2/QRegex.nqp:551␤  in method ACCEPTS at src/gen/CORE.setting:10579␤  in block  at /tmp/bfq0gGj3k0:1␤␤»
14:51 p6eval ..niecza v24-12-g8e50362:  ( no output )
14:51 moritz r: say all().perl
14:51 p6eval rakudo 70262f: OUTPUT«all()␤»
14:52 cognominal joined #perl6
14:53 cognominal joined #perl6
14:58 [Coke] r: say all(1..*).perl
14:59 p6eval rakudo 70262f: OUTPUT«(timeout)»
14:59 moritz r: say (<[ ]> xx 10).pick(*).join
14:59 p6eval rakudo 70262f: OUTPUT«[][][][][][][][][][]␤»
14:59 moritz r: say (<[ ]> xx 10).flat.pick(*).join
14:59 p6eval rakudo 70262f: OUTPUT«[[]][][[]]]][][][][[␤»
15:00 timotimo r: say (<[ ]> xx 4).perl
15:00 p6eval rakudo 70262f: OUTPUT«(("[", "]"), ("[", "]"), ("[", "]"), ("[", "]")).list␤»
15:00 moritz .pick should flatten, but doesn't
15:00 timotimo r: say ((1, 2) xx 4).perl
15:00 p6eval rakudo 70262f: OUTPUT«((1, 2), (1, 2), (1, 2), (1, 2)).list␤»
15:01 timotimo didn't know it did that. good to know
15:03 [Coke] is there a good read on lists, flattening, eager, etc?
15:03 [Coke] I am continually surprised by rakudo here, so I need to update my brainmodel.
15:03 moritz http://doc.perl6.org/type/List has a bit
15:03 moritz though probably not enough
15:04 timotimo i'd appreciate more text, too
15:09 rom1504__ joined #perl6
15:10 [Coke] so, http://doc.perl6.org/type/List#Items%2C+Flattening+and+Sigils might have answered the for loop question from the other day.
15:10 timotimo that anchor doesn't seem to work for me
15:10 [Coke] where $thing<that> had a List in it, but was treated as a single item unless you specifically said ".list"
15:11 [Coke] timotimo: got it from chrome, clicking on similarly named entry in TOC
15:11 [Coke] r: say <a 3 2>flat
15:11 p6eval rakudo 70262f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Two terms in a rowâ�¤at /tmp/ZQK9JrqKYk:1â�¤------> [32msay <a 3 2>[33mâ��[31mflat[0mâ�¤    expecting any of:â�¤        postfixâ�¤        infix or meta-infixâ�¤        infix stopperâ�¤        statement endâ�¤        statement modifierâ�¤        state…
15:11 [Coke] r: say <a 3 2>.flat
15:11 p6eval rakudo 70262f: OUTPUT«a 3 2␤»
15:11 timotimo id="Items%2C+Flattening+and+Sigils" - is that even correct?
15:11 stopbit joined #perl6
15:11 [Coke] moritz: that doc is missing .flat
15:11 xilo_ joined #perl6
15:12 [Coke] there is a conflation of + and " " which is not correct in ids (but is in URLS)
15:14 [Coke] er, not quite a conflation, but when you say "+" in the URL, that isa " ", so some browsers might be looking for an id of "Items, Flattening and Sigils"
15:14 timotimo right
15:19 masak long live IRC -- http://royal.pingdom.com/2012/04/24/irc-is-dead-long-live-irc/
15:19 masak preaching to the choir here, of course :)
15:25 arnsholt Yeah, it was neat to see Freenode consistently growing
15:28 kaare_ joined #perl6
15:29 PerlJam I wonder if they have the data for those graphs from earlier.  Say ... 1992 or so  (when I first got on IRC :)
15:34 SmokeMac_ joined #perl6
15:35 am0c joined #perl6
15:38 SmokeMachine joined #perl6
15:41 SmokeMa__ joined #perl6
15:42 Woodi yes, since many years active new ircers recruiting is done only by via software: open source communities and game devs and pro-players :)
15:43 Woodi and some social activist too
15:43 moritz so, what would be the correct way to generate the ID?
15:43 moritz or the anchor link, for that matter?
15:46 timotimo slugify the text, replace whitespace with _ and remove/describe special characters?
15:47 [Coke] irc--
15:47 moritz well, the "describe special characters" is exactly what I'm interested about
15:47 [Coke] timotimo: I would probably do that, aye. make "safe" ids.
15:47 moritz more accurately, s/describe/escape/
15:48 kresike bye folks
15:48 [Coke] doesn't have to be escaped, though. you can just tr them all to _
15:48 [Coke] you want to keep unique ids (which this will slightly hurt) and keep them readable in the URL.
15:50 [Coke] we do this for some links we have in house; instead of IDs, they are extra path info, so we have something like /thing/2343/This_is_the_name_of_the__thing__
15:50 [Coke] just so the user can see where they are going.
15:50 [Coke] (and then we don't care what's after the id anyway)
15:52 moritz [Coke]: well, I want a simple reordering of headings not to lead to different tag locations
15:52 SmokeMachine joined #perl6
15:52 moritz [Coke]: and if I tr them all to _, then infix:<+> and infix:<-> are looking pretty much the same :(
15:55 MayDaniel joined #perl6
15:56 * colomon wonders if sorear is awake...
15:56 not_gerd joined #perl6
15:57 not_gerd hello, #perl6
15:57 moritz \o not_gerd
15:57 not_gerd moritz: http://irclog.perlgeek.de/perl6/2012-12-23#i_6271152
15:57 moritz not_gerd: yes, I've seen that, but it's butt ugly
15:58 moritz is there really no variant of ordinary URL encoding that works reliably for anchors?
15:59 not_gerd (original use case was mangling arbitrary unicode names to C identifiers)
16:00 not_gerd moritz: there's not a lot of choice in encoding schemes:
16:00 not_gerd ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
16:01 not_gerd so URL encoding is out
16:01 moritz so + and % are disallowed
16:01 not_gerd yes
16:01 * moritz swears loudly
16:01 not_gerd though browsers might support it anyway)
16:04 not_gerd a more readable alternative would be transliteration with a lookup table, eg + --> op-plus, ++ --> op-plus-plus
16:04 dalek rakudo-js: 6288160 | (Paweł Murias)++ | / (4 files):
16:04 dalek rakudo-js: pass more tests
16:04 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/6288160675
16:05 [Coke] not_gerd: mm, that's probably the best option.
16:07 * moritz considers writing a module for it
16:09 cognominal_ joined #perl6
16:32 dalek rakudo-js: 63a4e76 | (Paweł Murias)++ | runtime.js:
16:32 dalek rakudo-js: remove js code for runtime subs which are now in the nqp setting
16:32 dalek rakudo-js: review: https://github.com/pmurias/rakudo-js/commit/63a4e76429
16:51 * not_gerd commented on chromatic's blog posting: https://gist.github.com/f8dcceb9bcc7fc1c09c5
16:53 cognominal_ joined #perl6
16:53 am0c joined #perl6
17:03 fgomez joined #perl6
17:12 SmokeMachine joined #perl6
17:13 moritz nqp: sub f() { nqp::die("foo"); CATCH { nqp::die("bar" } }
17:13 p6eval nqp: OUTPUT«Unable to parse expression in blockoid; couldn't find final '}' at line 2, near "nqp::die(\""␤current instr.: 'panic' pc 13231 (src/stage2/gen/NQPHLL.pir:4687) (src/stage2/gen/NQPHLL.pm:328)␤»
17:13 moritz nqp: sub f() { nqp::die("foo"); CATCH { nqp::die("bar") } }; f();
17:13 p6eval nqp: OUTPUT«(timeout)»
17:14 SmokeMachine joined #perl6
17:20 * TimToady reboots...
17:25 * TimToady checking logs...1% done
17:25 moritz welcome back TimToady
17:26 * TimToady not back yet, still rebooting...
17:30 raiph joined #perl6
17:32 raiph (hits F10 to interrupt boot process): TimToady: do you use the irclog summary?
17:35 SmokeMac_ joined #perl6
17:38 telex joined #perl6
17:38 SmokeMa__ joined #perl6
17:47 wk joined #perl6
17:49 cognominal joined #perl6
17:50 SmokeMachine joined #perl6
17:59 SmokeMachine joined #perl6
18:02 moritz jnthn: ping
18:03 moritz jnthn: I'd like to address the old problem that 'perl6 nosuchfile' produces such a long backtrace, but I don't really know how
18:04 skids_ joined #perl6
18:04 moritz the old trick (catch the error, rethrow into something that knows how to produce a pretty or no backtrace) doesn't seem to work easily, because a setting is never loaded in that case
18:04 moritz any ideas?
18:12 SamuraiJack joined #perl6
18:12 dalek perl6-roast-data: 0de4f2c | coke++ | / (4 files):
18:12 dalek perl6-roast-data: today (automated commit)
18:12 dalek perl6-roast-data: review: https://github.com/coke/perl6-roast-data/commit/0de4f2c574
18:13 grondilu joined #perl6
18:14 moritz r: sub f($x = 1|2|3) { $x }; say f
18:14 * [Coke] asks if anyone has an interest in fudging pugs.
18:14 p6eval rakudo 70262f: OUTPUT«(timeout)»
18:15 * moritz hasn't
18:15 [Coke] r: @-0
18:15 p6eval rakudo 70262f: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Non-declarative sigil is missing its nameâ�¤at /tmp/52SdGjLS3Y:1â�¤------> [32m@[33mâ��[31m-0[0mâ�¤    expecting any of:â�¤        statement listâ�¤        prefix or termâ�¤        prefix or meta-prefixâ�¤Â»
18:15 PerlJam moritz: maybe we need a die_without_backtrace
18:15 moritz PerlJam: that's easy enough to make on the Perl 6 level
18:15 moritz PerlJam: but the code in question is all NQP
18:16 PerlJam nqp::die_without_backtrace  :)
18:17 moritz r: class X::AdHoc::WithoutBT is X::AdHoc { method gist { self.message } }; method die-without-clutter($payload) { X::AdHoc::WithoutBT.new(:$payload).throw }; sub foo() { die-without-clutter 'OH HAI' }; foo()
18:17 p6eval rakudo 70262f: OUTPUT«Useless declaration of a has-scoped method in mainlineâ�¤[31m===[0mSORRY![31m===[0mâ�¤Undeclared routine:â�¤    die-without-clutter used at line 1â�¤â�¤Â»
18:17 moritz r: class X::AdHoc::WithoutBT is X::AdHoc { method gist { self.message } }; sub die-without-clutter($payload) { X::AdHoc::WithoutBT.new(:$payload).throw }; sub foo() { die-without-clutter 'OH HAI' }; foo()
18:17 p6eval rakudo 70262f: OUTPUT«OH HAI␤»
18:18 moritz no backtrace
18:25 raiph [Coke]: Can you help me understand "plan", "spec", etc. in the daily roast stats?
18:26 raiph (jnthn++ explained them to me a few weeks back but I am still confused.)
18:26 raiph Aiui:
18:27 raiph "plan" means the sum of explicit plan numbers from tests that were run
18:28 PacoAir joined #perl6
18:28 raiph "spec" means the total based on a static analysis of the tests
18:28 SmokeMachine joined #perl6
18:29 raiph I'm pretty sure my understanding is wrong...
18:29 FROGGS_ joined #perl6
18:30 masak moritz: you can ping jnthn, but you won't get a pong in three days, methinks.
18:31 thou joined #perl6
18:44 FROGGS_ moritz: you might ask JJ_Brain for help :p
18:46 REPLeffect joined #perl6
18:48 cognominal joined #perl6
18:55 fgomez joined #perl6
18:56 moritz masak: oh well, I guess he'll backlog
18:57 * moritz 's ping has a pretty large TTL
18:59 xinming joined #perl6
19:01 sergot hi o/  ! !
19:01 dalek roast: 1c992e3 | moritz++ | S02-literals/quoting.t:
19:01 dalek roast: RT #114090, declaration in interpolation
19:01 dalek roast: review: https://github.com/perl6/roast/commit/1c992e3759
19:07 [Coke] raiph: those come directly from roast's test_summary.pl
19:08 raiph [Coke]: oh! i'll go read it. thanks!
19:09 [Coke] (good, because I have no idea what the difference between spec & Plan is. :)
19:09 [Coke] er, test_summary (no pl)
19:09 kurahaupo joined #perl6
19:12 moritz r: say (1,2,3).map: { return 1 }
19:12 p6eval rakudo 70262f: OUTPUT«Can not get attribute '$!storage' declared in class 'Parcel' with this object␤  in method reify at src/gen/CORE.setting:5410␤  in method reify at src/gen/CORE.setting:5408␤  in method gimme at src/gen/CORE.setting:5798␤  in method eager at src/gen/CORE.setting:5777…
19:15 dalek roast: 096b88b | moritz++ | S03-operators/repeat.t:
19:16 dalek roast: RT #114670, "str" x Int
19:16 dalek roast: review: https://github.com/perl6/roast/commit/096b88bff9
19:23 masak r: FIRST say "OH HAI"
19:23 p6eval rakudo 70262f:  ( no output )
19:24 masak r: LAST say "OH HAI"
19:24 p6eval rakudo 70262f:  ( no output )
19:24 diakopter r: LEAVE say "OH HAI"
19:24 p6eval rakudo 70262f: OUTPUT«OH HAI␤»
19:26 masak r: KEEP say "OH HAI"
19:26 p6eval rakudo 70262f:  ( no output )
19:26 masak aww :/
19:26 [Coke] FIRST LAST LEAVE KEEP say "eek!";
19:26 [Coke] r: FIRST LAST LEAVE KEEP say "eek!";
19:26 p6eval rakudo 70262f: OUTPUT«eek!␤»
19:26 diakopter r: CATCH { say "OH HAI" }
19:26 p6eval rakudo 70262f:  ( no output )
19:28 cognominal joined #perl6
19:47 Pleiades` joined #perl6
19:47 Vlavv_ joined #perl6
20:00 bluescreen10 joined #perl6
20:08 FROGGS_ joined #perl6
20:33 FROGGS_ joined #perl6
20:49 cognominal joined #perl6
20:55 dalek rakudo/nom: 6d4b902 | moritz++ | src/core/Temporal.pm:
20:55 dalek rakudo/nom: fix DateTime.Date (RT #114758)'
20:55 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/6d4b9021f8
20:56 dalek roast: d0102a3 | moritz++ | S32-temporal/DateTime.t:
20:56 dalek roast: test DateTime.Date conversion
20:56 dalek roast: review: https://github.com/perl6/roast/commit/d0102a329f
20:57 AndChat|356841 joined #perl6
20:58 moritz r: say {%*ENV}.WHAT
20:58 p6eval rakudo 70262f: OUTPUT«Block()␤»
21:01 sorear colomon: hi
21:01 colomon o/
21:02 [Coke] colomon: HIO
21:02 colomon sorear: I think I've figured out that you can get an attribute via o1.GetSlot(o1.mo, "$!val")
21:03 colomon sorear: but I don't yet have a clue what that actually returns.  Well, other than it's not a P6any.
21:03 colomon [Coke]: \o
21:03 sorear colomon: got your mail, writing reply
21:04 colomon sorear: danke
21:05 * colomon has new glasses, and is once again amazed at what the world looks like
21:08 masak it is indeed quite amazing.
21:08 tadzik bah, I do need a pair too
21:09 sorear colomon: sent
21:10 colomon sorear++ # think that's enough for me to get the job done
21:13 REPLeffect joined #perl6
21:13 PacoAir joined #perl6
21:13 colomon niecza> now - now
21:13 colomon -0.00014615058898925781
21:13 colomon r: say now - now
21:13 p6eval rakudo 6d4b90: OUTPUT«-0.0202257␤»
21:14 moritz ++colomon
21:14 PerlJam That's way too much latency between ops  ;)
21:15 tadzik n: say now - now
21:16 p6eval niecza v24-12-g8e50362: OUTPUT«Unhandled exception: Cannot use value like Instant as a number␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /home/p6eval/niecza/lib/CORE.setting line 293 (Any.Numeric @ 6) ␤  at <unknown> line 0 (ExitRunloop @ 0) ␤  at /tmp/0OO3kXutF2 line 1 (mainline @ 4…
21:16 colomon moritz: alas, my first version was cheating a bit (wouldn't have worked for classes derived from Instant) and my attempt to do it right is troubled.
21:31 moritz r: say "@a[]"
21:31 p6eval rakudo 6d4b90: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤Variable @a is not declaredâ�¤at /tmp/YCcw38DoVl:1â�¤------> [32msay "@a[][33mâ��[31m"[0mâ�¤    expecting any of:â�¤        postfixâ�¤Â»
21:36 dalek roast: 8b533dd | moritz++ | S32-exceptions/misc.t:
21:36 dalek roast: RT #115396, undeclared variables in interpolating strings
21:36 dalek roast: review: https://github.com/perl6/roast/commit/8b533dd7d4
21:39 bruges joined #perl6
21:40 mtk joined #perl6
21:44 Chillance joined #perl6
21:46 alec is there a way to get the perl6 ebook in plaintext?
21:46 alec there are too many ligatures in it, imo
21:46 alec pdftotext doesn't even recognize some of them
21:47 alec so now i have a textfile full of words like 'speci cation'
21:49 Ayiko https://github.com/perl6/book/ ?
21:49 flussence You can run "make html" in the source tree
21:50 alec ok
21:52 alec compilation failed at bin/book-to-html line 3
21:53 alec can't locate Pod/PseudoPod/HTML.pm
21:54 alec is there an easy way to install that?
21:54 sorear colomon: reply
21:54 sorear cpanm -S Pod::PseudoPod::HTML ?
21:55 alec ok
21:58 alec yes
21:58 colomon sorear++ # trying...
21:58 alec it works; html2text didn't have any trouble making plaintext
21:59 alec sorear++
21:59 alec flussence++
21:59 alec Ayiko++
22:05 dalek ecosystem: d495511 | (Timothy Totten)++ | META.list:
22:05 dalek ecosystem: Added WWW::App::Ballet, yet another Dancer-like web framework.
22:05 dalek ecosystem: review: https://github.com/perl6/ecosystem/commit/d495511a20
22:14 masak supernovus++
22:26 masak 'night, #perl6
22:28 FROGGS_ joined #perl6
22:33 quester joined #perl6
22:51 bitonic joined #perl6
22:51 sorear colomon: reply
22:56 colomon sorear++ # that seems to have done it!
22:59 colomon spectesting
23:05 am0c joined #perl6
23:25 timotimo panda isn't very happy when it's run with perl6-debug :|
23:26 bbkr joined #perl6
23:27 bbkr If a Str is binary what is the fastest way to covert it into ascii or utf8?  Str.encode.decode ?
23:28 bbkr latest parrot socket changes caused also get to return binary strings (spec does not say if they should be binary or not)
23:29 doy Str is unicode codepoints, Buf is bytes
23:30 bbkr that means we have rakudobug
23:31 bbkr IO::Socket.get in 2012.11 was returning unicode strings, in 2012.12 it is returning binary string
23:35 timotimo tadzik: if you have the time, the link to "masak's Pls" is dead by now and i'm not sure where it's meant to lead.
23:42 supernovus joined #perl6
23:45 supernovus hmm, apparently read() and get() aren't the only broken methods since the IO refactor. SCGI is using recv() and it's not working either.
23:48 bbkr i cannot find recv in S32
23:50 supernovus Hmm, it must be a passthrough method to the underlying system. I'm refactoring SCGI to use read() in a Berekely style loop and will see what happens.
23:51 fgomez joined #perl6
23:52 bbkr supernovus++

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

Perl 6 | Reference Documentation | Rakudo