Pugs t-shirts www.cafepress.com/pugscode | Pugs 6.2.9 released | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | www.geeksunite.net
Set by stevan on 15 August 2005.
luqui ?eval 41+1 00:33
evalbot_6496 42
geoffb luqui, will evalbot rename itself continually to the current rev? 00:36
luqui well, no 00:37
because I'm manually starting him
I don't have the constant recompilation hooks that whoever ran evalbot before did 00:38
geoffb too bad, that
luqui but the number will always reflect the revision that he's running 00:39
that's why I did that
because that revision may be 200 revs behind, which would indicate that he needs to be restarted
(after a recompile by me)
geoffb it's a good idea anyway, even if you do get the recompile hooks running
OK, let's see if I can build current pugs with optimization off, and precompile off. If I suddenly fall off the channel, it's because I ran out of mem. sigh. 00:43
luqui geoffb, how much mem do you have?
geoffb Sadly, this box only has 192 MB real plus 400 MB swap.
luqui too bad ghc guzzles memory so badly 00:44
geoffb It's on my list to buy a new box, but that hasn't happened yet, sigh.
svnbot6 r6497 | luqui++ | r359@feather: fibonaci | 2005-08-26 02:41:32 +0200
r6497 | luqui++ | Take off the private message restriction from evalbot. See why in
r6497 | luqui++ | a comment in the file.
geoffb OK, was able to compile with opt off, precompile off, parrot embed off, and perl5 embed off. 01:06
Now to try with settings 0 0 0 1
luqui geoffb, good 01:11
I compile with 0101 ususally
geoffb My last 0101 OOMed, sigh 01:12
justatheory seen autrijus
jabbot justatheory: autrijus was seen 3 days 21 hours 38 minutes 13 seconds ago
justatheory pity
geoffb Though I think it actually might have succeeded had I ever gotten around to fixing the make targets to run ghc link as a separate pass from ghc compiles 01:13
justatheory the svnbot doesn't seem to be on #jsan anymore. Anyone got any control over that?
luqui justatheory, have you tried inviting it? 01:27
what was its name?
justatheory no idea. 01:28
luqui ?eval sub flatten(&code, *@args) { if &code.arity == 0 { &code() } else { flatten(&code.assuming(@args[0]), @args[1...]) } } sub foo($x, $y) = { $x * $y } my @a = (3,4); flatten(&foo, @a) 01:32
evalbot_6497 Error: unexpected "=" expecting bare trait, trait or block
luqui ?eval sub flatten(&code, *@args) { if &code.arity == 0 { &code() } else { flatten(&code.assuming(@args[0]), @args[1...]) } } sub foo($x, $y) { $x * $y } my @a = (3,4); flatten(&foo, @a)
evalbot_6497 0
luqui ?eval sub flatten(&code, @args) { if &code.arity == 0 { &code() } else { flatten(&code.assuming(@args[0]), @args[1...]) } } sub foo($x, $y) { $x * $y } my @a = (3,4); flatten(&foo, @a)
evalbot_6497 0
luqui hmm
?eval sub flatten(&code, @args) { if &code.arity == 0 { &code() } else { flatten(&code.assuming(@args[0]), @args[1...]) } } sub foo($x, $y) { "$x,$y" } my @a = (3,4); flatten(&foo, @a)
evalbot_6497 ','
nothingmuch www.steelskies.com/coverflow/HomePage.html 01:56
02:48 autark is now known as jp-autark
landover interesting 02:56
www.cnn.com/2005/TECH/internet/08/2...index.html
wow seems to me the us f guys have some issues............. 02:57
ah i say we just open source all govs..... 02:59
luqui ?eval 7*2**2 08:47
evalbot_6497 28
luqui 7*3*2 08:48
?eval 7*3*2
evalbot_6497 42
ods15 42!
luqui you're almost faster than evalbot
?eval 1^3^5 < 2 08:49
evalbot_6497 bool::false
luqui uhmmmmm
?eval 1^3^5 < 4
evalbot_6497 bool::true
luqui yikes, that's wrong
ods15 ?eval 1^3^5 08:50
evalbot_6497 1
ods15 this is binary xor or something?
luqui evalbot cannot print junctions correctly
it is a one() junction
ods15 ?
?eval 3^5
evalbot_6497 3
ods15 ?eval a^2
evalbot_6497 Error: No compatible subroutine found: "&a"
ods15 ?eval 1^2
luqui but evalbot cannot print junctions correctly
evalbot_6497 1
ods15 ?eval 2^2
evalbot_6497 2
luqui eval (2|3).perl 08:51
ods15 i don't understand
luqui ?eval (2|3).perl
evalbot_6497 '(2 | 3)'
luqui there we go
?eval (1^3^5).perl
evalbot_6497 '(1 ^ 3 ^ 5)'
ods15 ?eval (2^2)
evalbot_6497 2
luqui :-)
you know what a junction is?
ods15 no
luqui have you seen Quantum::Superpositions? 08:52
ods15 no
luqui oh good, then you're in for a treat
ods15 no
bleh, hungy
hungry
ods15 checks if kitchen is open yet.. should be...
bbl
grr, no :( 08:54
luqui ?eval 3 > 2 | 4 # equiv. to 3 > 2 || 3 > 4 08:55
evalbot_6497 bool::false
luqui too bad they seem to be broken
ahh, they're not broken 08:59
?eval ?(3 > 2 | 4) # equiv. to 3 > 2 || 3 > 4
evalbot_6497 bool::true
luqui it's just that goddamn parsing issue again
ods15 what would be the most "elegant" way to take a field out of a "table" outputted by a program 09:04
best i can think of is |perl -pe '$_ = split(/\s+/)[4];' 09:05
luqui perl -ale 'print $F[4]'
oh, for every line 09:06
perl -nale 'print $F[4]'
ods15 no not for every line
and, heh, wow, neat
luqui just for the first line? 09:07
ods15 yes
there's only one line anyway
luqui oh, then the latter of those two should work
(the former doesn't, I think)
if you want to be sure, you could put a ;exit on the end of it
ods15 yes, '-nae' is enough
and, heh, good idea, it'll save me the '|head' 09:08
heh i can actually even save myself the greps!
last -i G still G ods15 H -1 |perl -nae 'print $F[2]'
i'll turn that into
luqui (you have G aliased to "|grep"?)
ods15 |perl -nae '/still/ && /ods15/ && exit print $F[2]'
:D 09:09
luqui: and H into |head, and L into |less ....
luqui that's a good idea
I type |grep -i enough
ods15 ya
yey
`last -i |perl -nae '/still/ && /ods15/ && exit print $F[2]'`
much more sanitized than the klunky mess i had before 09:10
luqui as far as your "exit print $F[2]"
you are an evil bastard
if you don't want an erroneous exit status
you could be less evil by saying perl -nae '/still/ && /ods15/ && print $F[2] && exit'
hmm, that last && might need to be "and"
ods15 i like being evil
i don't care about the return code...
i only care about the output 09:11
luqui okay, be evil
I guess for perl that is quite mild
ods15 whats evil about it?
luqui well, you're passing something as an argument to a function for the sole purpose of getting the side effect of evaluating the argument
but... well... again, it's quite mild
it just threw me off a little 09:12
ods15 i'm used it. i tried out for the ioccc :D
luqui ods15, what was your submission?
ods15 see my work... hold on
rafb.net/paste/results/tVyBWk41.html 09:13
i haven't sent it yet, gonna send it next year
luqui yummy
ods15 i'll probably not win, but it was fun making it
just like you said, i did a lot of "work" in return codes 09:14
luqui err, how do I use it
ods15 functions which are nothing but 'return ...;' where all the work is there...
well, compile it, run it, and feed it 81 numbers to stdin
luqui oh cool! it does a bus error! 09:15
(I'm on amd64 if you do anything on that level)
seq 1 81 | ./a.out
ods15 oh, yes, its a known bug, due to int to pointer cast amd64 wont work :( 09:16
rafb.net/paste/results/Ii1Vju65.html
those are nicely meaningful numbers...
nice thing 'seq', never knew about it
and you can't give it numbers bigger than 9
luqui what do the numbers mean? 09:17
ods15 well, run it and you'll understand, to fix your casting bug, change this line...
line 13 09:18
9 +j% 3*3 +a/3*9 +a% 3 ; } T o( m,n ) { u(
into
9 +j% 3*3 +a/3*9 +a% 3 ; } T o( const void*m,const void*n ) { u(
luqui that line starts with a *
ods15 ah, yes, i missed it in the copy/paste 09:19
tell me if there are any bugs in it except that... (not including input tolerance - 81 numbers, all between 0 to 9)
luqui it looks like it worked 09:20
you are insane
ods15 yeah, exit code should be zero unless it failed
nah, other ioccc entries are way more insane
luqui wait... what does it do
ods15 look at the output
luqui I thought it generated magic squares, but these are not magic at all
ods15 it's pretty easy to understand/guess
no, but that's pretty close 09:21
luqui ahh it's those thingies
every row and every column and every box have all nine numbers
unless you don't give it an equal number... then what?
it must be sums 09:22
no, it's not sums 09:23
wtf is it?
the only time I understood it is when I gave it "yes 0"
ods15 ? 09:24
lol
no, you were right the first time
12:21:43 <luqui> every row and every column and every box have all nine numbers
luqui but that's not true
ods15 what do you mean an equal number?
if the exit code is zero, it should be true
if it's not, it means the board is basically unsolvable
luqui ahhhhh exit code
ods15 well it obviously can't solve an unsolveable board, what did you expect? 09:25
luqui shouldn't it be able to solve perl -le 'print for (1..9)x9' 09:26
ods15 no, that's not a valid board 09:27
look at it
all the rows are all 1's, all 2's, all 3's, etc.
luqui so, um, how does it "solve" it?
it has to rearrange things somehow?
right?
ods15 it fills in the missing 0's
no
luqui ohkay
it fills in missing 0s 09:28
ods15 the 0's are blanks
luqui gotcha
ods15 the rest are "consts"
it's called sudoku, some silly game recently very popular where i live
yey, i think i've finished adding caching when streaming mp3's from home to army... 09:29
there's one big problem left though, if i stop the song in the middle...
ssh -o StrictHostKeyChecking=no -T $IP " cd /home/ods15/mdf/temp; ( if [ -e '$MD5' ]; then exec cat '$MD5'; else exec tee '$MD5'; fi ) | mplayer -cache 1000 -cache-min 0 -quiet - 09:30
"
luqui geez, it's hard to get solvable boards
ods15 seems to work
luqui: yes, quite
which is why you can use my program to make solvable boards
luqui perl -le 'print int(rand 2)*int(rand 2)*int(rand 10) for 1..81'
ods15 i made a randomizer.c, which uses the solver as a "library" 09:31
luqui tried it quite a few times with no success
ods15 try 10,000
using that method you'll get a solveable board about 1 every 10,000
probably less, since you used quite a silly method :)
luqui if I cut it by another factor of 2?
well yeah
ods15 my randomizer outputs a max (actually, EXACTLY) 24 numbers 09:32
luqui just random numbers with a nice high likelihood for 0
ods15 throws it at random places, and gives it to my program
that gave me a working board 1 every 10,000 or so
so i made it "smarter", making it not throw the random number if it doesn't meet the contraints 09:33
luqui anyway, cool program. I ought to get to bed
ods15 cya
luqui &
Oh, I'm getting quite a few solvable boards with three int(rand 2)s in there 09:34
admittedly, there are an awful lot of zeroes in the output
luqui & # really
scook0 ods15: nice program 09:40
ods15 thanks 09:52
ok, i got a problem
i got a controlling program (frontend), and a personalized backend i wrote
when the frontend (which i didnt write) wants to kill the backend, it sends SIGINT to the etnire process group 09:53
the backend, written in bash, has some 'cleanup' to do, so i did 'trap '...' 2' to do the cleanup
the problem is, when the frontend kills the entire process group, even though it's trapped by bash, the programs IN the 'trap' are ALSO signalled to death 09:54
thus killing my cleanup
what should i do...
scook0: it has some nice algos too.. try to figure them out, they are mostly the defines 09:59
kvakke seen masak 11:21
seen jabbot 11:22
;(
smith100 hi im trying kml, with 2.6.12.5, whenever i run something in /trusted i get the following error, Unable to handle kernel NULL pointer dereference at virtual address 0000001c, tried google 11:32
ajs
pjcj smith100: I'm not sure this is the best channel fro your question. You might get an answer, but I wouldn't count on it. 11:50
or does "ajs" mean you knew that?
ods15 someone reminds me how i 'dup' in perl? 12:34
oh, 'open stdin <&somefilehandle' ? 12:35
ah, good, this works as expected... 12:48
/still/ && /ods15/ && ($ip = (split ' ')[2]) && last for (`last -i`);
13:09 yinjieh_ is now known as yinjieh
ods15 someone remind me how the hell do i use cpan 14:05
like, i type 'perl -MCPAN -e 'install something'' ?
hmm
fglock just type 'cpan'
QtPlatypus perl -MCPAN -e 'shell' 14:06
broquaint perl -MCPAN -e 'install q[Module::Name]' # Should work, ods15. 14:11
ods15 yeah just typing 'cpan' did the trick
broquaint Even better. 14:16
ods15 wow i hate cpan... 14:18
how is it possible to get a zombie child if you're not completely stuck or ignoring sigchld?
fglock it is possible if you have a zombie wife 14:22
ods15 har har
interestingly, unix is unisex :) 14:23
14:47 _SamB_ is now known as SamB
SamB any idea why I would have gotten an email entitled å°ˆę”ˆé–‹ē™¼ē¶²ē«™ę–°ęœå‹™åŠŸčƒ½ļ¼ć€Œäŗŗę‰č³‡ę–™åŗ«ć€ from OSSF [email@hidden.address] 14:52
elmex whoa, utf8 :)
äŗŗ!
SamB elmex: of course! you think I'm gonna use SHIFT_JIS? 14:54
elmex ;) 14:55
hcchien SamB: I guess it might be some kind of reminder of ossf's new service. 14:57
SamB why japanese?
hcchien it's chinese 14:59
SamB oh, sorry, my bad
elmex 功
SamB I can't tell the difference, nevermind read either
elmex i thought that that was hiragana
ods15 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
15515 root 25 0 7364 4120 4376 R 98.8 0.8 11:27.64 perl
that sounds bad 15:00
trying to install this cpan module, it's been stuck on make test for 11 minutes already
hcchien The Japanese uses some Han words. :)
ods15 have i mentioned how much i hate cpan
broquaint Which CPAN module, ods15? 15:01
ods15 Net::SSH::Perl
i'm not even done with the dependencies yet
broquaint Just skip it.
ods15 the make test that got stuck is... Math::Pari
broquaint Or force install it.
Ah, it's probably because it's doing some bastard hard math(tm).
ods15 looks like its ok now.. i think...
broquaint Or it's stuck in an infinite loop of doom. 15:02
ods15 no, still seems stuck.. i think...
broquaint Just kill it, force install and move on.
ods15 the number in the make test is advancing, so i guess thats good
t/01-dh.........ok 12/18
it was stuck on 4 before
SamB why does Net::SSH::Perl require PARI/GP? 15:03
ods15 yey 13...
broquaint Just kill it. Tests are just there for politeness.
ods15 SamB: its probably for one of the crypt modules
Crypt::DH
broquaint It does bastard hard math(tm), SamB.
ods15 i think
SamB what in the world would anyone want with crypto so intensive that it requires a CAS to do? that has got to be slow... 15:04
ods15 now it's stuck on 15 for quite a while... sigh 15:06
whats CAS?
SamB a Computer Algebra System
ods15 heh 15:07
well i did force install, looks like it works now 15:09
have i mentioned how much i hate cpan
broquaint Do you hate CPAN or do you hate the CPAN interface, ods15? Because hating CPAN is like a crime against humanity. 15:10
ods15 i dunno
broquaint The answer is you don't hate CPAN because that's wrong and we won't be having it in these parts. 15:11
ods15 bleh
great, the module doesn't work, looks like it didn't install math::pari after all 15:12
ods15 sighs
have i mentioned how much i hate cpan
broquaint Ad nauseum, ods15.
ods15 ?
broquaint ! 15:13
ods15 good thing the friggin thing didn't just dl me all of glibc and compile it from scratch
tbh even that would still be faster than this hell
oh yey 15:15
now it works, but when actually using the module, perl hangs 15:16
NOW i remember why when i first tried out this module i decided to just use the ssh client instead.. that was quiet a while ago
wow, it actually works 15:22
it's not "stuck", it's just REALLLLLLLLLLLLY slow
that's insane... it took it about 30 seconds to log in 15:23
masak wonders why autrijus' journal hasn't been updated in a week 15:38
is he ill? or just very busy with $WORK?
anyway, I miss the journals a bit. they are my window into the pugs world... 15:39
hcchien masak: I guess it is the senond one. :)
PerlJam masak: I'd guess work
masak yes, hopefully, if those are the options :)
autrijus $work is it. 16:08
autrijus mumbles something about quicksand-shaped specs. 16:09
I used to think that perl6 always > $work at quicksandness
but perl6's is stabilizing and $work is not ;)
kolibrie welcome back, autrijus
autrijus greetings. 16:10
I'm seeing lots of progress on pilrun... need a whole day tomorrow to catchup
autrijus praises weekends
kolibrie how do I associate .p6 with filetype perl6 in my .vimrc? 16:13
autrijus autocmd BufNewFile,BufRead *.p6 setf perl6
kolibrie autrijus: thanks 16:14
autrijus np :) 16:15
autrijus waves and crashes to sleep... & 16:18
Supaplex decorates autrijus's face with copious amounts of shaving cream 16:26
masak Supaplex: careful, he's asleep :) 16:43
Supaplex that's the idea :) 16:44
rindolf autrijus: here? 17:22
Hi all!
geoffb rindolf, I think autrijus is sound asleep right now -- he popped in for about 10 minutes, and that was it 17:39
rindolf geoffb: OK. Thanks. 17:40
iblech luqui: WRT automagic recompilation of evalbot -- evalbot spawns a new instance of evalhelper.p5 upon each ?eval, and evalhelper starts a new pugs, so you don't have to restart evalbot if you upgrade pugs 17:42
fglock putter: ping 17:55
svnbot6 r6502 | fglock++ | * perl5/ Value - Ref - implemented .str() 18:15
r6503 | fglock++ | * PIL-Run - postfix ++/-- partially fixed
r6504 | fglock++ | * PIL-Run - rand($x)
geoffb welcom back, svnbot6
fglock svnbot missed some commits 18:16
perl5/Array now supports rw slices
bbiab & 18:17
geoffb go fglock
fglock hi geoffb 18:21
geoffb hey there
geoffb decides to see if cygwin's experimental glx actually works . . . 18:25
autrijus tries again to irc in sleep 19:01
that seems to work
geoffb yes, but do you see surreal images floating past your monitor? 19:02
autrijus right, like the mind game thing in ender's game 19:03
geoffb did they make a movie out of that? I've only ever read the book (and it's been awhile) 19:04
autrijus Ender's Game, 2007
Directed: Wolfgang Petersen
geoffb whee
autrijus whee indeed
good, give me something to look forward after Serenity 19:05
geoffb But first: Serenity. Can't wait.
heh
autrijus jinx
rehi sri_ :) 19:09
obra hey autrijus 19:10
where are you moving to?
autrijus tamsui 19:11
the place you stayed
the same room, actually
I got iChat and SEE flawlessly on my asus laptop. thus endeth the PearPC nightmares 19:12
s/(?=flawlessly)/working / 19:13
obra wow. 19:15
what did it take?
SEE on my Toshiba is sllllow
autrijus it took two hours
and wiki.osx86project.org/ 19:16
but it's all working natively now :)
obra not using pear?
autrijus osx86.
XCode works and Rosetta works on SSE2 with mobile pentium. 19:17
dudley ooh, cool. Maybe I can convince my wife to let me install it on her Gateway... 19:20
leo_ autrijus: hi - and wow - now the apple logo on the laptop isn't in vain 19:22
autrijus leo_: right, although with my win32+flyakite and osx-metacity theme I often can't tell which of the 3 OSs I'm in 19:23
the controls are all mapped identical ;)
and the boot screen too -- although OSX has that rotating clock thing
leo_ *g*
maybe uname -a helps ;-) 19:24
autrijus lol
svnbot6 r6505 | iblech++ | PIL2JS: sleep! 19:33
r6505 | iblech++ | * PIL::Subs: Make subs defined by the "sub" keyword ordinary rw containers,
r6505 | iblech++ | same for &exit in PIL2JS.js.
r6505 | iblech++ | * PIL::PPad: Not only restore the value, but the container as well of a
r6505 | iblech++ | variable backuped by temp or let.
r6505 | iblech++ | * Prelude::JS::Continuations: Implemented &sleep using continuations and
r6505 | iblech++ | window.setTimeout -- Algorithm::TokenBucket runs under PIL2JS!
autrijus iblech++ # sleep! 19:34
next we'll be running svnbot6 in Javascript.
xinming will be to beijing for staying with a friend of mine for a month, xinming will miss all people here. 19:56
autrijus xinming: ooh. have fun!
xinming will try to come here as soon as possible.
autrijus no net in friend's place?
xinming autrijus: Didn't you finish the 6.2.8.0 version of pugs? :-) 19:57
autrijus: lol, well, Don't know when you come, :-)
autrijus xinming: no, I'm earning my plane ticket money :)
meaning: working a lot.
xinming autrijus: hmm, I will try to come. My friend's house get Windows installed. 19:58
autrijus: well, No hurry on Pugs. :-)
autrijus :) 19:59
svnbot6 r6506 | iblech++ | * New test: t/unspecced/connect.t -- but skip_rest unless 20:19
r6506 | iblech++ | %*ENVV<PUGS_TESTS_ALLOW_NETWORK>.
r6506 | iblech++ | * util/perl6.vim: "autocmd BufNewFile,BufRead *.p6 setf perl6", autrijus++
putter iblech: ping 20:24
svnbot6 r6507 | putter++ | PIL-Run - assorted tweaks.
r6507 | putter++ | PrimP5.pm: MACRO renamed MACROP5. require() now pretends not-yet-existant @INC is (".",$FindBin::Bin).
r6507 | putter++ | EvalX.pm: Added hack to avoid Deep recursion in expand(). Improved warnings, and appearance of generated code.
putter fglock: ping
err, fglock: pong 20:26
fglock putter: ping pong 20:28
putter :)
fglock you wrote you were storing a Ref to Array into Scalar? 20:30
putter yes. p6_set checks for 1st arg ref() Scalar and 2nd arg ref() Array. if so, $1st->store(p6_new(Ref => $2nd)) 20:32
dduncan seen mugwump 20:33
fglock this should be done automatically by Scalar->store - you might be doing extra work
putter ah, ok. will yank. 20:34
done. 6508. 20:37
fglock there is something strange - @a[1]=2 works, but @a=(1,2,3) doesn't 20:39
putter nor (the last time I checked) @a = @b. note that $array_a now has a real Array, rather than a Scalar. so Array::store, $array_a->store($array_b), is now being called when before it wasnt. 20:40
hi stevan 20:41
stevan hey putter
kolibrie greetings stevan
svnbot6 r6508 | putter++ | ApiX.pm: p6_set no longer worries about Ref()ing Arrays assigned to Scalars. Thats the metamodels job.
stevan hola kolibrie
fglock stevan: how about integrating Value/Code with MM methods? I've added basic parameter binding and multi subs 20:42
maybe move Code.pm into the MM 20:43
stevan fglock: sure, we can do that
the Perl6::Method module is basically just a closure factory
I think it should be pretty simple 20:44
kolibrie any way to do 'temp' in p5?
putter In lue of the metamodel having a Macro, could I package Macro;@ISA=(Sub); and not break things? 20:45
kolibrie: do you mean 'local' (the p5 equivalent of p6's temp)? or does the PIL-Run p5 backend support temp()? (not yet) 20:46
stevan fglock: my tuits are in very short supply untill this $work project is over which should be in about a week
kolibrie putter: well, I mean I have a lexical variable, and I want to temp it for the block, rather than turn it into a global and 'local' it 20:47
fglock stevan: how about circular dependencies between modules? Type checking needs Value, Method needs Code, which needs MM ...
stevan hmm
fglock: that could be an issue
however, I think it is easily overcome 20:48
if we insist that all the lower level MM modules have a sig of *@_
then we can just use regular perl 5 subs
and those dont need to use Code
then once the model is bootstrapped
all classes built can use Code
stevan is not 100% sure that is sane 20:49
fglock putter: I'll check what Array->fetch/store is doing 20:51
if you have time, take a look at Container/t/array-boxed.t - 'slicing' 20:53
putter: Array-to-Array copy was not implemented - I'll work on it 20:57
putter ok. will do. currently trying to figure out why in builtins/arrays/push.t , its trying to call a postcircumfix:[] p5 method on Array... 21:01
xinming bed& 21:11
buu ?eval $x=@y; 21:12
evalbot_6497 Error: Undeclared variable: "$x"
buu =[
?eval my $x= my @y;
evalbot_6497 Error: Undeclared variable: "@y"
buu Why does that happen?
xinming buu: I think that's because pugs can't handle multi declaration in one "statement" 21:14
buu =[
?eval my @x; my $x; $x = @x; 21:15
evalbot_6497 []
xinming ?eval my $a = my $b;
evalbot_6497 Error: Undeclared variable: "$b"
xinming buu: I mean "statement" not closure. hmm,
?eval my $a = { my $b };
evalbot_6497 \sub {...}
xinming maybe term, Sorry for my poor English.
Just wish you to understand what I mean. :-) 21:16
my $a; my $a;
?eval my $a; my $a;
evalbot_6497 undef
xinming hmm, this shouldn't be allowed. a "bug" need to be fixed.
really sleepy now, bye. 21:17
fglock @b=@a works now 21:18
putter !:) 21:19
fglock however, I think the copy must be a bit deeper - testing ... 21:20
svnbot6 r6509 | fglock++ | * perl5/ Array - whole array fetch/store
fglock if a cell in @a is bound, the bind must be broken, I think 21:21
ods15 ?eval my $a; $a = my $b;
evalbot_6497 Error: Undeclared variable: "$b"
ods15 ?eval my $a; $a = (my($b));
evalbot_6497 Error: Undeclared variable: "$b"
ods15 ?eval chomp(my $b = "hello");
evalbot_6497 Error: No compatible subroutine found: "&my"
ods15 ? 21:22
?eval my $b = "hello\n"; chomp $b;
evalbot_6497 'hello'
putter fglock: what am I looking for in array-boxed.t? all oks. and an Inf redefinition warning.
ods15 ?eval my $b = "hello\n";
evalbot_6497 \'hello '
ods15 ?eval my $b = "hello\n"; $b
evalbot_6497 \'hello '
ods15 ?eval my $b = "hello\n"; "$b"
evalbot_6497 'hello '
fglock I wanted to show you the new slicing - in the end of the file - but you can see it in PIL-Run already - @a[2,3]=(4,5) should work now 21:23
putter fglock: why the binding restriction?
ooo! looking... 21:24
fglock because if @a[2] := $b, you don't want @b[2] := $b, right?
putter well, $a1 := $a2; $a2 := $a3; ... $a10231 := $a10232; $a10232 = 31; no? 21:27
fglock but if you do @b=@a, and then @b[2]=99, then you get @a[2]==99 - I think this is unexpected
putter I dont know what spec is. (I dont find it surprising, but either way) 21:31
hmmm...
@a = (2,3,4,5); @a[1,2] = (8,9); @a yields 2, 3, 4, 5, 8, 9
fglock mm bugs 21:32
Array->slice is not being called at all - it needs some work in PrimP5 21:36
testing 21:39
putter I notice p6_to_l seems to destroy the array it's called on?!? $a_obj->shift 21:41
fglock use p6_to_a for arrays - p6_to_l is supposed to be called on files, queues etc that must be read with shift 21:44
putter ahh. but, err, p6_to_a does the same thing...? 21:45
the while ( ... ) also needs to wrap p6_to_n(...) , unless Int has some magic boolean/number overload()ing. 21:46
fglock maybe - if you want to preserve the original array you can pass a copy using @{[ @a ]}
putter is trying to get push(@a,3,4) to work... 21:47
I dont think that works. Unless Array has @{} overloading? p6_to_a is called from p5, to whom Array is an opaque object. If a copy is truely necessary, then p6_to_a has to make the copy (and then mutate only the copy). 21:50
svnbot6 r6510 | fglock++ | * PIL-Run - implements postcircumfix:<[ ]> using Array::slice
putter Hmm... if p6_to_l is inherently mutating, I'm tempted to rename it p6_to_l_mutating(), just so it stands out vis the other p6_to_mumbles.
fglock how about $Array->push( $OtherArray->unboxed ) ? 21:53
putter MULTI SUB push ($xx0,$xx1) { $xx0->push( $xx1 ) }; should be something more like MULTI SUB push (@xx0,*@xxa) { $xx0->push( p6_to_l($xxa) ) };
that would do it. :)
oh, wait. 21:54
fglock that will fail with lazy lists - infinite while loop
putter then p6_to_a($a) should be { $a->unboxed } 21:55
how were you thinking of handling lazy lists perl-side?
fglock using Perl6::Container::Array and Perl6::Value::List 21:56
these are p5 classes
putter wait a sec,
MULTI SUB push (@xx0,*@xxa) { $xx0->push( p6_to_l($xxa) ) }... the $xxa is the "had better be finite because its code" list of arguments to push(). if one of them is a lazy/infinite list, thats something for $xx0 aka @xx0 to worry about. 21:58
fglock I can handle unboxing on the Array object - the you can just call push( $xxa ) 22:00
push @a,(1..1000000000) is working for me 22:01
putter sub p6_to_a($o) { [ p6_to_l($o) ] } sub p6_to_l($o) { $o->unboxed } if unboxed wants to scream it cant (lazy, or inifinte) fine. though it could also return a tied p5 proxy array.
and push @a,1,2 22:02
?
push is currently a 2-ary func. 22:03
fglock push @a,(3..4) works, push @a,(3,4) doesn't
putter and @b=(2,3,4); push(@a,@b); +@a should probably be 1; 22:04
fglock @a.push(@b) works
push @a,@b works too
only @a.push(1,2) fails 22:06
tene what about @a.push((1,2)); ?
fglock works
putter ok, I fixed the push() and unshift() signatures, and implementations to match. 22:17
oh, no I havent. need to fiddle with svn a bit...
fglock storing lazy slices is not trivial :( 22:18
things like @a = (2,3,4,5); @a[1,2] = @a[0,3] but using lazy slices 22:19
putter in 6511.
fglock putter++ 22:20
putter right. though that turned out not to be an issue for push()... p6_to_X shouldnt have to care, and for push(), shouldnt have had to be called anyway with the new mm-based Sub. 22:21
MULTI SUB push (@xx0,*@xxa) { $xx0->push( @xxa ) };
re lazy not trivial... why? oh, you mean lazy slices? 22:22
svnbot6 r6511 | putter++ | PrimP5.pm: push() and unshift() now work.
r6511 | putter++ | ApiX.pm: simplified p6_to_a() and p6_to_l(). 22:23
putter @a = (1..1000000000); @b = @a[3...]; ? 22:24
fglock this can be implemented easily with splice - but slices use a proxy array 22:26
putter k 22:27
svnbot6 r6512 | putter++ | PrimP5.pm: die() fixed. Some direct mm use changed to ApiX calls. 22:48
putter fglock: +@a #=> 11669344 ? 22:57
iblech: ping?
fglock Array->int is not defined yet - is it elems? 22:58
putter yes
fglock @a.num == 3 - @a.int == 'unimplemented' - +@a == 142419272 23:03
svnbot6 r6513 | fglock++ | * perl5/Array - implemented Array.num Array.int
fglock I think it is a problem in the implementation of coerce:as - it doesn't know about 'Array' 23:04
done 23:08
wait - svn problem
ok, everything seems to be working: @a = (2,3,4,5); @a[1,2] = @a[0,3]; say @a; say +@a 23:19
svnbot6 r6514 | fglock++ | * PIL-Run - fixed coerce:as Array -> int 23:20
r6515 | fglock++ | * perl5/Array - non-lazy array slices are supported,
r6515 | fglock++ | only some cases of lazy slices are supported.
fglock good night & 23:21
putter fglock++ 23:36
good night & 23:42
23:42 autark is now known as jp-autark 23:44 autark is now known as jp-autark
luqui hola stevan 23:56
stevan hey luqui 23:57