perl6-projects.org/ | nopaste: sial.org/pbot/perl6 | evalbot: 'perl6: say 3;' | irclog: irc.pugscode.org/ | ~280 days 'til Xmas
Set by mncharity on 18 March 2009.
literal search.cpan.org/perldoc?once 00:02
Perl 6 doesn't have ONCE {}, does it?
if not, should it? or shouldn't it?
00:05 Limbic_Region left
TimToady what do you mean by ONCE? 00:09
you might be looking for START {} 00:10
literal like that Perl 5 module does it
hm, yes, could be
TimToady it's what state vars use the first time through to init
literal but a START would be run before the "my $self = shift;" there, wouldn't it?
TimToady no, and ENTER would 00:12
literal ok
TimToady START isn't quite the same as p5's ONCE
if you clone a closure, START will run again
since it's logically a different sub 00:13
p5's definition is a bit too static, actually
literal yeah
00:14 NordQ left 00:15 NoirSoldats left 00:16 NoirSoldats joined
pugs_svn r25958 | lwall++ | [STD] reattach accidentally severed PREs and POSTs 00:26
r25958 | lwall++ | [Cursor] interally attach ast as _ast rather than _
r25958 | lwall++ | [viv] print STDERR instead of warn to suppress perl -d confessions
r25958 | lwall++ | [gimme5] didn't translate @*FOO correctly to localizable @::FOO global
00:27 dolmen left 00:38 bacek_ joined 00:40 icwiener_ left 00:41 M_o_C left
mikehh rakudo (e38edf9) builds on parrot r37613 - make test/make spectest PASS - Kubuntu Intrepid i386 00:42
dalek kudo: a67ef98 | (Stephen Weeks)++ | Test.pm:
Put Test into the Test namespace
00:48
01:00 nnunley joined 01:03 FurnaceBoy left 01:15 amoc joined 01:19 wknight8111 left
literal re the above rakudo commit: so exporting works now? 01:34
01:34 dukeleto joined
literal I see it uses C<package> rather than C<module> though 01:35
TimToady yes, that looks kinda bogus, given it's specced to switch to Perl 5 when it sees that... 01:37
01:38 eternaleye joined 01:42 skids joined
Tene Oh, right. 01:51
Tene fail. ><
dalek kudo: 6a4058a | (Stephen Weeks)++ | Test.pm:
Use 'module' instead of 'package'. literal++
01:54
Tene literal: yes, exporting works to some degree 01:55
literal: only the :DEFAULT tag works, though.
literal ok 01:57
02:11 gothos joined, DemoFreak left
dalek kudo: 627b6d6 | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 325 files, 7271 passing, 0 failing
02:11
02:12 dukeleto left 02:15 Cybera left 02:58 justatheory joined, bp0 left 03:13 s1n1 joined
s1n1 frooh: ping 03:14
frooh 1 sec, phone
03:20 kimtaro_ joined 03:30 dukeleto joined
s1n1 frooh: i just sent you an email, i have to get up early tomorrow 03:33
frooh wait 03:34
I'm back
s1n1 read the email real fast then
frooh is there anything you'd want to realtime talk about?
k
one sec
I agree on all counts of the email 03:35
especially (imho) the last and most important part
I look forward to those links
and I have a bunch that wayland has sent me so I'll maybe read them tonight
s1n1 they're _long_, so i'm still reading them
frooh right 03:36
well, you get rest etc. I think I am totally free tomorrow, which will probably mean a lot of destressing, but I can talk about stuff, but probably not code 03:37
it was a very hectic work week :-)
03:38 kimtaro left
s1n1 i know the feeling 03:39
frooh yeah, in general I don't let work get to me, but I am kinda in charge of the project and it's behind my schedule, so yeah
03:41 dukeleto left
s1n1 i'll be home around noon, have to do some studying, but i'll be around to talk 03:43
03:43 frooh left, tarbo2 left 03:44 frooh joined
frooh s1n1: sorry, ubunut crashed... 03:44
04:00 tarbo2 joined
meppl good night 04:03
s1n1 frooh: tis fine, i was just saying i'll be home after noonish tomorrow
04:05 meppl left
frooh k, I'll talk to you then for sure 04:07
04:11 s1n1 left
frooh does the autothreading in junctions do any short circuiting? 04:27
TimToady yes 04:31
at least, it's allowed to short circuit in any order 04:32
so it can do what it thinks are the cheap tests first, or the ones likeliest to falsify
even one() can short-circuit as soon as it finds two 04:33
frooh and am I correct that 1|2|3|4 autothreads, but my @a = 1,2,3,4; any(@a) doesnt? 04:36
theoretically because @a could be arbirarily large? 04:37
TimToady I don't understand your question. any(@a) is exactly equivalent to 1|2|3|4 04:44
frooh ok, then I don't understand this:
reenode.net/faq.shtml#nicksetup
23:03 < meppl> good night
er
Junctions pass as part of a container do not cause autothreading 04:45
unless individually pulled out and used as a scalar
what does that mean?
04:45 orafu left, OuLouFu joined 04:46 OuLouFu is now known as orafu
TimToady @a there doesn't contain a junction 04:46
lambdabot Maybe you meant: activity activity-full admin all-dicts arr ask . ? @ v
TimToady so that doesn't apply
frooh so did I mean:
and am I correct that 1|2|3|4 autothreads, but my @a = 1,1|2,5|3,4; any(@a) doesnt?
TimToady to the first approximation, that means if you pass junctions as part of the list context part of the arguments, they're just scalars 04:47
so you end up with 2-deep anys there
but it also means if you pass in @a as a scalar argument it doesn't matter that it contains junctions 04:48
frooh hmmm
is there anyway you could explain with code? 04:50
becasue I don't really follow
TimToady my @a = 1, 1|2, 3|4; sub foo(@x) { for @x { .bar } }; foo(@a) 04:51
no autothreading happens until $_.bar
frooh oh
ok
ok, how about this: is there a way we can use junctions to autothread maps and stuff? 04:53
I am guessing not.... 04:54
04:55 disismt left
TimToady if you declare the parameter to the block as Any, it'll autothread 04:57
map -> Any $x { $x.say }, @a
but blocks default to Object now
frooh that's really cool 04:58
so is the basic idea behind junctions, as of now, to provide a lingustically cheap threading? or is it for nice things like $f = 1|2?
TimToady it's supposed to just all fall out of whether the dispatch fails to Object, which delegates to junction
it's secondarily about threading, and mostly about distributing an operator over data values linguistically just like English 04:59
frooh ok
TimToady if $f equals 1 or 2 is good English
frooh right
and I remember when I learned perl years ago trying to do if ($f == 1|2|3) 05:00
TimToady and it works very well where the comparison is implict, like with when statements
frooh right, which is when I have used them so far
amoc rakudo: say #{ comment} "hi" 05:01
p6eval rakudo 627b6d: OUTPUTĀ«say requires an argument at line 1, near " #{ commen"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤Ā»
frooh so could I do this: given ($body) {when(.hasfeet&.hashands&.hashead) { say "doing well"} }
that's all I can really imagine for & 05:02
TimToady std: given ($body) {when(.hasfeet&.hashands&.hashead) { say "doing well"} }
p6eval std 25958: OUTPUTĀ«##### PARSE FAILED #####ā¤Malformed blockā¤when() interpreted as function call at line 1 ; please use whitespace instead of parensā¤Unexpected block in infix position (two terms in a row) at /tmp/K8eNnYaIts line 1:ā¤------> ody) {when(.hasfeet&.hashands&.hashead) { say
.."doi...
frooh oh yeah
std: given $body {when .hasfeet&.hashands&.hashead { say "doing well"} }
p6eval std 25958: OUTPUTĀ«Potential difficulties:ā¤ Variable $body is not predeclared at /tmp/J2r953xkyb line 1:ā¤------> given $body {when .hasfeet&.hashands&.hashead { sayā¤ok 00:04 36mā¤Ā»
TimToady basically, it likes the syntax 05:03
frooh but other than that it works...
very cool
TimToady but usually you want whitespace around your binary ops
since if it gets out of sync, it could parse &.foo as a function call
er, method call 05:04
frooh ok
so preferably
std: my $body; given $body {when .hasfeet & .hashands & .hashead { say "doing well"} }
p6eval std 25958: OUTPUTĀ«ok 00:04 36mā¤Ā»
frooh looks better anyway
TimToady std: given "body" { when .hasfeet & .hashands & .hashead { say "doing well"} }
p6eval std 25958: OUTPUTĀ«ok 00:04 35mā¤Ā» 05:05
frooh but that would give a runtime error right?
because Str doesn't have those methods?
TimToady well, someone might have monkey patched it :)
frooh hahaha
ok
frooh wonders...
amoc there is any tickets about 'perl6 comment' in rakudobug, commentation is not dealt with? 05:06
frooh rakudo: given "frew" { when /^fr/ & /ew$/ { say "hello frew!" } }
amoc ...yet?
p6eval rakudo 627b6d: OUTPUTĀ«hello frew!ā¤Ā»
frooh rakudo: given "fre" { when /^fr/ & /ew$/ { say "hello frew!" } }
p6eval rakudo 627b6d: RESULTĀ«Bool::FalseĀ»
TimToady well, it should probably be returning Nil, not False 05:07
frooh but still, the case that matters to me works
so how do you feel linguistically about people using junctions for autothreading? 05:08
TimToady amoc: dunno, I don't track that
frooh you don't think that should be a separate deal?
TimToady depends on what you mean by that
there's no guarantee all the threads will run 05:09
frooh so I could do something like map -> Threadable $f { $f.foo }
TimToady if you want guarantees you should be using hypers instead
frooh so if I want a threaded map I use what, >> ?
amoc okay, thank you.
TimToady hyper map {...}, list 05:10
frooh what if I want OO syntax?
TimToady you'll still get the results in the same order, however
frooh list.hyper map { } ?
TimToady listĀ».map
frooh well, for a maa we want them in the same order, right?
map*
haha, nice
TimToady rakudo: [1,2,3]>>.map: { .say } 05:11
p6eval rakudo 627b6d: OUTPUTĀ«Statement not terminated properly at line 1, near ">>.map: { "ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤Ā»
TimToady pugs: [1,2,3]>>.map: { .say }
p6eval pugs: RESULTĀ«((*** Cannot cast from VList [] to Pugs.AST.Types.VCode (VCode)ā¤ at /tmp/jV7wtIcbG7 line 1, column 10 - line 2, column 0, *** Cannot cast from VList [] to Pugs.AST.Types.VCode (VCode)ā¤ at /tmp/jV7wtIcbG7 line 1, column 10 - line 2, column 0, *** Cannot cast from VList [] to...
TimToady std: [1,2,3]>>.map: { .say } 05:12
p6eval std 25958: OUTPUTĀ«ok 00:02 36mā¤Ā»
TimToady std: [1,2,3]Ā».map: { .say }
p6eval std 25958: OUTPUTĀ«ok 00:02 36mā¤Ā»
frooh speaking of
I still don't understand the diff between (..) and [..]
[] makes an array and () makes a List?
TimToady () doesn't make anything 05:13
it's only for grouping
frooh ok
so 1,2,3,4 makes a list
() groups it (for . ops etc)
and [] gives me an array from that list?
and arrays are mutable
where lists aren't
amoc i think it is. 06:00
Tene hmm... wonder if jnthn is waking up soon... 06:05
I have a weird problem.
06:19 ejs joined 06:38 justatheory left
amoc hello, 06:44
is, my Int $n, and, my $n of Int, is different?
perl6: my Int $n = "str"; 06:46
p6eval rakudo 627b6d: OUTPUTĀ«Type mismatch in assignment.ā¤current instr.: 'die' pc 15868 (src/builtins/control.pir:204)ā¤Ā»
..pugs: RESULTĀ«\"str"Ā»
..elf 25958: RESULTĀ«"str"ā¤Ā»
amoc perl6: my $n of Int = "str"; say $n.WHAT
p6eval rakudo 627b6d: OUTPUTĀ«Strā¤Ā»
..elf 25958: OUTPUTĀ«Unknown rule: trait_verb:fulltypenameā¤It needs to be added to ast_handlers.ā¤ at ./elf_h line 2841ā¤Ā»
..pugs: OUTPUTĀ«*** ā¤ Unexpected "of"ā¤ expecting "?", "!", trait, "=", infix assignment or operatorā¤ at /tmp/doIHnnZoul line 1, column 7ā¤Ā»
06:47 bacek_ left 06:50 ejs left
amoc perl6: my $n is Int = "str"; say $n.WHAT 06:52
p6eval elf 25958, pugs, rakudo 627b6d: OUTPUTĀ«Strā¤Ā»
amoc Errr. opps.. Int is not implementation type. 06:54
perl6: my Int $foo; my $bar of Int; say ~($foo.WHAT, $bar.WHAT) 06:56
p6eval rakudo 627b6d: OUTPUTĀ«Int Failureā¤Ā»
..elf 25958: OUTPUTĀ«Unknown rule: trait_verb:fulltypenameā¤It needs to be added to ast_handlers.ā¤ at ./elf_h line 2841ā¤Ā»
..pugs: OUTPUTĀ«*** ā¤ Unexpected "of"ā¤ expecting "?", "!", trait, "=", infix assignment or operatorā¤ at /tmp/Z2tZhR7VAG line 1, column 22ā¤Ā»
amoc pugs: my $foo of Int; 06:57
p6eval pugs: OUTPUTĀ«*** ā¤ Unexpected "of"ā¤ expecting "?", "!", trait, "=", infix assignment or operatorā¤ at /tmp/GKeMxMMkFN line 1, column 9ā¤Ā»
07:07 mtve- joined 07:25 DemoFreak joined
amoc rakudo: sub foo as Int {...} 07:38
p6eval rakudo 627b6d: OUTPUTĀ«Malformed routine definition at line 1, near "foo as Int"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤Ā»
07:39 meteorjay left 07:42 dukeleto joined 07:46 meteorjay joined 08:06 schmalbe joined 08:10 Tene_ joined 08:18 mberends joined 08:22 disismt1 joined 08:23 disismt1 left 08:25 Tene left 08:27 grwi joined, grwi left 08:29 disismt joined 08:31 disismt left, disismt joined 08:33 disismt left, disismt joined 08:47 disismt left, disismt joined 08:48 disismt left, disismt joined 08:53 icwiener joined 09:04 kimtaro joined 09:10 kimtaro_ left 09:36 masak joined 09:37 gothos left
mberends masak: yo! 09:37
masak mberends: ahoj!
It's weekend, which means Perl 6 hacking galore! 09:38
mberends just concentrating on rt.perl.org/rt3/Public/Bug/Display.html?id=63878
there's a related report and workaround about to be submitted 09:39
masak nice.
I have a question to the Rakudo devs; just going to pull first.
mberends I liked your enum Context usage in Pod::Parser, but took it a bit further. rt.perl.org/rt3/Public/Bug/Display.html?id=64046 09:50
masak my usage? ISTR the enum was there from the beginning...
mberends it was on ice because of inability to smartmatch in given ... when 09:51
masak ah, yes.
mberends given ... when int E::member { ... } works around it using the 'int' cast 09:52
dumbs down the match, as it were 09:53
masak ok, here goes. pmichaud, jnthn: why is this happening> gist.github.com/82795
s/>/?/ 09:54
mberends masak: why lines instead of slurp ? 09:56
masak mberends: I discovered lines today at breakfast.
it's slurp + split("\n")
very convenient.
mberends ok
masak but it comes in two flavours: a fh one and a Str one, only the former being implemented yet. 09:57
so I thought adding the latter would be a simple patch.
it was, except that it doesn't work. and now I'm stumped, and wondering how to proceed.
up until now, I have nothing but praise for the way this setting thing works. it makes Rakudo programming a hundred times more accessible for non-Parroters. 09:58
mberends would it help to type the $filename parameter ?
masak I'll try, but we don't really want that. 09:59
...didn't affect the outcome. 10:00
mberends gah, but you did write so in the TODO :( 10:01
masak ah, I thought you meant 'Str $filename'.
sorry.
10:01 kimtaro_ joined
masak no, '$filename as Str' is what we want, but since we can't have that yet, it can't be part of the solution. 10:02
also, given that I pass a Str, it shouldn't be part of the problem.
mberends well, I thought 'Str $filename' and '$filename as Str' were equivalent, but that may my C# and VB.NET Kool-Aid kicking in. 10:03
s/may my/may be my/ 10:04
masak mberends: S02:1092. 10:06
10:06 Cybera joined, Cybera left, Cybera joined, Cybera left, Cybera joined
masak Cybera: welcome, goodbye, welcome, goodbye, and welcome. 10:07
Cybera perl6: "hello world".say
p6eval elf 25958, pugs, rakudo 627b6d: OUTPUTĀ«hello worldā¤Ā»
masak consensus++
mberends gets as/of now. has masak++ tried 10:10
10:10 kimtaro left
masak no, but I don't believe 'as' is implemented. I'll try, though. 10:10
and, as I said, that can't be the issue.
mberends multi sub lines(Str $filename) { ...
10:11 pmurias joined
masak aye, tried that. same error. 10:11
mberends ughk
masak in the best case, I've misunderstood something, and jnthn will say 'duh' and fix it. 10:12
in the worst case, I get to submit another rakudobug :)
bacek good evening 10:13
masak bacek: salutations to you, sir.
bacek masak: how things?
masak bacek: good, good. it's the weekend! :) 10:14
bacek: a ty?
bacek masak: almost good :)
masak oh, right. I promised to write in Cyrillic. hold on... :)
Š° ты? :) 10:15
bacek masak: Š¾Ń‚Š»ŠøчŠ½Š¾! :)
amoc bacek: good morning !
masak yes, isn't it? :P
bacek masak: "Š¾Ń‚Š»ŠøчŠ½Š¾" translates as "excellent" :) 10:16
amoc: it's evening!
masak knows
amoc must be tired to read 'evening' as 'morning' 10:17
bacek: evening!
mberends masak: if your BSD port allows it, you may be able to rebuild netcat to enable -c and -e though ōæ½x96DGAPING_SECURITY_HOLE ;) See also: sectools.org/netcats.html 10:18
masak mberends: sorry to react this way, but... meh. :P 10:19
if you introduce platform-specific solutions into your code, why should I have to do extra work?
bacek masak: (problem with "lines") You can workaround it by creating setting/IO.pm with single "multi sub lines" and remove !EXPORT(lines) from classes/IO.pir 10:20
masak bacek: thanks!
that makes a weird kind of sense, I guess.
bacek but anyway, it deserves own bug report :)
masak submits 10:21
mberends I really would like you to drive podserver over your own docs :) A: because rakudo does not (yet) implement the platform-independent solution.
bacek start thinking about poke into Parrot guts to resurrect "socket" opcode. 10:22
masak mberends: I may actually need to do this anyway, during the experiments with Web.pm
mberends: I'll try to get a round tuit.
mberends jnthn++ seems to be warming to the required IO updates to give us socket() 10:23
masak \o/ 10:24
mberends Sockets will open the floodgates of Perl 6 networking :) I can't wait... 10:26
masak soon, Perl 6 will be the duct tape of the 'Net! 10:29
amoc cheers * 10:30
mberends it sure will. there will be an explosion of Perl 6 code when it can network.
masak wants that online interactive Perl 6 shell that we had in 2005 10:31
maybe that would be a good GSoC task? :)
mberends masak: not tried here, but is socat available in ports for OSX?
10:31 kidd left
masak checks 10:31
mberends: yep. 10:33
mberends will try socat instead of netcat 10:34
10:34 kidd joined
pmurias mberends: why can't you use the socket functions using FFI? 10:37
mberends sorry, what is FFI? 10:38
pmurias i think it's called NCI in parrot 10:39
bacek pmichaud: there is old implementation of socket API in Parrot. 10:40
pmurias foreign function interface
mberends ah, thanks. then because I don't know how to. it would be better that running netcat or socat.
10:40 nihiliad left
mberends listen() and accept() in-process would be miles faster 10:40
10:40 meteorjay left
pugs_svn r25959 | masak++ | [t/TASKS] added need for tests for lines() 10:41
10:43 meteorjay joined
mberends pmurias: I would be enormously grateful if anyone could come up with NCI or FFI to replace line 167 in github.com/eric256/perl6-examples/t.../Daemon.pm 10:47
that webserver is usually available at autoexec.demon.nl:8888/ 10:50
10:51 kate21de joined
mberends cycling() & 10:52
dalek kudo: 836900e | (Carl Masak)++ | src/ (3 files):
[setting/Any-str.pm] implemented lines($filename)
11:12
masak bacek++ for explaining what needed fixing. 11:13
11:15 icwiener left
bacek masak: you are very welcome :) 11:32
11:35 rindolf joined 11:38 M_o_C joined
bacek masak: according to spec "multi lines (Str $filename,...". Why don't put named args in signature even if they are not handled yet? 11:45
masak bacek: I believe that should be '$filename as Str'.
if the spec says 'Str $filename', it's because it's wrong.
bacek masak: may be. But I'm talking about "Bool :bin" and so on :) 11:46
masak oh.
masak fixes 11:47
bacek :)
pugs_svn r25960 | masak++ | Merge branch 'typo' 11:50
11:56 rindolf left
masak it surprises me somewhat that $enc has the default 'Unicode'. in the eyes of some people, Unicode and UTF-8 may be synonyms, but they really aren't. 11:56
12:00 riffraff joined
masak also, $nl is a slightly misleading name, given the discussion we had about input-record-separator et al. 12:02
(hm, perhaps not. the sub is called 'lines', after all)
12:17 rindolf joined
diakopter eee 12:17
12:18 Whiteknight joined
diakopter eee 12:19
masak diakopter: can I help you, sir? :)
Matt-W Morning 12:20
masak Matt-W: OH HAI
amoc morning!
diakopter 13hr round tuit today
Matt-W masak: if you get a few minutes, could you pull form and try to run the tests? I'd love to know if you also see an infinite loop in 03-textformatting 12:21
masak Matt-W: gladly, sir.
Matt-W cheers
masak I'm doing other things, but I can multitask. :)
Matt-W :)
I have to do some things now that I can't multitask as they involve the bathroom and copious quantities of hot water
something laptops aren't fond of
masak does './proto update form'
Matt-W but I shall be back later 12:22
diakopter is a Matt W
amoc feels guilty that he bug-reported even before reading test script. 12:23
sorry, but may i ask what 'dispatch' generally mean? I really cannot guess exactly. 12:24
diakopter decide where to redirect and redirect
amoc er.. 12:25
diakopter decide where to redirect, and then redirect there
masak amoc: in the context of methods and subs, decide which one to call.
Matt-W: aye, loopty-loop. 12:26
Matt-W: 'course, Alan Turing says I can't know whether it will eventually terminate... :P
diakopter remembers the days of IRCers #perl6 while showering
amoc read docs again 12:27
masak: diakopter: thanks for your kindness ! 12:30
dalek kudo: d448f91 | (Carl Masak)++ | src/setting/Any-str.pm:
expanded signature of lines multi
12:32
12:35 NordQ joined
bacek masak: You;ve put this checks into wrong file... They should be in IO.pm. 12:36
masak bacek: right. fixing. :) 12:37
mberends Matt-W: (when dry) prove on debian stable (5.0 Lenny) does not support -e :( 12:39
mberends suggests github.com/eric256/perl6-examples/b.../bin/prove 12:41
masak gosh, we have substitutes for everything nowadays, don't we? :)
bacek mberends: it does 12:42
mberends: aptitude install libtest-harness-perl 12:43
mberends bacek: apt said selecting perl-modules instead of libtest-harness-perl, perl-modules is already the newest version :( 12:45
mberends considers switching to 'testing' or 'unstable' 12:46
bacek mberends: apt-cache policy libtest-harness-perl?
12:47 Woody4286 left
mberends bacek: lib-test-harness: (none) perl-modules: 5.10.0-19 12:48
bacek mberends: strange... 12:49
apt-cache policy libtest-harness-perl
libtest-harness-perl:
Installed: 3.12-1
Candidate: 3.12-1
mberends: can you try apt-get instead of aptitude? 12:50
mberends bacek: less `perldoc -l Test::Harness` shows 2.64. Yep, tried apt-get. 12:51
masak takes a walk in the sunshine
dalek kudo: 79bc4f3 | (Carl Masak)++ | src/setting/ (2 files):
moved param checks in lines from delegator to delegatee
12:52 pguillaum joined, pguillaum left, pguillaum joined, pguillaum left
mberends bacek: this laptop should stay with debian lenny, but I shall try squeeze or sid on the eeePC shortly. 12:54
bacek mberends: hmm.. 2.64 is from default perl 5.10. I don't understand why apt refuses to install libtest-harness-perl 12:55
mberends probably perl-modules is a bundle that specifies 2.64
bacek mberends: I uses Lenny. without "testing", "sid" or "experimental" 12:56
mberends: correct. But you should able to install newver version...
Matt-W masak: Good it's not just me 12:57
mberends: Booooooooooooooo
mberends booohooo
jnthn hhi all 12:58
mberends bacek: let me try removing perl-modules and then install lib-test-harness-perl instead
jnthn: hhi 12:59
bacek mberends: removing perl-modules is bad idea :)
jnthn: OH HI
12:59 riffraff left
mberends oh, glad you told me Just In Time 12:59
jnthn ooh, someone moved lines to the setting? 13:00
Did they manage to do it without breaking a spectest that wanted it exported? :-)
jnthn failed to move it for that reason...which distracted him into working on import... 13:01
bacek jnthn: I proposed a "cheat" for this :) 13:02
masak jnthn: I didn't move anything, I just put the sub part in the setting. 13:05
but yes, all spectests pass, even after the change.
jnthn masak: aha, OK
I'm hoping we can avoid such cheats soon.
masak I filed a rakudobug about it. :)
jnthn I started working on import last night. We have a first cut, but it's wrong.
13:06 xinming left
jnthn masak++ - good, we'll not forget to come back and clean it up 13:06
bacek afk & # sleep
masak bacek: 'night
13:06 xinming joined
jnthn Though we're not going to do it right until two more pieces are in place at least. 13:06
bacek masak: g'night
mberends bacek: thanks
masak jnthn: I saw you and pmichaud speaking about seen-to-be-features in the logs the other day. among other things Buf. pmichaud prognosticized that someone might need it before the summer. 13:07
I think I'm that someone. I will have a go at implementing it.
will do it fairly TDD. at present, there is only one spectest for Buf. it checks that it is an already-defined type. 13:08
jnthn s/seen/soon/ # ?
masak I suspect that even fleshing out will require some clarifications in the spec.
jnthn: oh. aye.
jnthn Tests and demand would certainly help get us towards an implementation. 13:09
masak for example, how much is a Bug Str-like?
can I do .subst on a Buf?
jnthn: the demand is that I need to be able to escape URLs in Web.pm.
jnthn I don't know, and I don't know what the spec says on those issues either, if anything.
Aha, OK. 13:10
masak jnthn: I collected all mentions on Buf in the spec. let me nopaste it for you.
jnthn OK, nice.
masak gist.github.com/82837 13:11
jnthn (BTW, to fill anyone in on wondering what needs to happen to get import right, we need to import to the lexpad rather than the namespace by default. However, that won't fly at the moment because (1) the class boundary/lexical issue and (2) lack of lexical routines and (harder...ugh) lexical multi subs)
13:11 Woody4286 joined 13:13 Whiteknight left, Whiteknight joined
jnthn masak: quite a few "may be" in there ;-) 13:15
masak it's a liberal type :)
diakopter does Conjectural 13:17
masak ;)
13:17 hercynium joined
diakopter also, does Conjection 13:17
jnthn thinks 13:18
y'know, a lot of what we need to do the underlying buf8, buf16 and buf32 is exactly what we need for compact arrays. 13:19
masak right.
jnthn The spec says as much.
I figured we'd write a CompactStore PMC or something. 13:20
Then we can use it to provide the actual storage for buf8, buf16 and buf32, as well as my int8 @array etc. 13:21
And yes, looks like Buf wants to be a parametric role. 13:22
diakopter parameterized
diakopter hit enter little late 13:23
jnthn Yes, Array needs to be one of those too. I'm working towards that, but it's...painful.
diakopter jnthn: steal the .net msil implementations - just convert 'em to to pbc :P 13:24
kidding, sort of. 13:25
jnthn ;-)
Perl 6's idea of parametric poly could be interesting to map to .Net's one. :-)
(Not impossible, mind.) 13:26
The main issue is that you can parameterized on values rather than just type-ish things in Perl 6.
13:27 Schnueff joined 13:35 kimtaro joined
diakopter yeah. considering the practical limitations on creating runtime types.. gotta create/load a new assembly with all its overhead. hmm. what about a generic type that's "instantiated" by a runtime type manager that creates tuples/permutations of bunch of filler types... lightweight runtime types. hmmm 13:37
obviously /unsafe 13:38
13:42 kimtaro_ left
jnthn OK, I need some exercise and fresh air 13:43
jnthn afk - walking to Austria 13:44
masak o_O 13:45
diakopter (and back?) 13:47
13:56 NordQ left, clintongormley joined
mberends Matt-W: form t/03-textformatting.t takes all available RAM, CPU and time by design, right? ;) 13:57
clintongormley heya - i've just been looking at szabgab's P6 tricks and treats : szabgab.com/blog/2009/03/1237284490.html
13:57 justatheory joined
clintongormley specifcally how substr fails on a junction 13:57
and i was interested to look at another function which has been built to operate on junctions 13:58
he writes: "In any case this is an open issue and the Rakudo team will love to see someone who wants to implement substr() in Perl 6 that will handle junctions correctly. "
i was wondering where this junction-enabled substr would fit into the src/ 13:59
as a method on class Junction?
or under settings?
any pointers?
14:00 hudnix left
clintongormley whistles nonchalantly 14:00
.oO(I am not alone I am not alone I am not talking to myself like a crazy person )
14:01
mberends we were just being polite in not answering back ;)
clintongormley :D 14:02
i've GOT YOU NOW!
mberends eek!
clintongormley any ideas on my questions above?
mberends er, still reading the P6 page
clintongormley go down to the bit on "Functions on Junctions" 14:03
and it says it fails because substr doesn't know how to handle junctions yet
so i was thinking of trying to make it work
but, not being familiar with the internals AT ALL, i'm desperately grep'ing the code to see where a junction-enabled substr would fit in 14:04
mberends ok, there was #perl6 mention of that less than 2 days ago.
in a similar scenario the Junction evaluated to 'J' 14:05
clintongormley yep
14:06 rindolf left
clintongormley oooh: TimToady 14:07
PLEASE DO NOT USE JUNCTIONS AS SETS!!!!!!!!!!!!
oh dear, that blows my understanding 14:08
masak clintongormley: Junctions are sets, with some additional behaviours.
and yes, I think it blows everyone's understanding at times. 14:09
clintongormley i'm just reading the IRC logs to see why TimToady was so adamant about not using junctions as sets
mberends yeah, we need to scroll back more than 2 days
clintongormley btw, .eigenstates? 14:10
what does that do?
(apologies to barge in and ask questions like: "what does print mean?")
masak clintongormley: it looks inside the junction.
14:11 nihiliad joined
mberends clintongormley: fwiw, irclog.perlgeek.de/perl6/2009-03-17#i_992109 14:11
clintongormley ta
masak clintongormley: generally, the S32 documents answer questions like 'what does method/sub X do?'
clintongormley ok thanks 14:12
clintongormley is apparently going to have to sit down with S[1..n] and $n bottles of wine
mberends ditto 14:13
masak has done that a few times, but will soon need to do it again 14:14
clintongormley damn when will be seeing the idiots guide?
clintongormley looks at masak .oO( u4x? )
masak clintongormley: we're writing user documentation this summer.
clintongormley: aye.
hopefully we'll get the help of some eager GSoC fellow. 14:15
clintongormley yeah
skids so maybe we just should implement Set and Bag :-)
clintongormley do you have the docs planned out yet?
set and bag? 14:16
pmurias clintongormley: junctions don't make a good data structure, they autothread so you have to be carefull when passing them around
skids They are listed as types.
masak clintongormley: I have plans, but I'm currently not pouring tuits on them.
clintongormley pmurias they don't make a good structure because the end user has to be careful?
pmurias and they are more intended to be used like '$foo & $bar < 8'
clintongormley and they can only autothread if they have no external impact 14:17
pmurias external impact = ?
clintongormley ie, they can't change anything other than themselves, or rely on any value other than themselves 14:18
otherwise it's not safe to autothread
clintongormley is guessing
skids Since when does Perl keep one from shooting themselves in the foot? :-)
pmurias you are not supposed to depend on the order of autothreading 14:19
masak junctions are made of pure shoot-in-the-foot matter.
clintongormley is there any example of junction aware functions yet? 14:20
not any/none etc
skids In perl there are "many ways to do it", but junctions are definitely a prime foot shooting tool.
masak junctions, in themselves, are "many ways to do it". 14:22
skids clintongormley: if you mean one that does not autothread, yes. Junction.perl
clintongormley i was thinking about ones that DO autothread
skids anything
pmurias that expects Any
skids Yeah well OK point taken.
clintongormley interested to see how one would write substr to work on junctions without doing : for $junction.elements 14:23
</pseudocode>
skids rakudo: my sub foo ($a) { say "#" ~ $a }; my $j = any(1,2,3); foo($j);
p6eval rakudo 79bc4f: OUTPUTĀ«#1ā¤#2ā¤#3ā¤Ā»
14:23 justatheory left
szabgab wow, someone is reading my blog! 14:25
clintongormley loyal subscriber!
gravity really enjoyed szabgab's last perl6 tip entry
szabgab clintongormley, Just yesterday I added a few tests to t/spec/S03-junctions/misc.t 14:26
clintongormley yes szabgab, i saw that
szabgab especially for the substr() and juctions things
clintongormley i was keen to give it a go
but then the word Ā«authothreadingĀ» looms, and i throw up my hands
szabgab gravity, I am happy to hear that
skids OK, I'll bite, where is this blog? 14:30
clintongormley www.szabgab.com/blog/szabgab.rss
szabgab.com/
szabgab looking at the reddit number I wonder why is it going down, do people really downvote the post? 14:33
if so why ? is that because the post is bad or because they don't want to hear about Perl 6 ?
clintongormley you can't hope to understand the mentality of everybody on the internet
on announce.jpress.co.uk we regularly get people leaving lots of stupid messages with no purpose 14:34
"spaghetti monster"
huh?
there are lots of bored people out there 14:35
14:35 disismt left
szabgab have to go now, child pickup service 14:35
14:36 disismt joined, NoirSoldats left 14:40 hercynium left 14:41 sri_kraih_ joined 14:42 sri_kraih_ left, sri_kraih_ joined
Cybera Have a problem about raduko installing. I got the file using Git in the Program Files , then perl Configure.pl --gen-parrot , and got error for " cant open " for "Program" , masak said 'Program' is not quoted so not interpreted correctly , and i sent bug report etc. Then I created the folder as C:\git\bin\raduko , and now i got error as : 14:43
Can't locate Test/Harness.pm in @INC (@INC contains: lib config /usr/lib/perl5/5.8.8/msys /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/msys /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl .) at lib/Parrot/Configure/Options/Test.pm line 7.
BEGIN failed--compilation aborted at lib/Parrot/Configure/Options/Test.pm line 7
masak Cybera: ah, now I see what it is.
Cybera: you need to install Test::Harness. 14:44
Cybera: something like 'sudo cpan Test::Harness'
sorry, I missed that when you /msg'd before.
Cybera k thx , i will report back about final result :) 14:45
masak ...or the next hurdle. :) 14:46
pmichaud good morning #perl6
masak pmichaud: greetings.
14:56 FurnaceBoy joined
Cybera Use of uninitialized value $dist_id in hash element at C:\Perl\site\lib/CPAN/SQLite/Search.pm line 177. 14:56
Use of uninitialized value $dist_id in hash element at C:\Perl\site\lib/CPAN/SQLite/Search.pm line 186.
Use of uninitialized value in concatenation (.) or string at C:\Perl\site\lib/CPAN/SQLite/DBI/Search.pm line 204. 14:57
DBD::SQLite::db prepare failed: near ")": syntax error(1) at dbdimp.c line 271 at C:\Perl\site\lib/CPAN/SQLite/DBI/Search.pm line 89
14:57 sri_kraih left
szabgab Cybera, are you using cygwin ? 14:58
Cybera no
szabgab you seem to report both about a unixish perl and a windows perl
The Can't locate Test/Harness.pm in @INC (@INC contains: lib config /usr/lib/perl5/5.8.8/m ... 14:59
Cybera i talked about the errors with jnthn , we also got confused
szabgab is from unx
unix 15:00
Schnueff hi, i guess the link "you will naturally want _documentation_" on rakudo.org should point to /documentation, rather than /how-to-get-rakudo, if sb wants to fix that 15:03
masak rakudo: regex Foo { \d }; 5 ~~ /<Foo>/; my Int $bar = $/ - 1 # am I having unreasonable expectations on type coercion? 15:04
p6eval rakudo 79bc4f: OUTPUTĀ«Type mismatch in assignment.ā¤current instr.: 'die' pc 15868 (src/builtins/control.pir:204)ā¤Ā»
masak perhaps more importantly, how do I work around that? :/ 15:07
ah, int(...) works.
mberends masak: what does int( Match ) mean? 15:11
masak mberends: well, I guess it'd numify first. 15:12
mberends: in my example, it already had.
(due to the minus op)
15:12 sri_kraih joined
mberends yes, but why not Boolify instead for example? 15:12
Cybera this time parrot downloaded without error , it passed to configure part but then inter::progs - Determine what C compiler and linker to use...Compilation 15:15
failed with 'gcc'
Use of uninitialized value $make in system at build/gen_parrot.pl line 68.
i already have gcc
pmichaud mberends: rakudo thinks that $/ - 1 is a Num 15:18
Cybera died at Configure.pl line 88
pmichaud er.... s/mberends/masak
it then complains about assigning a Num to an Int
masak pmichaud: I'm with you so far. 15:19
mberends masak: irclog.perlgeek.de/perl6/2009-01-07#i_812342
masak mberends: yeees? :)
15:19 sri_kraih_ left 15:20 kimtaro_ joined
pmichaud afk # meeting 15:20
masak mberends: I read but do not understand. ēœ‹äøč‘£ 15:21
mberends masak: sorry, I was asking first off in what scenario casting from $/ to an int would be used? 15:22
masak mberends: I don't know. 15:23
it's not what I want to do in my code right now.
mberends why did you write '$/ - 1' in the first place?
masak mberends: in the real code, I extract a column number out of a move syntax using a regex. 15:24
due to zero-based arrays, I subtract 1.
the result is a Num in Rakudo, but I want to store it in an Int variable. 15:25
mberends hmm, column number. I think it won't do what you want. Regex ! === Match.
masak mberends: it's been doing what I want for months.
only today when I introduced types does it fail.
mberends oh dear 15:26
masak ah, well the int(...) solution worked.
mberends ok then, back to the grindstone ;)
masak mberends: and I don't understand your 'Regex !=== Match' objection. it's perfectly reasonable to numify a Match if it's a string containing a number.
15:27 amoc left
TimToady clintongormley: you shouldn't ever have to write a function to "do autothreading" if it uses a correct multi dispatcher; the problem with substr is likely that it's using a parrot builtin directly 15:28
mberends masak: agreed
clintongormley hiya TimToady
15:29 amoc joined
clintongormley hmm ok - so implementing substr for Junctions, naively, would be to call substr on each of the elements in the junction 15:29
but that would be serial
i just can't imagine how one would write that to be in parallel 15:30
mberends clintongormley: do you expect the result to be a Junction of substrings?
clintongormley yes
much like incrementing a junction returns a junction with each element incremented 15:31
EP6NEWBIE
mberends clintongormley: I don't really know, but you seem to need: Junction -> array -> map substr -> new Junction 15:35
map should autothread
clintongormley ah right! that was the missing link 15:36
ok - so where would this junction aware substring go in the rakudo source?
would it be a method on class junction?
a builtin? setting?
mberends clintongormley: I don't really know. Really. 15:37
15:37 schmalbe left
clintongormley i'm assuming that substr($junction) is the same as $junction.substring() 15:37
15:37 |jedai| is now known as jedai
mberends yes, methinks so too 15:38
clintongormley which would make it a method in class Junction
15:38 kimtaro left
skids $i <== 1..$a # Is $a evaluated when the range is defined, or checked every iteration/slice? 15:39
clintongormley thanks mberends
mberends clintongormley: good luck in your quest! 15:40
clintongormley heh - it's a rare saturday that i have time to play :)
my quest to get at least a line of code in Rakudo 1.0 may be in vain :(
mberends there's plenty of time (and space) 15:41
15:42 sri_kraih_ joined 15:45 diakopter left 15:46 TimToady left 15:51 Tene joined 15:52 diakopter joined 15:54 TimToady joined
szabgab Cybera, so what is your setup? are you using Windows ? and strawberry perl ? 15:56
15:57 ChanServ sets mode: +o diakopter, diakopter sets mode: +o TimToady, diakopter sets mode: -o diakopter
Cybera windows , activestate 15:58
TimToady clintongormley: you should not have to worry about junctions in the implementation of substr *at all* 15:59
autothreading is a function of the dispatcher, not of the individual function
Cybera yesterday i also downloaded a zip called portable
TimToady all you have to do is declare a correct signature, and it happens automatically
clintongormley ok - i brought it up because of a blog by szabgab, where substr($junction,0,3) returns 'Jun' 16:00
TimToady if rakudo isn't autothreading, it's probably because substr is hardwired to a low-level parrot routine that bypasses the normal multi dispatch
rakudo: substr("foo"|"bar", 0,2) 16:01
clintongormley so i was thinking of adding a substr method in setting/Junction.pm
p6eval rakudo 79bc4f: RESULTĀ«"Ju"Ā»
clintongormley our Junction multi method substr ($junction: ) is export {
TimToady no, no, no, no
clintongormley and doing as mberend suggested : $junction->array->map->new junction 16:02
TimToady you never have to worry about Junctions, period
clintongormley ok
TimToady if the types are declared correctly
clintongormley damn - i thought this was something i could try adding :)
TimToady (and if it's not hardwired wrong)
16:03 sri_kraih left
TimToady but it sounds like substr is accepting an Object rather than an Any 16:03
(or it's hardwired)
rakudo: &substr.signature
p6eval rakudo 79bc4f: OUTPUTĀ«Null PMC access in find_method()ā¤current instr.: '!dispatch_method' pc 17101 (src/builtins/guts.pir:107)ā¤Ā» 16:04
skids thought someone (moritz?) was already working on moving substr to setting.
clintongormley anybody want to point me to something simple that needs to be implemented in setting so that i can give it a bash? 16:05
16:06 Tene_ left
skids Is it the intent that Set will also autothread, or does that behavior start at Junction? 16:06
TimToady anything under Any autothreads
or are you asking if Sets behave like juncitons? 16:07
frooh clintongormley: wiki.github.com/rakudo/rakudo/setting-candidates
clintongormley ah thanks
TimToady you have to say any(@$set) or some such
or maybe any(%set), if it's bound to a Hash interface
16:08 schmalbe joined, sri_kraih joined
TimToady well, $set.any probably works too 16:10
16:10 rindolf joined 16:22 disismt is now known as disismt|away
TimToady but the basic point is that you can turn any list into a junction using any(), all(), none(), or one() 16:25
junction is not a role that other types take on
skids Yeah, I was just wondering where the line was drawn in the sand. And I guess it's at Junction. Which makes sense because I understand that somehow the boolean reduce and the autothreading are related. 16:26
MMD-wise 16:27
mberends ok, so the fact substr("foo"|"bar", 0,2) incorrectly returned 'Ju' is due to implementation of substr()
16:27 sri_kraih_ left
skids Junctions beget junctions, IIRC. 16:27
Oh, I see, yes, something's up there :-) 16:28
rakudo: substr("foo"|"bar", 0,2) 16:29
p6eval rakudo 79bc4f: RESULTĀ«"Ju"Ā»
skids rakudo: $a = any("one"|"two"); substr($a, 0,2)
p6eval rakudo 79bc4f: OUTPUTĀ«Scope not found for PAST::Var '$a' in ā¤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)ā¤Ā»
skids rakudo: my $a = any("one"|"two"); substr($a, 0,2)
p6eval rakudo 79bc4f: RESULTĀ«"Ju"Ā» 16:30
mberends the first two characters of 'Junction'. we hope to see ("fo"|"ba")
diakopter someone on wikipedia might update the "license" for PGE appropriately on Comparison_of_parser_generators
16:30 rindolf is now known as CPAN, CPAN is now known as rindolf
mberends clintongormley: you do pick 'em ;) 16:32
clintongormley :) 16:33
yaknow, i thought i'd start with something simple
perhaps rewriting the garbage collector
in lisp
mberends lol!
skids I have that problem too. Always tend to bite the rotten apple in the bag. 16:34
clintongormley i don't know what that pmichaud bloke has been DOING all this time
honestly
mberends reading our drivel, unfortunately
clintongormley starts the p6-on-php project
szabgab Cybera, so on what os are you trying to install Rakudo ?
Cybera windows XP 16:35
szabgab and what perl have you installed ?
what perl 5 I mean, of course
Cybera activestate
szabgab Then maybe tray to switch to Strawberry
Cybera ok 16:36
16:36 S3v3N joined
skids Well, moving the PIR into setting and wrapping it should "fix" but then all the Parrot internals would be using a different proto, too. Betcha that breaks something. 16:36
szabgab remove the ActivePerl and install Strawberry Perl
16:36 S3v3N left
mberends remove the Windows XP and install Linux 16:36
skids rakudo: my $a = any(1|2); substr("foo", 0,$a) 16:37
szabgab you might need to use mingw32-make instead of dmake - I am not sure
p6eval rakudo 79bc4f: OUTPUTĀ«get_integer() not implemented in class 'Junction'ā¤current instr.: 'parrot;Any;substr' pc 12766 (src/builtins/any-str.pir:370)ā¤Ā»
clintongormley ok, i'm now looking at implementing capitalize()
Cybera for linux , i will try it later on open suse. 16:38
clintongormley which i'd think of doing by splitting a string on whitespace (which i capture), before uc'ing the first character of each non-whitespace string
so how do i write (p5) @strings = split($string,/(\s+)/,1) 16:39
s/1/-1/ 16:41
skids you mean @strings = split(/(\s+)/,$string,-1) of course 16:42
clintongormley sorry yes :) 16:43
ah - getting this
dalek kudo: de786f3 | pmichaud++ | docs/spectest-progress.csv:
spectest-progress.csv update: 325 files, 7280 passing, 0 failing
16:46
mberends Cybera: that was half joking. But if your hard drive has space, dual boot is useful. 16:49
TimToady don't use split, use comb 16:51
which even defaults to words
amoc sighs 16:52
Cybera btw , it is working now with strawberry i guess.
16:53 Psyche^ joined
mberends Cybera: nice 16:53
TimToady @strings = $string.comb 16:58
lambdabot Unknown command, try @list
Cybera if there are other people had this problem with activestate, I would be a good idea to note about using strawberry in the installing instructions. 16:59
TimToady rakudo: .say for "foo bar baz".comb 17:00
p6eval rakudo de786f: OUTPUTĀ«fooā¤barā¤bazā¤Ā»
TimToady oh, but capitalize wants to preserve whitespace, so nevermind
mberends Cybera: could you write up a mini-howto and mail it to [email@hidden.address] ? 17:01
TimToady really wants to be $string.subst(/(\S+)/, ucfirst($0), :g) or some such
Cybera ok . I also sent a bug about the case if git is installed in program files and raduko downloaded inside. not quoting Program makes configure.pl not interpreting the path correctly. 17:04
mberends Cybera: thanks!
masak TimToady: so .subst _does_ create an invisible closure around its second argument?
Cybera np
TimToady no, but it does modify its callers $/ to that $0 means the right thing 17:06
masak TimToady: but... isn't the second argument evaluated before the call?
TimToady ordinary comma args can never assume a closure unless you have a macro
masak I just don't see how this would work without it having a closure around it. 17:07
TimToady oh, yeah, you should always write an explicit closure there
my bad
masak np.
TimToady sorry, distracted...
masak just checking.
TimToady: pmichaud and I have been discussing whether .subst should special-case the second arg, that's why I was asking. 17:08
TimToady I don't think it should special case it 17:09
s/// is already the special case
masak right.
17:09 Patterner left, Psyche^ is now known as Patterner
TimToady and commas should generally mean normal arguments 17:10
masak aye.
17:12 NordQ joined 17:18 schmalbe left 17:20 frooh_ joined, frooh_ left 17:21 frue joined
mberends phrugh: hi 17:21
pugs_svn r25961 | masak++ | [u4x/P2T1A] switched to .subst as the example method 17:23
frue haha, hi 17:24
mberends likes that game 17:25
masak throoix: hello
frue wonders how that one works 17:26
masak frue: 'frue' means 'early' in Esperanto.
frue really? Did not know that. 17:27
baest and Mrs in Danish :)
frue hahahaha
mberends moritz_ would confirm it's also 'early' in German, with umlaut-u 17:28
Schnueff and an h 17:29
frueh
mberends ja
masak the German word is probably a loan from Esperanto. :P 17:30
skids Just when I had finally started to "always remember the ;" along comes PIR :-)
Cybera frōæ½xFCh
mberends bestimmt
masak skids: it might comfory you to know that you don't have to remember the ';' when a '}' ends a line. 17:31
s/fory/fort/
skids Yeah but I generally use them anyway where I might add lines.
frue svn.pugscode.org/pugs/t/spec/S32-str/samecase.t 17:32
see there for what frue mean's to me :-)
mberends self-referential tioux! 17:33
frue haha, indeed 17:34
clintongormley hmm, i've just found capitalize in src/builting/any-str.pir 17:39
and yet it's supposed to be a candidate for setting/Any-str.pm
frue clintongormley: the idea is to pit the PIR in the setting 17:40
clintongormley ahhh right, AS the PIR
frue clintongormley: let me find a link of an example of that for you
clintongormley not reimplemented in perl6
skids right, the old PIR implementations need to be replaced.
clintongormley replaced with p6? or moved?
frue clintongormley: more or less moved I think 17:41
skids If it can be replaced with pure p6, do so, or move them to inline PIR otherwise.
clintongormley ok - wouldn't the PIR be more efficient?
skids Oh, right yeah naturally it should end up in setting/Any-str.pm 17:42
frue no, pmichaud said we should use PIR
I made a bunch of stuff in pure perl6 and it got rejected for efficiency reasons
clintongormley ok
</sigh>
and i was so proud
frue yeah
me too :-)
rt.perl.org/rt3/Public/Bug/Display.html?id=64020 17:43
skids Hrm, well, he makes the calls.
clintongormley so a question - does split not return captures?
frue clintongormley: that patch does almost exactly what you want
except other functions of course
clintongormley eg split(/(\s+)/,$string) in p5 returns the whitespace as well 17:44
but doesn't in p6
frue rakudo: 'f r e w'.split(' ').join
p6eval rakudo de786f: RESULTĀ«"f r e w"Ā»
frue rakudo: 'f r e w'.split(' ')
p6eval rakudo de786f: RESULTĀ«["f", "r", "e", "w"]Ā»
frue indeed 17:45
clintongormley is that a bug? or by design?
frue probably by design, but I don't know
TimToady there's still a place for pure-Perl implementations, but probably in a generic setting with circularities that defines semantics 17:46
which implementations (like rakudo) are allowed to override for efficiency
frue yeah, but clintongormley still needs to know not to spend time on that if he wants to get stuff in rakudo at this time 17:47
TimToady if people want to write a generic CORE.stg in src/perl6 in the pugs repo. that'd be fine
clintongormley .stg?
TimToady setting?
clintongormley ah
TimToady whatever, just seemed like .set was wrongish
clintongormley so TimToady, should split return captures? or not? 17:48
TimToady anyway there's already a CORE.pad there that in the long run wants to derived from a CORE.setting
probably not 17:49
frue 'f r e w'.comb(/\w+\s+/) 17:50
rakudo: 'f r e w'.comb(/\w+\s+/)
p6eval rakudo de786f: RESULTĀ«["f ", "r ", "e "]Ā»
frue that might be what you want clintongormley
clintongormley i can't find any docs for .comb 17:51
frue svn.pugscode.org/pugs/docs/Perl6/Sp...ry/Str.pod
search for comb
masak buubot: spack comb 17:52
buubot masak: S02-bits.pod:2 S03-operators.pod:2 S04-control.pod:1 S05-regex.pod:9 S06-routines.pod:1 S09-data.pod:4 S11-modules.pod:1 S22-package-format.pod:2 S26-documentation.pod:1 S29-functions.pod:14
clintongormley ah tricks!
i used google :)
masak buu: buubot doesn't seem to reach into S32-setting-library.
clintongormley and what it returned wasn't any of those
ah i think buubot is finding "comb" as in "combined" 17:53
frue hair tools instead?
masak buubot: spack \bcomb\b
buubot masak: S29-functions.pod:8
17:53 kcwu_ is now known as kcwu
skids Anyway it's in svn.pugscode.org/pugs/docs/Perl6/Sp...ry/Str.pod 17:54
jnthn is back from his walk
masak jnthn: how was Austria?
clintongormley thanks skids
hmm, according to that doc: As with Perl 5's C<split>, if there is a capture in the pattern it is returned in alternation with the split values. 17:56
so it looks like that's a bug
17:56 ejs joined
jnthn masak: Not so much different from Slovakia, apart from I understood even less of the words. ;-) 17:56
masak clintongormley: I haven't followed 100% what it is you're doing, but if you suspect a bug, please submit a rakudobug.
17:56 szabgab left
masak jnthn: :) 17:56
masak is heading home for the evening 17:57
17:57 szabgab joined
masak see you folks around! 17:57
17:57 masak left
clintongormley rakudo: 'a b c'.split(/(\s+)/) 17:57
p6eval rakudo de786f: RESULTĀ«["a", "b", "c"]Ā»
mberends rakudo: ' a b c '.split(/(\s+)/) 17:58
p6eval rakudo de786f: RESULTĀ«["", "a", "b", "c", ""]Ā»
mberends clintongormley: that's why TimToady warns against (mis)using split
TimToady oh, you mean that kind of capture :)
yes, it should return those in alternation
clintongormley ok, so it is a bug 17:59
frue rakudo: ' a b c '.comb(/\w+/)
p6eval rakudo de786f: RESULTĀ«["a", "b", "c"]Ā»
TimToady but comb doesn't return the whitespace at all, so it's no good for capitalize
jnthn (note on substr handling junctions) in case it wasn't clear, substr will not explicitly handle a junction, the answer will just fall out of auto-threading.
TimToady that's why I switch to a .subst
*switched
frue loves girl scout cookes....Somoas! 18:01
18:01 nacho joined
TimToady "Are those cookies made out of real girl scouts?" --Wednesday 18:02
frue hahaha
that is disgusting, but these cookies are delicious, so I will overlook it
;-)
clintongormley ok - well, that's the end of my playing time for the next 3 months
thanks for the input all 18:03
TimToady you need more playing time :)
frue hope you had fun :-)
clintongormley i SO do!
damn work
mberends clintongormley: come back soon
clintongormley mberends i hope to
but rakudo needs a good few weeks of concentrated reading and digging to figure out where everything is
:( 18:04
ah well
dukeleto how do I call a method in the root namespace from within another namespace that defines a function with the same name? I am trying :multi but failing 18:08
frue ::method
dukeleto frue: yes, I have that. But inside my function that is a :method I am trying to call the non :method version in another package and I can't seem to get it to work 18:09
frue what do you mean by non :method version? 18:10
you have something like package Bar { sub foo { ::bar }; sub bar { } } ?
skids golfing challenge: 18:13
<== gather while 1 { take shift(@a) };
gather { take shift(@a) } x Inf # I guess 18:14
frue why do you want to do that? 18:15
skids Well, to put some context on it:
frue couldn't you just do <== @a?
skids $it <== my_coro() <== gather while 1 { take shift(@a) };
say "First result: " ~ =$it; 18:16
@a.push("Hello World");
say "Second result: " ~ =$it;
frue ooh
very cool
skids ruoso helped me.
frue does it work in rakudo right now? 18:17
skids Feeds/iterators no. Maybe pugs.
frue ah, k 18:18
skids pugs: $it <== (1,2,3); =$it;
p6eval pugs: OUTPUTĀ«*** ā¤ Unexpected " <=="ā¤ expecting "::"ā¤ Variable "$it" requires predeclaration or explicit package nameā¤ at /tmp/ZIMBMbTVrC line 1, column 4ā¤Ā»
skids pugs: my $it <== (1,2,3); =$it;
p6eval pugs: OUTPUTĀ«*** Unsafe function '=' called under safe modeā¤ at /tmp/AxmMlcddch line 1, column 1-19ā¤Ā»
clintongormley is still beating his head over capitalize
frue - looked at your patch for (eg) lc
frue yeah 18:19
clintongormley and you changed things like .local string tmps etc to $S01 = self
frue no, that wasn'tmine
I didn't write it
so I can't explain it :-)
clintongormley damn :)
frue I don't know PIR at all
clintongormley <bash> <bash> <bash>
frue sorry :-)
clintongormley hmm, it's in the patch you linked to earlier 18:20
did i misunderstand?
or was that just an example
skids When inlining PIR you have to clip off the parts of the PIR that make it a PIR sub.
clintongormley which is just .sub and .end?
or more than that
skids .params I think
clintongormley i took off those two lines, recompiled, and it worked
skids I dunno I've just been poking it with a stick and seeing when it twitches in a convenient direction. 18:21
clintongormley but there must have been a reason that they changed the other stuff to eg $S01 = self
great confidence you inspire :)
skids What was self before, a Str, or an Any?
S registers are strings, assigning to them coerces. 18:22
clintongormley well, it's in class Any and returns a Str
ok
maybe that's the reason for the change
thanks
dukeleto frue: roots() is defined in the root namespace, but is also defined on Numbers
clintongormley and the '%r = box $S0' ? 18:23
skids It's why you'll see stuff like $I0 = $P0 and then never use $P0 again, or $P0 = box $S0
frue k, so to call the root one you should be able to do ::roots, and for the numbers one, 5.roots
skids The result has to be a perl6 variable.
clintongormley which is what box does?
skids S registers are not up to snuff for that -- so they wrap it in a PMC.
clintongormley sorry for all the basic questions 18:24
skids I'm not clear on EXACTLY what box does, but I bet it's in the docs somewhere. It's something along those lines.
clintongormley it reminds me of (Carl Sagan?) saying "to make an apple pie from scratch, first: create the universe"
yep: box(out PMC, in STR) : Create a HLL-mapped PMC containing the provided primitive. 18:25
skids Hey, at least you got here AFTER us PIR-disabled people found "find_lex".
clintongormley can only wonder 18:26
skids Nobody could figure out how to do anything that didn't use just self :-)
clintongormley heh ok
dukeleto frue: thanks, will try 18:28
18:28 ejs1 joined
jnthn Note that if you're curious what PIR a bit of Perl 6 compiles down to, perl6 --target=pir can be useful. 18:28
dukeleto frue: the :function syntax is valid PIR or only Rakudo?
clintongormley thanks jnthn 18:29
frue dukeleto: I have no idea about PIR
dukeleto frue: :( 18:30
frue haha, sorry
jnthn might know though :-)
jnthn dukeleto: Can you give me an example of what you are referring to?
frue or maybe as in #parrot
jnthn The idea of Q:PIR so far as I understand it is that it sticks the PIR you write in there straight into the compiled output 18:31
Though it recognizes %r as the thing to hold the result.
clintongormley well, curiously, making no change except for removing the sub/end just worked 18:32
but there must be a reason they're changing the other bit
so i will follow blindly
AND IT WORKS!
jnthn Probably _the_ most useful things to know are to use the find_lex op to get at lexicals, to call 'infix:='(target, source) to do assignments to stuff you find_lex'd.
clintongormley w00t
dukeleto jnthn: yep, I will get you a github link in one sec 18:33
jnthn Yes, .sub ... .end you don't want to be using insie Q:PIR
Since the code gets stuck straignt into the output which is already contained in one of those.
skids jnthn: how do we handle the exception cases/tail calls on some of those?
pop_eh and all.
clintongormley oh damn - i wasn't testing this correctly 18:34
after making a change, i just need to 'make' again, no?
jnthn make should do it.
dukeleto jnthn: github.com/leto/rakudo/commit/e5ae0...4ca3e7165f
frue yeah, and you should probably run the actual test for that function too 18:35
jnthn skids: You can use push_eh LABEL if you wish.
You can call 'return'(...) and 'fail'(...)
clintongormley hmm, cos i tried swapping it so capitalize would dO tHE rEVERSE
and it didn't make any difference
jnthn As well as 'die'
skids I find it easier to develop under a different sub name in a separate file till it works.
clintongormley oops
dukeleto jnthn: i have defined a roots() function on Numbers, but I can't seem to call the roots() in the root namespace from within the roots() method of Numbers
clintongormley need to Configure.pl again? 18:36
skids That being a perl label?
jnthn skids: No, it's a PIR label...we didn't do Perl 6-level labels yet. 18:37
skids thanks.
jnthn dukeleto: Aha.
dukeleto: Yes, it'd need to be exported.
dukeleto jnthn: ok, I think I know how to do that
jnthn We don't have anything in Num for exporting functions on Num yet though. Hmm. 18:38
Are you sure it's meant to be exported, per the spec?
dukeleto jnthn: $P0 = get_hll_namespace [ '' ] then '!EXPORT'('roots', from => $P0) ?? 18:39
clintongormley notes that he had been carefully editing lcfirst instead of capitalize, and whistles. a little less nonchalantly
dukeleto jnthn: roots() in Numbers shouldn't be exported, but I need to be able to call the roots() defined in math.pir from any-num.pir, that is all
18:40 rindolf is now known as CPAN
dukeleto jnthn: i have lots of passing tests and mostly it is just the glue between roots(x,n) <=> x.roots(n) that I have to solve 18:40
jnthn Oh, you want to call the one in the root namespace?
$P0 = get_hll_global 'roots'
$P0(x, n) 18:41
No, exporting would put your multi in the root namespace, which is I suspect not what you're wanting here.
But the above should do it (looks up the roots in the namespace and stores it in register $P0, and the we call it.)
Note that in Parrot callable things are just PMCs. You can look them up, pass them around etc just like anything else. :-) 18:42
18:42 CPAN is now known as rindolf
dukeleto jnthn: sweet 18:43
18:43 ejs1 left
dukeleto jnthn: gonna try that 18:45
jnthn Thing is if you just write 'roots' it calls the one in the current namespace...which is the one you're currently in...so I fear what you already had may recurse infinitely. 18:47
dukeleto jnthn: I didn't know that I could call registers with function arguments, nice!
jnthn You can also wirte
.local pmc foo
And use foo like you'd use $P0
It really depends on usage.
dukeleto jnthn: yeah, I was going into deep recursion or just not finding it
jnthn If I'm going to refer to it in any more than a couple of places I prefer to introduce a meaningful name. 18:48
dukeleto jnthn: another thing I noticed is that the spec does not say anything about 1i.roots(2), but my code can find the root of any number, real or complex
jnthn: but 1i.roots(2) blows up hard in the parser, which is way beyond my current knowledge
jnthn rakudo: 1i.roots(2) 18:49
dukeleto rakudo: say 1i.roots(2)
p6eval rakudo de786f: OUTPUTĀ«Statement not terminated properly at line 1, near ".roots(2)"ā¤ā¤current instr.: 'parrot;PGE;Util;die' pc 129 (runtime/parrot/library/PGE/Util.pir:83)ā¤Ā»
jnthn rakudo: 1i
p6eval rakudo de786f: RESULTĀ«0+1iĀ»
jnthn rakudo: (1i).roots(2)
p6eval rakudo de786f: OUTPUTĀ«Method 'roots' not found for invocant of class 'Complex'ā¤current instr.: 'parrot;P6metaclass;dispatch' pc 637 (src/classes/ClassHOW.pir:161)ā¤Ā»
jnthn std: 1i.roots(2)
dukeleto jnthn: ooh, that seems to work
p6eval std 25961: OUTPUTĀ«ok 00:02 34mā¤Ā»
jnthn Hmm. STD seems to allow it.
dukeleto jnthn: i guess I can write my tests with (1i).roots(n) now and worry about parsing 1i.roots(n) later 18:50
clintongormley jnthn are $S0 and .local string tmps equivalent?
jnthn clintongormley: well, after the second then you may use tmps like you would use $S0 yes 18:55
clintongormley so $S0 is just a bit shorter to write?
jnthn Yeah
clintongormley ta
ok, i've completed my first contribution to P6! 18:56
jnthn But it's also less obvious if you are using it in a lot of places. So .local lets you write easier to follow code.
clintongormley ok
pasteling Someone at 89.131.29.12 pasted "Moved capitalize to setting/Any-str.pm" (105 lines, 2.8K) at sial.org/pbot/35637 18:57
clintongormley would somebody mind looking at that diff to see if it all looks ok? 18:58
i've moved the capitalize PIR to Any-str.pm
dukeleto clintongormley: I find that registers are useful for intermediate values, but .locals are good for longer-term variables 18:59
clintongormley ok
dukeleto i was just following the example changes of eg lcfirst
i just moved the PIR, changed tmps to $S0
and deleted one line which was redundant : it was rechecking the string length all the time 19:00
rather than just using the stored value
dukeleto clintongormley: cool, I was just throwing my 0.02 in
is there a way to get better info other than "No applicable methods." ? 19:01
clintongormley hmm, how do i run just one file from the test suite?
frue make t/spec/...filename.t 19:02
clintongormley ta
frue maybe do make spectest first, just so that it downloads the spec
clintongormley yeah - done that
frue and then kill it before it takes forever
k
clintongormley :=
jnthn clintongormley: Looks sane. :-)
clintongormley thanks 19:03
if i want to add a test for something, where do i do it: in t/ or in t/spec/ ?
frue to add spec tests you need to do that in the pugs repository
clintongormley ok 19:04
how on earth do i get git to NOT use the pager? 19:06
Tene jnthn: foo(|@args) works, but foo(|%named-args) doesn't, right? 19:09
jnthn Tene: 'fraid so.
Tene aw. :(
Want a weird bug?
jnthn I came up with a way to solve it on a minibus once. But then forgot it later on.
:|
How weird?
;-)
Tene a for loop in a module {} doesn't compile 19:10
pasted in #parrot
jnthn rakudo: module Foo { for @a { } } 19:12
p6eval rakudo de786f: OUTPUTĀ«Scope not found for PAST::Var '@a' in ā¤current instr.: 'parrot;PCT;HLLCompiler;panic' pc 146 (src/PCT/HLLCompiler.pir:102)ā¤Ā»
jnthn rakudo: module Foo { for <foo bar baz> { } }
p6eval rakudo de786f: OUTPUTĀ«Null PMC access in get_pmc_keyed()ā¤current instr.: 'parrot;Foo;_block31' pc 220 (EVAL_19:100)ā¤Ā»
jnthn rakudo: module Foo { for <foo bar baz> { .say } } 19:13
p6eval rakudo de786f: OUTPUTĀ«Null PMC access in get_pmc_keyed()ā¤current instr.: 'parrot;Foo;_block31' pc 220 (EVAL_19:100)ā¤Ā»
jnthn Tene: It fails like this?
Tene Yes.
jnthn I think that's runtime rather than parse time...but yes, still, odd
rakudo: module Foo { say 42 }
p6eval rakudo de786f: OUTPUTĀ«42ā¤Ā»
Tene The other less weird bug I got was that I need to explicitly define a module Foo::EXPORT::DEFAULT {} before I can put anything in that namespace. 19:14
if i try, it crashes with null pmc access.
jnthn auto-viv fail, perhaps
Tene Something like that
Possibly use make_namespace method of hll root namespace or something. 19:15
Schnueff clintongormley: "To disable pagination for all commands, set `core.pager` or `GIT_PAGER` to `cat`."
Tene I have a workaround, so not a big deal for me.
clintongormley Schnueff thanks
jnthn Tene: OK. That is a weird bug though (other one). 19:16
Tene nodnod
jnthn rakudo: module Foo { if 1 { say 42 } }
Tene I didn't look into it at all.
p6eval rakudo de786f: OUTPUTĀ«Null PMC access in get_pmc_keyed()ā¤current instr.: 'parrot;Foo;_block26' pc 129 (EVAL_20:71)ā¤Ā»
jnthn rakudo: module Foo { { say 42 } }
p6eval rakudo de786f: OUTPUTĀ«Null PMC access in get_pmc_keyed()ā¤current instr.: 'parrot;Foo;_block23' pc 119 (EVAL_19:66)ā¤Ā»
jnthn rakudo: module Foo { { say 42 }; 1 }
p6eval rakudo de786f: OUTPUTĀ«Null PMC access in get_pmc_keyed()ā¤current instr.: 'parrot;Foo;_block23' pc 124 (EVAL_19:68)ā¤Ā»
Tene oh, hey, I know how to cheat with wanting |%n-a 19:17
:)
jnthn afk for a little - dinner 19:28
19:35 NordQ left 19:43 justatheory joined 19:45 PacoLinux left
clintongormley if i want to add tests which currently fail, do i add them as normal tests? or do i skip them? 19:45
frue if they should pass but fail because of bugs, add them and put a #?rakudo skip line before them 19:46
there are examples of that all over the palce
clintongormley ok thanks 19:47
frue np
19:47 PacoLinux joined
clintongormley ho hum - any ideas how to reset my pugs commit bit password? 19:56
frue uh, the web thing...
commitbit.pugscode.org:6666/ 19:57
clintongormley it doesn't have an I've forgotten my password link
frue indeed
sorry
20:01 pmurias_ joined, justatheory left
clintongormley ok all - it's been a pleasure - many thanks for the patience 20:02
i'll see you around
frue see ya 20:03
20:06 clintongormley left, pmurias__ joined
mberends all: is .sort able to ignore case? how? 20:12
20:18 pmurias left 20:19 pmurias_ left
bacek good morning 20:21
mberends bacek: HAI 20:22
bacek rakudo: my @a=<foo FOO bar>; say @a.sort; say @a.sort: { ls $^a cmp lc $^b }
p6eval rakudo de786f: OUTPUTĀ«FOObarfooā¤Could not find non-existent sub lsā¤current instr.: '_block28' pc 225 (EVAL_18:82)ā¤Ā»
bacek rakudo: my @a=<foo FOO bar>; say @a.sort; say @a.sort: { lc $^a cmp lc $^b }
p6eval rakudo de786f: OUTPUTĀ«FOObarfooā¤barfooFOOā¤Ā»
mberends cool, just what I need! 20:23
bacek mberends: indeed :)
20:28 Cybera left, Cybera joined
mberends bacek: the sort does not always work, cannot understand why. Are you able to try out this code? github.com/eric256/perl6-examples/b.../Server.pm 20:45
bacek mberends: lines 122-123? 20:49
mberends exactly
bacek mberends: and how it sorts? 20:50
rakudo: my @a=<foo FOO bar>; say @a.sort; say @a.sort: { lc $^a leg lc $^b }
p6eval rakudo de786f: OUTPUTĀ«FOObarfooā¤barfooFOOā¤Ā»
bacek mberends: can you try "leg" instead of "cmp"? 20:51
mberends ok, will try now... 20:52
bacek: same strange order. for example, the pugs/docs/ directory comes out as Perl6/ AES/ articles/ blog/ 20:57
actually, the lowercase names are all in order
bacek rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort 20:58
p6eval rakudo de786f: OUTPUTĀ«AES/Perl6/articles/blog/ā¤Ā»
bacek rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort: { $^a leg $^b }
p6eval rakudo de786f: OUTPUTĀ«AES/Perl6/articles/blog/ā¤Ā»
bacek rakudo: say 'articles' leg 'AES' 20:59
p6eval rakudo de786f: OUTPUTĀ«1ā¤Ā»
bacek rakudo: say 'articles' leg 'aes'
mberends so case sensitive works. the lc may be the hitch.
p6eval rakudo de786f: OUTPUTĀ«1ā¤Ā»
bacek heh. No it doesn't.
rakudo: say 'articles' cmp 'AES'
p6eval rakudo de786f: OUTPUTĀ«1ā¤Ā»
bacek rakudo: say 'articles' cmp 'aes'
p6eval rakudo de786f: OUTPUTĀ«1ā¤Ā»
mberends oh NOES
Schnueff heh
rakudo: say 'art' cmp 'aes' 21:00
p6eval rakudo de786f: OUTPUTĀ«1ā¤Ā»
Schnueff rakudo: say 'art' cmp 'ass'
p6eval rakudo de786f: OUTPUTĀ«-1ā¤Ā»
Schnueff aeh sorry, unintended language
mberends nm
rakudo: say 'aes' cmp 'art' 21:01
bacek rakudo: say 'a' cmp 'A'
p6eval rakudo de786f: OUTPUTĀ«-1ā¤Ā»
rakudo de786f: OUTPUTĀ«1ā¤Ā»
bacek rakudo: say 'my ', 'a' cmp 'b'
p6eval rakudo de786f: OUTPUTĀ«my -1ā¤Ā»
bacek rakudo: say 'my ', 'a' cmp 'A' 21:02
p6eval rakudo de786f: OUTPUTĀ«my 1ā¤Ā»
bacek rakudo: say 'my ', 'a' cmp 'a'
p6eval rakudo de786f: OUTPUTĀ«my 0ā¤Ā»
bacek rakudo: say 'my ', 'e' cmp 'r'
p6eval rakudo de786f: OUTPUTĀ«my -1ā¤Ā»
bacek rakudo: say 'my ', 'ae' cmp 'ar'
p6eval rakudo de786f: OUTPUTĀ«my -1ā¤Ā»
mberends rakudo: 'A'.lc
p6eval rakudo de786f: RESULTĀ«"a"Ā»
bacek rakudo: say 'my ', 'aec' cmp 'ara' 21:03
p6eval rakudo de786f: OUTPUTĀ«my -1ā¤Ā»
21:03 Whiteknight left
bacek rakudo: say 'my ', 'perl6' leg 'articles' 21:04
p6eval rakudo de786f: OUTPUTĀ«my 1ā¤Ā»
bacek rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort: { lc $^a leg lc $^b }
p6eval rakudo de786f: OUTPUTĀ«AES/articles/blog/Perl6/ā¤Ā» 21:05
bacek mberends: it works...
mberends bacek++: that looks good. will try here soon...
bacek rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort: { lc $^a cmp lc $^b } 21:06
p6eval rakudo de786f: OUTPUTĀ«AES/articles/blog/Perl6/ā¤Ā»
bacek even with cmp
mberends yes , just doing cmp here and it works.
jnthn rakudo: my @a=< articles/ blog/ Perl6/ AES/ >; say @a.sort: { .lc }
p6eval rakudo de786f: OUTPUTĀ«AES/articles/blog/Perl6/ā¤Ā» 21:07
jnthn golf win
;-)
bacek jnthn: :)
mberends oooh! jnthn++ 21:08
jnthn pmichaud++ for implementing it ;-) 21:09
mberends git pushed, thanks! 21:11
forgot to remove BUG comment :( 21:13
21:15 hudnix joined
bacek jnthn: hey! I implemented first version of "List.sort"! :) 21:29
jnthn bacek: Aye, but I think pmichaud added the version taking a closure of arity 1, no? :-) 21:30
I may remember wrong.
bacek jnthn: I can't remember either... 21:31
jnthn Well, it works, whoever wrote it. :-) 21:32
bacek jnthn: do you have any ideas why socket API is dead in Parrot? 21:36
jnthn bacek: Yes.
IIRC, because allison ripped it out while refactoring IO...and then didn't put it back. :-|
I tried to talk at least one person into working on it already. 21:37
frooh that's one way to refactor.
bacek jnthn: ah. So it worth trying to resurrect it!
jnthn frooh: The IO that survived the refactor is in much better shape. ;-)
But yes, it kinda sucked to lose it.
frooh I am sure it is
jnthn Especially as it would be relatively trivial to give Rakudo the socket I/O many people now want if Parrot provided it. 21:38
frooh how can they claim 1.0 without socket io?
jnthn I'm not really the best person to stick it back into Parrot, though. I've got little experience of that level of network programming. 21:39
frooh just curious
jnthn Well, 1.0 was defined as the "come and write your Parrot-targetting compilers" release more than the "we have everything 100% sorted out" release.
bacek can reimplement unix-part of scokets
jnthn But yes, I found it a curious ommision.
frooh ah, got it
bacek sockets
jnthn bacek: Patches welcome! ;-) 21:40
bacek jnthn: of cause :)
jnthn bacek: Actually you may find that the various platform specific bits still exist.
And it's just the PMCs are missing...
I don't know. 21:41
bacek jnthn: no actually... But I can fix it :)
jnthn You'd make plenty of people happy by doing so.
mberends most platforms link the same BSD library in similar ways, afaik. 21:42
jnthn I did already make a start on refactoring Rakudo's IO to meet the spec more.
mberends yes, that must help bring the goal closer.
jnthn A while into it, I realized import needed somewhat sorting out. 21:43
21:50 hudnix left 21:51 rindolf left
mberends nods off. good night! 21:54
21:55 mberends left
dukeleto if I want to get a function in the root level namespace of Rakudo, I do $P0 = get_hll_global [''], "function_name" , correct ? 21:55
or perhaps it is get_hll_global ['rakudo'], "function_name" 21:56
jnthn $P0 = get_hll_global "function_name" should do it 21:57
iirc
dukeleto ooh, I just found get_root_global
jnthn yeah
that will not do what you want
dukeleto jnthn: I am trying that but it doesn't seem to work
jnthn oh, hmm 21:58
$P0 = new 'ResizablePMCArray'
$P0 = get_hll_global $P0, "function_name"
Try that, just out of curiosity.
(I think you can't write an empty key...) 21:59
But I thought get_hll_global "foo" looked in hll namepsace which should get it. :-|
22:00 frooh left
dukeleto jnthn: trying that now 22:00
22:07 nacho left 22:10 hudnix joined 22:12 justatheory joined 22:14 frooh joined 22:21 ejs left
dukeleto jnthn: $P0 = new 'ResizablePMCArray'; $P0 = get_hll_global $P0, 'roots'; $P1 = $P0[0] and then calling $P1(x,n) did the trick, thanks! 22:31
jnthn Erm. :-S 22:32
$P1 = $P0[0] ?
That looks like you're grabbing one candidate from a multi.
22:32 DemoFreak left
jnthn Does $P0(x,n) not do it? 22:32
22:33 DemoFreak joined
dukeleto jnthn: $P0(x,n) was not working, say $P0 printed 2, which was confusing me. It *is* a multi and I was getting "no applicable methods found" before, and now I am not 22:34
22:34 justatheory left
dukeleto jnthn: I have 10 passing tests for roots(), but I still need to correct my algorithm for negative numbers and write another 20/30 tests to be confident about it. But it is getting really close 22:36
jnthn The 2 is telling you it has 2 candidates. 22:40
No applicable methods? Hmm.
Check the signatures (what's in the :multi(...)) are sane.
But really even better is to move them into a file in setting so they get Perl 6 signatures and are subject to Perl 6 multi-dispatch semantics. But anyway, feel free to focus on the algorithm and tests first, I cna help with those other bits. :-) 22:41
22:52 SamB left 22:53 SamB joined 23:21 Schnueff left 23:27 kate21de left 23:28 kate21de joined 23:39 eternaleye left 23:47 ewilhelm_ is now known as ewilhelm
dukeleto jnthn: that sounds great, I need to learn a bit more about Setting 23:50