»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:00 Chillance left, Chillance joined 00:04 thou left 00:08 raiph joined
raiph blogs.perl.org/users/perl_6_reports...09-01.html 00:22
00:23 spider-mario left, raiph left 00:28 ggoebel__ joined 00:30 Chillance left 00:35 leont left 00:36 dayangkun joined 00:40 test joined
TimToady wonders what the best way to spec a longest-list zip is when you don't know which list is shorter 00:45
00:45 benabik left 00:46 benabik joined
TimToady in particular, I'm still not entirely happy with rosettacode.org/wiki/Same_Fringe 00:51
the current solution won't work when we differentiate lexotic gather/take from dynamic 00:52
since one of the takes is dynamic, and the other lexical
so one gather cannot service both, as it stands 00:53
also, just using a sentinal value is kinda bogus anyway
00:54 scott_ joined, scott_ is now known as Guest90598
TimToady but a longest-list zip has to specify what to do when there's only one value 00:54
and there are several possibilities 00:55
1. return value X when there's only one argument
2. assume X for any missing argument 00:56
3. assume A for missing left argument, or B for missing right argument
(when the operation isn't symmetrical, such as division) 00:58
we can probably assume that 2 is a degenerate case of 3, and maybe even 1 in some cases 00:59
so maybe what we want to say is that Z returns the short list, or until both lists are explicitly infinite 01:00
colomon hmmm 01:01
TimToady that could be an expensive test though 01:02
1 is also covered mostly by the shorter rule plus $value xx *, if you can chop that off at the length of the longer list somehow 01:04
but maybe we should use an adverb here
colomon I've never been completely comfortable with that, I've got to admit. (Just was looking at a piece of code like that in Math::Polymnnomial.)
I was thinking adverb, but thought you'd sworn them off. :) 01:05
TimToady well, I was trying to think of a way to base the default on the operator's nullary value, but that's actually kinda wrongish
the nullary of infix:<===>() is True 01:06
colomon is crazily imagining a function -> $last-left, $last-right, $current-left, $current-right { ... }
if both lists end, Z stops. if one ends, you call the specified sub with those arguments, or end if no sub was specified. 01:08
ugly but relatively thorough.
all fringe($a) Z=== fringe($b) :extend({ False; }) 01:10
TimToady that's the 1 case, I guess
01:11 stopbit left
colomon yeah 01:11
TimToady :default(A,B) for 3 maybe
:default(A,A) handles 2, or maybe just :default(A) 01:12
colomon yeah, that seems not unreasonable.
TimToady this might or might not be related to wanting the right side of X to allow a closure based on the left argument 01:13
so you can do triangular subscripts
01:13 hypolin joined 01:14 tokuhiro_ joined
TimToady for ^@x X -> $x { $x ..^ @y} -> $x,$y {...} or some such 01:14
though really one would like sugar that looks more like: 01:15
for ^@x -> $x X $x..^@y -> $y {...}
currently the only way to do that is with nested for loops 01:16
likewise multidimensional subscripts across a ;
but probably not related the the longest-Z problem 01:17
since in this case we're calling a closure to produce the entire right-hand list
not just processing missing args
one almost wants a form of 'for' that puts the list in between the -> and the {} 01:22
for -> $x, $y (^@x X $x..^@y) {...}
but that's not feasible without better distinguishing syntax 01:23
since () is valid in sigs already
there are also solutions that implicitly refer to the arg on the left 01:24
colomon TimToady: any idea why the rule list { '(' [ <parameter> [',' <parameter>]* ] ')' } would get me an error in Rakudo and work fine in Niecza? 01:25
TimToady ^@x X *..^@y # if it weren't that * already means something to ..
colomon "Too many positional parameters passed; got 2 but expected 1" is the error.
and I got the same when I said <parameter>* % ',' 01:26
TimToady * rather than + ?
your first formulation is equiv to +%, not *%
colomon I think I actually want * rather than, but I've tried both, and I'm mostly just trying to get anything to work. 01:27
TimToady is it really a rule with sigspace?
colomon (just checked, and * % works fine with niecza too.)
I'm not completely sure I understand sigspace, but I think it is.
I need to allow whitespace around the commas. 01:28
TimToady you're only allowing whitespace before the first comma
you need space after the second <param>
01:29 fgomez left
TimToady and with the old whitespace rules, you might need [<parameter> ]* % [',' ] or some such 01:29
colomon does sigspace give you <.ws>+ or <.ws>*? The spec seemed unclear to me. 01:30
TimToady you never quantify ws
it covers multiple spaces all by itself
it's different from \s+
colomon I'm pretty sure both of those appear in the S05.... 01:31
TimToady sincerely doubt it 01:32
colomon yeah, I can't find it now. may have been hallucinating.
does <.ws> match the null string? is it more like \s* ? 01:33
TimToady it does if it's not between alnums
between alphanums is \s+ instead 01:34
well, and comments
and pod....
:)
or however you've defined token ws... 01:35
01:35 test__ joined
colomon going back to my initial question: any notion why this stuff would blow up in Rakudo? 01:38
01:39 fgomez joined
colomon ah. got it. apparently you can't name a rule "list" in Rakudo. 01:40
wonder if that's a known rakudobug?
TimToady++ 01:44
sorear I think it is
01:44 yarp joined
sorear tbh I'm suprised it works in niecza 01:44
01:46 FROGGS__ joined 01:48 FROGGS left 01:49 test__ left 01:50 FROGGS joined 01:51 FROGGS_ left, whiteknight left
colomon no heredocs in rakudo? 02:04
02:04 erkan joined, erkan left, erkan joined 02:08 dayangkun left 02:12 Rg12 joined
sorear colomon: afaik no 02:14
colomon grumble, grumble, grumble
02:21 orafu left, orafu joined 02:22 jeffreykegler joined, cognominal_ left 02:24 skids left, dayangkun joined 02:27 tokuhiro_ left 02:33 Rg12 left 02:37 cognominal_ joined 02:43 jeffreykegler left 02:47 jeffreykegler joined 02:50 erkan left 02:53 erkan joined, erkan left, erkan joined 02:55 erkan left 02:56 erkan joined 03:13 thou joined 03:14 ^ivan`` is now known as ivan`` 03:25 test left 03:27 cognominal_ left 03:51 jeffreykegler left 04:06 dayangkun left 04:19 dayangkun joined 04:23 dayangkun left 04:36 dayangkun joined 04:41 mucker left 05:19 thou left
moritz \o 05:29
masak o/ 05:35
sorear Φ 05:39
TimToady |o| 05:40
05:42 fhelmberger joined
yarp r: say [+] 1 .. 100; 05:46
p6eval rakudo 962b9b: OUTPUT«5050␤»
05:48 erkan left, erkan joined, erkan left, erkan joined 05:58 FROGGS__ left 05:59 FROGGS left 06:01 cognominal_ joined 06:12 nodmonkey joined 06:18 nodmonkey left 06:24 eiro left 06:28 eiro joined
dalek d: 2b0f93d | larry++ | STD.pm6:
'use v6' was clobbering %*LANG
06:30
d: 116afb0 | larry++ | STD_P5.pm6:
'use v6' was clobbering %*LANG
d: fb53aa3 | larry++ | boot/ (2 files):
rebootstrap
06:49 erkan left, dayangkun left 07:01 stepnem joined, dayangkun joined, brrt joined 07:09 FROGGS__ joined, FROGGS joined
masak rn: { say "Another nice day in $^locale" }("Perl 6 land") 07:10
p6eval rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«Another nice day in Perl 6 land␤»
masak \o/
sorear sleep&
masak rn: my ($c1, $c2) = ({ my $i = 0; { $i++ } }() for ^2); say $c1() for ^5; say $c2() for ^5 07:12
p6eval niecza v21-1-ga8aa70b: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Int␤ at /tmp/AKDEvh9386 line 1 (mainline @ 8) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4138 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4139 (module-CORE @ 571)…
..rakudo 962b9b: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Int'␤ in at src/gen/BOOTSTRAP.pm:826␤ in any at src/gen/BOOTSTRAP.pm:810␤ in block at /tmp/KBxucdHwxb:1␤␤»
masak rn: my ($c1, $c2) = ({ my $i = 0; { $i++ } } for ^2); say $c1() for ^5; say $c2() for ^5
p6eval niecza v21-1-ga8aa70b: OUTPUT«0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤»
..rakudo 962b9b: OUTPUT«No such method 'postcircumfix:<( )>' for invocant of type 'Int'␤ in at src/gen/BOOTSTRAP.pm:826␤ in any at src/gen/BOOTSTRAP.pm:810␤ in block at /tmp/gxAf866dXL:1␤␤»
masak hm.
07:12 yarp left
masak rn: my ($c1, $c2) = ({ my $i = 0; -> { $i++ } } for ^2); say $c1() for ^5; say $c2() for ^5 07:12
p6eval rakudo 962b9b: OUTPUT«0␤1␤2␤3␤4␤0␤1␤2␤3␤4␤»
..niecza v21-1-ga8aa70b: OUTPUT«{ ... }␤{ ... }␤{ ... }␤{ ... }␤{ ... }␤{ ... }␤{ ... }␤{ ... }␤{ ... }␤{ ... }␤»
FROGGS good morning 07:13
masak FROGGS! \o/
sorear: I'm with Rakudo on this one. what's Niecza up to?
07:15 dayangkun left
moritz n: my ($c1, $c2) = ({ my $i = 0; -> { $i++ } } for ^2); say $c1()() for ^5; say $c2()() for ^5 07:19
p6eval niecza v21-1-ga8aa70b: OUTPUT«0␤0␤0␤0␤0␤0␤0␤0␤0␤0␤»
07:21 dayangkun joined
masak n: { say "OH HAI" } 07:21
p6eval niecza v21-1-ga8aa70b: OUTPUT«OH HAI␤» 07:22
masak n: { say "OH HAI" } for ^2
p6eval niecza v21-1-ga8aa70b: ( no output )
masak r: { say "OH HAI" } for ^2
p6eval rakudo 962b9b: OUTPUT«OH HAI␤OH HAI␤»
07:25 kresike joined
kresike good morning all you happy perl6 people 07:26
07:28 am0c left
masak kresike! \o/ good morning! 07:28
tadzik oh hai
masak tadzik! \o/ 07:29
kresike masak, tadzik o/
masak is a grammar the least powerful solution in Perl 6 that will match balanced parentheses?
tadzik 'tsme! 07:30
masak (i.e. given a "----(abc(d(e)f)gh)--", I want a way to find each ")" corresponding to each "(") 07:31
Circlepuller_ r: ^2.code 07:32
p6eval rakudo 962b9b: OUTPUT«No such method 'code' for invocant of type 'Int'␤ in block at /tmp/fKB2mytgRp:1␤␤»
Circlepuller_ o
hmm
masak Circlepuller_: precedence.
Circlepuller_ r: ^2.perl
p6eval rakudo 962b9b: ( no output )
Circlepuller_ ok
masak r: say (^2).perl
p6eval rakudo 962b9b: OUTPUT«0..^2␤»
Circlepuller_ interesting
masak Circlepuller_: see S03 for details.
Circlepuller_: basically, method-call dot wins over prefix ops.
(and colon is not a prefix op) :) 07:33
rn: my $a = 42; say :$a.perl
p6eval rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«"a" => 42␤»
masak rn: my $balanced = / \( [ <-[()]>+ | $balanced ]* \) /; say so $_ ~~ $balanced for "()", ")(", "(())", "((", "(()())" 07:44
p6eval rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«True␤False␤True␤False␤True␤»
masak that's fairly light-weight.
heh, you can't do that trick in Perl 5, can you? :) 07:45
FROGGS is that the boob operator? "(()())"
masak no, it's an ordinary string.
FROGGS -.-
FROGGS draws a sign 07:46
masak however, ^..^ has been called "neko operator", which I find cute.
mathw Morning 07:49
FROGGS morning 07:51
masak rn: sub infix:<lceq>($a, $b) { lc($a) eq lc($b) }; say "Morning" lceq "morning" 07:54
p6eval rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«True␤»
au perl: my $balanced = qr/ \( (?: (?> [^()]+ ) | (?R) )* \) /x; print 0+($_ ~~ $balanced) for "()", ")(", "(())", "((", "(()())" 07:56
^^^ that trick in perl5
eval: my $balanced = qr/ \( (?: (?> [^()]+ ) | (?R) )* \) /x; print 0+($_ ~~ $balanced) for "()", ")(", "(())", "((", "(()())" 07:57
buubot_backup au: 10101
masak ah. au++ 07:58
07:59 wk left
masak was gonna say that something like (?R) will probably not work in a Thompson engine... but it probably does. 08:00
the general case of a variable interpolation in Perl 6 doesn't, though.
au yeah. (?R) is a static rewrite
masak right. it's no more complicated than quantifiers in that sense. 08:01
au yup
au ponders adding support for that to the newly-updated regex-genex module 08:02
masak wants to write a Thompson engine for lists instead of strings 08:12
kresike masak, will that be a four stroke or a two stroke engine ? :o) 08:15
08:19 Psyche^ joined
masak good question. in either case, it will be very silent. 08:20
08:22 Patterner left, Psyche^ is now known as Patterner, leont joined 08:32 dakkar joined
masak TimToady: re rosettacode.org/wiki/Same_Fringe#Perl_6 -- did you consider nesting the multis inside the sub that calls it? given that they're just auxiliary functions, I mean. 08:48
I'm half-toying with the idea of "anonymous multis" when I see fringeˊ -- would probably be possible to provide some not-too-ugly syntax for that through a syntax-extending module. 08:49
moritz multi( -> (sig1) { }, -> (sig2) { }, ...) 08:50
masak somethinglikethat. 08:53
though that makes them look like blocks, not siggies. 08:54
er, s/siggies/routines/
maybe "multies:\n multi (sig1) { }, multi (sig2) { }, ...;"
09:03 dayangkun left
masak rn: multi ($a) { say $a } 09:12
p6eval niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===␤␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/oEvMJH9FrQ line 1:␤------> multi ($a) ⏏{ say $a }␤␤Parse failed␤␤»
..rakudo 962b9b: OUTPUT«===SORRY!===␤ scoped variables is not yet implemented. Sorry. ␤at /tmp/VHl__Zn3xa:1␤»
masak wonders what it would take to modify the grammar to accept that.
neither of those two errors is very good, by the way.
std: multi ($a) { say $a }
p6eval std fb53aa3: OUTPUT«===SORRY!===␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/nFRbB74BCv line 1:␤------> multi ($a) ⏏{ say $a }␤ expecting any of:␤ infix or meta-infix␤ initializer␤
..trai…
09:20 dayangkun joined 09:26 dayangkun left
moritz r: anon multi () { } 09:27
p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Confused␤at /tmp/h71pNoA58m:1␤»
masak n: anon multi () {} 09:28
p6eval niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===␤␤Unexpected block in infix position (two terms in a row, or previous statement missing semicolon?) at /tmp/QKWozsQbP9 line 1:␤------> anon multi () ⏏{}␤␤Parse failed␤␤»
moritz r: multi sub () {} 09:29
p6eval rakudo 962b9b: OUTPUT«===SORRY!===␤Cannot put multi on anonymous routine␤at /tmp/N8tZ10FdZj:1␤»
09:36 MayDaniel joined 09:39 dayangkun joined
FROGGS an anonymous sub is always multi, isnt it? 09:41
09:42 SHACHAF is now known as shachaf
moritz no, it's always "only" 09:44
because if it's anonymous, you can't use a second multi of the same name to add a candidate
FROGGS it has no name, how should I declare a second anon sub with the same name? 09:46
masak FROGGS: that's what I was proposing a syntax extension for above. 09:47
it's currently not possible.
feels like we have all the semantic components for it. 09:48
nowadays a proto is the dispatch point for all the multi candidates. and you register each new multi with the proto.
FROGGS so then I will be able to pass a bunch of anon subs to a callback and the right one will be picked? 09:52
is there another usecase?
masak that sounds like *the* use case ;) 09:53
FROGGS k
;o)
masak having said that, I realize that that makes its use very limited. maybe virtually useless, in fact. 09:55
in cases like fringeˊ, you want to call the same multi from many different places. having multiple call sites basically requires a name. 09:56
so... never mind, I guess. :)
mathw I'm not sure it's a useful feature 09:57
09:59 shachaf is now known as sHACHAF
masak right. 09:59
FROGGS might be handy, but I guess you almost always know what you will get from a callback, and that there is only one signature needed
mathw I suppose there might be some kind of case for a callback that you could connect different signatured functions to in order to get slightly different effects, but that could just end up being incredibly confusing. 10:02
masak aye.
mathw Probably everyone would hate you, and you'd have to go write pre-generics Java for all eternity.
masak I'm now squarely in the "named multis" camp :)
moritz you can use a named multi for callbacks too 10:03
masak indeed.
10:11 Guest90598 left, hypolin left 10:17 dayangkun left, dakkar left
sergot hi o/ ! 10:22
10:25 snearch joined
masak sergocie! \o/ 10:26
10:29 erkan joined, erkan left, erkan joined 10:38 daxim joined
dalek osystem: 2b4f4e7 | (Alexandr A Alexeev)++ | META.list:
added DateTime::Format::W3CDTF
10:42
osystem: c51ec69 | tadzik++ | META.list:
Merge pull request #10 from afiskon/patch-1

added DateTime::Format::W3CDTF
10:46 dakkar joined 10:48 spider-mario joined 10:50 leont left 10:54 wk joined
sergot karma sergot 10:59
aloha sergot has karma of 4.
sergot \o/
:)
11:00 leont joined 11:01 leont left
tadzik sergot++ # new modules page 11:03
well-deserved karma :) 11:04
masak sergot++ # what tadzik said 11:06
moritz sergot++ # modules page 11:09
gist.github.com/2934374 # anybody want to add a Perl 6 version as a comment? 11:15
11:17 FROGGS__ left 11:18 marmay joined, FROGGS left
sergot thanks ! \o/ 11:20
masak moritz: hm, looks like an interesting challenge. 11:24
moritz the discussion on reddit suggests an OO-approach for Java instead 11:25
(which is think would be more idiomatic) 11:26
masak aye.
runtime poly.
moritz one "you think this is cute today" idea: 11:28
my %vars; sub add(*@args) { [+] @args }; sub var($name) { %vars{$name} }
my $ast = [&add, 24, [&var, 'a'] ] 11:29
sub evaluate(@ast) { my ($fun, @rest) = @ast; $fun(@rest.map: { $_ ~~ Positional ?? evaluate($_) !! $_ } ) } 11:30
masak here's my version: gist.github.com/ca5a82ae76951cc387cc 11:31
I want to try to re-implement it with pairs, not arrays. but this was the one I knew I could get working.
11:32 Chillance joined
moritz ooh, that's nice 11:33
masak ;)
dalek kudo/export-constant: bb9d84b | moritz++ | src/ (2 files):
export trait for constants
11:37
masak there. gist.github.com/ca5a82ae76951cc387cc 11:43
took a bit of fiddling to get it to work, but I think I like the format better with Pair.
moritz but the code is nicer with arrays 11:44
masak I'd like it even better if I could write `:key<add>` instead of `:$key where 'add'` ;)
moritz that matching, mostly
aye
tadzik I liked the previous one better
masak maybe I should spec that...
tadzik: the previous one clearly has cleaner matching logic. 11:45
but it waterbeds up in the input format.
tadzik yeah
right
moritz to waterbed
masak which one should I contribute to gist.github.com/2934374 ? 11:46
moritz the one with arrays
tadzik +1
less magical, less scary :)
masak consider it done. 11:49
colomon masak++ 11:57
masak gist.github.com/2934374#gistcomment-531226
moritz masak++ 11:59
phenny: tell jnthn branch export-constant works and passes all tests, but I'd like some input from you if that's a valid approach 12:03
phenny moritz: I'll pass that on when jnthn is around.
moritz my testcase being module A { constant flurp is export = 42 }; import A; say flurp 12:04
12:06 awoodland joined, spider-mario left 12:07 sivoais left, sivoais joined 12:08 JimmyZ joined 12:10 awoodland left
arnsholt flurp. Nice name ^_^ 12:13
12:20 leont joined 12:21 tokuhiro_ joined
[Coke] TimToady: any feedback on rosettacode/sierpinski_triangle.t in roast before I try to make that more... automated? 12:34
12:35 FROGGS__ joined
[Coke] (which won't happen until at least this weekend.) 12:36
[Coke] wonders if he should be more annoyed that this internal website requires IE, or happy that there is a citrix farm setup so he can use IE, even from his mac. 12:42
arnsholt I use windows by doing SSH with X forwarding to our Linux login cluster and then running a premade rdesktop script from there 12:45
A bit annoying =)
12:46 snearch left 12:49 FROGGS joined
dalek href="https://modules.perl6.org:">modules.perl6.org: 2e2790d | flussence++ | web/lib/P6Project/HTML.pm:
s/GTM/GMT/
12:50
12:50 leont left 12:53 MayDaniel left 12:54 benabik left
masak suddenly realizes that the 'given' construct is pretty much equivalent to Lisp's 'let' construct 13:10
[Coke] remains stuck on new nqp. 13:11
[Coke] feels MikeFair's pain.
flussence masak: Javascript has a 'let' too, but without a concept of a default variable it's pretty horrible to use 13:12
(or am I thinking of "with"? my JS's a bit rusty...) 13:14
oh, yeah I had those mixed up. 'let' is more like lexical scoping in JS. 13:17
13:21 am0c joined
masak flussence: yes, JavaScript's 'with' is not recommended by leading experts. 13:23
dalek kudo/nom: 2948c89 | coke++ | t/spectest.data:
Run 2 rosettacode tests.
masak flussence: the real problems with it start with it not being statically analyzable. that is, its behavior may vary from run to run, even during the same program run.
flussence: which, incidentally, is also bad for optimization. besides virtually never being what you expect as a programmer. 13:24
[Coke] with - unfortunate, since it makes for some nicer looking code.
13:25 skids joined
masak the agreement with which the feature is disliked is so unanimous that 'with' was *removed* in ES5. 13:26
not deprecated. removed.
arnsholt masak: Good point about the let. Although given only lets you do one variable =) 13:28
Also, one of my colleagues when I worked at Opera had some wonderful horror stories on compiling and optimising JS 13:29
masak arnsholt: you can use 'for' to do several variables ;) 13:30
rn: for 1, 2, 3 -> $a, $b, $c { say "$a $b $c" }
p6eval rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«1 2 3␤»
masak rn: given [1, 2, 3] -> [$a, $b, $c] { say "$a $b $c" } 13:31
p6eval rakudo 962b9b: OUTPUT«1 2 3␤»
..niecza v21-1-ga8aa70b: OUTPUT«Use of uninitialized value in string context␤ at /home/p6eval/niecza/lib/CORE.setting line 1287 (warn @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 266 (Mu.Str @ 15) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting…
masak ah, works with 'given' too if you use nested sigs.
sorear: Niecza doesn't do nested signatures?
masak checks the compiler table
Niecza has green there. 13:32
hm.
rn: sub foo([$a, $b, $c]) { say "$a $b $c" }; foo([1, 2, 3])
p6eval rakudo 962b9b, niecza v21-1-ga8aa70b: OUTPUT«1 2 3␤»
13:32 bluescreen10 joined
masak seems it's just with given that it works less well. 13:32
masak submits nieczissue
arnsholt masak: Oooh, nice one. I'm sure my Lisp programmer friends will love that one =D 13:33
13:33 MikeFair left
masak well, Perl 6 comes fairly close to (but in the end shies away from) real Prolog-like unification in its signatures. 13:35
13:35 lizmat left
arnsholt I think full-on Haskell/Prolog-style destructuring binds would be ever so slightly overkill 13:36
masak probably. 13:37
but what we have of them is really nice.
arnsholt I like the feature we have
Yeah, that =)
masak jnthn's famous signatures talk has a nice example of how you can use nested signatures in a destructuring-bindish kind of way.
13:39 tokuhiro_ left
arnsholt Yeah, I think of that stuff pretty much like destructuring bind 13:40
TimToady rosettacode.org/wiki/Pattern_matching
arnsholt /multiple value bind 13:41
13:41 am0c left
[Coke] TimToady: ooh, that "output" block will be very helpful. 13:41
TimToady the p6 solution closely cargo cults^W^Wresembles the Haskell solution
13:41 att joined
[Coke] TimToady: the output block doesn't match rakudo-current's output, though. 13:43
output block seems to have one extra closing ] 13:44
TimToady it's random
13:45 fhelmberger left
TimToady and if it has an extra ], that's a .perl bug 13:45
or a pebcak :)
[Coke] no, the output block on RC says ...]]]], but rakudo ends with ...]]] 13:46
(if the output is possibly random, I'd change the block to "sample output", or somesuch.)
TimToady that's not the RC way :) 13:48
13:48 stopbit joined
TimToady anyway, this is one of times I wish .perl was .pretty 13:48
or that we had a reliable .yaml 13:49
arnsholt Awww. Common Lisp defmethod won't let me specify multis with differing arities 13:53
arnsholt has a sad
13:54 marmay left 13:55 benabik joined
TimToady masak: the least powerful (by some def) balanced paren matcher is probably 1 while s/'()'// and check the remainder 13:55
[Coke] seen dalek? 13:56
aloha dalek was last seen in #parrot 13 mins 22 seconds ago saying "parrot/native_pbc: review: github.com/parrot/parrot/commit/4747cdaf00".
13:57 gongyiliao joined
masak TimToady: yet another case where "modify private copy" seems to be a viable paradigm. 13:58
TimToady: I'm toying with the idea of a programming language with immutability for all shared references, but mutability for all references that haven't been shared yet. 13:59
TimToady but your mutators are sharers :)
so you only get one mutation... 14:00
masak hm, not the way I picture it. let me see if I can come up with a good example.
14:01 benabik left
TimToady are you picturing a distinction between intrinsics and extrinsics? Perl 6 sure tries to avoid that... 14:01
14:02 benabik joined
masak I think I might be picturing that. I don't know exactly what those two terms entail, but that sounds like what I may have in mind. 14:02
TimToady P5 separated them, with the result that P5 could never talk about how it felt, because it was all subconscious
masak hm :)
in a way, I picture all mutable calculations as taking place in a monad-like environment where you're not supposed to peek or ask "how's it going?" 14:03
(but without mentioning or needing the word "monad")
TimToady so call it IO to make it completely misleading :) 14:04
14:04 benabik left
masak heh :) 14:04
14:04 benabik joined
TimToady while you're at it, call types "data" 14:04
masak that is confusing. some day I will grok that bit of Haskell. 14:06
TimToady well, in the pure FP mindset, there's really no such thing as data just sitting there in a spot of memory; it's all just functions and arguments 14:07
so "data" means "here's the shape of my data"--but that's kind of a low-level type 14:08
14:08 fgomez left
pmichaud good morning, #perl6 14:09
masak good am, pm
FROGGS \o pmichaud 14:10
pmichaud (.perl as .pretty) -- I wouldn't mind doing things to make our .perl prettier
masak TimToady: I would consider free variables in lambda calculus to be neither functions nor arguments :) 14:11
TimToady maybe switch to pretty mode for anything longer than a line by default
and parameters, sure 14:12
which eventually get bound
masak right.
and of course, everything that isn't a function can be Church-encoded as one, or equivalent.
but one has to be pretty... pure... to want to do that. :P 14:13
TimToady there's also a reason it's called the Turing Tarpit :)
masak well, I don't see much sport in constructing a language where the biggest challenge is using the language itself... :) 14:14
the closest to such a language I've been using lately is probably JavaScript.
TimToady makes it easy to reimplement though
the odd thing about Haskell was that it was so hard to implement; but then, I guess I know something about that... 14:15
One bites of more than N can chew... 14:16
masak Haskell is not exactly close to the metal. 14:17
TimToady well, neither is Lisp, exactly...
masak I'd say it's closer, though.
but yeah, Lisp was also a leap. first GC language, for example.
TimToady current computer tech understands OO much better than FP, at least until you start getting all polymorphic 14:18
but to a C++ programmar, an object is just a fancy struct 14:19
masak .oO( if your OO isn't polymorphic, then what's the point of it being OO? )
oh wait, that opinion belongs to my previous understanding of OO :P
TimToady memory holds state; that violates FP right off the bat 14:20
14:20 benabik left
masak TimToady: I think OO and FP are two incompatible local optima, which can nevertheless be combined in various ways in the same program. 14:21
TimToady we don't actually know how to build FP computers yet, the Lisp Machine notwithstanding
masak C# seems to be very much evolving in this direction.
TimToady well, certainly we've taken our shot at it as well
and there are senses where each is "more fundamental" than the other in the design of P6 14:22
masak TimToady: recently I've come to view OO/imperative as Turing's heritage, and FP as Church's heritage. the amazing thing about FP is how it keeps asserting itself in modern programming languages in the guise of solid design principles.
TimToady methods are just functions in Perl 6; otoh most of our operator functions end up dispatching to methods 14:23
masak: yes, kind of like a sheep in wolf's clothing, or some such
masak Turing: "the computer is a tape recorder acting on an infinite tape". Church: "computing is the rewriting of accurately scoped substrings".
TimToady but they're really the same, if you consider the tape the state of the rewriting 14:24
masak yah, but that's not generally how the tape is used :)
I agree that they're both powerful enough to describe the other.
actually doing so is Not Recommended.
TimToady sure it is; it's just a very messy set of rewriting rules :)
masak hm, I guess any implementation of an FP language is in a sense Church's rules on a Turing tape... :) 14:25
so I take that back.
pmichaud it's a very messy set of rewriting rules, that are excellent for tormenting implementors. :-P
TimToady we try 14:26
masak anyway, ++jnthn is very eager to use the following pun in some talk: "On The Separation of Church and State" :P
pmichaud heh 14:27
jnthn++
14:28 GlitchMr joined
TimToady the universe, otoh, seems to be both OO and FP, depending on how you look at it 14:28
which surfaces in funny ways, like the particle/wave duality
masak I keep hearing that the particle/wave duality is totally bogus. Feynman said it. "light is particles", he said. 14:29
TimToady well, he's just redefining particles there 14:30
masak could be.
TimToady but the particles themselves are described with "wave functions"
FROGGS class particle is wave { ... }? 14:31
masak FROGGS: pretty sure the universe doesn't use inheritance. not even single inheritance :P
FROGGS ;o)
masak the universe probably uses roles or something even fancier.
sirrobert re: universe being OO and FP-- it's probably "truer" to think of it as human cognition utilizing both approaches
imho =) 14:32
TimToady fundamentally, it's either math, or topology (or both, if you're a topologist)
sirrobert well, *we* either mathemtize or topologize it. *it* may be something other 14:33
^a
TimToady indeed
FROGGS r: module A { our constant $SDL_INIT = 42; }; load A; say $SDL_INIT;
p6eval rakudo 2948c8: OUTPUT«===SORRY!===␤Variable $SDL_INIT is not declared␤at /tmp/rOQD31YZsS:1␤»
FROGGS should that work?
TimToady I suspect the universe is made of quantum foam, and all we ever see are persistent accounting errors
and extra electron over here, then later an extra electron over there, so we call them the same electron 14:34
Ulti photons aren't particles or waves in the classical physics sense, there isn't any duality in their nature just in the mathematical descriptions used if you only use statistical descriptions you can unify everything mathematicaly
arnsholt sirrobert: I dunno. Turing machines and lambda calculus aren't the only Turing-complete formalisms
Ulti maths != reality
arnsholt Neural networks are Turing-complete as well
Ulti despite what mathmagicians like to think
TimToady but it's really someone didn't turn in their receipt to accounting, and the whole company's balance sheet is of by 47 euro...
*off
sirrobert arnshot: I don't mean those two exclusively
dalek kudo/nom: 63de79c | (Salve J. Nilsen)++ | docs/architecture. (2 files):
Updated architecture docs to current state

  - Updated SVG, describing the compilation pipeline, with help
   from pmichaud++
  - Updated the HTML prose describing the different steps in the
   pipeline, with help from pmichaud++
14:35
kudo/nom: 3791f05 | (Salve J. Nilsen)++ | src/Perl6/Grammar.pm:
Merge remote-tracking branch 'rakudo/nom' into nom
kudo/nom: 1905259 | (Salve J. Nilsen)++ | docs/architecture. (2 files):
Updated description of the Core settings
kudo/nom: 558f0de | (Salve J. Nilsen)++ | src/ (5 files):
Merge remote-tracking branch 'rakudo/nom' into nom
kudo/nom: 103e95a | (Salve J. Nilsen)++ | / (32 files):
Merge remote-tracking branch 'rakudo/nom' into nom
kudo/nom: cc18589 | pmichaud++ | docs/architecture. (2 files):
Merge pull request #79 from sjn/nom

Updates to the architecture document and SVG
sjn yay!
tadzik sjn++ 14:36
moritz sjn++
arnsholt Karma! =)
Also, docs. sjn++
masak sjn++
sjn moritz: nice if you could take a look at the architecture.html file too :)
TimToady Util: just because we make up and/or discover math all the time doesn't imply that the universe is not made out of something we would classify as math if we understood it a few levels better than we do 14:37
masak arnsholt: funges are an interesting kind of turing-complete automatons. :)
sjn moritz: (since you did most of that one earlier)
moritz sjn: I hope I'll get around to it later tonight
sjn s/most of/all of/
sweet
pmichaud yes, I applied the commit and hope others will add their improvements as appropriate :)
tadzik TimToady: s/Util/Ulti/, maybe?
those 2 guys are confusing :)
sirrobert I'm trying to understand proto regexes. Why doesn't this do what I want it to do?
TimToady yeah, sorry
sirrobert r: grammar G { proto token TOP { * } token TOP:sym<a> { 'a' }; } class G::A { method TOP { say "TOP"; } method a { say 'first'; } } my $first = 'abc'; G.parse: $first, :actions(G::A.new);
p6eval rakudo 2948c8: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2, near "proto toke"␤»
sirrobert woops, one sec...
arnsholt masak: Oh, I'd forgotten about those. They're a bit weird 14:38
sirrobert r: grammar G { proto token TOP { * }; token TOP:sym<a> { 'a' };; }; class G::A { method TOP { say "TOP"; }; method a { say 'first'; }; }; my $first = 'abc'; G.parse: $first, :actions(G::A.new);
p6eval rakudo 2948c8: ( no output )
pmichaud you need method TOP:sym<a>
arnsholt I'm a bit fond of string rewriting systems, TBH. I think I've been doing too much (La)TeX =)
Ulti TimToady: apart from you have no way to prove that your maths is the correct interpretation 14:39
sirrobert pmichaud: ahh...
pmichaud r: grammar G { proto token TOP { * }; token TOP:sym<a> { 'a' };; }; class G::A { method TOP { say "TOP"; }; method TOP:sym<a> { say 'first'; }; }; my $first = 'abc'; G.parse: $first, :actions(G::A.new);
p6eval rakudo 2948c8: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤ in method TOP:sym<a> at /tmp/vqnVXSgkl_:1␤ in any !reduce at src/stage2/QRegex.nqp:582␤ in any !cursor_pass at src/stage2/QRegex.nqp:549␤ in regex TOP:sym<a> at /tmp/vqnVXSgkl_:1␤ in any !protoregex …
pmichaud r: grammar G { proto token TOP { * }; token TOP:sym<a> { 'a' };; }; class G::A { method TOP { say "TOP"; }; method TOP:sym<a>($/) { say 'first'; }; }; my $first = 'abc'; G.parse: $first, :actions(G::A.new);
p6eval rakudo 2948c8: OUTPUT«first␤»
masak arnsholt: I think lambda calculus is a lot "cleaner" than the universal Turing machine, even though the latter may be said to be simpler.
arnsholt Depends on what "simple" means, I guess 14:40
sirrobert pmichaud: thanks... I can work with that to get a better understanding; semi-afk to process it
Ulti also I'm Ulti not Util ;) dont want anyone getting the blame for my comments
kresike bye folks
14:40 kresike left
arnsholt In the "how easy is it to implement as a machine" sense Turing machines are simpler, but that's not the only possible meaning of simple I think 14:41
There is for example the "possible to do non-trivial things with it" sense, where Turing machines fail rather badly compared to lambda calculus =)
& # Homewards bound 14:42
sirrobert arnsholt & kresike: wave
masak arnsholt: yeah, there's something weird going on there. I mean they're both equivalent, but...
TimToady Ulti: well, not even God tries to prove all his math correct; he seems to like to statistical approaches, Einstein notwithstanding on the subject of dice...
masak arnsholt: lambda calculus feels less turing-tarpit-ish than the turing machine in that sense.
arnsholt: things are arduous and long-winded in unadorned lambda calculus as well, but at least you have higher-order functions out of the box, which really helps. 14:43
on the turing machine, you have to emulate them somehow.
Ulti also on turing completeness en.wikipedia.org/wiki/Rule_110 14:44
masak aye, that's a good example, too.
14:44 spider-mario joined
masak probably counts as more of a Turing Tarpit than even Malbolge ;) 14:45
Game of Life is similarly Turing Complete.
TimToady but on OO vs FP, not even physicists are sure where the state is stored: see the Holographic notion 14:46
sirrobert in the case of "grammar G { proto token TOP { * }; token TOP:sym<a> {'a'};}" with corresponding action... 14:48
how do I add a new token TOP:sym<$something> with corresponding action during runtime?
masak sirrobert: using the MOP, supposedly.
sirrobert heh
which parts? =)
masak but... Are You Sure You Want That?
sirrobert .^add_method?
masak: yep
TimToady well, that's the OO answer :) 14:49
masak aye, .^add_method should do it.
TimToady the FP answer is that there's this function we call derivation
masak maybe look at how Rakudo does it with grammars.
TimToady which allows you to add methods
masak TimToady: :)
sirrobert: I think TimToady is suggesting you subclass at runtime.
but that's only an option if the names are known statically, no? 14:50
of the rules/methods, I mean.
14:50 fgomez joined, szabgab joined
TimToady I'm suggesting, as the universe does, that it's all fundamentally FP when you want it to be OO, and vice versa. :) 14:50
szabgab rakud 14:51
rakudo: my $a=2; my $b; say defined($b) ?? $a+$b !! "undef"
p6eval rakudo 2948c8: OUTPUT«undef␤»
sirrobert What's the best example code for subclassing at runtime?
tadzik Test::Mock maybe
TimToady "rakud" looks like it should be a Hebrew root of some sort
szabgab rakudo: my $a=2; my $b; say defined $b ?? $a+$b !! "undef"
p6eval rakudo 2948c8: OUTPUT«True␤»
szabgab TimToady: it is rikud and mean dancing
moritz TimToady: because you have heard of "likud" or so
sirrobert tadzik: thanks 14:52
szabgab but the main issue is that a string is covering my input line :)
TimToady more because I know that Hebrew roots tend toward 3 consonants :)
szabgab very strange, it it is a github link to camelia.txt
moritz szabgab: note that 'defined' used to be a prefix op, and is now an ordinary list op
szabgab anyway, is the preference right in the esecond example?
moritz szabgab: so the precedence has changed
n: my $a=2; my $b; say defined $b ?? $a+$b !! "undef" 14:53
p6eval niecza v21-1-ga8aa70b: OUTPUT«True␤»
szabgab thanks
moritz yes, it's right. Just not what it used to be
masak one less exception to remember.
14:53 benabik joined
TimToady sirrobert: or just do a mixin, which is run-time composition 14:53
szabgab TimToady: the majority, but there are 2 long roots and 4 long ones too
though those are usually repeating 2 :) 14:54
TimToady why I said "tend toward" :)
szabgab yep
TimToady though, to be sure, I always hedge my remarks...well, almost always... 14:55
masak rn: my $o1 = class { method foo { say "foo!"; self } }; my $o2 = $o1 but role { method bar { say "bar!" } }; $o2.foo.bar 14:56
p6eval rakudo 2948c8, niecza v21-1-ga8aa70b: OUTPUT«foo!␤bar!␤»
masak \o/
moritz \o/ an autopun
14:56 Hugh_ joined
masak indeed. 14:56
TimToady is good at those.
14:58 benabik left
Ulti out of interest is anyone working on concurrency in Rakudo? 14:58
tadzik I tried
sirrobert TimToady, masak, et. al: The mixin approach makes the most sense to me at this moment, so I'm going with that for now.
Ulti :]
sirrobert thanks all (got a POC functional)
tadzik waiting for Parrot guys to investigate what I found
Ulti is the idea to use pthreads rather than forked processes? 14:59
masak tadzik: maybe they are waiting for you, in an unfortunate kind of deadlock situation...? :)
Ulti lol
tadzik :P
masak boom! autopun!
tadzik I hope they don't just sit silent but not work :>
reference: gist.github.com/3610283 15:00
masak hopes they don't have to share forks around a table
tadzik :>
15:00 benabik joined, benabik left
Ulti I only ask because I'm really interested in the bioinformatics applications for perl6 and one thing is that most operations are trivially parallelisable either by loop unrolling or using junctions for combinatorics 15:01
a lot of the software I use tends to have implementations with pthreads and mpi depending on how "wide" you want to go 15:02
TimToady when you say "loop unrolling", I don't think of that as parallel. do you mean something more like "pipelined"?
15:03 MayDaniel joined 15:04 thou joined
masak TimToady: you're thinking of serial unrolling, where the loop is rolled downwards in the code. parallel unrolling means unrolling it sideways. :P 15:05
Ulti TimToady: perhaps, my @sequences; for my $seq (@sequences) {} you can just add an outer loop that chunks the original @sequences to be executed in parallel... all the data values are independent
TimToady well, oddly, what the serial unrolling does is allow the CPU to use its parallel pipelines better, go figure 15:06
arnsholt masak: Yeah, I agree on Turing machine vs. lambda calculus. We have a course at uni. of Oslo which is logic and foundations of computation, and the "write a Turing machine" exercises they have are pretty fundamental, where as lambda calculus things can be a lot more interesting
TimToady Ulti: okay, we'd just call those "hypers" here
Ulti ok
TimToady or maybe even "races", if you don't care about the order of the result 15:07
but nobody implements race yet
15:07 benabik joined
Ulti are these the terms used in the spec, maybe I should go read it 15:08
masak arnsholt: I wonder if there's an absolute sense in which lambda calculus is "better suited" (than turing state machine settings) for composing operations into a program.
arnsholt Good point
15:08 benabik_ joined
arnsholt Well, lambda calculus is a whole lot more compositional in general than Turing machines at least 15:08
moritz there are some tables for how the complexity of a program changes when you convert them to another representation 15:09
TimToady Ulti: yeah, S02:4664 and thereabouts
Ulti thanks :)
moritz and iirc turing -> lambda was O(n**7) in the worst case, or something
masak moritz: ouch.
moritz or maybe it was some other representation to Turing machine
TimToady though the verbiage there for hyper sounds confusingly like race semantics, but that's not the intent 15:10
map/reduce is more like race than like hyper really
arnsholt moritz: Ooh, that's interesting
I remember reading some stuff on SO that some O(n) things in Turing machine had to be O(n log n) or summat like that 15:11
Ulti also it might be worth me mentioning GNU parallel which is written in Perl5, I'm probably one of its heaviest users... it just wraps data around whatever you want over a network or just splits into forked processes on one machine
arnsholt But I cannae remember where exactly
15:11 benabik left, benabik_ is now known as benabik
masak TimToady: um. I'd say that reduce is neither race nor hyper... 15:12
TimToady I mean as it's used by, say Google, to retrieve results from a server farm 15:13
Ulti also Hadoop used by Yahoo and Facebook 15:14
if the actual implementation of parallelism could be altered at runtime that would be quite useful...
masak Ulti: that sounds like the responsibility of a dynamic optimizer. 15:15
TimToady Ulti: sure, that's why Perl 6 tries to let you specify the form of parallelism you desire without locking you to an implementation
Ulti well I was more thinking it would be really neat to be able to specify things like "use this Hadoop cluster" "use these EC2 nodes" "use this many OS threads locally" 15:16
TimToady at least for the 3 or 4 most embarrasingly parallelizable kinds of things
Ulti: that would be in the realm of a pragma to make suggestings to the compler
15:17 jaldhar left
Ulti so you can get your hooks into perl6 that deeply from your own code? 15:18
15:18 jaldhar joined
Ulti thats pretty cool 15:18
masak .oO( it's hooks all the way down ) 15:19
pmichaud heck, we can even write debuggers without modifying the compiler at all :) 15:20
well, jnthn++ can, at least :)
masak ...how the heck did he do that?! :P 15:21
15:21 pyrimidine joined
masak needs to read source 15:21
15:22 Hugh_ left
moritz by subclass Actions.pm iirc 15:22
pyrimidine grammars will be enormously useful in bioinformatics (aka 'multiple format hell') 15:24
Ulti so if I write something using race, is it just currently dealt with serially rather than exploding with an error?
masak rn: race say 1 + 1
p6eval rakudo cc1858: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&race' called (line 1)␤»
..niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'race' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @ 5) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1147 (P6.comp_unit @ 37) ␤ at /home…
TimToady I doubt any compiler even recognizes the word yet
masak Ulti: not even recognized yet. 15:25
Ulti heh ok
15:25 erkan left, erkan joined
dalek d: b87ea13 | larry++ | CORE.setting:
add race
15:26
TimToady there, STD has it now, why are you other guys so slow? :)
Ulti lol
15:26 erkan left
masak I see nothing unfair about that comparison. 15:27
Ulti I should probably not ask anymore awkward questions until I've atleast finished the MacPort I promised ;)
TimToady masak and I are both cretans, unless it's cretins... 15:28
pyrimidine croutons?
TimToady I'm allergic to those.
pyrimidine cretins? 15:29
I'm allergic to those as well
TimToady fortunately, I'm not :P
pyrimidine :)
daxim masak shaves all men that don't shave themselves 15:30
TimToady write that in multi sigs and you might have something 15:31
masak daxim: this explains a lot, actually. :) 15:32
daxim: I was wondering why all my razors were so paradoxial.
c*
TimToady
.oO(crazors?)
15:33
masak .oO( call my razors! )
TimToady thinks ^..^ looks more like a kitsune 15:36
masak aww :) 15:37
hadn't thought of that, but I can definitely see the similarity. 15:38
en.wikipedia.org/wiki/File:Fox0290.jpg :)
TimToady and re irclog.perlgeek.de/perl6/2012-09-04#i_5959071 I think that would destroy the one-linerness of all the functions, which has a certain charm 15:39
masak point. 15:41
15:42 att left 15:44 j0hnnY left 15:45 FROGGS__ left
TimToady anonymous multis are usually called "switches" :) 15:45
masak :) 15:46
15:46 FROGGS left 15:48 FROGGS joined 15:49 FROGGS__ joined 16:00 JimmyZ left 16:02 brrt left
[Coke] pmichaud: gist.github.com/362278 - feedback greatly appreciated. 16:05
16:06 erkan joined, erkan left, erkan joined
masak [Coke]: hm, was that the right URL? 16:07
[Coke] no, definitely not. 16:08
gist.github.com/3622787
masak++
16:10 kaare joined, kaare is now known as Guest66495
masak [Coke]++ # for experimenting with HLLs 16:10
pmichaud [Coke]: looking
oh. 16:11
in QAST (as it stands now), the thing that comes back from a parse *must* be a QAST::CompUnit containing a single QAST::Block
PAST was friendlier about that.
not sure why that results in the NPA, but I do know that's a difference. Just a sec and I'll work on it locally.
16:12 benabik left
masak .oO( everything works as long as your feet find the intended path on the planks in the swamp ) :P 16:12
pmichaud heh.... jnthn++ and I experienced exactly that on the return hike from Preikestolen :P 16:13
TimToady just carry your own planks; Church says you only need two or so
pmichaud (finding the intended path; we didn't have our own planks)
[Coke] masak: that sounds like a metaphor for all the development on partcl ever. 16:14
pmichaud [Coke]: gist.github.com/3622948
[Coke] pmichaud: thank you. that is the closest thing to having a working partcl on nqp I've had in several weeks. ;) 16:15
pmichaud I already discussed with jnthn++ at #mtmh2012 that we need to improve the error trapping or liberalness-of-what-we-accept in that instance. 16:16
16:16 szabgab left
[Coke] pmichaud: I had tried Stmts containing a Stmt at one point, and got a slightly different but unhelpful error as well. 16:16
pmichaud [Coke]: noted. I'll see about updating the code shortly.
[Coke] pmichaud++
pmichaud++ #for the both the future update and just now help 16:17
masak TimToady: yes, but those two planks are some planks. 16:18
TimToady that's because the Möbius planks 16:19
*they're
masak and that's why you only need two. :)
16:20 wk left
masak having more wouldn't make the system more powerful, just more confusing. 16:20
daxim insubordinate pirate ants are made to walk the möbius plank
INFINITELY 16:21
TimToady I can just picture that
pmichaud just realized that the path to a complete Perl 6 implementation is actually a mobius loop. :-|
TimToady you can say that again 16:22
masak this also explains a lot.
masak .oO( with our luck, the path is a Möbius loop of barbers who shave all who don't shave themselves ) 16:23
TimToady the swamp is actually a Klein bottle of Kleene stars, which there is likely also a picture of somewhere
[Coke] bah! now that I have working code, I have to hack on $dayjob for the rest of the day!
TimToady "It's full of Kleene stars!" 16:24
masak TimToady: that sounds like a fitting description of STD.pm6 and its generated Perl 5 file. "a swamp of Kleene stars" :)
TimToady well, I'll take a swamp over a tarpit any day 16:25
16:25 bluescreen10 left, bluescreen10 joined
mst swamps tend to be less flammable 16:27
though unfortunately a trifle on the soggy side
TimToady depends on how much methane is being generated
mst which is a function of your choice of COW implementation 16:28
TimToady wonders what the simplest molecule is that can be construed as a Möbius strip
I'll bet half of all plasmids are that way 16:29
masak certainly something with carbons and hydrogens can be folded into a Möbius strip.
TimToady methane can't
oh wait, it doesn't have carbons, only hydrogens 16:30
masak it has one carbon :)
TimToady ethane then
masak no, I meant. you can probably do it with sufficiently many Cs and Hs, and nothing else.
I know you need at least 3 to make a ring. preferably 4. 16:31
carbons, that is.
TimToady buckytoruses, yum
masak you probably need quite a bit more than 4 to make a Möbius strip.
TimToady you need something that has sides
so you can turn two sides into one side 16:32
16:33 bluescreen10 left 16:34 bluescreen10 joined 16:40 bluescreen10 left 16:41 ifim joined 16:43 bluescreen10 joined 16:44 _jaldhar joined 16:45 jaldhar left
pmichaud gist.github.com/3623354 # for [Coke]++ -- would this have been better? 16:49
16:51 daxim left
mst hrm 16:51
is Configure.pl going to rebuild parrot every time I run it?
pmichaud from a star release? 16:52
It might. We might need some logic to detect that an already-good-enough Parrot has been built.
mst I'll try and figure out the logic 16:53
I assume a hacky patch against 2012.08 that you can clean up would suffice?
pmichaud very much so, yes.
16:53 upasna is now known as sweet_kid
pmichaud even just filing an issue would likely suffice :) 16:54
[Coke] pmichaud++: yes, that would have been much easier to diagnose. 16:56
pmichaud ...although it looks as though just having a QAST::Block is sufficient, too. 16:57
so maybe I'll just have the compiler add a block node if one isn't there.
16:58 leont joined
mst yeah, but filing an issue would mean stopping what I'm doing 16:59
whereas hitting it with a stick until it does what I want wouldn't
pmichaud mst: hit away!
colomon mst++
mst ... oh poo. I'm going to have to reconfigure it at least once anyway 17:01
of COURSE I forgot to pass down the blooming path options
(non-relocatable things)--
pmichaud [Coke]: okay, if I automatically wrap the tree into a QAST::Block, the NPA error goes away, as expected. But the command line "./nqp eek.nqp -e 'eek'" also results in no output (and correctly so). Is that what you would've expected, or should we do something about that too? 17:04
17:05 pyrimidine left
pmichaud (if this is better discussed at another time, such as when you aren't $dayjob preoccupied, that's fine too) 17:05
[Coke] I just returned a value, I didn't output it. seems legit.
pmichaud okay, I'll leave it at that then. 17:06
[Coke] I might expect the exit value to magically be 3, but I doubt that also.
pmichaud I just don't want the silence/non-output to be too big of an obstacle. :)
[Coke] is that... mst? welcome aboard. ;)
pmichaud I agree the exit value should perhaps be 3... not sure why it isn't. 17:07
[Coke] eh. it's a bit magical. no worries. 17:11
dalek p: 962ffbe | pmichaud++ | src/ (2 files):
QAST::Compiler automatically wraps QAST trees in QAST::Block when needed
17:14
17:15 dakkar left
pmichaud hmmm, it's lunchtime. bbiaw 17:15
17:20 benabik joined 17:37 ifim left 17:41 nodmonkey joined 17:43 marmay joined 17:46 erkan left 17:48 erkan joined, erkan left, erkan joined
masak why don't more imperative languages have an amb-like control flow construct? something like 'attempt { A } else { B }', and then something like 'backtrack' to try subsequent branches? 17:50
it would help implement Prolog-like searches, as well as regex engine logic.
mst what are the semantics of that? 17:51
GlitchMr I guess that peek and poke won't be ever feature in Perl 6?
Even if Perl 6 takes features from many languages
leont Because it's strange to most people
masak mst: if the code succeeds without 'backtrack' being run, only A is run. otherwise B is attempted (and the effects of A forgotten). 17:52
GlitchMr: what is your use case?
GlitchMr Crashing Perl 6?
mst masak: hmm
masak GlitchMr: direct memory access isn't very portable.
leont is sure he read a wikipedia page about it, but he can't find it anywhere anymore 17:53
17:54 benabik left
mst masak: assuming an A without side effects, 'use Try::Tiny; try { A } || do { B }' and backtrack being a flow controlexception would work 17:54
masak: not that I'm saying that's an optimal implemenation, but I've used stuff of that ilk to experiment 17:55
masak ooh
well, yes. the construct I'm thinking of is essentially exception-like. 17:56
mst alternatively, zefram did some interesting stuff with non-local returns
that'd be better
here we go 17:57
masak: metacpan.org/module/Scope::Escape::Sugar
masak nice.
17:57 benabik joined
TimToady masak: revised rosettacode.org/wiki/Same_Fringe#Perl_6 for ya 18:00
masak yay
TimToady also changed it not to take the Any 18:01
which isn't Any now, but Cool
because it is
kinda
would still like a better longest zip
masak *nod*
mst Cool for Cat6? # rakudo over ethernet
masak mst: Cool is the type manifestation of "scalars are Int-y and Num-y and Str-y at the same time" in Perl 6. 18:02
TimToady but in this case, it's just punning on "I'm done, we're cool."
moritz doc.perl6.org/type/Cool 18:03
masak r: say $_ ~~ Cool for Int, Num, Str, Signature
p6eval rakudo cc1858: OUTPUT«True␤True␤True␤False␤»
mst I was just going for "cool for cats"
TimToady and because nobody's gonna put a Cool typeobject into their tree, we hope
masak mst: we do have a Cat type, too ;)
TimToady and a Rat type, but no Mouse yet
mst let's not have one of those, the Moose only stands on it.
masak :P 18:04
TimToady someone should implement rosettacode.org/wiki/Mouse_position though
FROGGS I can do that using SDL^^ 18:06
FROGGS .oO( did that right now for bubble breaker game ) 18:07
just a bit more speed would be nice 18:08
takes 14 seconds to start up -.- 18:09
moritz did you precompile?
(the modules, that is)
FROGGS no, I dont 18:10
tadzik FROGGS: Frozen Bubble?
FROGGS ohh no, frozen bubble is about 8k lines of code inlcuding C/xs stuff, dont wanna do that right now 18:11
how to precompile modules?
here is a screenshot: yapgh.blogspot.de/2011/03/sdl-perl-...undup.html
its the perl5 version but it looks (and feels) the same 18:12
except the speed of course
I'll port Saving Sue (a frogger clone) too some day 18:13
18:13 cognominal__ joined
tadzik FROGGS: in perl 6? 18:13
FROGGS sure
tadzik use ufo :)
that's the best way
then just 'make'
FROGGS k 18:14
18:14 cognominal joined 18:16 cognominal_ left
mst masak: was it 'make test' or 'make spectest' that tested everything? 18:16
ah, rakudo-test and rakudo-spectest
FROGGS make test just gives an info msg
mst don't mind me, failure to RTF(README) 18:17
18:18 cognominal__ left, SamuraiJack joined
FROGGS brb, lunch 18:19
masak mst: I wouldn't have known the answer; I don't use Rakudo Star much. I run straight off Rakudo. 18:23
sorear good * #perl6
n: sub foo($x [$y,$z]) { say $z }; foo([2,1 18:24
p6eval niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===␤␤Unable to parse array composer at /tmp/oyWC_IeXHu line 1:␤------> sub foo($x [$y,$z]) { say $z }; foo([⏏2,1␤Couldn't find final ']'; gave up at /tmp/oyWC_IeXHu line 1 (EOF):␤------> sub foo($x [$y,$z])…
sorear n: sub foo($x [$y,$z]) { say $z }; foo([2,1]) # masak, niecza does do nestedsigs
p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/aCVPLtoZD1 line 1:␤------> sub foo(⏏$x [$y,$z]) { say $z }; foo([2,1]) # mas␤ $y is declared but not used at /tmp/aCVPLtoZD1 line 1:␤------> sub foo($x [⏏$y,$z]…
sorear n: sub foo($x [$y,$z]) { say $z }; foo([2,1]) # masak, niecza does do nestedsigs #OK
p6eval niecza v21-1-ga8aa70b: OUTPUT«1␤»
masak sorear! \o/ 18:27
sorear: yes, I realized. but it doesn't do them with 'given', it seems. 18:28
sorear mmh? 18:31
n: given [1,2] -> [$x,$y] { say $y }
p6eval niecza v21-1-ga8aa70b: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/ekaXNcKp1i line 1:␤------> given [1,2] -> [⏏$x,$y] { say $y }␤␤Any()␤»
sorear hmm
n: given [1,2] -> $ [$x,$y] { say $y } #OK
p6eval niecza v21-1-ga8aa70b: OUTPUT«Any()␤»
sorear oh 18:32
18:32 wk joined
sorear the inline signature binder is failing to recognize this a case that needs to delegate to the full signature binder 18:32
GlitchMr glitchmr@feather ~> perl6 18:33
perl6 perl6-2012.07 perl6-2012.08 perl6-debug perl6-debug-2012.08
This works well
mst huh, this is looking promising ... 18:34
mst grins
(I'll explain in a bit :)
GlitchMr perl6-debug is not part of 2012.07?
sorear correct
it's the big new feature of .089
mst grumbles
sorear I was there two weeks ago when jnthn++ shocked the world by releasing it 18:35
mst pmichaud: bad star dist, it should NOT need to run stuff on install
pmichaud: ... oh, hahahahaha, it needs to -be- installed to run the built version to do stuff doesn't it EW
18:35 hoelzro|away is now known as hoelzro, hoelzro is now known as hoelzro|away 18:37 test___ joined, lizmat joined
masak mst: 'fraid so. 18:41
sorear: oh, that would explain it.
TimToady revised rosettacode.org/wiki/Sorting_algori...ort#Perl_6 for style 18:42
kinda funny that their highlighter highlights the 'sort' of 'counting-sort' 18:43
someone needs to teach it about hyphenated identifiers
18:44 att joined
GlitchMr I've feeling it's Perl 5 parser modified to support Perl 6 keywords 18:44
For GeSHi
18:44 stopbit left, stopbit joined
GlitchMr GeSHi is probably worst syntax highlighter, but well, it works... in most cases 18:45
sorear i'd be amazed if someone has a working perl 6 highlighter
GlitchMr It works like - try to match every RegExp, if it matches move pointer and try that again
It doesn't support changing contexts - everything is single context
Or perhaps it does - qbnz.com/highlighter/demo.php?id=30...p;lang=php 18:47
It highlights variable name
in string
pmichaud mst: yeah, I totally don't like the build+install dependencies we have now. While I was in .eu we developed our plan for eliminating (or at least reducing) the dependencies; it now just depends on tuits to implement the plan. 18:48
likely won't be fixed in september release, but it could happen in october or november. it's a fairly high-ish priority for us. 18:49
that's the case at least for perl6 modules. For parrot stuff... well, we have to build from the installed version of parrot, sadly. 18:50
mst yeah, well, we can discuss relocatability later once I make it work for /usr/bin/perl 18:51
sorear /usr/bin/perl !?
GlitchMr GeSHi is supposed to highlight PHP code, support for other languages was added later
'REGEXPS' => array(
//Variables
0 => "[\\$]+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*" 18:52
),
But even then, this RegExp to match variables is simply incorrect
18:52 tokuhiro_ joined 18:53 marmay left
GlitchMr oh, I went into wrong language 18:53
What I wanted is PHP
I went into PHP Brief
Which apperently removes highlighting of 4000 functions... it does more
It's also more outdated
Oh, I see... GeSHi actually supports two contents. Normal content and string content. It's hacky... 18:55
contexts* 18:56
s/content/context/g
18:59 _jaldhar left
sorear if you want to talk geshi, BenBE is active in #rosettacode and I think he created the thing. 18:59
GlitchMr The problem is that you would have to move EVERY keyword to RegExp 19:00
GeSHi keywords use \b to check if they match
mst ... 19:05
ok, why does calling 'make install' again re-do all the copying and compiling :( 19:06
sorear I just poked BenBE, hopefully ey'll be around soon
arnsholt mst: If it redoes the compilation without you having changed anything, it's likely a Makefile bug 19:08
moritz installation isn't done via Makefile
FROGGS I'd say the makefile simply doesnt check for existing output files to skip that part
moritz there's a p5 script that does the compilation and copying
FROGGS wow, written in an antique language :P 19:09
jnthn evening o/
phenny jnthn: 12:03Z <moritz> tell jnthn branch export-constant works and passes all tests, but I'd like some input from you if that's a valid approach
FROGGS cool, exporting constants++ 19:10
19:10 takadonet left
moritz fwiw exporting variables like that doesn't work yet. I have a patch locally, but it doesn't share the variable between the two packages :( 19:10
sorear jnthn: hi! 19:11
mst moritz: well, then it needs more timestamp checking
jnthn o/ sorear, moritz
moritz \o jnthn 19:12
jnthn moritz: I'm probably too sick to look at that tonight, but will try and get to it. 19:13
tomorrow evening or so
moritz jnthn: ok, no hurry, get well soon! 19:14
FROGGS cool, after using ufo for my SDL stuff my game starts in 2 secs instead of 14
moritz \o/
FROGGS masak++ 19:15
19:15 raiph joined
masak .oO( the grey ones made me do it ) 19:15
mst \o/ I think this works 19:16
sorear o/ raiph
arnsholt aliens++ # =)
moritz FROGGS: di you read the README of ufo? :-)
*did
FROGGS ya, I did ;o)
arnsholt Also, masak++
FROGGS crazy ppl these nerds are
arnsholt ufo was one of the first Perl 6 things I contributed to I think
raiph hi sorear and crew 19:17
moritz \o raiph
FROGGS hi raiph
arnsholt: if I have a c-structure that keeps a pointer to another structure that has raw pixel data, how can I obtain that pixel data? 19:20
tadzik FROGGS: whoa, how can I run this bubble game?
moritz CArray[Int] and then unpack that?
raiph Of the 3 #perl6 summaries so far (blogs.perl.org/users/perl_6_reports/), matt polly said: "second week ... by far the best. Maybe trying a darker and more muted shade of red". anyone disagree?
19:21 _jaldhar joined
FROGGS moritz: I dont know how to get that stuff as CArray... I just can get the pointer so far 19:21
19:21 wk left
arnsholt Depends on the struct with the pixel data, I guess 19:21
What're the relevant bits of the C struct definitions?
FROGGS tadzik: I'll push that stuff to github in a few minutes
tadzik awesome 19:22
FROGGS arnsholt: www.libsdl.org/docs/html/sdlsurface.html
moritz FROGGS: well, if the pointer is a return value, you do returns(CArray[Int]) instead of returns(OpaquePointer)
FROGGS moritz: I get a surface (see link) via function call, so I can use the right return-type to get its content 19:23
19:23 wk joined
FROGGS but its content has a pointer to another struct 19:23
I really just have the plain pointer (within an CArray[int] for example) 19:24
arnsholt But I think you're gonna run into the sized int array problem again
moritz I fear so, yes 19:25
FROGGS I can get around that
moritz you can go strcts + CArray all the way down
FROGGS I get my structs as CArray[int]'s, and basically unpack that to separate the struct members
I need something like: get_buf( OpaquePointer addr, Int len ) 19:26
someone wrote Inline:C for Perl6? ;o) 19:27
arnsholt FROGGS: So what kind of thing is pixels pointing at?
Some kind of opaque data structure? 19:28
FROGGS its the data of the pixel according to the pixelformat
so you first read the pixelformat (bpp for example), and then read the pixeldata 19:29
len is bpp*8 * image_width * image_height
arnsholt Ah, right. So you need to interpret the void* according to the info in the pixeldata struct
FROGGS right
arnsholt That's another thing I've been mulling over
FROGGS can be one to four bytes per pixel
arnsholt Sometime we need to reinterpret a pointer to a different kind of thing
FROGGS typecasting? 19:30
arnsholt Won't work (if it's possible)
FROGGS what do you mean then by "different kind of thing"?
TimToady
.oO(will work if it's impossible?)
19:31 wk left
arnsholt I think I'll have to add another dyncall_* op that takes a CArray/CStruct/CPointer object and reinterprets the C pointer into the desired class 19:31
arnsholt goes to add an issue
FROGGS and a way to get the raw buffer? 19:32
moritz +1
FROGGS what I would like to do in the end with the pixels is to get a binding between a 2d array and the memory area, so I can r/w these pixels in Perl 19:33
like having overridable IN/OUT methods for transforming the data
19:35 MayDaniel left 19:37 BenBE joined, raiph left
BenBE heard there was a discussion about GeSHi? 19:38
sorear GlitchMr: ping
FROGGS tadzik: please checkout the froggs branch: github.com/PerlGameDev/SDL6/tree/froggs
maybe use ufo to install...
tadzik: and then run the script in bin, perl6 branch: github.com/FROGGS/Games-BubbleBrea...tree/perl6 19:39
BenBE sorear: I didn't write GeSHi (that was done by Nigel McNie, but I'm maintaining it and most parts of the current (stable) engine are based on work by Millian Wolf and me.
FROGGS tadzik: IMO, you need to chdir to that BubbleBreaker dir so that it can find its gfx 19:40
BenBE Also language file usually are sent in by people using the language; thus if you want to improve language support just update the language file and send it to me, the geshi-devel ML or the SF.net tracker.
FROGGS tadzik: the perl5 version does a bit more, like collecting (high)score and draw lines around your selection of bubbles 19:41
GlitchMr sorear: pong
tadzik FROGGS: is there are reason why we don't have this SDL6 in panda?>
or do we
FROGGS there is an older version
BenBE GlitchMr: Hi. 19:42
FROGGS its not yet in panda because its pre-pre-alpha, that I hacked the last days
GlitchMr Hi
BenBE Regarding the hyphen issue: There's (not officially documented, but in use by quite some languages) an option to define the delimiting Regexp for keywords. 19:43
moritz delimiting regex, or regex that matches a full keyword?
BenBE It's PCRE (or what PHP thinks is Perl-compatible ;-)) so you should have no problems with creating those regex.
The keywords themselves are built into a regex internally, thus adopting the delimiters for keywords should suffice. 19:44
moritz ok
oh, I was mixing up keywords and identifiers in my head
GlitchMr Myself, I can find only one GeSHi advantage over other syntax highlighters - it supports more languages compared to other highlighters 19:45
BenBE The second issue: There's a developement version of GeSHi supportig nested contexts (as deeply nested as you like). Unfortunately the language file format for the Developement version (GeSHi 1.1.X) is not fully fixed, but it sould give you the nesting you like. 19:46
19:46 MayDaniel joined
GlitchMr But, I guess when highlighting it doesn't matter if s < > [ [ ] ] is highlighted correctly 19:46
BenBE Sometimes it does ;-) And I usually I try to keep it as closely to the semantics of the highlighted language as possible with the parser. 19:47
sorear std: s < > [ [ ] ]
p6eval std b87ea13: OUTPUT«===SORRY!===␤Null pattern not allowed at /tmp/gEdPPzyT94 line 1:␤------> s < ⏏> [ [ ] ]␤Parse failed␤FAILED 00:00 41m␤»
sorear std: s <x> [ [ ] ]
p6eval std b87ea13: OUTPUT«===SORRY!===␤Unsupported use of brackets around replacement; in Perl 6 please use assignment syntax at /tmp/EUkSBnNtTl line 1:␤------> s <x> ⏏[ [ ] ]␤Parse failed␤FAILED 00:00 42m␤»
TimToady well, it'd be nice if "foo { expr() } baz" knew about interpolated expressions
std: use v5; s <x> [ [ ] ] 19:48
p6eval std b87ea13: OUTPUT«ok 00:01 53m␤»
GlitchMr (not that you can get accurate)
BenBE At least not with the old parser ;-) The new one improves on some issues the old one inherently has, but at the cost of less performance. 19:49
BenBE is thinking of porting the currently existing language files for the old parser to the new developement version. At least for Perl this might be a real advantage. 19:50
GlitchMr I think I even have found syntax highlighting issues in JavaScript, but those are edge cases
Like - if (something) /regexp/.method()
tadzik FROGGS: that doesn't quite work for me
I get Could not find SDL::Video in any of: /home/tadzik/.perl6/lib, /home/tadzik/.perl6/lib, /home/tadzik/src/parrot/install/lib/4.7.0-devel/languages/perl6/lib 19:51
GlitchMr s/edge/corner/
tadzik seems that only SDL.pm got installed from SDL6
FROGGS hmmm, then do: PERL6LIB=/path/to/SDL6/lib perl6 bin/bubble-breaker.pl 19:52
BenBE That JS looks correct to me ... Even with light-blue highlighting for the Regex ...
19:52 fhelmberger joined
tadzik FROGGS: now it can't find SDL::App 19:52
GlitchMr it is?
I probably misunderstood it with other highlighter 19:53
BenBE Just checked with qbnz.com (which runs a trunk version).
GlitchMr mixed*
FROGGS tadzik: :( its in the same dir
BenBE BTW: GeSHi even tries to highlight Perl Regexp for some easy cases ... And even those easy cases take quite some lines of Regexp to get right ;-) 19:54
19:54 fhelmberger_ joined
BenBE If you find some issues I'd be glad to get some small testcase I can add to the GeSHi code repo for testing; or if you know a fix a small patch. 19:55
GlitchMr If I would find it
I knew I had long testcase to test JS syntax highlighting
It was full of things that nobody would normally do
Perhaps it's still on old PC 19:56
BenBE If you find it again just drop me a mail. BenBE ... geshi dot org
19:57 fhelmberger left
GlitchMr I know it has .js extension 19:57
but that isn't really helpful
tadzik FROGGS: no idea why this doesn't get installed
dalek ecs: 1ccffdd | larry++ | S02-bits.pod:
clarify difference between hyper and race
19:58
BenBE Do you know of a (mostly) complete list of Perl6 keywords? Maybe we could get the perl6 lang file a bit more recent that way.
Same for perl5 would be nice too.
FROGGS tadzik: but you are on the froggs branch, right?
GlitchMr Perhaps doc.perl6.org/ will be helpful
tadzik em, I don't think so
FROGGS you need froggs branch for SDL6 and perl6 branch of the game
tadzik oh, I have two copies of SDL6 too :)
GlitchMr As for Perl 5, try perl5.git.perl.org/perl.git/blob/HE...p/cproto.t 19:59
TimToady well, one could extract keywords out of STD.pm6
FROGGS this will be in panda then this week ;o)
GlitchMr It contains all Perl 5 keywords
All keywords are below __DATA__ line 20:00
__DATA__ is __halt_compiler(); in PHP
BenBE Well, GeSHi sees keywords also to contain functions, constants, reserved words, ... 20:01
GlitchMr But, this list also contains keywords which should be parsed specially
m isn't simply keyword 20:02
FROGGS ya, perl isnt easy to parse
but I guess PHP is
GlitchMr Anyways, bye
I have to quit, sorry
FROGGS bye
20:03 GlitchMr left
PerlJam PHP has less context sensitivity. 20:03
BenBE sorear: Plz forward him to get back to me by mail; maybe we could update the language file somewhat.
moritz BenBE: the vim syntax file for Perl 6 is relative good 20:04
BenBE: at least it can serve as an initial list of keywords
20:04 lizmat left
PerlJam alester++ 20:04
20:04 pyrimidine joined
BenBE Basically I always need someone who's kinda used to a language to spot the issues and can decide on different situations ... 20:04
20:04 SamuraiJack left
BenBE doesn't use vim ;-) 20:04
moritz github.com/petdance/vim-perl/blob/.../perl6.vim 20:05
leont BenBE: No one is perfect ;-)
sorear BenBE: could you pm me the address that you want me to give him? 20:06
leont (re. not using vim ;-) )
20:08 fhelmberger_ left 20:11 sivoais left, sivoais joined, _jaldhar left
dalek c: 7ea682f | moritz++ | lib/terms.pod:
start to document terms
20:14
tadzik FROGGS: Oh wow, it runs
this does need advertising
moritz nr: class A { self }
p6eval rakudo cc1858: OUTPUT«===SORRY!===␤'self' used where no object is available␤at /tmp/8WSCwzCVmZ:1␤» 20:15
..niecza v21-1-ga8aa70b: OUTPUT«===SORRY!===␤␤'self' used where no object is available at /tmp/hT9jIkcONB line 1:␤------> class A { self⏏ }␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1435 (die @ 5) ␤ at /ho…
20:15 tokuhiro_ left
moritz r: say now.WHAT 20:16
p6eval rakudo cc1858: OUTPUT«Instant()␤»
FROGGS tadzik: these problems will go away soon 20:17
tadzik the lack of advertising?
FROGGS no, the need for it ;o)
tadzik I'm confused :) 20:18
FROGGS you wont need to switch any branches when using panda for example 20:20
tadzik yes
FROGGS and there will be a proper readme of course
thats it basically
tadzik but, I mean the fact that we have an SDL game in Perl 6 needs advertising
this is Something
FROGGS ahh, gotcha 20:21
thats why I'm doing it, to expand the modules list a little and to show that there is something that might interest ppl
20:23 immortal joined, immortal left, immortal joined 20:24 erkan left 20:25 test___ left
__sri loves the simplicity of Goroutines and hopes Perl 6 will have something similar www.golang-book.com/10#section1 20:26
[Coke] simplifies his life and unsubs from p5p. ahhhh. 20:27
20:27 pyrimidine left
tadzik __sri: async {} looks similar 20:27
20:28 immortal left, erkan joined, erkan left, erkan joined
tadzik I love Go's concurrency as well 20:28
__sri isn't async {} just a coroutine?
tadzik cold be 20:29
could, even
masak 'night, #perl6 20:30
FROGGS gnight 20:31
__sri nn
sites.google.com/site/gopatterns/c...coroutines (for those wondering what the difference between goroutine and coroutine is) 20:32
sirrobert having a hard-ish time getting this working... any help? gist.github.com/3626130
runtime-dynamic grammar construction 20:33
20:35 erkan left
sorear that create sub is wrong on so many levels 20:35
sirrobert woops, a couple of stray semicolons
fixing
20:35 erkan joined, erkan left, erkan joined
sorear it looks like you're trying to have the role statements run at runtime 20:35
it doesn't work like that. 20:36
sirrobert ok
sorear role statements ALWAYS run at the *instant they are parsed*
sirrobert to avoid an X/Y: what I *really* want to do is modify a grammar at runtime
that was my best stab at it so far
sorear you need to use eval. 20:37
sirrobert hmmmmm
ok
sorear also, save yourself some headaches later and use "my role"
sirrobert return the roles and apply them as vars?
20:40 erkan left 20:41 erkan joined, erkan left, erkan joined
sorear yes 20:41
sirrobert getting closer... it doesn't work, but it doesn't die =) 20:42
sorear gist?
sirrobert updating, one sec
sorear (it's _possible_ to do this without eval, but only by relying on nonportable MOP aspects.)
sirrobert updated. 20:43
some inner squishy bit in me wants to do it without eval
but I'll survive with eval for now
sorear which compiler are you using? 20:45
sirrobert rakudo
sorear The reason it's not working is that you're missing an eval on line 21. 20:46
sirrobert got it working (was missing an eval)
[Coke] hee.
sirrobert Is this the best approach to this for now?
sorear I recommend changing "role" to " anon role DescriptiveNameHere "
sirrobert hmmm ok (never used "anon" before)
but I like it =) 20:47
sorear role { ... } means anon role ANON { ... }
sirrobert yeah, but more explicit
sirrobert likes.
sorear debugging gets annoying when you have a million objects all named ANON
sirrobert heh nod
PerlJam Hmm.
sirrobert ok, great... that's basically functional 20:48
20:48 bruges left
PerlJam Wouldn't parameterized roles work? 20:48
sirrobert ok, one more twist (and thanks, sorear++ =) 20:49
I'd like to pass an anonymous sub into "create()" to be the 'action'... updating the gist...
20:50 bruges joined
sirrobert updated 20:50
sorear 'eval' closes over variables, you can just call the sub from the action
also, you may be interested in github.com/rakudo/rakudo/blob/nom/...r.pm#L2802
that's the part of Rakudo which handles grammar self-modification
20:50 erkan left
sorear eval-free but very unportable/depending on gritty details 20:50
buubot_backup sorear: ERROR: Can't locate object method "gritty" via package "details" (perhaps you forgot to load "details"?) at (eval 20) line 1.
sirrobert bookmarking
20:51 erkan joined, erkan left, erkan joined
tadzik ahaha 20:51
sorear you should just be able to put { &mtd($/) } on line 23
sirrobert sorear: trying some variations on that (check the gist) but not working yet 20:52
sorear sirrobert: what you have currently in the gist won't work because bare &mtd isn't a call
in perl6
'&foo()' # calls foo 20:53
sirrobert yeah
the current version does something weird
output is reversed (b\na instead of a\nb) 20:54
I think it's getting called during eval 20:55
instead of during parse
sorear ah 20:56
yes
&mtd($/) interpolates in a double quote string
maybe backslash the & and $
sirrobert oh, right
yeah that works
closure of &mtd in eval is weird (but super nice) 20:57
ok, thanks again sorear++... been tinkering with that forever
from there I can get to where I want to go
sorear r: my $x = 5; say q:c'$x = {$x}' # does rakudo support this?
p6eval rakudo cc1858: OUTPUT«===SORRY!===␤Colons may not be used to delimit quoting constructs at line 2, near ":c'$x = {$"␤»
sorear r: my $x = 5; say Q:c '$x = {$x}' # does rakudo support this? 20:58
p6eval rakudo cc1858: OUTPUT«===SORRY!===␤Colons may not be used to delimit quoting constructs at line 2, near ":c '$x = {"␤»
20:59 benabik left
mst bash$ cpan-upload Rakudo-Star-2012.08_000.tar.gz 20:59
may or may not work for anybody other than me but
trout.me.uk/perl/Rakudo-Star-2012.08_000.tar.gz
will install rakudo into your local::lib and then 21:00
21:00 skids left
mst eval $(perl -MRakudo::Star::Paths) 21:00
buubot_backup mst: ERROR: syntax error at (eval 20) line 1, near "$(perl "
mst will add the right thing to $PATH
sorear perl 6 on CPAN?
tadzik wow 21:01
mst++
mst sorear: if I'm going to write an Object::Remote backend to let people use rakudo objects from /usr/bin/perl 21:02
21:02 MayDaniel left
mst there's no fun if they can't just cpan rakudo, now is there? :) 21:02
PerlJam mst++
leont mst++
mst also, now you get to smoke Star across all the cpantesters nodes
(and I get to delay writing the O::R backend another weekend or two while I finish some other stuff without feeling -terminally- guilty about it ;) 21:03
oh hell, PAUSE has falsely indexed stuff in there because parrot bundles a bunch of random perl5 stuff 21:05
leont Fortunately, you're a PAUSE admin ;-) 21:06
mst yeah, I haven't made any mess here that I can't clean up myself
hahahah no wait only metacpan is screwed
it's a dev release
PAUSE won't've indexed anything
mst grins and stops panicking
anyway, I was hunting for 21:07
metacpan.org/module/MSTROUT/Rakudo...r/Paths.pm
21:10 glosoli joined, glosoli left 21:12 _jaldhar joined 21:16 oops joined
leont 's laptop is grinding to a halt, as expected􏿽x85 21:22
sorear leont: did you try to install rakduo star? 21:23
leont Yeah 21:24
21:24 raiph joined, att left
leont Until a few moments ago I was a gig into swap 21:25
Now comes swapping back in that gig :-|
sorear leont: rakudo takes about a gig and a half to build currently, IIRC 21:26
leont So I noticed
[Coke] I think recent estimates were closer to 1.2G, not that that helps much. ;)
PerlJam maybe the CPAN dist could probe memory and mention that to the user (and give them a way to abort) 21:28
21:29 erkan left, erkan joined, erkan left, erkan joined
sorear PerlJam: +1 21:30
21:30 thou left
sorear how many popular OSes have easy ways to probe memory? 21:30
21:30 rvchangue left
pmichaud I have an idea to reduce the build memory requirement, but it'll take a bit of time to implement. 21:32
good chance I can get it into the 2012.09 release, though.
diakopter ?
sorear $ sysctl -n hw.memsize 21:33
8589934592
PerlJam pmichaud: do less work?
sorear this seems to be a working osx way
21:37 raiph left
mst PerlJam: git://git.shadowcat.co.uk/scpubgit/Rakudo-Star.git 21:38
PerlJam: patches, tweaks etc. welcome - it's not a clever thing (intentionally)
sorear $ perl -nE '/^MemTotal:/ && /(\d+)/ && say $1 * 1024' /proc/meminfo
1041145856
hmm
there must be a CPAN module for this. :D 21:39
leont One?
mst: you should use $Config{path_sep} instead of hardcoding that ':' though, if you want it to work on silly operating systems from Redmond 21:40
gfldex i believe to have found a bug 21:41
r: gist.github.com/3626896
p6eval rakudo cc1858: OUTPUT«foo␤buzz␤use of uninitialized value of type Any in string context in regex tb at /tmp/pXU22QtzrI:9␤␤␤bar␤True␤»
gfldex when 'G.parse($s2)' is commented out it works as expected 21:42
n: gist.github.com/3626896
p6eval niecza v21-1-ga8aa70b: OUTPUT«foo␤buzz␤Use of uninitialized value in string context␤ at /home/p6eval/niecza/lib/CORE.setting line 1287 (warn @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 266 (Mu.Str @ 15) ␤ at /tmp/j44MhENcJv line 9 (G.tb @ 11) ␤ at /tmp/j44MhENcJv line 8 (G.T…
21:42 nodmonkey left
sergot good night! o/ 21:43
21:43 benabik joined 21:46 benabik left, erkan left
mst leont: it also doesn't work for csh 21:47
leont: in the long run I want to extract the local::lib shell generation stuff and share it 21:48
21:48 benabik joined
leont Right, makes sense 21:48
sorear aha, Sys::MemInfo
leont Also, something is wrong with the install or the R::S::Path, For me it installed Rakudo to core but the R::S::P to site
sorear leont: suprisingly, there *does* appear to be only one general module for this 21:49
not that it was easy to find
leont Also, it can't find libparrot for me (could it be you're making assumptions about local::lib taking care of stuff, I'm on perlbrew 21:51
mst leont: huh, I used INSTALLARCHLIB which I -thought- was going to contain the right thing 21:53
leont: shit, I probably wanted INSTALLSITEARCH didn't I?
21:53 benabik left
leont Yeah, probably 21:53
mst bah ... oh well, this is why I shipped it for people to look at :)
leont Or actually you want it to depend on INSTALLDIRS􏿽x85 21:54
mst tweaks, suggestions, patches all very much welcome
sorear hmm. I remember being very angry at Module::AutoInstall for throwing up a yes/no prompt in the middle of an overnight install run 21:55
leont That is one bit of MakeMaker that I rather dislike, it doesn't have a generic switch for such things
mst sorear: I fixed all of those, I think 21:56
sorear: of course, there are still dists with old autoinstalls bundled ... but I'm pretty sure a re-dist with latest M::I fixes those now 21:57
leont Also, the packlist isn't complete, so the only way to uninstall it is a rm
mst right, that's because it relies on its own install mechanism
21:58 Guest66495 left
sorear mst: This was in 2007, I think 21:59
leont Might still be nice if we can append the right things to it if that information is available 22:00
mst oh, absolutely
I'm not saying that isn't a valid bug, I'm just explaining -why-
22:01 immortal joined, immortal left, immortal joined, Circlepuller joined 22:02 Circlepuller_ left 22:05 Chillance left 22:12 PacoAir left 22:13 stepnem left, Chillance joined 22:32 skids joined 22:38 stopbit left 22:41 bruges left, bruges joined, Chillance left 22:48 FROGGS__ left, Exodist left, FROGGS left 22:49 Exodist joined 22:50 bluescreen10 left 22:55 xinming_ joined
japhb o/ 22:57
22:57 leont left
japhb Back after a few days away, and haven't caught up with backlogging yet, but I did notice a comment in the Rakudo Changelog about a performance increase from QAST. How big was it? 22:58
22:58 xinming left
dalek c: ac0c829 | (Geoffrey Broadwell)++ | lib/variables.pod:
Subset of Pod cleanups in variables.pod that are wins with current Pod parser
23:03
23:06 whiteknight joined
sorear o/ japhb 23:13
japhb o/ 23:21
How goes it, sorear?
sorear good
japhb Get any hacking in over the long weekend? 23:22
sorear Didn't try 23:24
japhb Same here. Mostly time with family and RL friends. 23:25
23:28 _jaldhar left, _jaldhar joined 23:31 average_drifter left, average_drifter joined 23:42 _jaldhar left 23:56 _jaldhar joined