pugscode.org <Overview Journal Logs> | smoke/win2k (occasional): xrl.us/fqum (4537/8, r2343), Mac OS X (160/4483, r2216), Linux (60/4482, 2267) | pugs.kwiki.org Set by Corion on 25 April 2005. |
|||
Limbic_Region | what is the p6 way to get the index of the last element of an array (in p5 $#array) ?? | 00:13 | |
mugwump | @array.count or something | 00:16 | |
Limbic_Region | you mean @array.elems ? | 00:18 | |
mugwump | sure, or +@array | ||
Limbic_Region | either way - it doesn't sound like $#array | ||
my $last = @array.elems - 1; # seems wrong | |||
mugwump | hmm, wouldn't that be: | 00:19 | |
my $last = @array[+@array-1] | |||
or just: | 00:20 | ||
my $last = @array[-1] | |||
Limbic_Region | no - don't want the value of the last element | 00:21 | |
want the index | |||
p5's $#array | |||
mugwump | ok | ||
Limbic_Region | what I am using right now is my $last = @array.elems - 1; # seems wrong | ||
mugwump | @foo.end | 00:22 | |
from S02 | |||
Limbic_Region | salamat | 00:23 | |
mugwump pulls the latest pugs version to see if .end is in it | 00:24 | ||
Limbic_Region | doesn't appear to be implemented yet | ||
mugwump | care to add a test for it? | 00:25 | |
I'll try my hand at the implementation | |||
Limbic_Region | mugwump - as soon as I am finished writing my purty code | ||
mugwump | ok | ||
Limbic_Region | theres another thing that doesn't quite work right yet either | ||
my @foo = grep defined, @bar; | |||
my @foo = grep { defined } @bar; | |||
those two don't work | |||
my @foo = grep { defined $_ } @bar; # does work | 00:26 | ||
on the other hand | 00:27 | ||
my @foo = grep defined(), @bar; # appears to be working | |||
mugwump | add a test for it somewhere, if you can | 00:29 | |
Limbic_Region | mugwump - just installed Pugs for the first time - my very first p6 program - give me a chance to catch up | ||
:P | |||
mugwump | cool. sure, take your time. | 00:30 | |
wolverian | Limbic_Region: grep EXPR, LIST; is invalid in perl6 | 00:34 | |
Limbic_Region: the only form is grep BLOCK LIST; (and the method form of course) | |||
Limbic_Region | thanks wolverian | 00:35 | |
now what about array slices? | |||
wolverian | what about them? | 00:36 | |
mugwump | Detailed in S06 | ||
oops, not 6 | |||
S09 | 00:37 | ||
wolverian | (if grep defined(), @bar; works in pugs, it's a bug) | ||
Limbic_Region | appeared to work - it didn't | ||
wolverian | ah, good. | 00:38 | |
gantrixx | will the final implementation of perl6 be written in Haskell? | 00:49 | |
wolverian | no. it will be written in perl6. | 00:51 | |
see svn.perl.org/perl6/pugs/trunk/docs/...rview.html | |||
gantrixx | OK, so let me understand something....when it says "The Perl 6 compiler needs to be written in Perl 6 itself", I assume they mean Parrot=Perl6 compiler, correct? | 00:53 | |
mauke | no, parrot is the perl6 interpreter | ||
wolverian | no. | ||
parrot is the VM. | |||
stevan | gantrixx: we are using haskell to bootstrap the perl6 compiler | ||
gantrixx | OK, I see | 00:54 | |
wolverian | (and JITter) | ||
Limbic_Region | should last if defined @subset[ $pos ]; | 01:06 | |
work? | |||
mugwump - you still around? | 01:07 | ||
mugwump ping | 01:08 | ||
scw | autrijus: did I do that? @@ # 03:59 < autrijus> scw: why did you remove output/fp/fp. | 01:12 | |
Limbic_Region | perlmonks.org/index.pl?node_id=451398 # YEAH, my first p6/pugs code | 01:13 | |
mugwump | Limbic_Region: pong | ||
scw | autrijus: I'll check.. | ||
Limbic_Region | mugwump - going to write the @array.end test - should I email it to you? | ||
I don't have commit access | |||
I also need to know if: last if defined @subset[ $pos ]; # should work? | 01:14 | ||
scw | autrijus: r2316.. I don't remember doing that, might be some missuse of svk, i think | 01:16 | |
ninereasons | Limbic_Region, I believe that that's proper p6, but 'if' occuring in that pattern is broken right now. | 01:17 | |
Limbic_Region | also - while ( my @combo = $next() ) { # doesn't appear to work | ||
I have to do: my @combo; while ( @combo = $next() ) { # to get it to work | 01:18 | ||
ninereasons | if rewritten "if defined @subset[ $pos ] { last } # this will work, I think. | 01:19 | |
and the second one will probably be written "while $next() -> @combo {...} " # look equivalent? | |||
Limbic_Region | that's what I did ninereasons | ||
Limbic_Region didn't think of that - let me try it | 01:20 | ||
choked on that too ninereasons | |||
ok - so the 3 things I found is no @array.end, last if defined @array[ $index ], and while ( my @array = $ref() ) { ... } | 01:23 | ||
stevan | Limbic_Region: I can set you up with commit access :) | ||
Limbic_Region: next, and redo dont work yet I was thinking of writing tests for them myself, but you can if you want :) | |||
oh wait,.. misread your comment | 01:24 | ||
Limbic_Region | stevan - not tonight | ||
stevan | while (my @array ... wont work because my currently is only suppoted outside of expressions | ||
Limbic_Region | yeah - I worked around it | ||
stevan | Limbic_Region: want commit access though? it only takes a second | ||
and doesnt hurt at all | 01:25 | ||
Limbic_Region | no - because then I will be responsible for checking stuff in | ||
let me ease into this | |||
Limbic_Region just installed Pugs and wrote his first p6 program tonight | |||
stevan | LOL | ||
Limbic_Region | perlmonks.org/index.pl?node_id=451398 | ||
stevan | do you have SVN | ||
Limbic_Region | svk | ||
stevan | then checking in is very simple :) | ||
I would like you to check in this code to examples | 01:26 | ||
Limbic_Region | alright | ||
stevan | email addy? | ||
Limbic_Region | you tell me how and I will be much obliged | ||
[email@hidden.address] | |||
stevan | Limbic_Region: I would be glad too | ||
Limbic_Region is known meatspace as Joshua Gatcomb btw | 01:27 | ||
stevan | whoops looks like someone tripped over the ethernet cord at castorbaways house :) | 01:28 | |
Limbic_Region | heh | ||
stevan | Limbic_Region: your invite is in the mail | 01:29 | |
stevan goes to see how to checkin with svk now :) | 01:30 | ||
looks like you just mv the file into examples/ | 01:31 | ||
then svk add examples/<filename> | |||
Limbic_Region | I will be prompted for user/pass? | 01:32 | |
stevan | then 'svk ci' to commit locally, and 'svk push' to send it up to openfoundry | ||
Limbic_Region: yes, I think it will ask when you try to commit | |||
(at least that is how SVN works) | |||
Limbic_Region | alright - should it just go under examples? | ||
stevan | sure | ||
and dont forget to add yourself to the AUTHORS file | 01:33 | ||
Limbic_Region | do I add a comment - I got a notepad window up | 01:35 | |
Limbic_Region assumes it is for the log | |||
stevan | yes, anything you like :) | ||
yup, for the log | |||
Limbic_Region | goes before the === Targets to commit line? | 01:36 | |
stevan | I am not sure i understand what you are asking? | 01:37 | |
Limbic_Region | not working WRT to username | ||
don't worry about it - I will figure it out | |||
stevan | ok | ||
Limbic_Region assumes USERNAME is taken from ENV and just fakes it for now | 01:39 | ||
stevan | probably a good assumption, but I cannot say since I use SVN and not SVK | ||
although I have been meaning to get around to using SVK | |||
Limbic_Region | grrr - bad assumption | 01:40 | |
mugwump | it should prompt you for a username once the first try fails | 01:41 | |
Limbic_Region | ;-) | ||
ninereasons | that's what happens in svn, anyway. | 01:42 | |
Limbic_Region | ok - it appears svk ci did more than commit locally | ||
can someone tell me if it worked | |||
;-) | |||
ninereasons | svk log ? | 01:43 | |
stevan | Limbic_Region: it worked | ||
Limbic_Region | cool | ||
stevan | but you didnt add yourself to AUTHORS | 01:44 | |
Limbic_Region | but I forgot to add myself to the AUTHORS file | ||
stevan | :) | ||
feel free to write your name in Tagalog too :) | |||
ninereasons | stevan, is the while loop going to use an arrow for assingment, just like the for loop does? | 01:46 | |
mugwump | while loop using arrow for assignment? eh? :) | ||
stevan | ninereasons: not sure | ||
mugwump | you mean the -> $x { } block syntax? | ||
stevan | mugwump: I think he means topicalization | ||
ninereasons | yes, mugwump | 01:47 | |
right. | |||
toc | |||
Limbic_Region | ok - well, that's it for me tonight | ||
stevan | Limbic_Region: welcome aboard :) | ||
Limbic_Region | I will summarize the things I want that don't currently work and possibly write tests for them tomorrow | ||
mugwump | Limbic_Region: did you commit a test for .end? | ||
Limbic_Region | no mugwump - I asked you about it earlier - no response | ||
and then stevan conned me into get commit access | 01:48 | ||
jabbot | pugs - 2347 - Generate lists powerset in progressive o | ||
pugs - 2348 - Forgot to update AUTHORS file | |||
Limbic_Region | but I am out of time now | ||
mugwump | sure... be sure to commit it when you can! :) | ||
Limbic_Region | I will likely make it available here for someone else to commit since I won't be able to from work | 01:49 | |
so it would have to wait until tomorrow evening | |||
and tomorrow evening is busy - final walk through (closing on house on Wednesday) | |||
stevan | Limbic_Region: what better way to celebrate your new home then by commiting tests to Pugs :) | 01:51 | |
Limbic_Region | use.perl.org/~Limbic%20Region/journal/24371 # summary of tests that I am going to attempt to write tomorrow | 01:55 | |
and on that note - TTFN all | |||
ninereasons | what do you think, mugwump ? is it going to be "while (my $var = something() ) { ... } " ; or will it sometimes make sense to say, while something() -> $var { ... } ; ? | 01:56 | |
wolverian | for something -> $var { ... }, I'd say | 01:57 | |
mugwump | but, that will only call something() once | 01:58 | |
jabbot | pugs - 2349 - | ||
pugs - 2350 - implement @array.end | |||
wolverian | and lists are lazy.. | 01:59 | |
mugwump | ok, from S04: | 02:01 | |
for =something() -> $foo { } | |||
a nice little higher order for loop for you :) | 02:02 | ||
ninereasons | there, I see it: " while =$*IN -> $line {...}" | 02:03 | |
mugwump nods | |||
looks like both for and while can be used like that | 02:04 | ||
ninereasons | I like that. the arrow is very "act upon" implying | 02:05 | |
mugwump | very ruby-esque | ||
(not the arrow, but the form) | 02:06 | ||
ninereasons | I wouldn't know. but there I hear that there is much to admire in ruby. | ||
s/there// | |||
mugwump | indeed | 02:07 | |
mugwump & # meeting | |||
ninereasons | s/to admire/to steal/ | ||
:-) | |||
obra | autrijus++ | 02:30 | |
make smoke: real 4m37.942s | |||
genuinely 50% faster than 48 hours ago | |||
stevan | obra: what revision are you running? | 02:31 | |
I am getting seg faults for everything | 02:32 | ||
(I just rm-ed src | |||
so that might help) | |||
obra | stevan: head | 02:33 | |
stevan | hmm, ok maybe I had some bad stuff in src/ | 02:34 | |
ninereasons | I also was getting segfaults in everything until I removed the src/ directory, stevan | 02:35 | |
stevan | ninereasons: good to know :) | 02:36 | |
I think make clean is not cleaning up enough | |||
02:40
metaperl__ is now known as metaperl_
|
|||
mugwump | Gosh, BrowserUk on perlmonks is so full of shit | 02:43 | |
Khisanth | the guy that can't admit he is wrong? :) | 02:44 | |
mugwump | his mind is as open as a amish woman's legs | ||
s/a /an / | 02:45 | ||
Khisanth | are you sure you know amish women well enough? | 02:46 | |
mugwump | heh. Well, I don't "know" any ;) | ||
jabbot | pugs - 2351 - remove non-working sub | 03:28 | |
pugs - 2352 - more refactoring for the tic-tac-toe | 03:38 | ||
gantrixx | so, is pugs a compiler? | 03:55 | |
mugwump | yes | ||
and an interpreter. | 03:56 | ||
what are you really asking? :) | |||
gantrixx | pugscc is the compiler and pugs is the interpreter? | ||
I'm wondering how I can write perl6 code | |||
I assumed I would be able to #!/usr/bin/perl6 and it would be automatically compiled and interpreted by parrot | 03:57 | ||
or I was hoping | |||
mugwump | you'll need to set up a symlink for that to work | ||
gantrixx | I see what was installed, but I don't understand how to use pugs | 03:58 | |
mugwump | `pugs' can be used like `perl' | ||
actually running via parrot (rather than just pugs) is an `experimental' option of pugscc | |||
gantrixx | ok, great | 03:59 | |
so when I use pugs, it's not using parrot at all? | 04:00 | ||
mugwump | not yet / by default | ||
gantrixx | but I can compile into parrot with pugscc --parrot ? | 04:01 | |
mugwump | yes, that should leave you with parrot bytecode | ||
gantrixx | ok, let me figure out how to get parrot to interpret it | 04:02 | |
ok, so out of pugscc, am I expecting a source.pasm file? | 04:10 | ||
I get an .imc file | 04:11 | ||
mugwump | oh, ok. maybe imcc will give you the .pasm or .parrot file | 04:15 | |
I'm not sure, I thought that "just worked", looking at the pugscc script | |||
gantrixx | sorry guys, I feel like an idiot asking all these questions | 04:16 | |
well I get a .imc file, but it is 0 length | |||
but I was able to get the #!/usr/bin/pugs thing to work | |||
mugwump | ok. does pugscc --runparrot work for you? | 04:17 | |
gantrixx | let me try | ||
I still get a 0 length .imc file | |||
mugwump | it must be failing without raising an error, then :( | 04:18 | |
jabbot | pugs - 2353 - * avoid name clash by renaming fp/ into | ||
pugs - 2354 - * point-free the .end implementation for | |||
gantrixx | I've done pugscc --run --parrot test.p6, pubscc --runparrot test.p6 | 04:19 | |
both result in a 0 length test.imc | |||
should the output be an .imc file? | |||
ninereasons | pugscc --runparrot -e 'say "hello"' # gives me a.pir | ||
parrot a.pir # prints "hello" | 04:20 | ||
gantrixx | I get a.imc | ||
and it is 0 length | |||
I have pugs 6.2.0 | 04:21 | ||
ninereasons | mine is r2350; maybe that's it | ||
6.2.1 | |||
gantrixx, I had some cleaning out of my own to do; I now get a *.imc file when I run pugscc | 04:32 | ||
gantrixx | ok, well now I get a non-0 lenght .imc file | ||
ninereasons | pugscc --run --parrot examples/mandel.p6; # produces mandel.imc | ||
gantrixx | but it it only compiles a simple "hola mundo" program | ||
mugwump | not all pugs AST nodes have IMC written for them yet | 04:34 | |
gantrixx | pugs: Cannot compile: App "&elems" [Var "@array"] [] | ||
this is the error I get | |||
so maybe that corresponds to what you said | |||
ninereasons | pugs -e "my @a = 1..3; say @a.elems " ; # what do you get if you say this at the command line | 04:35 | |
gantrixx | 3 | 04:36 | |
In my program I simply have "my @array = ( "red", "blue", "green", "white", "black" ); print "There are " ~ @array.elems ~ " elemements\n"; " | 04:37 | ||
it works if I use #!/usr/bin/pugs | 04:38 | ||
but I can't compile it with pugscc | |||
ninereasons | sorry - i was distracted; you answered my next question | 04:39 | |
are you able to run the mandel.p6 example, gantrixx ? | 04:40 | ||
gantrixx | when I do a #!/usr/bin/pugs it is actually compiling it first and then feeding it to the pugs interpreter, right? | ||
let me try the fractal example | |||
mandlebrot seems to work | 04:41 | ||
and I can do a "parrot mandel.imc" and it works fine also | 04:42 | ||
ninereasons | you can see how much faster parrot is than pugs, by running that script with pugs for comparison | 04:43 | |
gantrixx | ok, let me mimic some of the stuff in the mandel.p6 script | ||
and see if I can get my little test to work | |||
05:03
joepurl_ is now known as joepurl
05:56
chady_ is now known as chady
06:16
metaperl__ is now known as metaperl_
|
|||
Khisanth | I really hope perl6 is going to be easier for highlighters ... at the very least for text editors written in perl6 | 06:37 | |
castaway1 | ,) | 06:39 | |
06:39
castaway1 is now known as castaway
|
|||
nothingmuch | i think it's going to be much harder | 06:52 | |
macros are no fun | |||
new infix ops that affect parsing | |||
i think an editor without an embedded p6c couldn't do it | 06:53 | ||
that aside: good morning | |||
by new infix ops - i mean ones the user defines | |||
castaway | mornin nothingmuch | 06:56 | |
07:12
wilx` is now known as wilx
|
|||
osfameron | eek! | 08:08 | |
foo (3) + 4; # foo(7) | |||
where is the rtfm that explains why this is a good idea? | 08:09 | ||
castaway | (3) is just a mathematical expression that reduces to 3, would be my guess | 08:10 | |
(ie its being clever in context) | |||
hm, although I suppose its a question of precedence | 08:11 | ||
osfameron | the counter example is: | 08:12 | |
foo(3) + 4; # foo(3) | |||
pjcj | that's always been slightly dodgy ground in perl5 | ||
osfameron | where because there's no whitespace the parens surrounds the function's arguments entirely | ||
I think I've converted to javascripty () for arglists ;-) | 08:13 | ||
castaway | hmm, significant whitespace is indeed somewhat odd | 08:15 | |
Khisanth | unavoidable | 08:18 | |
castaway | It isnt, just make people add parens where the meaning is ambiguous, like in math | 08:20 | |
foo (3) + 4 -> foo(3); foo (3+4) -> foo(7) | |||
08:22
chady is now known as chady_
|
|||
Khisanth | what is foo (3+4) + 4? :) | 08:22 | |
castaway: having significant whitespace is not as bad as having exceptions to rules | 08:24 | ||
Juerd | castaway: No, those are both foo(7) | ||
Khisanth: foo(11) | |||
castaway: The () for function calls is not the same () you use for precedence grouping | 08:25 | ||
castaway: The () that is part of the sub call syntax works like subscripting [] or {} | |||
Khisanth | we need a bigger keyboard with more brackets :) | ||
Juerd | castaway: whitespace disallowed, unless you add a dot | 08:26 | |
castaway: The rules change consistently from Perl 5 to Perl 6: in Perl 5 you could use whitespace with all three of postcircumfix (), [] and {}. | 08:27 | ||
castaway | Juerd, that was just my opinion of how it would make sense to me | ||
osfameron | is the reason for this documented somewhere? | ||
Juerd | osfameron: I don't know. It's easier to re-explain than to find it in the docs | ||
osfameron | ah! | 08:28 | |
Juerd | osfameron: for @foo { ... } needs whitespace | ||
Khisanth | the problem with "add parens where the meaning is ambiguous" is that it leads to lisp :) | ||
Juerd | osfameron: And given $foo{ ... } is incomplete, needs a block, because $foo is used as a hashref | ||
osfameron: So the rules for subscripting need to change to disallow whitespace | |||
osfameron | ok, I'm fairly happy with the subscripting stuf | 08:29 | |
Juerd | osfameron: This applies to postcircumfix () as well, which is syntactically just subscripting | ||
osfameron | oh | ||
Khisanth | Juerd: what would @foo{...} get mistaken for? | ||
Juerd | osfameron: Which finally makes it newbie-friendly | ||
osfameron | Juerd: `foo (3+4) + 5` is not osfameron-friendly | ||
Juerd | (And Juerd-friendly, because it will now behave the way I had always expected... The problem is that different people expect different things from this. Some expect Perl 5 behaviour, some want the Perl 6 way) | ||
castaway hmms and shrugs, cos she doesnt generally put spaces between funcnames and parens anyway | 08:30 | ||
Juerd | Khisanth: hash deref on @foo | ||
Khisanth: It's entirely okay to implement a postcircumfix {} operator for arrays if you want to. | |||
Khisanth | oh that is going to make for some fun mistakes that work even though it wasn't intended | ||
castaway struggles to build PAR .. anyone ever try that on HP-UX ? | 09:13 | ||
Juerd | castaway: I get the feeling HPUX was never meant to be used :) | 09:32 | |
castaway | hmm, according to the docs its supposed to work on HP | ||
regardless of your feelings, people use it. | 09:33 | ||
Juerd | It's that way with many things | 09:37 | |
Like bondage SM | |||
I think it's not human and can't possibly be pleasant, but there are indeed people who practice it. | |||
draven_ | Juerd: you are weird :p | 09:39 | |
bsb | Anyone run pugs under ghci? | 09:40 | |
Juerd whips draven_ | 09:41 | ||
Do you like that? | 09:42 | ||
draven_ jizzes on juerd. | |||
Juerd | Don't do that. | ||
draven_ | :D | ||
you started it :p | |||
actually, I'm not into submission | 09:43 | ||
<g> | |||
castaway concludes shes running the wrong ld, since it doesnt like the options that perl -V suggests were used on build | |||
Juerd | Then this beautiful leather dog collar is not for you. | ||
No {J} for you. | 09:44 | ||
draven_ | Juerd: guess not. | ||
Juerd | draven_: But your nice is lcfirst. | ||
draven_: Don't mislead people like that. | |||
09:44
draven_ is now known as Draven
|
|||
Draven | better? | 09:44 | |
Juerd | Draven: Well, if you're dominant, it suits better. | 09:45 | |
Draven | mhm | ||
Juerd: for someone who doesn't understand why people would like it, you sure know alot about it :) | |||
Juerd | I've hosted an IRC server for some bdsm channels | ||
Learned quite a lot about their customs :) | |||
pasteling | "bsb" at 203.214.67.82 pasted "hasktags Makefile.PL patch" (21 lines, 609B) at sial.org/pbot/9660 | 10:14 | |
bsb | does that patch look harmless? | ||
I don't want to make a mess | |||
theorbtwo | Looks good to me, bsb. | 10:21 | |
bsb | happy day | 10:22 | |
ghci -isrc src/Main.hs ./src/pcre/pcre.o src/UnicodeC.o | |||
isn't going to work tonight so I'll leave that | 10:23 | ||
theorbtwo | Try make ghci. | 10:25 | |
bsb | GHCi runtime linker: fatal error: I found a duplicate definition for symbol | 10:28 | |
blkcmp | |||
whilst processing object file | |||
src/UnicodeC.o | |||
jabbot | pugs - 2355 - $ENV{HASKTAGS} override | ||
theorbtwo | Nod, didn't think that'd work either. | ||
But it was worth a try. | |||
bsb | ta | 10:29 | |
10:29
Aragone is now known as Arathorn
|
|||
nothingmuch just helped someone install ubunto on top of colinux | 12:02 | ||
with a rootless xwin | |||
trƩs cool | |||
works very well | |||
castaway | whats colinux ? | 12:19 | |
decay | castaway: www.colinux.org/ | 12:21 | |
castaway can talk in urls too :) | 12:22 | ||
decay | castaway: not much more to say about it, it works quite ok | 12:28 | |
castaway | well, you could give a brief synopsis for lazy people :) | 12:29 | |
decay | think of a user mode linux running on windows | ||
castaway | hmm, interesting.. I wonder how/why they got further than plex86, who seem to have given up | 12:30 | |
decay | well, it's not a virtual machine if i understand that correctly | 12:33 | |
castaway | I'm not at all sure what "cooperatively alongside" means.. | 12:34 | |
theorbtwo | It looks very nifty. | 12:36 | |
Your real machine runs both windows and linux at the same time. | |||
It's somewhere inbetween a virtual machine like vmware, qemu, etc, and a dual-boot computer. | 12:37 | ||
decay | it's more like the uml linux kernel which runs in userland | 12:38 | |
i think they do not 'emulate' a machine in there. | |||
castaway | what does "at the same time" mean? | ||
decay | castaway: it runs as a process | ||
castaway | I mean, I understand the text, but it doesnt sound possible | 12:39 | |
a Windows process? | |||
decay | castaway: sure | ||
theorbtwo | Apparently it is. | ||
castaway | (a kernel process, a cpu process ?) | ||
decay | castaway: we have some boxes here running 32 uml linux kernels in userland | ||
castaway has never been to userland :) | |||
decay | castaway: a process as seen by windows xp, a program | 12:40 | |
castaway | ah, so it is running "under" windows | ||
decay | yes | ||
castaway | Ok, I wouldnt define that as "alongside" | ||
decay | castaway: if you're interested in that you might take a look at xen | 12:41 | |
castaway: which runs them 'alongside', though it's specially adapted OS versions/kernels running where with support for virtualized hardware | 12:42 | ||
Limbic_Region | ok - so after stevan rooked me into commit access, I need to write some tests for some features I found lacking | ||
any guide to writing tests? | |||
castaway | Test::Tutorial ? or p6 ones in particular ? | ||
Limbic_Region | p6 ones specifically | 12:43 | |
like for instance - @array.end is missing - where do I add it | |||
gaal_ | t/README | 12:44 | |
and welcome :) | |||
castaway | I think thats mostly up to intuition, I dont think theres a roadmap | ||
Limbic_Region | thanks gaal - did you see my powerset in progressive order example? | ||
gaal_ | no, i wasn't around most of today - where is it? | 12:45 | |
Limbic_Region | there is also one thing I forgot to add to the list in my journal of things that didn't work as I expected. my $foo = sub returns List { ... } | ||
examples/progressive_powerset.p6 or powerset_progressive.p6 - not sure which | |||
you can assign an anonymous sub to a scalar but you can indicate what it returns (currently) | 12:46 | ||
castaway guesses "t/builtins/arrays | |||
Limbic_Region | thanks castaway | ||
Limbic_Region hugs castaway | |||
castaway | and possibly 'end.t' since strings/ has a whole bunch of files named after operations that can be done on them | 12:48 | |
Limbic_Region | .end isn't for arrays only? | 12:49 | |
Limbic_Region had already planned on naming the test end.t btw | |||
castaway | :) | ||
no idea, but looking at the t/ layout, if it turns up in multiple places, you eitehr create 2, or make something like arrays_and_hashes | 12:50 | ||
(although that may be interaction-of, not shared-funcs | |||
castaway could also be FOS ,) | 12:51 | ||
Limbic_Region | ok - so can I email t/builtins/arrays/end.t to someone with commit access - I can't commit from work | 12:58 | |
autrijus | why? | ||
this is HTTP port 80 | |||
your company isn't DAV aware? | |||
rehi lambdacamels, btw. | |||
castaway | its an autrijus! | ||
Limbic_Region | autrijus - company = U.S. Government | ||
autrijus | Limbic_Region: hm. so, it's a policy problem, not a technical one? | 12:59 | |
Limbic_Region | and I forgot to burn a copy of GHC/Pugs/svk to bring in this morning anyway | ||
autrijus | you can always DAV mount using Win32 web folder and just copy your files there... :) | 13:00 | |
but sure, nopaste the code and I'll commit for you | |||
Limbic_Region | autrijus - all HTTP traffic goes through a proxy that is monitored | ||
perlbot nopaste | |||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
pasteling | "Limbic_Region" at 129.33.119.12 pasted "t/builtins/arrays/end.t" (34 lines, 662B) at sial.org/pbot/9662 | 13:01 | |
autrijus | Limbic_Region: committed (and it all passes) | 13:03 | |
thanks! | |||
Limbic_Region | walang anuman | ||
so it is already implemented? | |||
autrijus | sure | 13:04 | |
I think mugwump did it | |||
right after your request | |||
which is usual around here | |||
Limbic_Region | out of curiosity, what does @foo.end return if all of the elements are shifted off (i.e. does it give -1) | ||
autrijus | -1 surely | ||
pugs> ().end | |||
-1 | |||
Limbic_Region should have included that as a test | |||
castaway | You didnt? :) | 13:05 | |
autrijus | my @array = (); | ||
is(@array.end, -1, 'we have an empty list'); | |||
I think it's good enough | |||
Limbic_Region | castaway - I wrote a test for initializing empty - not returning to empty | ||
autrijus - did you get a chance to see use.perl.org/~Limbic%20Region/journal/24371 | 13:06 | ||
beyond the 4 that I mentioned, my $foo = sub returns List { ... }; # doesn't work either | |||
was wondering which would be considered low hanging fruit so that I could write some more tests | 13:07 | ||
autrijus | ok... | 13:08 | |
I think I fixed your #2 | |||
would be wonderful if there's a test | |||
jabbot | pugs - 2356 - C* @array.end tests, from Limbic_Region | ||
Limbic_Region | autrijus - run perlmonks.org/index.pl?node_id=451398 and tell me if it works - if so, it worked for sure | 13:10 | |
autrijus | looking | 13:11 | |
Limbic_Region | I will start looking at any existing tests for last and supplement in the interim | ||
autrijus | Limbic_Region: it works | 13:12 | |
Limbic_Region | good ;-) | 13:13 | |
Limbic_Region thinks about p5 behavior WRT to last in a subroutine and wonders if the behavior in p6 has been defined | |||
theorbtwo | Larry's example code uses the p5ish behavior to next to the next canidate in something like multimethod dispatch, IIRC. | 13:14 | |
Limbic_Region | theorbtwo - what I mean is when you f'up and put last to exit a sub (p5 let's you do it but issues warnings) | 13:16 | |
Limbic_Region still hasn't found any existing last tests | 13:17 | ||
autrijus | Limbic_Region: I'm not sure that | ||
while (my $foo = ...) { ... $foo ... } | |||
works | |||
can someone find a reference? | |||
jabbot | pugs - 2357 - * `last if foo` is now parsed always as | 13:18 | |
pugs - 2358 - * much better error messages overall. | |||
pugs - 2359 - * remove mention of DynamicLoader | |||
Limbic_Region | autrijus - the alternative would be while ( $ref() -> @foo ) { ... } right | ||
autrijus | huh? | 13:19 | |
no | |||
Limbic_Region | like a for loop? | ||
autrijus | my $foo; while $foo = blah() { ... } | ||
or | |||
while my $foo = blah() { ... }; | |||
Limbic_Region | so things like while ( my $line = <FH> ) { ... } # won't work anymore either? | 13:20 | |
autrijus | but never | ||
while (my $foo = blah()) { ... }; | |||
er nvm | |||
() is not {} | |||
so it does work | |||
but it doesn't work like you think it does | |||
Limbic_Region | doesn't | ||
autrijus | because the my() scope extends to outward | ||
Limbic_Region | ok - so educate me | ||
autrijus | sub bar { while (my $foo) {...} ; say $foo } | ||
machack666 | @array.end == -1 seems like bad behavior to me, or at least unexpected behavior | ||
autrijus | is legal! | ||
machack666: | 13:21 | ||
$ perl -e 'die $#array' | |||
-1 at -e line 1. | |||
machack666 | perhaps it should return undef | ||
Limbic_Region | machack666 - p5 behavior | ||
machack666 | never used @#array | ||
:) | |||
autrijus | Limbic_Region: the point is there's no implicit blocks | ||
castaway | autrijus: can I bug you about some of your p5 modules? :) | ||
autrijus | so the my() always terminates to the next } | ||
machack666 | I fuess if there's a precident | ||
autrijus | castaway: sure | ||
Limbic_Region: as such, talking about my() in while () conditions is likely to be not very precise | |||
Limbic_Region | autrijus - I am fine with learning new syntax | 13:22 | |
autrijus | see p6bible s04 | ||
grep for "while my" | |||
Limbic_Region | ok | ||
will do | |||
castaway | The first is Module::ScanDeps.. which is supposed to not list Core modules per default, yes? I'm using 5.6.1 and its listing Storable, and MIME::QuotedPrint .. | ||
.. on HP-UX11 .. any idea why? | |||
Juerd | p6l++, especially luqui++ | 13:23 | |
# clear and useful answers | |||
castaway | It's also listing XML::Parser which I'm fairly cerain I'm not using (but am using XML::Simple and XML::SAX) | ||
machack666 | perl -e '$ar[$#ar]=1;print @ar' | ||
Modification of non-creatable array value attempted, subscript -1 at -e line 1. | |||
autrijus | castaway: | ||
Storable was first released with perl 5.007003 | |||
MIME::QuotedPrint was first released with perl 5.007003 | 13:24 | ||
so. | |||
broquaint | IIRC, while my $foo = bar() { ... } still works as expected since while will be a funky statement/macro dealie so that $foo is scoped to the block. | ||
autrijus | broquaint: s04 contradicts with you :) | ||
castaway goes back to check | |||
broquaint | Damn synopses ;) | ||
autrijus | (The "while"ās declaration of $line conā tinues to be visible past the end of the block. Remember, no implicit block scopes.) | ||
castaway | well I suppose that explains that bit, I'm just daft.. | 13:25 | |
Limbic_Region | so the bottom line is that it requires additional typing | ||
castaway | any idea about the XML::Parser one? | ||
broquaint hopes placeholders will replace loop variables in terms of programming practices | 13:27 | ||
autrijus | I think it does recursive dep | ||
and XML::Simple depend on ::Parser | |||
Limbic_Region | autrijus - know a reference off the top of your head that says no implicit block scopes? I am ashamed to admit that other than an initial read on release, I am not overly familiar with the As/Es/Ss | ||
autrijus | Limbic_Region: install Perl6::Bible | ||
and "p6bible s04" | |||
read "The Relationship of Blocks and Declarations | 13:28 | ||
castaway | no, it doesnt depend on it | ||
It likes XML::Parser if present, if not, then not | |||
(and I'm using XML::SAX as the parser) | |||
or do: tnx.nl/S04 | |||
Limbic_Region | autrijus - thanks - I just needed to search for implicit in s04 | ||
autrijus | oh. scandeps has no notion of optional dependency. | 13:29 | |
castaway | hmm, damn | ||
so attempting to 'par' that up would fail ? | |||
autrijus | hm? | ||
if your system has no XML::Parser, par will just ignore that | 13:30 | ||
castaway | par uses ScanDeps to figure out what to pack, no? | ||
autrijus | and hope you know what you're doing | ||
castaway | well it does, but I dont want it :) | ||
autrijus | oh. | ||
Limbic_Region | autrijus - so there should be a way to declare formal parameters and achieve the same thing as my right? | ||
while $ref() -> @foo { ... } | |||
castaway | I'm attempting to figure out what a customer machine would need, and the fact that our internal dev machine has XML::Parser in its site_perl is irrevelant | ||
In theory I'd like to say 'use perls std path but my site_perl only' | 13:31 | ||
machack666 | Is "closure traits" the terminology for ENTER {...}, PRE {...}, POST {...}, etc? | ||
castaway | anyway, since my other problem is that PAR is failing to compile, thats partly irrelevant too :) | ||
theorbtwo | autrijus: Are you interested in an alternative to ScanDeps that does live dependencies? | ||
It's fairly easy to write using coderefs in @INC. | 13:32 | ||
machack666 | me: yes | ||
Juerd | Limbic_Region: Interesting syntax | ||
Limbic_Region | or rather while = $ref() -> @foo { ... } | ||
Juerd | Huh? | ||
Limbic_Region | Juerd - looking at S4 | ||
Juerd | I could follow the previous syntax - it puts the condition into @foo | ||
But this? | |||
Limbic_Region | the closest example of what I want is | ||
machack666 | What is the support status of the various closure traits? | 13:33 | |
Limbic_Region | while =$*IN -> $line {...} | ||
Juerd | Limbic_Region: $ref() now returns an iterator? | ||
Limbic_Region: And isn't it rather weird to have a sub return the same iterator more than once?! | |||
Limbic_Region | Juerd - no, it returns a list | ||
autrijus | theorbtwo: | ||
scandeps has that mode. | |||
Juerd | Limbic_Region: while's condition is executed before each iteration | ||
autrijus | scandeps -c | ||
scandeps -x | |||
using perl -c and perl, respectively | 13:34 | ||
Limbic_Region | right | ||
theorbtwo | Oh. | ||
Juerd | Limbic_Region: So it returns a new list each time, which each time is converted to an iterator, which you kick only once. | ||
Limbic_Region | Juerd - see www.perlmonks.org/index.pl?node_id=451398 | ||
I am trying to get my cake and eat it to (like I did in p5) | |||
while ( my @foo = $ref->() ) { ... } | |||
Juerd never gets the cake references | 13:35 | ||
machack666 | machack666: no support for BEGIN {...}, so I'd guess that none are supported. | ||
Juerd | Limbic_Region: That should work, | ||
Limbic_Region | not according to autrijus and possible S4 | ||
Juerd | Limbic_Region: I think your mistake is calling your iterator "next". That's misleading. | ||
Limbic_Region | no implicit block scopes | ||
Juerd | Or assuming that iterators are coderefs | ||
autrijus | Limbic_Region: it works | ||
Limbic_Region | as of when? | 13:36 | |
autrijus | I'm just saying that the @foo will be visible post the {...} | ||
which is likely bad | |||
Limbic_Region | didn't work last night when I was trying it | ||
autrijus | i.e. not what you expect | ||
Limbic_Region | no autrijus - it didn't work at all | ||
autrijus | er. I was donning my p6l hat. | ||
autrijus switches to the p6c hat | |||
it's not yet implemented, but if you write a test, sure, it will work in a matter of minutes! | 13:37 | ||
castaway | -c and -x seem to compile&inspect %INC .. AND do static scanning.. which is not v. useful IMO | ||
autrijus | castaway: patches.... welcome :) | ||
Limbic_Region | well what I am really interested in is figuring out how to do it properly in p6 | ||
castaway | autrijus: no time :) | ||
castaway points at theorbtwo | |||
autrijus | (it fits my use case) | ||
Limbic_Region | basically, loop until the function being called each time returns undef | 13:38 | |
autrijus | if you are using PAR | ||
try | |||
pp --exclude XML::Parser | |||
and see if that works | |||
it may or may not. | |||
castaway | autrijus: that was the pther problem: par wont compile for me, I get ld errors | ||
Limbic_Region | put the result of that function in a formal parameter or whatever so that I can use it inside the loop | ||
autrijus | I think it does, but that part of my code | ||
castaway: really. platform? | |||
castaway | HP-UX11 | ||
autrijus | that's a new one. | 13:39 | |
try [email@hidden.address] | |||
castaway | I have a sneaking feeling its a wrong ld tho, it chokes on options that perl -V claims to have used. | ||
but the fun bit is the: | |||
Limbic_Region | do you have to be subscribed to p6.l to post to it? | ||
castaway | ld: Unsatisfied symbols: | 13:40 | |
$global$ (data) | |||
mm, could do that.. | |||
Juerd | Limbic_Region: Nafaik | 13:42 | |
Limbic_Region: It's common for Perl lists that you can post to them and read them without being subscribed | |||
autrijus | but then you will wait for moderation | ||
xerox | |||
castaway asks the same question for [email@hidden.address] (subscribe compulsory?) | |||
Juerd | 13:43 | ||
autrijus | castaway: no, I don't think so | ||
all @perl.org follows the same process | |||
Juerd | autrijus: That's strange, as my messages appear almost instantaneously and I send mail from another address than is subscribed | ||
autrijus | afaict | ||
Limbic_Region | ok - email sent to p6.l | 13:48 | |
I am off for a bit, will write some more tests later - thanks everyone | 13:49 | ||
castaway sends a mail full of make output and perl -V to [email@hidden.address] .. | 13:51 | ||
Limbic_Region | oh - before I go, if someone wants to ping me with the location of any existing tests for "last", I will supplement them with the changes autrijus made to make last if defined @array[ $index ]; work | ||
castaway goes back to doing things my hand (darn HP-UX) | 13:52 | ||
autrijus purrs | 13:54 | ||
I hear HP-UX is even deader than AIX | |||
castaway | heh, everyone says that whenever I mention it | 13:55 | |
still, customers are still picking it | |||
So this is an odd form of "dead" | 13:58 | ||
autrijus | undead then | ||
the undead OS that roams the earth | 13:59 | ||
castaway | Personally, from this perspective, it looks alive and kicking. | ||
theorbtwo | That's one awful big zombie process, autrijus. | ||
autrijus | :D | 14:00 | |
Arathorn | i thought irix was the undead OS that roams the earth.. | ||
stevan | Limbic_Region: ping | 14:01 | |
morning all :) | |||
Limbic_Region | pong | ||
stevan | Limbic_Region: there was some next and last tests in t/data_types/array.t | ||
but I removed them last night because they were a little odd | 14:02 | ||
I was thinking of doing some of that today | |||
but you can if you like :) | |||
Limbic_Region | no - go for it | ||
I will supplement if you miss the ones I am thinking of | |||
stevan | Limbic_Region: oh wait,.. sorry it was in t/statements/for.t | 14:03 | |
Limbic_Region: if you want to paste your thoughts, that might help me get started :) | |||
Limbic_Region | well - last shouldn't be tied to a specific control block | ||
two thoughts | |||
last if <condition>; | 14:04 | ||
<condition> and last; | |||
last <label>; | |||
stevan | (i figured once I got for.t done, i would do while.t, loop.t etc | ||
Limbic_Region | i.e. variations of last where it isn't the only statement on the line | ||
and then last from a sub | |||
stevan | from a sub? | 14:05 | |
Limbic_Region | in p5 it will let you do it but issue warnings - not sure what the p6 behavior should be | ||
right - it is a mistake and probably shouldn't be supported | |||
but WTF am I to make that call | |||
stevan | I think last, next, redo are only allowed in loops, but I will check the syns | ||
if ever you are in doubt, read your bible (perl6::bible that is) | |||
Limbic_Region | ok - so I am off again, I will look at anything you come up with and supplement if needed | ||
autrijus joins the bible thumping | 14:06 | ||
stevan | Praise @larry!!! | ||
can I get a witness!!!! | |||
autrijus | Hosanna!! | ||
hmm | |||
BEGIN{} is only allowed as rhs? | |||
$ perl -e 'BEGIN { $_ } = 3' | 14:07 | ||
syntax error at -e line 1, near "} =" | |||
Limbic_Region doubts his email is going to make it to p6.l without being subscribed as it is probably being held for approval or was filtered as spam (that happens a lot from his yahoo account) | |||
stevan | autrijus: thats just weird code IMHO | ||
theorbtwo | Limbic_Region: I talked to Ask about this once -- the first time you post from any given address, if it is not subscribed, it will be human-filtered, but then it goes on a domain-wide whitelist. | ||
autrijus | yes. | 14:08 | |
theorbtwo | autrijus, what would the semantics of BEGIN as a LHS be? | ||
autrijus | theorbtwo: I don't know. | ||
so I'm coding it as rhs only | |||
we need BEGIN to properly support a number of things | |||
say foo(); sub foo { 3 } | |||
being one | |||
although personally I don't use that often | |||
Arathorn | probably a silly question, but: has anyone thought about accessing the Apache API through pugs? | 14:25 | |
i.e. mod_pugs, i guess | |||
jhorwitz | arathorn: mod_parrot will handle it for you once the parrot compiler backend is complete | 14:26 | |
stevan | there is also mod_haskell IIRC | 14:27 | |
Arathorn | that makes sense, i guess | ||
stevan | do we have labeled blocks in perl6? I cant seem to find them in the Synopsis | ||
Arathorn | would be slightly surreal to have to compile your perl down to bytecode before it runs | ||
jhorwitz | arathorn: mod_parrot won't require you to do that | 14:28 | |
Arathorn | it'll automatically compile up the bytecode on demand, a la a servlet container? | ||
jhorwitz | assuming there's a registered compiler for the language. i imagine there will not be one for pugs to begin with, but certainly for perl6. | 14:29 | |
Arathorn | sexy, then :) | 14:30 | |
jhorwitz | fyi, losser.st-lab.cs.uu.nl/mod_haskell -- looks like it's been collecting dust for a few years. | ||
Arathorn browses view-cvs for mod_parrot | 14:32 | ||
jhorwitz | arathorn: make sure you're looking at the right one -- www.smashing.org/mod_parrot | 14:33 | |
ask's old version can sometimes pop up on google | |||
Arathorn is flicking through svn.perl.org/viewcvs/parrot-modules...rot/trunk/ | 14:34 | ||
which looks like your handiwork :) | |||
jhorwitz | ya :) | ||
Arathorn | (at least judging by the Author column) | ||
have you thought much about how parrot would work with the threading fun & games for the more exotic Apache 2 models? | 14:35 | ||
(apologies if this is more #parrot related) | |||
jhorwitz | parrot's model is one interpreter per thread, which is fairly straightforward to deal with. | 14:37 | |
so like mod_perl, we pick from a pool of available parrot interpreters | 14:39 | ||
Arathorn nods | |||
autrijus | woot! | ||
Arathorn | would those parrot interpreters share any bytecode memory footprint? | ||
autrijus | jhorwitz: so, all syms has to be explicitly shared via pmcs | ||
which is a good thing | |||
bwahaha | 14:40 | ||
I implemented BEGIN{} in no time | |||
out-of-sequence sub{} coming right along | |||
"BEGIN" -> do | |||
env <- getState | |||
return . Val . unsafePerformIO $ do | |||
(`runReaderT` env) $ (`runContT` return) $ resetT $ do | |||
evl <- asks envEval | |||
evl (Syn "()" [Val code, Syn "invs" [], Syn "args" []]) | |||
autrijus praises unsafePerformIO | |||
jhorwitz has a memory lapse and tracks down answers for autrijus | 14:42 | ||
Arathorn reads up on how mod_perl2 works before trying to understand mod_parrot :) | 14:43 | ||
ah, so only mutable data is duplicated between the parent & clone interpreters in mod_perl2 | 14:46 | ||
very cool | |||
autrijus | it's also very slow on win32 ;) | 14:47 | |
Arathorn | because perl_clone() doesn't work properly? | ||
i guess that screws up lazy-evalling tricks like the ones TT3 uses (iirc), too | 14:48 | ||
autrijus | stas has proposed a CLONE2 method | ||
jhorwitz | autrijus: yes, PMCs must be explicitly shared. can't find a definitive answer on bytecode. need to read more about interpreter cloning. | ||
autrijus | old pugs: | ||
$ pugs -e 'say foo(); sub foo { 3 }' | |||
No compatible subroutine found: &foo | |||
App "&foo" [] [] | |||
as of 10 seconds ago: | |||
$ ./pugs -e 'say foo(); sub foo { 3 }' | |||
3 | |||
theorbtwo | Woo! | 14:49 | |
autrijus | turns out we don't need the costly refactor of Rule into Eval monad ;) | 14:50 | |
because you can freely enter that monad by saying something like | 14:51 | ||
unsafePerformIO . runContT . runReaderT | |||
or some other order | |||
Arathorn | hm, 15,632 unread mail in Lists.mod_perl - i've been away too long :\ | 14:53 | |
petdance | Can I come in here? I don't know Haskell. | 14:55 | |
theorbtwo | Certianly, petdance. | ||
...and we can work on fixing that oversight. | 14:56 | ||
jhorwitz | petdance: join the club. ;-) | ||
autrijus | greetings petdance! | ||
if you don't know haskell | |||
you need to know unit testing! | |||
I don't think we need to fix _that_ for you :) | 14:57 | ||
petdance | I'm REALLY interested in Parrot's internals. | ||
the C code behind it. | |||
autrijus | oh. irc.perl.org has a #parrot | ||
featuring Leo occasionally | |||
who is more qualified than anyone here to talk about parrot internals :) | |||
petdance | I just wnana make sure the C code is happy and consted. | 14:58 | |
like I've been doing with the p5 guts. | |||
jabbot | pugs - 2360 - * BEGIN blocks now works! | ||
petdance | and, really, autrijus++ Bravo for all the JFDI you've managed to corral. | ||
autrijus | =) | 14:59 | |
consted? | 15:00 | ||
q[acme] | petdance: i haven't really been following, but is this so that the C compiler can pick up bugs? | ||
Steve_p pets petdance | 15:04 | ||
stevan | Steve_p: did I see you were going to take on Test::Tutorial?? | ||
morning petdance :) | 15:06 | ||
Steve_p | stevan, yes, I be starting to revise it shortly. First pass is to get what's there working. | ||
stevan | Steve_p: you are a brave soul :) | ||
autrijus | $ pugscc --parrot -e 'BEGIN { say "Compiling!" }; say "Running!"' | 15:07 | |
*** Using the 'Parrot' backend. | |||
Compiling! | |||
*** Generated output: a.imc | |||
$ ./a.imc | |||
Running! | |||
stevan | weird, but very cool :) | ||
autrijus | :) | 15:08 | |
so, BEGIN{} is now freely usable | |||
I'll implement "use" now. | |||
stevan | autrijus: maybe you know this, do we have labels in perl6? I cant find it in the synopsis? | ||
autrijus | stevan: no idea | ||
stevan | I will keep searching then, and if all else fails go to p6l | 15:09 | |
broquaint | Do we know if use/require behave like their p5 counterparts and interpret magic in @INC? | ||
autrijus | k. | ||
broquaint: I don't know. | |||
broquaint | I think it's to be defined in a future Apoclaypse ... | 15:10 | |
Yah, looks like it. | |||
Steve_p | stevan, I love the footnote "The first number doesn't really mean anything, but it has to be 1. It's the second number that's important." | 15:11 | |
jhorwitz wants subs for the parrot backend, but haskell IQ is too low. :( | |||
stevan | Steve_p: :) | 15:13 | |
Steve_p: all due respect to the Schwern, but that tutorial just confused me the first time I read it | 15:14 | ||
Steve_p: IMHO it should just start with Test::More and leave historical Test.pm and Test::Simple as footnotes | 15:15 | ||
hey boogie | |||
gaal_ | hey all | ||
boogie | hi stevan. :) | ||
stevan | hey gaal_ | ||
gaal_ | stevan, hola. | 15:16 | |
stevan | boogie: with all the pugs speedups in the past few days, your CGI will likely work much smoother | ||
boogie | stevan: yes, I'm checking it now. :) | ||
autrijus | gah | ||
*Main> eval "my $x; BEGIN { say $x }" | |||
this breaks | |||
gaal_ smokes a pug | |||
autrijus | so I broke everything :-/ | ||
gaal_: it will be 100% fail | 15:17 | ||
no need to | |||
gaal_ puts out the smoke | |||
autrijus rethinks the strategy | |||
autrijus concludes there's no way around that bug except to do everything correctly | |||
i.e. properly implement the pads for parser | |||
boogie | stevan: do you know something about why CGI/examples/test.p6 fails? it seems to me, that after sending the form, it's going to an endless loop | 15:18 | |
stevan: it's the same with the memory game, too. | |||
jabbot | pugs - 2361 - * separate lhs from rhs closure traits | ||
broquaint | Don't think like that, autrijus, there's a hack for *everything* ;) | ||
stevan | boogie: to be honest, I haven't looked at CGI in a little while | ||
petdance | q[acme]: Yes, so the C compiler knows "That pointer's contents are not modified" | ||
boogie | stevan: then I'm going to debug it. ;) | 15:19 | |
petdance | For instance, if you have int strlen( char *str ) | ||
then the C compiler doesn't know that the contents of str don't get modified. | |||
So char *p = NULL; strlen( p ); looks to C like you could be initiliazing it | |||
OTOH, if it's int strlen( const char *p ); | |||
Steve_p | stevan, I don't want to get too complex and skip Test::Simple. To be honest, people get confused with Test::More. Unless you are an alpha geek, I don't want to push them. | 15:20 | |
petdance | then char *p; strlen( p ); is obviously a problem. | ||
How do people get confused w/test::more? | |||
stevan | Steve_p: I wonder if you introduce it right, it might not be an issue | ||
Steve_p | For example, I explained to a guy yesterday how to install modules by hand. He's been programming with Perl for three+ years | ||
stevan | Steve_p: how has he been doing it? CPAN? | 15:21 | |
Steve_p | Oh, I'll introduce along the lines of "See how all your ok()'s work fine with Test::Simple. OK, just change that to Test::More now :)" | ||
...and then explain what more they can do with Test::More | 15:22 | ||
stevan, only with CPAN. | |||
stevan | Steve_p: I wonder if that is not more confusing though? Because you have to do backflips with Test::Simple::ok to tests anything complex | ||
stevan queues turns up "Dog and Pony Show" so petdance can hear too | 15:23 | ||
Limbic_Region got impatient and subscribed to p6.l from his seldom used gmail account | 15:25 | ||
petdance | stevan: I have a swell live version of it from last year's ATP. | 15:28 | |
I'd like to get rid of the Test::More/Test::Simple distinction. | |||
Steve_p | So just start with Test::More | 15:29 | |
stevan | thats my vote :) | ||
autrijus | ok. the fix is in | 15:33 | |
r2362 | |||
any smokers? | |||
this has the effect of moving all declarations to compile time | |||
$ ./pugs -e 'use Test; ok 1' | 15:34 | ||
ok 1 | |||
1..1 | |||
it works now | |||
if that is verified as working | 15:35 | ||
please someone do a global s/require Test/use Test/ | |||
thanks! | |||
$ ./pugs -e 'ok(1); require Test' | 15:37 | ||
*** Error: No compatible subroutine found: &ok at -e at line 1, column 1 | |||
$ ./pugs -e 'ok(1); use Test' | |||
ok 1 | |||
1..1 | |||
jabbot | pugs - 2362 - * repair pad declarations... that makes | 15:38 | |
pugs - 2363 - * use() now happens at BEGIN time. | |||
stevan | autrijus: I will take care of the require Test -> use Test | 15:39 | |
autrijus: will use work in an eval? In other words can I implement a proper use_ok()? | |||
autrijus | yes, and yes | 15:40 | |
lol | |||
$ perl -e 'eval "use Test"; ok(1)' | |||
ok: plan before you test! at -e line 1 | 15:41 | ||
I stared at it for a few seconds | |||
unable to make any sense | |||
then I rememberd: | |||
$ pugs -e 'eval "use Test"; ok(1)' | |||
ok 1 | |||
1..1 | |||
stevan | :) | ||
autrijus | it's scary how the availability of the "use" statement suddenly makes pugs much more perllike in my mind. | ||
Juerd | grin | 15:42 | |
Does it have "no" yet? | |||
gaal_ | preluding Test would speed up the smoke somewhat | ||
r2363 smoke in progress | 15:43 | ||
autrijus | gaal_: actually, no, we need compilation | ||
storing a Test.imc alongside Test.pm | |||
gaal_ | for test rteliability? | ||
autrijus | gaal_: no, "pre" compilation :) | ||
gaal_ | am i gaal_? | ||
autrijus | or even a Test.pbc | ||
15:43
gaal_ is now known as gaal
|
|||
gaal | great, now there are two of me. | 15:44 | |
theorbtwo wonders if require should really import "is export" subs. | |||
autrijus | theorbtwo: currently "is export" is ignore | 15:45 | |
as we don't have namespaces yet ;) | |||
boogie says: I've found a strange bug in Pugs... | |||
autrijus | i.e. it's merely future proofing | ||
gaal | heh :) | ||
boogie | it will run forever with the latest SVN version: | ||
gaal | autrijus, any thought on hackarounding runInteractiveCommand's usage of an opaque process handle? | ||
boogie | sub test2 ($param) { return $param; } | ||
autrijus | gaal: huh? | 15:46 | |
boogie | sub test1 { my ($key); $key = test2($key); } | ||
test1; | |||
gaal | i want open-pipe to give a pid | ||
but runInteractiveCommand returns the tuple (stdin, stdout, stderr, prochande) | |||
where the last element is not a pid :) | |||
autrijus | boogie: verified. take away the return() and you're fine | ||
why do you want a pid | 15:47 | ||
gaal | p5 open| returns one | ||
boogie | autrijus: is it a bug? | ||
autrijus | boogie: yes | ||
gaal: I say we return an opaque object. | |||
called a Process or something | |||
that supports .kill | 15:48 | ||
gaal | i'm not sure the haskell Process handle supports kill - unless i'm mistaken that's only available in System.Posix..Process | ||
and runInteractiveCommand(/Process) is in System.Process | |||
and there's no way to extract a pid - no way that i foudn in the docs at least | 15:49 | ||
didn't dive into the soureces yet. | |||
anyway, int he unix world it makes perfect sense to have a pid | 15:50 | ||
even if it's not as encapsulated as a handle, that's what everything *is* eventually | |||
autrijus | hm you can terminateProcess | ||
gaal | and i can imagine some applications actually needing it | 15:51 | |
autrijus | yeah. | ||
gaal | what abotu arbitrary signalProcess? you can't do that. | ||
it's true that on win32 you want a process handle which isn't a pid... | |||
autrijus | yeah. | 15:52 | |
cross platformness is a pain :-/ | |||
gaal | perhaps we should indeed return an opaque handle, and add deep ugly methods that meddle with the haskell internals on each platform. | ||
....to return a pid when you want one | |||
etc. | |||
autrijus | *nod* | ||
at the worst case | 15:53 | ||
you can write the neccessary C code by hand | |||
to emulate platform specific behaviour | |||
and inline them via FFI | |||
that's how pugs swapped out its entire Char class | |||
via Unicode.hs | |||
gaal | for the whole thing (eg replace runInteractiveCommand), or just the pid accessors? | 15:54 | |
autrijus | the pid accessors | ||
and before you know, your code will be in GHC core :) | |||
gaal | :) | ||
autrijus | (like Unicode.hs now is) | ||
gaal | pugs.exe: examples/fp/fp.p6: openFile: does not exist (No such file or directory) | ||
autrijus | fixed | 15:55 | |
gaal | smoke up in a minute | ||
autrijus | hopefully not too red | ||
autrijus braces for impact | |||
gaal | anyone have any luck compiling p5.8 on msys btw? it's really sad having 5.6.1 w/o cpan :( | 15:56 | |
forum2.org/gaal/pugs/smoke-msys.html | 15:57 | ||
my network setup has begun sucking, so i can't actually view that myself :) | |||
autrijus | 10 unexpected successes! | ||
gaal | ah, a firefox restart helped. | 15:58 | |
autrijus | must be doing something correct | ||
help me untodo? | |||
I'll investigate the red | |||
jabbot | pugs - 2364 - * fix example path | ||
gaal | what color is unex success? :) | ||
nm, i'll peek in the yaml | |||
autrijus | yellow | ||
gaal | k, i'll do that, sed. | 15:59 | |
s/d/c/ | |||
funny, in undef.t, when using prove, the two yellow tests fail. | 16:04 | ||
stevan | gaal: did you make install? it might be using an old version? | ||
autrijus | yup | ||
gaal | i never made install :) | ||
oh! but it is some funny path issue, because from a different shell it works as expected. | 16:06 | ||
stevan | a fresh 'make optmized' pugs makes me sooo happy :) | ||
the require -> use change seems to be working fine, so I will be commiting it once this test run is done | 16:08 | ||
then i /have/ to do some perl5 work :( | |||
gaal | t/syntax/lf_in_list.t in particular is happy :) | ||
r2365 += 10 passing tests | 16:13 | ||
integral | pugscode.org <Overview Journal Logs> | smoke/win2k (occasional): xrl.us/fqum (4537/8, r2343), Mac OS X (62/4506, r2362), Linux (60/4482, 2267) | pugs.kwiki.org | 16:14 | |
Arathorn | are thoughts on threading in pugs completely on hold under @larry pitches up with some stone tablets on the subject for parrot? | 16:15 | |
autrijus | well we have async {} | ||
Arathorn is trying to imagine how much data would get shared (if at all) between threaded parrot VMs in a mod_parrot + Apache2 Worker MPM situation | |||
autrijus | if you want a set of semantics | ||
please write up a synopsis draft | 16:16 | ||
check in under docs | |||
gantrixx | is there a problem with the ghc yum repository? | ||
it seems to lock up on me when I try to install | |||
Arathorn will go check out async {} then :) | |||
thanks | |||
autrijus | ch.17 | ||
# svn.perl.org/perl6/doc/trunk/plans/...n_docs.pod | |||
if you want to work on S17 :) | |||
Arathorn nods. | |||
autrijus | Arathorn: we are using 5005 model now | ||
that will change. | |||
Arathorn | oh, okay | 16:17 | |
jabbot | pugs - 2365 - unTODO unexpectedly passing tests | 16:18 | |
autrijus | lexical context is now restored! | 16:21 | |
we may finally have some semblance of context | |||
r2366. resmoke? | |||
gaal | on it | ||
autrijus | danke | ||
stevan | r2367 - require Test -> use Test | 16:23 | |
autrijus: I just encountered a very odd bug | 16:25 | ||
pugs -e 'my $x = 0; say "before $x"; for 1 .. 5 { next if $_ > 3; $x = $_; } say "after $x";' | 16:26 | ||
dies with Error: cannot next() outside a loop | |||
autrijus | next() is utterly broken. | 16:27 | |
we don't have that yet. | |||
neither redo(). | |||
both are TODO | |||
stevan | ok | ||
well the odd things is it worked when I evaled it | |||
(I am trying to get a command line test to work) | 16:28 | ||
jabbot | pugs - 2366 - * restore lexical context. | ||
pugs - 2367 - changing all occurences of require Test | |||
stevan | perlbot nopaste | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
gaal | autrijus, i want to return four values from a prim. it's an internals-use-only prim, so i'm okay doing it positional, at least for now. my question is just, how do i return a perl-boxed version of a haskell ProcessHandle? | 16:29 | |
sorry, you didn't need the whole introduction to that Q :) | |||
pasteling | Someone at 67.186.136.119 pasted "This fails: stevan% pugs -e 'm" (24 lines, 551B) at sial.org/pbot/9671 | ||
stevan | that paste is mine :) | 16:30 | |
autrijus | gaal: look at AST.hs | 16:31 | |
see VSocked | |||
VSocket | |||
xerox | ve | ||
autrijus | and VThread | ||
gaal | ....of course, we can keep a global map inside pugs and onlty return a key :) | ||
xerox | Whoops, sorry. | ||
autrijus | then cargo cult | ||
gaal | most of my haskell is cargo cult ;) | ||
autrijus | stevan: error did not propagate up for. | 16:32 | |
I mean, `for`. | |||
./pugs -e 'for 0..10 { 1/$_ }' | |||
stevan | strange :/ | 16:33 | |
autrijus | no, it's just a bug :/ | ||
let me add a trapVal | |||
stevan | ok | ||
gaal | forum2.org/gaal/pugs/smoke-msys.html r2367 | 16:35 | |
ooh, 1 more unexok! | 16:36 | ||
autrijus | and a lot more successes | 16:37 | |
stevan: oh, no that is not the prob | 16:38 | ||
there is no bug her | 16:39 | ||
here | |||
stevan: next() was simply not invoked. | |||
when $_ is <= 3. | |||
gaal | autrijus, why did you need to implement instance Ord VSocket? where are sockets ordered? | 16:40 | |
autrijus | stevan: your sweeping 'use' change overwrote some of my fixes. | ||
gaal: all Val must be ordered because they can be in an array | |||
and we need to sort it. | |||
adehohum | Hi guys, is there an FAQ on how to submit new tests? I'm sure there's going to be something on the NNTP archive somewhere... | 16:41 | |
autrijus | gaal: this req will go away when we move to opaque obj | ||
adehohum: yes, read t/README :) | |||
gaal | autrijus, then how come VThread doesn't do that? a bug? | ||
autrijus | gaal: I think thread already derive ord | 16:42 | |
gaal | ah | ||
ok, i think i see. | |||
adehohum | OK, it doesn't say in the 6.2.1 readme, presumably the implication is that I should get the latest out of svn and read a more recent readme... | 16:44 | |
actally it says more or less "ask on #perl6" :) | |||
autrijus | yes :) | 16:45 | |
adehohum | ok doke will do, thank you! | ||
autrijus | so, you begin by announcing what tests you are doing | ||
then give me your mail addr | |||
and I'll make you a committer | |||
then you check in the test using svn or svk | |||
that's all :) | |||
adehohum | I have had a go at subroutine parameter traits | ||
so I've made t/subroutine/sub_parameter_traits.t (original huh) | 16:46 | ||
and I'm [email@hidden.address] | |||
stevan | autrijus: so is the error propagating correctlly? | 16:47 | |
ah, I see , the error is in $! | |||
ok I will re-think my tests after lunch :) | 16:48 | ||
autrijus | stevan: so be sure to svn up | 16:49 | |
I reverted your time travels | |||
r2368 | |||
stevan | time travels? | 16:50 | |
ahh, I see | |||
autrijus | stevan: your sweeping require->use change brought tests to several revisions ago | ||
which would be a minor disaster if I don't have svk :) | |||
but fortunately I do, so that's all fine | |||
stevan | thats odd, I svn uped right before I did it | 16:51 | |
autrijus | weird. maybe you somehow touched the files in .svn | ||
stevan | oh, i see | ||
autrijus | adehohum: invitation is on its way to you | ||
stevan | I got r2365 then committed, which landed as r2367 | ||
autrijus | welcome aboard! | ||
no, that is not it | 16:52 | ||
anyway, don't worry | |||
stevan | odd. ok, I will just rm -rf pugs and svn up to be sure | ||
adehohum | cool, thanks autrijus | ||
gaal | autrijus, heh, ProcessHandle really wants to be opaque: in the ghc implementation, it's ifdeffed as either a CPid or a Word32. in any case, it doesn't... uh, implement Show, so how do I get it to do Ord and even Eq? | 16:54 | |
...without hacking ghc itself of course | 16:55 | ||
autrijus | uh | 16:56 | |
type VProcess = ProcessHandle | |||
instance Show VProcess where show _ = "{process}" | |||
instance Ord VProcess where compare _ _ = EQ | 16:57 | ||
gaal | a hardcoded string? | ||
autrijus | how else? | ||
gaal | doesn't that make all PHs equal? | ||
autrijus | only for sorting purposes | ||
gaal | hm | ||
autrijus | or you can say | ||
compare _ _ = LT | |||
or something. improvise | |||
gaal happily improvises. i hope sorting algos terminate though inlight of things that never sort :) | 16:58 | ||
jabbot | pugs - 2368 - * revert Stevan's time travel. | ||
autrijus | sure they do :) | 16:59 | |
(pugs uses mergesorting) | |||
yo | 17:00 | ||
Corion | autrijus! | ||
gaal | (wasn't there a segfault in perl once when user-defined comparators didn't satisfy some basic invariant?) | ||
Corion backloggeth | |||
autrijus | Corion: many exciting news! | ||
use, BEGIN, last if 1; | |||
Corion | Yay. BEGIN is there! | ||
autrijus | gaal: that was when it's qsort | ||
Corion | BTW, there was a short idea of renaming LWP(::Simple) to something like Network:: or whatever. I'm bad at naming and don't think it's such a good idea, but others might have good ideas | 17:02 | |
gaal | there's sure to be something better than LWP. | ||
Corion starts a smoketest | |||
gaal | what's bad about Network, anyway? | ||
Corion | gaal: I'm not convinced that Network:: is such a good name, especially for file:// URLs :) | ||
autrijus | file:// is also on the network. | 17:03 | |
I think Net:: is fine too, really | |||
Network:: looks... haskellish | |||
Corion | But after I've read URI::URL, I wonder if Pugs shouldn't use file:// instead of File::Spec anyway... The smoke matrix generator still messes up links to synopses somewhere | ||
autrijus | Network:: System:: Control:: Data:: | ||
Corion | I find that having Net:: and Network:: as two competing namespaces would be bad | 17:04 | |
autrijus | nod. | ||
Corion | ... and Network:: just for LWP-stuff is also not good IMO | ||
... because there will be other network stuff that does not fit well with LWP | |||
gaal | quick syntax Q: when i say data ... deriving ( ..), it's to *limit* what i derive, right? | 17:05 | |
metaperl_ | Limbic_Region, I just saw your pm post of powersets... good job | ||
wilx | Hmm, iirc if you don't say that you don't derive anything. | ||
So it imho it is to enumerate what you derive. | 17:06 | ||
autrijus | gaal: no. | 17:07 | |
gaal: there are some derivable classes. | |||
if you say deriving(), you automagically gain those instances. | |||
but you can add more instances by using the `instance` directirve | |||
you also need to add `instance Show Foo` by yourself if you want to customize how Foo is shown | 17:08 | ||
`deriving (Show)` means "somehow generate a Show instance for me" | |||
jabbot | pugs - 2369 - * add a line saying that smoke.html is s | ||
Corion | Aaah. That reminds me - I have to add another test for 1 % $x, where $x is not a VRat, but a VProxy pointing to a VRat. How do I create a VProxy in Pugs? | ||
Arathorn | ajs's mail on p6l in the 'thunking semantics of :=' thread is rather illuminating about p6 threading assumptions | 17:09 | |
i guess ithreads are here to stay - but much lighter in parrot (at any rate) | |||
PerlJam | anything but pthreads | 17:11 | |
wilx | What's wrong with POSIX threads? :) | 17:14 | |
autrijus | Corion: my $x := rat | ||
Limbic_Region | thanks metaperl_ - it is all stevan's fault | 17:15 | |
metaperl_ | one question: is "Ref" mean coderef? | ||
you sub returns Ref | |||
Corion | metaperl_: It returns a reference then, obviously | 17:16 | |
metaperl_ | you know multi subs might've been cleaner than a hash indexed by numbers | ||
Corion | "Code" would be a reference to code. "Ref" would be a reference to a reference. | ||
... at least that's what Perl5 does. | |||
r2369 - datenzoo.de/pugs/win2k.html | 17:19 | ||
... some new failures, something seems to have broken compilation of some examples. | |||
Hah. My test code exhibits the bug, just as I suspected :( Where should I put number handling for VProxy objects ? Is there any central point that already handles this? Like op2Num ? | 17:21 | ||
Limbic_Region | metaperl_ - I thought about using multi methods, but the point was to show how easy it was to transition p5 to p6 | ||
Limbic_Region is currently only half paying attention btw | |||
the returns <type> isn't even necessary btw - just showing off a bit | 17:22 | ||
gaal | argh, VProcess wants to do Typeable, but how do i get it to do that? | ||
Limbic_Region wanders off to get lunch | 17:24 | ||
autrijus | gaal: just deriving Typeable | ||
gaal | but it's a type, not a data .. er.. constructor | 17:25 | |
autrijus | you can only derive classes for types. | ||
in haskell, types belong to classes | |||
not data | |||
gaal | should i do what's done for VRule? | 17:26 | |
autrijus | yeah. | ||
gaal | k | ||
autrijus | well, you can also do | ||
newtyp VProcess = MkProcess ProcessHandle | |||
newtype VProcess = MkProcess ProcessHandle | |||
deriving (Show, Typeable) | |||
or just derive typeable | 17:27 | ||
gaal | how do i then make it derive Typeable? | ||
ah ok | |||
autrijus | I think it gets done automagically. | ||
jabbot | pugs - 2370 - * add the "Pad" type to carry lexical pa | 17:28 | |
pugs - 2371 - * repair parrot | |||
pugs - 2372 - * to get eval to work, use our() not my( | |||
17:29
metaperl__ is now known as metaperl_
|
|||
autrijus | Corion: oh, just to say: async.t worksforme | 17:33 | |
Corion: so I made the todo conditional to platform | |||
Corion | autrijus: Ah - I don't know if it worksforme now, but we'll see. I think async.t worksforme too, but async-sleep.t doesn't, which is no surprise. | 17:34 | |
(smoke currently running) | 17:35 | ||
jabbot | pugs - 2373 - * repair die.t by giving out sensible $! | 17:38 | |
pugs - 2374 - * async.t worksforme, so assume it's a w | |||
Corion | ah, no - async.t "correctly" fails for me on Win32, as Haskell/GHC does seem to differentiate between userspace and OS threads there. | 17:46 | |
r2373 - datenzoo.de/pugs/win2k.html | |||
autrijus | Corion: I wonder if you change forkOS to forkIO | 17:53 | |
whether it would work | |||
Corion goes looking | |||
The code already does: (if rtsSupportsBoundThreads then forkOS else forkIO) -- so that's why it does work for you and doesn't for me ;) | 17:54 | ||
autrijus | right, so try forkIO for all | 17:55 | |
Corion | autrijus: Just trying that ;) | ||
Hmmm. Still failing | |||
autrijus | keep it that way then | ||
may be a win32 deficiency | |||
does system+ithreads on win32 work? | |||
in p5 | 17:56 | ||
I thought it blocks as well | |||
Corion | autrijus: I never tried/looked. Win32 has real threads, so iThreads should/could work. But who knows ... | ||
Corion reverts to rtsSupportsBoundThreads | |||
autrijus | I don't think it'd work... you can try with fork() | 17:57 | |
they are the same thing | |||
so on win32, try fork, system() from one, and see if it blocks parent | |||
jabbot | pugs - 2375 - * fix a misuse of $in | 17:58 | |
gaal | okay, i did some copycatting, but now saying "VProcess phand" to try and convery a ProcessHandle to a VProcess doesn't work: | 18:00 | |
Couldn't match `VProcess' against `ProcessHandle' | |||
Expected type: VProcess | |||
Inferred type: ProcessHandle | |||
autrijus | gaal: VProcess is a newtype? | 18:01 | |
gaal | how to i actually implement the cast? | ||
yes | |||
autrijus | you use MkProcess | ||
VProcess (MkProcess phand) | |||
gaal | Is that a convention? by analogy, i'm looking for the definition of MkThunk and not finding it. | 18:02 | |
unless it's instance Thunk.Class VThunk where force (MkThunk c) = c | |||
autrijus | src/Pugs/AST.hs:newtype VThunk = MkThunk (Eval Val) | 18:03 | |
here MkThunk constructor has typ | 18:04 | ||
MkThunk :: Eval Val -> VThunk | |||
oh btw. | 18:08 | ||
if someone is looking for small Parsec task | |||
implementing #line would be fun | |||
jabbot | pugs - 2376 - * make progressive_powerset use some new | ||
autrijus | just parse for #line at Statement level | ||
and use setPosition. that's all | |||
pasteling | "gaal" at 192.115.25.249 pasted "wtf suddenly started happening? right after make clean" (6 lines, 322B) at sial.org/pbot/9672 | 18:09 | |
autrijus | gaal: no idea. (!) | 18:10 | |
try a clean build? | |||
gaal | i did! | ||
will clean-mightily the tree. | |||
oh: i see. 'make' w/o optimized is broken again. | 18:12 | ||
autrijus | you can't mix optimized with unoptimized. | 18:13 | |
but. journal up. | |||
I'll sleep now. see ya! | |||
gaal | no, i just did 'make' w/o anything. | ||
night. | |||
thanks for the help! | |||
autrijus | & | 18:14 | |
gaal++ | |||
theorbtwo | G'night, autrijus. | ||
gaal | src/Pugs/AST.hs:1:0: | 18:17 | |
Data constructor `Pugs.AST.Pad' is defined in the hs-boot file, but not in the module | |||
am i the only one gettign this? | 18:18 | ||
i'm hacking on AST but i don't think my changes relate to this. | |||
ah, sorry, actually they do | |||
cancel that | |||
:) | |||
nothingmuch | anyone with windows around? | 18:24 | |
gaal | me | ||
nothingmuch | could you reload that page, see that the PNG of the logo isn't fubar? | ||
gaal | it's not the same color as the rest of the banner, if that's what you meant | ||
nothingmuch | lighter? darker? white? | 18:25 | |
gaal | you might wanna alpha-channel its background to avoid caring about that | ||
nothingmuch | i did, but IE displays it white | ||
gaal | it's lighter than the wine-red. | ||
ah, right, i forgot, ie sucks. | |||
castaway | yup | ||
oh, too slow | |||
castaway gives nm a linux-ie | 18:26 | ||
gaal | do the site in flash :-p | ||
what's a linux-ie? | |||
a linux that drinks stout? :) | |||
nothingmuch | fsck | ||
gaal: or SVG (That's what the logo is in) | |||
opera | |||
why can't they properly support pngs? | |||
i think i'll go for the javascript/png alpha hacks | |||
castaway | crossover office and IE | ||
gaal | ahhh | 18:27 | |
nothingmuch | okay, back to alpha | ||
looking good with khtml + ff | 18:28 | ||
gaal | no, have your page-generating script imagemagick the bg to the same color as the bg. | ||
nothingmuch | gaal: i did that, but then in one browser (i forget which) it's too dark | ||
gaal | yes, looking good now for me too (ff/win) | ||
nothingmuch | so then i came back to you, and you said 'too light' | ||
so i checked with the other, and indeed it was | |||
gaal | urr? then don't pngcrush the image | ||
castaway | and opera ? | ||
nothingmuch | maybe someone is doing color "correction" | ||
opera is for weenies | |||
;-) | |||
could you guys check the png alpha stuff with opera/msie? | 18:29 | ||
gaal | you *could*, of course, make the whole banner an image :) | ||
castaway thwaps nm. ;) | |||
nothingmuch | eek | ||
castaway | url ? | ||
nothingmuch | i want alpha | ||
gaal | white on msie. | ||
nothingmuch | nothingmuch.woobling.org/kelaa/demo...re.html.he | ||
white... peh | |||
gaal | (View This Page in MSIE)++ | ||
nothingmuch | okay, i'll copy a fix that tells msie to load it with the alpha blending image loader | 18:30 | |
gaal | i have the weirdest bug in ff now, though. | ||
opening a new tab, the focus gets left behind in the last tab | |||
eg in an edit box | |||
instead of popping up to the location bar. | |||
also, quicksearch broke. | 18:31 | ||
gaal hates computers | |||
castaway | address unavailable | ||
nothingmuch | oi | ||
gaal: could you reload with msie? | 18:33 | ||
castaway: what does that mean? | |||
castaway | no route to host, generally | ||
gaal | i see no image at all now :) | ||
nothingmuch | huraah! problem solved | ||
castaway | *g* | ||
gaal | what, you just punt on the image for msie? that effectively means nobody will see it, you know | 18:34 | |
castaway | ah, got it.. what am I looking for? | 18:35 | |
nothingmuch | ok, how about now? | ||
castaway: the logo on the top left | |||
is it blended well into the red? | |||
gaal | ff good, msie white | 18:36 | |
gaal looks for food. bbiab | |||
castaway | Im gonig to say yes, not that I know what that means : the background of it is all the same red as the top stripe | ||
nothingmuch | damnit | ||
what msie? | |||
castaway: yes, that is good | 18:37 | ||
is the layout ugly somewhere? | |||
castaway | nope, looks lovely | ||
(Opera 8.0) | |||
nothingmuch likes it when browsers behave | |||
castaway too | |||
nothingmuch | gaal: homepage.ntlworld.com/bobosola/pngtest.htm | 18:40 | |
gaal | 6.0smth | 18:41 | |
nothingmuch | does the solution fix the problem on that page? | ||
gaal | ah, it's js | 18:43 | |
blocking that in msie | |||
./pugs.exe -e 'my @r=Pugs::Internals::runInteractiveCommand("ls"); @r[1].readline.say' # works | 19:03 | ||
./pugs.exe -e 'my @r=Pugs::Internals::runInteractiveCommand("cat"); say @r[0]: "moose"; @r[0].close; @r[1].readline.print' # also works | 19:04 | ||
cognominal | print my $a; # does not work. I would expect 'my' to work like a function as it does in Perl5 | 19:22 | |
gaal | cognominal: there's a comment in AST i think about how my should not be statement level :) | 19:23 | |
cognominal | ho, I remember now. I already have raised the question. | ||
sorry | 19:24 | ||
cool, "print %ENV" works now | |||
gaal | btw better call it %*ENV usually | 19:26 | |
nothingmuch | gaal: did enabling js fix it? | ||
gaal | though %ENV ought to work too. | ||
nm, dunno, i didn't want to get sidetracked - it was disabled for a reason :) | |||
maybe there's someone else on windows online now? | |||
cognominal | only a obfuscator would define a package based %ENV... | 19:27 | |
in fact I would like a pragma to forbid that. | |||
gaal | gee, i wonder if there are any camelfolks who are also obfuscators :) | ||
nothingmuch | anybody with IE+JS want to be a guinea pig? | ||
gaal | "folks"? i can't type :) | ||
Jonathan_ | Obfuscation is fun. :) | 19:30 | |
cognominal | Jonathan_: I know that, I maintain with BooK paris.mongueurs.net/aplusplus.html | 19:31 | |
I accept Perl6 submissions... | |||
gaal | asavige already has something amazing | 19:32 | |
did you see it? it's somewhere in examples/ | |||
cognominal | madgolfer.p6? | ||
gaal | yeah | ||
it's not an $A++ but it's still insane :) | 19:33 | ||
cognominal | :) | ||
Andrew Savige is the auther of this $A++ : $A-=$----$----$----$----$----!$-; | 19:34 | ||
Jonathan_ | Well, maybe I'll have to have a go at some..*after* the exams. | ||
BTW, my daily Pugs Win32 builds have been running smoothly for a few days now along with daily WinXP smoke testing results being put up. | 19:37 | ||
www.jwcs.net/~jonathan/perl6/ | |||
gaal | cool | ||
Jonathan_ | Not sure if there's a list of smokes anywhere that it should go on or anything. | 19:38 | |
gaal | see the /topic :) | 19:39 | |
also, feel welcome to make sucha a list in the wiki | |||
actually, there *is* a list, but it's prolly out of date. | |||
feel free to update it then :) | |||
Jonathan_ | OK. | 19:40 | |
jhorwitz | nothingmouch: still need that guinea pig? | 19:41 | |
gaal | anyone here run make test on a machine with HT? | ||
nothingmuch | xrl.us/fv4x <-- add this too | ||
gaal | pugs doesn't go over 50% but i don't know if that means anything. | ||
nothingmuch | jhorwitz: yah | ||
gaal dislikes shortened URLs | 19:42 | ||
nothingmuch | nothingmuch.woobling.org/kelaa/demo...re.html.he | ||
is the PNG displayed properly when the js is fixed | |||
Jonathan_: if you want to feed my ego place them in chronological order ;-) | |||
Jonathan_ | Am I missing something, or is the Pugs wiki not linked to from pugscode.org? | 19:43 | |
jhorwitz | nothingmuch: white background | 19:44 | |
nothingmuch | damnit | ||
nothingmuch curses microsoft for existing | |||
ok, one more trial | |||
gaal | hard to curse something for not existing | ||
nothingmuch | ... | ||
reload | 19:45 | ||
gaal | nm: is there any use for keeping a timestamp on every test in the tests.yml? just notices all this info | 19:47 | |
makes it hard to diff | |||
nothingmuch | gaal: kungfuftr asked for that | ||
i can take it out, make it optional, whatever | |||
jhorwitz: any change? | 19:48 | ||
jhorwitz | nothingmuch: bingo | 19:49 | |
nothingmuch utters "finally" | 19:51 | ||
Limbic_Region looks at lukes response to the while blocks and formal parameters question and tries really hard to understand but fails to do so | 19:53 | ||
gaal | just got the sleepies, so i ci'ed what i have | 19:54 | |
if anyone wants to write tests for p5-like pipe open, or also open with explicit mode, please do so | 19:55 | ||
the implementation of both will be in perl6 on top of the new prims of r2377 | |||
nothingmuch goes to write more money making projects =( | |||
sowwy | |||
gaal | also if anyone wants to write an open3 wrapper... :) | ||
k, i'm off to bed. night all! | 19:56 | ||
nothingmuch | .... or better yet: port IPC::Run, and give it good pty support | ||
ciao! | |||
and write Expect, implemented with IPC::Run | 19:57 | ||
gaal | nm, tell me more, i''ll se about implementinf that | ||
oh | |||
maybe not :) | |||
later. zzz& | |||
nothingmuch | so that no one ever ever gets it wrong later | ||
heh =) | |||
Jonathan_ | Added my tinder to the Wiki...any objections to me adding a link to my Win32 Pugs build on the PugsDownload page, provided I maintain it properly this time? :) | ||
nothingmuch | i think you can do it | ||
ciao! | |||
Jonathan_ | bye gall | ||
nothingmuch | Jonathan_: yah, it's a wiki | 19:58 | |
do as you please =) | |||
the more content the merrier, as long as it's not too much per page | |||
jabbot | pugs - 2377 - runInteractiveCommand and openFile primi | ||
Jonathan_ | Cool, it's in. | 20:04 | |
mj | today test-diff wiki.kn.vutbr.cz/mj/index.cgi?diff_...vision=1.8 | 20:10 | |
nothingmuch | mj++; # pretty | 20:11 | |
want to implement it a Test::TAP::Model visualizer? | |||
Test::TAP::HTMLDelta? | |||
mj | diff plugin is old Kwiki best feature | 20:14 | |
no free time for Pugs this week, :-( | |||
Wikipedia diff is the best, IMO. | 20:15 | ||
ninereasons | since somewhere around r2361, the shell version of pugs has not been working. | 20:17 | |
sub hello ($x) { return "hello $x"; } | |||
say hello 'world' | |||
*** Error: No compatible subroutine found: &hello | |||
the same thing at the commandline works fine | 20:18 | ||
(or in a script, etc.) only broken in the shell. | |||
nothingmuch | probably related to autrijus's work today | 20:19 | |
can you try to test it with gaal's patch? | |||
open pipe to pugs | |||
and then play with it's shell? | |||
ninereasons | nothingmuch, what/where is gaal's patch? | 20:20 | |
nothingmuch | see backlog | ||
i don't know the details | |||
ninereasons | ok, thanks. | ||
nothingmuch | but he asked for tests | ||
nothingmuch can't really look into it now =( | 20:21 | ||
ninereasons | that's okay, I'll take do the work :-) | 20:22 | |
Corion | Grrr. People renaming files should check if they break some tests by it! | 20:25 | |
nothingmuch | hola Corion | 20:26 | |
Corion | Hi nothingmuch | 20:27 | |
cognominal | rafb.net/paste/results/QihgyN66.html # this is weird; a two dimensional array seems to be garbaged on return | 20:29 | |
I can probably simplify it more | 20:30 | ||
mj | test.wikidev.net/Pugs_tests_result_...;oldid=766 | 20:32 | |
cognominal | also what is the routine used to print in the read eval loop. It is better than a straight print | 20:33 | |
pugs> my @b = [ < 1 2 3 4 > ], [ 5 ]; | |||
(('1', '2', '3', '4'), (5)) | |||
pugs> print @b | |||
12345bool::true | |||
theorbtw1 | print @b.perl | 20:34 | |
cognominal | thx | 20:35 | |
poblem is that (('1', '2', '3', '4'), (5)) evaluates in a flat array... | 20:37 | ||
bug! | |||
jabbot | pugs - 2378 - fp/ was renamed to functional/ | 20:38 | |
pugs - 2379 - VProxy variables can cause a Haskell err | |||
20:40
theorbtw1 is now known as theorbtwo
|
|||
Corion | Is there any Sxx or Axx or Exx about $?CALLER::POSITION? | 20:43 | |
... I'm especially interested in the line/column position, as it seems to be one item off. | 20:44 | ||
nothingmuch | S06 i think | ||
but not about POSITION | |||
it's about CALLER:: | |||
$?POSITION is, afaict a pugs ext | |||
Corion | Ah... | ||
Anyway - some more failing tests committed, including one against the interaction between #line and $?CALLER::POSITION | 20:45 | ||
... another smoke run whilst I'm away :) | |||
jabbot | pugs - 2380 - Added tests for $?CALLER::POSITION again | 20:48 | |
mj | g'night, test.wikidev.net/Pugs_tests?action=history | 20:55 | |
Corion | ... and somebody, again, broke the automatic retrieval of the svn version into the Pugs build. | 21:00 | |
mugwump | witchhunt time! | 21:02 | |
hey ingy_ | |||
was it you? | |||
ingy_ | nosir | ||
mugwump | ingy, I've got some more perldoc stuff, but I can't commit any more, I think because I never had an svn.kwiki.org account | 21:13 | |
ingy | mugwump: msg me a passwd entry | 21:21 | |
I'll give you commit access for Perldoc | 21:22 | ||
QMario | Can someone tell me how I can get a value out of a hash? | 21:24 | |
How do I use <STDIN> to get a value out of a certain hash? | |||
ingy | QMario: you can't. hashes are write only in Perl6 | 21:25 | |
just kidding ;) | |||
QMario | What do you mean? | 21:26 | |
What I want to do is to create a program that stores a "phone book" in a hash. Then I want to ask th person who is looking through the phone book, who they want using <STDIN>. How do I do that? | 21:27 | ||
Can any of you ask this question in #perl for me? | |||
mauke | hahaha | ||
why? | |||
QMario | Heh, I'm banned. | 21:28 | |
mauke | why? | ||
QMario | For standing up for Christ. :-D | ||
mauke | well, that's your problem | 21:29 | |
sounds like homework anyway | |||
QMario | For me? | ||
nothingmuch | my cat is crazier than autrijus | 21:30 | |
he likes halva | |||
and ice cream (but not frozen yoghurt) | |||
obra | 21:32 | ||
This channel really has nothing to do with perl5, qmario | 21:33 | ||
nothingmuch | QMario: i think you should learn to separate between perl 5, perl 6, and religeon | ||
and for the mean while, till your ban is lifted, either use #perl on irc.perl.org, or something like perlmonks.org (website), or [email@hidden.address] (mailing list) | 21:34 | ||
sorry, wrong mailing list address | |||
lists.perl.org/showlist.cgi?name=beginners | 21:35 | ||
you could also get one of Randal Schwartz's books, for perl beginers | 21:36 | ||
or Simon Cozens' one, which is available online | |||
"Begining Perl" or something like that | |||
are you listening? | 21:37 | ||
mauke | Beginning Perl: learn.perl.org/library/beginning_perl/ | ||
Corion | #perl bans people according to the rules of irc: | 21:43 | |
1) Somebody is drunk | |||
2) Somebody took the wrong drugs | 21:44 | ||
nothingmuch | does 1) apply to the op or the banned person? | ||
Corion | nothingmuch: Any person. Need not be on irc. | ||
cognominal | blue cubes from the fridge are ok, I suppose | ||
nothingmuch bans corion because someone in ireland *must* be drunk ATM | |||
Corion | nothingmuch: You're free to try on #perl6 :) | 21:45 | |
nothingmuch | =) | ||
i like the fact that anarchy seems to actually work for this project | |||
in all it's aspects | |||
Corion | Even NathanYJ left us :) | 21:48 | |
nothingmuch | yeah | ||
Corion | (and I've mostly shut up about my more extreme viewpoints too :) ) | ||
(... but I'm still waiting for my chance to push URI::File as the way to handle filenames in Pugs/Perl6) | |||
nothingmuch | i think we should have a grand unified resource manager | 21:49 | |
URI | |||
File::Spec | |||
IO::AtomicFile | |||
that knows to be: | |||
Corion | nothingmuch: Stop that J2EE / P5EE talk :) | ||
nothingmuch | it's not that it's all of them at the same time | ||
it's just a big hub of convenience that knows to connect them all for you | |||
mauke | like IO::All? | ||
nothingmuch | sort of | 21:50 | |
but less drunk | |||
mugwump | heh | ||
Corion | The IO::All magic is too powerful by default. | 21:51 | |
nothingmuch | my grudges with IO::All is that it's a bit too dwimmy | ||
and it is not 100% flexible | |||
or at least doesn't seem to be | |||
actually, you know what mauke, reading more carefully (and not just seeing examples) i think IO::All is saner than I initially thought | 21:54 | ||
Corion | nothingmuch: The File/Directory abstraction as a lazy tree is nice. The implicit spawning of a (http) server is incredibly dangerous | 21:56 | |
nothingmuch | true | ||
, | |||
mugwump | no http server, just a socket server | 21:59 | |
That one-line http server in the docs isn't exactly standards compliant ;) | |||
nothingmuch | i'd like an IO::All::Safe thingy | ||
Corion | mugwump: Still bad enough :) | 22:00 | |
nothingmuch | that can only read things | ||
mugwump | IO::Few | ||
nothingmuch would like a way to just open $fh, $user_input; without worrying ever | |||
(if read permissions aren't a problem" | |||
without a file like "foo|" being a problem | |||
and with foo.org/blah working | |||
and so on and so forth | 22:01 | ||
nothingmuch looks | |||
E_NO_SUCHMODULE IO::Few | |||
mugwump: what was it we talked about a while ago? | 22:02 | ||
i remember having something to tell you, but i can't recall the context | |||
ingy | nothingmuch: I'm working on a strict mode for IO::All | 22:16 | |
nothingmuch | ingy++ | ||
ingy | use IO::All -strict; | 22:17 | |
it simply exports a constructor that creates objects that have the strict attribute set | |||
and then all operations check that attribute for whether to be strict. | 22:18 | ||
I will likely have a way to force all IO::All objects to be strict | |||
but module authors should not set that | 22:19 | ||
so the strictness is sort of lexically scoped | |||
of course operations that gen new IO::All objects will inherit the strictness bit | 22:20 | ||
so it's not really lexical, but it should give you enough rope to do what you need | 22:21 | ||
Dave Rolsky (autarch) gave me that idea. It's a good approach I think | 22:22 | ||
Limbic_Region | stevan ping | 22:37 | |
QMario | Sorry for not responding in a long time. | ||
Limbic_Region | question - if you were porting a p5 piece of code to p6 that required regex support (that could easily be done with junctions instead) - would you show off the power of junctions or use p5 regexen? | 22:43 | |
keeping in mind it is purely for others to be exposed to all the great work of Pugs | |||
nothingmuch | junctions =) | 22:48 | |
ihb | If i have a Perl 5 class, can i use that as a base class for a Perl 6 class? | ||
nothingmuch | ihb: my understanding is that yes, unless you want to have opaque type goodness | ||
p6 will still support blessing | |||
mugwump | There's no real reason why it can't be possible for an object to be both a blessed hash and have opaque properties... | 23:21 | |
nothingmuch | good point, actually | 23:22 | |
but it's likely to cause some confusion | |||
mugwump: backlog up a bit | 23:23 | ||
mugwump | I'm not sure what we were talking about, nothingmuch. Maybe someone's logging this channel? :) | 23:24 | |
nothingmuch | p'raps | ||
i mean, yes | 23:25 | ||
p'raps i can find it | |||
mugwump | maybe you found some cheap copies of Infected Mushroom CDs? :) | 23:26 | |
nothingmuch | nope, sorry | ||
mugwump | blast. | ||
nothingmuch | haven't been in a cd store for ages | ||
damnit, i can't remember what I wanted to say | 23:27 | ||
but i remember i worked hard trying to say it | |||
oh! | 23:28 | ||
Set::Object has a weird bug | |||
i'm not exactly sure how it surfaces | |||
but when you '-x _' after another test, some Set::Object sub is invoked | 23:29 | ||
and says that blah blah blah is not a Set::Object | |||
try to run S::O and IPC::Run in the same script | 23:30 | ||
Limbic_Region | ok - I need some junction help | 23:36 | |
if I have any( @foo ) eq any( @bar ) to start from and the answer is true, how can I find out which item matched? | |||
nothingmuch | Limbic_Region: you can't | ||
afaik | |||
Limbic_Region | not even with another junction? | 23:37 | |
nothingmuch | in a boolean at least | ||
Limbic_Region | forget the test | ||
that was to start from | |||
nothingmuch | i would like to say ($j = all(@foo) eq all(@bar)); but i'm not sure that works | ||
from there you can call junction methods on $j | |||
i forget their names | |||
lets read some tests in t/junctions | |||
Limbic_Region | yeah |