»ö« | perl6.org/ | nopaste: paste.lisp.org/new/perl6 | evalbot usage: 'perl6: say 3;' or rakudo: / pugs: / std: , or /msg p6eval perl6: ... | irclog: irc.pugscode.org/ | UTF-8 is our friend!
Set by wolfe.freenode.net on 30 October 2009.
diakopter phenny: tell mberends after looking more into CCI (I tried the demo hello world compiler), I decided it was much too slow... so I'm sticking with runsharp 00:55
phenny diakopter: I'll pass that on when mberends is around.
carlin Ohh, I didn't know about the slurp builtin, I thought you could only do it from a file-handle 02:31
I've made that mistake heaps
masak: thanks
rakudo: say slurp('/home/p6eval/rakudo-ng/README')
p6eval rakudo 8dc189: =head1 Rakudo Perl 6␤␤This is Rakudo Perl, a Perl 6 compiler for the Parrot virtual machine.␤␤Rakudo Perl is Copyright (C) 2008-2009, The Perl Foundation.␤Rakudo Perl is distributed under the terms of the Artistic License 2.0.␤For more details, see the full text of the license in the
..file…
diakopter carlin: nice :) 02:50
rakudo: say slurp('/etc/debian-release') 02:53
p6eval rakudo 8dc189: Unable to open filehandle from path '/etc/debian-release'␤in Main (file <unknown>, line <unknown>)␤
diakopter rakudo: say slurp('/etc/debian_version')
p6eval rakudo 8dc189: 5.0.3␤␤
diakopter rakudo: say slurp('/proc/uptime')
p6eval rakudo 8dc189: 6265140.80 4354955.06␤␤
diakopter rakudo: say slurp('/proc/version') 02:54
p6eval rakudo 8dc189: Linux version 2.6.16-xen (root@ppk.vpsfarm.com) (gcc version 3.4.6 20060404 (Red Hat 3.4.6-9)) #1 SMP Sun Feb 24 18:08:45 EST 2008␤␤
diakopter o_O
rakudo: say slurp('/proc/kallsyms')
p6eval rakudo 8dc189: ffffffff80100014 T stext␤ffffffff80100014 T _stext␤ffffffff80101000 T init_level4_pgt␤ffffffff80102000 T init_level4_user_pgt␤ffffffff80103000 T level3_kernel_pgt␤ffffffff80104000 T level3_user_pgt␤ffffffff80105000 T level2_kernel_pgt␤ffffffff80106000 T
..empty_zero_page␤ffffffff80107000 T …
diakopter rakudo: say slurp('/proc/stat') 02:55
p6eval rakudo 8dc189: cpu 212113455 19850 7576190 2209984369 38851441 67404 43852 37431679␤cpu0 149918745 6063 3562594 401186433 34313356 67404 35833 37431679␤cpu1 21868164 3952 1426912 601331011 1886121 0 5864 0␤cpu2 18650239 5403 1250817 605301259 1313266 0 1065 0␤cpu3 21676307 4432 1335867 602165666
..133869…
diakopter rakudo: say slurp('/proc/cpuinfo') 02:56
p6eval rakudo 8dc189: processor : 0␤vendor_id : AuthenticAMD␤cpu family : 15␤model : 65␤model name : Dual-Core AMD Opteron(tm) Processor 2212 HE␤stepping : 2␤cpu MHz : 1994.997␤cache size : 1024 KB␤physical id : 1␤siblings : 1␤core id :
..1␤cpu cores : 0␤fpu : yes␤fpu_exception : yes␤cpuid level : 1␤wp : ye…
diakopter rakudo: say slurp('/proc/cpuinfo').split(/\s/).join(' ') 02:57
p6eval rakudo 8dc189: processor : 0 vendor_id : AuthenticAMD cpu family : 15 model : 65 model name : Dual-Core AMD Opteron(tm) Processor 2212 HE stepping : 2 cpu MHz : 1994.997 cache size : 1024 KB physical id : 1 siblings : 1 core id : 1 cpu cores : 0 fpu : yes fpu_exception : yes cpuid level : 1 wp
..: ye…
colomon ng: say (1, 2, [3, 4]).perl 02:59
p6eval ng 2cab48: (1, 2, [3, 4])␤
nsh hrmm 03:00
rakudo: say slurp('/etc/passwd').split(/\s/)[0] 03:01
p6eval rakudo 8dc189: root:x:0:0:root:/root:/bin/bash␤
nsh heh :-P
nsh goes back to waiting for things to compile 03:02
diakopter phenny: tell mberends yay; turns out I can emit an OpCodes.Switch(Label[]) *after* all of the labels are already emitted. 03:39
phenny diakopter: I'll pass that on when mberends is around.
diakopter non-computed goto; whee 03:40
interesting; I can emit the same jumptable multiple times 03:52
.. or subsets of it
wayland76 Oh noes! The root password is X! 04:45
diakopter :) 04:47
unobe rakudo: \1.perl 06:54
p6eval rakudo 8dc189: ( no output ) 06:55
unobe rakudo: \(1,2).perl
p6eval rakudo 8dc189: ( no output )
unobe rakudo: \(1,2).perl.say
p6eval rakudo 8dc189: [1, 2]␤
unobe rakudo: \1.perl.say
p6eval rakudo 8dc189: 1␤
unobe rakudo: \1.WHAT.perl.say
p6eval rakudo 8dc189: Int␤
unobe rakudo: \(1,2).WHAT.perl.say
p6eval rakudo 8dc189: List␤
unobe rakudo: Parcel.WHAT.say 06:56
p6eval rakudo 8dc189: Could not find non-existent sub Parcel␤in Main (file src/gen_setting.pm, line 324)␤
unobe rakudo: Capture.WHAT.say
p6eval rakudo 8dc189: Capture()␤
diakopter ng: Parcel.say 07:16
p6eval ng 2cab48: sh: ./perl6: No such file or directory␤
unobe rakudo: Parcel.new(1).say 07:32
p6eval rakudo 8dc189: Could not find non-existent sub Parcel␤in Main (file src/gen_setting.pm, line 324)␤
unobe rakudo: Capture.new(1).say
p6eval rakudo 8dc189: 1␤
unobe rakudo: Capture.new(1).WHAT.say
p6eval rakudo 8dc189: Capture()␤
unobe ng: say 1 07:32
p6eval ng 2cab48: 1␤ 07:33
unobe ng: Parcel.say
p6eval ng 2cab48: Parcel()␤
diakopter rakudo: say Parcel.new() 08:11
p6eval rakudo 8dc189: Could not find non-existent sub Parcel␤in Main (file src/gen_setting.pm, line 324)␤
diakopter ng: say Parcel.new()
p6eval ng 2cab48: ␤
diakopter ng: say Parcel.new(Parcel)
p6eval ng 2cab48: ␤
diakopter ng: say Parcel.new().WHAT
p6eval ng 2cab48: List()␤
diakopter ng: say Parcel().WHAT 08:12
p6eval ng 2cab48: Could not find non-existent sub &Parcel␤current instr.: '_block14' pc 29 (EVAL_1:0)␤
diakopter ng: say Parcel.WHAT
p6eval ng 2cab48: Parcel()␤
Su-Shee good morning 09:13
moritz_ good morning 09:15
soupdragon hi all 09:16
Su-Shee moritz_: the advent calendar was a success because it's explanatory and directed to the reader with a specific and rather every day subject. 09:38
moritz_ Su-Shee: that's from the reader's perspective, yes 09:53
Su-Shee well that's what makes the hits, doesn't it? :) 09:55
moritz_ only if there's something that can be hit :-) 09:56
Su-Shee web servers can :)
moritz_ :-)
colomon rakudo: say (1, 2, [3, 4]).perl 11:08
p6eval rakudo 8dc189: [1, 2, [3, 4]]␤
hejki hmm.. if i have class Foo { ... }; class Bar is Foo { ... }; class Baz is Foo { ... }; can i somehow say inside Foo.new that if something is set, it's Bar.new and if something else, then Baz.new? 11:41
(or should this be done in the calling code instead?)
mberends ahem 11:44
phenny mberends: 00:55Z <diakopter> tell mberends after looking more into CCI (I tried the demo hello world compiler), I decided it was much too slow... so I'm sticking with runsharp
mberends: 03:39Z <diakopter> tell mberends yay; turns out I can emit an OpCodes.Switch(Label[]) *after* all of the labels are already emitted.
masak oh hai 11:45
hejki ohai
i'm certain masak knows some nice IO-tut?
mberends hejki: Foo knows nothing about Bar or Baz, so it's definitely up to your calling code
hejki or someone else if that matters
mberends: ye so i thought :|
masak hejki: what kind of IO-tut? 11:46
hejki opening, reading and writing files 11:47
masak hejki: you could perhaps define Bar and Baz, and then re-open Foo to add a new method. but I think the need for that indicates that you're Doing Something Wrong. :)
hejki: reading files: my $content = slurp('filename') 11:48
hejki: writing files: my $fh = open('filename'); $fh.say for @lines-of-content; $fh.close
hejki nice
masak++
masak hejki: you asked about CGI the other day. 11:49
hejki btw.. is there something similar to -f, -d, -l and -s ?
yup
i had some holiday stuff so i haven't been able to check it out yet
masak hejki: I tremble with fear every time someone contemplates usign the CGI.pm of November.
hejki i have the tab open in vimperator so i remember it tho ;> 11:50
masak so please don't do that. :)
mberends tutorial-masak-bot++
hejki heh :P
masak s/usign/using/
.oO( I'm on a bus, writin ur tutorialz )
hejki class masak { has $.question is rw; method ask { answer $.question } } 11:52
masak japhb: yes, I'm doing a big Temporal refactor. I got more than half-way during the November blogging spree. haven't looked at it much since then. would be nice to have it merged by early January. 11:53
japhb: github.com/masak/temporal-flux-perl...mporal.pod github.com/masak/rakudo/blob/master/temporal.t 11:55
masak mberends: this is the most ambitious commit comment I've ever written: github.com/masak/gge/commit/d71f92d...3f499a8326 11:55
it's for the tree spider refactor. it explains why I chose to do it, and how it works. 11:56
diakopter: ^^ might interest you as well. 11:59
moritz_: I have now corrected the infix:<&> semantics. it's a blast to see it backtrack two quantifiers at once, arriving at the correct consensus. 12:00
moritz_: the cool thing is, infix:<&> as such still doesn't do any backtracking whatsoever.
mberends reading 12:01
reading 12:02
hejki how to test if something is a link (in filesystem)? ~~ :l doesn't seem to work - or am i missing something :)
mberends hejki: it doesn't work yet - not even specced fully. Work around it by parsing ls -l output 12:03
hejki hmm.. is there anything that does stat()? i could use that too
mberends Parrot does stat(), but returns only one field per call :( 12:04
reading
hejki :| 12:06
mberends reading 12:07
phew, that will need several re-reads! it all makes sense, and gives some ideas for spidey, whose legs have not all been written yet. masak++ 12:08
hejki if qqx{ls -l $filename}.comb(/^^l/).elems { ... } \o/ 12:09
mberends nice one hejki
masak mberends: glad you like it. :) 12:37
for a good time, I recommend downloading GGE and doing `./test-regex '^ [.* & a*]' aab` 12:40
arnsholt Welcome to backtracking-land? =) 12:42
masak arnsholt: yes, something like that. 13:03
arnsholt: it first backtracks the a* until it hits the bottom. then it fails on that and starts backtracking .* 13:04
it's a bit like nested for loops. 13:05
I just implemented two minor features in GGE that are TODO in PGE :) 13:06
mberends rm -rf go # as it's the concensus here that go doesn't matter 13:40
mberends phenny, tell masak the GGE commit message does evoke several analogies between regex match trees and viv AST, implying there could be overlap in the algorithms we are each writing. 14:03
phenny mberends: I'll pass that on when masak is around.
colomon phenny: tell jnthn Blocks with $_ or implied $_ don't get the correct arity at the moment in ng. It's costing us a good number of tests... 15:10
phenny colomon: I'll pass that on when jnthn is around.
masak rakudo: sub f(@a, $i=0) { $i ~ "[{map { f($_, $i + 1) }, @a}]" }; say f([[], [[]], []]) 15:27
phenny masak: 14:03Z <mberends> tell masak the GGE commit message does evoke several analogies between regex match trees and viv AST, implying there could be overlap in the algorithms we are each writing.
p6eval rakudo 8dc189: 0[1[] 2[3[]] 4[]]␤
masak mberends: cool. 15:28
ng: sub f(@a, $i=0) { $i ~ "[{map { f($_, $i + 1) }, @a}]" }; say f([[], [[]], []])
p6eval ng 43dc5a: Could not find non-existent sub &map␤current instr.: '_block44' pc 410 (EVAL_1:139)␤
japhb mberends, the stat method on parrot's OS object will return the full stat() array 15:45
nqp: my $OS := pir::root_new__PP(<parrot OS>); my @s := $OS.stat("."); for @s { say($_) }
p6eval nqp: 2049␤688372␤16877␤9␤1000␤1000␤0␤4096␤1261837802␤1261837891␤1261837891␤4096␤8␤
japhb masak: thank you for the Temporal links 15:47
masak np.
japhb masak, mberends: what's the state of proto's installed-modules branch these days?
mberends japhb: thanks, /me sits corrected
masak japhb: last I heard, it was fairly complete. 15:48
there's one ecosystem conflict left to handle, IIRC.
japhb What's the merge plan / time frame?
mberends masak: shall be have a status meeting about installed-modules soon?
*we 15:49
masak mberends: gladly.
mberends afk now, food. back in >120 mins 15:50
diakopter diakopter: wb 16:30
colomon ng: say Int ~~ Num 17:05
p6eval ng 43dc5a: 1␤
pugs_svn r29397 | colomon++ | [t/spec] Cheat slightly by switching $_ to $^a throughout, to make ng happy. Add tests for passing types, regexes, and ranges to first. 17:18
dalek kudo/ng: 06c9474 | (Solomon Foster)++ | t/spectest.data:
Turn first.t test on.
17:25
Achilles14 hi, I want to help perl6 development. can somebody get me started? 17:50
diakopter oops, missed Achilles14 17:54
mathw Well, it is Boxing Day 18:00
mberends kangaroo fillets make a nice Boxing Day dinner ;) 18:20
mathw ooh 18:22
we had cold turkey, ham, sausages wrapped in bacon, with chipped potatoes, salad etc.
which made a nice change from the giant roast turkey dinner we had yesterday! 18:23
mberends was yesterday with ham, sausages wrapped in bacon, etc perhaps? 18:24
colomon We've just had leftover turkey so far. 18:29
but dinner is supposed to be more leftover turkey and stew. :)
Su-Shee luckily, our lefts are over ;)
colomon I think my wife convinced my mom to give us the turkey bones so we can make stock when we get home tomorrow. :) 18:30
Su-Shee they'll make nice soup ;) 18:31
colomon I notice that Rakudo master's pick implementation doesn't have a type for the $num parameter, and takes floor on it to get an integer.
The spec calls for an Int. 18:32
Seems to me the spec is right in this case?
diakopter colomon: seems right to me, but it also seems like someone chose coerce-to-Num for a reason...? 18:34
dunno
colomon According to blame, we need to ask masak. 18:35
It's only listed as one month ago?!
11/20 18:36
colomon phenny: tell masak Why did you take the Int constraint off of .pick? 18:37
phenny colomon: I'll pass that on when masak is around.
pmurias ruoso: hi 23:00
ruoso hi pmurias 23:06
pmurias ruoso: i ported mildew over to the current version of STD 23:08
pmurias but STD behaves slightly differently on by system 23:08
ruoso pmurias, porting++ 23:09
pmurias, I wish I could get back to work with smop in the same pace 23:10
pmurias ruoso: what direction do you think i should pursue with mildew/smop? 23:16
ruoso I still believe that smop's place is in the p5 integration 23:26
youwin I cant see why the dot operator cant work with space between its arguments 23:28
youwin is it intended to work that way, just not yet implemented by rakudo? 23:30
pmurias perl6: 1 . say; 23:31
p6eval rakudo 8dc189: Confused at line 2, near ". say;"␤in Main (file <unknown>, line <unknown>)␤
..pugs: *** ␤ Unexpected "."␤ expecting operator␤ at /tmp/WGEug0z27T line 1, column 3␤
..elf 29397: Parse error in: /tmp/rawd1YkVlL␤panic at line 1 column 0 (pos 0): Can't understand next input--giving up␤WHERE: 1 . say;␤WHERE:/\<-- HERE␤ STD_red/prelude.rb:99:in `panic'␤ STD_red/std.rb:76:in `scan_unitstopper'␤ STD_red/std.rb:224:in `comp_unit'␤ STD_red/std.rb:210:in `_UNIT'␤
.../..…
ruoso youwin, dot is not infix 23:32
std: 1 . say 23:33
p6eval std 29397: ===SORRY!===␤Unsupported use of . to concatenate strings; in Perl 6 please use ~ at /tmp/0XwetABKCz line 1:␤------> 1 . ⏏say␤FAILED 00:01 106m␤
pmurias ruoso: dealing with memory leaks is the thing that mostly keeps me from working on smop
ruoso pmurias, so maybe you should simply move on with the leaks anyway
youwin the whole thing .meth acts like a postfix operator
ruoso youwin, the dotty is a special thing 23:34
pmurias, I mean, someone will fix the leaks eventually ;)
it doesn't need to be you
youwin i just dont see why it had to be implemented that way 23:36
but im still in the middle of learning what this language is all about 23:38
takadonet hey everyone 23:43
pmurias ruoso: what i think would make sense would be to work on improving the p5 interop and basic mildew features, and when it's possible to build cool things using p5 modules work on integration for performance 23:46
ruoso pmurias, I think that's a good plan already 23:52