6.2.2 is airborne! | pugscode.org <Overview Journal Logs> | pugs.kwiki.org
Set by autrijus on 1 May 2005.
lightstep triple! 08:50
10:02 chady is now known as chady_
Corion r2715 - datenzoo.de/pugs/win2k.html - 4761 ok, 48 failed + 1 segfault (YAML) 10:18
meppl guten morgen 11:22
kungfuftr schwine-hundt! 11:31
Juerd kungfuftr: Just in case you don't realise, that's very offensive. 11:35
And extra because it's spelled terribly.
osfameron If you want to respond with some comedy German, you are probably better off with the more neutral 11:44
"Wie komme ich am besten zum bahnhof"
on the basis that (in the UK at least) that's the only phrase that people remember from school 11:46
Odin- Ich bin ein Kugelschreiber! 11:54
pjcj Lumpi ist mein Hund! 12:00
mauke Das Salz verzehrt den Leib des Mohren. 12:04
pjcj Ich verstehe nur Bahnhof! 12:06
kungfuftr Juerd: i know... and my german's incredably rusty 12:17
stevan iblechbot: Net::IRC ... very nice :) 13:12
iblech++ # Net::IRC 13:14
iblech ?raw PRIVMSG #perl6 :Thanks, Stevan :) 13:15
blechbot6 Thanks, Stevan :)
stevan blechbot6: hello
iblech ?uptime
?seen stevan 13:16
:)
stevan iblech: thats so cool
iblech It's even using some kind of OO :)
stevan yes I saw
home-made dispatch table :)
yummy
kungfuftr right... more perl jobs available
iblech And it tracks its status (the channels it joined, its nick, etc.) 13:17
stevan iblech: persistently? 13:19
iblech No, only in-memory currently. 13:20
stevan iblech: examples/naive_bayesian/naive_baysian.p6 has some primative load/store hash functions you could use (if that would work) 13:21
it just writes a tab delimited file
iblech That'll work, I think. 13:22
?quit shutdown
Limbic_Region let's try this again 13:38
salutations all
Jonathan_ Hi Limbic_Region :) 13:39
stevan howdy L~R
Limbic_Region has been busy with $work and $house to notice much of what is going on 13:40
autrijus didn't get to journal up yesterday - so what's new and exciting? 13:41
stevan Limbic_Region: iblech implemented Net::IRC
Limbic_Region I saw the the p6 bot 13:42
is it in examples?
iblech examples/network/seenbot.p6
Limbic_Region cool - I might hack on that a bit 13:43
Limbic_Region is feeling overwhelmed to start anything original today
hmmm - there should be a Config:: module to make the config stuff better 13:46
iblech - got a Config:: module preference? 13:47
iblech Config::Tiny
kungfuftr Config::General
Config::Any also not bad
Limbic_Region ok - will give Config::Tiny a shot - I am more of a Config::IniFiles sorta guy but with p5 regexen and multi-level datastructures - building a Config:: module shouldn't be too hard 13:48
wish me luck
iblech FYI, a Perl 6 (OO) port is at tpe.freepan.org/repos/adamk/Config-...ig/Tiny.pm 13:49
Limbic_Region oh
um - so does OO work now? 13:50
iblech no
Limbic_Region oh, so that's a p6 implementation when "we get there"
I will writting OO before OO existed then 13:51
woooo hoooo
iblech :)
gaal L~R, if you only need to read, consider using yaml
that works now :)
though not on win32
Corion gaal: BTW, does Pugs still build on mingw for you? I patched in some stuff to make setEnv and getProcessID work, but ... 13:52
gaal Corion, since i made it build on cygwin, i hadn't given msys a try. should i?
gaal does
Corion gaal: I don't know how badly they differ. I think my patches only affect non-Posix stuff, and I'm not sure about if msys has more POSIX than Win32 13:53
gaal they all build with undef HAVE_POSIX, if that's what you mean. 13:55
Corion gaal: That sounds good then, yes. And no crash because of SetEnvironmentVariableW being not linked ... 13:56
Now I merely need to find out how to make changes to %ENV visible in the Pugs process. Likely that is because getEnv is not declared unsafe. 13:57
gaal didn't that already work on unix?
Corion gaal: It doesn't on Win32.
And I did not find any test that actually did %*ENV<FOO>='bar'; is(%*ENV<FOO>,'bar'); # and the one I wrote fails for me. 13:58
gaal what do people on unix say? has it never worked? 13:59
does a minimal haskell program to write to env work? on both platforms? 14:00
stevan pugs -e '%*ENV<foo> = "bar"; say %*ENV<foo>' # print 'bar' 14:01
on OS X
Corion stevan: Likely, my faked setEnv does not have the same signature/declaration/magic as the Prelude setEnv 14:02
On Win32, setting it within the process doesn't work, but child processes see the change
gaal Corion, is that GHC's fault? 14:03
Corion gaal: I guess it's more my fault of not declaring the stuff properly, so that it doesn't get cached. 14:04
gaal why is the implementation even different though? sorry for being slow, maybe i need coffee :) 14:05
autrijus bows before iblech's mastery that is Net::IRC
so yaml is b0rken on win32? 14:06
I can fix that
stevan hey autrijus :)
autrijus hey :)
stevan long day at $work ? 14:07
autrijus yeah, verily
not sure I'll retain enough energy to write journal for today, even
endless meetings
maybe I'll nap first
stevan ouch @meetings,.. the worst kind of $work
autrijus indeed... especially @meetings that changes all specs :-/ 14:08
but hey, the spec change is more manageable than @larry's 14:09
so I'll live :)
stevan feels autrijus's pain
gaal cotion, it built OK. what test should i try?
stevan yes, @clients cant be worse than @larry :)
Corion gaal: Try t\pugsbugs\env_is_readonly.t 14:10
gaal: and/or t\magicals\env.t
gaal failed test 2
t/magicals/env....ok 14:11
2/9 skipped: Deleting items from %*ENV does not work yet
t/magicals/env....ok
Corion gaal: So we can, on Win32, change %*ENV, but not see the changes ourselves. It's a weird weird world :)
gaal: Weird. Because with native Win32, test #6 fails for me in env.t (plus the two skipped, but that's expected)
gaal you know what else is wierd?in tcsh, %~ means roughly command serial number 14:12
it ought to start from 1 each time a shell is started
autrijus I'm on win32 now
gaal i just noticed that it doesn't reset on cygwin's tcsh.
(in the prompt) 14:13
i'm starting a complete smoke for msys, because it's been a while since anyone did that.
t/builtins/io/io_in_for_loops.t 14:14
C:\MinGW\1.0\bin\perl.exe: *** WFSO timed out
what's WFSO ?
autrijus no idea
Corion "Waiting For Significant Other" ?
autrijus Wait For Single Objec
t
gaal What Future Sleeps Outdoors? 14:15
autrijus We Find Scheme Odd?
oh, the yaml segfault is probably common to both win32 and non- 14:16
it's caused by the undef
I'll fix
misc_ Win32 Fail and Segfault, Obviously ?
gaal autrijus, it looks like we need objects for pipe open :) 14:17
forum2.org/gaal/pugs/smoke-msys.html 14:19
Juerd autrijus: I scribbled some notes for perl 6 newbies at pugs.kwiki.org/?Perl6Nomenclature
autrijus: Can you see if what's there is accurate enough? 14:20
gaal Juerd, cool. Definitely add a link to the module porting HOWTO.
Juerd gaal: it's a wiki (hint!) 14:21
autrijus Juerd: I saw that, thanks
Juerd :)
autrijus gaal: noted. tests? :)
I mean, for |open, not for oo, which we have
gaal well, i wanted to port over all the tests that did temp files to open| ... :) but yeah. 14:22
gaal works on it 14:23
btw last i checked, reading from Pugs::Internals::runCommand was slurpy. 14:24
which come to think of it isn't surprising since it isn't wrapped in a perlish fh
autrijus aye.
gaal steals ideas for |open from p5 14:25
gaal hears for the first time of the vmesa platform 14:27
Corion goes outside 14:33
Juerd What is that? Out what side, and is a site something you can be in or out? 14:36
s/site/side/ 14:37
stevan Juerd: you should add svk and darcs to the "General" listing 14:41
jhorwitz autrijus: ping 14:45
autrijus pong!
jhorwitz: I'm excited to hear about your progress in p6i
jhorwitz i actually had it working. now leo threw in a new fix, but i'm having ffi trouble 14:46
autrijus commit it? :D
jhorwitz need to access structure members...
autrijus ah, that.
jhorwitz yeah, it's not in a commitable state right now 14:47
autrijus you can do the easy thing and define accessors via #ifdef and treat themn as ffi foreign import
jhorwitz paste a quick example?
Juerd stevan: It's a wiki!
autrijus #define foo_bar_baz(foo) foo->bar.baz
jhorwitz ah, sneaky. 14:48
autrijus foreign import foo_bar_baz :: FooStructure -> IO BazType
I think it would work :)
(not 100% sure)
jhorwitz is off to play with ffi
autrijus I hope ffi is kind to you
jhorwitz so far, so good 14:49
autrijus :) 14:50
iblech [BUG] foo(a => 25/1) currently parses as foo((a => 25)/1), resulting in foo(Inf) 14:52
autrijus noted. add test? 14:55
iblech precedent.t? 14:59
precedence.t?
will do 15:00
Juerd Perhaps just pair.t
arithmetic tests are in arith.t afaik
iblech k
Limbic_Region is there anyway to do slurpy IO yet?
Juerd even those specific to precedence
Limbic_Region or should I just loop and concatenate for now? 15:01
Juerd Limbic_Region: Create a stub function, that you can remove when the functionality is implemented
I had to do that for abs() before, it worked very well. 15:02
Limbic_Region and do what - call it slurp() ?
Limbic_Region has to go - $work
Juerd Limbic_Region: Whatever agrees with the spec, or else be creative :) 15:03
meppl /topic perlsex 15:12
stevan Limbic_Region: I think there already is a slurp() 15:21
iblech at it works, too 15:22
and it works, too
Limbic_Region right then 15:23
Jonathan_ ping
iblech - have a test file or example? 15:24
iblech pugs -we 'say slurp "file.txt"'
my $contents = slurp "file.txt" 15:25
Limbic_Region oh, so it doesn't work on an IO ref
hmmm
autrijus pugs -e 'open("README").slurp.say'
worksforme
jhorwitz: does modparrot work on win32? 15:27
Limbic_Region was forgetting an = sign
autrijus linking against libparrot_s does not quite work for me
jhorwitz autrijus: no -- looking for a porter though
autrijus perhaps because our -L -l magic isn't working there
oh ok.
jhorwitz mostly configuration/compiler issues. APR makes the code very portable. 15:28
autrijus nod.
ok, I can't stay awake anymore. see you in a few hours
autrijus waves &
Juerd Bye 15:30
Limbic_Region question - should the following work? for ( =$input ) -> $line is rw { chomp $line; } 15:39
I have to s/rw/copy/ to get it to do what I want
iblech Not unless $input is opened rw, I think 15:41
Juerd Wow, does =$input return an lvalue?
That's surprising but also very neat. 15:42
Limbic_Region ah - makes sense
Limbic_Region feels incredibly stupid sometimes
Juerd s/lvalue/not a copy/
It's extra neat if it means that if $input was opened rw, chomping means you end up with newlines removed from the file, $^I-wise. 15:43
Limbic_Region: In real Perl 6 you'd probably use auto-chomping, by the way. 15:44
Or that's what Damian keeps telling me whenever I have any code snippet with chomp in a loop :)
Limbic_Region Juerd - yeah, but I am writing code that can be used now 15:45
and I think I might have found a bug
Limbic_Region needs to develop a test case 15:46
yep - pretty sure next is broken 15:49
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 "Is "next" known to be broken? Put this in blah.p6 to see weird behavior if not already known" (12 lines, 217B) at sial.org/pbot/9936 15:51
Limbic_Region is using if ( $line ~~ ... ) {} else { ... } as a workaround - yuck 15:58
wolverian hm. stylistic issues; why the parens around the =$input? also, is $_ aliased to $copy there?
er, to $line ,I mean.
Limbic_Region wolverian - copy/pasting from an example WRT parens 15:59
wolverian okay. :)
iblech wolverian: $_ is always the first argument to a callable thing (IIRC), so yes, $_ := $line 16:03
i.e. my $a = -> $arg { say $_ }; $a(3); # should output 3
hm..., but Pugs doesn't. Bug in Pugs or in my memory? 16:06
Limbic_Region is there a builtin line counter like $. yet? 16:07
wolverian iblech: ah, thanks. in that case, the '$line ~~ ' bit is redundant, although it's certainly self-documenting. 16:08
iblech Limbic_Region: no, and IIRC in Perl 6 this is a method call, something like $handle.curline, but as there's no synopsis about IO yet, I might be totally wrong :)
Limbic_Region that's what I thought but I wanted to be sure 16:10
wolverian for =$input -> $line is copy { $line.=chomp; next unless $line.words; say $line }
Limbic_Region is really wondering about the next bug though
Limbic_Region wanders off to get lunch
iblech hm... t/statements/next.t seems to test this bug, but it is :todo-ed, me wonders why 16:12
Limbic_Region iblech - when I rewrote next.t they were all :todo because it wasn't implemented yet 16:20
Limbic_Region should go back and see how it has been updated since then 16:21
oh wait - they are all still :todo
Limbic_Region wonders if next is currently the same as last?
err - an alias to last rather 16:22
speaking of which - I think I found a bug with last too regarding naked blocks
pasteling "Limbic_Region" at 129.33.119.12 pasted "possible last bug - will write a test for it if it is indeed a bug - run the following code in file called blah.p6" (14 lines, 239B) at sial.org/pbot/9937 16:24
cognominal Limbic_Region: 'last' exits the loop... 16:39
gaal yay! [email@hidden.address] 16:42
Limbic_Region cognomial - I know 16:44
in p5 a bare block is a looping construct
so it should just last the bare block
if that is ALSO the p6 behavior - then the way pugs behaves WRT last in a bare block - it is a bug 16:45
Corion Yay. The segfault in YAML is gone! 17:00
gaal forum2.org/gaal/pugs/smoke-cygwin.html # yeah 17:01
Corion I wonder why unlink() on files fails ... Is this only on Win32 ? Then, the file(handle) is still open, which prevents deletion there. If it also happens on unixish systems, the problem lies elsewhere. 17:03
(we also don't have a test for unlink :) )
Heh. Perl5 doesn't have one either. 17:05
gaal starts a linux smoke, goes out for a walk
iblech Corion: unlink() works on Linux (Gentoo, GHC 6.4) 17:08
I'll add a test for unlink, too
Corion iblech: Ah, so that means that Pugs holds the file open for too long and thus it can't be removed.
iblech: I guess open->print->close/fall-out-of-scope->unlink->-f # is a good test to see if unlink works :) 17:09
iblech++ # adding tests
Hmmm. I guess the thing should work with an explicit close() call on the filehandle, so there should be two tests, one where the handle just falls out of scope and one with an explicit close() 17:10
... the last test in t/general/atoms.t does that, so it should be moved from there into unlink.t :) 17:11
iblech re. Done as r2733. The unlinking works on Linux, *but*: unlink(...) does return true when executed using "pugs -we '...'", but it returns undef in the test. Dunno why 17:18
iblech food &
gaal what's -w, anyway? it's a noop in the code; aren't warnings on by default in p6? 17:53
oh and forum2.org/gaal/pugs/smoke-linux.html and rehi btw.
hey, two unexpected successes. cool. 17:55
iblech Yes, it's just a habit :)
Corion gaal: Hmmm. So we need to make the %*ENV test :todo only for Win32 17:56
gaal: The async.t likewise - it doesn't seem to work on native Win32 (propably due to GHC) 17:57
gaal todo => $*OS ~~ any<...>?
Corion gaal: Should work IMO, yes ;)
r2734 - datenzoo.de/pugs/win2k.html - no unexpected successes, but env.t doesn't crash either :) 17:58
iblech No, it won't, as Test.pm is testing for defined()ness of :todo. I'll fix both env.t and Test.pm in a minute 18:01
Limbic_Region iblech - Config::Tiny is finished
I need to write a bunch of snippets that I think might be bugs and then I will post 18:02
iblech Done as r2736. 18:03
Limbic_Region: Great :)
autrijus I'm possessed :-/ 18:10
sorje Heh, cool. A IRC module..
autrijus I dreamed that I wake up and start composing my journal, deliberating what to write...
...so I did just that.
Corion ... then you woke up?
autrijus yeah.
Corion :)
Juerd Hey, today is 05-05-05
No matter what order you put year, month and day in! 18:11
Corion I wait for 6th of June next year. :)
autrijus it's 2005-05-06 for me.
Juerd autrijus: Oh. I'm too late again.
:(
autrijus I wait for 3550 years more :)
Juerd stoopid timezones.e 18:12
s/e$//
autrijus jhorwitz: how's tricks?
jhorwitz autrijus: it works. using hsc2hs, so tweaking makefile now. 18:13
autrijus woot
so #ifdef doesn't?
jhorwitz no go
autrijus bummer.
jhorwitz hsc2hs is better in the long run anyway
autrijus aye aye 18:14
Corion iblech: Your fix for Test.pm prints a test line several (2) times: datenzoo.de/pugs/win2k.html - see the line for env.t (the "is rw" line gets run twice) 18:29
iblech hm... I think that's because of the use of the junction in env.t 18:30
because Test.pm:proclaim does only print things once 18:31
Corion: What does "pugs -MTest -we 'plan 1; is 3, 4, todo => ($*OS eq any<MSWin32 mingw msys cygwin>);'" output on your sys? 18:34
pasteling "Corion" at 84.176.42.37 pasted "Output of test run" (13 lines, 404B) at sial.org/pbot/9940 18:35
Corion iblech: See the nopaste
iblech The same command on my system runs is() only once. 18:39
But I'm not sure why is() is called two times, instead of four times (as this is the number of arguments to any())
Corion: Please try "pugs -MTest -we 'plan 1; is 3, 4, "todo" => ?($*OS eq any<MSWin32 mingw msys cygwin>);'" 18:41
stevan iblech: it prints once for me (OS X) 18:42
iblech: I am not sure if :todo is the place for platform specific branching
iblech stevan: On my sys (Linux), too (but so does the test without the "?")
pasteling "Corion" at 84.176.42.37 pasted "Test output for iblech" (15 lines, 422B) at sial.org/pbot/9941
stevan my $todo = ($*OS == Win32) ?? 'bug' :: undef; 18:43
is(2, 4, $todo);
I would think that might work
any use of :todo or "todo" will result in a defined value
iblech Corion: Thanks, svn up to r2740 18:44
stevan although "todo" => undef might not (have to test that)
Corion updating and smoking - results should be here in 5 minutes or so :)
... make that 8 minutes - compiling now takes longer than testing ;) 18:45
iblech Should "$foo eq any<...>" return a junction of Bools or a single Bool?
stevan I assume a Bool
iblech stevan: I updated Test.pm to check for trueness instead of definedness, so ":todo" and ":todo<...>" TODO a test and ":todo(0)" or "todo => 0" does not 18:46
stevan iblech: but how will that work with ok('test', :todo)
(which is why it checks for defined and not the bool)
pasteling "jhorwitz" at 216.52.77.2 pasted "for autrijus: eval_imc" (13 lines, 213B) at sial.org/pbot/9943 18:47
iblech stevan: I thought so to, but now I think it should stay a junction of Bools, by the law of junctioness preservation :)
stevan: ":todo" is really short for ":todo(1)"
autrijus jhorwitz: !!!
jhorwitz autrijus: r2741 18:50
stevan iblech: I am not sure that :todo(0) is very intuitive 18:51
iblech: but with a boolean exp instead of 0, I suppose it works. It just looks a little odd to me 18:52
then again, I have not be getting a lot of sleep lately, so it is probably best to ignore me :) 18:53
jhorwitz autrijus: there's only one problem -- it bombs out if you try to run a second eval_parrot. reproduced problem in C as well. making the interpreter persistent would solve this. 18:54
iblech stevan: I think so, too. We should probably discourage :todo(0), but I see no easy way to check that the test write wrote :todo(0) instead of todo => something_that_evaluates_to_false
nothingmuch evening
stevan hola nothingmuch 18:55
iblech s/test write/test writer/
stevan iblech: maybe ok($fail_on_Win32, ($*OS eq 'Win32' ?? 'bug' :: undef)); 18:56
although now that i look at it, its not any prettier, nor does it illustrate that is it a :todo better
I am going to go with my previous idea that you should ignore me until I have some more coffee 18:57
:P
autrijus jhorwitz: ok, please commit, I'll carry on that
or at least try :)
oh, you did
jhorwitz++
stevan jhorwitz++ # everybody join in! 18:58
iblech stevan: ;)
Corion iblech: Works fine with r2740 now! 19:00
iblech Corion: nice :) 19:01
Corion r2740 - datenzoo.de/pugs/win2k.html - 4769 ok, 51 failed
can anybody explain to me what the single-arg version of atan() is supposed to be ? 19:02
autrijus Corion: doesn't rod's cover that?
Corion rod's ?
iblech rodadams.net/Perl/S29.html 19:03
atan(1) == pi/4 (result is always between -pi and +pi), atan(1, 1) == pi/4 (result is always between 0 and 2pi) 19:05
Corion Only describes the two-arg form of atan, but doesn't describe the single arg form.
Ah... Hmmm. Is that the difference? The range of results?
iblech Yes. The single-arg form gets a y/x-ratio, so it has to guess the quadrant it is in (-1/-1 == +1, although P(-1, -1) is in quadrant III). the two-arg form distinguishes the y- and x-coordinate and is so able to return the correct result (taking the quadrant into account) 19:07
Corion iblech: Thanks 19:09
autrijus jhorwitz: do you think we should probe for parrot in PATH?
jhorwitz: and stick it to PUGS_EMBED if found?
jhorwitz autrijus: we'd still need to know the parrot source dir. :( 19:10
autrijus jhorwitz: doesn't the parrot in path carry that info? 19:11
jhorwitz nope.
autrijus darn. 19:12
Limbic_Region ok - I have documented and finished Config::Tiny but I all I have is the module itself (no test suite or full package for installation) - what should I do with it?
pasteling "Limbic_Region" at 129.33.119.12 pasted "Config::Tiny" (190 lines, 5.6K) at sial.org/pbot/9944 19:13
autrijus Limbic_Region: write a minimal sanity test 19:14
the Makefile.PL itself is just copy-paste from other ext/ stuff
# Save a config 19:15
$cfg->write( 'new.ini' );
this looks suspicious
Limbic_Region thanks
Limbic_Region missed some things 19:16
revdiablo hmm I wonder if I should put my silly combinations thing in examples/
autrijus /tmp/ghc5901.hc:288: warning: implicit declaration of function `imcc_compile_pir'
/tmp/ghc5901.hc:649: warning: implicit declaration of function `imcc_init' 19:17
revdiablo maybe someone will p6ify it a bit
jhorwitz autrijus: no prototypes in parrot header files
autrijus jhorwitz: you can add that declaration in hsc, no? 19:18
jhorwitz i tried, using #def, but it didn't take.
didn't affect anything, so i let it be for now.
autrijus k. not terribly important anyway
sure
Limbic_Region autrijus - will see what I can do but I have at least 5 things I think are bugs I wanted to write up first 19:19
autrijus oh, sure!
Limbic_Region++ # writing OO before OO exists
Limbic_Region autrijus - are naked blocks looping constructs like in p5? 19:20
if so - last is broken
jhorwitz is happy he understood the haskell he wrote today
Limbic_Region if not, I won't bother writing a test
autrijus they're not 19:21
Limbic_Region ok - so down to 4
is //= supposed to work yet?
autrijus jhorwitz++ 19:22
sure, why not?
it worksforme
$ ./pugs x
Hello from Parrot land!
Limbic_Region because it didn't work for me in my situation
autrijus jhorwitz++ # xx +Inf
Limbic_Region will try to get a minimal test case
autrijus jhorwitz: ok, let's use the horrible horrible unsafePerformIO hack! 19:23
autrijus starts hacking it in 19:24
Limbic_Region autrijus - 3 lines of code that expose what I believe to be a problem in //= or hash {} 19:25
my %hash; 19:26
%hash<foo> //= hash {};
%hash<foo><bar> = 42;
should that work?
iblech Limbic_Region: It works if you delete the line with //=, as Perl 6 autovivies %hash as neccessary :) 19:27
jhorwitz autrijus: it actually worked for you the first time? ;-)
autrijus jhorwitz: yes
Limbic_Region: it may be that //= vivifies lhs incorrectly. I'm not sure
Limbic_Region iblech - I can work around it - that's not the point
autrijus Limbic_Region: but, what iblech said.
Limbic_Region I was trying to port Adam's p5 code to p6 19:28
autrijus jhorwitz: interested in doing the weird thing that is compreg Pugs? :)
Limbic_Region in p5 $self->{$ns = $1} ||= {}; 19:29
so while I have it working, I want to add a test if it exposes a bug that might bite someone else in the same way
and while I am at it - is a filehandle opened for writing supposed to flush/close automatically at the end even if $fh.close isn't used? my $fh open('>foo.bar'); $fh.say( "foo" ); # will result in an empty file on my machine unless I do $fh.close 19:32
bah - I am just going to summarize the things I think are bugs and post a link to that
jhorwitz autrijus: i guess we could use NCI to call a function exported by FFI that returns the PIR directly
jhorwitz loves acronyms
autrijus jhorwitz: why NCI? we can create callback subs at will 19:33
look at Syck.hs for mkCallbackk
PerlJam FFI? 19:35
lightstep Foreign Function Interface
autrijus super-leet, Swig-like thing built into the language 19:36
jhorwitz: the Horrible Hack (tm) is in. eval_parrot is now reentrant!
PerlJam the more I find out about haskell, the more it seems like perl6 only with different syntax :) 19:37
jhorwitz autrijus++
autrijus PerlJam: nah. that's because Pugs doesn't do OO yet :)
haskell doesn't have subtyping; Perl 6 thrives on subtyping.
lightstep err, classes?
autrijus lightstep: subtype OddInt of Int where { $_ % 2 } 19:40
but sure, classes and roles too.
PerlJam autrijus: isn't OO next on the timeline?
autrijus PerlJam: it is, and I even have a model figured out.
PerlJam autrijus: excellent!
autrijus++
autrijus: I bet it'll be slow though (I mean perl5 slow or slower) 19:41
autrijus "Larry predicts the Community will collapse within 30 years, leading to a 30,000 year period of anarchy before a Sixth Perl is established. The purpose of his project is to influence events so that the interregnum period will be only 3 years and not 30,000. This will be done, he says, by the production and dissemination by his team of an Apocalyptic Synopsica which will contain all camel knowledge."
PerlJam Just a feeling I have.
autrijus dons the Psycho Historian hat
PerlJam: not when we compile to PIR (aka IMC).
lightstep how are there subtypes checked? i imagine OrderedList or PrimeNumber or HaltingTM
s/there/these/
autrijus lightstep: the perl trick is
PerlJam oh that's true
autrijus ...drum roll...
..."everything that amounts to halting problem at compile time, instead happens at runtime" 19:42
PerlJam autrijus: Are we going to find out that Larry Wall is really Larry Seldon (Hari Seldon's lesser known brother) ?
autrijus PerlJam: yeah. and his yearly image in the State of Onion speech looks so real! 19:43
Juerd Why does life suck?
Corion autrijus++ # Foundation
autrijus Juerd: because it needs to defragment itself with VACUUM. 19:44
crysflame foundation? 19:46
lightstep @google Foundation 19:47
Corion en.wikipedia.org/wiki/The_Foundation_Series
lightstep www.amazon.com/exec/obidos/tg/detai...4?v=glance
Corion ... actually, the series isn't that good a read IMO
crysflame oh
the ideas behind it are super neat 19:48
PerlJam++ # Lari Seldon
autrijus $ ./pugs -e 'eval_parrot<print "Hi!\n">' 19:50
Hi!
jhorwitz woohoo!
Juerd autrijus: TBH, that could have been normal eval ;) 19:51
autrijus rofl, Juerd
jhorwitz Juerd++ 19:52
Limbic_Region Config::Tiny tests are going to have to wait until tomorrow - I'm too tired 19:56
stevan Limbic_Region: is it checked in?
autrijus Limbic_Region: ok, check in barebones into ext/ anyway?
I think the test squad is around :)
stevan Limbic_Region: check it in and I will try and write some
stevan is not in the mood for $work today 19:57
Limbic_Region can't check in from work </same old song and dance>
stevan Limbic_Region: no paste all you have
and I will do the rest :) 19:58
Corion Maybe we should have check-in-by-mail, but that would mean we would check in many letters from Mr. OBEKE from Namibia
stevan Corion: I have a business proposition for you
PerlJam Limbic_Region: why can't you checkin from work exactly?
stevan Corion: you dont know me but...
PerlJam: he is a secret govt. agent,.. they would frown on him working with "us" 19:59
Limbic_Region PerlJam - policy and because of a recent firewall lockdown
PerlJam Limbic_Region: surely you can tunnel through and checkin by proxy
pasteling "Limbic_Region" at 129.33.119.12 pasted "Config::Tiny (could probably use most of p5's Config::Tiny's test suite)" (190 lines, 5.6K) at sial.org/pbot/9945
stevan PerlJam: subverting a US Govt firewall might be a felony :P
jhorwitz autrijus: just moved packfile initialization into initParrot -- should stop potential memory leaks. :)
Limbic_Region PerlJam - surely I would lose my job
not to mention my security clearance 20:00
autrijus jhorwitz: cool!
stevan Region, Limbic Region (shaken not stired)
PerlJam stevan: heck, subverting an Intel firewall is a felony (just ask merlyn)
stevan thinks maybe he made his coffee too strong
autrijus jhorwitz: I have sinned for you. :-/ I hope I can be redeemed from using The unsafePerformIO Hack
Corion Limbic_Region: But there are $non_us_govt which would hire you then ;-)))
PerlJam Limbic_Region: yet you can talk to us on IRC?
autrijus jhorwitz: but for now let it be that way
Limbic_Region stevan - the p5 Config::Tiny test suite is definately worth checking out but I changed the concept of root level section from _ to '' 20:01
stevan PerlJam: Although Guantanamo is nice this time of year, I think Limbic_Region would rather not take an early "vacation"
autrijus it'd be nice if Net::IRC can read from both yaml and configtiny.
Limbic_Region PerlJam - I have perlmonk.org hosting cgiirc so from perspective of local admin - it is just a regular web page of view only
jhorwitz is reading about this sin...
Limbic_Region thinks there is a fundemental problem with distinguishing file uploads from form posting - but hey, I don't make the rules 20:02
hmmm - I need sleep 20:07
stevan I am adding ChangeLogs to all the ext/ modules as well
autrijus ok, I'm thinking about adding -O to pugs 20:09
pugs -OParrot examples/mandel.p6
that runs it with parrot
without temp file or pugscc
is -O ok? or -R? 20:10
jhorwitz -Oparrot sounds good to me 20:11
autrijus ok.
implementing... 20:14
Corion I would reserve -O for optimizing, but then, optimizing might not be specifically exported to the user (or exported via "use less" and "use more"
autrijus that is good thinking 20:15
so -B maybe?
as in backend
Corion Don't know of any special use of -B, so it's likely free 20:16
lightstep what about long options?
autrijus --backend
Limbic_Region calls it a night
stevan Config::Tiny is in, and I included a basic "it compiles" test, will do more later 20:17
autrijus $ ./pugs -BParrot examples/mandel.p6 20:18
................::::::::::::::::::::::::::::::::::::::::::::................
jhorwitz applauds 20:19
autrijus cheers 20:20
$ ./pugs -BParrot -e 'say "The answer is: { 7 * 6 }"' 20:21
The answer is: 42
lightstep try 9*6 20:22
obra er. isn't it ...yeah, that
PerlJam Hmm. 20:24
stevan Hmmm, the one problem with all this "OO that is not OO" is that we might get a lot of name collisions
too many "new()"s
PerlJam I wonder if they got that little detail in the HHGTTG movie 20:25
lightstep mervin looks so unlike himself
avikatz.net/sf/meimad/meim11.jpg 20:27
jhorwitz PerlJam: they did 20:28
jhorwitz will return after these commercial messages (and a drive home) 21:01
_metaperl where can I read about err die 21:04
my $dict = open($dict_file) err die "Couldn't open the AUTHORS file
mauke err is the low priority form of // 21:05
ninereasons E04 ?
'a synonym for "oops...")' 21:07
_metaperl mauke, ninereasons, thanks 21:09
another off-the-cuff question: is err what "or" was in p5? 21:11
revdiablo err is the low precedence version of // 21:12
err and // check for definedness, not truth 21:13
_metaperl and "or" is low prec form of || ?
revdiablo yeah
_metaperl i see
thanks
defined($x) || $y # same as $x // $y 21:14
revdiablo yeah
especially useful as, e.g. $x //= 0;
_metaperl I see
autrijus ooh rms is visiting .tw before I depart for austria 21:15
autrijus looks forward to chatting with rms
mauke $x // $y is actually defined($x) ? $x : $y 21:17
revdiablo good poing, mauke
point too
:)
stevan autrijus: any thoughts on when argument type based MMD will work? 21:24
autrijus: any thoughts on when argument type based MMD will work? 21:25
whoops wrong window :P
_metaperl is the slurpy operator needed here? 21:27
sub pick_committer (*@committers) returns Str {
any(@committers).pick;
}
stevan _metaperl: does it work without it?
_metaperl I'm saying it should as long as the sub is passed a list from length 0 to n, n positive 21:28
my @x; pick_committer(@x); # bombs? my List @x; pick_committer(@x); # ok?? 21:29
I will try it
pastebot.nd.edu/687 21:32
even with @x not yet defined, it works without slurpiness 21:33
I think the slurpiness is superfluous.... please correct if wrong
stevan hangman seems to work fine if i take it out 21:34
_metaperl well, my paste demonstrates that it is pointless 21:35
stevan that may have just been a remnant of an earlier version of the code
ok I am removing it from hangman
revdiablo _metaperl: I think without being slurpy, it expects an array, and breaks on a normal list
ninereasons _metaperl, it was a temporary fix for buggy behavior.
_metaperl oh!
stevan ninereasons: thanks, thats what I thought it was
ninereasons stevan, something is funny with the :todo<s...>, have you noticed? 21:36
stevan _metaperl: committed in r2754 21:37
it is like it was never there :)
_metaperl well, I wouldn't change it...
stevan ninereasons: no I havent
_metaperl: why not?
_metaperl well, let's think...
ninereasons when a :todo<bug> is used, everything after that gets marked as # TODO bug
_metaperl should it break when a list instead of an array is passed?
ninereasons I'm not sure what I'm looking at, but I think that's descriptive, stevan.
stevan _metaperl: in the context of the hangman game, it will never get the wrong input 21:38
ninereasons: can you show me an example?
ninereasons: something I can run
ninereasons pugs t/builtins/arrays_and_hashes/kv.t
ok 20 - for(): from 1-elem Hash %hash got the right $key # TODO bug
_metaperl the slurpy parameter is a great conversation piece... I was using it as a point of education for my next p6 talk --- which will be to explain this code.... I am using kwid to elucidate hangman.p6
revdiablo _metaperl: I think so, when you say an array it wants an array, when you want anything list-like, you say a slurpy list 21:39
_metaperl I will commit the kwid when done
ninereasons there is no ":todo<bug>" in test 20
stevan ninereasons: I get "ok 20 - for(): from 1-elem Hash %hash got the right $key"
no TODO
ninereasons interesting. maybe my Test.pm is broken. 21:40
stevan ninereasons: do you have any local mods?
_metaperl: embedded kwid? or external?
_metaperl external
hangman.kwid in same directory
ninereasons I don't think so. I did a diff on the installed : local : repo and they are all the same, stevan
_metaperl but it's pod as I cant remember kwid syntax
autrijus stevan: we have Val-based mmd now 21:41
_metaperl will ask ingy to convert it
stevan _metaperl: you are welcome to keep the slurpy in there, but I would rather take it out since it is not really correct in that context
ninereasons: is your build up to date?
_metaperl ok, leave it unslurped... I will discuss it from that vantage point
stevan wonders if his build is up to date actually
_metaperl: it is your talk, so you can easily use an older copy for the educational benifits 21:42
autrijus stevan: and Var based too
ninereasons yes .. and no :-) you put your finger on it stevan.
_metaperl either way is educational. I just lead in with "now, this is not slurpy... if it were slurpy" instead of "now this is slurpy if it were not..."
stevan autrijus: ?? 21:43
_metaperl ?? is ternary operator :)
autrijus stevan: svn up and check multi_sub.t
stevan ninereasons: my build it not the most current either :)
autrijus: ok
autrijus only 3 fails now
stevan oh
ninereasons I'm having trouble building; and as part of my build process I wipe out my copy of pugs. "pugs" is a link to the most recent build
stevan autrijus: which three? 21:44
ninereasons when a recent build does not exist, "pugs" defaults to the installed version
stevan autrijus: compiling takes to long, i MUST know :P
autrijus stevan: Num Sub Hash
ninereasons so, stevan, you put your finger on the problem.
stevan autrijus: ok
autrijus stevan: you can say "make unoptimised"!
autrijus wonders if we should make unoptimised build the default during development :)
stevan ninereasons: compiling the latest right now, I will see after that
autrijus: but unoptimised means pugs is slower :) 21:45
ingy hola
stevan which with things like Pod parsing is painful
hey, ingy
ingy hi there
autrijus hey ingy. seen the news of eval_parrot and pugs -BParrot? :) 21:47
ingy autrijus: no
sounds awesome though 21:48
autrijus ingy:
$ ./pugs -BParrot -e 'say "The answer is: { 7 * 6 }"'
The answer is: 42
$ ./pugs -e 'eval_parrot<print "42!\n">'
42!
stevan autrijus: is parrot required?
autrijus stevan: no, it's built when PUGS_EMBEd=parrot
same deal as embedded perl5
stevan I am getting this 21:49
Parrot.hsc:2:28: ../pugs_config.h: No such file or directory
make: *** [src/Pugs/Embed/Parrot.hs] Error 1
ingy very nice
I just want to get my Perldoc integration done asap
how is object support coming btw?
autrijus stevan: weird, is src/Pugs/pugs_config.h there?
ingy: some crazy folks figured out how to write OO witihout OO 21:50
ingy My Test::Chunks framework has been an amazing experience and I want to port it
oh?
stevan autrijus: nope
ingy where are the examples?
autrijus stevan: svn up; should be fixed
ingy: svn.openfoundry.org/pugs/ext/Net-IR...Net/IRC.pm
ingy: svn.openfoundry.org/pugs/examples/cashiers.p6
stevan ingy: also see ext/Config-Tiny 21:51
_metaperl hey ~= is not in the Perl6operator synopsis doc... what does it do?
autrijus _metaperl: what .= did
_metaperl oh!
yes, because ~ is string concat
thanks
autrijus ingy: and that OO, syntax aside, is isomorphic to any OO system :)
stevan autrijus: the only issue I found is that of name collisions 21:52
too many new()s
autrijus (as Sussman and Steele have proved in the Scheme paper)
stevan: right, but namespace support should fix that
stevan i made Config::Tiny's into Config::Tiny::new() for now
autrijus k. 21:53
stevan autrijus: yup
it's a hack, but it works
autrijus: compiling fine now
autrijus woot.
stevan autrijus++ # faster then a speeding bullet
autrijus++ # more powerful than a locomotive
ninereasons autrijus, you didn't need that ../pugs_config.h line ? that was the problem?
autrijus ninereasons: yeah.. because -DPUGS_HAVE_PARROT is passed in via cmdline 21:54
ninereasons: it has to do with build order
ninereasons I tried 30 ways to solve that problem.
autrijus uh. sorry to hear that
ninereasons I lived. feel stupid, though. 21:55
autrijus nah... we all do that one time or another
ninereasons if I want to add parrot to pugs, is it automagical? 21:57
_metaperl two things about this line of code: @letters == @solution.grep:{ $_ ne '' }; # 1 : == is doing array comparision instead of smart matching with ~~ # 2 what does the colon after "grep" represent? where can IRead more about it? 21:58
autrijus just set PUGS_EMBED=parrot
_metaperl: it represents an adverbial block.
ninereasons thank you, autrijus 21:59
autrijus it's like saying
grep(@solutions : {$_ ne ''})
where @solutions is the invocant
and {} the argument
you can read more about it on p6l
_metaperl oh ok
thanks
autrijus np :)
stevan ingy: how is Perldoc going? I was looking at it today 22:00
stevan would very much like a kwid parser to mess around with 22:01
ninereasons zip() is wonderful.
ingy stevan: I expect to make major progress RSN
stevan ingy: in time for you talk at YAPC? 22:02
ingy well yes, but hopefully much sooner 22:03
autrijus ingy: have you played with syck emitter? 22:08
ingy autrijus: no
autrijus k.
ninereasons is there a positive definedness counterpart to // ? (as && is the counterpart to || for truth)
ingy I should though
although it is a 1.0 emitter
autrijus ninereasons: write one yourself :)
ninereasons ok :-) 22:09
autrijus sub infix<\\> { ... }
infix:<>, even
ingy My test first fu has just had a 1000% increase!
this bodes very well for my projects
autrijus nice!
because of T::Chunks?
ingy yes... I've averaged 2 releases a day on that code for over a week 22:10
and applied it to work and now to YAML and Perldoc
I didn't expect it to work out this nicely
it just evolved that way 22:11
of course, to be fair, my test first fu was about as low as anyone I know.
basically I was at loggerheads with choosing between writing tests that were not well refactored, or just not writing tests 22:12
now I have something I not only can live with but actually endorse 22:13
it's my new groove
ninereasons autrijus, does 'sub infix:<..> {...}' work in the latest version? (i've really been looking forward to playing with that) 22:14
stevan autrijus: any chance of dispatching on IO params too?
_metaperl I can't seem to find a reference document for adverbial blocks... is there one? I dont really understand them well
stevan autrijus: currently it does this "pugs: cannot cast from VHandle {handle: <stderr>} to [Char]" 22:15
autrijus stevan: code?
stevan: example code?
stevan autrijus: one second
perlbot nopaste 22:16
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
autrijus ingy: I think if you extend your DATA section has generator capabilities aka LectroTest, that will be the Killer App to bring me back to writing p5 with sanity
pasteling "stevan" at 67.186.136.119 pasted "multi-sub IO failing" (36 lines, 1.2K) at sial.org/pbot/9949
ingy here is an example test I just refactored rafb.net/paste/results/v9oEfN33.html 22:18
autrijus: so I need to read about something called LectroTest 22:19
?
autrijus stevan: I think fixed
ingy: Test::LectroTest 22:20
stevan ingy: Test::LectroTest (on CPAN), but tmoertel
autrijus: :)
autrijus ingy: I think it will be enlightening for you
ingy thanks
stevan electrifying even
autrijus :D
_metaperl LectroTest is similar to Bivio's test program
ingy you guys use this yet search.cpan.org/~king/WebService-NoPaste-0.03/ 22:21
I just did:
cat t/02fail.t | nopaste
I love that
autrijus nice
ingy if i could just pipe the output to perlbot/#perl6 somehow 22:22
autrijus stevan: IO sub dispatch worksforme
stevan autrijus: BTW - should this be able to catch the hardfail? (assuming ok($cond is lazy))
is(foo($*ERR), 'IO', 'dispatched to the IO sub', :todo<hardfail>);
autrijus: excellent, you have made my last hour (once again) :)
ingy yeah, it was my idea. I gave it to rking to implement and become a cpan author so we could hire him at SocialText 22:23
autrijus stevan: I don't know, try and see :)
stevan autrijus: it doesnt
ingy btw, I like how IO::All-isms are finding their way into Perl6
stevan I am just wondering if it should? or would foo($*ERR) be evaluated it gets passed (which is what I assume would happen)
autrijus stevan: the left side of is() needs to be is lazy too 22:24
stevan autrijus: can you give me an example which will hardfail? I can't seem to come up with one 22:25
this one was my best hope :)
autrijus stevan: exit(1)
;)
stevan LOL
okj
_metaperl could someone give me a kiddie tutorial on adverbial blocks? 22:27
ingy autrijus: Lectro looks neat. I will bind it to Chunks tonight. 22:29
_metaperl I think apocalypse12 is the ticket: dev.perl.org/perl6/doc/design/apo/A12.html
autrijus ingy++ 22:31
but I sleep.
journal up. I punted again :)
revdiablo ingy: yeah, larry has mentioned his liking for IO::All a couple of times on p6l 22:38
ingy revdiablo: goodly 22:39
nothingmuch my ass hurts
nothingmuch bought a bike with a seat shaped like a tent peg
ingy lol 22:40
puetzk nothingmuch: brooks saddle
the one, the only :-P
you have to survive the breakin period somehow, but after that... 22:41
nothingmuch the seat currently does not need breaking in
my butt does
puetzk has never been exactly clear on who is breaking in who with a new brooks saddle...
nothingmuch after i get back in shape a bit i'll see what I need to do
nothingmuch wonders where one can get such a thing in Israel 22:42
puetzk luckily it's generally a once in a lifetime affair ;-)
nothingmuch what makes them so good 22:43
autrijus oh, io() is blessed?
how is it different from open()?
_metaperl stevan, should the character for blank in hangman.p6 be a constant? how do you specify constants in p6? do we have them yet?
autrijus zzz & 22:44
nothingmuch ciao autrijus 22:45
autrijus nite
ninereasons my ($var) is constant
_metaperl I see
can we do my $var is constant " " ; 22:46
or must assignment be on another line
ninereasons my int ($pre, $in, $post) is constant = (0..2);
not implemented yet, though.
_metaperl how long til we roll out p6 do you think? 22:47
ghc seems to be limited to very few platforms...
and is arduous to build 22:48
are hyperoperators implmented?
nothingmuch yes 22:49
you can get a good assessment on what is really OK and what is todo by looking at pugs.kwiki.org/?SmokedPugs
puetzk nothingmuch: answered in /query
nothingmuch ah, that's why the dock icon was bouncing =) 22:50
sorry, the window was minimized
puetzk np, I just figured you might not have seen it
I can post here if anyone else cares about bike saddles :-)
_metaperl smoked pugs --- that makes me laugh! 22:53
ninereasons many of the tests are very educational. iblech's work is especially nicely commented and referenced. 23:05
nothingmuch iblech++ 23:06
ninereasons iblech++ # indeed
_metaperl ninereasons, which ones are nicely commented? 23:26
ninereasons iblech often puts some explanation of what he's testing, in the proximity of the tests; and, if a test is referenced, chances are good that it was iblech that added the reference. 23:28
and I find his result comments to be clear
references are particularly nice in the smoke results, because they are links there. 23:29
t/builtins/die_and_end.t , for example, _metaperl 23:35