»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
colomon raiph: I've got it down to a two-liner now. ;) 01:42
raiph: gist.github.com/3837592 01:44
bad news is it no longer works under niecza, so I've got a niecza bug to fix.
raiph colomon: that's a LONG line. ;) 01:51
colomon raiph: I've since rewritten it as a three-liner, with the last line taking over the ending map and making it prettier. ;) 02:02
colomon raiph: improved version gist.github.com/3837592 02:06
raiph colomon: what happens if you replace the intermediate arrays with feeds (<== etc.) 02:07
colomon Hmmm... I've never really used feeds. 02:08
raiph i think this is exactly the sort of thing they're meant for 02:09
back to 4 or so lines, but pretty 02:10
sorear (-.&~: # [) (, </~ i. 170x) # (, +/~ ^&4 i. 170x) 02:29
635318657
this can probably be improved
colomon loliblogged: justrakudoit.wordpress.com/2012/10/...th-powers/ 02:35
TimToady sorear: by writing it in a different language? :P 02:35
colomon TimToady: checked the spec recently? ;) 02:36
TimToady the spec isn't checked--last I knew, it was more like a paisley 02:37
japhb TimToady, perhaps a zoomed Mandelbrot Set, maybe something in Seahorse Valley? 02:41
TimToady rosettacode.org/wiki/Extend_your_language#Perl_6 03:55
popl TimToady: That's neat. 04:20
bonsaikitten sorear: niecza-22 ... missing makefile? I'm having trouble finding any way to build from source 05:22
phenny bonsaikitten: 25 Sep 06:53Z <sorear> tell bonsaikitten Just for you, I made sure the v22 tag would build with itself, rather than requiring v21 :D
sorear niecza-22.zip does not contain a Makefile, or any nonessential source code for that matter 05:25
it is, as the file description says, a binary release
the v22 tag references a commit which references a tree which contains an entry "Makefile"
bonsaikitten hrm, let me see what github did there 05:26
it's one of those hate-hate relationships ;) 05:27
retards 05:29
bonsaikitten ... that's not the right tarball, github 05:29
moritz good morning
sorear morning moritz 05:29
bonsaikitten hmm, that one is quite different. maybe it actually works now? :D 05:31
moritz .u union 05:40
phenny U+222A UNION (∪)
moritz .u intersection
phenny U+2229 INTERSECTION (∩)
sorear .u roundabout
phenny sorear: Sorry, no results for 'roundabout'.
TimToady .u direct 05:43
phenny U+2393 DIRECT CURRENT SYMBOL FORM TWO (⎓)
dalek href="https://glitchmr.github.com:">glitchmr.github.com: ca710f0 | GlitchMr++ | _posts/2012-10-05-yet-another-duckduckgo-goodie.md:
Yet another DuckDuckGo goodie blog post
06:11
GlitchMr I'm going to do GlitchMr--. It has nothing with Perl 6 06:12
(I hope it worked)
TimToady surely IO::Dir(@_)->new is wrong
GlitchMr oops
TimToady TimToady-- for being offtopic as well :) 06:13
GlitchMr rosettacode.org/mw/index.php?title=...on=history 06:13
You have your ++ there
kresike hello all you happy perl6 people 07:59
brrt hello kresike! 08:00
kresike brrt, o/
FROGGS gmorning 08:01
kresike FROGGS, o/
rindolf kresike: hi. 08:03
Hi all.
kresike rindolf, o/
grondilu r: say #`( wait for it... ) "hello world!" 08:29
p6eval rakudo fb11f1: OUTPUT«hello world!␤»
grondilu ^ this would be in more fun example for embedded comment in S02
GlitchMr Those block comments are way better than CoffeeScript block comments (which probably use worst syntax possible) 08:30
Block comments are between ### and ### in CoffeeScript. 08:31
brrt wonders why everybody feels the need to improve javascript
jnthn evening o/ 08:32
moritz \o jnthn 08:33
brrt: because a lot of people are (or feel) forced to use it
brrt a lot of people are forced to use java
arnsholt Also, JavaScript has some pretty weird warts
GlitchMr Isn't Perlito better JavaScript?
brrt well, a lot of people try to fix java, too
nobody, on the other hand, tries to fix php 08:34
as far as i can tell
GlitchMr It's impossible to fix
And I think I've seen language that compiles to PHP
brrt javascript has arguments.callee and thats all i'll ever need
arnsholt Oh, I think there are PHP core hackers trying to improve it, but it's a big job
Also, backwards compatibility means many of the worst flaws can't really be fixed 08:35
brrt but on the other hand, dart, coffeescript, typescript 08:36
most of them add nothing but 'we look a bit more like what you're used too'
GlitchMr PHP is so inconsistent to be used.
JavaScript IS consistent.
If you would rename most of PHP functions, could you call it PHP? 08:37
If you wouldn't, it still would suck
But perhaps I should make improved PHP some day
Which would be mostly compatible
GlitchMr (means, you still could use inconsistent APIs like strpos(), but you can use 'cat'->index('a')) 08:38
GlitchMr And ->index on failure would report false. On success with 0, it would return Perl 6 style '0 but true' 08:38
brrt but, why bother? if you change 90% of php to make it sane 08:39
brrt (i.e., you keep only the syntax) 08:40
then mediawiki is never going to run, and neither is wordpress, or drupal
or magento, and any of the other software packages
that simply Make People Money
the whole and only reason for the continued existance of php is economics 08:41
GlitchMr And things like "use autodie" which would convers warnings to exceptions.
convert* 08:42
GlitchMr ... is it Perl 6? 08:42
manner phenny: tell moritz SVG::Plot has an error.No such method 'key' for invocant of type 'List'.in method serialize at lib/SVG.pm:12 09:28
phenny manner: I'll pass that on when moritz is around.
manner phenny:thanks! 09:29
phenny: bye!see you tomorrow. 09:30
bbkr rakudo: sub foo (Mu $id?) { $id.WHAT.say }; foo(); foo(Any); # nice way to distinguish lack of params from undefined value of params :) 09:55
p6eval rakudo fb11f1: OUTPUT«Mu()␤Any()␤»
moritz phenny: tell manner please open an issue at github.com/moritz/svg-plot/issues/new including steps to reproduce the error 09:58
phenny moritz: I'll pass that on when manner is around.
moritz: 09:28Z <manner> tell moritz SVG::Plot has an error.No such method 'key' for invocant of type 'List'.in method serialize at lib/SVG.pm:12
dalek href="https://glitchmr.github.com:">glitchmr.github.com: 47a5e15 | GlitchMr++ | _posts/2012-10-05-yet-another-duckduckgo-goodie.md:
It's post, not posts.
12:19
tadzik GlitchMr: btw, why are those announcements here? 12:20
GlitchMr ... 12:21
I've enabled those for my Perl 6 modules... but, well... I think I went too far 12:22
GlitchMr I would remove them, but for some reason I cannot because of GitHub's CSRF protection. 12:23
"There was a problem with your request."
At least I think it is...
"Usually this means that your user authenticity token is incorrect. This can happen when you visit a page with a form, then sign in from a separate window, and then return to resubmit the form. Here's what you can try next:"
No idea why it happens 12:24
Because of that error I cannot remove service hook, even if I could've added it before 12:25
It's probably temponary problem
moritz or you could try a different browser 12:32
dalek rlito: a57f236 | (Flavio S. Glock)++ | / (6 files):
Perlito5 - js - more array tie methods
12:46
[Coke] yawns. 13:29
brrt yeah, me2
lestrrat jnthn: may we link your blog 6guts.wordpress.com/2012/10/03/yapcasia-2012/ from yapcasia.org/2012/news/yapcasia-2012-blog.html ? 13:46
[Coke] ... it's the internet. Seems legit. ;) 13:54
colomon n 13:57
sigh
o/
[Coke] no/ ? 13:58
that kind of looks like "I'm a little teapot". 13:59
colomon I'm not short. ;) 14:00
the "n" was an import from another window. Colloquy is a nice client, but right when it opens the IRC window for the first time it steals focus, and if you're in the middle of typing something else... 14:01
[Coke] I would like to use a more GUI client, but need something that works more like running irssi-in-screen on teh backend so I don't lose my place. 14:03
... so I just run irssi-in-screen because I'm lazy
moritz iirc that's what bouncers are for 14:06
but I too use irssi-in-screen
[Coke] ^5 lazy.
brrt jnthn: nice presentation
moritz yay, two of "my" modules mentioned \o/ 14:10
rindolf Hi Perl sixers. 14:26
brrt \o rindolf 14:27
rindolf brrt: hi.
brrt: what's up?
brrt not much, nearly weekend 14:28
how are you?
rindolf brrt: I'm fine. Refactoring the perl debugger. 14:29
brrt: it's an ongoing process as part of my grant.
brrt: and I slept during the afternoon. 14:30
brrt oh, thats nice
rindolf brrt: what is?
brrt sleeping in the afternoon :-)
and fixing the perl debugger, too
rindolf brrt: OK.
brrt the old- perl debugger? 14:31
rindolf brrt: yes. 14:32
brrt: perl -d
brrt don't think i've ever used that
should have
rindolf $@ and $@ =~ s/ at .*//, &warn($@), next CMD; ==> this is the kind of thing I have to deal with. 14:35
brrt oh, that looks ehm... 14:38
well, legible, somehow
kresike bye folks 14:43
colomon phenny: tell sorear I'm getting a distressing number of "Unhandled exception: System.MissingMethodException: Method not found: 'Cursor..ctor'." errors in niecza -- possibly all coming from calls to subst? 15:27
phenny colomon: I'll pass that on when sorear is around.
colomon r: my $a = "This /* has a comment */"; $a .= subst(rx["/*" .*? "*/"], " ", :global); say $a 15:28
p6eval rakudo fb11f1: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 2, near "\"/*\" .*? \""␤»
colomon r: my $a = "This /* has a comment */"; $a .= subst(/"/*" .*? "*/"/, " ", :global); say $a
p6eval rakudo fb11f1: OUTPUT«This ␤»
colomon jnthn++ # Grammar::Tracer 16:06
flussence is that working currently? I tried using it a few days/weeks ago and got some low level error 16:14
colomon flussence: it's working great for me at the moment.
flussence hm, I'll have to give it another look then 16:15
sergot hi ! o/o/ 16:29
sjohnson word up 16:57
dalek ecs: ebd2436 | larry++ | S05-regex.pod:
:ii implies :i, :mm implies :m
17:07
TimToady r: $_ = "He said that he said."; s:ii:g/he/she/; .say
p6eval rakudo fb11f1: OUTPUT«He said that she said.␤»
TimToady r: $_ = "He said that he said."; s:i:ii:g/he/she/; .say 17:08
p6eval rakudo fb11f1: OUTPUT«She said that she said.␤»
TimToady rakudobug
moritz you mean :ii should imply :i? 17:11
TimToady that was always the intent 17:12
but I realized the spec was unclear
moritz I can probably fix rakudo, I just need to find the right place to do it 17:13
TimToady same deal for :m and :mm
moritz which we don't implement
does :samespace imply :sigspace?#
TimToady sure we do, it's just lazy :)
TimToady yes 17:14
moritz wonders if there's a real application for :samemark
TimToady perhaps not in Indo-European languages :) 17:15
moritz I'd be also curious about real-world examples from non-Indo-European languages 17:16
TimToady but there are plenty of marks that are more independent of letter identity than á
.u combining
phenny U+031B COMBINING HORN (◌̛)
arnsholt There's spiritus asper/lenis in Greek, which is even Indo/European
Modulo wrong keyboard layout spelling 17:17
TimToady I'm thinking things more like o̲ 17:18
.u o̲
phenny U+006F LATIN SMALL LETTER O (o)
U+0332 COMBINING LOW LINE (◌̲)
mucker TimToady: odd of me to say it i guess, but you have very talented children -- summonedcreature.com/ :) 17:20
TimToady and that's just the girls! 17:22
manner phenny: tell moritz my steps about svg-plot gist.github.com/3841112
phenny manner: I'll pass that on when moritz is around.
manner: 09:58Z <moritz> tell manner please open an issue at github.com/moritz/svg-plot/issues/new including steps to reproduce the error
sjohnson phenny: tell hugme to fulfill its hugging quota 17:31
phenny sjohnson: I'll pass that on when hugme is around.
moritz manner: for a bug report, please open a ticket. Thanks. 17:35
phenny moritz: 17:22Z <manner> tell moritz my steps about svg-plot gist.github.com/3841112
manner moritz: thanks. 17:36
spider-mario when I try to build Rakudo Star 2012.09 for packaging, I get: "load_bytecode" couldn't find file 'Perl6/Grammar.pbc' 17:38
moritz :(
that's probably during building the debugger
I've seen that error before mentioned in here
spider-mario I get that error when running make myself in src/modules/rakudo-debugger indeed 17:39
thanks
I’ll probably do without the debugger for now
spider-mario or maybe rebuilding the package when it’s already installed will solve the problem 17:42
dalek ast: a7483be | (Edwin Steiner)++ | S04-phasers/eval-in-begin.t:
Add test for RT #115134: [BUG] BEGIN { eval "..." } Confuses Rakudo.
17:47
spider-mario having a system-wide, incomplete installation of rakudo star seems to solve the problem 17:59
it can then be rebuilt more completely
dalek kudo/nom: 321d57b | moritz++ | src/Perl6/Actions.pm:
:ii regex adverb implies :i
18:12
kudo/nom: ebc730c | moritz++ | src/core/ (2 files):
typed exception for symbol lookup failure
_edwin .u plus 18:14
phenny U+2214 DOT PLUS (∔)
_edwin .u 2295 18:17
phenny U+2295 CIRCLED PLUS (⊕)
TimToady .u SPRECHGESANG 18:19
phenny TimToady: Sorry, no results for 'SPRECHGESANG'.
TimToady stupid antique phenny 18:20
[Coke] seems like the sort of thing that'd be amenable to hooking up to an irc sixbot. 18:21
_edwin ouch, had >+ instead of +> in an expression. took a while to find why it came out wrong :/ 18:47
moritz r: say (1 >+ 2) 18:48
p6eval rakudo fb11f1: OUTPUT«False␤»
_edwin rn: say (0x80000000 +| (1 >+ 2)) 18:51
p6eval rakudo fb11f1: OUTPUT«2147483648␤»
..niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
moritz rn: say (1 >+ 2)
p6eval rakudo fb11f1, niecza v22-6-g9e5350d: OUTPUT«False␤»
_edwin it was hidden by the +|
sirrobert why does this happen: 18:52
moritz rn: say 0x80000000 +| False
p6eval rakudo fb11f1: OUTPUT«2147483648␤»
..niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
sirrobert r: my $str ~= "foo"; say $str;
p6eval rakudo fb11f1: OUTPUT«foo␤»
sirrobert well...
moritz rn: say 0x80000000 +| 0
p6eval rakudo fb11f1: OUTPUT«2147483648␤»
..niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
moritz sirrobert: the op= forms usually special-case an undefined LHS 18:53
sirrobert ok, fair enough
moritz was your question why it doesn't warn?
r: my %h; %h<a> *= 4; %h<b> += 5; say %h.perl
p6eval rakudo fb11f1: OUTPUT«("a" => 4, "b" => 5).hash␤»
sirrobert well, I did something that generated a null string
should have tested my demo code first= ) 18:54
=)
_edwin rn: say 0x80000000
p6eval rakudo fb11f1, niecza v22-6-g9e5350d: OUTPUT«2147483648␤»
sirrobert Type check failed in assignment to '$!app'; expected 'Timber' but got 'Timber' 19:24
_edwin is it somehow possible to use backreferences like A[n-16] in a lazy sequence?
when generating a lazy sequence I menat 19:25
meant*
moritz my @a := gather { take $_ for ^10; take @a[$_ - 5] ** 2 for 10..20 }; say @a[15] 19:26
r: my @a := gather { take $_ for ^10; take @a[$_ - 5] ** 2 for 10..20 }; say @a[15]
p6eval rakudo ebc730: OUTPUT«use of uninitialized value of type Nil in numeric context in block at /tmp/z056gc1ILW:1␤␤use of uninitialized value of type Nil in numeric context in block at /tmp/z056gc1ILW:1␤␤use of uninitialized value of type Nil in numeric context in block at /tmp/z056gc…
TimToady _edwin: you're supposed to be able to, but there are bugs
moritz and if you just want the previous few elements, a sequence might be what you want
nr: my @a := 1, 1, *+* ... *; say @a[15] 19:27
p6eval rakudo ebc730, niecza v22-6-g9e5350d: OUTPUT«987␤»
moritz that uses the last two elements
colomon has finally usefully used inheritance in a grammar! 19:29
TimToady I'd like to get to the point where we can do hamming numbers self referentially
constant @hamming = 1, dedup (@hamming X* 2) M (@hamming X* 3) M (@hamming X* 5);
sirrobert colomon: nice =)
TimToady but no implementation is up to that yet 19:30
where M is a lazy list merge infix
and dedup does what it says
colomon TimToady: M, eh? 19:31
moritz our metaop particle zoo is growing :-)
R, S, X, Z, soon M
TimToady M isn't a metaop, at least not until you start saying Mleg and such 19:32
moritz we need some vowels in there too
arnsholt colomon: What did you use inheritance for, OOC?
colomon is $a M $b just "take one from $a, one from $b, repeat"?
TimToady list infixes don't unpack items like that 19:33
colomon arnsholt: To distinguish between a formal grammar (ie, if your string passes this it is formally correct) and an informal grammar (ie this is some of the crap that occurs in real world files)
_edwin that would be $a Z $b
arnsholt Ah, cool!
TimToady _edwin: no, that doesn't work either
_edwin eh @a Z @b
TimToady better
or @$a Z @$b 19:34
moritz colomon: I think @a M @b is more like gather { while @a && @b { take @a[0] before @b[0] ?? @a.pop !! @b.pop } } 19:34
erm
sirrobert arnsholt & colomon: I recently used grammar inheritance for a dispatch framework. The request is in ascii, a grammar munges it around and dispatches.
TimToady moritz: shift
moritz gather { while @a && @b { take @a[0] before @b[0] ?? @a.shift !! @b.shift }; take $_ for @a, @b } 19:35
sirrobert arnsholt & colomon: The top grammar provides key functionality, the lower is for domain-specific dispatches =)
colomon TimToady, moritz: so it's the merge of a merge sort?
TimToady yes, or of a definition of hamming numbers :)
moritz colomon: as far as I understand, yes
colomon and if you have @a M @b M @c it's merging all three at once? 19:36
arnsholt sirrobert: Sounds cool! I remember some people playing with ideas along those lines previously. Is your code on github or something?
TimToady colomon: yes, list infixes are list associative
sirrobert arnsholt: not at the moment (maybe later). It's private internals ATM.
colomon TimToady: is it spec'd yet?
TimToady no 19:37
sirrobert arnsholt: but it's super slick... the grammar and controller are very clean and only take a few lines
TimToady but I keep wanting it to have been specced :)
it's not so clear how to set up the metaop form though 19:38
Mbefore is probably default 19:39
colomon TimToady: hurm. that seems like it would be straightforward for the metaop form. What's the complication?
TimToady but should it distinguish Mlt from Mle, for instance? 19:40
colomon seems like an arbitrary decision is called for! and let real world experience sort it out. ;)
arnsholt sirrobert: Sounds awesome! 19:42
sirrobert arnsholt: once we're a little further down (maybe v2) I'll see if we can release it.
arnsholt Cool 19:44
sorear good * #perl6 19:46
phenny sorear: 15:27Z <colomon> tell sorear I'm getting a distressing number of "Unhandled exception: System.MissingMethodException: Method not found: 'Cursor..ctor'." errors in niecza -- possibly all coming from calls to subst?
sorear colomon: I blame stale compiled modules
colomon sorear: actually, that appears to have been a case of a completely hosed niecza build
... or maybe that? 19:47
where are they again?
sorear ~/.local/share/NieczaModuleCache 19:50
sirrobert does bareword POST mean something in p6? 19:51
or POST:foo
colomon sorear++
sirrobert or (maybe from a different angle)... 19:52
flussence sorear: there's a ~/.cache directory too, you know... :)
sirrobert is there any reason I should use a colon in a sub name?
like... method foo:bar () { ... }
sorear flussence: that would have required platform-testing code 19:55
flussence hm, I was under the impression they all come as a set (with ~/.config)... does OS X have some of these and not others? 20:00
sorear it's currently using System.Environment.GetSpecialFolderPath(LocalApplicationData) 20:03
flussence oh, right 20:03
geekosaur OS X doesn't use any of those normally 20:04
the native local application data would be ~/Library/Application Support/appname although unixy stuff probably would continue to use freedesktop.org paths; it just has to create them first
flussence that's annoying, I just looked it up and mono/.net doesn't have an equivalent for $XDG_CACHE_HOME there. 20:10
(unless you're expected to use Temporary Internet Files for it on windows, blegh) 20:13
sirrobert what's the syntax for: Class A is B does C ? I'm getting: 20:15
Unable to parse $*PKGDECL definition at line 18, near "does
sorear class A is B does C { } 20:16
sirrobert hmmm
TimToady std: class A is B does C { }
p6eval std 77327a4: OUTPUT«===SORRY!===␤Invalid role name at /tmp/tpUOX1Iftl line 1:␤------> class A is B does ⏏C { }␤ expecting typename␤Parse failed␤FAILED 00:00 41m␤» 20:16
TimToady heh
sirrobert heh
TimToady std: class A is Cool does Positional { }
sirrobert r: class B; role C; class A is B does C {};
p6eval std 77327a4: OUTPUT«ok 00:00 42m␤»
rakudo ebc730: OUTPUT«===SORRY!===␤Too late for semicolon form of $*PKGDECL definition at line 2, near "class A is"␤»
sirrobert r: class B {}; role C {}; class A is B does C {}; 20:17
p6eval rakudo ebc730: ( no output )
sirrobert hm 20:17
TimToady "$*PKGDECL" is a bug
std: class B {}; role C {}; class A is B does C {};
p6eval std 77327a4: OUTPUT«ok 00:00 42m␤»
TimToady hmm 20:18
sorear ENOTENOUGHINTERPOLATION
TimToady oh
std: class B; role C; class A is B does C {}
p6eval std 77327a4: OUTPUT«===SORRY!===␤Too late for semicolon form of role definition at /tmp/9VNVRcMJZg line 1:␤------> class B; role C⏏; class A is B does C {}␤ expecting any of:␤ name␤ trait␤Parse failed␤FAILED 00:00 41m␤»
TimToady what it should say
sirrobert ok, gotta go. have a good weekend =) 20:19
raiph sirrobert: expected Blah but got Blah: irclog.perlgeek.de/perl6/2012-03-01 discussion starts at 15:30 20:25
_edwin nr: 128 X+> 1...2 20:44
p6eval niecza v22-6-g9e5350d: OUTPUT«===SORRY!===␤␤"X+>" and "..." are non-associative and require parens at /tmp/RDuow3ly6S line 1:␤------> 128 X+> 1...⏏2␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (die @ 5…
..rakudo ebc730: ( no output )
_edwin nr: say(128 X+> 1...2) 20:45
p6eval rakudo ebc730: OUTPUT«64 32␤»
..niecza v22-6-g9e5350d: OUTPUT«===SORRY!===␤␤"X+>" and "..." are non-associative and require parens at /tmp/roFHh88Vs6 line 1:␤------> say(128 X+> 1...⏏2)␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1437 (di…
_edwin who's right?
doy std: 128 X+> 1...2 20:46
p6eval std 77327a4: OUTPUT«===SORRY!===␤"X+>" and "..." are non-associative and require parens at /tmp/4gKFjf0fMl line 1:␤------> 128 X+> 1...⏏2␤Check failed␤FAILED 00:00 42m␤»
_edwin ok, thanks. will submit rakudobug later
_edwin nr: 'a'.encode 20:50
p6eval rakudo ebc730: ( no output )
..niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: No value for parameter '$enc' in 'Str.encode'␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (Str.encode @ 1) ␤ at /tmp/BjfDAT0znK line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6ev…
_edwin nr: 'a'.encode.say
p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: No value for parameter '$enc' in 'Str.encode'␤ at /home/p6eval/niecza/lib/CORE.setting line 0 (Str.encode @ 1) ␤ at /tmp/uSekb8h0ZJ line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6ev… 20:51
..rakudo ebc730: OUTPUT«Buf:0x<61>␤»
_edwin nieczabug this time I think, right? the spec mentions a default for $enc
_edwin rosettacode.org/wiki/SHA-1#Perl_6 21:01
flussence notes wiki/SHA-3 doesn't yet exist... 21:02
_edwin hm, the stupid highlighting of x and X does not become this code :/ 21:03
flussence well, they *are* built-in operators already... 21:04
_edwin the padding part is still a bit awkward
yes, it's just that the highlighter is not smart enough to detect where they are and where they are not the x and X operators 21:05
I had a lot of fights with negative number vs. bitwise ops while writing this code 21:06
this came as a surprise to me, for example: 21:07
nr: (-4062448665 +& 0xffffffff).say
p6eval niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
..rakudo ebc730: OUTPUT«-35916825␤»
niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
..rakudo ebc730: OUTPUT«-35916825␤»
niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
_edwin oops, sorry for spamming
p6eval ..rakudo ebc730: OUTPUT«-35916825␤»
_edwin hm, the difference between rakudo and niecza is also interesting 21:08
I ended up doing * % 0x1_000_000 21:09
eh, four zeroes
niecza dies on this code with "Unhandled exception: Cannot unbox a Int32 from an object of repr P6box[Byte[]]" 21:10
not sure if it is my fault or niecza's 21:11
. o O (it's too late, I'm talking to myself already :)
sorear sounds like you passed a Buf to something that expects an Int 21:13
_edwin nr: 'abc'.encode('ascii').list.say 21:16
p6eval niecza v22-6-g9e5350d: OUTPUT«Buf.new(...)␤»
..rakudo ebc730: OUTPUT«97 98 99␤»
_edwin that makes the difference
_edwin I did not find Buf.list explicitly in the spec so far, but as Buf does Positional, rakudo might be right here 21:22
sorear, your take on this?
sorear _edwin: rakudo is clearly right 21:26
_edwin sorear is there a nieczabug tracker where I should file it? 21:27
raiph phenny, tell sirrobert expected Blah but got Blah: irclog.perlgeek.de/perl6/2012-03-01 discussion starts at 15:30
phenny raiph: I'll pass that on when sirrobert is around.
sorear _edwin: yes, but I don't think it's useful to file separate bugs for all of the things missing from Niecza's Buf 21:31
it's like 5% implemented
just enough for Bailador
dalek ast: 20918f0 | (Edwin Steiner)++ | S32-str/encode.t:
Test that Buf.list gives the list of codepoints.
21:33
_edwin ok, anyway I added a spectest 21:34
sorear _edwin++ 21:39
dalek ast: a5a1b21 | (Edwin Steiner)++ | S03-operators/precedence.t:
Add test related to RT #77848, 'X+>' must not associate with '...'.
22:00
_edwin std: 4 X+> 1...2 22:02
p6eval std 77327a4: OUTPUT«===SORRY!===␤"X+>" and "..." are non-associative and require parens at /tmp/zlLrFa_Dc2 line 1:␤------> 4 X+> 1...⏏2␤Check failed␤FAILED 00:00 42m␤»
_edwin nr: (-4062448665 +& 0xf).say 22:09
p6eval rakudo ebc730: OUTPUT«7␤»
..niecza v22-6-g9e5350d: OUTPUT«0␤»
_edwin nr: (-4062448665 X+& 0xffffff,(*+1)*2-1...0xffff_ffff).say 22:14
p6eval niecza v22-6-g9e5350d: OUTPUT«===SORRY!===␤␤"X+&" and "..." are non-associative and require parens at /tmp/tsLPxPygrX line 1:␤------> (-4062448665 X+& 0xffffff,(*+1)*2-1...⏏0xffff_ffff).say␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza…
..rakudo ebc730: OUTPUT«14414823 31192039 31192039 98300903 -35916825 -35916825 -35916825 -35916825 -35916825␤»
_edwin nr: (-4062448665 X+& (0xffffff,(*+1)*2-1...0xffff_ffff)).say
p6eval niecza v22-6-g9e5350d: OUTPUT«0 0 0 0 0 0 0 0 -2147483648␤»
..rakudo ebc730: OUTPUT«14414823 31192039 31192039 98300903 -35916825 -35916825 -35916825 -35916825 -35916825␤»
_edwin I don't get it :/ 22:15
sorear _edwin: what don't you get? 22:16
_edwin how these number come to be
sorear n: say (-4062448665) +| 0 22:17
p6eval niecza v22-6-g9e5350d: OUTPUT«-2147483648␤»
_edwin in rakudo the result becomes negative when the mask changes from 27 to 28 '1' bits
sorear your numbers are too big.
try smaller numbers.
afaik neither rakudo nor niecza properly handles bitops on bignums yet
_edwin I'd like to have predictable bitwise ops also for big numbers
oh 22:18
sorear niecza's is more predictable because it always uses int32 :p
rakudo uses platform intos
ints
actually platform intptr_ts
grondilu Normally for binary "strings", I should use Buf. But can I use Str instead, as I would in Perl5? Can I use: "my Str $x = [~] @some-array-of-bytes;" and not lose the information in @some-array-of-bytes? 22:21
sorear what is the type of the values in @some-array-of-bytes? 22:22
grondilu just bytes (integers from 0 to 256) 22:23
_edwin nr: Buf.new([97.98]).decode('ascii').say 22:24
p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Cannot call new; none of these signatures match:␤ Mu, *%_␤ at /tmp/ZRdQj52iM7 line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-CORE @ …
..rakudo ebc730: OUTPUT«This type cannot unbox to a native integer␤ in method set_codes at src/gen/CORE.setting:6992␤ in method new at src/gen/CORE.setting:6984␤ in block at /tmp/lQqsM_D4wD:1␤␤»
_edwin nr: Buf.new([97,98]).decode('ascii').say
p6eval niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Cannot call new; none of these signatures match:␤ Mu, *%_␤ at /tmp/FBTogmcgqx line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-CORE @ …
..rakudo ebc730: OUTPUT«This type cannot unbox to a native integer␤ in method set_codes at src/gen/CORE.setting:6992␤ in method new at src/gen/CORE.setting:6984␤ in block at /tmp/NhFOUsgyGL:1␤␤»
grondilu r: my @a = (^256).roll(100); my Str $x = [~] map &chr, @a; say @a ~~ $x.ords;
p6eval rakudo ebc730: OUTPUT«True␤»
_edwin the rakudo message is strange
grondilu r: my @a = (^256).roll(100000); my Str $x = [~] map &chr, @a; say @a ~~ $x.ords; 22:25
_edwin in the spec Buf.new is used like that
p6eval rakudo ebc730: OUTPUT«(timeout)»
grondilu r: my @a = (^256).roll(1000); my Str $x = [~] map &chr, @a; say @a ~~ $x.ords;
p6eval rakudo ebc730: OUTPUT«True␤»
grondilu Seems ok anyway. 22:26
_edwin -> sleep, bye
grondilu_ nr: say 16.sprintf: "%x" 23:10
p6eval rakudo ebc730: OUTPUT«16␤»
..niecza v22-6-g9e5350d: OUTPUT«Unhandled exception: Unable to resolve method sprintf in type Int␤ at /tmp/jEMNZxleyY line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4198 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4199 (module-CORE @ 574) ␤ at /home…
grondilu_ how do I write an integer in hexadecimal already? 23:12
sorear 0x123 23:13
grondilu_ found it 23:14
r:say 16.base(16) 23:15
?
r: say 16.base(16)
p6eval rakudo ebc730: OUTPUT«10␤»
grondilu sorear: I did not mean a literal 23:17
[Coke] r: say eval ":16({16.base(16)})"
p6eval rakudo ebc730: OUTPUT«Nominal type check failed for parameter '$str'; expected Str but got Int instead␤ in sub unbase at src/gen/CORE.setting:4620␤ in block at eval_0:1␤ in at eval_0:1␤ in sub eval at src/gen/CORE.setting:530␤ in block at /tmp/RzTeHkDZ11:1␤␤»
[Coke] r: say eval ":16~({16.base(16)})" 23:18
p6eval rakudo ebc730: OUTPUT«===SORRY!===␤Malformed radix number␤at eval_0:1␤»
[Coke] r: say eval ":16(~{16.base(16)})"
p6eval rakudo ebc730: OUTPUT«16␤»
dalek ecs: 02ad938 | larry++ | S05-regex.pod:
:ss implies :s too, moritz++
23:41