»ö« | 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 | aha, found it | 00:01 | |
pugssvn | r31008 | sorear++ | [viv] Allow .*? to backtrack in rules again. Oops. | 00:09 | |
00:16
whiteknight joined
00:21
Spreadsheet_ left
00:23
[Coke] joined
00:30
azert0x left
00:35
rgrau left
00:36
yinyin joined
|
|||
[Coke] skips review. | 00:38 | ||
00:38
kda left
01:00
meppl left
01:03
yinyin left
01:07
meppl joined
01:09
pausenclown left
01:13
pausenclown joined
01:16
tylerni7 left
01:31
snarkyboojum left,
am0c joined
01:32
Guest86832 left,
nothingmuch joined
01:34
tylerni7 joined
01:45
nothingmuch left
01:46
meppl left
02:08
synth left
02:09
synth joined
|
|||
jnthn | mornin' | 02:19 | |
02:23
whiteknight left
|
|||
sorear | yo. | 02:27 | |
02:28
[mark] joined
02:30
agentzh joined
02:31
atomicstack joined
|
|||
sorear | Hmm. | 02:36 | |
Fixing quantifier ratcheting doesn't seem to have helped performance much... | 02:37 | ||
02:39
JimmyZ joined
02:43
bluescreen joined,
bluescreen is now known as Guest3497
02:46
JimmyZ left
02:47
Guest3497 left,
JimmyZ joined
02:48
pencilk joined
02:51
molaf joined
|
|||
TimToady | <masak> module A { module UNIT::A {} } # clash? | 03:03 | |
yes, clash | 03:04 | ||
colomon | jnthn: I'm spectesting Prakash Kailasa's hyper patch, but I'm going to go to bed before it finishes, I think. | ||
TimToady | std: module A { module UNIT::A {} } | ||
p6eval | std 31008: OUTPUT«===SORRY!===Illegal redeclaration of symbol 'MY:file</tmp/NdCFDuauHW>::<A>' (from line 1) at /tmp/NdCFDuauHW line 1:------> module A { module UNIT::A ⏏{} }Check failedFAILED 00:01 114m» | ||
jnthn | colomon: OK. :-) | 03:05 | |
colomon: I've gotta take care of $dayjob for the next little while anyways. | |||
TimToady | in fact, nearly all your questions about module nesting are already answered by STD, though you might have to parse a .pm and examine the resulting .syml file to find the answer | ||
colomon | It gets at least another 40 tests passing! \o/ | ||
jnthn | colomon: \o/ | ||
colomon: We hit 33k yet? ;-) | 03:06 | ||
colomon | I dunno, but we're within 40 for sure, I think. | ||
jnthn | \o/ | ||
colomon | currently having git issues. :( | ||
jnthn | Good chance of us making that in the next 24 hours then :-) | ||
colomon | yes | 03:07 | |
bother, I just erased the working patch. :() | |||
:( | |||
jnthn | :( | 03:08 | |
colomon | easy enough to rebuild, now trying compile and hyper.t again. | 03:09 | |
03:10
krakan joined
|
|||
colomon | ack, things are completely confused here. | 03:10 | |
think I will go to bed and tackle it again in the morning. | 03:11 | ||
03:12
colomon left
|
|||
TimToady | the _reduced for <foo=.bar> is 'bar' in sTD | 03:15 | |
STD even | |||
03:19
Eevee left
|
|||
sorear | TimToady: What are the most important optimizations in gimme5? | 03:21 | |
TimToady | well, LTM itself prevents a great many false leads | 03:22 | |
the other biggie is avoiding lazymap | |||
via ratcheting | |||
sorear | Huh. I had never thought of LTM as an /opt/imization | 03:23 | |
TimToady | if you do the LTM at the termish level, you don't have to redo it at lower levels because the fate is already determined | 03:24 | |
sorear | hmm. I wonder if that's working | 03:25 | |
(in viv) | |||
TimToady | should be able to tell from the logs what probes are made and what fates are piced | 03:26 | |
*picked | |||
sorear | on the plus side, LTM lexer caching does not appear to be magically broken | 03:28 | |
sorear has a hunch that <.ws> is the most expensive rule | |||
how does HIGHEXPECT and MEMOS work? | 03:29 | ||
TimToady | which is why it is heavily optimized | ||
you could run NYTProf on viv | |||
I run it now and then on std | 03:30 | ||
generally cursor_fate is the most expensive routine | |||
since it's faking LTM | |||
well, it's doing LTM but not always efficiently | |||
@*MEMOS is indexed by pos in the original source | 03:31 | ||
each entry is a hash that, beside mapping back to line number, allows any other keys, such as <ws> for the whitespace memoization | |||
if <ws> is set, it's pointing back to the beginning of the whitespace here, and means "we already match ws here, don't do it again" | 03:32 | ||
also we set some hints for possible future error messages | |||
<nodecl> and such | |||
sorear ponders experimenting with packratism | |||
TimToady | probably won't get much | ||
because we don't backtrack much | 03:33 | ||
HIGHEXPECT records the rules we attempted at the highwater mark | 03:34 | ||
sorear | gimme5: sub ws__PEEK { '' } | ||
viv: sub ws__PEEK { '' } | |||
er | |||
TimToady | it's the list of expectations in 'expecting any of' messages | ||
sorear | sub ws__PEEK { $_[0]->_AUTOLEXpeek('ws', $retree) } | ||
aha, I was wondering how that worked | 03:35 | ||
sorear thinks this __PEEK difference is important | |||
03:35
cowyn left
|
|||
TimToady | I think ws is hardwired elsewhere to terminate LTM | 03:35 | |
so this PEEK shouldn't be important | |||
RE_ast:214 | 03:36 | ||
218 rather | |||
sorear | in general, though | ||
viv is currently hardwired to generate a single form of __PEEK | |||
sorear doesn't follow the <<DECL>> etc stuff in gimme5 and just cloned behaviorally | 03:37 | ||
ah, viv generates empty __PEEK for ws fail commit before after panic and anything declared using 'method' | 03:39 | ||
s/viv/gimme5/ | |||
viv doesn't generate __PEEK *at all* in those cases | |||
I'm also not generating EXPR__PEEK | 03:40 | ||
hmm | 03:52 | ||
die processing is pretty slow iirc | 03:53 | ||
maybe adding __PEEK stubs for things would be a big improvement | |||
except, no, that would only help autolexer generation | |||
which is Not The Bottleneck | |||
03:55
cli_ joined
|
|||
sorear | TimToady: Might changing the names of alternatives have broken anything? (ws_03 and ws_05 are now ws_0 and ws_1) | 03:56 | |
sorear quickly flips back and forth between two versions of "sub ws" looking for breakage | 03:57 | ||
lue | ohai | 04:00 | |
sorear | TimToady: Can you tell me anything about the hacks involved in autolexing EXPR? | 04:04 | |
dmpk2k | Does Perl6 have any method or function help at the REPL, like Python or Common Lisp? | 04:09 | |
sorear | rakudo: Any.^methods.Str.say | 04:11 | |
p6eval | rakudo dd0e5d: OUTPUT«can Numeric elems end reduce Str keys reverse isa uniq classify map pairs kv ACCEPTS min max pick first minmax does grep values join WHICH perl CREATE Capture PARROT bless WHENCE WHERE list notdef BUILDALL new Bool print say defined WALK item BUILD REJECTS clone» | ||
sorear | something like that? | ||
dmpk2k | Alas, nope. Fire up a python interpreter and type "help(dir)". | 04:13 | |
It shows you a description of what the dir() function does. | |||
lue | there's perldoc, but i'm not sure if that's part of the REPL itself. | 04:14 | |
04:15
cli_ left,
cli_ joined
|
|||
dmpk2k | Perldoc is good stuff, but it'd very oh-so-nice if there were allowanced for it at the REPL. | 04:16 | |
I don't use Python, but I use it all the time with Factor. | |||
lue | rakudo: perldoc | ||
p6eval | rakudo dd0e5d: OUTPUT«Could not find sub &perldoc in main program body at line 1:/tmp/TrJadigSqD» | ||
sorear | Perl6 is specced to have online help | 04:19 | |
dmpk2k | Awesome. :) | ||
sorear | it's stored in the .WHY interrogative of variables | ||
lue | but last I heard, REPL still has an feeble "memory", in that it can't remember variables from the last line. It still has a waaays to go. | 04:20 | |
sorear | there's a fork of the REPL from about two weeks ago with the ability to remember variables | 04:21 | |
pmichaud is working on a "real" version | |||
04:22
molaf left
|
|||
dmpk2k | rakudo: say.WHY.say | 04:24 | |
p6eval | rakudo dd0e5d: OUTPUT«Method 'WHY' not found for invocant of class 'Bool' in main program body at line 11:/tmp/yFmMBZvYyP» | ||
dmpk2k | So much for that guess. | 04:25 | |
sorear | there are no complete implementations of Perl 6 yet | 04:26 | |
pugssvn | r31009 | sorear++ | [viv] Optimize .*? and .*! to SCANs with special meta nodes | 04:28 | |
r31009 | Blocks don't need additional cutting | |||
lue | rakudo: 3.WHO.say; 3.WHAT.say | 04:30 | |
p6eval | rakudo dd0e5d: OUTPUT«Method 'say' not found for invocant of class 'Int' in main program body at line 11:/tmp/eKMULuByqJ» | ||
lue | :O | ||
that should work, right? | 04:31 | ||
rakudo: say 3.WHO; say 3.WHAT | |||
p6eval | rakudo dd0e5d: OUTPUT«IntInt()» | ||
04:40
am0c left
|
|||
sorear | oh, /nice/ | 04:49 | |
04:49
TiMBuS joined
|
|||
sorear | TimToady: apparently the .*? -> _SCANf optimization is Really Important | 04:50 | |
implementing it in viv made STD.pmc 36 times faster | |||
04:56
lue left
05:04
PZt left
05:20
am0c joined
|
|||
sorear looks through a 196MB viv.log | 05:22 | ||
05:29
pencilk left
|
|||
sorear | STD-on-viv-on-STD can't seem to handle character classes | 05:39 | |
hmm | |||
05:39
kaare joined
|
|||
sorear | /<[]>/ fails, tr/// succeeds | 05:39 | |
05:40
kaare is now known as Guest26513
05:42
dju joined
|
|||
moritz_ | good morning | 05:49 | |
PerlJam | morning moritz_ | 05:52 | |
sorear | good morning moritz_ | 05:53 | |
ok, I'm missing _PARAMS generation | |||
moritz_ is very pleased with rakudo's progress in last 7 days or so | 05:54 | ||
sorear | hah, viv-compiled-STD doesn't grok balanced punctuation | 05:56 | |
pugssvn | r31010 | sorear++ | [viv] Fix parameterized role autolexer generation (_PARAMS missing) | ||
sorear | it's willing to parse a character class if I spell it <[ a e i o u [> | ||
dalek | kudo: 5c09771 | moritz++ | t/spectest.data: run whatever.t again |
||
moritz_ | sorear: :-) | ||
pugssvn | r31011 | moritz++ | [t/spec] test that method not found error contains method name and line number | 05:59 | |
05:59
mempko joined
|
|||
sorear | wanted: a web changeset service for pugssvn | 06:00 | |
06:00
am0c left
06:01
mempko left
|
|||
sorear | found it | 06:05 | |
moritz_ | sorear: if you look at the IRC logs in /topic, all the r\d+ occurences are turned into links | 06:06 | |
as are many other things :-) | 06:07 | ||
sorear | excellent. moritz++ for telling me moritz++ for the logs | 06:08 | |
moritz_ | #perl6++ | 06:09 | |
most feature ideas and layout patches came here | |||
it was the first ugly-but-useful page I produced, and #perl6 people beautified it | 06:10 | ||
same with perl6.org (perl6-proejects.org back then) | |||
and same with proto.perl6.org | |||
sorear wonders if #perl6 made mowyw | 06:11 | ||
06:12
uniejo joined
|
|||
moritz_ | nope that was my own, pre-#perl6 invention | 06:12 | |
probably not really pre-#perl6, but shortly after I joined | 06:13 | ||
pugssvn | r31012 | sorear++ | [viv] Bracketize \xABCD in perl5-output | ||
sorear | yay, STD-viv can now parse bracketing delimiters | ||
moritz_ | \o/ | ||
sorear | one little bugfix at a time | 06:14 | |
moritz_ | rakudo: sub foo ($a where 5) { say "hi" }; foo(42); | ||
p6eval | rakudo dd0e5d: OUTPUT«Constraint type check failed for parameter '$a' in 'foo' at line 11:/tmp/ld2jH1UvGy in main program body at line 11:/tmp/ld2jH1UvGy» | ||
sorear | though I was rather in a quagmire not long ago; I had my ETA calculated as June 23, 2042 | ||
moritz_ | ETA for viv compiling STD.pm6 without errors? | 06:15 | |
sorear | no | ||
06:15
atomicstack left
|
|||
sorear | that's already here | 06:15 | |
however, it's miscompiling STD | 06:16 | ||
miscompilations are very problematic to debug | |||
moritz_ | with "without errors" I actually meant "correctly" | ||
sorear | ahhh | 06:17 | |
yeah. slow going. | |||
moritz_ | rakudo: my $x = "test"; given $x { say $_; m/(e.)/; say $/ } | 06:18 | |
p6eval | rakudo dd0e5d: OUTPUT«testAny()» | ||
sorear | erm... | ||
what does %<a> mean | |||
moritz_ | std: %<a> | 06:19 | |
p6eval | std 31010: OUTPUT«ok 00:01 114m» | ||
moritz_ | std: % <a> | ||
p6eval | std 31010: OUTPUT«===SORRY!===Non-declarative sigil is missing its name at /tmp/NT9FIN0XhR line 1:------> <BOL>⏏% <a>Bogus statement at /tmp/NT9FIN0XhR line 1:------> %⏏ <a> expecting twigilParse failedFAILED 00:01 111m» | ||
moritz_ has no idea | |||
rakudo: class Foo { }; my $x = "Foo"; my $y = $x.new; $y.WHAT.say; | 06:20 | ||
p6eval | rakudo dd0e5d: OUTPUT«Foo()» | ||
06:20
masonkramer joined
|
|||
sorear | STD.pm6 lines 3263-3265 contain 3 references to %<O><prec> syntax | 06:20 | |
gimme5 compiles this identically to $<O><prec> | |||
moritz_ | std: 1 R~= 2 | 06:21 | |
p6eval | std 31010: OUTPUT«ok 00:01 111m» | ||
moritz_ | rakudo: my $x = 3; 1 R~= $x; say $x | ||
p6eval | rakudo dd0e5d: OUTPUT«1» | 06:22 | |
moritz_ | rakudo: sub foo { my $a = 5; say $^a }; foo(7) | ||
p6eval | rakudo dd0e5d: OUTPUT«===SORRY!===Multiple declarations of lexical '$a'» | ||
sorear | \o/ I'm 100 lines down | 06:24 | |
pugssvn | r31013 | sorear++ | [viv] Translate the %<O> syntax found in STD | ||
sorear | that cuts about a year off my ETA at previous rate estimates :p | ||
moritz_ | somebody flagged rt.perl.org/rt3/Ticket/Display.html?id=62622 as [LHF] (pmichaud perhaps?) but I have no idea where to dig for it :( | 06:25 | |
sorear | LHF? | 06:26 | |
moritz_ | low-hanging fruit | 06:27 | |
06:31
masonkramer left
06:32
meteorjay joined
06:33
cognominal joined,
tedv| left
06:35
Su-Shee joined
|
|||
pugssvn | r31014 | sorear++ | [viv] « » needs to generate an Array | 06:41 | |
sorear | svn-- | 06:42 | |
moritz_ | it's pugssvn that has problems with UTF-8 | 06:43 | |
06:48
kda joined
|
|||
sorear | strange. now it's parsing :=, **, ++ fine, but not => | 06:51 | |
aha | 06:55 | ||
it's parsing :sym« => » as having literal spaces in the name | |||
screws up LTM | |||
06:58
ejs joined
|
|||
pugssvn | r31015 | sorear++ | [viv] We need to trim leading and trailing spaces in word quotes used as adverbs | 06:58 | |
sorear | jumped ahead *500* lines | 06:59 | |
3 years!!! | |||
07:02
ejs left
07:03
ejs joined
07:09
atomicstack joined
|
|||
Su-Shee | good morning. | 07:13 | |
cognominal | \o | ||
07:14
cli_ left
|
|||
sorear wishes he understood the contents of viv.log | 07:18 | ||
mathw | Morning | 07:25 | |
07:31
tomka joined
|
|||
sorear | TimToady: Why is $CTX only updated at certain places, instead of continuously in deb? | 07:32 | |
07:48
buubot left,
buubot joined
07:56
cosimo left
|
|||
pugssvn | r31016 | sorear++ | [viv-ecosystem] Add a tiny script to make comparing lexers easier | 07:57 | |
08:01
plobsing left
|
|||
pugssvn | r31017 | sorear++ | [cleanlex] Also deal with FATE index skew. | 08:04 | |
08:08
proller joined
|
|||
pugssvn | r31018 | sorear++ | [viv] One hack and two bug-compatibilities to improve LTM | 08:20 | |
sorear | it can now parse $<a> | 08:21 | |
there's something delightfully ironic about parsefailing in the parse error code. | 08:22 | ||
(line 1307) | |||
mberends | heh | 08:23 | |
sorear revises his ETA from June 26, 2042 to next Thursday | 08:24 | ||
mberends | that's better than "to *the* next Thursday" ;) | 08:25 | |
sorear | std: no Foo | ||
p6eval | std 31016: OUTPUT«Can't locate object method "explain_myster" via package "STD::P6" at STD.pm line 12432.FAILED 00:01 113m» | ||
pugssvn | r31019 | sorear++ | [STD] Fix a misspelled method name | 08:26 | |
mberends | tried to access SQLite via zavolaj yesterday. It required some signatures that Parrot doesn't yet support. In other experiments, it *did* create an empty database file before segfaulting. Committed the WIP anyway. | ||
sorear | mberends: go talk to plobsing | 08:27 | |
mberends | yes, will do that :) | ||
sorear | plobsing's parrot can handle any signature | ||
mberends | oh cool! | ||
moritz_ | sorear: local branch? | ||
sorear | er, wait | 08:33 | |
I forgot... it was an extension | 08:34 | ||
08:34
kel_ joined
|
|||
sorear | github.com/plobsing/parrot-libjit-fb | 08:34 | |
08:35
Ross joined
08:37
cosimo joined
08:40
Ross left
|
|||
pugssvn | r31020 | sorear++ | [viv] Global protoregex trait tables simulate inheritance | 08:40 | |
08:40
Ross joined
|
|||
pugssvn | r31021 | sorear++ | [viv] Ignore specific token signature if a proto token provided one, to prevent double shifting and lossage. (Is this the right approach?) | 08:46 | |
sorear | line 2438! | 08:47 | |
09:14
tomka left
09:29
PZt joined
09:30
Ross left
|
|||
pugssvn | r31022 | sorear++ | [viv] Add SUBSUME coalescing (acts like an optimization, but it turns out to be semantically critical) | 09:33 | |
sorear | can now handle 1 !~~ 1 | 09:35 | |
moritz_ hopes it returns False :-) | |||
sorear | no, it returns (3 pages of AST) | 09:36 | |
moritz_ | ah well | ||
sorear | you seem to have STD confused with a perl 6 implementation | 09:37 | |
STD.pm, having been compiled with STD.pm, just successfully parsed STD.pm | 09:39 | ||
\ | |||
o | |||
/ | |||
that actually wasn't intentional entering... | 09:40 | ||
moritz_ | looks like a cool move :-) | 09:41 | |
now it would be interesting if also rejects wrong Perl 6 programs :-) | |||
sorear: how long did it take (the parsing, that is)? | |||
sorear | out of scrollback, but 4-5 minutes | 09:42 | |
the same as gimme5 STD | |||
09:43
Ross joined
|
|||
sorear | STD stage 3 contains several <<ERROR>> markers, indicating that unprocessable (i.e. different and wrong) AST is still being generated in some cases | 09:45 | |
however, diff -u (stage 3) (stage 2) is 10,000 lines | |||
compared to a total of 60k lines | |||
09:46
azert0x joined
|
|||
moritz_ | too much if I understand you | 09:46 | |
sorear | I mean to say that STD-stage-2 has correctly compiled 80% of STD | ||
and successfully compiled 100% | 09:47 | ||
moritz_ | ok | ||
sorear -> sleep | 09:48 | ||
moritz_ | 'night | ||
Su-Shee | I have a sudden hunger for bacon. | 09:49 | |
moritz_ | chunky bacon? | 09:50 | |
Su-Shee | slices or chunks, but fried please. :) | ||
09:57
agentzh left
|
|||
Su-Shee | *HAHA* | 09:57 | |
my co-worker is from poland. _he_ got the name of zavolaj immediately. ;) | 09:58 | ||
09:59
masak joined
|
|||
masak | oh hai, #perl6 | 09:59 | |
phenny | masak: 30 May 19:03Z <sorear> tell masak : there is no 'package' statement in Perl 6. "package Foo;" is interpreted as meaning "use v5; package Foo;" to allow pure-Perl-5 modules to be used unaltered. STD implements this (partially) | ||
masak: 30 May 21:58Z <mathw> tell masak I pushed some changes to Form which make it build on my system, but the tests fail. The first failure is in the parsing tests with some fields not parsing, so maybe Form::Grammar is now out of date. | |||
masak | clearly activity kept being high after I left yesterday :) | 10:01 | |
mathw: given that there's a new underlying grammar engine now, that sounds probable :) | 10:02 | ||
moritz_ | mathw: biggest pitfal with the current grammar engine: backslash escape sequences in char classes are NYI | 10:03 | |
masak | sorear: if by 'package statement' you mean 'braceless package declaration', then I agree. I can see how it would be right for STD.pm6 to actually allow such a form, if it did enough p5. Rakudo, in its present form, should probably disallow it. | 10:04 | |
moritz_: I could probably implement those. but not before the Yapsi release. :) | |||
moritz_ | masak: in nqp-rx? that would be awesome | 10:05 | |
masak | I've done it before in Perl 6, so... :) | ||
moritz_ | it's currently the biggest source of workarounds in JSON::Tiny | ||
it also rates high in the often-discussed bugs on p6c | 10:07 | ||
jnthn | masak: We can make package an error, or a "is this Perl 5" kinda message, quite easily if that's the Right Thing to do. | 10:10 | |
mberends | std: package Foo; | 10:12 | |
p6eval | std 31022: OUTPUT«ok 00:01 114m» | ||
masak | alpha: say ?(chr(9) ~~ /<[\t]>/) # is this meant to work? | 10:14 | |
p6eval | alpha 30e0ed: OUTPUT«1» | ||
masak | oh, it does :) | ||
rakudo: say ?(chr(9) ~~ /<[\t]>/) | |||
p6eval | rakudo 5c0977: OUTPUT«0» | ||
moritz_ | rakudo: say ord("\t") | ||
p6eval | rakudo 5c0977: OUTPUT«9» | ||
moritz_ | rakudo: say ?('\\' ~ /<[\t]>/) | 10:15 | |
p6eval | rakudo 5c0977: OUTPUT«1» | ||
moritz_ | rakudo: say ?('t' ~ /<[\t]>/) | ||
p6eval | rakudo 5c0977: OUTPUT«1» | ||
masak notices with embarrassment that GGE doesn't implement this at all | |||
mathw | moritz_: no char classes in Form's grammar | 10:16 | |
masak: Yes. What I need is a grammar engine that tells me what it's doing :) | |||
masak | gnnnn. I really really need to write that GGE debugger. | 10:17 | |
mathw | heh | ||
masak | maybe I should convince someone to help me do it? it's really LHF at this point. | ||
mathw | I'll probably take another look at it later | ||
see if I can figure it out | |||
right now I need to have some breakfast | |||
moritz_ | rakudo: '12 abc ' ~~ /<?DEBUG(1)> <alpha>+/ | 10:18 | |
p6eval | rakudo 5c0977: OUTPUT«3/1: PASS at pos=6» | ||
moritz_ | not perfect, but better than nothing | 10:19 | |
mathw | could be just the key | ||
okay I'll look at it now | |||
and then I'll have breakfast | |||
okay now I'm confused | 10:22 | ||
the same field that's failing... passes if I run just that | |||
but doesn't run inside the test file itself | 10:23 | ||
so maybe it's not the grammar | |||
10:24
whiteknight joined
10:25
colomon joined
|
|||
mathw | oh | 10:26 | |
no my mistake | |||
it is the parsing | |||
bbkr | rakudo: my Rat $a; $a += 0.1 for ^10 # chcking if 74626 is fixed | 10:28 | |
p6eval | rakudo 5c0977: ( no output ) | ||
10:28
ejs left
|
|||
masak | well, it's resolved... | 10:28 | |
mathw | rakudo: grammar A { regex B { a } }; "a" ~~ A::B; | 10:29 | |
p6eval | rakudo 5c0977: OUTPUT«Can not find sub A::B in main program body at line 1» | ||
mathw | pah | ||
masak | mathw: that's a bug. it was submitted yesterday. | ||
mathw | it's enormously unhelpful | 10:30 | |
masak | mathw: workaround: rename the regex A::B | ||
jnthn | er | ||
huh | |||
How is that a bug? | |||
regexes are has scoped by default | 10:31 | ||
masak | oh. | ||
of course. | |||
jnthn | They're methods. | ||
masak | need to learn to think this new way. | ||
mathw | rakudo: grammar A { regex B { a } }; "a" ~~ A.B; | ||
p6eval | rakudo 5c0977: OUTPUT«Type objects are abstract and have no attributes, but you tried to access $!pos in 'A::B' at line 11:/tmp/CT2pH7kqHL in main program body at line 11:/tmp/CT2pH7kqHL» | ||
masak | mathw: that's calling the regex. | ||
not referring to it. | |||
jnthn | /<A::B>/ | ||
Or our regex and than &A::B | 10:32 | ||
masak | rakudo: grammar A { regex B { a } }; A.B | ||
10:32
tylerni7 left
|
|||
p6eval | rakudo 5c0977: OUTPUT«Type objects are abstract and have no attributes, but you tried to access $!pos in 'A::B' at line 11:/tmp/ydvRI0xwHf in main program body at line 11:/tmp/ydvRI0xwHf» | 10:32 | |
masak | slightly unhelpful error message there. | ||
mathw | rakudo: grammar A { regex B { a } }; "a" ~~ /<A::B>/; | ||
p6eval | rakudo 5c0977: OUTPUT«===SORRY!===regex assertion not terminated by angle bracket at line 11, near "::B>/;"» | ||
masak | would it be possible to get something like "oh, you tried to call me as a method, don't do that" | ||
? | |||
10:33
ejs joined
|
|||
masak | mathw: I don't think /<A::B>/ is implemented yet... :( | 10:33 | |
colomon | jnthn: seem to have a solid patch this morning.... | ||
jnthn | masak: gah, now *that* is annoying (<A::B> NYI) | ||
mathw | any chance it's LHF? | ||
masak | jnthn: glad we agree :) | ||
jnthn | mathw: Well, probably if you're pmichaud | 10:34 | |
mathw: Maybe even if you're not. :-) | |||
colomon: yay! | |||
mathw | because figuring out this Form thing without being able to call individual regexes in the grammar for testing is going to be a pain in the arse | ||
it's going to be a pain anyway, but... | |||
10:34
BrowserUk joined
|
|||
jnthn | masak: On the error, not quite sure what the best way to be more helpful would be. | 10:35 | |
masak: Perhaps though if it emits a signature with the invocant as :D when the binder supports that... | |||
...then at least the dispatch fails if you try and call the regex on the type object. | |||
masak | hm, yes. | ||
but until then, maybe we could have a check inside the regex method? | 10:36 | ||
jnthn | moze byt. | ||
masak likes how 'may be' and 'moze byt' are built from the same components | 10:37 | ||
10:37
atomicstack left,
zamolxes left
|
|||
jnthn | masak: Well, it's more literally "can be" | 10:37 | |
masak | and 'may' means...? :) | 10:38 | |
it comes from a proto-Germanic root *mag-, which indicates ability. | 10:40 | ||
jnthn | heh | ||
Nice | |||
Perhaps that's proto-indo european; Russian "I can" is могу for example. :-) | 10:41 | ||
masak | from proto-Indo-European *mogh/*megh meaning 'power', from Sanskrit mahan, 'great'. it's related to 'might'. | ||
yes, they're probably related. | |||
I never thought of that. | 10:42 | ||
jnthn | Cute. | ||
Su-Shee | "to understand the meaning of perl 6 modules, please refer to Linguistics 0.1 for beginners and consult a Sanskrit grammar of your choice. Knowledge in attic greek and japanese is helpful." | 10:43 | |
10:43
Lorn joined
|
|||
masak | even the etymology for the month May flows out of that same river. | 10:43 | |
jnthn | Grr. If validating XML, helps to actually load the document you're planning to validate into the reader before calling .Validate(). | ||
On the upside, the first XML schema I ever wrote in my life...works straight off. | |||
Su-Shee | masak: I thought may comes from mars actually? | 10:44 | |
10:44
JimmyZ left
|
|||
jnthn | It's "Mars" the word for May in...some romance language? | 10:44 | |
Su-Shee | yes. | 10:45 | |
jnthn is very rusty on romance | |||
*romance languages | |||
:) | |||
masak | Su-Shee: no, it seems to come from the greek goddess Maja/Maia, whose name has to do with might and power. | 10:46 | |
Su-Shee | no, I'm wrong and confusing it with march ;) | ||
just looked it up. :) | |||
jnthn | Oh! | ||
:-) | |||
Su-Shee | jnthn: *HAHAHAHA* :) | ||
masak | Swedish for Match is 'mars' :) | ||
jnthn | masak: Match or March? :-) | 10:47 | |
masak | er. | ||
my typo disaster seems to not be limited to yesterday. :( | |||
jnthn | Jag har en Marsbjekt! | ||
masak | March. of course. | ||
jnthn: 'ett objekt' :) | |||
jnthn | :-) | 10:48 | |
masak: Gradually adding words to my "these take ett" list. :-) | |||
masak | should probably have a list of 'these take en' instead... :) | ||
it will be shorter. | 10:49 | ||
jnthn | masak: Huh? Aren't there a lot more common gender ones? | ||
masak | let me check. | ||
jnthn | I thought there were way more of those. :) | ||
masak | yep. you're right. common gender is around 75%. | 10:50 | |
jnthn | Wow, even higher than I'd thought. | 10:51 | |
(I had thought maybe 2/3-ish) | |||
masak | according to Wikipedia. | ||
and there's a handy rule for detecting the 'ett'-form nouns. | |||
jnthn | (IIUC, masculine and feminine genders merged to common a while back.) | ||
A rule? :-D | |||
masak | if the plural indefinite form is the same as the singular indefinite form, it's a t-word. | ||
'ett bord' -- 'flera bord'. t-word. | 10:52 | ||
the converse of the rule doesn't hold. | |||
jnthn | Yeah. :-( | ||
So unless you go learning the plural indefinite forms of everything first...that only helps so much. | |||
masak | sorry :/ | 10:53 | |
jnthn | Nice to know though. | ||
Though...it sounds familiar. | |||
masak | I've probably said it before. | ||
jnthn | I think I may have run into it and then discarded it as "not much use" :-) | ||
I'm very much liking the "verbs in the present tense have just one form" thing though. | 10:54 | ||
Rather than, like, six. :-) | |||
Su-Shee | you are clearly not talking about german. ;) | ||
masak | jnthn: there are two if you read slightly older texts. | ||
but even that is pretty ok. | |||
jnthn | masak: Ah, OK. I haven't run accross that. | 10:55 | |
masak: I have run accross remenants of masc/fem though. | 10:56 | ||
lillebror vs lillasyster | |||
mberends | Dutch is also a bit gender-confused. But I think French takes the cake for "un livre" and "une livre" meaning completely different things | ||
masak | jnthn: aye. and 'gamle'/'gamla', and 'käre'/'kära'. | 10:57 | |
mberends: that's not confusion, that's efficiency :P | 10:58 | ||
jnthn | masak: I love the whole grandparents thing though. | 10:59 | |
Su-Shee | dutch is nice with their like three or four irregular verbs ;) | ||
jnthn | masak: mormor/morfar/farmor/farfar is so nice and logical. | ||
masak | aye. wouldn't have it any other way. | ||
jnthn | In English its ambiguous. | ||
barnbarn is cute too :-) | |||
masak | jnthn: there's farbror and mo(sy)ster, too. | 11:00 | |
er, mo(rsy)ster. | |||
jnthn | Oh, wow. | ||
masak | lunch & | ||
jnthn | swedish++ | ||
11:02
ejs left
|
|||
colomon | jnthn: 32,983 passing tests, one fail. | 11:03 | |
rakudo: <a b> X, <1 2> | 11:04 | ||
p6eval | rakudo 5c0977: ( no output ) | ||
colomon | rakudo: (<a b> X, <1 2>).perl.say | ||
jnthn | colomon: oh noes a fel! | ||
p6eval | rakudo 5c0977: OUTPUT«("a", "1", "a", "2", "b", "1", "b", "2")» | ||
jnthn | colomon: What fails? | ||
colomon | [~]«( <a b> X, <1 2> ) | 11:05 | |
I kind of think the test may be wrong. | |||
jnthn | Ah. :-) | ||
colomon | It expects the result to be a1 a2 b1 b2 | ||
11:07
ejs joined
|
|||
colomon | that's assuming <a b> X, <1 2> produces something like (a, 1), (a, 2), (b, 1), (b 2) | 11:07 | |
and you can then run [~] on each of those pairs. | |||
jnthn | Ah | 11:08 | |
Well, it probably should produce something like that, but then the [~] implies flattening list context. | |||
I guess you'd need to explicitly stick the parcel into slice context (which is NYI in Rakudo) for that to work. | 11:09 | ||
colomon | but "dwimmy hyper operator works recursively for any object matching the Iterable role" | ||
and (a, 1) is Iterable, isn't it? | |||
jnthn | I hope so. :-) | ||
colomon | I'm just going to fudge that one. and maybe TimToady can wander by and tell us if it correct or not. | 11:11 | |
jnthn | Good plan. :-) | ||
jnthn is still a tad hazy on all that area | |||
colomon | well, and you can get the same effect by doing X~ and skipping the hyper bit altogether. | 11:12 | |
11:12
ejs left
|
|||
dalek | kudo: aebd0c5 | (Solomon Foster)++ | src/core/metaops.pm: Extend hyper to handle nested lists / arrays. Patch courtesy of Prakash |
11:14 | |
pugssvn | r31023 | colomon++ | [t/spec] Refudging and tweaks for nested hyper. | 11:15 | |
11:17
ejs joined
|
|||
colomon | now to have a bit of noms and then try to knock off 20 more tests... | 11:19 | |
11:19
Ross left,
Ross joined
|
|||
jnthn | colonom++ | 11:20 | |
.oO( noms sound like a good idea... ) |
|||
11:22
zamolxes joined
11:42
azert0x left
11:43
alanhaggai joined
|
|||
masak | phenny: tell lue that you asked why trigonometry entered into the complex version of &exp. there's an exciting field called 'complex analysis' which holds the exact answers, but the short story is that 'it all fits'. :) the closeness between exp and sin/cos can be seen through their Taylor series. | 11:45 | |
phenny | masak: I'll pass that on when lue is around. | ||
moritz_ | or the short explanation: exp(i phi) = cos(phi) + i sin(phi) | 11:46 | |
masak | yes, but how to explain *that* without pulling out of your hat? | 11:47 | |
the explanation for that is that the (only possible) analytic extension of the real part of exp becomes just that. | 11:48 | ||
which is slightly unstatisfactory until you learn the math to prove it. | |||
moritz_ | right :-) | ||
I think I forgot that part of my math already :-) | |||
11:48
DJ-DONGDOT joined
|
|||
moritz_ | I dimly remember the results, though | 11:49 | |
11:50
DJ-DONGDOT left
|
|||
moritz_ | but yeah, taylor expansion is a good way to show it | 11:50 | |
masak | complex analysis ranks among the most beatiful subfields of math I've studied. it's fantastic, especially given that complex numbers are relatively non-obvious, yet almost as well-behvaed as reals. | ||
it's like a cave of riches set up to reward curious mathematicians. :) | 11:51 | ||
colomon has to admit he preferred real analysis. | |||
11:51
envi^home joined
|
|||
masak | rakudo: say 3 «*» (1,2,3,4) | 11:52 | |
p6eval | rakudo 5c0977: OUTPUT«36912» | ||
masak | why does that not give an error? | ||
colomon | why would it? | ||
moritz_ never really got to chose, given that he usually picked subjects by physical interest, not mathematical | |||
masak | colomon: because the 'lists' are of different shape. | ||
oh wait, the arrows are pointing outwards... :) | 11:53 | ||
moritz_ | rakudo: say 3 >>*<< (1, 2, 3, 4) | ||
p6eval | rakudo 5c0977: OUTPUT«Sorry, left side is too short and not dwimmy. in 'hyper' at line 137:CORE.setting in 'hyper' at line 150:CORE.setting in main program body at line 1» | ||
masak | nice, error. it refers to two different things by 'left side' though :P | ||
11:53
colomon_phone joined
|
|||
masak | s/,// | 11:54 | |
colomon_phone | lost the last couple of lines there... | ||
moritz_ | colomon_phone: masak confused >>*<< with <<*>> | 11:55 | |
masak | aye. :/ | ||
colomon_phone | gotcha. :) | 11:56 | |
11:57
colomon left
|
|||
jnthn | Aye, that error could be slightly clearer, methinks. | 11:57 | |
colomon_phone | I was just working on hyper on hashes, but ran out of battery with a couple of wee issues left. | ||
11:58
azert0x joined
|
|||
moritz_ wonders if working on Str.trans would make a good Weekly Challenge | 12:01 | ||
colomon_phone | I forgot to check aNd see if hyperhaSh wAs in alphA.... | ||
12:01
proller left
|
|||
moritz_ | rakudo: say {1 => 2, 3 => 4} >>*<< 3 | 12:02 | |
masak | moritz_: it would sure be a nice (re-)addition to Rakudo. | ||
p6eval | rakudo 5c0977: OUTPUT«Sorry, right side is too short and not dwimmy. in 'hyper' at line 127:CORE.setting in 'hyper' at line 150:CORE.setting in main program body at line 1» | ||
moritz_ | alpha: say {1 => 2, 3 => 4} >>*<< 3 | ||
p6eval | alpha 30e0ed: ( no output ) | ||
moritz_ | masak: that much is for sure; other questions I have to ask myself is whether it's doable for a novice, or which parts of it, and how much to request | 12:03 | |
takadonet | morning all | 12:04 | |
colomon_phone | o/ | 12:05 | |
12:05
clintongormley joined
12:07
colomon_phone left
12:08
ejs left
|
|||
masak | moritz_: has any task proven too difficult yet, in the sense that no-one has attempted it? | 12:14 | |
moritz_ | masak: nope | ||
masak | I must say I'm pleasantly surprised seeing *new* people contribute things each week. | 12:16 | |
moritz_ | huh. Our federal president just stepped down. That's surprising. (off-topic, sorry) | ||
masak | that indicates that we should probably spread out as much as possible, task-wise, so as to tickle as many people as possible at least once. | ||
Su-Shee | moritz_: uhm what? *click* ;) | 12:24 | |
moritz_ | Su-Shee: like www.tagesschau.de/inland/koehlerrue...tt100.html | 12:25 | |
npq: $_ := 3; say(.uc) # I know this blows up, just want to know at which point | 12:26 | ||
nqp: $_ := 3; say(.uc) # I know this blows up, just want to know at which point | 12:27 | ||
p6eval | nqp: OUTPUT«Confused at line 1, near "say(.uc) #"current instr.: 'parrot;HLL;Grammar;panic' pc 528 (src/cheats/hll-grammar.pir:196)» | ||
Su-Shee | moritz_: already like 5 tabs open with news ;) | ||
12:28
kda left
12:29
colomon joined
|
|||
Su-Shee tststs. | 12:31 | ||
12:31
JimmyZ joined
12:42
proller joined
|
|||
masak | what would be a fitting logotype for Yapsi? | 12:59 | |
jnthn | Some kind of 6 looping back on itself somehow? | 13:00 | |
moritz_ | a disc world standing on top of elephants on top of a giant turtle | ||
masak | all 6-es loop back on themselves :P | ||
jnthn | (since it's Perl 6 implemented in Perl 6) | ||
moritz_ | "it's turtle all the way down" | ||
colomon | shouldn't be a giant parrot? | ||
jnthn | masak: Well, you could think of a loopier one :-) | ||
masak | a turtle is kinda nice. | ||
moritz_ | jnthn: a mobius strip might symbol that very well | 13:01 | |
colomon | camels on a parrot... | ||
jnthn | Ooh, yes. | ||
colomon | spectesting hyper hash patch now. | ||
jnthn | I think for a logotype, the camel would kinda dwarf the Parrot, if you did relative sizes. ;-) | ||
masak likes the Möbius strip idea | |||
jnthn: and the butterfly would be bigger than both :P | |||
Juerd | Möbius-6? | 13:03 | |
masak | I can see how one could perhaps make a Klein bottle look like a 6... | ||
a Möbius strip kinda looks like a 0 or an 8 no matter how you bend it. | 13:04 | ||
jnthn | Well, it'd need to be small for a logotype I guess... | ||
;-) | |||
Su-Shee | please no animal.. I beg you. | ||
masak | :) | ||
Su-Shee | I'm so tired of all the cute cutesy open source cuddly thingies.. | 13:05 | |
masak | Su-Shee: we could have a non-cuddly animal. | ||
jnthn | Dugong | ||
Su-Shee | no. rejected by commitee. :) moebius stripe is good! | ||
jnthn | Grizzly bear | ||
Su-Shee | naked molerat. | ||
masak | Velociraptor. | 13:06 | |
13:07
atomicstack joined
|
|||
masak | though that's more a Perl 5 symbol ;) | 13:07 | |
Su-Shee | that's dino park and will trouble a) mozilla, b) disney and c) Warner Bros. ;) | ||
masak | dang. :P | 13:08 | |
Su-Shee | design something escher like, afaik there's a couble of mathematically highly complex islamic ornaments. | ||
masak | yeah, because we want to trouble Islam rather than Disney. :P | ||
Su-Shee | the use of an ornament is perfectly fine. | 13:09 | |
was just an example islamic art has plenty of pretty ornaments. | |||
moritz_ | it's funny, when you read parrot-dev you'll see that allison and I proposed very similar syntaxes for matching PAST nodes, only did she express it pythony and I perly :-) | 13:10 | |
13:10
ejs joined
|
|||
moritz_ | and basically at the same time | 13:10 | |
(I saw here mail come when I finished writing mine, but didn't read it before sending) | |||
masak | multiculturalism++ # both re Islamic art and re Perl/Python | ||
13:11
Guest26513 left
|
|||
jnthn | moritz_: It occured to me that Perl 6 signature syntax is perhaps powerful enough for that. | 13:12 | |
moritz_ | woooh. | ||
13:12
Kejohm joined
|
|||
jnthn | PAST::Op $node (:$returns where 'Pair', *%) | 13:13 | |
13:13
Kejohm left
|
|||
moritz_ | it gets clumsy when it comes to repetition though | 13:14 | |
jnthn | Repetition? | 13:15 | |
moritz_ | "5 child noeds that all return 'Int'" | ||
masak .oO( junctions ) | 13:16 | ||
moritz_ | *nodes | ||
masak: so how do you express the 5 as a junction? | |||
masak | moritz_: I don't. I measure the length of the list of children. | ||
moritz_ | no problem with where { ... } blocks. But that's not declarative anymore | 13:17 | |
13:18
[mark] left
|
|||
colomon | 33,019 passing tests! | 13:28 | |
moritz_ | rakudo: say 2**15 | ||
p6eval | rakudo aebd0c: OUTPUT«32768» | ||
masak | \o/ | ||
pugssvn | r31024 | colomon++ | [t/spec] Unfudge the hyper hash tests. | ||
moritz_ | hugme: tweet rakudoperl Rakudo now passes more than 2**15 tests! #perl6 | ||
hugme hugs moritz_; tweet delivered | |||
masak | it would be interesting to research when Rakudo passed the other 2 ** $n thresholds... | 13:29 | |
and then blog about it. | |||
colomon | moritz_: we've actually been above 2**15 for a few days now. :) | ||
moritz_ | masak: should be a SMOP, given docs/spectest-progress.csv | ||
masak | oh! indeed. | ||
moritz_ | colomon: I know, but nobody twittered it so far :-) | 13:30 | |
colomon | moritz_++ | ||
best part is, there are obvious further hyper hash tests needed. | |||
and a couple of obvious extensions to the current functionality which will be both super-cool and need even more tests. :) | |||
dalek | kudo: 7a2ede9 | (Solomon Foster)++ | src/core/metaops.pm: Simple implementation of hyper on hashes. |
13:32 | |
Wolfman2000 | Over 65K tests...man, that's a lot. | ||
...wait, I added an extra exponent | |||
masak | we passed 2**8 on 2008-05-25, 2**9 on 2008-06-01, 2**10 on 2008-06-27, 2**11 on 2008-08-05, 2**12 on 2008-09-28, 2**13 on 2009-04-04, 2**14 on 2009-10-03. | 13:33 | |
that last one was the trig tests, I think :) | |||
we almost reached 2**15 with alpha. so close. | 13:34 | ||
jnthn suspects 2**16 is going to tkae us a little while. :-) | 13:36 | ||
moritz_ | well, the exponentials are hard to get by | ||
masak | not at all, there's an infinite supply of them. aleph zero. | 13:38 | |
they're hard to get *past*, though. :P | |||
increasingly harder, even. | |||
colomon | masak: I have one word for you. | ||
automatically-generated-tests | |||
(okay, it's only one word in German. :) | 13:39 | ||
jnthn | Most things are. :-) | ||
moritz_ | not even there :-) | ||
jnthn | Aww. | ||
moritz_ | disappointing, I know | 13:40 | |
just when you need it | |||
13:40
kaare joined,
kaare is now known as Guest10356
13:43
kda joined
|
|||
colomon | Is there a non-modifying postfix numeric operator in p6? | 13:46 | |
moritz_ | .succ (can't call that an operator though) | ||
colomon | should have a test for it too, though. | 13:47 | |
13:48
Ross left
|
|||
jnthn | ! is the obvious one to define and test. | 13:48 | |
cognominal | mberends: reading baklog "But I think French takes the cake for "un livre" and "une livre" meaning completely different things"; yes, but I don't think they are so many homographs with meaning changed according to gender in French. | ||
arnsholt | There's only a handful | 13:49 | |
13:49
BrowserUk left
|
|||
mberends | oui, c'est vrai | 13:49 | |
13:49
ruoso joined
|
|||
arnsholt | There's un tour/une tour as well, but that's the only one that comes to mind right know | 13:49 | |
moritz_ | very rare in German | 13:50 | |
colomon | jnthn: but if I have to define it, that's an unrelated area of code being tested. | ||
arnsholt | Very rare in any language I think. It's just asking for confusion | ||
13:50
uniejo left
|
|||
jnthn | colomon: Troo. | 13:50 | |
moritz_ can only come up with one example on the spot, and it's pretty weird | 13:51 | ||
colomon | jnthn: doing it anyway, cause can't think of anything better. | ||
moritz_ | (der Moment = the moment; das Moment = angular force) | ||
jnthn | (different meanings by gender) I think never happens in Slovak, especially given gender is very reliably predictable by the way the noun ends. | ||
(Which was *such* a nice thing. :-)) | 13:52 | ||
cognominal | I had a thread here about some french adjectives changing meaning with place (before or after name, like "grand") or gender ("public", well when specifically used with "femme" or "homme). But these are mere curiosities too. | 13:53 | |
That will be fun when we will design Perl 6 grammars with appropriate among context to translate languages. | 13:55 | ||
That will change from automated statistical methods in fashion today. | 13:56 | ||
s/among/amount of/ | 13:57 | ||
14:03
plobsing joined
14:09
PacoLinux joined
14:10
tylerni7 joined
|
|||
arnsholt | cognominal: I'm not sure Perl 6 grammars are the right tool for NLP | 14:12 | |
14:12
masonkramer joined
|
|||
arnsholt | AFAIK most people work with formalisms that are more unification-based rather than CFG-based | 14:13 | |
But LFG does use CFGs in c-structure | |||
(But that's only a part of the formalism) | |||
14:22
Ross joined
14:26
ejs left,
Ross left
14:27
Ross joined
14:34
Ross left
14:35
JimmyZ left
14:39
Ross joined
|
|||
moritz_ | pmichaud++ # it would be hilarious to have Rakudo as a dependency for the PAST optimizer | 14:40 | |
14:43
Ross left
|
|||
Juerd | c | 14:45 | |
s/c// | |||
cognominal googles for the TLAs arnsholt throws at me :) | 14:47 | ||
masak | pmichaud: I'm surprised at the lack of curlies around the where expression. can that work? even if it can, is it good style? | ||
std: sub foo($a where $a and $a) {} | 14:48 | ||
p6eval | std 31024: OUTPUT«===SORRY!===Unable to parse signature at /tmp/8ESmlgwaku line 1:------> sub foo(⏏$a where $a and $a) {}Couldn't find final ')'; gave up at /tmp/8ESmlgwaku line 1:------> sub foo($a where $a ⏏and $a) {} expecting any | ||
..of… | |||
14:48
Ross joined
|
|||
masak | thought so :) | 14:48 | |
moritz_ | masak: can't work with 'and', would have to be '&' for a smart-matchable junction | ||
masak | yes. that'd work. | ||
still, questionable to omit the closure there, IMO. | |||
jnthn | It's a precedence issue there. | ||
std: sub foo($a where $a && $a) {} | |||
p6eval | std 31024: OUTPUT«===SORRY!===Unable to parse signature at /tmp/kwzajBi5pl line 1:------> sub foo(⏏$a where $a && $a) {}Couldn't find final ')'; gave up at /tmp/kwzajBi5pl line 1:------> sub foo($a where $a ⏏&& $a) {} expecting any | ||
..of:… | |||
jnthn | heh | 14:49 | |
moritz_ | but then you'll probably need parens around the sub-smartmatch | ||
jnthn | std: sub foo($a where ($a && $a)) {} | ||
p6eval | std 31024: OUTPUT«ok 00:01 113m» | ||
jnthn | Aye, probably wise. | ||
moritz_ | std: sub f($x where $a & $a) { } | ||
p6eval | std 31024: OUTPUT«===SORRY!===Variable $a is not predeclared at /tmp/AxcNzZ2l6n line 1:------> sub f($x where $a⏏ & $a) { }Variable $a is not predeclared at /tmp/AxcNzZ2l6n line 1:------> sub f($x where $a & $a⏏) { }Check failedFAILED | ||
..00:… | |||
moritz_ | std: sub f($x where $x & $x) { } | ||
p6eval | std 31024: OUTPUT«ok 00:01 113m» | ||
masak | I've used an &-junction of roles in a where clause. that feels OK, for some reason. | 14:50 | |
subtypes, too. | 14:51 | ||
probably because it feels so declarative. | |||
jnthn | It's OK so long as you don't expect it to play into candidate ordering. | 14:53 | |
14:54
Ross left
|
|||
jnthn uses Rakudo to generate test data sets for $dayjob | 14:54 | ||
moritz_ | \o/ | ||
another productive use of Perl 6 :-) | |||
jnthn | heh, good enough data set to crash the thing it was testing :-) | 14:56 | |
15:03
patspam joined
15:04
takadonet left
15:07
plobsing left,
__2synth joined
|
|||
dalek | kudo: 4f9ca44 | (Solomon Foster)++ | src/core/metaops.pm: Handle single-arg hash hypers as well. |
15:09 | |
pugssvn | r31025 | colomon++ | [t/spec] Single-op hyper hash tests. | 15:10 | |
15:11
synth left
15:12
__2synth left
15:13
tedv| joined
|
|||
bbkr | rakudo.org is down :( | 15:16 | |
cosimo | while (! ordered(@list)) { @list = shuffle(@list) } | 15:18 | |
how do i do that in perl6? | |||
and hi everyone :) | 15:19 | ||
moritz_ | @list.=pick(*) while ! [<=] @list | ||
cosimo | moritz_: wow, cool | 15:20 | |
moritz_ | I see you want to implement RandomSort, with average exponential run time :-) | ||
cosimo | moritz_: i want to add a code example here | ||
en.wikipedia.org/wiki/Bogosort | |||
moritz_ | rakudo: my @l = 3, 1, 2; @l.=pick(*) while ![<=] @l; say @l.perl | 15:21 | |
p6eval | rakudo 7a2ede: OUTPUT«[1, 2, 3]» | ||
moritz_ | wow, there's even a name for it... didn't know that :-) | ||
rakudo: my @l = 3, 1, 2; @l.=pick(*) until [<=] @l; say @l.perl | 15:22 | ||
p6eval | rakudo 7a2ede: OUTPUT«[1, 2, 3]» | ||
moritz_ | even nicer | ||
cosimo | amazing | ||
moritz_ wonders if .classify would make radix sort in Perl 6 really awesome | 15:27 | ||
I'm sure we can beat the python implementation by a factor of two in code length :-) | 15:28 | ||
15:29
Trashlord left
|
|||
masak | rakudo: my @a = "!", a => "1", b => "2", c => "3"; my ($name, %opts) = @a; say %opts.perl # RT #74302 | 15:30 | |
p6eval | rakudo 7a2ede: OUTPUT«{"a" => "1"}» | ||
masak | please fix this. :/ | ||
15:30
Trashlord joined
|
|||
moritz_ | masak: you can hope for pmichaud's magical list refactoring | 15:30 | |
15:30
BrowserUk joined
|
|||
cosimo | en.wikipedia.org/wiki/Bogosort#Perl_6 | 15:31 | |
\o/ | |||
moritz_ | rakudo: my @l = 3, 1, 2; @l .= pick(*) until [<=] @l; say @l.perl | 15:32 | |
p6eval | rakudo 7a2ede: OUTPUT«[1, 2, 3]» | ||
moritz_ | rakudo: my @l = 3, 1, 2, 4, 5; @l .= pick(*) until [<=] @l; say @l.perl | ||
p6eval | rakudo 7a2ede: OUTPUT«[1, 2, 3, 4, 5]» | ||
cognominal tries to wrap his head around NativeCall.pm6 in zavolaj | |||
moritz_ | wow, still within the time limit | ||
cosimo | moritz_: wikipedia doesn't have perl6 syntax highlighting, guys :-) | ||
we need to tell them | |||
moritz_ | and then they'll ask how to parse Perl 6 | 15:33 | |
and we point them to STD.pm6 | |||
and they say "ugh" and move along | |||
hugme: tweet rakudoperl Bogosort #perl6 example at en.wikipedia.org/wiki/Bogosort#Perl_6 | |||
hugme hugs moritz_; tweet delivered | |||
cosimo | :) | 15:34 | |
pmichaud | (parens or curlies in where clause) yeah, I knew I was potentially mangling the syntax. otoh, I wanted to make it look less complex and line-noisy | 15:35 | |
moritz_ | cheating! :-) | ||
15:35
rgrau joined
|
|||
pmichaud | besides, sometimes the spec itself changes in response to use cases like this :-P | 15:35 | |
15:36
meppl joined
|
|||
pmichaud | masak: the list refactoring fixes RT #74302 | 15:36 | |
right now I consider list refactoring to be highest priority -- higher than closures or anything else, if only because Rakudo's current broken implementation is leading people down far too many false paths. | 15:37 | ||
masak | agreed. | ||
moritz_ | +0.9 | ||
(the other 0.1 parts scream "but @other_stuff is important too!!11!" :-) | |||
masak | closures are easily workaroundable and not something people stumble on until after a while. | ||
15:38
takadonet joined
|
|||
moritz_ | pmichaud: if you have a plan for void-context-detection in PAST, could you write a few lines about it, and hope that somebody else takes it up? | 15:38 | |
pmichaud | moritz_: it's faster for me to write it than to explain it. | 15:40 | |
I mainly need to decide what to name the node type. | 15:41 | ||
moritz_ | ok | ||
pmichaud | so, suggestions there would be helpful. :) | ||
I've already somewhat rejected PAST::Context | |||
because "context" is often too overloaded a word. | |||
moritz_ | it really depends on the use case | 15:42 | |
do you want it to return a boolean value? | |||
pmichaud | no | ||
moritz_ | or more a IfVoidContext? | ||
pmichaud | it's a node that says "if the caller expects xyz type, return the result of compiling self[0], otherwise return self[1]" | 15:43 | |
but it's a compile time return, not a run-time one. | |||
(thus it's not really the same as PAST::Op(:pasttype<if>, ...), which is a runtime test. | 15:44 | ||
masak | lol i blogged: use.perl.org/~masak/journal/40371 | ||
moritz_ | masak: undef is gone. You probably meant Nil or Mu or something. # wouldn't that be s/Mu/Any/? | 15:46 | |
it's really rare that Mu is actually needed | |||
masak | moritz_: I've only ever needed Nil, but since Nil misbehaves in some cases, I used Mu instead. but I can change it to Any. | 15:48 | |
cognominal | Masak, I am not sure you say anywhere in your blogs what CGE is | ||
GGE! | |||
masak | cognominal: I could provide a link. | ||
the README explains what it is. | |||
cognominal | I guess that this suppose cloning or looking to a git repository? | 15:49 | |
masak | sorry, what? no, you can read the README online. | 15:51 | |
moritz_ | GGE is not in proto's projects.list :( | 15:52 | |
15:53
zostay joined
|
|||
masak | o.O | 15:53 | |
please, someone feel free to add it. | |||
mberends | hokay, in a few minutes | 15:54 | |
masak is a bit too scattered at the mo' | 15:55 | ||
moritz_ could resist the urge to point out that masak++ has commit access to proto :-) | |||
masak | :) | 15:57 | |
moritz_ | time to go home... | ||
masak | I usually add my own projects. GGE was a secret project at first, so that's how it avoided being added, I guess. | 15:58 | |
16:04
ruoso left
|
|||
pmichaud wonders when masak++ will register sekritprojects.org. Or did he do that already and not tell anyone?!? ;-) | 16:05 | ||
afk for a while | 16:09 | ||
masak | pmichaud: I'm not sure you've grokked the essence of a sekrit project :P | ||
(1) it doesn't need a website :) | 16:10 | ||
16:19
ruoso joined
|
|||
cosimo | tried to summarize my interpretation of the bogosort snippet, it was a fun ride. hope it's not too much bullshit | 16:22 | |
my.opera.com/cstrep/blog/2010/05/31...t-in-perl6 | |||
mberends has a sekrit website at 192.168.1.2 | 16:24 | ||
moritz_ | cosimo: FYI, @list.pick(3) would pick three random elements from @list | ||
cosimo: so .pick(*) could be read as "pick all" | |||
cosimo | oh, ok, now it makes sense | 16:25 | |
masak | swimming & | 16:31 | |
16:31
masak left
16:34
avar joined
|
|||
avar | duuudes | 16:35 | |
16:36
synth joined
16:37
lest_away joined
|
|||
avar | does rakudo really need to run spectests with --jobs? It churned up to load ~40 before I managed to kill it, hovering at load ~3 with just one test process | 16:37 | |
16:37
lest_away is now known as lestrrat,
athomason joined
|
|||
moritz_ | do you have, like, very little memory available? | 16:38 | |
anyway, you can disable it with an env variable (see README) | |||
16:38
mdxi joined
|
|||
avar | I have ~500MB of RAM free, since some tests seem to take 200-300MB of memory and I have 4 cores spectest seesm to require at least 1.2GB to be comfortable with --jobs | 16:39 | |
Anyway. Yes I can tweak it. It's just a bit unfriendly to have that as the default when rakudo is eating this amount of resources, that's all. | 16:40 | ||
Maybe it could adjust the --jobs count based on free memory | |||
16:40
mdxi left
|
|||
moritz_ | I wouldn't oppose it, but I don't know how to do it in a way that doesn't break everythiing except linux | 16:41 | |
so the proverbial "patches welcome" holds, in lack of a friendlier way to phrase it (I don't mean to be rude) | |||
Su-Shee | dinner, code. | 16:45 | |
16:47
pmurias joined
16:50
mdxi joined
|
|||
sorear | I just expect everything to run -j1 unless instructed otherwise | 16:58 | |
17:01
finanalyst joined
|
|||
colomon | btw, 33,043 passing tests, and I'm just getting started on the hyper hash stuff, there are a lot of neat cases to add code and tests for. ;) | 17:02 | |
partying with family now, however. | 17:03 | ||
17:04
envi^home left
17:06
takadonet left,
skids joined
17:11
Ross joined
|
|||
bbkr | rakudo: say (none() ~~ all()); say (none() ~~ any()); # what is the logic behind junction comparision in this case? if none() is the whole universe then it should be "1" in both cases, am i right? | 17:12 | |
p6eval | rakudo 4f9ca4: OUTPUT«10» | ||
moritz_ | rakudo: say all() ~~ none() | 17:13 | |
p6eval | rakudo 4f9ca4: OUTPUT«1» | ||
moritz_ | that's easy to understand at least | ||
17:15
orafu joined
|
|||
moritz_ | ./parrot_install/bin/parrot --hash-seed 1 perl6.pbc t/spec/S05-capture/caps.rakudo | 17:15 | |
fails | |||
bbkr | i understand it this way: in "set theory" none() can be represented as a whole universe with excluded empty element. while all() is empty element. so all() ~~ none() should be 0. | 17:17 | |
moritz_ | do you means s:g/element/sset/ ? | ||
for all x element A $predicate is true for empty A in mathematics | 17:18 | ||
because it's defined as | |||
not exists x element A !$predicate | |||
(uhm, set, not sset) | |||
bbkr | indeed, thanks, it's clear now. moritz_++ | 17:19 | |
17:20
fda314925 left
17:21
fda314925 joined
|
|||
moritz_ | rakudo: 'abc' ~~ /<alpha>/; $<alpha> = 5; say $<alpha> | 17:27 | |
p6eval | rakudo 4f9ca4: OUTPUT«Cannot assign to readonly value in '&infix:<=>' at line 1 in main program body at line 11:/tmp/xJObQUaCPT» | ||
jnthn | That "at line 1" is bull. | 17:29 | |
17:29
patrickas joined
|
|||
patrickas | sabaho perlsixers | 17:29 | |
jnthn | o/ patrickas | 17:30 | |
moritz_ | oh hai | ||
patrickas really enjoyed the perl6 bogosort thingy :) | |||
hello moritz_, jnthn | |||
jnthn | There's a name for even the silliest algorithms. :-) | 17:31 | |
moritz_ | actually it's a non-algorithm | ||
at least I've learned in my CS classes that an algorithm has to terminate | |||
jnthn | It'll terminate when a Rakudo memory leak causes the process to be killed. | 17:32 | |
;-) | |||
moritz_ | wow, I get random parrot + rakudo behaviour even if I set hash seed by command line option | 17:35 | |
jnthn | On chunks.t? | 17:37 | |
moritz_ | caps.t | 17:38 | |
but it doesn't need .caps or .chunks to reproduce | |||
Su-Shee | mberends: Unable to find module 'FakeDBD::CSV' in the @*INC directories. Did I miss something? | 17:42 | |
(while make-ing) | |||
17:44
pmurias left
|
|||
patrickas | I'm going over the perl6 advent calendar making sure all the example work on rakudo.... | 17:45 | |
in day 2 the one liner at the bottom does not work on windows (quotes need to be inverted) which is not rakudo's fault, but could be mentioned in the post | 17:46 | ||
mberends | Su-Shee: oops, that's a bit of the future that hasn't been backported to the present yet ;) | ||
please comment out any mention of FakeDBD::CSV | |||
also, this points out a need to 'soft fail' on unmet dependencies. hmm. | 17:47 | ||
Su-Shee | ah, there it is. | 17:48 | |
17:54
cdarroch joined,
cdarroch left,
cdarroch joined,
Jedai joined
|
|||
avar | moritz_: The current behavior is obviously how the devs prefer it. I don't see how to patch it without mucking up the current behavior. | 17:55 | |
moritz_: I just try to check out perl biannualy. Tested it on a linode and had to hard-kill it from a console because it locked up the box in ~30 load because I ran spectest and went away for tea ;/ | 17:56 | ||
running it on one core was pretty cpu/memory heavy too, but it got through it | |||
Su-Shee | ha. I knew it. Positional of Str. | ||
mberends | yes, all you probably needed was to call the same lib func once per column. | 17:58 | |
Su-Shee | yes. darn. ;) | ||
17:59
pmurias joined
|
|||
sorear | well, you see, the devs are running on real computers | 18:01 | |
with 3+ GB of memory and 4+ cores | |||
patrickas | rakudo: my $b = Nil; $b //= 7; say $b; | 18:04 | |
p6eval | rakudo 4f9ca4: OUTPUT«» | ||
patrickas | rakudo: my $b = Any; $b //= 7; say $b; | ||
p6eval | rakudo 4f9ca4: OUTPUT«7» | ||
18:06
atomicstack left
|
|||
Su-Shee | mberends: that kind of sub with returns Positional of Str - what is that exactly? why doesn't it have ; and why is { ... } ok? | 18:06 | |
mberends | Su-Shee: it's how zavolaj registers native functions as subs | 18:08 | |
Su-Shee | mberends: it looks nice. | 18:09 | |
mberends | the data types determine how values are sent to / returned from the lib | ||
jnthn++ for zavolaj | |||
jnthn | Su-Shee: Esssentially, it uses Perl 6 signature introspection to map args to C types and, but the Parrot NCI does most of the hard work really. :-) | 18:10 | |
s/ and// | |||
Su-Shee | what it does I understand basically - I was wondering about the style. | ||
jnthn | Su-Shee: { ... } is just a stub - essentially the body is replaced by something that magically forwards the call to the C library | ||
It'd actually work fine with just an empty block too. | 18:11 | ||
18:11
gbacon joined,
TiMBuS left
|
|||
jnthn | But I like it with the ... as "something to come here" :-) | 18:11 | |
Su-Shee | jnthn: that's zavolaj specific or a basic p6 feature? | ||
jnthn | Su-Shee: Which bit? The ... ? | ||
Su-Shee: That's general syntax for declaring stub code. | |||
Su-Shee | jnthn: looks like "..." as in "well you know what to do" ;) | ||
jnthn | rakudo: sub foo() { ... }; say foo() | ||
p6eval | rakudo 4f9ca4: ( no output ) | ||
jnthn | ...huh | ||
oh, locally it says "Stub code executed" | 18:12 | ||
Don't know what's up with p6eval. | |||
mberends | rakudo: ... | ||
p6eval | rakudo 4f9ca4: ( no output ) | ||
Su-Shee | I'm always envious when ruby folks have that pretty shortened code. | ||
18:14
molaf joined,
kda left
|
|||
Su-Shee | submethods? when did that happen? | 18:17 | |
pmurias | pages.cs.wisc.edu/~liblit/pldi-2009-b/ # a really cool way of automatically generating bindings to c libraries | 18:21 | |
mberends | Su-Shee: the ... spec: perlcabal.org/syn/S03.html#line_2223 | ||
Su-Shee | ah, nice. | 18:22 | |
"stubby exception generators" - noone will believe me if I say this. :) | 18:23 | ||
jnthn | Just wait until you have to tell them about phasers. :-) | 18:25 | |
Su-Shee | aaah I just forgot a ++ on saturday.. I'm such an idiot. :)) | 18:26 | |
jnthn: I already tried. ;) | |||
moritz_ | jnthn: in a parameter trait, will I be able to get a reference to multi candidate it's in? | 18:27 | |
18:27
tedv| left
|
|||
moritz_ | ie for multi foo($x is autothreaded, ... ) I want to grab the current candidate to add a few more of them | 18:27 | |
in the 'autothreaded' trait handler | 18:28 | ||
jnthn | moritz_: Hmm...not quite sure how that'd work. | 18:33 | |
moritz_: Maybe it could be made available as some contextual. | |||
moritz_ | that might work, yes | ||
jnthn | Dunno, I can see the use case. Probably needs more thought. Nobody implemented parameter traits yet. | 18:34 | |
(as in, custom ones) | |||
They're not so hard to do, mind. | |||
patrickas | rakudo: my $b = Nil; $b //= 7; say $b; #Is that supposed to print 7 ? | 18:35 | |
p6eval | rakudo 4f9ca4: OUTPUT«» | ||
moritz_ | I think so, yes | 18:36 | |
rakudo: say (my $b = Nil).defined | |||
p6eval | rakudo 4f9ca4: OUTPUT«1» | ||
moritz_ | rakudo: say (my $b = Nil).perl | ||
p6eval | rakudo 4f9ca4: OUTPUT«()» | ||
patrickas | rakudo: say Nil.defined; | 18:37 | |
p6eval | rakudo 4f9ca4: OUTPUT«0» | ||
moritz_ | it should be the other way round :-) | ||
Nil.defined should be True, and assignment to a variable should turn it into Any | |||
jnthn | nomtime! | 18:38 | |
moritz_ already had some tasty nom | |||
Su-Shee had egg salad with green asparagus. | |||
moritz_ had white asparagus yesterday - 0.5kg per person :-) | 18:39 | ||
pugssvn | r31026 | moritz++ | [t/spec] fudge randomly failing tests for Rakudo | 18:40 | |
Su-Shee | minimum :) | ||
18:46
alanhaggai left,
masonkramer left,
alanhaggai joined
|
|||
moritz_ | rakudo: pir::sleep(Inf); say "alive" | 18:47 | |
p6eval | rakudo 4f9ca4: OUTPUT«===SORRY!===The opcode 'sleep_p' (sleep<1>) was not found. Check the type and number of the arguments» | ||
moritz_ | rakudo: pir::sleep_vN(Inf); say "alive" | ||
p6eval | rakudo 4f9ca4: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P45') in file 'EVAL_1' line 65===SORRY!===syntax error ... somewhere» | ||
moritz_ | rakudo: pir::sleep__vN(Inf); say "alive" | ||
p6eval | rakudo 4f9ca4: ( no output ) | 18:48 | |
18:49
clintongormley left
18:51
clintongormley joined
|
|||
Su-Shee | \o/ someid somedata something somethingelse ;) | 18:51 | |
moritz_ | not the classical 'fooid foo bar baz'? :-) | 18:52 | |
18:52
masak joined
|
|||
Su-Shee | it's from fetchrow_hashref :) | 18:53 | |
patrickas | rakudo: sub lsay(@a) { @a.perl.say }; lsay (1, 2, 3, 4)>>++; | 18:54 | |
p6eval | rakudo 4f9ca4: OUTPUT«Cannot assign to readonly value in '&infix:<=>' at line 1 in 'hyper' at line 5466:CORE.setting in main program body at line 1» | ||
patrickas | Is that the right behaviour ? | 18:55 | |
moritz_ | yes | ||
just like 1++ is forbidden | |||
patrickas | yea that makes sense ... it it strage that it is used as an example in the advent calendar ... maybe alpha was buggy .... | 18:56 | |
moritz_ | it was | ||
avar | moritz_: Just t/spec/integration/advent2009-day17.t takes ~600MB to run. It seems it (and maybe tests like it) are actually the main problem | 18:59 | |
I can't run it to completion without locking up my box | |||
moritz_ | avar: we'll probably move some of those tests to an extra test target | 19:00 | |
avar | should I file a bug for it? | ||
moritz_ | if you feel like, yes | ||
avar | (is there a bug reporting tool?) | ||
moritz_ | nope | ||
avar | email? | 19:01 | |
moritz_ | [email@hidden.address] | ||
19:01
tri1 joined
|
|||
masak | heh. the Wikipedia user who made the bogosort addition has made one edit in total. :) | 19:02 | |
pugssvn | r31027 | moritz++ | [t/spec] test for RT #61772, *@a is copy messed up in Rakudo | 19:03 | |
moritz_ | 100% Perl 6 contributions! | ||
patrickas | rakudo: my @a = (1, 2, 3, 4) ; @a >>/=>> 2; #I know this is the same case but it feel like it should dwim | 19:04 | |
p6eval | rakudo 4f9ca4: OUTPUT«Cannot assign to readonly value in '&infix:<=>' at line 1 in 'hyper' at line 143:CORE.setting in 'hyper' at line 150:CORE.setting in main program body at line 1» | ||
dalek | kudo: cde6abe | moritz++ | src/core/system.pm: enable argumentless sleep(); closes RT #57294 |
||
moritz_ | patrickas: that one should work | ||
masak | ah, it's cosimo++. :) | ||
patrickas | oh ok in that case I'll add a test for it | 19:05 | |
moritz_ | when it's assigned to an array first, it has a mutable container | ||
that's why this case is supposed to work, but not the one before | |||
19:06
masonkramer joined
|
|||
avar | moritz_: ok, sent | 19:06 | |
moritz_ | avar++ | ||
19:08
finanalyst left
|
|||
moritz_ | rakudo: sub f($x) as Int { "12" }; say f(3).perl | 19:10 | |
p6eval | rakudo 4f9ca4: OUTPUT«===SORRY!===Could not find sub &trait_mod:<as>» | ||
moritz_ | rakudo: sub f($x as Int) { say $x.perl }; f("42") | 19:14 | |
19:14
bluescreen joined
|
|||
p6eval | rakudo 4f9ca4: OUTPUT«42» | 19:14 | |
19:14
bluescreen is now known as Guest56962
|
|||
moritz_ | where's that implemented? in the binder somewhere? | 19:14 | |
jnthn | moritz_: Yeah | ||
moritz_: The compiler knows about that one. | 19:15 | ||
moritz_ | when I have a type object, how do I coerce to that type in current Rakudo? | 19:16 | |
ooh, I know | |||
my $typename = $type.WHAT.perl() | |||
$obj."$typename"() | |||
Su-Shee | I have a stupid question.. "self" without $ .. where does that come from? | 19:17 | |
moritz_ | rakudo: sub f($x) { $x }; &f.wrap({ say "foo" }); f(3) | ||
p6eval | rakudo 4f9ca4: OUTPUT«No such attribute 'proxy' in class 'Sub' in main program body at line 1» | ||
moritz_ | Su-Shee: from the compiler | ||
Su-Shee: a bit like 'this' in C++ | |||
Su-Shee | wait, am I just confused now.. | 19:18 | |
moritz_ | bah. If &sub.wrap was working, implementing 'as' coercion would be a piece of cake | ||
Su-Shee | I'm just confused. | 19:19 | |
perl 5 and 6 and javascript is too much. | |||
masak | Su-Shee: consider 'self' as a special term that is defined within the confines of a method body. | 19:20 | |
pugssvn | r31028 | patrickas++ | Added test for in-place operators | ||
19:22
masak left
|
|||
jnthn | moritz_: Yeah, wrap needs re-doing for master. | 19:30 | |
pugssvn | r31029 | patrickas++ | Added test for map form and hyperoperator form. | 19:34 | |
r31030 | moritz++ | [t/spec] test for RT #64310, $^a after my $a | 19:38 | ||
19:39
patrickas left
19:43
molaf left
|
|||
moritz_ | rakudo: my @a=1,2,3; say ( ^@a ).perl | 19:45 | |
p6eval | rakudo 4f9ca4: OUTPUT«0..^3» | ||
moritz_ | rakudo: say :(3).params[0] | 19:47 | |
p6eval | rakudo 4f9ca4: OUTPUT«Parameter()<0x1d90c70>» | ||
moritz_ | rakudo: say :(3).params[0].constraints | 19:48 | |
p6eval | rakudo 4f9ca4: OUTPUT«3» | ||
jnthn | rakudo: say :(3).params[0].type | ||
p6eval | rakudo 4f9ca4: OUTPUT«Int()» | ||
jnthn | nice :-) | ||
pugssvn | r31031 | moritz++ | [t/spec] Test for RT #70720, :(3) has the 3 available to introspection | 19:51 | |
19:54
lue joined
|
|||
lue | hello! | 19:55 | |
phenny | lue: 11:45Z <masak> tell lue that you asked why trigonometry entered into the complex version of &exp. there's an exciting field called 'complex analysis' which holds the exact answers, but the short story is that 'it all fits'. :) the closeness between exp and sin/cos can be seen through their Taylor series. | ||
moritz_ | rakudo: say '4' ~~ /<-alpha>/ | ||
p6eval | rakudo 4f9ca4: OUTPUT«4» | ||
moritz_ | rakudo: say '4' ~~ /<!alpha>/ | ||
p6eval | rakudo 4f9ca4: OUTPUT«» | ||
20:01
tri1 left
20:02
Psyche^ joined
|
|||
pugssvn | r31032 | moritz++ | [S05] correct think in .trans example | 20:03 | |
r31032 | | |||
r31032 | A zero-width assertion doesn't do us any good here. | |||
moritz_ | I'm currently thinking about how to implement Str.trans | 20:04 | |
and I find that I have a hard time coming up with an efficient scheme | 20:05 | ||
that handles both regexes and literals as patterns well | |||
any ideas? | 20:06 | ||
20:06
Patterner left,
Psyche^ is now known as Patterner
|
|||
moritz_ | rakudo: my @x = <a b d>; say 'a' ~~ /@x/; say 'c' ~~ /@x/; | 20:10 | |
p6eval | rakudo 4f9ca4: OUTPUT«» | ||
moritz_ | huh? I thought that was working... | ||
lue heads for S32::String [Or whatever it is] | |||
jnthn | moritz_: me too... | 20:12 | |
lue | wow. The spec is a big help on str.trans [at least in S32] | ||
</sarcasm> | |||
moritz_ | lue: perlcabal.org/syn/S05.html#Transliteration | ||
jnthn | rakudo: my $x = <a b d>; say 'a' ~~ /$x/; say 'c' ~~ /$x/; | ||
p6eval | rakudo 4f9ca4: OUTPUT«» | ||
jnthn | rakudo: my $x = 'a'; say 'a' ~~ /$x/; say 'c' ~~ /$x/; | ||
p6eval | rakudo 4f9ca4: OUTPUT«a» | ||
jnthn | :-S | 20:13 | |
lue | lets see... if I were to type "hi".trans("i" => "o") I would get "ho" ? | 20:16 | |
moritz_ | rakudo: tr/a/b/ | ||
p6eval | rakudo 4f9ca4: OUTPUT«===SORRY!===Confused at line 11, near "tr/a/b/"» | ||
moritz_ | alpha: say "hi".trans("i" => "o") | ||
p6eval | alpha 30e0ed: OUTPUT«ho» | ||
lue | I would imagine some sort of translation. The easiest I see is literal -> regex, then all you deal with is a regex. | 20:18 | |
moritz_ | and then you have to determine which regex matched | 20:19 | |
lue | alpha: say "Help keep our e's on earth!".trans("e" => " ") | ||
p6eval | alpha 30e0ed: OUTPUT«H lp k p our 's on arth!» | ||
moritz_ | so either you need some cleverness involved there, or match each regex separately (expensive) | ||
lue | or, if you want to be crafty, the other way around | 20:20 | |
regex -> literal | |||
alpha: say " something or other about whitespace".trans( / \s+ / => ' ' ) | 20:21 | ||
p6eval | alpha 30e0ed: OUTPUT« something or other about whitespace» | ||
sorear | moritz_: { make $replacement_str } | ||
moritz_ | sorear: so... compile each alternative to a separate proto regex? | ||
20:22
Su-Shee left
20:23
Su-Shee joined
|
|||
sorear | moritz_: or just put them in a single alternation | 20:24 | |
moritz_ | with eval? or how do I get the { make $replacement} into each branch? | ||
perlgeek.de/blog-en/perl-6/contribu...trans.html lolihazblogth | 20:29 | ||
jnthn | moritz_++ | 20:31 | |
20:31
justatheory joined
|
|||
moritz_ | having a simple variant would already help me for JSON::Tiny :-) | 20:32 | |
(probably could come up with such a thing in 10 minutes... but others should have fun too) | |||
Su-Shee had her fun for today and pushed it out already. ;) | 20:34 | ||
20:34
eternaleye left
|
|||
lue | what is the difference between s/// and tr/// ? | 20:34 | |
moritz_ | s/ab/cd/ will replace 'ab' by 'cd', but leave 'a' alone | 20:35 | |
tr/ab/cd/ will replace each a by c, and each b by d | |||
also tr does global transliteration, s/// defaults to one substitution only (needs :g for all) | |||
lue | alpha: say "abra".trans("ab"=>"cd") | 20:36 | |
p6eval | alpha 30e0ed: OUTPUT«cdrc» | ||
lue | ah. Well, there goes using s/// :P | ||
20:39
kda joined
|
|||
sorear | tr/// also does left-to-right longest token matching | 20:44 | |
there is no reasonable way to change \" into " in a string while allowing backslashes to be escaped using s/// | 20:45 | ||
with tr, it's trivial | |||
20:46
jaldhar left
|
|||
moritz_ | example? | 20:46 | |
sorear | "\\\\" -> "\\\\", "\\\"" -> "\"" | ||
20:46
jaldhar joined
|
|||
moritz_ | I mean, tr example? | 20:46 | |
sorear | that was the tr example | ||
moritz_ | I don't see a tr/ in there | 20:47 | |
sorear | I don't know the tr syntax offhand | ||
lue | rakudo: say '"' | ||
p6eval | rakudo cde6ab: OUTPUT«"» | ||
moritz_ | as I understand S05, you can't do that with tr directly, only with the method form | 20:48 | |
(ok, it's nit-picking, I admit) | |||
20:49
eternaleye joined
|
|||
Su-Shee | <-- bed. tomorrow cleanup. good night everyone. :) | 21:02 | |
jnthn | o/ | ||
21:07
Su-Shee left,
kel_ left
21:08
Guest56962 left
|
|||
lue | rakudo: $/<a><b>; say "Alive!" | 21:09 | |
p6eval | rakudo cde6ab: OUTPUT«Method 'postcircumfix:<{ }>' not found for invocant of class '' in main program body at line 1» | ||
sorear | viv can handle that :> | 21:10 | |
lue | My question is: where'd the { } come from? | ||
moritz_ | from the < > | ||
see S02 and S05 | |||
lue | afk | 21:12 | |
21:12
Ross left,
Guest10356 left
21:26
kda left
|
|||
sorear | TimToady: How does ./std precompile modules? Looking at it it seems to just be a thin wrapper over STD->parsefile | 21:26 | |
pugssvn | r31033 | sorear++ | [viv] In $<foo> = (bar), for gimme5 compatibility, disable binding to $0. | 21:32 | |
21:38
pnate joined
|
|||
pmurias | sorear: would it be difficult to expose viv as a library so i could conviently get access to VAST for mildew (without resorting to evil tricks to subvert the executable)? | 21:42 | |
sorear | The VAST-generating part of viv already is a library | 21:43 | |
use STD; use Actions; STD->parsefile(..., actions => 'Actions')->{_ast} | 21:44 | ||
21:45
rgrau left
|
|||
sorear | 'Actions' dynamically generates VAST::foo classes; the VAST:: classes "defined" in viv are most correctly viewed as supercede class VAST::foo { ... } | 21:45 | |
pmurias | ok thanks will attempt to remove the hackery tommorrow | 21:48 | |
21:52
kda joined,
kda left
|
|||
sjohnson | std: my $a; | 21:57 | |
p6eval | std 31032: OUTPUT«ok 00:01 114m» | ||
21:58
ruoso left
22:02
pmurias left
22:11
pnu joined
22:20
pyrimidine joined
|
|||
pyrimidine | regarding Str.trans, I had an implementation working on my github fork | 22:21 | |
22:24
pnu left
22:26
pnu joined
|
|||
[Coke] | phenny: tell patrickas to check the advent tests in t/spec/integration | 22:26 | |
phenny | [Coke]: I'll pass that on when patrickas is around. | ||
pyrimidine | moritz_: here is the latest version for Str.trans that was passing tests (including closures) gist.github.com/420337 | 22:27 | |
moritz_: the alternation capture is really slowing things down, though | 22:28 | ||
could be optimized | |||
moritz_: In the gist, it's called trans2 (I implemented a version of .trans in Cool-str.pm that broke at some point). | 22:33 | ||
22:40
pyrimidine left
22:46
pyrimidine joined
|
|||
pyrimidine | phenny: tell moritz_ that there is a partially working .trans implementation (including closures and :d, :s) at gist.github.com/420337, but there are issues with regex name mapping. Also, odd bug with array version mapping (tests with " <>&" string are not parsing). | 22:51 | |
phenny | pyrimidine: I'll pass that on when moritz_ is around. | ||
23:01
orafu left,
orafu joined
23:29
azert0x left
23:31
pyrimidine left
23:38
masonkramer left
23:54
clintongormley left
|