»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo:, alpha:, pugs:, std:, or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by lichtkind on 5 March 2010.
sorear hmm 00:00
$perl5string ~ $perl5string doesn't work 00:01
because it's defined as our multi sub infix:<~>($a, $b) { 00:02
and the Rakudo multisub dispatcher doesn't conster foreign objects suitable for 'any'
rakudo: multi sub foo($x) { say($x); }; foo(pir::new__PS('String')) 00:03
p6eval rakudo 72f914: OUTPUT«␤»
sorear rakudo: multi sub foo($x) { say($x); }; foo(pir::new__PS('Hash'))
p6eval rakudo 72f914: OUTPUT«No applicable candidates found to dispatch to for 'foo'. Available candidates are:␤:(Any $x)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear rakudo: multi sub foo($x) { say($x); }; say(pir::new__PS('Hash'))
p6eval rakudo 72f914: OUTPUT«Hash[0x53815a8]␤»
sorear rakudo: sub foo($x) { say($x); }; foo(pir::new__PS('Hash'))
p6eval rakudo 72f914: OUTPUT«Null PMC access in invoke()␤current instr.: 'foo' pc 191 (EVAL_1:81)␤... call repeated 1 times␤»
sorear Rakudobug? 00:04
pugssvn r30495 | lwall++ | [Cursor] lexer generator mislaid a bare . pattern so cursor_fate never called it 00:05
r30495 | [Cursor] added .looks_like_cclass method to detect accidental use of P5 ranges
r30495 | [STD] various character classes needed to backslash #
r30495 | [STD] change :tr language to :cc langauge since character classes share it
r30495 | [STD] remove old-school-ish character classes
r30495 | [STD] allow \# in character classes instead of misparsing as unspace
r30495 | [STD] remove unused %*LANG<Trans> 00:06
r30495 | [STD] on invalid - in regex, presume we're in an old-school character class
r30495 | [STD] check a normal regex bracket's innards for old-school character class, and warn if found
r30495 | [STD] use ~ for regex brackets to set $*GOAL correctly
r30495 | [STD] clean up recursive panic detection to avoid both false positives and negatives
r30495 | [STD] don't use 'note' to emit a panic inside a suppose
r30495 | [STD] suppress duplicate sorry messages
r30495 | [STD] sorry no longer uses panic in supposition, but dies directly
00:09 [Coke] left, cosimo left, slavik left, bbkr_ left 00:11 jt left
sjohnson i had some fun programming in Perl today 00:14
sorear 6? 00:15
00:18 [Coke] joined, cosimo joined, slavik joined 00:19 stepnem left 00:22 stepnem joined 00:23 yinyin left, yinyin joined
sjohnson sorear: p5 ... writing some interfaces for git status outputs to make my life easier... 00:29
i'll try out some more p6 soon once i get through all the apocolypses
00:38 rv2733 joined
sjohnson my knowledge of perl is limited to only doing c00l things with p5 00:44
colomon you don't have to get through all the apocalypses, you know. 00:45
sorear the apocalypses are mostly irrelevant now for practical purposes 00:46
they're good if you need a more detailed rationale
although I prefer the flesh version if it's available 00:47
00:48 meppl joined
sjohnson not sure what the most complete p5->p6 transition guide is 00:49
maybe of your helpful ppl can recommend something for me
sorear moritz' 5->6 maybe?
hey, it's even linked from perl6.org 00:50
PerlJam perlgeek.de/blog-en/perl-5-to-6/
mortiz++
oops, my link has an extra slash at the end. 00:51
sjohnson: for specific items, you can ask here when people are active.
sorear , having finished the core functionality in blizkost, goes back to hacking his irc client (which is what needed :from<perl5> in the first place, for DBI, Curses, and POSIX)
which is all the time.
snarkyboojum sorear++ 00:52
00:53 orafu joined
sjohnson thanks 00:56
moritz_: typo on word "Aprili" on latest rakudo moscow news page 00:57
00:59 TiMBuS left
dalek kudo: 3966c62 | (Solomon Foster)++ | src/core/ (2 files):
Straighten out type issues with Real.exp. In the process, add Real * Real, Complex ** Real, and Real ** Complex.
01:17
kudo: 0857098 | (Solomon Foster)++ | src/core/ (2 files):
Remove Complex ** Any and Any ** Complex, as they should no longer be needed. Change Any * Any to convert its arguments to Numeric and call multiply on them then.
pugssvn r30496 | colomon++ | [t/spec] Additional exp tests using mixed argument types. 01:18
sorear hmm 01:24
diakopter hmm
sorear rakudo: sub foo(:$bar) {}; foo("bar" => 1); 01:25
p6eval rakudo 72f914: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤current instr.: 'foo' pc 197 (EVAL_1:80)␤»
sorear Is it possible to pass a named argument with weird characters in p6?
like initial "-" (quite common in perl5 APIs)
diakopter rakudo: my method foo(:$bar) {}; foo("bar" => 1);
p6eval rakudo 72f914: ( no output )
diakopter rakudo: my method foo(:$bar) {}; foo("bar" => 1, "foo" => 2); 01:26
p6eval rakudo 72f914: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤current instr.: 'foo' pc 338 (EVAL_1:133)␤»
diakopter rakudo: my method foo(:$bar) { say $_; }; foo("bar" => 1);
p6eval rakudo 72f914: OUTPUT«Any()␤»
PerlJam wonders what class or object that method belongs to 01:27
sorear diakopter: the pair is being bound to 'self'
PerlJam: none
my method foo( is sugar for my sub foo(self,
except that it's valid syntax
methods in perl 6 are simply subs with a hidden first positional argument 01:28
snarkyboojum sorear: are you working on a Perl 6 port of soric? 01:29
sorear ok now that's just freaky.
soric is the collective code name for three broken prototypes I've played with 01:30
snarkyboojum oh ok
good-o
sorear #4 is being done in perl6 based on several insights from #3
how did you know about soric?
the name, I mean
snarkyboojum github
not terribly hard to find out :)
sorear how did I forget :/
snarkyboojum github lurkers unite! 01:31
sorear anyway, yes
snarkyboojum cool, looks interesting 01:32
sorear #3 was going along nicely until I realized that 90% of my code consisted of emulations of the new .* multicall syntax
at which point I decided to learn perl 6
01:34 ChanServ sets mode: +o diakopter, diakopter sets mode: +ooo sorear PerlJam snarkyboojum
snarkyboojum at which point you decided to help get blizkost going :) 01:34
nice progression :)
01:37 bradb joined
colomon "will review Solomon Foster's Mandlebrot example, especially with regard to performance" -- woot! 01:38
diakopter phenny: tell pmurias I fixed ur buggo
phenny diakopter: I'll pass that on when pmurias is around.
01:38 orafu left
diakopter phenny: tell pmurias by rejiggering the grammar 01:38
phenny diakopter: I'll pass that on when pmurias is around.
01:38 orafu joined
diakopter phenny: tell pmurias good luck :) 01:38
phenny diakopter: I'll pass that on when pmurias is around. 01:39
01:44 dalek left, dalek joined
diakopter phenny: tell masak k, yapsi notifications should work now. it would help if I didn't try to load "/yapsilog.com" from botnix.conf and tried "/yapsi.pm" instead. :/ 01:45
phenny diakopter: I'll pass that on when masak is around.
01:53 sorear left, sorear joined
sorear please don't op me without also giving out an ACL bit 01:55
it... won't last
diakopter heh
we actually don't have access to that :( I need to get TimToady to fill out the freenode form and mail it in 01:56
so that the channel can get registered again and get an actual "founder" 01:57
sorear I'm really looking forward to IPv6 in the US 01:58
and by extension the end of unstable NATs
01:59 Psyche^ joined
diakopter urgh. silly dalek. 02:00
it just missed my code.google.com/p/csmeta/source/detail?r=220 02:01
sorear alternatively, I could simply move to a country with real internet
02:01 eternaleye left
diakopter yapsi: say 5 02:02
perlesque: say(4)
p6eval perlesque: OUTPUT«4␤»
diakopter perlesquel: .
p6eval perlesquel: OUTPUT«Cannot open assembly 'asmbly_1.exe': No such file or directory.␤Command exited with non-zero status 2␤real 0.23␤user 0.01␤sys 0.01␤»
diakopter heh 02:03
02:03 Patterner left, Psyche^ is now known as Patterner
TimToady std: /[a-z]/ 02:04
p6eval std 30496: OUTPUT«===SORRY!===␤Invalid regex metacharacter; for a character class, use <[...]> instead of [...]␤ (and use .. instead of - to indicate a range) at /tmp/0HSYFtJNOt line 1:␤------> /[a-⏏z]/␤Unable to parse bracketed regex at /tmp/0HSYFtJNOt line
..1:␤…
TimToady std: /[aeiou]/
p6eval std 30496: OUTPUT«Potential difficulties:␤ This appears to be an old-school character class; please use <[aeiou]> if you␤ mean a character class, or put whitespace inside like [ aeiou ] to disable␤ this warning at /tmp/r4tAr7xqIJ line 1:␤------> /⏏[aeiou]/␤ok 00:01 108m␤»
PerlJam TimToady++ 02:05
diakopter std: /[ aeiou]/
p6eval std 30496: OUTPUT«Potential difficulties:␤ This appears to be an old-school character class; please use <[ aeiou]> if you␤ mean a character class, or put whitespace inside like [ aeiou ] to disable␤ this warning at /tmp/rF4lulyzxZ line 1:␤------> /⏏[ aeiou]/␤ok 00:01
..108m␤»
diakopter std: /[ aeio u]/
p6eval std 30496: OUTPUT«ok 00:01 108m␤»
diakopter std: /[aeio u]/ 02:06
p6eval std 30496: OUTPUT«Potential difficulties:␤ This appears to be an old-school character class; please use <[aeio u]> if you␤ mean a character class, or put whitespace inside like [ aeio u ] to disable␤ this warning at /tmp/PTnJmJVgN7 line 1:␤------> /⏏[aeio u]/␤ok 00:01
..108m␤»
diakopter std: /[aeio u ]/
p6eval std 30496: OUTPUT«ok 00:01 108m␤»
diakopter heh
TimToady std: /[ \t]/
p6eval std 30496: OUTPUT«ok 00:01 109m␤»
TimToady hmm, that one didn't work
diakopter std: /[ \\t]/
TimToady supposed to recommend \h
p6eval std 30496: OUTPUT«ok 00:01 108m␤»
02:06 wknight8111 left
diakopter std: /[ \\\t]/ 02:06
p6eval std 30496: OUTPUT«ok 00:01 108m␤»
TimToady std: /[ ]/
diakopter std: /[\t ]/
p6eval std 30496: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/qXb0RC3H5V line 1:␤------> /[ ⏏]/␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/qXb0RC3H5V line 1:␤------> /[⏏ ]/␤Can't call method "_REDUCE" on
..unbl…
std 30496: OUTPUT«ok 00:01 108m␤» 02:07
PerlJam std: /[\t ]/
p6eval std 30496: OUTPUT«ok 00:01 108m␤»
diakopter std: /[\t]/
p6eval std 30496: OUTPUT«ok 00:01 108m␤»
diakopter std: /[ t]/
02:07 isBEKaml left
p6eval std 30496: OUTPUT«Potential difficulties:␤ This appears to be an old-school character class; please use <[ t]> if you␤ mean a character class, or put whitespace inside like [ t ] to disable␤ this warning at /tmp/29NyFiT1G9 line 1:␤------> /⏏[ t]/␤ok 00:01 108m␤» 02:07
diakopter std: /[ t ]/
p6eval std 30496: OUTPUT«ok 00:01 108m␤»
TimToady std: /[\n]/ 02:08
p6eval std 30496: OUTPUT«ok 00:01 108m␤»
TimToady hmm
PerlJam TimToady: is { $a = 5; say $a; my $a } correct and analogous to { foo; sub foo { say "hi" } } ?
rakudo: { $a = 5; say $a; my $a }
p6eval rakudo 085709: OUTPUT«5␤»
PerlJam rakudo: { foo; sub foo { say "hi" } }
p6eval rakudo 085709: OUTPUT«hi␤»
02:09 bradb left 02:10 ash__ joined 02:11 ash__ left
diakopter rakudo: { our sub foo { say "hi" } }(foo) 02:11
p6eval rakudo 085709: OUTPUT«hi␤»
02:12 cdarroch left
diakopter whimpers 02:12
er, simpers
TimToady PerlJam: no
diakopter std: { $a = 5; say $a; my $a } 02:13
p6eval std 30496: OUTPUT«===SORRY!===␤Variable $a is not predeclared at /tmp/2WwonoU5ya line 1:␤------> { $a⏏ = 5; say $a; my $a }␤Variable $a is not predeclared at /tmp/2WwonoU5ya line 1:␤------> { $a = 5; say $a⏏; my $a }␤Check failed␤FAILED 00:01
..1…
pugssvn r30497 | colomon++ | [t/spec] Unfudge a bunch of comb tests which now work.
colomon 31740 passing tests now.
dalek kudo: ed321b4 | (Solomon Foster)++ | src/core/Cool-str.pm:
Fix comb version of the match with take bug fixed earlier today in split.
02:15
PerlJam TimToady: this is what I expected but, then I also tended to expect { XXX; my XXX } in general to carp. Would it be safe to say that it only carps if XXX is a variable?
TimToady only functions may be post-declared 02:16
sorear it's kinda like ANSI C
when an undeclared function is seen, a declaration is automatically generated assuming that it has listop precedence
so in the common case, postdeclaring works 02:17
TimToady well, all C functions are global, to the first approximation, and the call syntax is relatively unambiguous
sorear Haskell allows postdeclaration of functions with /any/ precedence
which makes the parsing algorithm completely insane 02:18
TimToady probably forces multiple passes
diakopter murmurs about the insanity defense of accusations of insanity
PerlJam I understand it, but my brain isn't accepting it for some reason. I used to think that "my XXX" meant than XXX existed from that point forward to the end of the inner-most enclosing scope. Having functions not do that *and* be lexical is bothersome
s/than/that/ 02:19
sorear for a long time I thought it was undecidable, but eventually I came up with an EXPTIME algorithm which tentatively assigns each possible combination of precedences before trying to parse
TimToady meeting &
sorear TimToady: In practice, yes
diakopter std: foo(); { our sub foo { say "hi" } };
p6eval std 30496: OUTPUT«ok 00:01 108m␤»
sorear TimToady: In theory, the language is not sufficiently self-synchronizing for a multi-pass parser to work
but the heuristics work ok on real code 02:20
diakopter nobody's created types whose dependency knots can't be untangled?
sorear diakopter: there are only a finite number of possible untanglings, and you can just check each one for consistency 02:22
02:22 meppl left
diakopter ok. 02:22
02:28 lest_away is now known as lestrrat 02:38 bradb joined 02:45 bradb left
dalek kudo: e16cf45 | duff++ | tools/contributors.pl:
[tools] fix typo and output sorted keys
02:55
02:58 JimmyZ joined 03:10 ingy left, ingy joined 03:13 plobsing_ left 03:17 ingy left 03:20 _jaldhar joined, ingy joined 03:33 ingy left 03:37 crythias joined 03:47 ingy joined 03:49 molaf joined 03:51 rv2733 left 03:52 jaldhar_ joined, ingy left, _jaldhar left
dalek meta: r221 | diakopter++ | trunk/Sprixel/ (5 files):
[perlesque] lots o' fixes :)
04:04
04:14 bradb joined 04:18 snarkyboojum left 04:26 mikehh_ joined 04:27 mikehh left
dalek meta: r222 | diakopter++ | trunk/Sprixel/ (4 files):
[perlesque] more fixes. stopped using the trampoline for now.
04:38
04:40 snarkyboojum joined, ingy joined, stephenlb left
diakopter phenny: tell pmurias I can re-enable the trampoline when a possibly-recursive invocation is detected, but the addl cost will be another slot for the return value per callsite in each recursive frame. 04:40
phenny diakopter: I'll pass that on when pmurias is around.
diakopter that, and I didn't want to have to implement that additional callsite-slot generation tonight :D 04:41
phenny: tell pmurias that, and I didn't want to have to implement that additional callsite-slot generation tonight :D
phenny diakopter: I'll pass that on when pmurias is around. I'll have to use a pastebin, though, so your message may get lost.
diakopter phenny: bleh 04:42
sorear What 04:43
phenny: help
phenny sorear: Hi, I'm a bot. Say ".commands" to me in private for a list of my commands, or see inamidst.com/phenny/ for more general details. My owner is sbp.
04:44 alester joined
sorear ah 04:45
phenny keeps all messages, but pastes any after 4 04:46
using paste.lisp.org and a hardcoded captcha
sorear plugs App::Nopaste
04:51 jaldhar_ left 04:53 ash__ joined 04:54 ash__ left 04:56 jaldhar_ joined 05:01 _jaldhar_ joined, jaldhar_ left 05:03 ReiniUrban joined 05:04 rurban left, ReiniUrban is now known as rurban
diakopter sorear: "What"? 05:04
sorear diakopter: phenny's comment about a pastebin 05:05
diakopter oh 05:08
actually... 05:11
05:16 bradb left 05:21 meppl joined 05:29 [particle]1 joined
dalek meta: r223 | diakopter++ | trunk/Sprixel/ (3 files):
more parsing fixes.
05:37
05:38 redicaps joined, molaf left
diakopter sorear: around? 05:41
05:41 agentzh joined
diakopter I added a "frame" keyword that snags a ref to the current frame :) 05:42
sorear cute. 05:44
sorear remembers implementing closures in Pascal using frame pointers and horrible function reference casting 05:45
snarkyboojum just discovered cd ~- in bash 05:47
05:48 [particle]1 left
moritz_ good morning 05:50
snarkyboojum oh it's just cd -
diakopter zugh
snarkyboojum :|
05:50 alester left
snarkyboojum mortiz_ o/ 05:50
moritz_ o/
:)
moritz_ diakopter: like &?BLOCK?
\o
diakopter maybe 05:51
what does &?BLOCK? mean
05:51 [particle] left, bradb joined
moritz_ &?BLOCK is the reference to the current block 05:52
diakopter what does "block" mean.. (what can you do with it?) 05:53
05:53 kaare joined
moritz_ block = { ... } 05:53
you can store it, invoke it, introspect it 05:54
05:54 kaare is now known as Guest64263
sorear kinda like RECURSE in FORTH? 05:55
diakopter the keyword I added is "the instance of the current block that represents *this*execution* of the current block, including all locals"
sorear diakopter: in parrotland we call those CallContexts
moritz_ and in Perl 6 callframe 05:56
(though it's a bit more general)
diakopter ok
what can you do with a Perl 6 callframe?
05:58 viklund joined
moritz_ search outwards, obtain file and line number etc 05:58
see S06/The callframe and caller functions/
diakopter is reminded of "what do you get when you guzzle down sweets?" 06:01
viklund "...Eating as much as an elephant eats"
snarkyboojum would be cool to see Perl 6 on this list emerginglangs.com/speakers/ :) 06:03
and/or Parrot :)
diakopter parrot ain't a language 06:04
snarkyboojum true, but as an emerging VM :P
they're keen to see VM people there too apparently 06:05
diakopter Yeah, I guess since PyPy & Cola are on there. 06:08
sorear Do we *want* to be associated with that crowd?
diakopter TimToady said that a whole conference-long track dedicated to Perl is enough... and that Perl isn't an emerging language 06:09
snarkyboojum it's not?
ok then
what crowd is that sorear? 06:10
diakopter the in-your-face lets-debate-whose-favorite-language-is-better crowd? 06:11
sorear yes 06:15
snarkyboojum I didn't think that's what this was about - perhaps I'm just naive :)
avar the speakers don't sound like the sort that'll be "lets-debate-whose-favorite-language-is-better"
e.g. Rich Hickey and Rob Pike 06:16
diakopter not the speakers; the attendees :P
snarkyboojum diakopter: programmers will do that regardless won't they? :) 06:17
avar I think you're being too pessamistic
06:17 szabgab left
avar Anyway, would be nice to have Perl 6 there too 06:17
06:17 uniejo joined
dalek ok: 971d45f | moritz++ | src/subs-n-sigs.pod:
[subs] make that parameter named
06:22
06:24 szabgab joined 06:30 crythias left 06:32 iblechbot joined, redicaps left 06:33 kst left, kst joined
dalek psi: 133495c | snarkyboojum++ | t/runtime.t:
Test to ensure blocks at the same level as variable definitons don't
06:57
07:07 stepnem left 07:20 bradb left 07:28 snarkyboojum left 07:31 eternaleye joined
sorear It might be an interesting project to look through MooseX::* on CPAN and see how many apply to Perl6 07:33
JimmyZ Heh 07:38
07:41 snarkyboojum joined
sorear moose has actually diverged quite a bit from perl6 07:44
we might need to start stealing stuff from them - they've got some cool bits like variable attribute representations 07:45
viklund how much of the divergence is bacause of adjustments to how perl5 works and how much is divergence from discovering "best practices", would be interesting to know... 07:46
what is variable attribute representations? 07:47
moritz_ sorear: re named arguments with weird names: you can always do foo(|%h)
sorear: where %h can has arbitrary keys 07:48
moritz_ backlogs
Herve++ posted an interesting comment on my blog 07:55
he suggested to change the triangle form of reduce from [\+] to [@+]
with the rationale that @ indicates a list-ish return type 07:56
I wonder if we could even change to that @[+] to disambiguate infix operators starting with @
TimToady: what do you think about that? (when you backlog :-) 07:57
sorear viklund: in perl6, attributes are just variables. in Moose, attributes have a meta object with overridable accessor code 08:01
so you can have attributes that do fancy things when written to, etc
moritz_ you can have that too in Perl 6 08:02
sorear moritz_: You could hear that behind the noise of "OMGZ METAOPS ARE WRITE ONLY"?
viklund ahh, yes I knew that, just hadn't heard the phrase before...
moritz_ if you use a modified storage backend
viklund sorear: thx
moritz_ sorear: I try hard to focus on the constructive part of the critic
sorear I think the divergence is because the Moose cabal has given up on Perl 6 and decided to drop all connection with the Synopses
08:02 bbkr_ joined
sorear but then I'm just a cynic 08:02
moritz_ sorear: for sure the Moose folks chose whatever fits best for Perl 5 08:03
sorear moritz_: can you give me a short code sample for that? 08:04
moritz_ sorear: and introducing $!foo variables isn't easy in Perl 5 at all :-)
sorear: no
it would have to be some sort of object being passed as the REPR to YourClass.bless 08:05
which has FETCH and STORE methods
sorear $!foo is hard-wired to access the object representation
moritz_ that do the fancy stuff
yes, but the object representation isn't hard wired
sorear with pervasive accessors, you get an extra layer of indirection
which makes this absolutely trivial
has 'foo' => ( trigger => $SUB )
just sets an attribute on the attribute
which changes code generation 08:06
08:06 bbkr_ left
sorear I'm not following the Perl 6 idea of "our approach must be better because it uses $! variables" 08:06
moritz_ well, you can still use lvalue accessors if that's what you want
and don't use the $!foo variables at all 08:07
just like you can also use $self->{foo} in Moose, if you want (iirc)
08:08 snarkyboojum left
sorear how does an lvalue accessor do anything interesting? 08:09
the only way to make lvalues 'interesting' is to tie them
does perl 6 discard the taboo against ties?
moritz_ I'm not sure; it's something I forget everytime I read it up because nobody implements it yet
should be in S06 somewhere 08:10
sorear Why isn't it trivial?
moritz_ ask @Larry :-) 08:11
I have no idea
I can't remember how lvalue subroutines work in perl 5 either 08:12
JimmyZ rakudo: say [\+] 1..* 08:13
p6eval rakudo e16cf4: ( no output )
JimmyZ rakudo: say [\+] 1..5
p6eval rakudo e16cf4: OUTPUT«1361015␤»
JimmyZ rakudo: say [\,] 1..5 08:14
p6eval rakudo e16cf4: OUTPUT«11 21 2 31 2 3 41 2 3 4 5␤»
JimmyZ rakudo: say [\, ] 1..5
p6eval rakudo e16cf4: OUTPUT«You can't backslash that at line 11, near ", ] 1..5"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
JimmyZ rakudo: say ([\,] 1..5).perl 08:15
p6eval rakudo e16cf4: OUTPUT«(1, (1, 2), ((1, 2), 3), (((1, 2), 3), 4), ((((1, 2), 3), 4), 5))␤»
JimmyZ rakudo: say [@,] 1..5
p6eval rakudo e16cf4: OUTPUT«Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
JimmyZ rakudo: say @[,] 1..5
p6eval rakudo e16cf4: OUTPUT«Unable to parse postcircumfix:sym<[ ]>, couldn't find final ']' at line 11␤current instr.: 'perl6;Regex;Cursor;FAILGOAL' pc 1664 (ext/nqp-rx/src/stage0/Regex-s0.pir:907)␤»
moritz_ std: @[+] 1, 2, 3
p6eval std 30497: OUTPUT«===SORRY!===␤Non-declarative sigil is missing its name at /tmp/GLM74EhuSg line 1:␤------> <BOL>⏏@[+] 1, 2, 3␤Bogus statement at /tmp/GLM74EhuSg line 1:␤------> @⏏[+] 1, 2, 3␤ expecting twigil␤Parse failed␤FAILED 00:01
..109m␤»
moritz_ hm 08:16
might be sufficienlty distinct from existing syntax
JimmyZ -1 08:18
moritz_ JimmyZ: why?
JimmyZ [] means array, I don't think need @ again.
moritz_ but [+] doesn't return an Array either 08:19
here the [...] means more "operate on a list", not "return a list"
JimmyZ it mean [] deals with array, not return array 08:20
that is , it's args should be array. 08:21
std: {+} 'f' => 1, 'd' => 2; 08:22
p6eval std 30497: OUTPUT«===SORRY!===␤Prefix requires an argument at /tmp/484Obkwpot line 1:␤------> {+⏏} 'f' => 1, 'd' => 2;␤Parse failed␤FAILED 00:01 108m␤»
JimmyZ rakudo: [+] @('3' => 1, '4' => 2); 08:23
p6eval rakudo e16cf4: OUTPUT«Method 'Num' not found for invocant of class 'Pair'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
JimmyZ std: [+] @('3' => 1, '4' => 2);
p6eval std 30497: OUTPUT«ok 00:01 109m␤»
08:25 kst left, kst joined 08:28 ive joined
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Num() { ~$.value;} }; say [+] @('3' => 1, '4' => 2); 08:29
p6eval rakudo e16cf4: OUTPUT«3␤»
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Num() { ~$.value;} }; say [\+] @('3' => 1, '4' => 5);
p6eval rakudo e16cf4: OUTPUT«3 16␤»
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Num() { ~$.value;} }; say ([\,] @('3' => 1, '4' => 5)).perl;
p6eval rakudo e16cf4: OUTPUT«("3" => 1, ("3" => 1, "4" => 5))␤»
moritz_ JimmyZ: try method Numeric, not Num 08:30
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Numeric() { ~$.value;} }; say ([\,] @('3' => 1, '4' => 5)).perl;
p6eval rakudo e16cf4: OUTPUT«("3" => 1, ("3" => 1, "4" => 5))␤»
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Numeric() { ~$.value;} }; say [+] @('3' => 1, '4' => 2);
p6eval rakudo e16cf4: OUTPUT«Method 'Num' not found for invocant of class 'Pair'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
moritz_ hum.
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Num() { ~self;} }; say ([\,] @('3' => 1, '4' => 5)).perl; 08:31
p6eval rakudo e16cf4: OUTPUT«("3" => 1, ("3" => 1, "4" => 5))␤»
moritz_ colomon: it seems that infix:<+> still uses .Num instead of .Numeric
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Num() { ~self;} }; say ([\+] @('3' => 1, '4' => 5)).perl;
p6eval rakudo e16cf4: OUTPUT«("3" => 1, 7)␤»
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Num() { ~$.value;} }; say ([\+] @('3' => 1, '4' => 5)).perl;
p6eval rakudo e16cf4: OUTPUT«("3" => 1, 6)␤»
08:31 vorner left
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Num() { ~$.value;} }; say ([\,] @('3' => 1, '4' => 5)).perl; 08:31
p6eval rakudo e16cf4: OUTPUT«("3" => 1, ("3" => 1, "4" => 5))␤»
JimmyZ what's the different between self and $.value? 08:32
moritz_ self is the whole pair
but in the example above, you're not doing anything that would caause a call to Num 08:33
JimmyZ using [\,] are the same result, but [\+] not the same result 08:34
moritz_ sure; [\,] has no reason to treat its arguments as numbers 08:35
JimmyZ Oh, so it is.
rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~$.value;} }; say ([\,] @('3' => 1, '4' => 5)).perl; 08:36
p6eval rakudo e16cf4: OUTPUT«("3" => 1, ("3" => 1, "4" => 5))␤»
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say ([\,] @('3' => 1, '4' => 5)).perl;
p6eval rakudo e16cf4: OUTPUT«("3" => 1, ("3" => 1, "4" => 5))␤»
moritz_ it doesn't really call any method on object
JimmyZ so I don't like [@,] @('3' => 1, '4' => 5) or @[,] @() 08:38
that's duplicate semanteme
moritz_ there's no reason for the second @(...) at all 08:39
JimmyZ I mean @[] or [@] is duplicate semanteme ;)
just in my opinion 08:40
moritz_ and I disagree, becaue the @ is about the return value and [] is about the arguments
this is just like saying "I don't like our Num sub sqrt(Num $x) { ... } because Num appears twice" 08:41
but they serve different purposes
JimmyZ I don't think operaters need return type .
moritz_ well, I guess liking and disliking can't always be rationalized
JimmyZ: they don't, in general, but in the case of triangle reduction we need *something* to distinguish it from the non-triangle form 08:42
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say [\,] '3' => 1, '4' => 5; 08:43
p6eval rakudo e16cf4: ( no output )
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say ([\,] '3' => 1, '4' => 5);
p6eval rakudo e16cf4: ( no output )
moritz_ oh
I think that's a bug
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say [\,] ('3' => 1, '4' => 5);
p6eval rakudo e16cf4: ( no output )
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say [\,] @('3' => 1, '4' => 5);
p6eval rakudo e16cf4: ( no output )
moritz_ oh 08:44
I know why
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Num() { ~self;} }; say [\,] '3' => 1, '4' => 5;
p6eval rakudo e16cf4: OUTPUT«3 13 1 4 5␤»
moritz_ you're causing an infinite recursion
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Num() { ~self;} }; say [\+] '3' => 1, '4' => 5;
p6eval rakudo e16cf4: OUTPUT«3 17␤»
moritz_ because prefix:<~> calls .Str under teh hood
08:45 dual left
JimmyZ >rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say ([\,] @('3' => 1, '4' => 5)).perl; 08:45
rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say ([\,] @('3' => 1, '4' => 5)).perl;
p6eval rakudo e16cf4: OUTPUT«("3" => 1, ("3" => 1, "4" => 5))␤»
08:45 dual joined
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say [\,] '3' => 1, '4' => 5; 08:46
p6eval rakudo e16cf4: ( no output )
JimmyZ rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say ([\,] '3' => 1, '4' => 5).perl;
p6eval rakudo e16cf4: OUTPUT«("3" => 1, ("3" => 1, "4" => 5))␤»
JimmyZ it's strange 08:47
moritz_ I've explained it above
JimmyZ moritz_: yes, thanks
rakudo: use MONKEY_TYPING; augment class Pair { method Str() { ~self;} }; say ([\,] '3' => 1, '4' => 5).Str; # wrong thing 08:48
p6eval rakudo e16cf4: OUTPUT«maximum recursion depth exceeded␤current instr.: 'parrot;P6object;HOW' pc 54 (runtime/parrot/library/P6object.pir:98)␤»
08:49 meppl left 08:53 dakkar joined, spinclad left 08:58 mikehh_ is now known as mikehh, mikehh left 08:59 mikehh joined
sorear Who gets the blame for PseudoPod and POD6 being nearly identical? 09:05
moritz_ Damian and p6l 09:06
09:07 slavik1 joined
slavik1 rakudo: class MyClass { has $.val is rw; }; my @list = MyClass.new xx 5; say @list.perl; 09:07
p6eval rakudo e16cf4: OUTPUT«[MyClass.new(), MyClass.new(), MyClass.new(), MyClass.new(), MyClass.new()]␤»
slavik1 rakudo: class MyClass { has $.val is rw; }; my @list = MyClass.new xx 5; say @list.$val; 09:08
p6eval rakudo e16cf4: OUTPUT«Symbol '$val' not predeclared in <anonymous>␤current instr.: 'perl6;PCT;HLLCompiler;panic' pc 152 (compilers/pct/src/PCT/HLLCompiler.pir:108)␤»
slavik1 rakudo: class MyClass { has $.val is rw; }; my @list = MyClass.new xx 5; say @list.val;
p6eval rakudo e16cf4: OUTPUT«Method 'val' not found for invocant of class 'Array'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear rakudo: role A { multi method handler() { say "Foo!" }; }; role B { multi method handler() { say "Bar!" }; }; class C does A does B { }; C.new.*handler;
p6eval rakudo e16cf4: OUTPUT«Method 'handler' collides and a resolution must be provided by the class␤current instr.: 'perl6;Perl6;Metamodel;RoleToClassApplier;_block132' pc 9253 (src/gen/RoleToClassApplier.pir:306)␤»
sorear Opinion: this should be legal 09:09
slavik1 rakudo: class MyClass { has $.val is rw; does p { say 1; } }; my $list = MyClass.new; $list.p;
p6eval rakudo e16cf4: OUTPUT«Could not find sub &p␤current instr.: 'perl6;MyClass;_block46' pc 370 (EVAL_1:150)␤»
slavik1 rakudo: class MyClass { has $.val is rw; method p { say 1; } }; my $list = MyClass.new; $list.p; 09:10
p6eval rakudo e16cf4: OUTPUT«1␤»
slavik1 how do I access a class variable ?
$class.$.var ?
sorear classes don't have variables
slavik1 attributes?
sorear Still not sure what you mean 09:11
Unless
rakudo: class MyClass { has $.val is rw }; my $list = MyClass.new; $list.val = 5; say $list.val;
slavik1 class a { has $.blah } ... how do I access that $.blah?
p6eval rakudo e16cf4: OUTPUT«5␤»
jnthn slavik1: The generated accessor method is just called blah 09:12
slavik1 wtf ...
sorear $.val is sugar for self.val
slavik1 ok, I think I see it
moritz_ rakudo: class A { has $.blah; method buh { say $.blah } }; A.new(blah => "fasel").buh
p6eval rakudo e16cf4: OUTPUT«fasel␤»
sorear does anyone here have a position on that roles thing? 09:13
slavik1 rakudo: class MyClass { has $.val is rw; method inc { $.val++; } }; my @list = MyClass.new(val => 1) xx 5; say @list.per;;
p6eval rakudo e16cf4: OUTPUT«Method 'per' not found for invocant of class 'Array'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
sorear is trying to implement an event framework in perl 6
slavik1 rakudo: class MyClass { has $.val is rw; method inc { $.val++; } }; my @list = MyClass.new(val => 1) xx 5; say @list.perl;
p6eval rakudo e16cf4: OUTPUT«[MyClass.new(), MyClass.new(), MyClass.new(), MyClass.new(), MyClass.new()]␤»
slavik1 rakudo: class MyClass { has $.val is rw; method inc { $.val++; } }; my @list = MyClass.new(val => 1) xx 5; say @list.val; 09:14
p6eval rakudo e16cf4: OUTPUT«Method 'val' not found for invocant of class 'Array'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
slavik1 rakudo: class MyClass { has $.val is rw; method inc { $.val++; } }; my @list = MyClass.new(val => 1) xx 5; @list.val;
p6eval rakudo e16cf4: OUTPUT«Method 'val' not found for invocant of class 'Array'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
slavik1 wait ...
how do I get the same method to get invoked for a list of classes?
this was in spec I believe 09:15
sorear: that looks like the diamond of death
sorear: which one should be invoked in that sutation?
sorear slavik1: Both of them. .* means "ignore the usual type dispatch rules and just invoke all applicable methods in some order" 09:17
JimmyZ rakudo: augment class Pair { method Str() { ~self;} };
p6eval rakudo e16cf4: OUTPUT«Can't augment class Pair without 'use MONKEY_TYPING'␤current instr.: 'perl6;Perl6;Grammar;add_name' pc 42212 (src/gen/perl6-grammar.pir:374)␤»
sorear The kicker is that it *is* the diamond of death in the absense of .*
JimmyZ rakudo: augment class Paiir { method Str() { ~self;} };
p6eval rakudo e16cf4: OUTPUT«Can't augment class that doesn't exist␤current instr.: 'perl6;Perl6;Grammar;add_name' pc 42212 (src/gen/perl6-grammar.pir:374)␤»
jnthn sorear: On the role/multi thing, maybe it should work. I suspect if you write a proto in the class it will work. 09:18
slavik1 sorear: oh, nice
perl6++
sorear rakudo: role A { proto method handler(); multi method handler() { say "Foo!" }; }; role B { multi method handler() { say "Bar!" }; }; class C does A does B { }; C.new.*handler; 09:19
slavik1 can a class know it's own runtime type/name?
p6eval rakudo e16cf4: OUTPUT«Malformed method at line 11, near "handler();"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
sorear rakudo: role A { proto method handler() { ... }; multi method handler() { say "Foo!" }; }; role B { multi method handler() { say "Bar!" }; }; class C does A does B { }; C.new.*handler;
p6eval rakudo e16cf4: OUTPUT«Method 'handler' collides and a resolution must be provided by the class␤current instr.: 'perl6;Perl6;Metamodel;RoleToClassApplier;_block132' pc 9253 (src/gen/RoleToClassApplier.pir:306)␤»
slavik1 so that it would be possible to do what sorear is doing but also output from what class the method is inherited?
sorear jnthn: Well, I don't want the class to know the names of all legal event names.
09:22 pmurias joined
pmurias hi 09:22
phenny pmurias: 01:38Z <diakopter> tell pmurias I fixed ur buggo
pmurias: 01:38Z <diakopter> tell pmurias by rejiggering the grammar
jnthn sorear: Yeah, good point.
phenny pmurias: 01:38Z <diakopter> tell pmurias good luck :)
pmurias: 04:40Z <diakopter> tell pmurias I can re-enable the trampoline when a possibly-recursive invocation is detected, but the addl cost will be another slot for the return value per callsite in each recursive frame.
[Sorry, some messages were elided and lost...]
pmurias why are messages elided? 09:23
jnthn sorear: I think it's maybe a grey area in the spec, though I'd like it to work.
sorear because phenny tried to paste the remainder to paste.lisp.org with an outdated captcha key
it should just be using App::Nopaste
jnthn: I don't like it all that much because if I misspell an event, nothing will warn me. 09:24
However, my options are rather limited by Rakudo's limited support for the MOP
I think for now I'll just give my methods names like _handler_FOO_uniquey() and rely on introspection for event dispatch 09:27
With an eye towards moving to a macro & trait based system in the future
slavik1 if anyone cares, I had my phone HR phone screen with google ... if luck is on our side, there will be a Perl6 binding for MapReduce :) 09:28
sorear Is that better than » ?
pmurias >> is just map 09:30
and MapReduce is intended for distributed things while >> is for concurrency on a single box
slavik1 pmurias: err? 09:31
pmurias sorear: you asked if MapReduce was better than »? 09:32
sorear yes 09:34
[] too
09:35 masak joined
masak oh hai, #Perl6 09:35
phenny masak: 01:45Z <diakopter> tell masak k, yapsi notifications should work now. it would help if I didn't try to load "/yapsilog.com" from botnix.conf and tried "/yapsi.pm" instead. :/
masak wtf ;)
moritz_ good morning masak 09:36
I've already seen a notification for a yapsi commit
masak ah. snarkyboojum++ 09:37
jnthn oh hai masak 09:38
pmurias std: CALLER 09:42
p6eval std 30497: OUTPUT«===SORRY!===␤Undeclared name:␤ 'CALLER' used at line 1␤Check failed␤FAILED 00:01 109m␤»
pmurias std: CALLER::<$foo>
p6eval std 30497: OUTPUT«ok 00:01 107m␤»
pmurias std: CALLER::
p6eval std 30497: OUTPUT«ok 00:01 107m␤»
09:43 riffraff joined 09:44 ive left, ive joined
sorear #70469 #73034 are duplicates 09:46
also, why do we do this?
it seems like a premature optimization
it's been bugrepped three times.
(this = omitting the pir::newclosure before pir::capturelex in nested sub definitions) 09:47
09:47 ive left, ive joined
moritz_ sorear: last time somebody (=pmichaud) tried to fix it, spectest broke horribly. I have no idea what his fix was, though 09:48
sorear: if you have a patch that fixed it and doesn't break spectest, please share :-) 09:49
09:56 gurjeet_ joined
masak merges #73034 into #70469 09:57
sorear spectest is still /checking out/
rakudo: my @x; my $n; for @x.grep(rx/^ _handler_ $n/) -> $handler { $handler() } 09:58
p6eval rakudo e16cf4: ( no output )
sorear rakudo: my @x; my $n; for @x.grep(rx/^ _handler_ $n/) -> $handler { $handler(2, 3) }
p6eval rakudo e16cf4: ( no output )
sorear oh
moritz_ @x being empty, and all that
09:59 _jaldhar_ left, gurjeet left
sorear moritz_: rakudo was locally generating an error at compile time 09:59
09:59 gurjeet_ is now known as gurjeet
sorear however, %_ was bound in lexical scope 09:59
09:59 _jaldhar_ joined
sorear and I just remembered that was a known bug 09:59
10:00 stepnem joined
colomon moritz_: re [+] using Num ... yes, the grand Numeric conversion definitely isn't done yet. :) 10:00
sorear Method 'perl' not found for non-object
current instr.: 'trait_mod:<does>' pc 291390 (src/Perl6/Compiler.pir:112)
yikes
moritz_ colomon: ok
sorear: some error messages contain .perl output...
10:00 simcop2387 joined
moritz_ sorear: maybe it's throwing an error while trying to build an error message 10:01
10:01 slavik1 left
jnthn Sounds like it. 10:01
colomon moritz_: BTW, I did fix the split bug yesterday, so the subst call from SVG.pm should work now. 10:02
pmurias what's the state of APL on parrot? (i'm currently reading "A Programming Language")
jnthn (I know there's a fallback multi for that trait mod that gives an error.)
sorear s/module/role/ in the role's definition fixed it. 10:03
moritz_ colomon: thanks, I'll try once rakudo compilation is finished
pugssvn r30498 | pmurias++ | [mildew] fix the building of CORE (one test fails) 10:04
moritz_ colomon++ 10:08
and indeed, SVG.pm seems to work fine with master now
masak \o/ 10:09
moritz_ now on to SVG::Plot
jnthn \o/
moritz_ Method 'Num' not found for invocant of class 'Block'
jnthn Whatever. 10:10
moritz_ that sound suspiciously like Whatever-currying
colomon indeed.
moritz_ :style("fill:{ @.colors[$d % *] }"),
rakudo: <a b c>[-> $x { $x - 1 }] 10:11
p6eval rakudo e16cf4: OUTPUT«Method 'Int' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
moritz_ rakudo: say (24 % *).(5) 10:12
p6eval rakudo e16cf4: OUTPUT«Method 'Num' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
sorear rakudo: class Foo { }; my $name = 'xyzzy'; Foo.^methods(:local);
p6eval rakudo e16cf4: ( no output )
sorear rakudo: class Foo { }; my $name = 'xyzzy'; Foo.^methods(:local); 10:13
p6eval rakudo e16cf4: ( no output )
sorear is p6eval mangling lexicals?
moritz_ it should not... why do you think it does? 10:14
rakudo: say log10(100)
p6eval rakudo e16cf4: OUTPUT«2␤»
sorear moritz_: rakudo 082caee local blows up on that code. 10:15
moritz_ why do I get an error that &log10 wasn't found?
sorear if you rename or remove $name, it works.
moritz_ oh, I remember diakopter hacking something in for safe mode... don't know if that's still active 10:16
sorear can someone with an unpatched rakudo, ideally 082caee, tell me if I'm insane/
make spectest is running 3 simultaneous rakudo processes 10:17
how do I stop it?
moritz_ Ctrl+C
sorear I have 1 core are < 3*RakudoHeap RAM
*and
moritz_ exprot TEST_JOBS=1 10:18
sorear: my build of rakudo HEAD doesn't blow up on class Foo { }; my $name = 'xyzzy'; Foo.^methods(:local); 10:19
if that's what you wanted to know
10:19 ruoso left
moritz_ \o/ SVG::Plot now working on master 10:19
colomon moritz_++ 10:20
moritz_ just three changed lines 10:21
colomon hey, you ++'d me for fixing split, and that was just changing one line and adding another. 10:23
moritz_ I wasn't trying to dminish my fixes, just wanted to tell you that master was working pretty well :-) 10:24
colomon :)
avar does rakudo have an sqlite interface?
moritz_ avar: masak wrote "Squerl" which uses sqlite... no idea how well it works 10:25
std: s[foo];
p6eval std 30497: OUTPUT«===SORRY!===␤Missing assignment operator at /tmp/SfWppLSxKr line 1:␤------> s[foo]⏏;␤ expecting quantifier␤Parse failed␤FAILED 00:01 111m␤»
sorear just use DBD::SQLite
avar sorear: maybe if you make your patches public :) 10:26
sorear I did.
avar oh, where is it?
sorear Rakudo master.
A one-line bugfix which allows you to write 'DBI' instead of '::DBI' is still waiting on jnthn though 10:27
moritz_ avar: and blizkost is in the blizkost repo :-)
moritz_ currently spectests a patche that implements rx{...} (as opposed to rx/.../) 10:28
avar sorear: what are the relevant commits/tests?
or example program :)
sorear Blizkost can currently marshal hashes, strings, numbers, coderefs, and arrays(arguments only)
jnthn rakudo: s[foo]; 10:29
p6eval rakudo e16cf4: OUTPUT«Missing assignment operator at line 11, near ";"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
sorear avar: examples/ in github.com/jnthn/blizkost
moritz_ jnthn: I've just seen the error message in rakudo, and wondered if we should add "after s[...]", but decided that we don't need to more awesome than STD.pm
avar sorear: You you patched blizkost but didn't create some new project? 10:30
ah, right, thought it was some new glue
sorear avar: I more or less took over blizkost. It is my new project
moritz_ and I think jnthn is glad somebody else takes care :-) 10:31
avar cool:)
I was going to test out rewriting Hailo in Perl 6, but I was always blocking on "oh that'll be a total PITA without modules" :)
jnthn is *very* glad somebody else is taking care of Blizkost. sorear++ 10:32
sorear There's a very good chance I'll need to implement arrayref and undef returns before DBI works fully 10:33
however, you can do stuff like my &p5defined = eval ("sub { defined $_[0] }", :lang<perl5>); 10:34
10:34 ive left
avar Right, or implement a glue module on the p5 side 10:34
10:34 yinyin left
avar w 8 10:36
10:38 JimmyZ left
avar sorear: patch: github.com/avar/blizkost/commit/49b...031f049b25 :) 10:39
10:42 am0c joined
masak Squerl should still work under alpha. probably not under master without some modifications. 10:45
10:59 rv2733 joined
m6locks crap. i got only master 10:59
11:09 Su-Shee joined 11:15 am0c left 11:17 agentzh left 11:23 takadonet left
masak huh. Python has combinations() and permutations() built in: docs.python.org/library/itertools.html 11:27
Su-Shee the doc say it's a module. 11:28
hi all.
avar Will Perl 6 have batteries ?:)
sorear: It's part of the stdlib
pugssvn r30499 | moritz++ | [t/spec] unfudge passing split :all tests, colomon++ 11:29
masak Su-Shee: I think it's one of them 'core modules'. 11:30
11:30 am0c joined, kst left
masak ah. what avar said, to the wrong tab-person. 11:30
Su-Shee which means one can easily define whatover one wants to be a core module. :) 11:31
ever
11:31 kst joined
masak well, it seems that that kind of 'core' will be up to distributions of Perl 6, not the spec. 11:34
Su-Shee masak: I like tiny cores. I like adding modules depending on the need. 11:36
and why not make a "security related math libs" distribution or a "gui-all-you-ever-need" distribution.. :)
moritz_ tiny core... then Perl 6 is not for you :-)
masak Su-Shee: me too. but I also know I draw the line somewhere.
Su-Shee I realized that already. ;) 11:37
masak Su-Shee: for example, impoting 'stdio' for IO in C feels silly.
Su-Shee masak: excellent example I would totally agree.
moritz_ anyway, I'd welcome some attempts to make DateTime, Date and various container types non-core, but still with a somewhat built-in feeling 11:38
Su-Shee moritz_: from a user's point of view I essentially don't want to "feel" the difference between "is core, is builtin, is cpan"
masak moritz_: not sure what you mean. what more would it take than putting `use DateTime;` at the top of the program? 11:40
colomon rakudo: say 1i * "3" 11:41
p6eval rakudo e16cf4: OUTPUT«0 + 3i␤»
colomon rakudo: say 1i + "3"
p6eval rakudo e16cf4: OUTPUT«3 + 1i␤»
moritz_ masak: integration with other modules or core things... 11:42
masak moritz_: it's the latter thing that concerns me.
moritz_ for example now that 'now' returns an Instant, I think time() could return a DateTime
(if we need time() at all)
masak seems that we can't have both 'time' as a builtin and DateTime as non-core. 11:43
moritz_ so... move DateTime and time() both out of core? 11:44
masak well, I'm still a bit doubtful. 11:46
wouldn't filetests need DateTime, for example?
those are definitely core.
moritz_ no, they need Instant only
masak ok.
moritz_ maybe I should compile a list of types that could be non-core 11:47
masak I'd like for DateTime to end up as 'almost core', i.e. something that most distributions will want to pull in.
moritz_ aye
masak things like timezones and localizations may well be CPAN-style modules.
i.e. not necessarily 'almost core'. 11:48
11:50 snarkyboojum joined
moritz_ Set, KeyBag, KeySet, KeyHash # feel like they could be "almost core" 11:51
11:54 plobsing joined 11:59 takadonet joined
takadonet morning all 11:59
masak takadonet: \o
moritz_: aye.
masak would still like to 'flesh out' the specification of those classes to contain a richer set of common operations 12:00
12:01 iblechbot left 12:07 envi^home joined
pugssvn r30500 | colomon++ | [t/spec] All those 0.0s and 2.5s were meant to be Nums -- and now they are again. 12:08
12:34 ruoso joined
colomon jnthn: ping? 12:42
12:44 tylerni7 left, SmokeMachine joined, tylerni7 joined, kst left 12:45 kst joined
moritz_ www.perlmonks.org/?node_id=837535 # rir++ for asking the right questions 12:49
if you have things to add to my answer, please do so now 12:51
12:52 iblechbot joined
moritz_ while I was writing my reply, I realized that proto and cpan differ quite significantly 12:53
cpan is push-style: each version is uploaded to pause.cpan.org
while our current approach is pull-style: the meta data is kept central, but the source code isn't kept in one place 12:54
masak *nod*
moritz_ not sure which approach is preferable in the long run
masak proto was never meant to be like CPAN. it was created to solve a piece of immediate pain.
moritz_ I know, you keep repeating that :-)
pmurias keeping the source code in one place seems very sensible
masak moritz_: I keep repeating it because I'm constantly surprised about the new things that proto starts to mean to people. :) 12:55
I consider that project to be my most successful failure so far.
moritz_ masak: :-) linux started out as an exploration of i386 architecture 12:56
masak: pugs started as an exercise in compiler writing
etc.
masak aye. start small.
pugssvn r30501 | pmurias++ | [mildew] avoid duplication of the output method 12:57
r30502 | pmurias++ | [mildew] only the C backends load the setting through MildewSOLoader
r30503 | moritz++ | [helpnow] new idea: overview page for proto projects 12:59
13:00 tylerni7 left 13:02 tylerni7 joined
[Coke] (most successful failure)++ 13:02
13:03 ReiniUrban joined
masak it's still in the README. 'It's only purpose is to help you set up a running environment where you can play with Perl 6 modules with minimal hassle.' 13:04
nowadays proto compiles and installs modules, and it can help people create new modules.
13:04 rurban left, ReiniUrban is now known as rurban
masak I'm not saying that's bad. just not what I had in mind. :) 13:05
13:07 Guest64263 left
colomon has anyone figured out how to output data from inside the core when &say cannot be found? 13:11
masak moritz_: 'blizkost' is a noun; it means 'closeness' or 'proximity' rather than 'close'. just a teeny tiny nit.
colomon: assign a global variable &s and use that. 13:12
moritz_ masak: thanks, fixed
pmurias diakopter: hi 13:16
13:17 [particle] joined 13:19 sahadev joined
colomon masak++ 13:20
masak colomon: :) discovered it just the other day
colomon of course, now that I know more, I've gone from confused to utterly mystified
masak is it possible to isolate and golf that mystification? 13:21
[Coke] merlyn.posterous.com/programming-pe...-cover-art
colomon I dunno. 13:22
13:22 meppl joined
colomon here's the deal. 13:24
moritz_++ pointed out that arithmetic was still using .Num instead of .Numeric internally.
as a result of thinking about that a bit, I started adding tests like "1" + 3i to complex.t 13:25
in theory, the way they should work properly now is: 13:26
"1" + 3i dispatches to infix:<+>(Any, Any)
moritz_ rakudo: say '1' + 3i
p6eval rakudo e16cf4: OUTPUT«1 + 3i␤»
colomon that calls +"1" + +3i
moritz_: that works now because there is an infix:<+>(Any, Complex) 13:27
I'm trying to get rid of that.
and (concluding) +"1" + +3i dispatches to infix:<+>(Real, Complex)
moritz_ but prefix:<+> should already call .Numeric, no? 13:28
colomon moritz_: yes, it does. but the existing versions of infix:<+>(Any, Any) calls .Num on each argument instead. 13:29
moritz_ ok
so that needs fixing too
colomon the change to use +$a + +$b is only local to my system at the moment.
thing is, that works great
afk for sec
but the exact same approach fails miserably for infix:<**> 13:32
moritz_ rakudo: infix:<**>(Mu, Mu) 13:33
p6eval rakudo e16cf4: OUTPUT«No applicable candidates found to dispatch to for 'infix:<**>'. Available candidates are:␤:(Int $a, Int $b)␤:(Complex $a, Complex $b)␤:()␤:(Num $a, Num $b)␤:(Real $a, Real $b)␤:(Complex $a, Real $b)␤:(Real $a, Complex $b)␤:(Any $a, Any $b)␤␤current instr.: '_block14' pc 29
..(EVAL_1:…
colomon infix:<**>(Any, Any) calls itself recursively 1000 times
moritz_ so what does $a.Numeric and $b.Numeric return?
colomon and when I use masak++'s trick to dump the Parrot version of the types involved, it is Perl6Str and Complex all the way down.
so +Perl6Str seems to return a Perl6Str. 13:34
moritz_ that's wrong.
13:34 ruoso left
colomon well yes. 13:34
13:35 moritz_ sets mode: +v p6eval, moritz_ sets mode: +o colomon
colomon what I don't get is why +Perl6Str doesn't work for **, but seems to work fine for + 13:35
(last + is infix:<+>)
moritz_ and that's for '1' ** 3i, or what? 13:36
colomon moritz_: "1" ** 3i
moritz_ rakudo: say "1".PARROT
p6eval rakudo e16cf4: OUTPUT«Perl6Str␤»
moritz_ rakudo: say (+"1").PARROT 13:37
p6eval rakudo e16cf4: OUTPUT«Num␤»
moritz_ colomon: maybe.... a very stupid precedence issue?
colomon moritz_: I do believe that must be it!
moritz_ (+$a) + (+$b) or so?
colomon moritz_++
+$a ** +$b is probably +($a ** +$b) 13:38
that would explain everything.
masak colomon: can you demonstrate it on p6eval?
colomon masak: let me think 13:39
masak: behaving that way is spec 13:40
exponentiation has higher precedence than symbolic_unary
masak o.O
masak looks 13:41
colomon or at least, that's what rakudo's grammar has for it.
masak by blog, S03 agrees with you. 13:42
moritz_ aye
masak oh right, that's so that -2**4 will mean the Right Thing.
TimToady mentioned that the other day.
moritz_ for the right value of "right" :-)
masak well, it means what mathematicians mean by it.
TimToady: should p5=> really remain in the S03 precedence table? 13:43
colomon moritz_++ # bug appears to be fixed! 13:46
13:47 [particle] left 13:49 ruoso joined
pmurias ruoso: using Regexp::Grammars to replace the haskell m0ld parser seems sane? 13:51
ruoso I never used it, but it being in perl5 is already good enough when compared to the haskell dependency ;) 13:52
it doesn't support rec descent well... but m0ld doesn't require it... so it's probably a good choice, since it's going to be faster 13:54
pmurias i would be so sure about it being faster but it certainly won't require setting up cabal 13:56
do you think carefull placing of #line would allow using gdb to debug code spit out by mildew's C backends? 13:59
pugssvn r30504 | moritz++ | [helpnow] draft announcement 14:02
14:04 uniejo left 14:08 alester joined
jnthn colomon: belated pong (meeting... :-)) 14:12
colomon jnthn: no worries, we actually solved the problem without you. :)
masak++ and moritz_++
jnthn Yay! 14:13
14:14 proller left
jnthn btw, I'm heading off the Iceland tomorrow, all being well. I'll probably have good connectivity until Monday while in the capital, but may be sketchy at times next week when I head out to the countryside (hopefully). Just a heads up. :) 14:15
mathw Iceland? Hmmm
Watch out for volcanoes
colomon :)
afk # exercising
moritz_ jnthn: have fun in Iceland :-) 14:16
moritz_ wonders if NPW is actually cancelled
jnthn moritz_: Yes 14:18
moritz_: But since I'd planned to take the week after it having a vacation anyway, I decided to go ahead with the trip.
14:18 gurjeet left, chitragupt left
moritz_ jnthn: then I hope your weather will be a nice as it is here a the moment 14:18
(sunny, 26C) 14:19
14:19 JimmyZ joined
jnthn moritz_: ooh, that *is* nice :-) 14:22
It'll likely be a bit cooler.
masak jnthn: enjoy Iceland for me! :)
moritz_ I'll leave $work in a few minutes, buy some foodstuff and then exercise my inline skates
at times I'm very happy for not having fixed (or even defined) work hours 14:24
[Coke] moritz_: same here. though some times I can use the structure that 9-5 woudl provide. =-) 14:25
moritz_ aye. External constraints help not let things slip
decommute&
14:26 KeithWolters joined
KeithWolters should I be able to return from a sub with something like "retturn 0 but true"? 14:27
masak rakudo: sub foo { return 0 but True }; say foo 14:28
p6eval rakudo e16cf4: OUTPUT«No applicable candidates found to dispatch to for 'infix:<does>'. Available candidates are:␤:(Mu $do-it-to-me, Role $r)␤:(Mu $do-it-to-me, ConcreteRole $r)␤␤current instr.: 'infix:<but>' pc 311315 (src/gen/core.pir:0)␤»
masak rakudo: role Troo {}; sub foo { return 0 but Troo }; say foo 14:29
p6eval rakudo e16cf4: OUTPUT«0␤»
masak KeithWolters: yes. it should work in Rakudo too, but enums (Bool::True in particular) are not sufficiently role-y yet.
KeithWolters thanks 14:33
14:34 rgrau_ joined, [particle]1 joined 14:36 KeithWolters left 14:37 envi^home left
jnthn enums are not sufficiently existential in Rakudo yet either... 14:40
14:41 envi^home joined, REPLeffect joined 14:43 [particle]1 left, [particle]1 joined
mathw They're not sufficiently named 14:43
rakudo: enum Mode <Binary ASCII>; my $m = Mode::Binary; say $m; 14:44
p6eval rakudo e16cf4: OUTPUT«Can not find sub Mode::Binary␤current instr.: 'perl6;Perl6Exception;throw' pc 14877 (src/builtins/Seq.pir:28)␤»
14:46 iblechbot left 14:50 pmurias left, JimmyZ left 14:52 pmurias joined
diakopter pmurias: hi 14:56
pmurias diakopter: hi 14:57
14:57 kst left 14:58 kst joined, proller joined, justatheory joined
sorear I figured out my problem yesterday 14:59
pmurias diakopter: the catch/try in the trampoline is used for catching the case when next is null?
sorear It involved perl6 -e ' ... ... ... my $name = 'foo' ... ...'
sh, I hate you
masak sorear: I do that one far too often too :) 15:00
jnthn Oh, sh..
:-)
colomon not ok 6 - increment of undefined variable does not warn
# got err: "Use of uninitalized value in numeric context\n"
# expected err: ""
my $a; $a += 1 15:01
rakudo: my $a; $a += 1
pmurias diakopter: could that be done by an if as it hides exceptions from methods invoked by sprixel code
p6eval rakudo e16cf4: ( no output )
colomon > my $a; $a += 1; say $a; 15:02
Use of uninitalized value in numeric context
1
I thought we'd agreed it should warn in cases like this? Opinions?
masak omgiblogged: use.perl.org/~masak/journal/40333
colomon: I thought we'd agreed it shouldn't warn in that case. 15:03
colomon: it should warn in the `$a = $a + 1` case.
but not in the assignment metaop cases.
diakopter pmurias: but I stopped using the trampoline anyway
colomon masak: In that case, how can I check definedness in PIR? :) 15:05
masak dunno. 15:06
diakopter pmurias: but yes, it does hide those exceptions..... lemme fix that. 15:07
jnthn omgthreethirds! 15:08
pmurias diakopter: the trampoline is still used in commited code?
diakopter yes, but only once
it's easy to stop using entirely
colomon masak: on your blog post, part 2 -- contextuals exist only for the scope they're defined in and any scopes that it calls? I've never quite understood them...
masak colomon: that's right. 15:09
diakopter pmurias: ok.
masak colomon: which makes them perfect for when you have a routine at the top, sharing data with all the routines transitively called.
colomon masak: sweet, yes, masak++ for blogging that. (and thinking to do it.) 15:10
sorear Is there any short way to say git log avar/master..HEAD; git log HEAD..avar/master ? 15:11
I want the symmetric difference
colomon jnthn: any hints on testing for definedness in pir? I'd like to hack assign_metaop so that it checks to see if the first arg is defined and calls $P0() if not....
masak sorear: that might be what '...' does.
masak doesn't quite recall, though
jnthn colomon: Can't you just call .defined? 15:12
$P1 = $P0.'defined'()
if $P1 goto omgyayitsdefined
colomon jnthn: I dunno, I'm not very good at PIR. I'll give that a try.
sorear that'll work, except that if $P0 is null it may segfault 15:13
jnthn no it own't
it'll give a null PMC access excpetion.
diakopter afk&
jnthn colomon: Should work
sorear and of course it won't work well if $P0 is a non-parrot object
colomon will it work if I use .param pmc a a.'defined'() instead?
jnthn sure
sorear colomon: That changes nothing, so yes
jnthn The other way is $I0 = defined a 15:14
if $I0 goto yayitsdeinfed
sorear jnthn: PARROT_CATCH_NULL is an option
avar: Still here?
dalek meta: r224 | diakopter++ | trunk/Sprixel/ (3 files):
[perlesque] see if this works.
[Coke] (parrot nulliness) ISTR there is a ticket that is eligible to go in shortly that will impact that. 15:15
avar sorear: yah
sorear: git remote add avar my-git-url
git diff master..avar/master
[Coke] trac.parrot.org/parrot/ticket/1207 ?
pmurias diakopter: would i be possible to add an option to sprixel to spit out the disassembled version of the code instead of running it? 15:16
sorear avar: that only shows me patches you've added. 15:18
15:18 proller left
sorear I want to see all differences, including ones you may have removed 15:18
avar: btw I've already committed your patch
avar sorear: I don't get what you mean. I just added this: github.com/avar/blizkost/commit/49b...031f049b25 15:20
so that's all git dif master..avar/master would show you. I didn't remove anything
sorear Yes. And. github.com/jnthn/blizkost/commit/49...031f049b25
avar: git diff master..avar/master will show me ABSOLUTELY NOTHING if you have removed a patch.
As a rule I don't trust people when they tell me about why their code is safe. It's the same with branches. 15:21
git diff avar/master..master shows me the other side of the story.
I'd like to only run one command to see both.
avar well, then alias it in your ~/.gitconfig :)
Anyway, git-cherry-pick is probably what you want for single patches like that 15:22
15:22 proller joined
avar Anyway, 'git diff master..avar/master' *will* show you the complete story, it's all the patches on that branch since it diverged. 15:22
so a subsequent git merge avar/master is safe, the worst that can happen is a merge conflict because the patches changed something you changed too. 15:23
sorear If you did git reset --hard HEAD^
that wouldn't register on git diff master..avar/master
are you disputing this? 15:24
colomon rakudo: my $a; $a *= 5; say $a
p6eval rakudo e16cf4: OUTPUT«Use of uninitalized value in numeric context␤0␤»
colomon > my $a; $a *= 5; say $a
5
sorear incidentally, ... works
[Coke] rakudo: say ...
p6eval rakudo e16cf4: OUTPUT«No exception handler and no message␤current instr.: '&fail' pc 17511 (src/builtins/Junction.pir:489)␤»
avar No. I didn't account for reset, anyway if someone was evil like that you'd get a push conflict about a non-fast forward when pushing to github unless you did git push -f
[Coke] std: say ... 15:25
p6eval std 30504: OUTPUT«ok 00:01 109m␤»
[Coke] rings up masak.
masak hello?
sorear masak++
[Coke] see last two evalbots?
masak yeah.
but I see no bug.
moritz_ well, ... in rakudo is less than awesome 15:26
masak LTA might be the bug, sure.
what would you want the error message to be?
[Coke] I see a parrot error message. shouldn't rakudo never emit one?
masak submits LTA rakudobug
[particle]1 it's masakworthy!
[Coke] woot. 15:27
jnthn We already have a ticket on ... saying it probably wants to use leave, not return, so we don't run into issues like the above, fwiw. 15:31
[Coke] *single tear*
jnthn That error still sucks though, and 15:33
rakudo: return
p6eval rakudo e16cf4: OUTPUT«No exception handler and no message␤current instr.: '&return' pc 17409 (src/builtins/Junction.pir:416)␤»
jnthn Needs fixing for that reason. :-)
[Coke] sees that theDamian is giving a rakudo class at yapc::na this year. 15:35
15:35 gurjeet joined
masak rakudo: return 15:35
p6eval rakudo e16cf4: OUTPUT«No exception handler and no message␤current instr.: '&return' pc 17409 (src/builtins/Junction.pir:416)␤»
masak ah, jnthn already did that :)
diakopter pmurias: it does.. to asmbly_1.exe
jnthn masak: Well, if you must return to the issue... :-P 15:36
masak :P
diakopter pmurias: it's in CIL
pmurias: into what language would you have it disassembled? 15:37
masak [Coke]: ah, and that bug is already reported: rt.perl.org/rt3/Ticket/Display.html?id=57268
diakopter pmurias: it's in CIL bytecode I should say.
masak reopens that ticket instead of submitting a new one 15:38
diakopter pmurias: it could be disassembled to human-readable CIL with `monodis asmbly_1.exe`
that may help
pmurias: but otherwise, you'd need something like Reflector, on Windows 15:39
though I think a very old version of Reflector ran on mono/linux...
pmurias usr/local/bin/monodis: error while loading shared libraries: libmono.so.0: cannot open shared object file: No such file or directory 15:42
moritz_ looks like it's not properl installed 15:43
diakopter pmurias: you just have to run libtool
or whatever it's calls
called
sorear ldconfig ITYM 15:44
diakopter yeah that :)
sorear libtool is something entirely different
dalek kudo: fe59fa8 | moritz++ | src/Perl6/Grammar.pm:
enable rx{...} quoting form. At some point we need a more general solution for these quoting mechanismsn...
sorear also, add /usr/local/lib to your /etc/ld.so.conf
diakopter pmurias: sorry :D what sorear said
sorear note: these two steps must be done in a specific order. Namely, the opposite of the one I listed them in. 15:45
15:45 wasy_ joined, wasy_ left
diakopter usually /usr/local/lib is already added in debian/ubuntu, I think. 15:45
pmurias ldconfig worked 15:46
but monodis segfaults
diakopter heh; hm
15:46 nihiliad joined
moritz_ disassembling is an evil hacker technique and forbidden in your country! 15:47
or so :-)
sorear diakopter: maybe it is now, I've been running this debian install for about seven years
diakopter pmurias: does it output anything before it segfaults? 15:48
pmurias yes 15:49
but CIL won't be helpfull
diakopter oh :P
disassembling to C# is very nontrivial, hence the lack of availability of tools 15:50
open-source tools, I mean
blog.coryfoy.com/2006/09/yes-reflec...k-on-mono/ 15:51
a very old version ran in linux 15:52
pmurias: I'd guess you'd have to somehow find one of those old versions of reflector to run it on linux 15:58
b/c I doubt it runs on it anymore.
I haven't tried it lately though.
16:00 am0c left 16:02 nihiliad left, chitragupt joined 16:04 nihiliad joined 16:05 bradb joined 16:06 isBEKaml joined 16:13 cdarroch joined, cdarroch left, cdarroch joined 16:15 am0c joined 16:17 ashizawa joined
isBEKaml hi #perl6! 16:17
masak hi isBEKaml! 16:18
isBEKaml I feel like looking at a module today... what's already in? :)
masak isBEKaml: you mean writing one? 16:19
sorear try src/core/*.pm
isBEKaml masak: no, reading one! ;)
masak oh! well, what sorear said.
isBEKaml: I can recommend Druid, too. it's a documented, OO board game in Perl 6. github.com/masak/druid 16:20
sorear src/core/*.pm isn't exactly modules, but it's the largest body of reusable Perl 6 code we have
masak sorear: largest? on what do you base that?
the spectest suite is pretty large.
November and GGE are large projects.
[particle]1 STD.pm is pretty large 16:21
...and that's just one module...
diakopter _reusable_, sorear said
masak STD.pm might be the largest reusable piece of Perl 6 right now.
sorear masak: A weighted function of size and reusability
isBEKaml YOU_ARE_HERE.pm; a single line module, yay! :D
sorear STD.pm is huge but it's only good for one thing
diakopter agrees
masak hm. I need to think about the difference there. 16:22
STD.pm5 isn't reusable because it's only good for one thing?
[particle]1 where on earth are the p6 acme modules??!?!!!?
masak even though that one thing is parsing Perl 6?
sorear masak: it is reusable. just, less so than stuff like Hash.pm
jnthn isBEKaml: That's just there to make people think, "wtf?" ;-)
colomon pir folk: any way to do the equivalent of .?call in pir? 16:23
jnthn Ew!
Yes
But I'll have to look it up
colomon maybe there's a better way?
sorear colomon: src/glue/dispatch.pir
jnthn See src/glue/dispatch.pir for the thingy to call.
sorear !dispatch_.?
jnthn It's got .* in its name.
oh, .?
16:24 ash_ joined
jnthn What sorear++ said. 16:24
sorear .? actually does two things
colomon I've patched assign_metaop to take the value of the op called with no parameters.
sorear it guards against the method not existing
and it guards against MMD failing
isBEKaml jnthn: :). Anyway, I was thinking of PIR code generated when building Rakudo after checking out Parrot... Was that all auto generated?
sorear if you only want to do one of these things, you can get away with less code
isBEKaml jnthn: I tried reading them, looked close to heavy metal bytecode..
colomon which works great unless there is no version that takes no parameters.
sorear isBEKaml: Everything in src/gen is autogenerated compiler output. 16:25
jnthn Yup
diakopter \_o_/
sorear There's a fair amount of handwritten (i.e. commented and with sane register names) pir, in src/builtins, src/cheats, and src/glue
jnthn Pretty much the only hand-written PIR lives in src/builtins/ and src/glue/ iirc.
sorear oh and src/metamodel
isBEKaml eww, does anybody ever handcode PIRs? 16:26
sorear Yes
Look inside your libc sometime, you'll see plenty of assembly there too
same reason, really
implementing the entire Perl 6 standard library in Perl 6 has bootstrap issues 16:27
colomon errr, ick. actually I need the sub equivalent of that, if there is such a thing, now that I think about it.
sorear $P0 = get_hll_global "&my_sub"
isBEKaml I thought handcoding assembly was so long ago, unless you really need to get close to hardware.. That isn't the case with perl6, right?
sorear if null $P0 goto not_found
$P0()
colomon sorear: in this case &my_sub should exist, just with a different signature than I need to use. 16:28
sorear isBEKaml: Libraries can't just float in mid-air, they need to be anchored to the bare metal *somewhere*
ash_ isBEKaml: anytime you port say the GCC to new hardware there will always be handcoded assembly, in embedded systems its happens all the time
masak swimming &
16:28 masak left
jnthn isBEKaml: Calling it assembly and thinking the same was as hardware-level assembly is making it out a bit worse than it is though. 16:29
isBEKaml ash_: I can understand embedded systems, yes...
jnthn isBEKaml: All your objects are garbage collected, don't need to manage calling conventions by hand, etc.
ash_ pir has a lot of nice things, its a bit above assembly
isBEKaml jnthn: I didn't mean that way.. I didn't even call them assembly, I said they looked like auto generated bytecode, akin to java bytecodes.. 16:30
[particle]1 isBEKaml: how would you implement infix:<+> in pure perl 6?
isBEKaml jnthn: sorry if I came out wrong..
sorear isBEKaml: Yes, they're evil. We know. 16:31
Are you complaining?
There's no alternative.
ash_ [particle]1: I would use a NCI system to call libc to add them together, :P
isBEKaml sorear: No, not complaining. Just curious why people would still hand-code those bytecodes... 16:32
sorear ash_: How would you implement the NCI in perl 6?
[particle]1 my platform doesn't have libc :P
sorear isBEKaml: see [particle]1's responce before last.
ash_ sorear: thats a different question all together
jnthn isBEKaml: The hand-written stuff looks rather nicer than the generated stuff. :-) 16:33
isBEKaml: The overall direction is to write *less* in PIR rather than more, though, that's for sure.
[particle]1 the generator isn't as smart as the humans yet
isBEKaml sorear: I'd have thought C, but not assembly.. :)
16:33 [particle]1 is now known as [particle]
colomon isBEKaml: which is why I flounder when I have to break down and write PIR. 16:33
sahadev rt.perl.org/rt3/Public/Bug/Display.html?id=60672 says: "According to S29, there should be an sprintf directive %C, ...". I looked at S29 (perlcabal.org/syn/S29.html), which points to S32-setting-library/IO.pod for printf. But the latter (svn.pugscode.org/pugs/docs/Perl6/Sp...ry/IO.pod) also doesn't contain any reference to sprintf. 16:34
what exactly does %C directive do?
ash_ i'd probably bootstrap a subset of perl6 that can self compile, a subset that can be directly translated to native code, then go on from there
TimToady sahadev: beats me..complex?
moritz_ sahadev: it's actually in S32-setting-library/Str.pod
sorear isBEKaml: Well... we do that. Everything in src/Perl6/ is written in our "C" 16:35
moritz_ The special format directive, C<%C> invokes the target argument as
code, passing it the result string that has been generated thus
far and the argument array.
sorear As well as the .pm modules in builtins/ and cheats/
sahadev moritz_: thanks. found it.
TimToady moritz_: I don't like @[] because I don't like noun markers attaching themselves to verbs.
isBEKaml colomon: gee, looks like I'll be learning the way around things here too... :D
TimToady how *do* we format a complex?
colomon rakudo: say -1 + 3i 16:36
p6eval rakudo fe59fa: OUTPUT«-1 + 3i␤»
moritz_ is there any free format string? :-)
TimToady rakudo: say -1+3i
p6eval rakudo fe59fa: OUTPUT«-1 + 3i␤»
TimToady what if I don't want to output the spaces? 16:37
colomon rakudo: my $a = -1 + 3i; $a.comb(/\S+/).join.say
p6eval rakudo fe59fa: OUTPUT«-1+3i␤»
colomon ;)
moritz_ colomon++ :-)
TimToady rakudo: my $a = -1 + 3i; $a.words.join.say
p6eval rakudo fe59fa: OUTPUT«-1+3i␤» 16:38
moritz_ or you sprintf $c.re and $c.im
TimToady :P
sorear What's the canonical Perl6 way to lift a smartmatcher?
jnthn rakudo: my $a = -1 + 3i; say "$a.re()+$a.im()i"; 16:39
p6eval rakudo fe59fa: OUTPUT«-1+3i␤»
sorear I want to find everything for which { $^a.Str ~~ m/.../ }
isBEKaml What's a GatherIterator() ?
ash_ rakudo: my $a = -1 + 3i; say $a.perl;
p6eval rakudo fe59fa: OUTPUT«Complex.new(-1, 3)␤»
sorear Rakudoese for a lazy list ATM
(subject to change)
isBEKaml rakudo: my $str="helpoworld".split(/o/,:all); say $str; say $str.WHAT;
p6eval rakudo fe59fa: OUTPUT«help o w o rld␤GatherIterator()␤»
sorear a GatherIterator looks kinda like an array but can be infinite and is not calculated all at once 16:40
moritz_ and should be called List or Seq or Array or so
TimToady "everything" seems underspecified
sorear tokens are only split from that string when you need them
TimToady: everything is a list of methods.
currently .grep({ $^a.Str ~~ m/.../ }) but that feels wrong 16:41
isBEKaml sorear: iterator, hmmm... why can I just display it in one fell swoop then?
TimToady why does it feel wrong?
moritz_ isBEKaml: because the consumer (here say) iterates it
sorear TimToady: the point, mostly 16:42
isBEKaml sorear: if that's an iterator, I should only be able to do something like next() until it exhausts itself, right?
moritz_ sorear: .grep(/.../)
sorear: it will stringify internally anyway
sorear: and .grep does a smart match against its argument anyway
16:42 molaf joined
isBEKaml moritz_: I don't understand the behaviour of "say", maybe I should go look at it again... You're saying it just doesn't do printing stuff, but more than that, like eat a _potentially_ infinite array/seq... :| 16:43
moritz_ isBEKaml: well, how else would it print their contents? 16:44
isBEKaml: actually it just calls .Str on its argument
TimToady each argument, surely 16:45
moritz_ isBEKaml: the the iterator consumes itself to generate the string representation of its argument
isBEKaml moritz_: so it stringifies whatever is passed to it?
sorear rakudo: (1, 1, *+* ...).batch(20).say
moritz_ right
p6eval rakudo fe59fa: OUTPUT«Confused at line 11, near "(1, 1, *+*"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
sorear rakudo: (1, 1, *+* ... *).batch(20).say
p6eval rakudo fe59fa: OUTPUT«11235813213455891442333776109871597258441816765␤»
TimToady .Str would insert spaces
sorear rakudo: (1, 1, *+* ... *).batch(20).Str.say
p6eval rakudo fe59fa: OUTPUT«1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181 6765␤»
moritz_ isBEKaml: yes
TimToady rakudo: (1|2|3).Str.say 16:46
hejki rakudo: (1, 1, *-1+*-2 ... *).batch(10).Str.say
p6eval rakudo fe59fa: OUTPUT«any(1, 2, 3)␤»
rakudo fe59fa: OUTPUT«Method 'Num' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
moritz_ Whatever currying not yet fully implemented
hejki rakudo: (1, 1, (*-1)+(*-2) ... *).batch(10).Str.say
isBEKaml Actually, I got a slightly different output on my local perl6 interpreter. It didn't display the "o"s at all..
p6eval rakudo fe59fa: OUTPUT«Method 'Num' not found for invocant of class 'Block'␤current instr.: 'perl6;Mu;' pc -1 ((unknown file):-1)␤»
TimToady rakudo: (1|2|3).Str.WHAT.say 16:47
p6eval rakudo fe59fa: OUTPUT«Str()␤»
TimToady rakudo: (1|2|3).Stringy.WHAT.say
p6eval rakudo fe59fa: OUTPUT«Method 'Stringy' not found for invocant of class 'Integer'␤current instr.: '!DISPATCH_JUNCTION_METHOD' pc 16732 (src/builtins/Junction.pir:76)␤»
isBEKaml rakudo: my $str="helpoworld".strip(/o/,:all); say $str; say $str.WHAT;
p6eval rakudo fe59fa: OUTPUT«Method 'strip' not found for invocant of class 'Perl6Str'␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
TimToady rakudo: (~(1|2|3))WHAT.say
p6eval rakudo fe59fa: OUTPUT«Confused at line 11, near "(~(1|2|3))"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
isBEKaml rakudo: my $str="helpoworld".split(/o/,:all); say $str; say $str.WHAT;
TimToady rakudo: (~(1|2|3)).WHAT.say
p6eval rakudo fe59fa: OUTPUT«help o w o rld␤GatherIterator()␤»
rakudo fe59fa: OUTPUT«Str()␤»
isBEKaml gack.. 16:48
TimToady rakudo: (1|2|3).WHAT.say
isBEKaml why are the "o"s there?
p6eval rakudo fe59fa: OUTPUT«Junction()␤»
TimToady ~ doesn't seem to autothread correctly yet 16:49
moritz_ rakudo: say "helpoworld".subst(/o/, '', :g)
p6eval rakudo fe59fa: OUTPUT«helpwrld␤»
moritz_ isBEKaml: because your build of rakudo is too old
isBEKaml: colomon++ fixed that about a day ago
jnthn TimToady: It's the Stringy / Str discintion, iirc.
isBEKaml moritz_: A few days is too old.. :)
TimToady yes
sorear Unable to parse blockoid, my favorite error 16:50
moritz_ TimToady: I hope masak is going to correct that as part of his gsoc project
TimToady rakudo: (+(1|2|3)).WHAT.say
p6eval rakudo fe59fa: OUTPUT«Junction()␤»
TimToady looks like Numeric is right tho
jnthn Yeah
TimToady rakudo: (1|2|3).Num.WHAT.say
p6eval rakudo fe59fa: OUTPUT«Junction()␤» 16:51
TimToady well, maybe Num is different from Str that way
sorear it seems that smartmatching against rx// is doing something extremely wrong 16:52
TimToady but perhaps .Num ought to blow up on a Junction, so we can make sure + is calling Numeric
jnthn Auto-threading methods on junctions plays interestingly with coercions. :-) 16:54
SomeType(1|2) => Junction of SomeType instances, not SomeType
16:55 riffraff left
jnthn Thankfully though not a problem for 16:56
sub foo($x as SomeType) { ... } 16:57
Which will still auto-thread just fine.
(Because a junction is not Any)
TimToady well, maybe Str is just special in having a multi that takes Junction 16:58
16:58 spinclad joined
TimToady we have to give the low level stringifier used by say and print a name of some sort 16:58
and .Str doesn't seem so bad as long as .Stringy provides ~ semantics, which do autothread
jnthn *nod* 16:59
I'm not complaining as such, just pointing out the various interesting semantics. :-)
lisppaste3 sorear pasted "Insane bug w/ rx and for?" at paste.lisp.org/display/98544
sorear does anyone have a clue what's going on there? 17:01
TimToady it's interpreting it as "go there" instead of "got here"? :) 17:03
jnthn I wish I had a better guess than TimToady... 17:04
epic wtf.
17:05 kst left, kst joined
ash_ if you take out the ~~ rx/./ it says got here twice 17:05
sorear yes, I mentioned that in a comment 17:06
[Coke] ponders how to setup his dev machine so he can have master and parrot-latest installed simultaneously.
moritz_ sorear: it's $^a brokenness
sorear: if you use -> $a { ... } instead of { $^a; $^a; } it's all good 17:07
sorear Whaaat
Hoowwww
Known?
moritz_ sorear: there are various bug reports wrt $^a in RT - non of them affects control flow, to the best of my knowledge
sorear wants a streaming PIR pretty-printer 17:08
moritz_ want's production ready Perl 6 now!
and a ponie
ash_ wants more time to get nq-nqp working 17:09
sorear Production is ready for Perl 6.
moritz_ hands ash_ a round tuit
jnthn oh ouch, is it somehow added that placeholder to the block twice... 17:10
moritz_ seems like
jnthn rakudo: for 1,2 { say $^a, $^a }
p6eval rakudo fe59fa: OUTPUT«22␤»
jnthn arse.
Well, that explains it.
moritz_ rakudo: say ({$^a, $^a}).signature.perl
p6eval rakudo fe59fa: OUTPUT«:(;; Mu $a, Mu $a)␤»
jnthn Who implemented this crap... 17:11
[Coke] jnthn: you?
jnthn would fix, but his Rakudo build is busted due to patches to try and get it to build on latest Rakudo.
[Coke]: :-P
[particle] s:2nd/Rakudo/Parrot/ 17:12
jnthn Er, yes.
:-)
jnthn svn ups to get latest Parrot
with fixes
sorear Do I file a bug or...
moritz_ sorear: please do
sorear Also, the original manifestation had only one reference to $^a 17:13
this double $^a weirdness came about while trying to debug the first bug
I don't know if these are the same
isBEKaml is svn upping Parrot and git pulling Rakudo to the latest build...
sorear rakudobug@perl ? 17:14
17:14 dakkar left
moritz_ @perl.org, yes 17:14
17:14 proller left 17:15 REPLeffect left
moritz_ has a working desktop PC again, with enough RAM to build a few copies of rakudo at the same time :-) 17:16
sorear sent
moritz_ sorear++
ash_ moritz_: ooo its always fun getting new hardware 17:17
17:17 SmokeMachine left
moritz_ ash_: well, I had the RAM and the machine before, but the power supply unit made "plopp" on the last weekend, and smelled like busted condensators 17:18
on that occasion I also ordered a new hard disc :-)
17:19 pacificpelican joined
[particle] ...unless your hardware refuses to work, like the case of my new cpu's... 17:20
sorear Condensators!
rakudo: my $name = "moo"; say "_handler_moo" ~~ m/_handler_ moo/;
p6eval rakudo fe59fa: OUTPUT«_handler_moo␤»
sorear rakudo: my $name = "moo"; say "_handler_moo" ~~ m/_handler_ $name/;
p6eval rakudo fe59fa: OUTPUT«␤»
sorear ?
Is regex interpolation just not implemented yet?
jnthn NYI
bkeeler++ is working on it. 17:21
slavik moritz_: what's your native language?
jnthn lolspeak
;-) 17:22
sorear What's the neatest way to say `startsWith` in rakudo?
let's see... Len*z*... perl6geek.*de*...
I've got some guesses
jnthn Must be .DEnmark!
sorear er, just perlgeek
moritz_ ~~ /^startsWith/ ? 17:23
slavik moritz_: condenser/capacitor :P
moritz_ slavik: Perl :-)
slavik: German, actually 17:24
sorear moritz_: NYA.
NYI.
moritz_ huh?
slavik moritz_: I guess condensator is from german?
moritz_ slavik: yes, actually with s/c/k/
slavik which would prolly explain the russian word
sorear rakudo: my $pfx = "_handler_"; say "_handler_moo" ~~ m/^$pfx/; #moritz_
p6eval rakudo fe59fa: OUTPUT«␤»
moritz_ oh 17:25
substr then
17:27 ash_ left
sorear finally, it works! 17:28
17:29 REPLeffect joined 17:35 M_o_C joined 17:46 SmokeMachine joined
[Coke] finds mst talking smack in #yapc! 17:48
17:55 ashizawa left, kst left 17:56 kst joined 17:59 IllvilJa left
[Coke] yay, I now have an installed stable-parrot and regular parrot and finally build rakudo master again. 18:00
[Coke] wonders if ./perl6 will ever be renamed ./rakudo 18:01
isBEKaml [Coke]: unstable is regular? :D
[Coke] er, supported-parrot.
"2.3.0" 18:02
jnthn current instr.: 'perl6;Callable[::T];' pc 13147 (src\builtins\Num.pir:185)
[Coke] I tend to track parrot-trunk normally; just installed the 2.3.0 tarball separately and modified my rakudo build script.
jnthn ...I think the erros might not be fixed yet. :-|
isBEKaml [Coke]: oh, I thought you were tracking trunk when you said regular.. ;) 18:04
isBEKaml wonders how often he should build when updates yied so many changes all in a span of few days.. :| 18:05
18:06 pmurias left
jnthn gets the stage 1 compiler to build and startup on latest Parrot 18:11
Too bad it explodes as soon as it then tries to parse anything.
18:11 ash_ joined 18:15 meppl left 18:22 [particle] left 18:23 |Jedai| left
jnthn OK, Rakudo builds on latest Parrot now, but we has a startup crash. 18:25
Dinnertime.
18:26 envi^home left 18:30 pyrimidine joined 18:31 [particle] joined 18:48 dual left 18:53 pacificpelican left, dakkar joined
diakopter There's More Than One Way To Implement It 18:57
dalek kudo: c4857ab | (Solomon Foster)++ | src/core/metaops.pm:
Turn on zero-argument versions of infix:<~> and infix:<//>.
19:05
kudo: 4aeb5a2 | (Solomon Foster)++ | src/builtins/assign.pir:
Have $a op= $b call op() to get a value for $a if $a is not defined.
kudo: 9d955f2 | (Solomon Foster)++ | src/core/ (2 files):
Be more specific about types for Complex mixed-type math. Change Any, Any versions of the basic math functions to coerce to Numeric (instead of called PIR functions which coerce to Num).
pugssvn r30505 | colomon++ | [t/spec] New tests of basic arithmetic mixing Complex and numeric Strs.
jnthn colomon++ :-D 19:06
colomon Took me quite a while to get all the tests passing again. :)
jnthn > say "yes, I work with latest Parrot" 19:08
yes, I work with latest Parrot
colomon \o/
pugssvn r30506 | colomon++ | [t/spec] Turn on two more zero-arg tests which now work.
19:08 colomon left
[particle] say "YES, I CAN HAZ SPEEDUPS!!!" 19:08
jnthn [particle]: It feels...erm...slow. :-|
19:08 colomon joined
[particle] blames chromatic 19:09
he's looking forward to benchmarking it
jnthn erm. 19:10
The benchmarks...segfault.
(one of 'em, anyway)
jnthn runs the spectests to see what the fallout is. 19:11
colomon It's probably segfaulting because it's running so incredibly fast it melts your CPU.
[particle] i wish... parrot cut out the 'hcf' opcode last year, though :( 19:12
19:14 ShaneC joined
colomon I think this would be the grfcf opcode... 19:15
19:16 ShaneC left
jnthn Down to S04 and things are looking fairly OK. 19:17
We epic fail S05 though. 19:18
moritz_ hopes it's not his nqp-rx update 19:19
well, other parrot based languages haven't complained yet
jnthn One fail in S10, but probably not too concerning. 19:20
S12 and S14 are in great shape.
19:21 pyrimidine left
jnthn I don't actually have latest changes from @other mind, so some of my test fails may well be to do with that too. 19:21
colomon oh, you have the latest tests but not the latest commits? 19:23
jnthn Right. 19:26
Which means I probably needn't worry too much over having a couple of fails here and there.
At this rate, it looks like the only big issue left is going to be why we fail S05 so much.
(We pass the majority of test files, but there's a streak of them that we don't.) 19:27
moritz_ and the rest might be due to regex failures in other files (/me hopes)
jnthn Oh, I think the S05 ones are probably all for the same underlying reason. 19:29
moritz_ that's good
jnthn (namely, crash in GrammarHOW.compose, investigating.) 19:30
[Coke] jnthn++
19:33 dual joined, _jaldhar_ left 19:34 lichtkind joined 19:38 sahadev left
moritz_ rakudo: my $x *= 5; say $x 19:38
p6eval rakudo fe59fa: OUTPUT«Use of uninitalized value in numeric context␤0␤»
19:39 sahadev joined, plobsing left
diakopter pugs: my $x *= 5; say $x 19:39
p6eval pugs: OUTPUT«0␤»
moritz_ that's wrong
diakopter which?
moritz_ both
diakopter heh
ash_ alpha: my $x *= 5;
p6eval alpha 30e0ed: ( no output )
ash_ alpha: my $x *= 5; say $x; 19:40
p6eval alpha 30e0ed: OUTPUT«5␤»
diakopter moritz_: what should it be
moritz_ diakopter: 5
ash_ o.0
diakopter why 5
[Coke] I would expect 0. =-)
ash_ yeah, why 5?
jnthn ESRSLYMAGIC 19:41
[Coke] grabs some popcorn. this is gonna be great!
moritz_ because op= treats an undefined value on the LHS specially
diakopter ESRSLYUNIMPLEMENTABLE
moritz_ it takes the neutral element for this operation
diakopter INTHEGENERALCASE
jnthn diakopter: Just falls out of multi-dispatch. ;)
[Coke] moritz_: ... my initial reaction is one of revulsion. =-)
ash_ thats going to be confusing.... 19:42
moritz_ and the neutral element is provided by the 0-ary form of the operator, e.g. infix:<*>()
diakopter jnthn: that's an easy way of saying, the general case isn't handled.
moritz_ likes it
jnthn diakopter: ?
19:42 spinclad left
jnthn was a bit surprised by it. 19:42
moritz_ it means you can say things like for @a.kv -> $k, $v { %hash{$k} *= $v }
diakopter I mean, cases for which there isn't a multi
that matches
moritz_ and DWIM
ash_ std: my $x *= 4;
p6eval std 30506: OUTPUT«ok 00:01 110m␤» 19:43
jnthn diakopter: Sure, well, then you just gotta supply a multi that matches. :-)
I think it defaults to undef if there isn't one though
jnthn didn't check the patch yet
BTW, spectests actually aren't horrifyingly slower, it seems.
moritz_ s/undef/Any/
jnthn moritz_: er, yes. :-)
diakopter s/er//, no 19:44
oh wait; heh; nm.
moritz_ colomon++ # implementing this insanity 19:45
[Coke] jnthn: weren't we hoping for 10% faster?
moritz_ [Coke]: that's kinda defied by code generation using many, many concatenations, no?
I remember such a mail on parrot-dev
[Coke] ah, yes. I am reminded to dig into CodeString to see if there was an easy fix there. 19:46
diakopter rakudo: my $a = 'hi'; $a ~= $a; say $a;
p6eval rakudo fe59fa: OUTPUT«hihi␤»
diakopter rakudo: my $a ~= 'hi; say $a;
p6eval rakudo fe59fa: OUTPUT«Confused at line 11, near "my $a ~= '"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
diakopter rakudo: my $a ~= 'hi'; say $a;
jnthn I have a grammars fix.
p6eval rakudo fe59fa: OUTPUT«Any()hi␤»
diakopter that one needz an empty string 19:47
[Coke] moritz_: looks like it would be pretty easy to convert CodeString to do it the fast way internally.
moritz_ diakopter: works here, with newest rakudo
[Coke]: then go for it :-)
diakopter ? p6eval should be newest
[Coke] If someone volunteers to benchmark it, I can craft a patch for that this $evening.
diakopter unless that was committed in the last hour 19:48
moritz_ diakopter: it was 19:49
diakopter oh :)
19:49 jaldhar joined
jnthn Going for a spectest run now, and then probably I push the update that gets us running on latest Parrot for wider feedback. 19:50
moritz_ jnthn++ 19:51
ash_ nqp: class Foo { has $a }; my $a := Foo.new; $a.a := 3; my $b := $a.a; my $a.a = 4; say($b); 19:52
p6eval nqp: OUTPUT«Redeclaration of symbol $a at line 1, near ".a = 4; sa"␤current instr.: 'parrot;HLL;Grammar;panic' pc 500 (src/cheats/hll-grammar.pir:197)␤»
ash_ are object variables write-once in nqp? 19:53
moritz_ ash_: has $.a
my $a.a = 4; 19:54
ENOSENSE
ash_ oh, okay
jnthn $a.a = 4 # works fine
moritz_ [Coke]: would "compiling rakudo" be a sufficient benchmark?
ash_ hmmm odd... 19:56
nqp: class Foo { has $!a }; class Bar { has $a }; class Broke { has $.a };
p6eval nqp: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'parrot;Regex;Cursor;FAILGOAL' pc 1664 (src/Regex/Cursor-builtins.pir:179)␤»
[Coke] moritz_: absolutely. I guess I can do that myself, huh? =-)
ash_ it does $!a, and $a okay, but $.a gives me a parse error
jnthn ash_: NQP doesn't implement that. 19:57
moritz_ ash_: ah, then use $!a
ash_ oh, okay
jnthn (Intentionally.)
moritz_ and write an accessor if you want one
ash_ so in nqp is "has $a" a mistake?
moritz_ std: has $a 19:58
p6eval std 30506: OUTPUT«ok 00:01 107m␤»
19:58 goksie joined
moritz_ ash_: I'm not sure what it is meant to mean... a class attribute maybe? 19:58
19:59 goksie left
ash_ in perl6 the spec says class Foo { has $a } is the same as class Foo { has $.a } (i believe) 19:59
i was just wondering what it meant in nqp terms
19:59 jaldhar left
moritz_ maybe look at the PIR that nqp generates for it 20:00
[Coke] moritz_: oooh. there's a lot of concat going on in CodeString. *glee*
20:02 chitragupt left 20:03 chitragupt joined
moritz_ [Coke]: is .'emit' a method in CodeString? 20:05
20:05 kensanata joined
moritz_ seems like, yes 20:05
and that method looks like a hot path to me 20:06
ash_ interesting 20:07
$a and $!b both act the same, as private variables
in nqp 20:08
[Coke] moritz_: yup. I can definitely clean tht up.
20:08 pyrimidine joined
ash_ since they are attributes, they both end up calling " getattribute $P34, self, "$a" " or getattribute $P34, self, "$!b" 20:09
so functionally, they are equivalent
colomon actually, op= defaults to failing at the moment if there isn't a 0-arg form of the operator defined. 20:10
patches welcome. ;)
ash_ hmm, thats odd, one minor difference between the two, one made a find_lex lookup for "self" the other just used self 20:11
colomon (defaults to failing if $a (of $a op= $b) isn't defined, that is.) 20:14
20:14 wolv joined 20:15 Su-Shee left 20:17 ash_ left
jnthn Hold on tight... :-) 20:17
20:17 _buno_ joined
jnthn pushes 20:17
20:19 [particle] left 20:20 am0c left
dalek kudo: cdd3430 | jonathan++ | src/ (6 files):
A bunch of changes required to make us run under latest Parrot, mostly because we relied wrongly on :method's old semantics of putting things into the namespace, and the 4-argument substr op has gone.
20:20
kudo: 9d927ac | jonathan++ | build/PARROT_REVISION:
Bump PARROT_REVISION to latest Parrot.
kudo: 6e91b9b | jonathan++ | (10 files):
Merge branch 'master' of [email@hidden.address]
20:24 ash_ joined, ash_ left 20:29 molaf left
lichtkind there is no slurp in list context? 20:31
ah lines is the command
TimToady rakudo: say infix:<min>() 20:32
p6eval rakudo c4857a: OUTPUT«Inf␤»
TimToady rakudo: say infix:<max>()
moritz_ there is no inward flowing context at all
p6eval rakudo c4857a: OUTPUT«-Inf␤»
20:34 am0c joined, spinclad joined
[Coke] How often do Codestrings have to return their string value more than once, I wonder. 20:35
moritz_ jnthn: rx.t fails here... 20:36
Unrecognized backslash sequence: '\e' at line 1171, near "def\" ~~ /c"
probably because pmichaud has removed that stuff from NQP-rx
need to add that to rakudo 20:37
moritz_ will take a look tomorrow
20:37 _buno_ left 20:39 _buno_ joined 20:40 hercynium left 20:41 _buno_ left
jnthn moritz_: Here too. 20:43
moritz_: oh argh...why remove it rather than move it. :-/
moritz_++
20:44 adamsj joined
colomon moritz_: was just thinking that fixing op= to work fully when op() isn't defined might be a good LHF for your blog project. 20:45
moritz_ colomon: then add it to the pugs repo, misc/helpnow/README 20:46
20:46 ruoso left
moritz_ that's where I collect ideas for that project 20:46
colomon: I've now closed the masabug wrt op= defaults 20:47
20:48 chitragupt left
moritz_ -> bed 20:48
lichtkind good night moritz_ 20:52
lichtkind added term phaser to index
20:53 justatheory left, justatheory joined
lichtkind jnthn: hej 20:54
20:56 chitragupt joined, chitragupt left
jnthn lichtkind: hej hej 20:56
pugssvn r30507 | lwall++ | [prior.t] fix parsefail 20:58
21:00 SmokeMachine left 21:01 [particle] joined 21:02 Intensity joined 21:03 [particle] left
pugssvn r30508 | lwall++ | [charset.t] fix parsefail 21:03
21:03 ReiniUrban joined 21:04 M_o_C left, rurban left, ReiniUrban is now known as rurban 21:14 dakkar left 21:26 gurjeet left, k23z__ joined 21:28 [particle] joined, [particle] left, alexn_org joined 21:31 [particle] joined
dalek meta: r225 | diakopter++ | trunk/Sprixel/ (4 files):
[perlesque] try to fix mono's not-quite-as-correct-as-.NET's

stop catching exceptions in the reified frame trampoline; test for null instead.
21:34
21:35 pmurias joined
pmurias diakopter: sprixel HEAD is broken 21:35
diakopter fixing 21:37
:)
sry
(it worked on .NET but not on mono)
pmurias: fixed :D 21:38
dalek meta: r226 | diakopter++ | trunk/Sprixel/RunSharp/Conversion.cs:
[perlesque] fix
21:39 kensanata left
diakopter pmurias: and yet still I get this: 21:41
perlesque: my $a = sub (string $b) { say($b ~ $b); return 1 }; my $c = $a.Bind(frame, 'hi'); $c.Exec();
p6eval perlesque: OUTPUT«␤Unhandled Exception: System.MissingMemberException: Cannot find property Bind in _IClosure_2␤ at TriAxis.RunSharp.TypeInfo.FindProperty (System.Type t, System.String name, TriAxis.RunSharp.Operand[] indexes, Boolean static) [0x00000] in <filename unknown>:0 ␤ at
..TriAxis.RunSharp…
diakopter but the same thing works fine in .NET
sigh.
21:41 kensanata joined
pmurias diakopter: you commit fix the bug here 21:42
diakopter: see the daily failing test
diakopter ok
21:42 nihiliad left
wolv are the perlesque .cs files generated from something? they don't look exactly something I'd want to code... :) 21:43
dalek meta: r227 | pawelmurias++ | trunk/Sprixel/ (2 files):
failing test with P6capture
21:44
pmurias wolv: you mean the grammar ones?
wolv yes
diakopter heh
wolv (the only ones under Perlesque/ I think?)
diakopter it's code-gen-gen
twice-deferred code 21:45
input language syntax directly transformed to runtime code, via parameterized codegen, where the compiler action routines themselves are also codegen-d
wolv ah, thanks 21:46
21:46 lestrrat is now known as lest_away
diakopter wolv: you're the first that understood my explanation of that 21:46
my (first) explanation, I mean.
wolv I took that CS course ;) 21:47
diakopter wait, what?
what cs course
pmurias somebody in your uni suggested implementing stuff that way?!
diakopter heh 21:48
wolv mostly I was joking. but I did read up on all kinds of weird stuff during the compiler course...
diakopter hasn't taken a cs course
<-- (and it shows)
pmurias what did you study? 21:49
wolv me?
diakopter nothing, but I got a degree in business (finance/investments)
actually, during college I studied theology/hermeneutics
wolv by doing nothing? :)
diakopter yeah; the degree isn't worth much. 21:50
21:50 bradb left
diakopter (or anything, at this point) 21:50
21:51 [particle] left, kensanata left
diakopter pmurias: actually it's not parsefailing 21:53
it runs
pmurias yes 21:54
diakopter the positionals member is not initialized
want me to fix it?
pmurias ok 21:55
diakopter also I need to move the "Catch" in TopLevel.cs up several lines
so it doesn't catch that exception
pmurias you shouldn't catch all exceptions
diakopter that's what I said
pmurias the parse ones should inherit from a parse exception subclass
diakopter yes, someday.
here's the error it throws now: 21:56
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocati
on. ---> System.NullReferenceException: Object reference not set to an instance of an object. at Sprixel.Runtime.P6capture.add_positional(P6object pos) in C:\Users\mwilson\Documents\src\csmeta\Sprixel\src\Types\
P6capture.cs:line 11
(fixing and comitting) 21:57
sigh. 21:59
pmurias ?
diakopter svn up :P
pmurias i don't do svn up 22:00
diakopter what do you do
pmurias i use git svn rebase
diakopter ok
:)
pmurias as i'm not on speaking terms with the svn CLI client
diakopter lol. 22:01
dalek meta: r228 | diakopter++ | trunk/Sprixel/ (3 files):
[perlesque] program exceptions aren't caught as a "parsefail"
22:03
meta: r229 | diakopter++ | trunk/Sprixel/Main.cs:
[perlesque] disable debug mode
22:06 [particle] joined, sahadev left 22:12 adamsj left
diakopter wolv: much of that action code can feasibly be extracted out into combinators in only singly-deferred C# 22:13
so that one could call a routine like c.DescendNewLexicalScope()
instead of the 200-character 4 lines 22:14
wolv heh
22:18 pyrimidine left 22:29 crythias joined 22:45 crythias left, pmurias left 22:49 alexn_org left 22:57 wknight8111 joined, rgrau__ joined 22:59 rgrau_ left 23:14 snarkyboojum left 23:15 cls_bsd left 23:17 cls_bsd joined
dalek ok: 1106aab | chromatic++ | src/basics.pod:
Edited chapter. It looks good.
23:33
23:34 cls_bsd left 23:35 crythias1 joined 23:41 cls_bsd joined 23:45 jaldhar joined 23:48 jaldhar left
pugssvn r30509 | lwall++ | [STD] allow subscripts on regex variables so $x[0] isn't taken as a character class 23:49
r30509 | [STD,Cursor] revamp of character class parsing to be more helpful/correct
23:53 kst left
pugssvn r30510 | lwall++ | [S03] remove p5=> description since it's not supported in core 23:54
23:54 kst joined, mikehh left