6.2.3 is airborne! | pugscode.org <Overview Journal Logs> | pugs.kwiki.org
Set by autrijus on 12 May 2005.
mugwump sure, Boots. it certainly has stalled. I wrote a nice stream processor and DOM module in Perl 5, but ingy hasn't come up with a parser yet 00:00
otoh, stevan has written two modules in Pugs that stream Pod and Kwid
Boots can they convert between eachother or do they just stream to a common format? 00:01
mugwump nothing like that in the Perl 5 implementation yet
haven't looked at stevan's work in detail yet
Boots alright thanks for the input. I hope kwid progress as I really like the look of it. 00:03
s/progress/progresses/ 00:04
mugwump sure. I think that Pugs is actually ready to have the Perl 5 project ported to it already... which will certainly help progress
svnbot6 r3368, mugwump++ | Set - Test 'overloaded' operators 00:26
theorbtwo Hm. Once I disable -fno-warn-missing-signatures I can add in most of the missing signatures. 00:33
But for src/Pugs/Compile/Haskell.hs, if I leave it as-is, I get an error that I haven't given a type signature for mainCC. If I try adding a type signature, I get Not in scope: `mainCC'. 00:34
svnbot6 r3369, mugwump++ | More operator overloading tests... 00:39
r3370, mugwump++ | More operator overloading tests...
kelan where can you even add a type signature for mainCC in src/Pugs/Compile/Haskell.hs? is it being defined there on that 'liftIO' line? 00:42
inline type signatures are kinda done like this
liftIO ... [d| (mainCC :: typesig) runComp ... 00:43
but!
i'm also rather a newb with haskell, and don't know Template Haskell at all, so i may be way off
svnbot6 r3371, mugwump++ | More operator overloading tests (sorry for the flurry of commits) 00:44
r3372, theorbtwo++ | More signatures, a few more haddocks.
kelan er, forgot an equals sign "(mainCC :: typesig) = runComp ..."
theorbtwo Trying to do it that way makes the impossible happen. 00:47
kelan the impossible?
sweet
theorbtwo ghc-6.4: panic! (the `impossible' happened, GHC version 6.4): Failed binder lookup: a{tv a3tU} 00:48
kelan hah
mugwump er, can't you just put it on another line? doesn't have to be inline, surely
kelan how do you specify type signatures for local functions? 00:49
i thought it had to be inline 00:50
mugwump sure, it won't be local any more
kelan ah:)
mugwump my haskell fu is weak :)
kelan mine too
theorbtwo Mine is weaker. 00:51
kelan well you can make the impossible happen 00:52
that sounds pretty powerful
mugwump perl makes hard stuff possible, and haskell makes impossible stuff happen. excellent 00:55
meppl gute nacht 00:57
good night
theorbtwo G'night, meppl. 00:58
G'localtime, sproingie.
meppl ;)
sproingie waves
hm. trying to get pugs built on win32. ghc cant seem to find my platform sdk libs 00:59
stevan mugwump: howdy 01:18
hey theorbtwo (long time no see round here)
mugwump hi stevan
sproingie arg arg arg. how do i make ghc see my platform sdk?
gcc: oldnames.lib: No such file or directory
gcc: kernel32.lib: No such file or directory
gcc: user32.lib: No such file or directory
gcc: oldnames.lib: No such file or directory
and so on
mugwump stevan: Is the Tree module usable yet? I'm wondering about converting Perldoc to pugs 01:19
stevan mugwump: it sure is
mugwump: it does not follow the Tree::DAG_Node API though
but it should be able to do all the same opererations
and if it can't I will add them
mugwump damn, gender neutral tree navigation is disgustingly PC :) 01:20
stevan you can always alias the methods if it makes you feel better :)
mugwump ok
stevan oooh nice operator overloading in Set.pm 01:21
mugwump :)
I especially like the E (\x{220b} - member of) operator
stevan oh
mugwump a pity none of it works
stevan I didnt even see that one yet 01:22
oh yeah all infix (or at least most of them)
but I think autrijus said it was just a prec issue
mugwump well, now he has lots of tests ! :D
stevan nice 01:23
sproingie \x{220b} - member of ?
i take it that's the unicode char for the mathematical operator?
stevan sproingie: it looks like a backwards E
mugwump unicode... it's a little backwards rounded E
Odin-LAP That'd return a boolean value, I presume.
mugwump sure 01:24
sproingie oy. perl is turning into APL
Odin-LAP sproingie: Of course. Plenty of those.
sproingie: You didn't know?
stevan sproingie: this is operator overloading, so it is "optional" APL
Odin-LAP sproingie: "Default" stuff remains latin-1, though.
stevan mugwump: you need to implement the "hot springs" operator for Set.pm
mugwump would that be postfix, prefix or infix? 01:25
Odin-LAP Ā„ Ā«Ā» <-- So these are the weirdest things you're likely to see... :p
stevan I dunno, one for each :)
Odin-LAP Pffth. Isn't there a hammer-and-sickle in Unicode? 01:26
sproingie so who's compiled pugs on win32? i can't get it to link
mugwump Odin-LAP: \x{262d}
Odin-LAP Hmm. "In soviet russia, perl6 codes you!" 01:27
stevan :D
mugwump ā˜­
:-/
don't know if that worked
Odin-LAP It did.
sproingie what's the char db name for the codepoint?
\U{HAMMER_AND_SICKLE} ? 01:28
mugwump something like that :)
Odin-LAP U+262D HAMMER AND SICKLE 01:29
sproingie looks around for \U{THIRD_REICH_SWASTIKA} (to contrast with the original sanskrit swastika of course)
mugwump wow ... no swastikas in unicode
unless they're called something else 01:30
sproingie probably using a different name
Odin-LAP Neither are there encircled-As.
Politically correct, them folks.
mugwump this is censorship! :)
they could at least have the backwards facing one
Odin-LAP 24B6 doesn't count. 01:31
mugwump of course not
Odin-LAP Meh. There's a building in downtown ReykjavĆ­k with a biiiiig swastika (facing the same way as the one NSDAP used).
mugwump and how am I supposed to write NIN without a backwards N?
Odin-LAP Indeed. 01:32
sproingie there's a buddhist temple in sf that displays the indian one as well. it was their symbol before one wacky austrian appropriated it
still, they must get a lot of hatemail from ignorant folks
Odin-LAP Hm. 01:33
The austrian didn't steal it from them, though.
mugwump NI\x{202A}N perhaps ? :)
er, NI\x{202B}N
sproingie whines about pugs on win32. no one?
stevan sproingie: I think someone was doing a binary distro 01:34
mugwump I wonder if \x{202B} actually reverses the glyphs
Odin-LAP He took his from old norse religion.
stevan Jonathan maybe
Odin-LAP It's a thor's hammer.
puetzk mugwump: no, it doesn't
sproingie stevan: meh, not interested in a binary distribution. just want to figure out how to make the damn link step work
stevan ah
mugwump puetzk: even when dealing with arabic letters?
stevan sorry
puetzk mugwump: well, they are drawn right to left in the first place :-) 01:35
sproingie tried putting the platform SDK lib in LIBRARY_PATH, didn't seem to work
Odin-LAP mugwump: They already face the 'right way' don't they?
mugwump well, there are some languages that reverse direction at the end of each line and write back the other way
s/languages/scripts/
hence the right-to-left override characters etc in \x{20xx} 01:36
Odin-LAP ā„— <-- Huh. The music industry lobby sure is powerful.
mugwump what's the codepoint for that, Odin-LAP ?
Odin-LAP 2117
puetzk U+2117
mugwump that's not too bad. thought it might be a grammophone with a dog or something 01:37
Odin-LAP Well, they have that, but no swastika?
The neonazis need better PR...
sproingie uh 01:38
mugwump they have, it's called GOP
sproingie *drum fill*
i think the conversation godwin'd itself
puetzk oh, it's in there
U+534D and U+5350
Odin-LAP ā’¶ <-- Just by accident, they provide one of those. Not good enough, though! :( 01:39
Ooooh. Neat. 01:40
No slanted version, though.
mugwump cdcd
puetzk since chinese uses it
mugwump doh
Definition: swastika fourth of auspicious 01:41
babelfish doesn't want to translate that 01:42
sproingie wonders what would happen if he just took out all those redundant libs in the win32 makefile
i have a hard time believing that pugs needs odbc32.lib for instance 01:43
puetzk sproingie: wouldn't surprise me too much; if you use anything COM you pick that up
and a lot of windows APIs are COM
sproingie yeacch
ok fine, then how the hell does one actually link pugs 01:44
puetzk well, not *anything* COM I guess, but anything IDispatch
sproingie make process is absolutely busted as far as i can see
sproingie is starting to run out of patience with ghc
tch. it's parrot embedding that breaks it 01:51
svnbot6 r3373, Stevan++ | Perl::MetaModel - findMethod and invokeMethod methods coded and tested (and an isMethodSupported too); Smalltalk Meta-Model++
kelan well you only need that if you want rule support 01:52
ditch it!
sproingie aren't rules kind of important
kelan hah, thats what they want you to believe 01:53
ditch it!
mugwump I think a lot of authors will use rx:perl5/.../ for a while yet 01:54
should be rx:pcre/.../ really 01:55
sproingie so rules are considered more or less experimental ?
mugwump PGE is still pretty alpha AFAIK 01:56
sproingie apparently quite broken on win32 it would seem 01:57
or could have a simpler explanation. my parrot tree looks broken
rules are like the #1 thing about perl6 for me. behooves me to buiild 'em 02:00
mugwump well, you could try the pugs live CD :) 02:02
sproingie egad. i'd just as well boot linux 02:03
which i'll probably do once fedora 4 comes out of test
mugwump Does PxPerl not come with Parrot? 02:04
sproingie was running ubuntu, but got burned by old packages for ghc and pgsql, and the very-often-broken unstable version 02:05
that and i don't consider a chroot to be 32 bit support
so once fedora 4's out, i'll do my pugs stuff on it
mugwump you on amd64?
sproingie yep
mugwump tried SuSE? if you want a 'proper' 32/64-bit environment, theirs is probably the best 02:07
sproingie eh, it's pricey
mugwump you want it all!
sproingie fedora's is supposed to be pretty much side-by-side too
mugwump ok
kelan what ghc does pugs need now, 6.4? 02:09
sproingie yep
kelan debian has ghc 6.4 for amd64
sproingie last i looked, in experimental 02:10
kelan not sure how debians amd64 support is in general tho
sproingie beware of the leopard
kelan in unstable now
leopard?
sproingie kelan: debian's is pretty nonexistent, it's all "unofficial". ubuntu's is fine, but the only thing tracking unstable is breezy
and breezy just breaks massively
kelan: in a locked filing cabinet in a disused lavatory with a sign on the door saying "beware of the leopard" 02:11
hhgtg reference
kelan ah
sproingie ubuntu's 64 bit support is fabulous. its idea of 32 bit support is "go run a chroot"
rebuilt parrot, rebuilt pugs, still broken with PUGS_EMBED=parrot 02:15
bah
kelan ditch it!
okay, i'll stop saying that now
sproingie meanwhile i have charming artifacts on the build commandline like -L\usr\local\lib 02:16
svnbot6 r3374, Stevan++ | Perl::MetaModel - isPropertySupported method coded, needs tests 03:23
putter fyi, folks attempting to use pugs on amd64 should read the pugs README (and perhaps let me know if it still doesn't work;) 03:33
svnbot6 r3375, putter++ | t/rules/from_perl6_rules/named_cap.t un-Disabled. 04:42
r3376, putter++ | Un-Disabled some t/rules/from_perl6_rules/ tests. 04:50
r3377, putter++ | Tweaked t/rules/Disabled/from_perl6_rules/stdrules.t. It no longer Errors, but it still hangs unembedded parrot. 05:07
r3378, putter++ | eval_ok()ed some tests in t/rules/Disabled/from_perl6_rules/assert.t. It is still disabled only because it hangs external parrot. 05:16
r3379, mugwump++ | Make MetaProperty test use less 'foo' and more 'real-world' examples 05:38
crysflame someone++ # karma for commits 05:45
svnbot6 r3380, putter++ | UnDisabled t/rules/from_perl6_rules/prior.t.
mugwump stevan: I just read through tests 10-12, will look at 20-40 another day 06:01
svnbot6 r3381, mugwump++ | Make MetaMethod test use less 'foo' and more 'real-world' examples - untested
r3382, putter++ | Commented out some parsefails in t/rules/Disabled/from_perl6_rules/subrule.t. It is left disabled only because it seems to hang when used with external parrot.
mugwump (in Perl::MetaModel)
mugwump & # flathunting time
nothingmuch morning 06:27
06:31 crysflame is now known as floatingatoll 06:33 floatingatoll is now known as crysflame
autrijus when sproingie shows up next time, we need to tell him that external parrot can do rules just as well 06:34
\camel -> rehi 06:36
nothingmuch hola autrijus
did you get my spam from yesterday?
autrijus yes 06:37
something like autrijus.org/svk-overview.png ? 06:38
sure, I'd be happy to do an interview with you :D
but I need to run. I'll be back in a hour or so
nothingmuch okay, i'll be here 06:40
ping me when you feel like it
autrijus danke
&
06:49 chady_ is now known as chady
wilx Whoa, nice pic. 06:54
What tool is it drawn in?
nothingmuch the icons look kde-esque 06:55
maybe it's this: www.koffice.org/kivio/ 06:57
07:17 castaway_ is now known as castaway
autrijus nothingmuch: it's Nuvola 08:02
and I'm back :)
nothingmuch i need 10 minutes or so, and then we'll get to it =) 08:03
autrijus sure :)
nothingmuch is actually having fun reading C+=1 08:04
autrijus C+=1?
C++?
nothingmuch yeah, but without the karma =)
autrijus heh 08:05
nothingmuch this is relative to the code i've been reading yesterday
void function (
#ifdef _SOME_DEF
param
/ other_param
that was a '//'
#endif
third param 08:06
);
that was how most functions were both called, and defined
*sigh*
autrijus I think I've seen code like this somewhere
ahh. nethack.
nothingmuch nethack is in C++? 08:07
autrijus no, in C, but it likes to use #ifdef too
#ifndef WIZARD
# ifndef KR1ED
etc
nothingmuch but this code is C++ 08:08
i guess you could #ifdef _SOME_DEF / #define OPTIONAL x x / #else / #define OPTIONAL x /* */
it really should be instance data, not paramters
autrijus mumbles something about C-style macros and safety
nothingmuch this is the EEK (AOP's EEK) at it's worst
autrijus not saying that String->String source filter is better.
EEK?
nothingmuch extreneous embedded knowlege
Gruber hmm 08:09
tobez@hrum src/pugs> ./pugs -e '"x" ~~ m/y/;'
tobez@hrum src/pugs> echo '"x" ~~ m/y/;' | ./pugs
Parrot IO: Failed init layer(unix).
zsh: 16506 done echo '"x" ~~ m/y/;' |
zsh: 16507 exit 65 ./pugs
nothingmuch www.perl.org.il/YAPC/2004/talk.html?id=24
autrijus Gruber: ./pugs - 08:13
hm, still not working
Gruber strange, eh?
autrijus indeed
Gruber an isatty() somewhere must be a culprit from the looks of it 08:14
autrijus line 88
Main.hs
isTTY <- hIsTerminalDevice stdin
does the additional "-" workforyou?
Gruber nope
nothingmuch okay, lets start
autrijus nothingmuch: cool. fire away 08:15
autrijus opens up a window for haddock
# pugscode.org/haddock/
nothingmuch as you requested, my smoke result also has haddock
nothingmuch.woobling.org/pugs_test_...s/haddock/
now we only need to link that in =)
autrijus done. 08:16
nothingmuch no, i meant link like the tests link to synopses
autrijus "API documentation" in pugscode.org now links to you :)
oh. :)
nothingmuch =)
autrijus anyway.
nothingmuch we can probably pull off test -> haddock easily 08:17
but i think haddock -> synopsis is more interesting
so
at the core we have src/Pugs
lets ignore that for now
it has external deps:
Parrot (optional)
autrijus hs-plugins (optional) 08:18
nothingmuch Data.Yaml.Syck (supplied)
be parrot and provide rules
Unicode (Supplied)
provide eval_yaml
RRegex (supplied)
provide rx:p5
autrijus libperl (optional, possibly bitrotten)
nothingmuch the jobs of these components respectively are:
okay 08:19
i see this as a star
pugs at the center, these around it
autrijus yes
nothingmuch name + optional purpose
parrot also has a sub component, PGE 08:20
okay, so lets begin with pugs
from the simple
no, top down via haddock
that way we won't miss anything
autrijus k
nothingmuch oh, i forgot IMC
autrijus forget it :)
nothingmuch heh
autrijus the IMC thing won't be reactivated until next month 08:21
for the grand codegen rewrite
nothingmuch okay
so lets dissect AST
autrijus ok. AST is the core of Pugs
nothingmuch an instance of an AST is a parsed perl 6 program 08:22
AST provides the means to execute it, right?
autrijus start from AST.Internals
which is the core of core of Pugs
nothingmuch does the AST ask the parser to build it? or vice versa?
autrijus ok, it goes like this 08:23
nothingmuch i see in internals the various things you can do to perl data
perl internal data
autrijus 1. Main.hs
your program enters there
nothingmuch as well as the env monads
autrijus it's a simple String
2. Run.hs
that string is passed to runEnv
er, no, sorry 08:24
2. Parser.hs
that string is passed to runRule
Parser turns the String into an Env
nothingmuch pause
autrijus ok
nothingmuch what exactly is an env?
autrijus see haddock
nothingmuch is it a sort of lexical entity in the program?
autrijus "Evaluation environment."
it's the interpreter state 08:25
everything is in it
nothingmuch oh, the whole thing
autrijus right
nothingmuch so it is basically "the program"
autrijus yes.
note that by the time Env is built by Parser
all BEGIN block has been executed
so we are at the start fo runtime
I was going to talk about the BEGIN thing :) 08:26
nothingmuch okay
lets =)
autrijus ok. so Parser gets a String
and start parsing it
the Parser also gets an initial environment
created with prepareEnv in Run.hs
which contains @*INC %*ENV and all primitves 08:27
the Parser works by constructing an Exp
which is the abstracted syntax tree of a Perl 6 program
(Exp stands for "expression")
from the String
but when the Parser sees a BEGIN block (or equivalent)
(such as `use Foo;` and `sub blah {...}`)
then it pauses parsing
and launch into the evaluator 08:28
Eval.hs
nothingmuch okay
one sec, sharpenning pencil
autrijus right ther using the partially constructed Env
sure
nothingmuch wait,
it constructs the Exp tree
autrijus yes, but it also keeps a Env as state
nothingmuch when it finishes a BEGIN, it takes the BEGIN's Exp and eval's it immediately?
autrijus that's the idea, yes
nothingmuch a Env or the Env?
autrijus well, it starts off with the initial Env 08:29
then during parsing, from time to time, it modifie sthe Env
the final return value of Parser is Env
_not_ Exp
ruleProgram :: RuleParser Env
nothingmuch which contains Exps
autrijus the parsed Exp is there as envBody
exactly.
nothingmuch it does the haskell record modifying shenanigan, right?
autrijus right.
nothingmuch so it's a env 08:30
but all the derived envs are thrown away
autrijus a mutable one, yes.
let's just say it incrementally builds the Env along with the Exp.
nothingmuch right
autrijus 3. Eval.hs
when Parser seens BEGIN
nothingmuch what do BEGIN blocks boil down to?
an Exp with the return value?
autrijus it launches into unsafeEvalExp
yes. 08:31
BEGIN blocks is just a Exp
nothingmuch why unsafe?
autrijus an Exp can be reduced to a Val
nothingmuch: because it involves unsafePerformIO
(the parser is supposed to be pure)
nothingmuch because it does a sideffectful action inside the parsing, which isn't?
oh, right
autrijus yes.
nothingmuch i forgot Exps can do IO
autrijus if you do a rand() inside BEGIN
then there's no guarantee that your parse tree will be identical 08:32
nothingmuch the universe splits up?
oh,
autrijus heh :)
so it's unsafe from the haskell meaning
but perl6 is unsafe like that. so we deal
anyway. so BEGIN {...} is an Exp that is the parsed stuff from ...
each Env knows how to eval itself 08:33
envEval :: !(Exp -> Eval Val)
nothingmuch brb
autrijus this currently always binds to "evaluate" in Eval.hs
-- | Evaluate an expression. This function mostly just delegates to 'reduce'. 08:34
evaluate :: Exp -- ^ The expression to evaluate -> Eval Val
er
evaluate :: Exp -> Eval Val
castaway wonders what history is currently being made..
mornin, for any to whom that applies
autrijus greetings castaway. 08:35
castaway hiho, hows tricks?
autrijus just fine. nothingmuch is interviewing me because it looks like he to help writing PA02 :) 08:36
s/he to/he wants to/
castaway Ah, Ok
nothingmuch okay, back
castaway sits back and watches ,)
autrijus so. we see a
BEGIN { print "compiling!" } 08:37
nothingmuch what happens with nested begins?
as early as possible?
autrijus it does what you think it does :)
yeah, just like p5.
nothingmuch or are they considered as a boolean state
autrijus no, as early as possible
all BEGINs are fully evaluated as soon as they are parsed.
even nested ones.
so with 08:38
BEGIN { print "compiling!" }
nothingmuch if in any begin we are compiling
okay
autrijus we have an Exp
App &print ('compiling!')
nothingmuch hola castaway
autrijus (using the Pretty form)
instead of the Haskell form which is
nothingmuch how is it marked as a BEGIN exp?
castaway ruffles nothingmuch
nothingmuch is this notation set in the parser?
autrijus App (Var "&print") [Val (VStr "compiling!")] []
nothingmuch or does the Exp know about itself being that way?
autrijus nothingmuch: what notation? 08:39
it is not marked as a BEGIN exp
nothingmuch that something needs to happen at compile time
so the parser sees the BEGIN { }
autrijus then the Parser runs the evaluator
right there
nothingmuch takes the exp, from {}
and because this was BEGIN evals the {}
autrijus yes.
line 573
nothingmuch so it's sort of like a block modifyer
okay
autrijus "BEGIN" -> do
rv <- unsafeEvalExp fun
return $ if rhs then rv else emptyExp
in Parser.hs 08:40
ok. so we are in the evaluator now
the Env used by evaluator is the partially constructed one fro Parser
because we had not finished parsing
in Eval.hs, the evaluator case-analyzes the incoming Exp 08:41
see it's an App
nothingmuch is there a distinction between a partial and finished env?
autrijus nothingmuch: it's not marked in the structure, so I'd say no
I say "partial" only because there's still parts of program being parsed
nothingmuch okay, so a partial env is completely functional
are the unparsed parts of the program inside the env/
like, 08:42
is the string expanded (metaphoricaly) in place, within the env?
autrijus no, they are not.
nothingmuch okay
autrijus the Eval.hs at this point knows nothing of the remainder of program
if any
nothingmuch how do incompeltee exps look like?
autrijus I guess we need to assign the $?COMPILING var
there are no incomplete exps ;)
all exps are complete by definition.
nothingmuch is it accessible via envBody? 08:43
so where does the begin exp exist
if it's parent have not yet finished parsing?
autrijus so it's not in envBody
Gruber autrijus: in parrot, io/io_unix.c, fcntl(fd, F_GETFL, 0) for stdin returns EBADF in the case above, so it looks like pugs closes stdin at some point
autrijus look at line 602
Parser.hs
Gruber: ahh. that explains
Gruber: I wonder how to read everything from stdin without closing it 08:44
asking on #haskell now
Gruber any way to just leave it at eof?
autrijus asking :)
Gruber heh
autrijus how would you normally do that? read 4k bytes until eof? 08:45
nothingmuch: you'll see that the evaluator is invoked directly
nothingmuch: the evaluator is basically
Exp -> Eval Val
nothingmuch ah
Gruber autrijus: in perl5 while (<STDIN>) :-)
nothingmuch and env typically has an embedded evaluator that belongs to it?
autrijus Gruber: I don't want linebased 08:46
which means that it takes Exp, and evaluates it in the context of Env, into a Val
nothingmuch: yes. always
Gruber read chunks until sysread returns 0 or undef
again, in perl5 therminology
nothingmuch in that case $\ = 4 * 2 ** 10; 08:47
err, ref
or better yet, the blksize you get from stat on the handle
okay, i see 08:48
{ my $var; BEGIN { $OUTER::var } };
does that make any sense?
can a begin block be a closure at all? 08:49
autrijus Gruber: ok, I tried a fix. committing 08:50
nothingmuch: you don't need the OUTER 08:51
pugs> my $var; say BEGIN { $var = 5 }; say $var; 08:52
5
nothingmuch autrijus: imagine a scenario where i did
more lexical scopes maybe
autrijus nothingmuch: the lexical scope is part of Env 08:53
as envLexical
of course the Exp being evaluated sees the envLexical.
nothingmuch ooh, lunch
bbiab
okay
envLexical is what, exactly?
the current scope being parsed and/or eval'ed?
svnbot6 r3383, autrijus++ | * Gruber reports that getContents was closing stdin, rendering
r3383, autrijus++ | echo '"x" ~~ /y/' | ./pugs -
r3383, autrijus++ | unusable. Fixed.
autrijus it is all symbols visible from your lexical space.
it is a Pad 08:54
A Pad keeps track of the names of all currently-bound symbols, and associates them with the things they actually represent.
It is represented as a mapping from names to lists of bound items. This is to allow for multi subs, because we will need to keep multiple subs associated with one symbol. In other cases, the list should just contain a single value. See genSym and genMultiSym for more details.
TVar indicates that the mapped-to items are STM transactional variables.
(from haddock)
08:54 decay__ is now known as decay_
nothingmuch ok, gotta go 08:55
bbsoon
autrijus k
autrijus discovers that Pugs is larger than it looks 08:56
we're up to 12k lines... but more than half is documentation I think 08:57
still, 6klines is large :)
castaway doesnt sound all that huge to me.. (for what it does, it sounds pretty compact) 09:01
autrijus seen in #debian-devel: 09:02
jabbot autrijus: I havn't seen in , autrijus
autrijus <trave11er> dilinger: i cannot trust people who can write a 100+ line haskell program :-)
<trave11er> that's almost a legal definition of insanity
castaway heh 09:03
autrijus fwiw, I consider 6klines of perl huge, too
castaway checks
luqui and 6k lines of Java small ;-)
autrijus right :) 09:04
I think for <100 lines range, perl is usually more compact than haskell
but after that haskell is far more concise :)
autrijus wonders how good perl6's abstractions will improve this
castaway hmm, 6k in one file is certainly a lot..
I have several in the 1k-4k range 09:05
and probably adding various modules used for one program together would get me near 10..
Gruber autrijus: works, thanks! 09:08
autrijus Gruber: woot! 09:09
Gruber++
autrijus praises the "bugs are shallow" effect
I'll bbiab
autrijus ponders a "Building a cross-language community" for euro oscon 09:38
hm, maybe 45min talk 09:39
hm, require 'open-uri' is clever 09:41
it's somewhat like "use IO::All::LWP" but with a saner name :) 09:42
kolibrie did you post your 'learning parsec' paper anywhere public?
autrijus do I have this paper?
kolibrie I thought you submitted something for OSCON 09:43
autrijus no, for euro oscon
and it won't be due until Sep 5
so I'll start writing at Sep 5 :)
kolibrie ah
autrijus and it's "Learning Haskell"
and it's probably slides, not a paper
kolibrie I'm intregued 09:44
autrijus I still have to submit my Haskell Workshop paper about using GADT, STM and TH to implement a real language :)
(which is due in a couple of weeks)
not sure if it's "Lambdas in the Camel land" or "Camels in the Lambda land" 09:45
kolibrie or some of both 09:46
autrijus Camelambda? 09:47
kolibrie that's nice
but I like lambdacamels, too
lambdacamels in the camelamda land 09:48
autrijus "Lambdas in the Camel land: Building Perl 6 with GADT, STM, and Template Haskell" 09:50
probably good enough for the first cut
castaway sounds good
kolibrie I like it 09:51
autrijus :) bbiab & 09:52
09:53 Belial- is now known as Belial, Belial is now known as Belial-
kungfuftr anyone know where there's a Tk perl regexp gui thing? (i found one a while back but lost the url) 10:17
autrijus kungfuftr: perl.plover.com/Rx/paper/ ? 10:18
it may be horribly bitrotten; Komodo has a newer version of it 10:19
kungfuftr autrijus: yeah, i would use RxToolkit in komodo (since i get it for free) but it's a hassle to get it installed on our development boxes
autrijus: ah, wasn't really a debugger i was after tho 10:23
castaway hey kungfuftr 10:26
kungfuftr lo 10:27
castaway that sounds like a useful tool 10:28
(whatever it does)
castaway gets an email from Sophos HR ,)
Hmm, and she cant read her calendar.. "Thursday 24th May"? 10:29
nothingmuch wow, what a lunch 10:32
autrijus.resume 10:33
autrijus nothingmuch: yes?
where were we
ah. envLexical 10:34
so yes. Parser keeps track of the visible symbols in the Env's envLexical Pad
and reverts to old envLexical whenever we're done parsing a block 10:35
line 77, Parser.hs, ruleBlockBody
nothingmuch okay
one second
what is envLexical - a sort of stack head of sorts?
autrijus it's a Map
nothingmuch no, not the impl detail
autrijus it's a map from name to symbols.
nothingmuch you have a stack of envLexicals
autrijus I don't. 10:36
I have amap.
nothingmuch the parser pushes more envs
(hypothetically)
autrijus it's not pushed or popped
it's more like a hash.
nothingmuch so keys are removed?
autrijus yes.
if you do
my $foo = ...
{
my $foo = ..
}
nothingmuch how does each exp know what it's lexical env looks like?
autrijus the inner $foo overwrites the outer.
well, it doesn't. that's what the env provides
nothingmuch how is this rolled back? iwith a stackish metaphor?
autrijus an Exp is just a expression 10:37
it's rolled back by resetting to old lexical on block exit.
nothingmuch given exp { my $foo = 1; { $foo ++; my $bar = $foo; } }
old lexical scopes are kept in a metaphor for a stack?
autrijus the map is still destroyed
no.
the storage remains
the thing that is mapped to remains
but the map is destroyed forever 10:38
(unless you take a closure.)
when you take a closure, the closure remembers the pad
nothingmuch backup a bit
autrijus k
nothingmuch in the the whole program AST is an env
this env contains a tree of Expr
autrijus er, no, the AST is the Expr
nothingmuch and the data these Expr use
autrijus we have a Env that contains AST among other things
nothingmuch okay
autrijus the Exp may look like 10:39
(App (Var "&say") [(Var "$x")] [])
which is
$x.say
nothingmuch apply method say to var x?
autrijus but it knows nothing about what &say and $x is bound to.
yeah
or rather, apply the function bound to &say variable
with the $x variable as the only and first invocant
nothingmuch okay 10:40
the thing that expands the Var things does the lookups, right?
right
okay
it's how we get the proper thing into envLexical
so where do we look for them?
for this particular Exp
the answer i'm looking for is not envLexical
autrijus the Exp doesn't even know where to look
it's just a piece of data
nothingmuch rephrase:
autrijus the thing that looks for them is the evaluator
in Eval.hs
nothingmuch the evaluator working in the context of an Exp 10:41
okay
autrijus you can think of the evaluator as an object
with an internal "state" of a Env
and a method called "evaluate"
where it accepts a Exp and gives you back a Val.
nothingmuch (the thing the Exp reduced to?)
autrijus yes.
in the $x.say case, it gives back a bool::true
nothingmuch (does evaluate get an Exp + Context?) 10:42
autrijus and as a side effects, prints something.
no, it just gets Exp.
nothingmuch okay
autrijus the Context is also in the Env.
the Exp may explicitly requiest a context by using the Cxt node.
nothingmuch oh, i think i'm starting to grok
let me try then:
the evaluator traverses the Exp tree
reducing as necessary
upon entering an Exp, if applicable a new lexical scope is provided 10:43
and fused with the dynamic scope?
the new lexical scope is created by ...
... how do we know what OUTER:: is? CALLER:: is simpler for me to imagine, but i don't see how OUTER:: fits in without it being inside parent Exps 10:44
autrijus the easy answer is that, we don't have support for OUTER:: under this scheme.
since it's just a Map, not a [Map].
needs refactoring :)
(pugs has no OUTER support.)
(yet.)
but were we to implement that 10:45
the Pad will be a list of Map
nothingmuch so we are going to switch to a stack metaphor?
autrijus and whenever a new block is entered, the list is pushed
and when it's out, it's popped.
yes.
nothingmuch okay
so for the dynamic scope a new empty map is added
autrijus hm?
nothingmuch and for the lexical scope the correct map is fetched and also pushed
autrijus yup
nothingmuch temp $foo 10:46
autrijus when you call another function
nothingmuch okay
autrijus then the current envLexical is dropped
and the function's own subPad resumes
as the envLexical
nothingmuch and the global pad is another stack
okay
autrijus yes. it's different because it's a pointer to a stack
nothingmuch so right now, how is envLexical produced?
autrijus so you can freely modify it
envLexical is initially empty
when you declare a variable
my $foo
the parser sees it
parses it as 10:47
(Sym SMy "$foo" ...)
where the ... is the statements that follows it
nothingmuch Sym == ?
autrijus Sym is a constructor for Exp node
means "new symbol"
but anyway. the parser will generate a
nothingmuch okay
autrijus (Sym SMy "$foo" (Syn "env" []))
Exp
the Syn "env" is a special exp that evalutes the the env 10:48
as a VControl (ControlEnv Env)) value
it's saying "snapshot the Env and return it"
nothingmuch so when you compose a lexical scope you fish all the Sym SMy for all the non block sub Exps of the one you're entering, and add them into the lexical scope?
autrijus so Parser constructs that, unsafeEvalExp it
and get back a modified env with the new symbol in envLexical
nothingmuch oh, i see
autrijus the Parset sets the current Env as that
nothingmuch "every block is a closure"?
autrijus yes. 10:49
so, the Parser does something clever
for "my" variables
or rather, any nonglobal ones
it snapshots the "env"
and calculates the delta
i.e. what new symbols are generated
it's in unsafeEvalLexDiff in Parser.hs
so it discovers that there's a new symbol $foo
with an allocated storage 10:50
(all these is done by the reduction rule for Sym)
nothingmuch smiles
autrijus the Parser then returns a Exp that says
nothingmuch the reduction rule for sym happens at parse time, and closure return time?
oh i see
autrijus Pad SMy newPad restOfExp 10:51
nothingmuch it puts a wrapper around the exp that adds and removes new variable storage from the map
autrijus where newPad only contains the new symbols
yes.
nothingmuch unionPads?
that's very cute
autrijus unionPads merges OUTER with the new INNER
if we were to use a stack for envLexical
we simply rewrite unionPad to do the pushing thing.
nothingmuch okay 10:52
autrijus makes sense?
nothingmuch closures
yes it does =)
how do closures keep their lexical scope?
autrijus so to answer your question, Sym is only generated and executed by Parsing time
at runtime they are all Pads
nothingmuch vsub has an envlexical that it stole from it's parent at the time the sub ref was given?
autrijus all these tricks is to make the "my" pads reallocate storage when reentered
yes!
Eval.hs line 351. 10:53
nothingmuch oh! i forgot
i was trying to think how you tell apart a sub being returned and rescue it's parent's lexical scope
when returning a sub is really an application of an op to a block 10:54
okay, very cool
autrijus yup.
nothingmuch okay
autrijus ok. so parsing is probably just that
nothingmuch the notion of a dynamic scope a la perl5 local is not yet ready for pugs, right?
autrijus you mean temp?
nothingmuch that would require the global env being done in a stack? 10:55
yes, but for globals
in p5 i imagine each stash slot has a stack
local pushes a pointer to the head of the stash stack onto the call stack
autrijus temp is for globals.
p5 local is exactly p6 temp
nothingmuch when the call stack is cleaned up then all the stacks in the localized list are popped
i thought temp also works for lexicals 10:56
wait, that doesn't make sense
only let makes sense for that
autrijus yeah.
in pugs, I think we will implement it as part of BLOCK_EXIT
nothingmuch actually, it could make sense to localize lexicals
autrijus where is called whenever a exit happens
nothingmuch { my $var; sub { temp $var = $var + 1; &?SUB() } } 10:57
autrijus I don't disagree... and it should be the same thing
nothingmuch wait, add another sub to that
{ my $var; sub foo { temp $var = $var + 1; bar () }; sub bar { $var.say };
there, that makes sense
autrijus yeah.
I think what we'll do 10:58
nothingmuch it's very different from saying sub foo { my $var ...
autrijus is to install LEAVE blocks
aroun the sub foo
as part of its trait
that restores $var
nothingmuch brb, need to pee =)
autrijus I think we need to renormalize all this into the S04 system of closure traits.
nothingmuch ok, back 11:00
sorry, i had beer and coffee at lunch
okay, how does context application work?
autrijus it's simply
that envContext stores the context :)
nothingmuch as i see it we have two cases
one is that eval returns a value
and then this value is coerced
autrijus a context is just a Cxt 11:01
nothingmuch the other is that this happens as well, but the thing in the evaluator gets to ask what the context is too
autrijus a Cxt is just Void/Item/Slurpy plus a type
nothingmuch okay
autrijus the two cases are the same
nothingmuch given { stmt; stmt };
the outer context, and the second innner context are the same
autrijus when you want to evaluate a Exp in a certain cxt
uh no
in stmt1
the cxt is forced to by CxtVoid. 11:02
nothingmuch the first inner context is void
autrijus only stmt2 assumes outer context.
precisely
it's in line 286 Eval
nothingmuch is there a stack of contexts?
autrijus reduce (Stmts this rest) = do val <- enterContext cxtVoid $ reduce this
no.
you can ask for caller's context easily
nothingmuch has been liking stacks a lot these past 2 weeks
autrijus but there's no OUTER::Context
nothingmuch okay, so leaving an eval you just replace envContext with your parent's 11:03
?
that could be useful
autrijus uh, leaving an eval always keep Env pristine.
nothingmuch to implement the call builtin, for example
autrijus the only things that can change is the global pad.
and things in storage.
but from the Env point of view, it never changed.
nothingmuch who builds the env up, the eval, or the thing calling the eval
autrijus that's what the ReaderT part of Eval monad ensures.
the thing calling the eval 11:04
using runEvalIO
nothingmuch so read 'leaving an eval' 'after the eval returned'
and that's correct?
autrijus yup
inside the eval monad, when you evaluate any subexpression 11:05
you can freely modify its Env
nothingmuch alllright
so we have parsing and evaluation, basically
autrijus but the modification _always_ wears off when the subexpresisonr eturns
yes.
nothingmuch i think the next logical part is explaining how data is accessed
ITypes, etc
and i think after that VSubs and Prims
which I sort of know, but not 100%
and either way it's good documentation 11:06
autrijus ok. each variable is a binding from name to storage
there are all kinds of storage.
we currently all it ITypes
nothingmuch are variables first class data themselves?
autrijus s/all/call/
but they will be unified to the new object core.
yes, they are.
or rather, the storage are.
nothingmuch i.e., when I take a reference, do i get a variable in a variable? or only the container part of the variable?
autrijus a variable is just name and storage
you can take a symbolic reference 11:07
which refers to the name
nothingmuch okay, so variable is a kvp for name and container
autrijus or a hard reference
which refers to the storage.
nothingmuch damn, i'm lagging
autrijus nothingmuch: yes, if you discount multisubs.
nothingmuch okay
multisubs?
autrijus (which is a name referring to multiple storages.)
multi sub foo (Int $x) { ... }
multi sub foo (Str $x) { ... }
nothingmuch oh, that thing
autrijus here &foo refers to two things.
we can safely ignore it now.
nothingmuch right
but it's not really 11:08
foo is a lookup
the "name" is the full signature?
autrijus right. so I need to fix that.
yeah.
but it's not implemented like that currently
headsup: I need to go to dinner in a few mins
nothingmuch okay, lets ignore it now
so lets finish itypes, and then you can go?
i need to work myself
autrijus k. so ITypes.
ITypes are the same as TIE* 11:09
nothingmuch i types are perltie in haskell?
autrijus yes.
nothingmuch damn, i'm to oslow
=)
autrijus which means they are containers that responds to different things.
you're fast enough.
each IType demands a different interface
but the underlying implementatino is opaque.
all IType responds to object_iType 11:10
which is their Type, or Class
nothingmuch let me get something streight:
okay
autrijus k
nothingmuch is itype method dispatching going to be the same as MMD?
wait, no, tihat's nonsense
is implementing a new itype going to be similar to creating an overloaded object 11:11
which pretends to be a Str, or a Num
except that it pretends to be a container?
or are there some subtle distinctions?
btw, is the opaque type an itype too? 11:12
autrijus you know, that's an excellent question we have no spec of.
you're asking the API for Tieable.
my best estimate is that when we have Role
nothingmuch given enough meta meta on containers this is trivial
autrijus we can merge itype with role
exactly!
nothingmuch my $var is container(Class);
autrijus yup.
and that's where we would go 11:13
nothingmuch okay, funky
autrijus internal wise.
but no idea about syntax.
I don't think @Larry has settled it yet.
nothingmuch syntax is for p6l to discuss and @Larry to vetoe
autrijus we may need to improvise.
yup.
so to answer your question
nothingmuch okay, what about opauqe?
autrijus the VOpaque type is not used.
it's strictly for my $work ;)
with VOpaque you can masquerade any haskell type as a Pugs Val type. 11:14
as long as you implement fromVal.
it may also be useful for eval_haskell
and other haskell integration things
nothingmuch okay
autrijus but it's not part of p6 proper.
nothingmuch so how are object attrs dealt with?
autrijus you use the VObject
data VObject = MkObject { objType :: !VType , objAttrs :: !IHash , objId :: !Unique } deriving (Show, Eq, Ord, Typeable) 11:15
the objAttrs is a hash
an object is just: type, attrs, id.
nothingmuch so that *is* an itype interface?.
autrijus it's not
currently objects are just values
never containers
so you can't do tie().
nothingmuch actually why aren't they?
autrijus because we need Role for itypes
and Role isn't yet implemented.
when it is, it will.
nothingmuch okay, coolness 11:16
kungfuftr nothingmuch: implement Role!
=0)
nothingmuch kungfuftr: maybe after we all know about pugs internals =)
autrijus so anyway.
nothingmuch go eat, have fun
autrijus oh, that's all? :)
nothingmuch when we are both back we can continue, unless you feel like doing some more =)
autrijus nah. I'll go eat and pick up $work. 11:17
see ya
thanks for volunteering to do this :)
nothingmuch i need somethintg to get me reinvolved
scook0 hmm, looks like I missed lots of cool internals stuff while I was at work 12:31
autrijus & nothingmuch: please ping me if you continue talking about internals :) 12:32
nothingmuch scook0: i'll try to remember
either way, I'm going to graph and write up all this stuff
and put it in doc 12:33
13:03 odin__ is now known as Odin-LAP
svnbot6 r3384, Stevan++ | Perl::MetaModel - making the methods test pass again 13:46
r3385, Stevan++ | Perl::MetaModel - its MetaClass not Meta::MetaClass, forgot to rename the tests
broquaint finally gets his grubby hands on HOP 13:52
Limbic_Region broquaint - are you on the HOP discuss mailing list 13:53
broquaint I certainly am, L~R.
Limbic_Region or more importantly, are you aware that the errata are plentiful and on-line
ok
castaway grats, broquaint :)
broquaint Thanks, c :)
castaway and more penguin classics? :)
lumi What is HOP?
broquaint Not yet ...
Higher Order Perl, lumi. 13:54
castaway Higher Order Perl
autrijus $^perl
broquaint A hype-deserving book by Mark-Jason Dominus.
kungfuftr i've had HOP beside me for a few days now, haven't read it yet... 13:55
Limbic_Region has yet to read a single programming book all the way through but HOP came damn close
broquaint It looks shiny.
The cover's purty too.
castaway heh
shiny++
autrijus broquaint: the cover's romantic 13:57
broquaint Indeed, autrijus, maybe that's why it makes for a good "coffee table" look.
Most tech book covers are little on the ugly side, IMO. 13:58
autrijus it has the best explanation for CPS as I ever saw.
broquaint It has a CPS explanation? Marvellous!
autrijus (in the part of converting factorial() from recursion to iteration)
he didn't name it CPS :)
in fact, he doesn't really name things as they are named in the lisp circle.
Limbic_Region where CPS = Continuation Passing Style?
broquaint Aha, what should I be looking for?
autrijus (which is a good idea.)
broquaint: converting recursion to iteration, or something like that 13:59
Limbic_Region: yes
broquaint Ah, ok. Isn't recursion to iteration known as "recursion unrolling"?
autrijus yes.
broquaint Oh. I've done that before. Darn it. I was looking for deep scary magic :)
autrijus but in this specific case, he uses a explicit program counter and execution stack 14:00
and maintains the handler for returning continuation
so it's not quite spelt-out CPS
but all it lacks is an abstraction function that makes this explicit 14:01
broquaint Groovy.
svnbot6 r3386, iblech++ | EOL at EOF, usual svn properties. 14:02
r3387, iblech++ | Rubyish infix ops for set operations: [1,2,3] +# [1,2,6] ==> [1,2,3,6]
broquaint So it's deep voodoo for the non-shaman?
pasteling "iblech" at 80.81.16.226 pasted "Patch to implement user defined infix ops" (53 lines, 2.5K) at sial.org/pbot/10225
autrijus oh wow! 14:03
what's this about +# ?
is this t/unspecced/ stuff?
oh, it's Set.pm.
whew
Limbic_Region broquaint - mostly I would say that you have seen all and/or used all of the techniques in the book - maybe something will be new but unlikely 14:04
broquaint Can user-defined operators be scoped?
Limbic_Region what is more likely is you will see it applied in ways you hadn't considered before
autrijus iblech: kill line 1223
\\n List list , (List)\
in Prim.hs
broquaint Ah, nicely put, L~R :)
autrijus that shouldn't be there anyway
iblech: and you'll be fine. please check in after that. you++
Limbic_Region or, just as likely, you will see it taken a step further than you have seen before
autrijus iblech: or, if it still breaks, say so and I'll tkae a look
Limbic_Region I think MJD was getting at the fact that we tend to stay in our safe little perl sandbox and even when we invite other kids to play, it is still "our" sandbox 14:05
iblech autrijus: Whoa! That was easy =) Checking in...
Limbic_Region the book is about getting up with the other kids and walking over to their sandbox
iblech Committed as r3388. 14:06
autrijus iblech++
iblech Haskell++ :)
broquaint I have an interview on Wednesday so I wonder if it's a good idea to read HOP before or after ...
castaway heh.. where to? 14:07
svnbot6 r3388, iblech++ | User defined infix ops! :)
castaway is over there again a week thursday
Limbic_Region ok - I am off to $work
good job iblech et all
broquaint Later, L~R.
castaway Sounds like a fun book
broquaint multimap.com, castaway :)
castaway cool 14:08
iblech autrijus: Hrm... The patch seems to have broken "$"... :(
jhorwitz just read today's logs -- autrijus++ # pugs internals discussion 14:10
iblech autrijus: Or rather, it broke ";"
autrijus: Found the bug, committed as r3389 (was the same as with ",") :) 14:14
svnbot6 r3389, iblech++ | Unbreak ";".
autrijus iblech++ 14:17
iblech: I'll merge your infixOps into the faster envStash cache 14:28
sec
iblech sure :) I was a bit unsure about this 14:29
autrijus pugs> sub infix:<.> (Code &x, Code &y) { sub ($z) { x(y($z)) } }
pugs> (&say . &int)(10/3)
3
iblech yay!
autrijus this is really something :) 14:30
hey, would you ask on p6l about the prec level you chose?
14:30 x86_ is now known as x86
iblech You mean, what the default prec level of user defined infix ops should be? 14:31
autrijus yeah
iblech sure
autrijus yeahpugs> sub infix:<`map`> (&x, *@y) { map &x, @y } 14:32
er
pugs> sub infix:<`map`> (&x, *@y) { map &x, @y }
pugs> &int `map` (1.28, 2.56)
(1, 2)
autrijus is having much fun
autrijus is having a really bad idea...
iblech tell us :) 14:33
svnbot6 r3390, autrijus++ | * merge Unary and Infix userdefined ops into a shared
r3390, autrijus++ | cached envStash in Parser to speed up processing
castaway uhoh :)
iblech guesses... circumfix:<` `>?
Limbic_Region likely he is thinking a way of turning p6 inside out to reveal haskell 14:34
autrijus hm 14:46
can't quite do it.
pugs> say [ {$_ * 3} | $_ <- [1 .. 10],:{ $_ % 2 } ]
3 9 15 21 27
that's the closest I got
jhorwitz autrijus: for the parrot backend, is there a way to determine the order subs and module declarations are declared? right now we can't have more than one namespace since all those ops are grouped at the top.
autrijus jhorwitz: I think the subs should be prefixed with the package name too 14:47
methods currently are
maybe you can try methods first
jhorwitz and just output a .namespace op when i see the package qualifier?
autrijus yeah. I think. 14:48
jhorwitz will investigate
x86 man 14:49
these new operators and modified syntax is gonna be the death of me ;)
autrijus iblech: oh, the definition of prec is by "is tighter" "is looser" "is equiv" 14:54
I'll bbiab.
iblech autrijus: Ah :) I remembered something like that, but wasn't entirely sure 14:55
mkirank i get this error when i do a make 14:59
sorry
castaway thats a strange error 15:00
mkirank /usr/bin/hsc2hs -Isrc/syck src/Data/Yaml/Syck.hsc
Syck.hsc: In function `main' 15:01
Syck.hsc:62: error: syntax error before "SyckParser"
autrijus mkirank: hm. ghc 6.4? 15:26
mkirank yes
autrijus weird. 15:27
which platform is this?
and do you have an old hsc2hs lying around maybe?
mkirank fedora core 1
i did this n /usr/lib/ghc-6.4/hsc2hs-bin /usr/bin/hsc2hs 15:28
ln
autrijus latest pugs?
(from svn)
try running
mkirank just a min , i deleted the code and am now getting the latest from svn
autrijus you should have a wrapper hsc2hs 15:29
you're not supposed to run hsc2hs-bin like that
mkirank still get the same error
oh ok
autrijus autrijus.org/tmp/hsc2hs
that's hsc2hs on my system
svnbot6 r3391, iblech++ | * Fixed and unTODOed t/subroutines/operator_overloading.t. 15:31
r3391, iblech++ | * Unbroke "is".
r3392, iblech++ | Added an experimental fp (functional programming) module, with tests and
r3392, iblech++ | documentation.
autrijus iblech++ # craziness 15:32
iblech: why "o"? why not "."? ;)
mkirank autrijus: it works ..thanks 15:33
autrijus np :)
iblech autrijus: I thought "." would be visually too overloaded with the method invocation thing... (At least to me)
osfameron <aol>me too</aol> 15:34
iblech When is export tags work, we can do things like use fp :. or use fp :o (which looks somewhat strange ;))
autrijus ok. I'll use 22C5 ;) 15:35
&x ā‹… &y
iblech yeah :) 15:36
iblech adds that
integral not āˆ˜ ? 15:37
osfameron I could have sworn my irc client did unicode, but I can't see those. 15:38
autrijus it's neither, hrm
iblech osfameron: My fixed size font can't either (but copy&paste and view with some variable size font works) 15:39
autrijus it's a o in middle
osfameron ah, gvim shows the first as a . in the middle 15:40
the second as a degree sign (raised circle) 15:41
autrijus 25CB is it.
&x ōæ½xA1ōæ½xB3 &y 15:42
iblech: go with 25CB :)
iblech ok :)
autrijus mm the block starting from 2336 is fun
2336;APL FUNCTIONAL SYMBOL I-BEAM;So;0;L;;;;;N;;;;;
2337;APL FUNCTIONAL SYMBOL SQUISH QUAD;So;0;L;;;;;N;;;;;
...and so on...
we can plunder them all!
use APL;
kolibrie cutting and pasting still doesn't produce nice characters for me 15:43
am I missing a font?
autrijus probably 15:44
putter thinks pugs/p6 will need to include pointers to unicode resources...
kolibrie guesses as to which one I should get?
autrijus Vera doesn't have them? 15:45
I think arialuni.ttf is good
although I don't use it currently
integral yeah, it's got all those APL symbols
autrijus iblech: 15:47
sub infix:<ā‡’> { $^x => $^y }
kolibrie debian doesn't have a package :( 15:48
svnbot6 r3393, iblech++ | fp -- Added Ć¢ as function composition op. Unicode++ :)
iblech Hm... does that fit fp.pm? I think it should go into Prelude.pm :)
iblech adds it nevertheless :) 15:49
autrijus you mean sub infix:<ā‡’> { $^x => $^y }
?
lol
iblech yes 15:50
Hmm... we need circumfix (I want āŽ£...āŽ¤ :)) 15:53
svnbot6 r3394, iblech++ | fp -- Added Ć¢ (=>).
r3395, iblech++ | Added test testing that the reduce meta op works with user defined ops. 16:00
putter Could someone do a test for me? On a non-amd64 cpu with _external parrot_, move t/rules/Disabled/from_perl6_rules/subrule.t elsewhere, say t/aaa/, and tell me if you get a nice PGE failure, or an unfortunate test hang. I have 16:01
several tests with this behavior, but if its just amd64, I'll un-disable them...
autrijus putter: 16:02
<?abc>
is not yet supported in PGE.
with latest pugs I get nice PGE error.
try it in amd64 again? Gruber and I fixed a related bug
putter autrijus: r3392. mostly works. :) as for the "hang"... 16:09
svnbot6 r3396, autrijus++ | * according to luqui, we place userdefined infix as the
r3396, autrijus++ | same precedence as &infix:<+>.
r3397, autrijus++ | * Igloo pointed out the Unicode standard has
r3397, autrijus++ | infix:<Ć¢>, not infix:<Ć¢>, as the function composition
r3397, autrijus++ | "ring" operator. Oh well.
putter at least today, the "hang" on subrule.t is a just a long pause... followed eventually by a skip tests ?!? ok, that's wierd... 16:11
wolverian er. Ć¢ doesn't look like a composition operator :) 16:13
svnbot6 r3398, iblech++ | Added more Unicode ops :) 16:14
putter as everyone scurries about improving the unicode support, lets capture the info in say a unicode section of README? 16:15
s/the/their/
autrijus wolverian: blame the bot
wolverian gladly :) 16:17
autrijus hm, 16:24
qsort =: ]`(($:@:((}.<:{.)#}.)),{.,($:@:((}.>{.)#}.)))@.(*@#)
cute.
umbop eh what does that do? 16:25
putter eeep.
autrijus umbop: it implements the quicksort algorithm
umbop ahh 16:26
autrijus ] is id, @. is ??::, {. is head, }. is tail, @: is o, [: is (), *: is sign, #: is length, :# is grep 16:27
$: is $?SUB
amazing, no?
# en.wikipedia.org/wiki/J_programming_language
(this is for real)
alphabets are for wimps! ;) 16:28
"punctional programming"
wolverian looks like an ugly version of APL 16:30
autrijus more advanced too
maybe there's a correlation
umbop checks it out
autrijus it's a marriage between APL and Backus's FP
two language widely known for clear-as-ink legibility 16:31
I'm feeling much better for perl now :)
iblech :) 16:32
autrijus use j;
hmmmmmm. 16:33
ninereasons what does "autochomping" look like? is that exactly equivalent to "is chomped" ? # A06 "Or better, use an autochomping filehandle"
autrijus ninereasons: I don't know, it's essentially unspecced 16:34
putter hmmm, use perl5; ... use apl; ... use j; ... use ruby; ... use python; ... use scheme; ... weeeee. 16:35
autrijus wheee
ninereasons use hugs with pugs;
putter *laugh* 16:36
autrijus ./pugs -e 'āˆæāŒ¶ā‹ŖāŠØāŒ†āŠ›āˆ·āˆ‘āŒæāŒ‹āˆ°āŠ£āŠ„āˆŠā‰āˆāŒ„ā‰Æā‰æāŒ¶ā‹ˆā‰³ā‹—āˆØāˆ˜āŠ”ā‹¼ā‹āŠŗāŠ‰āŒžāˆā‰“āŒ–ā‹›āŒ‹āˆ·āŒ—ā‰āŒ‘ā‰ā‰ā‰°āŒ„ā‰¦ā‰—ā‹²āˆāˆ²āŒ“āŠŒā‹›ā‰Šā‹œāŠ»ā‰āˆ™āŠ¶āŒ¶ā‰„ā‰§āˆŸā‹”āŒŸā‰…āŠŒā‰…āŠŖā‹“āˆŠ[' 16:37
Hello, World!
wolverian haha. 16:38
PerlJam autrijus: you just exponentiated JAPHs to a rather large power. 16:39
autrijus PerlJam: I hear there is a a JA*H contest in APW/FPW. 16:40
where people submit JA*H with any of the Parrot languages 16:41
including Pugs (in interpreter mode)
and PIR/PASM
I'm one of the judges :)
putter autrijus: should something like subrule.t be/notbe unDisabled? It PGE Parse fails, it "dubiosly" dies, it (or at least some others) hangs make test on amd64-external-parrot... which, if any of these, should keep something Disabled...? 16:43
autrijus putter: I think I'd like to move all the rule tests to Parrot tree.
under t/p6rules/
where they belong, really 16:44
putter k
autrijus I wonder if you can investigate into a simple conversion that transfoer our Test.pm format to parrot's
wouldn't be hard
the external/embedded/unavailable thing is perhaps too much to handle here
since we just use PGE verbatim
it makes sense to transfer our 800ish tests there
putter 5000ish+800ish ;) 16:45
autrijus :) 16:46
svnbot6 r3399, iblech++ | fp -- Updated the documentation of fp.pm. 16:50
putter autrijus: ok, some of from_perl6_rules could be moved over. but some is necessarily p6 (captures, grammars, etc). 16:54
so... with me bearing in mind that some cruft can be pushed off to parrot... same question (unDisabling contraindictors)... 16:55
unless I missed something obvious? one could do many/most of the tests with p6rule_like, but some of the tests are of p6 rules, grammars, etc, not merely of PGE. 17:02
autrijus right. 17:08
but subrules can be pushed to add_subrule too
I can help with that 17:09
the .from .to etc tests we can test with PCRE
it may make sense to do a minimal set of sanity test with PGE
that are unlikely to fail
with either embed or extern
17:11 TSa is now known as TSa_ 17:12 TSa_ is now known as TSa
putter steps back to peer bleary-eyed at the big picture... 17:14
some issues are pure pugs, eg parsefails, and I know how to deal with them (fail("FIXME...)#...) 17:16
external parrot on amd64, which used to be entirely broken, failing explosively, is now sometimes working. it looks like 17:23
current there may be, perhaps, two failure modes. it seems rules which are skipped are sufficient to cause difficulty. this may or may not suggest 17:24
that it is a codgen, rather than pge problem. 17:25
svnbot6 r3400, ninereasons++ | fiddle with quote generator (esp. "pick any" to "pick") 17:27
17:29 _metaperl_ is now known as _metaperl
putter autrijus: how about this: 17:38
I'm going to ignore the test hanging unless it turns out to affect something other than amd64/external. It's not clear anyone but me is using amd64, and its still not "real" (eg, you get cvs head, which may or may not compile on amd64 on any particular afternoon, and ...). 17:40
autrijus listens
sure, I can live with that
but I still want to get to bottom of hanging
hanging is always external?
can you point me to a hanging case?
putter agreed, yes, and ... 17:41
Disabled/from_perl6_rules/anchors.t ... I've never seen it run external, and runs fine internal. 17:42
autrijus hangs here to. so there :) 17:43
putter non-amd64?
autrijus aye
putter oohhhh..... foo!
autrijus I know why. 17:44
externpge hangs when matchstr contains \n.
sorry I had not got around to test this earlier, causing you much trouble
autrijus fixes
putter sooo np. trbl caused drawfed by joy of anticipated coming trouble dissappearing, poof. 17:45
post mortem note to self - make sure the "it's not my problem" exploration bound keeps getting updated to include atleast a depth 1 look at all surrounding problems. oops. my oversight. 17:49
autrijus gah. line buffering. 17:50
who invented this line buffering thing?
clkao autrijus: oh i thought my tests are passing.. not in class
method form?
autrijus clkao: right, that's next 17:51
iblech got infix working
be patience ;)
s/patience/patient/
putter my fuzzy recollection is it's a teletype thing.
autrijus you can use sub form already though.
clkao how good is parrot's native call invocation? 17:53
autrijus very good 17:54
see pdd16
Juerd I HATE SOFTWARE
autrijus www.parrotcode.org/docs/pdd/pdd16_n..._call.html
hi Juerd
Juerd Except Pugs, of course.
putter Juerd: And yet, I periodically encounter otherwise rational and experienced people who don't think of software engineering as breathtakingly massive unmitigated disaster. Bizarre. 17:57
svnbot6 r3401, ninereasons++ | hash more correct than array
Juerd putter: I doubt they really are experienced 17:59
putter: With regards to software, that is
putter Juerd: if ones experience is limitted to one or two communities, eg C++ and Java, and throughout your career "things have only been getting better and better"... it's not difficult to miss the big picture. 18:03
ajs I regard software engineering as a whole to be astoundingly successful to the point of near-miraculous. It's like a sustained 50 year long 10million car crash that manages to produce any amount of useful work ;-) 18:04
autrijus mumbles something about proof-carrying code 18:06
ajs autrijus: Most discussions I've heard about using such a construct end in "how does one represent the proof for 'I kinda, wanna, sorta... you know... and then print the result'" 18:07
;)
Which I think is -Q in Perl 5.... 18:08
autrijus -Q?
./pugs -e 'āˆ€ x. DWIM x'
ajs made it up... point being that perl "kinda sorta ... you know"s all over the place, and that has its use, even when you can't prove it's WIM 18:09
Hmmm... I guess that leads to TMTOWIM ...
putter eval('class Foo{}'); Foo.new(); ... *** Error: No compatible subroutine found: "&Foo" :( 18:10
eval('class Foo{}; sub foo(){Foo.new()}'); ... *** Error: No compatible subroutine found: "&Foo"... ^.^ 18:13
autrijus it worksforme... 18:15
pugs> eval 'class Foo{}; sub foo(){Foo.new()}'
undef
pugs> foo()
{obj:Foo}
iblech works here, too
putter for me too. but eval "class Foo{}; sub foo(){Foo.new()}" doesn't. (" instead of ') 18:19
iblech ah! That's because {...} interpolates in double quotes strings
putter duh. tnx. 18:20
ajs Someone needs to start building the "what you'll do wrong in the first 15 minutes of using P6" list... hmmm, maybe I should...
putter (oft repeated) postmortem - cut and paste your test cases exactly. no, it *does* matter. ;) 18:21
ajs But not until I'm done sorting out the changes to S29, which I'm now doing on hands and knees to make sure I don't do anything really stupid.
putter autrijus: is the externpge fix still in progress? 18:24
autrijus aye 18:27
I'm close
putter no hurry. just checking. 18:30
pugs> class Foo{}; undef pugs> sub foo(){Foo.new()}; undef pugs> foo() *** Error: No compatible subroutine found: "&Foo": NonTerm (MkPos "<interactive>" 1 11 1 20) at <interactive> line 1, column 1-6 18:32
pugs> sub f(){"f1"} undef pugs> f() 'f1'pugs> sub f(){"f2"} 'f1'pugs> f() 'f1' 18:35
autrijus done.
vcv-- autrijus: do you sleep man? im dumbfounded how one man could produce a perl6 interpreter and make as much progress as you have in a matter of 3 1/2 months. you are not human.
putter re done, :) 18:36
autrijus putter: check? 18:37
r3402.
putter in progress...
autrijus vcv--: Pugs is also a compiler now :)
vcv-- jaw drop
autrijus that's how we can make mod_pugs work.
svnbot6 r3402, autrijus++ | * Fix a bug in run_pge in external single-process parrot mode:
r3402, autrijus++ | Previously, rules cannot contain newlines due to line buffering.
r3402, autrijus++ | putter++ for catching this.
autrijus (it compiles to parrot assembly.)
vcv-- compilers to w--ooh 18:38
-r
autrijus and embeds parrot too, so you can try
./pugs -BParrot examples/mandel.p6
for example.
vcv-- i want to get my hands dirty with all this stuff in the future. just need to get myself adapted to everything going on
autrijus :)
vcv-- not perl6/pugs itself, but the development :) 18:39
autrijus read journal from way back then :)
as for progress... note how the list of AUTHORS grows almost 1:1 with days
vcv-- Yeah. I've been reading up as much as I can
autrijus we had 101 people at 101st day
vcv-- Oh. heh.
autrijus so it's not me :)
<- accounts for a very small percentage of checkin now... 10% or so
vcv-- still impressive
autrijus thanks :) 18:40
yo theorbtwo.
vcv-- I wanted to try to contribute, but i've never used haskell before and learning it has proven harder than i thought
autrijus you can write modules, tests, examples, docs :)
there's no need to mess with src/...
...initially anyway
vcv-- That's what I'm best at though, raw code.. not the other stuff :p but not a bad idea anyway. 18:41
autrijus modules are also raw code...
Perl::MetaModel is as hardcore as you can get :)
svnbot6 r3403, iblech++ | One step closer to get the [...] metaop working on all (and user defined ops). 18:42
r3403, iblech++ | They now parse correctly (I think), but the necessary &prefix:[...] subs aren't
r3403, iblech++ | yet generated automatically.
r3403, iblech++ | Added more tests to reduce.t.
theorbtwo Ho, autrijus. 18:43
autrijus iblech++ # yay
vcv-- my dream is to be able to use an embedded perl6 within my own native applications. whats more powerful for extensibility than being able to control an app with p6 scripts? :)
autrijus after you get [...] working, >> << too :) 18:44
integral hmm, do we have shaped arrays in pugs?
autrijus vcv--: modparrot already does that!
integral: no
integral oh. pity
vcv-- you gotta be kidding me. what havent you guys thought of?!
integral is going to write some matrix code one day
theorbtwo Matrices are a big PITA. 18:45
autrijus vcv--: I don't know, I can't think of things that I can't think of
vcv-- wait.. mod_parrot or modparrot..?
mod_parrot is for apache isnt it?
autrijus yeah
mod_parrot
vcv-- ah. well im talkin' like windows applications, or *nix apps, not web apps.
autrijus there's this XSLT library 18:46
vcv-- Like an IRC client im working on. i know xchat can do perl scripts, and irssi too? but..hm..
putter parrot is supposed to be embeddable, with a C api. the C api has historically lagged rather far behind PIR however. I don't know current state. 18:47
autrijus that lets you use perl6 to define xslt functions :)
putter: oh, thanks to jhorwitz it's pretty usable now.
vcv-- thanks for that info putter.
that would be perfect
autrijus otherwise pugs couldn't have use embedded PGE
theorbtwo Autrijus: I need some way to start feeling like I'm contributing again.
Any suggestions?
autrijus theorbtwo: eval_haskell for arbitary Value datatypes? 18:48
vcv-- any estimate on how much of a footprint embedded parrot+p6 would be? memory and disk space.
autrijus theorbtwo: or, if you're crazy, port Perl::MetaModel back to haskell?
vcv--: parrot can be run in a shared-vm mode so the footprint is minimal for multiple instances 18:49
theorbtwo Hm, I wonder if I can do that without circularity.
putter hmm, in that case I should figure out who's doing ruby on parrot and mention I have a "mutate ruby source to produce ruby/parrot hybrid" for a migrational approach...
autrijus vcv--: as for single process, I'm seeing 2609k here
(for actively used memory in libparrot)
putter: ponie for ruby? 18:50
vcv-- hm.. not too bad. my irc client uses very little memory as is right now, so i can throw something like embedded parrot in there without hurting mem usage too much
PerlJam heh, "embedded parrot" sounds strange to me. 18:51
autrijus PerlJam: not stranger than embedded libperl
(which is used in irssi among other places) 18:52
PerlJam true.
vcv-- ill have to look at libperl too.
PerlJam parrot would be more embeddable if it weren't for icu
vcv-- have an abstract layer for scripting and put libperl in there for now.
integral I thought the icu dep was dead now? 18:53
autrijus icu dep is gone.
thank eris.
PerlJam oh good. /me hasn't paid too close attention to his parrot build 18:55
autrijus starts thinking a bad thought.
autrijus tries to make it stop.
PerlJam even still, an icu-less parrot is freaking huge. ;)
autrijus 2609k active isn't _that_ bad :)
esp. when it can be shared among all processes 18:56
that is a good design, I think
vcv-- hows the Win32 version(s) of pugs? no difference from the *nix version?
autrijus vcv--: there are some minor differences
similar to how win32 perl vs unix perl
concerning blocking, thread behaviour, sockets, etc
(and you don't have symlink() and link() yet) 18:57
PerlJam autrijus: yeah, I'm still adjusting to the economics of plenty. I have vivid memories of when memory/disk/etc. *weren't* cheap or easy to come by
autrijus but otherwise should be the same
PerlJam: me too.
vcv-- ah..gotcha. to only differences are related to the different architecture in the platforms
autrijus "I still remember when a hard disk is less than one gigabyte!"
"er, what is a gigabyte?"
vcv-- haha :)
theorbtwo still remembers when hard drives were near-mythical.
jhorwitz autrijus: i want eval_parrot to output literal PIR when using the parrot backend, but can't seem to get around its being assigned to a PMC reg. ideas?
vcv-- I'm sacrificing memory efficiency for performance in my app. some stuff uses more memory than i could make it, but the advantage is performance gains. 18:58
PerlJam theorbtwo: Do you mean "near mythical to ordinary people" or "near mythical" in general? 18:59
theorbtwo To ordinary people.
I'm not that old.
PerlJam just checking ;-)
autrijus jhorwitz: what do you want literal pir for?
PerlJam I remember saving my programs to tape
and 8" floppies
autrijus jhorwitz: in external parrot mode we already do literal pir
that's what _DoCompile gives you 19:00
jhorwitz autrijus: i can use it as a stub for missing functionality in mod_pugs HLL layer
PerlJam fortunately though, I never used punch cards
vcv-- Can pugs or parrot make sandwiches yet? seems like the only thing left on the list of things it cant do. 19:01
jhorwitz vcv--: if you write a test for it, it will eventually. ;-)
gaal @sandwich = bum_generator Y $filling, no? 19:02
autrijus jhorwitz: sure
vcv-- Nice! :P
autrijus resumes the train of bad idea 19:03
jhorwitz autrijus: will check it out -- thanks
gaal bun_generator, actually, would probably make for better sandwiches.
vcv-- Y eq zip operator?
PerlJam vcv--: yep 19:04
(ish)
autrijus still wants YY
vcv-- Didn't know if that was valid or gaal just didnt want to type the real op :p
gaal wants $$$
autrijus, what would YY do? 19:05
vcv-- ōæ½xA5
PerlJam gaal: analogous to x and xx
gaal that works too, vcv--
ah, interleave whole lists? 19:06
would that preserve their lazines?
vcv-- I assume p6/parrot will support unicode out of the box. Meaning, there won't be an aSCII version and a Unicode version?
gaal 1 .. Inf YY ("never seen") ?
PerlJam vcv--: that's the plan!
vcv-- Aw. damn unicode overhead :( 19:07
autrijus gaal: YY is like Y but get shortest.
PerlJam vcv--: what overhead? It's only there if you use it just like anything else.
autrijus vcv--: the entire unicode overhead is 32360 bytes :)
(in executable size, if you only use utf8 and basic level 1 support) 19:08
wolverian I need something to code in perl6.
PerlJam autrijus: perhaps he was thinking of the cognitive overhead?
vcv-- Hey! let me illogical hate unicode in peace :)
illogically
PerlJam wolverian: wordfind
wolverian PerlJam: what's that?
PerlJam wolverian: troll MJD's qotw
theorbtwo vcv, we like unicode around here.
Note the AUTHORS file.
vcv-- Yes. I'm just joking, no offense meant :) 19:09
PerlJam theorbtwo: My god, it's full of foreigners! ;-)
autrijus finishes the train of bad idea.
PerlJam autrijus: did it wreck?
autrijus no, it works
I think pugs OO may need to wait a couple days so I can spike this :)
autrijus decides to write Inline::Perl6 (without Inline::GHC)
vcv-- autrijus: did you implement ./ for method calls on the invocant or is that not a finalized decision? 19:10
ninereasons it'
autrijus vcv--: that is as finalised as we can get (larry said go ahead)
PerlJam thinks of /. everytime he sees ./
ninereasons it's part of wizard.p6, vcv--
vcv-- I thought that too at first, PerlJam. Made my blood boil for a minute ;) But I like it
autrijus you can define the /. operator 19:11
sub prefix:</.> { "troll $_ dup $_ dup $_ troll" }
or something like that.
vcv-- hahaha :)
theorbtwo karma vcv 19:12
autrijus pugs> sub prefix:</.> { "troll $_ dup $_ dup $_ troll" }
pugs> /. <SCO>
'troll SCO dup SCO dup SCO troll'
works just fine
vcv-- why the <>?
autrijus it looks better than '' and ""
:)
the perl 6 <> is perl 5's qw() 19:13
vcv-- Heh.. ok.
qw() is so ugly
wolverian hrm. does anyone know of a clean way to use the debian ghc packages on ubuntu hoary? debian ghc6 wants to upgrade my cpp packages to the debian versions, which strikes me as risky..
autrijus hm. Inline::Perl6 or Inline::Pugs?
or Inline::Perl6::Pugs?
opinions?
Corion wolverian: Install Debian in a chroot jail? :)))
wolverian Corion: don't mock me. :)
Corion Inline::Perl6 - you can exchange Pugs and Perl6 later :-) 19:14
vcv-- What for autrijus?
ihb Inline::Perl6::Pugs.
autrijus vcv--: for a CPAN module that lets you mix perl6 code with perl5.
integral Inline::Pugs 19:15
autrijus vcv--: by basically running an external pugs process in harness mode.
oh wow. three people, three different options
that's very diversed :)
vcv-- Inline::Pugs
theorbtwo Inline::Perl6::Pugs or Inline::Pugs both sound good to me.
autrijus it looks like Inline::Pugs is winning then :) 19:16
vcv-- Inline::Perl6UsersGolfingSystem 19:17
ihb vcv-- and integral: why Inline::Pugs over Inline::Perl6::Pugs?
vcv-- :)
Corion mmm. I think that ghc system() is at least as broken as Perl5 Win32 system() -- does anyone have experience with GHC system() vs. quoting ?
integral there's no need to a) broadcast it's perl6, we know, and b) no need to prevent name space pollution
vcv-- I think Inline::Perl6::Pugs is a bit redundant
autrijus Corion: there's a nonescaped way
castaway Inline::Pugs++
autrijus probably the same reason as why it's not Inline::Scheme::MzScheme but Inline::MzScheme
vcv-- Pugs has "Perl6" in it already ;)
autrijus vcv--: mm very good point!
Corion autrijus: On Win32, system(@list) is , more or less, system("@list")
theorbtwo The "we know" argument depends on the value of "we". 19:18
Corion ... so the program has to do some param encoding.
integral well when real people start using perl6 there'll hopefully be a real perl6 called perl6...
Corion I think I should add the tests I have for Perl5 and then maybe make Pugs better than Perl5 :)
ihb when inlining a language i think the existing pattern on CPAN is Inline::<lang>, and Pugs isn't the language (is it?). 19:19
Corion integral: Yeah. It would be a shame if Perl6 remained restricted to us irc bots ...
autrijus Corion: invoke it like
system("cmd", @list)
integral well what Pugs implements isn't perl6 really, ihb ...
autrijus still badly escapes?
theorbtwo It isn't, integral?
castaway they're not all that schema ihb, iirc
integral It can't be surely? We didn't have user-defined operators until yesterday for example 19:20
autrijus ihb: there's really no pattern :)
ihb castaway: some Inline modules aren't about languages at all, e.g. Inline::Files, but i don't count them right now :-)
integral and there's ./ which isn't in the spec
autrijus Inline::Guile, eg
Corion autrijus: That won't work with quoting. I'm quite sure of that, but I'll check, of course ;)
stevan iblech++ # fp.pm is soooo cool 19:21
howdy all :)
theorbtwo integral: Well, it aims to be perl6, in the limit.
autrijus hey stevan-san
iblech stevan: Thanks :)
theorbtwo as t -> Inf, pugs -> perl6.
ihb autrijus: now that's a good reason to call it Inline::Perl6::Pugs because i had no idea Guile was a scheme interpretor. :-)
castaway Inline::Guile - Inline module for Guile Scheme interpreter
autrijus ihb: rofl!
vcv-- noo. too redundant!
theorbtwo thought Guile was a dialect of scheme, not simply an implementation of it. 19:22
(Reminds me, I wanted to start doing the MIT OCW...)
stevan iblech, autrijus: I think we need to think about perl6 and the ICFP contest :)
castaway shrugs
ihb theorbtwo: yeah, that's probably more correct.
autrijus stevan: yes :)
Corion How soonish is the next release planned? Next Monday?
autrijus Corion: that's the idea
monday my time, sunday probably your time
with changelog and bugfix in weekend
i.e. as usual.
Corion Ah - so I have a bit of time to put in (failing) system() tests and maybe even fix these.
ihb Inline::Scheme::Guile, even I get what that module is about... ;-) 19:23
autrijus go ahead :)
Corion Most likely they'll only break on Win32 anyway.
autrijus Corion: you know there's no freeze really :)
Corion autrijus: Yeah, but I don't want to suddenly commit a lot of stuff while everybody else is in preflight ;-)
autrijus Corion: it will simply result in all those stuff being force_todo'ed, marked out of MANIFEST, or simply ignored :) 19:24
vcv-- I need to get my hands dirty with Win32 stuff in Pugs. thats my area of expertise 19:25
Corion vcv--: Welcome to the club ;)
autrijus vcv--: then learn from Corion :)
vcv-- woohoo, not alone!
i do find it funny that I love perl so much and what its capable of, but dont use or even really like *nix 19:26
Corion autrijus: I think I'll include a small Win32 .exe file just like Perl5 does - we don't want to rely on a C compiler being available, do we?
vcv--: The OS is merely a way to run Perl
autrijus Corion: perl5 includes a small win32.exe?
vcv-- yes yes i know
Write your own C compiler :)
Corion autrijus: The test suite for system() does.
autrijus oh. that.
sure, go ahead 19:27
include a copy of its source :)
Corion autrijus: I have a suite of tests for Perl5 and what I think is a good fix, but I never got around to actually patch Perl5
ninereasons there doesn't seem to be a quote operator that has quote protection, yet. Is that so, or am I wrong ?
Corion autrijus: It comes with source and tries to compile it before uudecoding it :-)
ninereasons: "quote protection"?
vcv-- Well, that wouldnt be so bad. A hello world .NET application (just a form and a "hello world" label) uses 12MB of memory
ninereasons <<a b "a and b">>
('a', 'b', '"a', 'and', 'b"')
Corion ninereasons: Maybe you want \a0 - nonbreaking whitespace? 19:28
autrijus is <<>> specced to offer quote protection?
Corion (but no, there is no such protection that I'm aware off)
theorbtwo can write something that win32 will interpret as a foo.exe in 2 bytes.
ninereasons I believe so, autrijus
S02
vcv-- theorbtwo: ???
Corion theorbtwo: The .exe has to echo back the command line ;)
autrijus ok. bug then, write test, link to S02 :)
theorbtwo 0xF0 0x0F
vcv-- hold on lemme open up my masm32 manual :p 19:29
ninereasons yes sir, autrijus
:)
Corion 0xF0 is jump near I think
autrijus ninereasons++
Corion "++" is like conditioning of dogs, dolphins or other animals after they've performed a neat trick :-)))
autrijus Corion: you can write a small "haskell" application ;)
vcv-- F0 = lock 19:30
autrijus Corion: and build it with pugs. or even use pugs itself
Corion autrijus: Aaaah - interesting idea! Except that I then get Haskell command line parsing.
vcv-- what does "lock" do on x86? never seen it
Corion autrijus: I don't trust pugs - I want to test the pugs command line construction via system(@list)
theorbtwo Does nobody but me remember the 0xF00F bug?
autrijus Corion: no, not really
Corion vcv--: It locks the bus - I've never used the instruction, but I think it was when the math coprocessor was still in use
castaway has a cpu with that bug 19:31
vcv-- gotcha.
0xF00F isnt a single instruction then is it?
theorbtwo It's a single instruction with a prefix.
autrijus Corion:
foreign import ccall unsafe "getProgArgv" getProgArgv :: Ptr CInt -> Ptr (Ptr CString) -> IO ()
then 19:32
alloca $ \ p_argc ->
alloca $ \ p_argv -> do
getProgArgv p_argc p_argv
vcv-- hm. well this op code list i have says 0F is a prefix, and F0 is "lock"
autrijus argv <- peek p_argv
that's all
Corion autrijus: Aaah - but on Win32, ProgArgv is not an array but a string ;)
vcv-- so im just confused by F00F
autrijus Corion: then you print that string
:)
theorbtwo Yeah, it confused the CPU too.
vcv-- Oh, gotcha :p
autrijus oh wait, I'm not making sense am I
vcv-- so you were just being a bastard, heh.
autrijus you need some API call to get the original string 19:33
vcv-- not a fan of Win32 eh?
autrijus whatever you do in that small C program,
just FFI it
Corion autrijus: I'll look at it - but if that gets me around using/implementing uudecode (pack/unpack), that's fine ;)
autrijus: yeah - FFI is easy now, at least for me ;)
vcv-- autrijus: API to get the command line arguments?
theorbtwo It was a CPU bug, not a OS bug. (Though it can be worked around in the OS.)
vcv-- oh. duh.
autrijus Corion++ # "easy"
theorbtwo The point is that win32 will happly execute a old-sk00l .com file named foo.exe. 19:34
...which is useful when you want to produce very small executables.
vcv-- like 5 bytes
theorbtwo Yeah. 19:35
If I had my peter norton asm book, I'd write one.
vcv-- a COM file is just basically an EXE with no headers?
theorbtwo It's just a plain memory image. It's loaded at offset 0x100 from the beginning of a sector, and the first byte JMP'd to. 19:36
(The first 0x100 bytes are the PSP.)
vcv-- gotcha. i always just thought it was a different formatr 19:37
theorbtwo grrs. 19:39
GNU Make should have a default Makefile.PL -> Makefile rule. 19:40
putter autrijus: re pony, yes. (back from a call, will have externalpge tests done in a bit...) 19:42
Darren_Duncan I have a question about the include directories 19:43
I wonder why '.' is last on the list rather than first?
I considered reporting that as a bug in Pugs, but then saw that Perl 5 did it too, so figured there may be a reason 19:44
vcv-- I hate makefiles with a passion. am i the only one?
theorbtwo Keeps attackers from overriding some well-known module in the CWD, and hoping an admin will do something from that dir. 19:45
Darren_Duncan in my mind, '.' is like a local scope of sorts, and it usually makes sense for items of the same name there to override others, such as if you are testing an upgrade to one
theorbtwo vcv--: I hate Make too.
Allo, nothingmuch.
Darren_Duncan but now that I think of it, as you say, security seems to be a great big reason in favor of the current system
nothingmuch evening
seen autrijus
seen autrijus? 19:46
Darren_Duncan a few minutes ago
castaway 10 minutes ago, nm
vcv-- when im working on a project in c/c++, i just want to add the files to a project file, and let the compiler decide what to do
putter yeah! no-hang. it's still different though. anchors.t gives a nice 12/19 TODO bug tests on embedded, but on external...:
theorbtwo last saw autrijus at 21:33
putter t/aaa/anchors...................................ok 19/19# Looks like you failed 1 tests of 19
vcv-- i dont want some 10kb file describing how to compile it
putter t/aaa/anchors...................................FAILED test 5
Failed 1/19 tests, 94.74% okay
nothingmuch which bot does the seen stuff? 19:47
putter my Test-fu isn't good enough to immediately tell what's happening.
Corion putter: pugs -Iblib6\lib -w t/aaa/anchors
putter: pugs -Iblib6\lib -w t/aaa/anchors.t # I meant
vcv-- Makefiles are like women. gotta get every detail right. huge complicated list of how things need to be done. instead of just doing it. 19:48
theorbtwo perlbot: seen theorbtwo
jabbot: seen theorbtwo
...or not.
castaway silly bots 19:49
Darren_Duncan maybe the bot is down at the moment?
someone used seen within the last 2 days, and it worked then
autrijus hi nothingmuch. 19:50
I'm almost done with first cut of Inline::Pugs 19:51
a sec
Corion seen theorbtwo
nothingmuch oooh
theorbtwo can see theorbtwo's hands typing.
autrijus I think it makes sense to put it within lib/Inline/Pugs.pm.
in the pugs tree
(I think.)
Corion Does Pugs have "do $file" ?
nothingmuch i think so to
o 19:52
autrijus Corion: no, and I think that's gone
Corion autrijus: Too bad :)
nothingmuch how does Inline::Pugs do the glue? GHC in perl?
autrijus nothingmuch: eventually.
currently it uses this clever thing
my $ZZZ= =$*IN;while 1{$_=perl eval eval=$*IN;say$!//$ZZZ;print$x;flush$*OUT} 19:53
theorbtwo ENOTENOUGHSTROKES 19:54
nothingmuch oh my
autrijus er, I mena
my $ZZZ= =$*IN;while 1{$_=perl eval eval=$*IN;say$!//$_;print$ZZ;flush$*OUT}
nothingmuch it's like use forks
autrijus s/ZZZ/ZZ/
theorbtwo How can the other end tell the difference between $! and $_ in the output?
autrijus it is.
theorbtwo: one will always be one line
and one will be multiline ;)
theorbtwo Ah, IWFM. 19:55
putter Corion: thanks!
nothingmuch the guy who sold us the house is anti wifi. Appearently there was a sale on concrete 19:56
theorbtwo decides to skip the jokes about bomb-resistant archetechture. 19:57
19:59 Aankh|Clone is now known as Aankhen``
putter autrijus: while it worked once, I'm now seeing a consistent minute and a half delay. I todo'ed the test which was 20:01
autrijus okie.
putter behaving differently embedded vs extended. the delay seems to occur after the final test is run, and the "# Looks like you failed" line if there is going to be one. 20:03
ie, with ./pugs -Iblib6/lib -w t/aaa/anchors.t , one gets the full test report, and then 1min30ish goes by before the process terminates. 20:04
it's waiting quietly, no computes. 20:05
autrijus: err, could multiple test runs be stomping on each other? I just cleared out all pugs-like processes, and its working consistently. now I can't duplicate the failue... err... 20:09
autrijus putter: yes, they could (and would) 20:14
ajs "theorbtwo has quit ("Lost terminal")" ... hmmm that's in Australia somewhere, right? 20:16
stevan autrijus: I have a question about object instance creation if you have a moment
autrijus yes? 20:17
stevan I saw when you were talking to nothingmuch that objects are currently data only 20:18
autrijus yes.
stevan and they are basically like this (type, hash of instance vars, id)
actually I have 2 questions :)
1) is the Type worthy of a full blown object in the MetaModel? 20:19
putter autrijus: it looks like if a test run is interrupted, it may leave behind processes which can then affect subsequent test runs. though I haven't managed to get the same magnitude of delay as previously observed...
stevan 2) do you copy the instance var defaults? or just do a COW for defaults
putter I would have thought test runs would be independent, using random filenames etc... :/ 20:21
autrijus woot, worked. 20:23
stevan: Type is just Class. 20:24
although junctive types may pose problems
putter ok, test hang looks dealt with. thanks autrijus. anythoughts on whether it should mutate into "figure out why test runs arent independent and make them so", or simply declare success and move up the stack?
autrijus but they it's just junctive object with class as members 20:25
stevan autrijus: where in the Haskell is it?
svnbot6 r3404, autrijus++ | * First cut at Inline::Pugs
autrijus stevan: Types.hs, data Type
stevan ok
_metaperl how are hyperoperators coming along? hope i'm not interrupting... 20:26
stevan ok so I can convert that into a simple class for now 20:27
I wont worry yet about junctive types 20:28
autrijus _metaperl: iblech is doing those metaops 20:31
stevan autrijus: where is the code for Object creation ?
autrijus stevan: Prim, "new"
fg
err, ww 20:32
use Inline Pugs => ' 20:39
sub postfix:<!> { [*] 1..$_ }
sub sum_factorial { [+] 0..$_! }
';
print sum_factorial(3); # 21
Shillo Hullo, all. :) 20:40
putter PerlJam: re "embedded parrot" sounding strange, Lua for instance has that as a major use case. re adjusting to plenty, you could always switch to cellphones...
integral autrijus: is that embedded pugs in interpreter mode or running using an embedded parrot? 20:41
Shillo putter: Funny you should mention it. I'm connected and do all my svn access through my cellphone... :)
autrijus integral: no, it's external interactive process.
integral: same thing as extern pge in src/pge/ 20:42
integral oh, pity :-)
Shillo putter: And it could prolly run parrot, at least if carefully compiled down to size. 20 megs of RAM, expandable to 256 megs... cheaply.
svnbot6 r3405, autrijus++ | * more fixes to inline pugs; proper escaping and multiple subs.
putter Shillo: ;) 20:43
Shillo scratches his head. A devel question: I have troubles with UTF-8. They come as line noise. Not sure where to begin to track it.
That is, in gnome-term and vi. 20:44
Corion Shillo: Only with Pugs or also with other programs?
Shillo Ctrl-K << works as expected when vi runs fresh. I think svn munges my encoding. 20:45
Hm, gah. man svn is being useless on me. 20:46
Corion Hmmm - what was the equivalent of $^X in Perl6 again? Do we have it at all? 20:48
Shillo putter: I wasn't kidding about the cellphone, BTW. It's my primary net access.
Corion: I think svn requires charset among the metadata. Thing is, why is it working for everyone else? 20:52
Corion Shillo: Dunno, but it worksforme. But I use Win32
Shillo Corion: Defaultix, here. Linux, in other words. :) 20:53
mugwump Shillo: perhaps you need to select a UTF-8 locale?
or use emacs of course :)
svnbot6 r3406, autrijus++ | * docs, etc.
Shillo mugwump: Was broken in emacs, too. svn co'ed the broken files. 20:54
mugwump: Using ext/fp/lib/fp.pm for testing. 20:55
sub infix:<ōæ½xE2~H~X> (Code &f, Code &g) { sub($x) { f g $x } }
stevan hey mugwump :)
mugwump morning stevan
Shillo stevan: Hi. :)
stevan mugwump: I moved some of the comments in the test files to the meta-model doc
hey Shillo
That is some good stuff :) 20:56
mugwump: I am kind of stuck on the instance creation stuff 20:57
any thoughts?
Shillo Eh. Note to self: Don't press CTRL-ALT-LEFT while backspacing... 20:58
mugwump stevan, you're talking about instances of Classes / Objects? 20:59
svnbot6 r3407, Stevan++ | Perl::MetaModel - adding Property related methods; added tests for these too
r3408, ninereasons++ | add functions to perl6.vim; add :todo<bug> tests to quoting.t
vcv-- svn. yay. good to see cvs is not being used. 21:00
stevan yes
Shillo scratches his head about this.
mugwump: Could you paste me your $LOCALE and $CHARSET?
Shillo isn't sure $CHARSET exists. :)
stevan mugwump: yes, how should I represent an instance 21:01
how do I create that reprsentation 21:02
etc
is an instance just an instance of Perl::Meta::Class?
mugwump Shillo: well, I use LANG=en_NZ.UTF-8 and LC_CTYPE=en_NZ.UTF-8. But then, I don't seem to get good unicode support in my xterms
revdiablo why does sub{} create a Sub but ->{} or {} create a Block? I think I found where it happens in Parser.hs, but I'm just wondering why sub{} can't just make a Block? 21:04
autrijus revdiablo: because sub {return} dwim
mugwump stevan: I don't see anything wrong, at this point, with having a MetaMethod that "applies" the Class object to the current execution environment..
autrijus revdiablo: and {return} dwim. 21:05
putter autrijus: the following works embedded but not external. I've started to grovel over run_pge.pir and Embed/Parrot.hsc, but if you wanted to...;)
pugs> "\n" ~~ m/\n/
*** Cannot parse PGE: \n
*** Error: end of file
autrijus putter: please do... it's 5am here :)
stevan mugwump: what do you mean by "applies"
autrijus putter: ping me again tomorrow when I show up if you didn't get it to work
putter ok. "your eyelids are groowwwinnng heaaavvvyyyy"
revdiablo autrijus: what do they dwim to?
autrijus revdiablo: sub { return } returns from that sub 21:06
revdiablo: { return } returns from the enclosing sub.
revdiablo autrijus: aah
autrijus while (1) { return 2 if /.../ }
vs
revdiablo autrijus: is that the only difference?
autrijus while (1) { sub { return 2 if /.../ } }
revdiablo: also the magicals are spelled differently: $?SUB vs $?BLOCK
I think that's pretty much it
revdiablo ok, thanks
autrijus np :)
revdiablo I just got curious :)
Shillo mugwump: That solved it. Thanks! :) 21:07
Corion heh - system("program_that_does_not_exist") # is really fatal :)
Corion goes on to create a really basic system.t :) 21:08
Shillo mugwump: (once I told gnome-term to also use UTF-8)
Oh. Forgot. mugwump++
mugwump by "applies", I mean it takes the Class object and makes it recognisable to pugs, probably by (for now) eval'ing a class definition and poking code refs into the right places with ::= 21:10
stevan ok
revdiablo autrijus: so a sub and a block have a different depth, that's what causes the different return behavior? 21:15
svnbot6 r3409, autrijus++ | * Matt Diephouse pointed out that run_pge.pir can easily
r3409, autrijus++ | turn off buffering for stdin and stdout.
autrijus revdiablo: right. 21:16
blocks are shallow.
they don't count into the call stack.
your CALLER is never a block.
revdiablo wow, I can actually kind of understand what's going on in this haskell code!
autrijus they are in the OUTER stack.
revdiablo :)
autrijus good :)
ninereasons I have a friend who's been coding in Haskell since grad school (7 years ago) who tells me he's never seen working code using some of the features that are incorporated into Pugs. His shop is still partly unconverted from ghc 6.3, which may be why. 21:24
svnbot6 r3410, corion++ | Added basic tests for system(LIST)
r3411, ninereasons++ | add a link to the relevant Synopsis
r3412, putter++ | Minor fix of run_pge.pir
Shillo checksout all over again, starts full rebuild. Woot, I Can See Weird Characters.
ninereasons: 'shop' - he gets to use Haskell at work?!
ninereasons yes, Shillo 21:25
crypto
Shillo goes all fuzzy-eyed. :)
autrijus ninereasons: yeah, Pugs is full of GHC 6.4ism.
GADT, STM, TH2 being the top three
revdiablo ninereasons: his productive insanity knob obviously needs adjustement
ninereasons I've been trying to get him to read up on Pugs 21:26
He's interested, but (although a great guy) he's a bit of a snob, as far as other languages are concerned
Shillo is still going through Haskell docs. And I really feel stupid for being unable to figure what $ does.
mugwump ninereasons: tell him that Perl 6 is really a dialect of Haskell 21:27
it just looks like Perl
ninereasons a good line, mugwump :)
Shillo mugwump: Is not! :p It's a dialect of Common LISP. :)
Shillo really ought to defmacro a bunch of unicode noise for SBCL... :) 21:29
ninereasons autrijus, he also told me that ghc has some absolutely brilliant optimization features that should make Pugs as fast as anything 21:31
autrijus ninereasons: right, but we are using very few of that yet. :)
ninereasons when the time is right for that, of course :)
autrijus in compiler mode, that is
Pugs.Compile.Haskell has the potential of being faster in speed than Pugs.Compile.Parrot 21:32
but it's not priority ;)
<- sees Parrot codegen as more urgent
another thought is Pugs.Compile.Grin and hand it to Jhc. maybe.
but it's all empty speculation :)
osfameron is anyone building Pugs.Compile.JVM ? 21:33
autrijus osfameron: no
Shillo osfameron: It's be more interesting to compile Java bytecode to Parrot. :) 21:36
s/It's/It'd
osfameron true
someone already started that iirc? 21:37
ninereasons btw, Shillo, I'm speaking from my _ss but I think that the $ sprinkled throughout src/ is Haskell spoken with a local accent
osfameron oh, acme did # www.nntp.perl.org/group/perl.perl6....rnals/9816 21:38
Shillo ninereasons: Er... huh? :)
ninereasons: I've actually been digging through Haskell docs trying to figure what it does. My best guess is apply
ninereasons it's something that autrijus uses a lot, but I don't think it's in the books -- if I recall a past discussion correctly
Shillo It is, found it in ghc examples 21:39
ninereasons ah
Shillo But I still can't figure what it does. :p
integral the $ operator?
Shillo integral: Yeah
ninereasons yes, integral 21:40
integral It's apply but with a different precedence to juxtaposition
Shillo integral: My guess was something like that... what's the argument order?
arg $ fn ==> fn arg ?
integral compare: foo bar baz {- passes bar and baz as args to foo -}; vs. foo $ bar baz {- passes baz to bar to foo -}
it's function $ argument
Shillo Oh. 21:41
I tend to use foo (bar baz) for that. But that's my speech disorder. LISP. ::)
Shillo itches to utter ,',,@<> in a real LISP code. 21:42
(and yes, that's legal)
(provided you use <> as a variable name :) )
wolverian is anyone else seeing \"s in Thomas SandlaƟ's From: header on p6l? 21:45
mugwump Looks like a weierstrauss to me
er, I mean sharp s 21:46
Shillo No, garbled for me.
But xchat isn't running with UTF-8 environment.
mugwump From: =?ISO-8859-1?Q?=22TSa_=28Thomas_Sandla=DF=29=22?= [email@hidden.address]
Shillo I really need to look into Ubuntu default env. :p
wolverian mugwump: ew. what the hell is that?
mugwump I think it's an iso-8859-1 entity
that's the raw header
wolverian hmm. thanks. 21:47
is that valid?
Shillo Hmm, can't read my list mail from here. Sorry 'bout the non-info.
revdiablo Shillo: if ubuntu is still enough like debian, you'd need to install locales, build an en_XX.UTF8 locale, and set that as your default
wolverian and how should it display? I see \"TSa ...\"
mugwump works in Thunderbird
wolverian which looks just weird.
Shillo: sudo dpkg-reconfigure locales
revdiablo Shillo: install or reconfigure locales, depending
wolverian although hoary is in UTF-8 by default 21:48
and there's a migration tool in main if you need that.
mugwump: what does "works" mean? as in, what should it display? 21:49
mugwump: I see the sharp s (where his email address itself has 'ss'), but the surrounding entities come out as '\"' 21:50
mugwump \x{00df} - small sharp s. Looks a bit like a B. See also masculinehygiene.com/sburke/unicode_sliderule/
wolverian (without the single quotes)
mugwump: no. that I can see. :)
Shillo wolverian: I'll have to read up on the stuff, too. So, that'll wait for a while. :)
mugwump oh, ok
wolverian Shillo: sure. :)
Shillo wolverian: But thanks for the advice. :)
wolverian mugwump: just wondering what the hell the surrounding entities are supposed to be.
Shillo: no problem.
Shillo Failed 36/269 test scripts, 86.62% okay. 174/5160 subtests failed, 96.63% okay. (3409) This normal? 21:51
mugwump I see it as: Tsa (Thomas SandlaƟ)
wolverian hrm.
hmm. vim shows the raw header, mutt shows \" 21:52
mugwump conclusion: we hate software! 21:53
wolverian oh. I think it does the \ because it'd otherwise be an invalid email
as in: ""Thomas ...""
because it does _not_ show those in the list header display. right. well. that was confusing, and why does he have double "s there?
iblech Whoa! I got the [...] reduce metaop working, I think :) 21:58
Will checkin in a minute
Shillo just transcribes his Croatian name into 7-bit. Most computer users here autoconvert within their eye bulbs. :) 22:01
Saves me soooo much grief.
Corion From where do I need to import Maybe and Nothing? I (think I) want/need to use them in Prim.hs, but ghc complains they aren't there .. 22:06
iblech Corion: You mean, for example, Just 3 doesn't work? 22:07
Corion iblech: Haven't tried that. Maybe ExitFailure x doesn't work. 22:08
Gah. I should have used Just there. Stupid me. Thanks!
iblech Corion: It can't, I think, as Maybe is not a constructor, but Just is
Corion iblech: Yes. I just realized that ;)
integral ./pugs -e'async { while(1) { say "foo!" } } while(1) { say "bar!" }' appears to be parsed wrong 22:16
(I missed out the semi-colon after the async block.) Shouldn't one be needed after the while? 22:17
autrijus integral: async is not Syn; you need a semicolon
while is Syn
so it's statement level
integral yeah, I know, but that's not the problem
autrijus hence not needed
integral Why does that whole thing parse as valid? 22:18
autrijus worksforme.
integral err, you mean without any semicolons it's valid too?
autrijus $ ./pugs -e'async{while 1 {say"foo"}};while 1 {say"bar"}' 22:19
no, of course you need the one
why wouldn't this parseok?
integral yes, that's what I *meant* to type, but I mistyped, and it parsed the version _without_ semicolons correctly
autrijus $ ./pugs -e'async{ while 1 {say"foo"}} while 1 {say"bar"}' 22:20
*** Error:
unexpected "{"
integral I included ()s around the 1s
22:21 _metaperl is now known as metaperl
autrijus pugs> . async{ while (1) {say"foo"}} while (1) {say"bar"} 22:21
Noop;
Syn "while" {Syn "{}" {1;
App &say ('bar')};
App &async (Syn "sub" {sub {...}})}
postfix while! 22:22
of course it works!
integral but doesn't postfix while need a semicolon after it?
autrijus not if it's lone sentence
integral ie. async{ while (1) {say"foo"}} while (1) ; {say"bar"}
autrijus it's like
./pugs -e '1 while 2'
(1){say "bar"}
is parsed like
1{say "bar"}
hash subscript
1.{say "bar"} 22:23
integral ah
autrijus now the fact that ) globs trailing whitespace
is Wrong.
(1) { foo }
integral this is just a little confusing all...
autrijus should not be parsed as (1).{foo}
commit a test?
I think somewhere in Parser, parens shoudl be written as verbatimParens
integral pugsbugs?
autrijus yeah
integral err, how do I run just one test file again? 22:25
ah, just the blib 22:26
mugwump PERL6LIB=/path/to/pugs/blib/lib pugs t/foo.t
is what I use 22:27
eric256 blib? why not just
pugs t/foo.t ?
integral you need Test.pm
mugwump er, blib6/lib
and I don't `make install' 22:28
integral never uses make install in development
eric256 i don't use make install either... hmm i don't have any PERL6LIB set either.. windows can be an odd beast sometimes 22:33
svnbot6 r3413, bsmith++ | Added pugsbugs test to check that parens are not eating spaces that appear
r3413, bsmith++ | after them.
r3414, iblech++ | Autogenerated &prefix:[...]! :)
r3414, iblech++ | (But the parser doesn't seem to accept multichar ops, but that's another story.)
iblech Haskell++ # damn concise
Ok, must sleep now
autrijus iblech: infix:<<>> landed too
Set.pm fully functional!
iblech :))
autrijus iblech++
iblech Haskell is fun :) 22:34
Ok, must sleep now =) &
eric256 whats Set.pm do?
autrijus eric256: implements Sets
i.e. hashes with anything as keys and no values 22:35
eric256 needs to ask more specific questions. lol
....why would you want those?
wolverian the PDL folk will most certainly want them. :)
autrijus because sometimes you want to join two arrays together
but discount duplicates
there's no real good way besides using a Set 22:36
esp when the array elements are not simple scalars
s/scalars/strings/
wolverian do perl6 hashes stringify the keys?
autrijus wolverian: by default yes. you can lift it using shape
wolverian autrijus: ah. thanks.
autrijus np :)
eric256 all(all(@a) !=:= any(b)) + all(all(@b) !=:= any(a)) ;) 22:37
autrijus eric256: junctions are, incidentally, sets with a flag on it
using junctions just to throw that flag away is wasteful :)
and it's harder to calculate differences for junctions efficiently
mugwump The earlier Set.pm used junctions internally. I was thinking about changing it back 22:38
autrijus oh wow
pugs> [<] 1, 2, 3
bool::true
iblech++
svnbot6 r3415, autrijus++ | * allow infix:ƂĀ«Ć‚Ā» and infix:<<>>
r3415, autrijus++ | * Set.pm now accepts `<` `<=` `>=` and `>`.
r3416, iblech++ | Usual svn properties added to t/.
autrijus iblech++
ninereasons those reduce operators are very cool, autrijus 22:39
autrijus indeed. 22:40
mugwump hi b6s
wolverian hrm. I can iterate over a list two elements at a time. can I do that with map? 22:41
integral just use a two arg block maybe? 22:42
mugwump for @foo -> ($a, $b) { }
iirc
autrijus map doesn't count arity yet
not sure if it should.
wolverian mugwump: yes, I asked about map
integral: maybe.
integral it's sort of intuitive...
autrijus s29 says it should.
so implementors welcome 22:43
just look at the for() code.
integral err, the same as for even
autrijus in Eval.hs for Syn "for"
wolverian autrijus: it's pretty functional, isn't it? that is, fold the input by the arity
ah. okay. :)
autrijus wolverian: well, it's generalising all the zipWiths :)
er, somebody left debug stmt in Eval.hs. 22:44
please fix
svnbot6 r3417, iblech++ | Oops, forget to remove trace() messages.
r3418, autrijus++ | * repair infix:<>
autrijus oh. and he did
wolverian .grep(-> $x, $y { ... }) is mightily ugly though
autrijus er
wolverian er. map.
autrijus .grep{ $^x % $^y }
.map:{ $^x % $^y }
that's what implicit twigils are for
wolverian oh. ^foo vars count towards arity?!
autrijus yes!
wolverian that's awesome. :))) 22:45
autrijus in fact you can't specify both
-> $x { $^y }
is illegal.
wolverian good.
(that's confusing.)
autrijus that's one of the very good things about p6 :)
$^key $^value
ninereasons my @a = 1..3; map -> $a,$b{ $a+1,$b+1 } @a
(2, 1, 3, 1, 4, 1)
autrijus ninereasons: it's not yet implemented :) 22:46
wolverian this allowes me to write some lovely OO+FP code.
s,allowes,allows,
autrijus I thought that's the point of p6 :)
ninereasons sort of semi-implemented, autrijus
wolverian yes. :)
autrijus just wait till hypotheticals and nondet :) 22:47
(and coro across nondets)
wolverian nondet?
autrijus nondeterminism.
wolverian where does that crop up
s,$,?,
autrijus Ovid has been working on it.
something like
mugwump oh, so ([+] @foo) isn't a synonym for foldr(&infix:<+>, @foo) 22:48
it's actually an operator
autrijus ensure $x + y == 3;
etc.
mugwump: it's foldl
integral mugwump: nope. [+] is done at the syntax level. It's really a reduce, not a fold
autrijus because + is leftassoc.
wolverian isn't + a list op?
oh, I guess it doesn't matter. :)
autrijus no, it's unary and binary
but not a listop :)
wolverian right. not quite intuiting with the mathematical properties of ops yet 22:49
autrijus: hmm. I'm not sure what that ensure thing means.
autrijus $x + $y == 3, even.
wolverian is that a mutating statement or an assertion?
I don't understand :) 22:50
autrijus and the ensure syntax is something I just made up from nowhere :)
it's an assertion that backtracks.
(think prolog)
wolverian ah, right.
cramming logic programming in perl6 as well?
autrijus I think @Larry's idea is that someone needs to spike a module for that (which Ovid is sort of doing) 22:51
and then we can figure out syntax
mugwump ooo, I feel a new sendmoremoney version coming on, then
autrijus mugwump: exactly.
wolverian: I think the idea is that the core language may not have syntax for it
but the semantics needs to ensure efficient implementation via a module or some such.
wolverian Juerd: very nice p6l post, clarifying the [] () issue. :) 22:52
autrijus: right. I think I'm more comfortable with it that way, too.
Juerd wolverian: TBH, thomas sandlass really manages to piss me off 22:56
wolverian I get the picture. :) (although you're not being overly rude by any means) 22:57
Juerd wolverian: I expect full knowledge of Perl 5 basics from people discussing Perl 6 semantics
wolverian yes, me too.
Juerd goes now
Bye!
wolverian bye :)
gamespot-- # requires you to register to download videos
amaurea don't they let you stream them for free? 22:58
and since streaming and downloading is the same...
wolverian yes, using a windows media player plugin. 22:59
which is a bit hard to come by on linux.
amaurea you don't have to dig much to find the real stream url
wolverian I guess not, but it's not as trivial as simply clicking 'download'
amaurea true
ninereasons mplayer, wolverian ?
wolverian ninereasons: I don't have it installed. 23:00
wolverian boggles
these videos are in .zip files
autrijus Set.pm now supports āˆ©, āˆŖ and āˆ‹ 23:05
svnbot6 r3419, autrijus++ | * Set.pm - Ć¢Ā© for intersection and Ć¢ĀŖ for union.
autrijus ponders what more to throw in
putter mutters "rules, the easiest way to segfault pugs..." 23:08
knewt can't understand why TSa doesn't go off and actually read up a bit about perl before posting anything more to p6l 23:15
svnbot6 r3420, autrijus++ | * utf8 please
wolverian should 'gather { ... }.join(", ")' parse as 'gather({...}).join(", ")' or 'gather({...}.join(", "))'? 23:21
svnbot6 r3421, putter++ | Tweaked and unDisabled several t/rules/from_perl6_rules/ files.
autrijus knewt: TSa is here. you can discuss it when he shows up :)
putter r3421 should be subtitled "but they are _interesting_ Errors and segfaults (...maybe)".
autrijus wolverian: gather is a stmt
to get the first behaviour you want
do{ gather { ... } }.join()
it's like if(){} 23:22
knewt autrijus: heh *g*
autrijus incidentally do{} works :)
wolverian autrijus: hmm. right. how about 'do gather { ... }.join'?
is it possible for the blockless do to DWIM there?
autrijus do must be followed by a block
implicit braces is verboten by larry.
wolverian there has been talk on p6l (by larry himself) to put in a braceless do 23:23
eric256 any ideas why for (1..9) -> $x,$y,$z { say $x,$y,$z }; prints an undef at the end?
autrijus oh? hm.
I'll wait until it's specced :)
wolverian to make transforming statements to expressions easier, I guess
yeah.
autrijus eric256: stmt level always evaluate to undef
wolverian (I like it since it strikes me as haskell-ish)
autrijus eric256: if you are in the pugs shell that's what it prints
wolverian (even though it's used for a different purpose)
autrijus it's like
pugs> say 1
1
bool::true
here bool::true is say's return value. 23:24
eric256 ohhh. lol. gotcha. thanks 23:25
autrijus np :) 23:26
eric256 that is a pretty cool use of for though, is there a name for that -> style?
wolverian pointy sub
autrijus ok. journal up. 23:27
7:30am... I _really_ should sleep 23:28
esp. seeting how I have to wake up in 7 hours.
s/seeting/seeing/
autrijus waves &
eric256 so the for loop automagicaly doles out enough elements to fill the paramters of the sub given to it?
putter re, sets... it would be nice to have equivalence classes... 23:29
wolverian bye, autrijus
eric256: yes.
theorbtwo waves to autrijus if he isn't too late.
autrijus :) *wave*
putter good night, thanks for the fish.
autrijus putter: thanks to you as well :) 23:30
eric256 creates his own z operator....okay that jsut totaly rocks. 23:39
will it check the parameters of each definition and pick the one that matches? do i need to delcare that with the multi keyword? 23:42
wolverian yes. 23:43