SVK users: search.cpan.org/dist/SVN-Mirror/ | paste: sial.org/pbot/perl6 | pugs.blogs.com | pugscode.org | pugs.kwiki.org | www.treehugger.com/files/th_images/paradigm.jpg
Set by audreyt on 17 August 2006.
TimToady say all(1,2,3) 00:01
for each(1,2,3) > any(@foo) 00:02
hmm
maybe junctions do something a little different in list context.
Damian originally had a .eigenstates method, or some such.
.values gives you the values out of an any or all, but after a comparison you just get booleans. 00:04
maybe list context can change that, or maybe each() can change it.
markstos Is this the right way to express "use base" in Perl6? class TestApp is CGI::Application; 00:05
I'm having trouble seeing the methods of the parent class.
TimToady yes
00:07 markstos left, markstos joined
TimToady might be busted at the moment though. 00:08
markstos Thanks TimToady
It seems to work for my reduced test case, but not in my Real Code.
A typical debugging project. :)
TimToady most of the tests in t/oo seem to return pugs: user error (no tag found) for me 00:10
markstos TimToady: meaning: they are busted at the moment ?
TimToady on the other hand, my last smoke, they seem to have worked. 00:11
dunno what changed...
markstos I have a "pugs.bak". I'll give it a spin. 00:12
TimToady prove6 works better than './pugs -Iblib/lib'
so it wants something I'm not supplying...
doh, it wants blib6 not blib 00:13
markstos prove6 provides these kinds of things:
PERL5LIB=/home/mark/src/pugs/blib6/pugs/perl5/lib:/home/mark/src/pugs/blib6/pugs/perl5/arch
PERL6LIB=/home/mark/src/pugs/blib6/lib
I keep those in a ".perl6" file, and source them when I need them. 00:14
00:18 miyagawa_ joined
markstos What's the recommended way to declare a class version? From the Synopsis, I thought this might work: 00:19
class CGI::Application { is version 6.00; };
But either something is unimplemented, or more likely, my class traint syntax is wrong.
I see one of my mistakes. I confused the "rest of file" syntax for 'class' with the just-this-block syntax. 00:21
TimToady class CGI::Application-6.0.0 { ... }
version is automatically part of the longname of a package or class
markstos Aha. Thanks. 00:22
Now, can I do something like this, or do I need to put the whole file in a big block to declar some traits? 00:23
class CGI::Application-6.0.0 has $.tmpl_path is rw;
That gives me a syntax error now.
TimToady has doesn't go in the heading
class CGI::Application-6.0.0; has $.tmpl_path is rw; 00:24
would work as first thing in file
otherwise you have to put the has into {...}
markstos Thanks. That example would be hepful in S12. 00:26
TreyHarris TimToady: yes, that's exactly what I was thinking. I tried gather { given any(@new) { when &infix:{'>'}.assuming(all(@old)) { take $_ } } }, but of course I just got back the original junction in that case.
then I tried to multi out infix:{'>'} for Junctions such that it returned the values, but I couldn't get that to work quite right either 00:27
00:34 mdiep_ joined 00:43 Bit-Man joined
TimToady TreyHarris: okay, have now specified meaning of "for any(@new) > all(@old)" to dwym. 00:59
turns out grep {...}, @x can also be spelled any(@x) ~~ {...} 01:00
markstos and I think the any() variant is a bit clearer. 01:01
TreyHarris definitely. 01:02
markstos Ok, inside of a new() constructor, after I've done $self = $class.bless.... how I can stuff things into $self ? In Perl5 it was just $self->{__PROP} = 42; 01:11
TimToady $class.bless( PROP => 42 ) is one way, assuming it has $.PROP or $!PROP already. 01:12
01:12 zg1 left
TimToady bless ends up calling all the BUILD routines with the named args you pass it, so each BUILD can pick out what it wants. 01:13
this is all described in S12, btw
markstos I've been reading that. 01:14
TimToady or you can just say $!PROP = 42 after the bless.
markstos BUILD is a new concept, too.
TimToady $.PROP if you want it virtual
markstos or $.PROP is inheritable ? 01:15
TimToady it's just the old "init" stuff that most OO languages have
markstos s/or/and/ ?
TimToady but we already used INIT
markstos I mostly just now Perl and a little JavaScript now...
s/now/know/
TimToady it means self.PROP = 42
markstos Got it. 01:16
TimToady so if you're children override the .PROP, it does the right thing,
presuming that's what you want it to do.
depends on your abstraction level.
usually a constructor wants to set the storage directly with $!PROP
the ! being mnemonic for "don't do the fancy thing" 01:17
markstos I see.
TimToady decommuting & 01:19
pasteling "markstos" at 12.176.101.89 pasted "markstos learns Perl6 objects" (21 lines, 349B) at sial.org/pbot/19120 01:24
01:24 diakopter joined
markstos Despite TimToady's help for which I'm thankful, I just still be missing something. I pasted my test case I'm playing with. 01:24
I expect the child class to find $!found from the parent, but it doesn't. 01:25
Ok, it seems that it doesn't work to declare $!found in new(), after the bless, I have to wait until I'm out of new(). I'm not sure that's a bug, or just something else I don't understand yet.... 01:27
That's the challenge of using a language-in-progress. I thankfully very very rarely ever run into a Perl5 bug. 01:28
TreyHarris it's not a bug. $!found is going to be lexical in that case and go away at the end of the method
markstos I tried adding has $!found to the class, but it didn't make a difference.
TimToady it's a private variable, and not accessible to child classes. 01:29
you have to use $.found for that
children always use accessors
that's part of why $.found is really calling the accessor. 01:30
anyway, really &
markstos switching from $! to $. didn't help in this case
but I appreciate the help!
buubot spew!
TreyHarris markstos: ohh. the problem is that new is not getting inherited 01:33
add a say to new
it doesn't get called
is that a bug or not? I haven't looked at the difference between redefining new and writing a BUILD
markstos You are right, TreyHarris. Weird. 01:34
TreyHarris somebody bring evalbot back!
markstos /invite evalbot
...with snacks ?
TreyHarris markstos: BUILD seems to be what you want, but bless() seems to be broken. I just noticed that there are no tests in Perl 6 that I can find that even use bless. The only .t's with bless in them are Perl 5 or v6.pm stuff that lives in the shady gray area in between. 01:42
markstos Thanks TreyHarris. I'll see about writing a test for bless. 01:43
TreyHarris oops, i spoke too soon
there are two, both in t/oo/constructor.t
pasteling "markstos" at 12.176.101.89 pasted "markstos : super new super ?" (18 lines, 310B) at sial.org/pbot/19121 01:44
TreyHarris er, construction.t
markstos Look: I got the call to new() to be triggered by changing Super.new to Super.new('Super') 01:45
.... that seems wrong. :)
Most of those tests are failing as TODO right now.... 01:46
TreyHarris yes 01:47
here, look at this...
markstos I'm surprised basic object construction doesn't work yet. bummer.
pasteling "TreyHarris" at 207.171.180.101 pasted "BUILD is interesting. Still doesn't work...." (22 lines, 376B) at sial.org/pbot/19122 01:48
TreyHarris markstos: it works very well, but you're not using it
once you use bless, you've said to Perl, "don't use standard object construction, I'm going to roll my own"
markstos Ah.
I'm still thinking like a Perl5er 01:49
doing what seemed like the most straightforward port to Perl6...
TreyHarris hold on, i'll paste you something else 01:52
markstos OK. holding.
Your last paste did make it look like bless was bOrken, though. 01:53
pasteling "TreyHarris" at 207.171.180.101 pasted "Here's an ordinary example, which runs fine" (23 lines, 332B) at sial.org/pbot/19124 01:54
TreyHarris see?
if you just let Perl do the work, it works out 01:55
markstos looks 01:56
TreyHarris: I think I ought be able to make some version of this work for me. 01:57
pasteling "TreyHarris" at 207.171.180.101 pasted "Not sure if goBoom's working is a bug...." (30 lines, 468B) at sial.org/pbot/19125 01:59
TreyHarris markstos: see this paste. This, I think, tries to demonstrate what TimToady was saying about storage not being accessible from children. But it is. 02:00
markstos interesting. 02:02
02:02 diakopter left
markstos I see that I don't have to pre-declare a trait before passing it to new(). What's the recommended way to guard against keys to new() that are typo'ed ? 02:07
TreyHarris i just realized i'm using an exceedingly ancient pugs, because my make clean I ran a couple hours ago blew away my installed pugs because of an errant symlink. so try it and tell me if you can run that last paste 02:11
markstos: can you paste an example of a typo working? i'm not sure what you're trying ot say
markstos TreyHarris: Yes, it ran fine with an up-to-the-moment pugs.
sure
sial.org/pbot/19126 02:14
I'm looking for something like Params::Validate.
TreyHarris bleh. svn help... I know I had a conflict in my last update, but I killed the window I ran the svn update in, and I can't remember which file it was. any way to find out where the conflict was?
markstos I want to get an error back: "Unknown key: taco"
TreyHarris: I'm not very good with svn, but maybe "svn status | less" ? Perhaps conflicted files have a special notation. 02:15
svn help status 02:16
I think that will work.
svn status | grep C
TreyHarris hmm. i think another bug. let me look a bit 02:18
markstos reads about the 500 mile e-mail. 02:24
TreyHarris markstos: heh. :) so I need to get a new pugs built. if evalbot were here, i think i could figure it out too... oh well 02:31
I need to decommute, I'll be back in in an hourish 02:32
&
markstos Oh, I'm on EDT, so I need to sleep & soon.
You've been helpful!
Thanks!
TreyHarris markstos: i'll look at it when i get back regardless and ping you next time i see you
markstos Great. 02:34
I may leave my laptop idle tonight just to see what I miss. :)
02:52 kanru joined 03:20 evalbot_12433 joined
audreyt ?eval $?OS 03:21
evalbot_12433 \"linux"
TimToady ?eval $*OS 03:32
evalbot_12433 \undef
03:33 luqui joined
TreyHarris ?eval $?PUGS_VERSION 03:34
evalbot_12433 \"Perl6 User\'s Golfing System, version 6.2.12, June 26, 2006 (r12433)"
03:37 jferrero joined
SamB why do you call your closures "pointy functions"? 03:47
03:50 Bit-Man joined
luqui SamB, "pointy subs" refers specifically to the notation -> $x {...} 03:55
TimToady and we recently renamed them "pointy blocks" because they have more semantic affinity to blocks than to subs. 04:01
but yes, it's a syntactic distinction primarily
TreyHarris oh, when did configure start pulling down the synopses? that's nice, i used to do that separately.
oops: Overview/Data.pod:298: Unknown command paragraph "=:= tests whether the cell slots of two containers $a and $b point to the same cell." 04:03
TimToady should be C<=:=> probably 04:04
04:08 xdg joined
svnbot6 r12434 | trey++ | suppressing errant pod warning 04:08
04:19 drrho joined 05:00 rindolf joined 05:03 agentzh joined 05:04 kanru joined
agentzh TreyHarris: pugs was set to update the synopses via LWP a few months ago. :) 05:04
I just made this fact more obvious yesterday. ;-) 05:05
agentzh has just finished reading today's p6l mails and #perl6 log. 05:06
i'll hack on Test::todo and util/smart_links.pl this afternoon. yay. 05:07
hmm, the name smartlinks.pl can save more typing. underscore is harder to enter on a keyboard. :) 05:22
svnbot6 r12435 | agentz++ | - renamed util/smart_links.pl to util/smartlinks.pl
r12435 | agentz++ | - renamed util/t/smart_links.t to util/smartlinks.t
r12435 | agentz++ | - updated t/README and t/TASKS accordingly
agentzh ?eval :pugs 05:26
05:26 evalbot_12433 is now known as evalbot_12435
evalbot_12435 ("pugs" => Bool::True) 05:26
agentzh ?eval :pugs.value === True
evalbot_12435 Error: unexpected "p" expecting "::"
agentzh ?eval (:pugs).value === True 05:27
evalbot_12435 Bool::True
agentzh oh, too bad... neither each nor zip are implementd. :/ 05:54
?eval my @a = 1..3; my @b = 4..6; for each(@a;$b) -> $x, $y { say "$x $y" } 05:55
evalbot_12435 Error: Undeclared variable: "$b"
agentzh ?eval my @a = 1..3; my @b = 4..6; for each(@a;@b) -> $x, $y { say "$x $y" }
evalbot_12435 Error: No compatible subroutine found: "&each"
agentzh ?eval my @a = 1..3; my @b = 4..6; for each(@a, @b) -> $x, $y { say "$x $y" }
evalbot_12435 Error: No compatible subroutine found: "&each"
agentzh ?eval my @a = 1..3; my @b = 4..6; for zip(@a; @b) -> [$x, $y] { say "$x $y" } 05:56
evalbot_12435 Error: unexpected "[" expecting comment, subroutine parameters, trait or block
agentzh sigh.
audreyt mmm?
agentzh audreyt: i want to use zip or each in Test.pm. 05:58
but they don't work. :(
audreyt each() is new
agentzh audreyt: how about zip? 05:59
?eval my @a = 1..3; my @b = 4..6; for zip(@a; @b) -> [$x, $y] { say "$x $y" }
evalbot_12435 Error: unexpected "[" expecting comment, subroutine parameters, trait or block
audreyt it's untested, so I'm not obliged to implement it
please write a test for each() somewhere
and you'll find it magickally working
agentzh audreyt: will do!
audreyt it's the oil-for-food, er test-for-feature program :)
rindolf Hi audreyt 06:02
audreyt hi
TreyHarris lol
agentzh audreyt: btw, i'm getting this error "user error (no tag found)" from my working copy of Test.pm. want does that mean?
audreyt agentzh: rm blib6/lib/Prelude.pm.yml and make again? 06:03
agentzh audreyt: okay
audreyt: no such error now. thanks! 06:05
TreyHarris should i run clean and configure every time i update?
audreyt I se... I should've bumped yml format
TreyHarris: no... just "make" would do
TreyHarris ok. i need to track down what's wrong anyway. my installed pugs breaks whenever i clean, so there's clearly some sort of mixage there shouldn't be 06:07
svnbot6 r12436 | audreyt++ | * First-cut implementation of &zip and &each.
r12437 | agentz++ | [t/statements/for.t]
r12437 | agentz++ | - added a test for "for each(@a;@b)->$x,$y {...}"
audreyt "breaks"?
agentzh audreyt: not sure. :)
TreyHarris stuff in examples/ acts funny, having trouble finding random modules and things 06:08
for typical language testing, no huhu
svnbot6 r12438 | agentz++ | [t/statements/for.t] 06:10
r12438 | agentz++ | - added a test for "for zip(@a;@b) -> [$x,$y] {...}"
agentzh audreyt: with your fix in r12436, the "zip" test in t/statements/for.t is still failing. would you please have a look? 06:12
TreyHarris urgh, my elisp skills have atrophied badly in the seven or so years since i've done anything with it besides editing my emacs configs. cperl-mode.el does not like "$.y", it thinks I'm starting a tr// and everything thereafter is a mess
audreyt agentzh: array unpacking is not yet implemented, so use each() for now 06:13
agentzh audreyt: ok
auderyt++ # each() works now 06:15
s/auderyt/audreyt/
svnbot6 r12439 | agentz++ | [t/statements/for.t] 06:19
r12439 | agentz++ | - put code leading to parsefail into eval q{...}.
r12440 | audreyt++ | * Update examples/ to use each() instead of zip()
MacVince Does perl6 still have the ternary operator or has it been changed to something else? 06:20
TreyHarris MacVince: still has it, it's ?? :: now 06:21
svnbot6 r12441 | audreyt++ | * Bump compilation unit version due to the SubAssoc change.
r12441 | audreyt++ | * Also gives better error message (prompting rm of blib6/lib/Prelude.pm)
r12441 | audreyt++ | when compunit mismatch happens.
MacVince TreyHarris: thank you
gaal meows
audreyt hey gaal 06:22
MacVince TreyHarris: it's giving me an error
audreyt MacVince: it's the ?? !! now
MacVince audreyt: double-bang for the else clause?
ah!
Thanks!
audreyt++ 06:23
TreyHarris oh, yeah. i keep forgetting that.
gaal the hmmm?? oh!! operator
audreyt ?eval (0|1).pick ?? 'ok 1' !! 'not ok 1'
06:23 evalbot_12435 is now known as evalbot_12438
evalbot_12438 "ok 1" 06:23
MacVince gaal: is that the scientific name?
gaal the scientifick name is "the conditional operator", ectually 06:24
s/ec/ac/
MacVince Perl sometimes has funny names for operators. My favorite is the "flip-flop" operator :)
audreyt mnemonic: "?" is shorthand for "true" and "!" is shorthand for "not"
doubling something means short-circuiting
gaal I thought it meant operating on lines </vi>
MacVince needs to read the synopses more attentivly 06:25
gaal me looks for some coffee
audreyt: what to hack on today?
audreyt my hair could use some conditioning operators...
gaal (MacVince: you may be interested to know that the flip-flop is now spelled "ff".) 06:26
audreyt gaal: I'd like to get back to MOP, but I need to finish $job's haskell hacking part first
MacVince gaal: that one I remembered.
TreyHarris pattern matching would be nice for hair. you can't actually start styling until the products you reach for are the ones that will do the right thing.
MacVince Man, Perl 6 is so interesting. More interesting that Python 3000, that's for sure ;-) 06:27
audreyt gaal: if you have cycles... \() and :() parsers? 06:29
since they have ano vv() counterpart
s/ano/no/
especially \(), which we can't even get it from :.signature but I'd like
especially \(), which we can't even get it from .signature
but I'd like to play with real Capt types 06:30
MacVince: glad to hear that... :)
MacVince audreyt: I must confess that I was never a fan of Perl :-$. I learned Ruby, Python, O'Caml, Smalltalk, Common Lisp and I thought I didn't need to learn Perl 5. However, I needed some script on a machine without Ruby or Python and Perl was the only option. I read the Llama book and found Perl 5 to be enjoyable. I read on Perl 6 and many features look very interesting. The object model with traits (roles I think they are called) l 06:32
gaal audreyt: (h)ACK 06:33
audreyt MacVince: vinfoley at iquebec.com?
MacVince audreyt: that's an old address, but that was mine, yes.
audreyt what address should I use to send you a commit bit 06:34
MacVince [email@hidden.address]
audreyt so you can check into our svn repo? :)
MacVince I'll need to brush up my Haskell :)
audreyt perfect. welcome aboard and please test the commit by adding yourself to AUTHORS :)
MacVince and finally get around to learning about monads.
Speaking of those, are there any good resources online to learn them?
With haskell or another language
audreyt there's a READTHEM file in pugs tree 06:35
gaal MacVince: try out these two posts:
community.livejournal.com/evan_tech/197471.html
community.livejournal.com/evan_tech/198116.html
if they are useful to you please add them to that file :-) 06:36
audreyt www.nomaware.com/monads/html/index.html is canonical
and www.haskell.org/haskellwiki/Hitchhi...to_Haskell is nice too
MacVince delicioused!
audreyt right, that would be a useful commit :)
gaal audreyt: what does "Not yet transcribed" mean in Parser.Operator? 06:37
MacVince As someone who doesn't know much about Haskell and Perl6 and even less about writing languages, what sort of tasks can I do to help the project?
audreyt MacVince: there's also a TASKS file :) 06:38
MacVince Great :)
audreyt easiest is to try linking the synopses into tests
and reorg the tests/examples a bit in the process
or port your favourite modules to perl6 under ext/ 06:39
MacVince All right.
agentzh hehe, a lot of funny things to do...
MacVince I haven't written a lot of software, but I have this ShortURL library for Ruby (shorturl.rubyforge.org) that I could try and port to Perl 6.
agentzh is making progress on Test::todo(). 06:40
gaal MacVince: as you go through the p6 tests you'll no doubt find things you think need more testing, or maybe that you don't understand, leading up to discussions and possibly spec updates :-)
agentzh: w00t!
audreyt would be fantastic. also a "ri" port for perl6 would be useful as well
and it could exercise our reflection API
gaal what's ri?
audreyt type "ri" and see
MacVince gaal: the Ruby documentation tool
audreyt something that perl5 very much lacks.
TreyHarris audreyt: is there enough introspection for ri to work yet? 06:41
or does ri just extract from docs?
gaal ah, the docs are all retrieved from reflection? cool. As They Should <tm>
TreyHarris gaal: what's the difference between introspection and reflection?
gaal anyone know whatprovides ri on debian? I don't have it 06:42
MacVince gaal: ruby1.8-ri I think
or rdoc
gaal I use them synonymously...
MacVince has a failing memory
gaal rdoc is pulling something
TreyHarris: though there may be some subtle distinction that I'm missing 06:43
I think Reflection is the name of a concrete Java API for this stuff
audreyt introspection is canonical terminology
reflection is thought to also include intercession 06:44
which means changing stuff at runtime
whereas introspection is more read only
but the lines has been blurred in recent years.
because Java hijacked Reflection but doesn't provide much intercession
svnbot6 r12442 | agentz++ | [docs/Perl6/Spec/update.bat]
r12442 | agentz++ | - added "pause" to ease win32 users' double-click actions.
audreyt though they are fixing that too.
gaal isn't the AspectJ stuff moving into the core? I think I read that somewhere 06:45
audreyt very possibly
also the Compiler API is exposed in Java
as of Java6
gaal that's quite a higher-level API but it certainly feels like intercession
audreyt which is the same as CLR2's codegen API, roughly 06:46
gaal hmm? I thought that was already available before that
audreyt through low level hooks only, I think
JSR199 is 1.6 only 06:47
gaal somehow I get the feeling it'll end up feeling hacky to call javac from java
although that's essentially what eval-"" is in Perl
audreyt In addition, the new API should provide a facility for a compiler to report dependency information among compilation units. Such information can assist an integrated development environment in reducing the scope of future recompilations. 06:48
Future versions of this API might expose more of the structure of the program, for example the declaration structure of the program (ala the javadoc API), program annotations (JSR 175) or even the code itself (ASTs: Abstract Sytntax Trees). These are not goals of the initial version of this specifications.
2.4 Why isn't this need met by existing specifications?
There simply isn't anything like this in the platform.
:D
gaal well, they have a huge pull from the IDE writers
rindolf Hi gaal 06:49
gaal that already do this by hook or by crook
hello rindolf
audreyt *cough* eclipse *cough*
rindolf gaal: how are you this lazy Saturday morning?
gaal rindolf: waking up :)
BTW: C is a dynamic language. neugierig.org/software/c-repl/
rindolf gaal: Sagiv Barhoom (of AP5 fame) and I are going to descend upon Joomla today.
gaal what are AP5 and Joomla? 06:50
rindolf gaal: AP5 == August Penguin 5
gaal: Joomla is what used to be Mambo.
gaal: it's a PHP-based CMS.
gaal I forget, is that a dangerous snake or a dangerous dance?
rindolf I've heard a lot of good things about it.
audreyt gaal: essentially the way hs-plugin works
dlopen abuse
gaal audreyt: yes
audreyt: they compile lines, basically, to sos. 06:51
rindolf gaal: today I woke up at 6 AM.
audreyt gaal: oh. you know about ./pugs -d ?
gaal !?!?!!!!!!!! (!)
./pugs -d mandel.pl is.. interesting :) 06:52
audreyt yeah :)
gaal kinda slow :)
audreyt oh. the OUTER::x hack I did in the Parser 06:53
painstackingly meeting the earlier spec of
"say $x if my $x"
gaal index I copy from old Vladivistok telephone directory
audreyt is now rendered obsolete by new spec
which mandates that such code is simply required to fail
gaal well, no:
audreyt it's in Parser.hs line 1734 06:54
gaal my $x = 42; say $x if my $x
I'd expect that to pass?
audreyt sure, that's redecl
my $x = 42; { say $x if my $x }
gaal yeah
audreyt is the failure case
so instead of doing a full OUTER check
we should just have an addBlockPad workalike that registers the assumed-to-be-in-outer syms 06:55
svnbot6 r12443 | agentz++ | [util/prove6]
r12443 | agentz++ | added -I option, which prepends specified path to PERL6LIB.
audreyt and the next time that sym is encountered by add BlockPad in itself, die at that point
and the AST should only see Var "$x" and never Var "$OUTER::x" 06:56
unless, of course, the user says that.
i.e. the parser should not prepend OUTER:: by itself
gaal 1747
audreyt so that's another worthwhile thing to do, as it will also help full lexical hoisting
i.e. Pad hangs around the new Code structure itself instead of as a node 06:57
gaal ACK. I think I'll start with \()
audreyt sure. that's sexier by far :) 06:58
gaal++
audreyt goes back to $job a bit... 2-d bitmap transformers in haskell is, while not exactly a joy to write, at least tolerable...
gaal audreyt: better than writing it in c++...
audreyt it's open source btw (svn.openfoundry.org/openafp/) 06:59
but not likely to be use to anybody but people locked-in by a certain Big Blue vendor
gaal we have HAL to thank for Pugs, indirectly 07:00
audreyt yeah :) and I really don't know how to write unsafeInterleaveIO in c++
svnbot6 r12444 | agentz++ | [Makefile.PL]
r12444 | agentz++ | install_script('util/prove6')
gaal grammatically, \ is no longer a prefix op, right? 07:02
audreyt it still is 07:03
it still ahs an unaryop form
but the functionlike form \(...) is a circumfix macro I think.
gaal &prefix:<\> is very weird :) 07:04
audreyt which is term level. S03's table reflects the new reality
well, it gives you back a capture with invocant slot fitted in
gaal also is there a hyperized \? (well, why not, I guess)
audreyt there could very well be 07:05
\<< 1..10; # \1, \2, \3...
for perl5 compatibility ;)
gaal add a Capt transformer to make those rw and that'll be useful for DBI 07:06
audreyt circumfix:< :( ) >
circumfix:< \( ) >
are the names of the term-level literals
s/literals/macros/
gaal hmm, actually no, in the column bindings everything goes in one Capt 07:07
OK
07:11 iblechbot joined
rindolf gaal: you didn't blog in a long time. 07:14
"Those who can do. Those who can't, blog."
gaal rindolf: it's better to have things to write about than not to, but it's not like I keep a schedule 07:18
ghci w/embparrot is broken... looking into it
07:28 mollmerx_ joined
svnbot6 r12445 | agentz++ | [util/prove6] 07:39
r12445 | agentz++ | - suppressed debug outputs.
r12446 | gaal++ | * fix 'make ghci' when embedding 07:42
gaal hmm. why don't I have Pugs.Val[.Code].CaptMeth in scope in Parser? Parser imports Pugs.AST, which reexports Pugs.Val, which exports the Capt constructors... 07:43
Does anyone understand when Makefile.PL updates trigger a full rebuild of third-party/ and of the main tree? 07:49
audreyt running makefile.pl always do that iirc 07:51
gaal: P.AST has 07:52
import Pugs.Val (val, PureStr, PureInt, PureNum)
the import list is constrainted and Capt is not among them 07:53
gaal grrr, how did i miss that
thanks
audreyt :) 07:54
gaal audreyt: now if i make ghci, how to enter pugs? 07:55
audreyt main
gaal k
audreyt bbiab... 07:56
08:02 drbean joined, Daveman joined 08:03 drbean left
agentzh ?eval sub foo (*%abc) { %abc } foo(:pugs<6.2.13>); 08:04
08:04 evalbot_12438 is now known as evalbot_12446
evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) {("pugs" => "6.2.13"),} 08:04
agentzh ?eval sub foo (*%abc) { %abc } foo(:abc<6.2>);
evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) {("6.2" => undef),} 08:05
agentzh evalbot needs fixes.
?eval sub foo (*%abc) { %abc } foo :abc<6.2>; 08:06
evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) {("6.2" => undef),}
agentzh ?eval sub foo (*%abc) { %abc } foo abc => 6.2;
evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) {("6.2" => undef),}
agentzh oh, it's very strange... 08:07
gaal hrm. in the parser, I should be constructing a ValCapt. But how can I be sure to get a Val and not an Exp from the thing inside \(...)? 08:08
08:10 drbean joined 08:16 nothingmuch joined
agentzh ?eval my $a='pugs'; sub foo (*%args){say %args} foo($a=>3) 08:17
evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) OUTPUT[ ] Bool::True
agentzh gaal: could you fix this bug for me? i need this feature in Test::todo. :)
agentzh currently can't go any further due to this pugs bug... 08:18
gaal isn 08:19
t it [,] now?
agentzh i've already been fighting with pugs for a few hours... :/
gaal ?eval my $a='pugs'; sub foo ([,]*%args){say %args} foo($a=>3)
evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) Error: unexpected "[" expecting comment, formal parameter or ")"
gaal er
?eval my $a='pugs'; sub foo ([,]%args){say %args} foo($a=>3)
evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) Error: unexpected "[" expecting comment, formal parameter or ")"
gaal guess not :)
agentzh ?eval my $a='pugs'; sub foo (*%args){say %args} foo(:a(3))
evalbot_12446 user error (Incompatible version number for compilation unit Consider removing blib6/lib/Prelude.pm.yml and make it again ) OUTPUT[a3 ] Bool::True
agentzh this works
when using a variable as the key, it sucks. 08:20
gaal hm. I don't think there's a simple fix...
agentzh gaal: okay, no hurry.
audreyt you can't use variable as key to anamed param
gaal that's pretty sucky, yeah.. 08:21
agentzh audreyt: it's a slurpy hash param, isn't it?
gaal brb
audreyt it is, but $a=>3 is a pair not a named param
agentzh yes, a pair is exactly what i want.
audreyt so it's passed in as positional 08:22
agentzh slurpy hash param only collects named params?
if yes, i'd say that's really a pain. 08:23
agentzh is dumb.
audreyt uhm it's specced that way... 08:24
agentzh goes to reread S06.
audreyt ?eval 1+1 08:26
evalbot_12446 2
agentzh audreyt: hmm, indeed you're right. it's specced that way. :( 08:27
audreyt: i think [,] is a workaround. 08:28
not sure if pugs already supports that.
?eval my $a='pugs'; sub foo (*%args){say %args} foo([,] $a=>3) 08:29
evalbot_12446 OUTPUT[ ] Bool::True
agentzh sigh.
audreyt which test is that? :)
(we are working on the Capture-based calling convention that will support [,]) 08:30
agentzh mm?
audreyt: go on with the excellent work!
i'll mark these tests as TODO then.
audreyt k cool
but the canonical syntax is currently 08:31
[,] %($a=>3)
because only the % sigil produced named arguments, according to TimToady's [,] listop refactoring
S06, line 380 08:32
08:32 lambdabot joined
audreyt the [,] form is very special in that it's entirely sigil-driven and not actually runtime-value driven 08:34
another way to say this is that it's a macro that operates on the syntax nodes, not a function application. 08:35
(bbiab again)
agentzh horray!!! tests for Test::todo are all passing now!!! 08:45
toooooooooo happy!
gaal whee :) 08:46
agentzh++
agentzh gaal: thanks
08:47 kanru2 joined
agentzh perl 6 is really a nice language. but pugs is currently not trusty. :) 08:47
miyagawa_ audreyt: ping
gaal "working on it" :)
agentzh *nod* 08:48
08:49 lambdabot joined
gaal what's allowed inside a caputure? \(rand > .5 ?? $x !! $y) 08:49
audreyt miyagawa_: pong 08:51
gaal: anything at al.
miyagawa_ audreyt: do you know what ingy's been up to these days?
audreyt no, not really
miyagawa_ k.
gaal audreyt: then I don't understand how to construct ValCapt rather than ExpCapt in parser
miyagawa_ feed this YAML blog.bulknews.net/tmp/ba41704178d7d...abb9b.yaml to YAML::LoadFile and perl will crash 08:52
weird. (YAML::Syck is fine)
gaal interesting url
miyagawa_ gaal: it's a YAML dumped from Plagger::Feed using Data::Serializer::YAML, if you're interested :) 08:53
audreyt gaal: you don't :) 08:54
gaal audreyt: ah :)
audreyt gaal: you manufacture an ExpCapt node, or a special Syn "" encoding
either way the catual massage is done in Eval land
*actual
gaal Captural Message!
audreyt I of course prefer an ExpCapt node :)
but Syn "" embedding is trivial 08:55
gaal okies.
audreyt so maybe do that first.
up to you :)
(ExpCapt saves duplicated work)
08:58 lambdabot joined
gaal currently the Exp in ExpCapt is the bogus one typed in Val.Code. To move over to oldExp, we need another boot file? 09:00
and, should we perhaps do a mirror of VV, defining newExp already with just one constructor, EE for oldExp? 09:01
agentzh suppertime & 09:02
09:03 agentzh left
svnbot6 r12447 | agentz++ | [ext/Test/lib/Test.pm] 09:03
r12447 | agentz++ | * implemented the todo function which marks the next one test as TODO according to a given deadline.
r12447 | agentz++ | [t/02-test-pm]
r12447 | agentz++ | - added 4-version_lt and 5-todo.t to test this new feature. (currently all tests pass for pugs)
gaal where will newexp eventually live? Pugs.AST? 09:04
09:04 lambdabot joined 09:05 nothingmuch joined 09:11 turrepurre joined 09:12 penk joined
gaal oh no, I forgot, instance doesn't work in hs-boot on 6.4 09:12
have to define ExpCapt outside Pugs.Val.*, it seems. 09:13
09:19 xerox joined
xerox G'day. 09:20
gaal hey xerox
xerox Hey gaal, how's code? 09:21
gaal 6.4's bugs re: hs-boot are bringing me down :(
xerox @arr!
lambdabot I'll keel haul ya fer that!
xerox ....what is hs-boot? 09:22
gaal I believe "keelhaul" is one word.
xerox: module A where data AA = AA B.BB
module B where data BB = BB | BMoose
there's a way to break the circular dependecy 09:23
by sorta-predeclaring stuff in one of the files
09:23 chris2 joined
gaal haskell.org/ghc/docs/latest/html/us...-recursion 09:24
lambdabot Title: 4.6. Filenames and separate compilation
gaal but unfortunately in 6.4, you instance declarations can't go in the hs-boot file
xerox Oh I see... maybe if SPJ didn't spend all his time unicycling we'd get this things fixed! <giggles> 09:25
<paolo.is-a-geek.com/mu/entry/2> 09:26
gaal he did fix it
in HEAD
ha, that's excellent
who are the hackers supporting him? 09:27
xerox Shae shapr Erisson on the left, and Duncan dcoutts Coutts on the right.
gaal oh it says so in the entry! I went straight for the big picture :)
xerox ^__^ 09:28
gaal so is there an rss feed for this? 09:29
xerox Yup.
gaal url?
xerox paolo.is-a-geek.com/mu/entry?type=rss 09:30
Oh, you can find lots of Haskellers' feeds on planet.haskell.org/ too.
lambdabot Title: Planet Haskell
gaal syndicated.livejournal.com/xerox_rss/
lambdabot Title: xerox_rss (syndicated by LiveJournal.com)
xerox LiveJournal.com ?!
Oh.
gaal I just added you there. :) 09:31
xerox Okay :)
....what is it for? 09:32
gaal uh, that's how I read rss...
and others who have accounts there
xerox So it basically caches a copy of the rss? 09:33
09:33 DaGo joined
gaal it syndicates content 09:34
I mean, LJ is a journaling service; rss reaggregation is just one service it provides.
xerox gaal: it aggregates all the rss feed you are interested in in one page?
gaal xerox: lj exists before rss, I think.. it shows me the LJ users I "friend" on one page; now that rss exists, outside feeds can be reporesented as pseudoaccounts on lj and they show up on the friends page just as well. 09:36
xerox Okay, thanks for the explanations!
So you're waiting for hs-boot to be a pseudo-friend on lj.... :) 09:37
gaal nugh, it's really vexing!
because I want to write a Pugs.Exp module that mentions Pugs.Val, and have things in Pugs.Val that mention Pugs.Exp
if I didn't need typeclasses it'd work 09:38
but as it is everythig has to be Data Typeable etc.
xerox cpp pragmas are evil but.... ? 09:39
gaal you mean #include?
I resorted to that in Pugs.Val.Code, but I'm not sure I can in this case
it forces you to decide on one representative module that everyone outside the ball-o'-mud imports 09:40
and it also means you can't use more than one namespace 09:41
xerox Make pugs depend on GHC 6.5 and tell everybody to upgrade!
gaal since IIRC haskell has the one-module-per-file rule
xerox: oh, we'll depend on 6.6 about 1 minute after it comes out :)
not that far away, allegedly
xerox =) 09:42
gaal by ICFP, audreyt tells me
xerox audrey will attend?
gaal dunno?
xerox Yarrr, I'd loved to.
gaal it's in Portland this year? where are you based? 09:43
xerox I'm in Turin, north-west Italy.
gaal Torino? I'd love to get my hands on a pack of Hausbrandt coffee!
xerox Yuck! 09:44
gaal !
what do you drink then?
xerox Tea.
gaal ah :)
then I think you're the only Italian I know who doens't drink espresso :) 09:45
but then I don't know that many Italians!
xerox hehe
Coffee isn't that good =P
gaal that's almost like saying "air isn't that good", as far as I'm concerned 09:46
xerox Geeks.
gaal ooooooff sometimes I just want to get the typechecker to shut up 09:50
xerox What is it harassing you about?
gaal still the circularity isse:
xerox @ghc
lambdabot CPR Analysis tried to take the lub of a function and a tuple
xerox Ack. 09:51
gaal I want to assure it that instances do exist for a type
but I can't declare them myself, because if I do in the consuming module, I'll get duplicate instance errors later
xerox What about: #if defined(GHC < 6.5) ...instance..declaration... #else import module (...) #endif ? 09:53
It duplicates the code, but if it works...
gaal hmmm
I might do that
xerox (I am not sure about the #if defined GHC syntax, you'd better look it up.) 09:54
gaal yeah, we have stuff like that in somewhere
chasing some other circularity first.... 09:56
10:10 kanru2 is now known as kanru
gaal so, no, the cpp trick doesn't work :( 10:17
because no matter what, I can't declare instances in the consuming site 10:18
it'll clash with the real derived instances in the supplying module.
and -fallow-overlapping-instances won't help.
10:22 elmex joined
gaal bbiab& 10:25
xerox gaal: of course 10:26
gaal: you have to move all the needed definitions in the module, and avoid importing it; or at least hide them.
gaal i don't understand your proposed workaround then. 10:28
xerox You copy everything you need in the module it needs it, and #ifdef it. 10:29
gaal A and B are circularly related and have derived instances. I put my stuff really in A. Now it must not be in B any more. 10:30
but now module C, which used to import B, breaks.
how does the ifdef help?
xerox It doesn't in general, it's just a work around that works for a single module. 10:31
And it's ugly, nevermind.
gaal pity you can't derive on type aliases 10:32
but there's no point to be able to do that except to workaround the hs-boot limitation, so may as well fix the hs-boot limitation 10:33
oooooof
ok, really later now... &
xerox Bye! 10:35
10:44 pmurias_ joined
pmurias_ hi, 10:44
is using feather for parrot related development ok? 10:45
(yhc bytecode -> parrot tranlator) 10:47
xerox That sounds like a fun project!
10:48 kane-xs joined
pmurias_ any help wold be gratitusly accepted ;) 10:49
xerox Have you posted to the yhc mailing list?
pmurias_ not yet... i have not really started on it untill today 10:51
10:56 masak joined
svnbot6 r12448 | masak++ | * added reference to "Software Extension and Integration with Type Classes" 10:56
r12448 | masak++ | in the READTHEM file
masak i've a mind to trawl through the IRC logs looking for more references to add
would that be appreciated, or just a waste of time?
pmurias_ well, you can find things you would like yourself... 10:59
masak pmurias_: how do you mean? 11:00
11:00 prefiks joined
pmurias_ what do i mean? 11:00
you could propably find stuff you would like to read yourself 11:03
masak yes. do you mean "well, instead of adding things to READTHEM, you could just find stuff you would like to read yourself"?
or "while trawling through old IRC logs, you might find stuff you would like yourself"? 11:04
:)
pmurias_ the latter :) 11:05
11:05 agentzh joined 11:08 TimToady joined
masak ok. yes, that's partly the idea. i've drifted away from #perl6 lately, and this might be a good way to familiarize myself with the latest topics 11:09
while collecting (hopefully) useful information
pmurias_ what should i use for parsing binary data in perl5 11:10
or haskell
i vagly remember audrey mentioned something
masak Parse::Binary? 11:11
search.cpan.org/~smueller/Parse-Bin.../Binary.pm
lambdabot Title: Parse::Binary - Unpack binary data structures into object hierarchies - search.c ...
masak perhaps
svnbot6 r12449 | agentz++ | [t/02-test-pm/5-todo.t] 11:14
r12449 | agentz++ | switched to the canonical syntax "[,] %($a=>$b)" according to audreyt++
agentzh wonders what to do next. 11:17
pmurias_ masak: i'll try Convert::Binary::C first
masak pmurias_: sounds good
adding stuff now to READTHEM and READTOO... 11:19
there's a fine line between those two
I already confused them in my commit log message :/ 11:20
11:22 ludan joined
gaal audreyt: ping 11:25
audreyt: since we aren't planning a release before ghc 6.6, I want to drop support for 6.4 11:30
a bit drastic, but the hs-boot problem makes it impossible to refer to oldExp from newVal land 11:31
pmurias_ i would like to have scons on feather, could somebody install it please, or should i install in my homedir? 11:35
masak & 11:36
svnbot6 r12450 | masak++ | a couple more additions to READTHEM and READTOO
gaal pmurias_: installing 11:37
11:40 lisppaste3 joined
gaal pmurias_: done. 11:41
agentzh audreyt, gaal: my updates to Test.pm triggers a bug in the yml codegen. prove6 -Iext/Test/lib works fine but prove6 -Iblib6/lib fails. 11:46
*trigger
gaal perlbot nopaste
perlbot Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
gaal agentzh: nopaste it please? 11:47
agentzh gaal: okay
gaal ugh, looks like there's no easy way to get 6.5 on debian. *sigh*
pasteling "agentzh" at 210.22.200.67 pasted "new Test.pm triggers a bug in the yml codegen" (33 lines, 1.5K) at sial.org/pbot/19135 11:49
agentzh when i removed blib6/lib/Test.pm.yml, all test passed again.
gaal when did you gen the yml file? are you sure you genned the right one? :) 11:50
11:51 xdg joined
gaal once you gen it, can you please grep it for version_lt? 11:51
agentzh i've already run "pugs.exe -CParse-YAML ext\Test\lib\Test.pm > blib6\lib\Test.pm.yml" for 40 times. :)
gaal: okay
gaal: there're a lot of "version_lt". :) 11:52
gaal also, what does ext\Test\lib\Test.pm line 201 say?
agentzh " if (!$spec_ver.defined or $spec_ver eq '1' or version_lt($?VERSION, $spec_ver)) { 11:53
can you reproduce the error on your side?
gaal where is version_lt defined?
agentzh: my co is broken right now...
agentzh right above it. 11:54
gaal hold on, I'll use another working copy.
agentzh fine
masak pmurias_, you were right. I am finding things I like :) 11:56
I will probably use this: www.perlmonks.org/?node_id=567025
lambdabot Title: Color diff for terminal
masak but it's not something I feel belongs in the READT* files 11:57
agentzh masak: the perl 6 version of color_diff is also in the pugs tree!
masak agentzh: yes, so in a way it's already referenced from there :) 11:58
agentzh aye
masak agentzh: where in the tree is it? I might check that a comment references the perlmonks node 11:59
agentzh examples/color_diff.pl 12:00
masak agentzh: thx
agentzh sorry, no underscore. :)
colordiff.pl
12:00 chris2 joined
svnbot6 r12451 | masak++ | one more reference to READTOO 12:00
masak it's already referenced. nothing to see, move along
svnbot6 r12452 | agentz++ | [t/02-test-pm/4-version_lt.t] 12:03
r12452 | agentz++ | added one test for comparing "6.2.13" with "6.28".
12:06 buetow joined
agentzh has anyone here noticed that Test.pm is now broken? 12:16
(in the case that blib6/lib/Test.pm.yml is used, which is the default setting)
please don't revert my changes to Test.pm since it's definitely not my fault. blame the yml codegen instead. thank you. :) 12:18
svnbot6 r12453 | agentz++ | [TASKS]
r12453 | agentz++ | - kicked off the Test::todo item since it's already done.
r12453 | agentz++ | - added more documentation for Test::todo to Test.pm's Kwid.
r12454 | masak++ | re-credited original mention of paper from gaal to audreyt 12:21
r12455 | agentz++ | [Test/lib/Test.pm]
r12455 | agentz++ | - more docs
agentzh still has 40 min tonight to work on util/smartlinks.pl's HTML emitter. 12:23
svnbot6 r12456 | gaal++ | * util/prove6: don't probe for a pugs in path when HARNESS_PERL 12:27
r12456 | gaal++ | is defined.
agentzh gaal: you now have a working copy? 12:28
agentzh now see why putter was oppose to writing anything big in pugs. 12:30
*sees
predictability is really really important to productivity. 12:31
gaal agentzh: yes, looking into it.
agentzh gaal++
masak karma masak 12:45
dang
(I was explaining karma to my mom. It would have been so much more effective if the karma bot had been online. :) 12:48
agentzh whee, i've embedded test snippets to synopses via util/smartlinks.pl. 12:50
the next step is to HTMLfy them. :)
gaal fixed 12:56
agentzh: please svk up and regen Test.pm.yml 12:57
agentzh ok
svnbot6 r12457 | gaal++ | * fix &Test::todo problem reported by agentzh++
r12457 | gaal++ | (Precompiled code wants fully-qualified names in calls.)
audreyt 14:31 < agentzh> predictability is really really important to productivity.
indeed!
agentzh :) 12:58
audreyt unfortunately, the only way I know of to reach predictability is by trying over and over again
each time failing miserably in different places
gaal audreyt, I'm trying to set up 6.5 here, I'm really sick of the hs-boot problem
audreyt and finally smooth out all wrinkles :)
agentzh so i'll try my best to write more and more tests for pugs.
gaal well, always failing is also a form of predictability.
audreyt gaal: bindist?
gaal audreyt: yes
but unfortunately not debianized 12:59
agentzh gaal: why "Test::version_lt"?
audreyt www.haskell.org/ghc/dist/current/di...ux.tar.bz2
gaal audreyt: yes, that's the one I'm using.
14:30 < gaal> audreyt: since we aren't planning a release before ghc 6.6, I want to drop support for 6.4 13:00
14:30 < gaal> a bit drastic, but the hs-boot problem makes it impossible to refer to oldExp from newVal land
audreyt wait a second...
surely you can put Exp in Internals.h.s-boot? 13:01
13:01 [mago] joined
gaal instances... 13:01
audreyt which instances do you need? Typeable only? 13:02
gaal Data, Show etc
audreyt if it's just Data, Typeable and Show
gaal and Ord and Eq :)
and the drifted ones, but we can comment-instance those 13:03
audreyt Typeable, Ord, Eq and Show can also be drifted
agentzh: currently the .yml producer does not resolve the three levels of sub call lookup 13:04
(lexical; package-scoped; global)
agentzh oh, got it.
audreyt agentzh: so it needs you to syntactically determine which level it is doing
agentzh i see. 13:05
audreyt foo(); Foo::foo(); &*foo()
agentzh sorry, end of day for me &
13:06 mauke_ joined
gaal ouch, looks like the bindist of ghc-6.5 is built against libreadline.so.4 which debian doesn't carry? 13:06
audreyt: how can those be drifted? 13:07
audreyt the usual way 13:08
simply use drift annotations to attain them
but let me think a bit...
13:10 Bit-Man joined
audreyt yeah, drifting them will let us get out of the problem quickly. another thought is to relax the Data/Typeable restriction 13:12
since we are not actively using SYB yet
and then start using them only after 6.6
gaal we do in extractPlaceholderVars
though that's oldExp
audreyt but in ePV the full instance is in scope
so that's fine; only newland typeclasses needs to drop those restriction
gaal don't we use typeOf in some places?
I still don't understand how the drifing will (a) work (b) help us 13:13
audreyt let me try a bit
gaal in the case of Show, for example
k let me ci the Exp I want 13:14
audreyt k
sorry about the envelope-pushing situation :)
gaal which haskell compiler is it that puts everything in one big file? 13:15
let's move to that one :)
svk pull
svnbot6 r12458 | gaal++ | * Pugs.Exp, holding newland AST toplevel types (not compiled yet) 13:18
audreyt turns out we can supply Typeable instance without knowing constructor 13:20
svnbot6 r12459 | audreyt++ | * Pugs.Val: Relax ICoercible superclasses to be only Typeable.
audreyt unlike Data Eq Ord Show
so it's still fine to superclass it 13:21
where do you want to import Pugs.Exp?
13:21 mauke_ is now known as mauke
gaal ouch, I had a conflict and choosing 'm' I get a... four way merge? :) 13:21
13:21 xerox joined
gaal audreyt: Pugs.AST but ultimately Pugs.Parser 13:21
audreyt done. 13:26
svk pull 13:27
:)
audreyt ponders "VV ValVanguard" as complement to "EE ExpEmeritus" 13:28
svnbot6 r12460 | audreyt++ | * Pugs.AST now imports Pugs.Exp.
gaal I thought there was some kind of newtype trick to be played, but couldn't see it till now. thank you audreyt! :) 13:29
PP PugsPotente 13:30
audreyt gaal: godo enough? :) 13:31
gaal "godo"?
audreyt *godot
er, *good 13:32
gaal Waiting for Good, by Samuel Buckett
audreyt glad to be of help (though I really pine for GHC 6.6 :))
gaal chasing down my local changes, probably yes 13:33
audreyt++
audreyt yay :) 13:36
glad to be of help
gaal (not 100% done yet...)
audreyt (though I really pine for GHC 6.6 :)) 13:37
audreyt{ brokenRecord = True }
gaal gets on the groove
mind if I commit? I have more instance errors 13:39
audreyt you mean breaking the buil? 13:41
gaal y
audreyt you mean breaking the build? sure!
gaal r12460 :) 13:43
svnbot6 r12461 | gaal++ | * WIP towards Capture parsing:
r12461 | gaal++ | 16:40 < audreyt> you mean breaking the build? sure!
gaal +1
audreyt fixed. 13:48
13:49 asz joined
gaal thank you! !gla 13:49
svnbot6 r12462 | audreyt++ | * Unbreak the build via newtype transformation.
gaal urp? src/Pugs/Exp.hs:18:44: Not in scope: type constructor or class `OldAST.Exp' 13:51
svnbot6 r12463 | audreyt++ | * More unbreakage.
gaal but it was in the boot file..
audreyt thinking. 13:53
13:58 eden joined
audreyt fixed 13:58
13:58 eden is now known as eden_c
gaal src/Pugs/Exp.hs:10:52: Module `Pugs.AST.Internals' (hi-boot interface) does not export `Exp' 13:59
svnbot6 r12464 | audreyt++ | * More unbreakage.
audreyt no way... rm the .hi file and .o for it? 14:00
gaal yes, looks better. apparently make ghci isn't as robust in dependencies as non-interactive --make 14:02
audreyt I think instead of shoving ExpCapt into a VV, we should have an EE form in oldExp that bridges to newExp, and so we can simply represent it as a CApply Noop
I need to fetch some food :) bbiab
gaal oy, now I remember why I never use make ghci -- it doesn't work with colinux :(( 14:04
audreyt what breaks it again? 14:08
gaal maybe it's not colinux' fault - my libpthread.so is an ld script. 14:09
apparently I'm not the first with this problem, chasing google.
audreyt surely building nonthreaded will fix it? 14:12
droppping -thread that is
14:12 cognominal joined
audreyt oh hm. ghci wasn't using threaded ayway 14:12
gaal it's giving /usr/lib/libc.so: invalid ELF header now (w/o -lpthread) 14:14
that's an ld script too....
14:15 soisoisoi joined
audreyt I think libpcre is sufficient to express all of perl6 rules. 14:22
gaal !?
audreyt so librules would be better as a libpcre frontend.
notably: callout points and named captures are supported natively.
gaal ouch! ghci accepts .os but not .as? 14:23
audreyt aye
gaal then ghci w/p5 embedding can't work?
(DynaLoader)
not that I need it right now, but...! 14:24
audreyt just need to figure out an encodding for list captures 14:28
(similar to origuruma's (?@<name>))
or, alternately, find out a way to use origuruma with callout 14:29
gaal The characteristics of this library is that different character encoding for every regular expression object can be specified" 14:30
-- sad
audreyt well, that does mean big5 can be matched as-is
without having to convert to utf first
which is in alignment with the ruby philosophy of supporting different charset semantics 14:31
known as MCS
gaal as long as they're not unicode </nasty>
audreyt 1.9 supports unicode as one of the charsets
as dos oniguruma, with UTF16 and UTF32 mode.
"unicode is just another charset" I think is the idea 14:32
gaal good to know! 14:33
audreyt hm. clearly list captures can be moded as callout, each closing nested parens replaced by a numbered (?C999) 14:34
and even better, I've coded that up before.
s/list captures/tree capture/
(Template::Extract)
14:35 ajs_home joined
audreyt but I'll get MOP encoded first before chasing down that rabbit hole 14:35
it's the the next milestone, not this ;)
gaal well, it would be very useful to have! but you are crazy :) 14:44
audreyt I'm not the first one who've encoded this... 14:54
dconway did that 14:55
but his underlying engine is much more primitive
and much flakier at that time
gaal and he's the paradigm of sanity, you're right
audreyt lol
gaal how do I get my ruleCapture to be fired before the ops get a chance at it?
seems that buildExpressionParser is getting in my way 14:56
audreyt hm 14:57
hacky way: remove \ from operator table for now. 14:58
slightly better: introduce Circumfix into expression parser.
(and \(...) would be circum)
clearly insane: use aheadSym to rule out the \( combiation 14:59
gaal ouch :)
audreyt right way: implement full optable
I think clear insanity is more attractive.
but that's because I'm the epitome of sanity
gaal "only the clearest insanity allowed" 15:00
unsafePerformInsanity
where in precedence would \() be? 15:02
audreyt term 15:04
as in S03 table
15:04 elmex joined 15:09 FurnaceBoy joined
clkao audreyt: what's the right way to extract all stuff those should be _()'ed ? 15:10
audreyt find lib web/templates | grep -v 'swp\|gif\|png\|jpg' | xargs xgettext.pl -u -o po/zh_tw.po 15:11
clkao audreyt: i mean those hasn't been _()'ed, including templates 15:16
15:17 mdiep_ joined
gaal audreyt: how to name a circum internally? specifically should I protect the whitespace / differentiate opening and closing marks with circumfix:<\( )> ? 15:17
maybe just 'circumfix:\( )' is enough internally? 15:18
audreyt I think so yes. 15:22
clkao: you use heuristics... namely [A-Za-z]\w+ outside tags in templates 15:23
and string literals in source. but they are not reliable
there's no generally reliable process for this
TimToady does something need to be specced for Perl 6 for this? (well, duh...) 15:24
clkao audreyt: iirc i wrote some interactive thing to do so
i can't remember where it is
TimToady ?eval [1,2,3] >>+<< [4,5,6] 15:27
15:27 evalbot_12446 is now known as evalbot_12464
evalbot_12464 Error: No compatible subroutine found: "&infix:>>+<<" 15:27
audreyt TimToady: .as() :)
oy, hyper broken?
TimToady yes, couple days now... 15:28
audreyt wasn't aware of it. fixing
TimToady that's why I mentioned it. :)
audreyt gaal: I refactored a lot of Parser.hs into Operator.hs 15:29
gaal right now?
audreyt probabaly will merge fine with you
gaal okay
will make build faster, probably :) 15:30
audreyt that's why I did it :)
also removed the (?implicitparam)
svnbot6 r12465 | audreyt++ | * Refactor operator-related parts from Pugs.Parser
r12465 | audreyt++ | into Pugs.Parser.Operator to decrease build time and
r12465 | audreyt++ | lose the need for an implicit parameter passed through
r12465 | audreyt++ | each expr call.
audreyt so will make parsetime faster too
(not benchmarked yet)
gaal goes to watch audreyt's circularity saw
audreyt ?eval -<< 1,2,3
evalbot_12464 Error: Hyper OP only works on lists
audreyt ?eval -<< [1,2,3] 15:31
evalbot_12464 (-1, -2, -3)
xerox Wow, what is -<< ?
Ah, - and << !
gaal ~<~<<- # pugs has lightning arrows!
audreyt I wonder if the Var form should know about meta modifiers 15:33
aka [] and >><<
is [+]<< legal? 15:35
and [>>+<<]?
xerox Is [+]<< different from [[+]] = 15:36
s/=/?/
audreyt [[+]] is probably illegal as [] only takes infix
and [+] is prefix
xerox Oh I see.
TimToady [>>+<<] is fine
except you have to worry about list context 15:37
xerox It returns a list of summed tuple of lists?
gaal [\m/] 15:38
TimToady \m/ is the "pulling down the clothesline" operator?
gaal I thought it was a triangular m/ operator! 15:39
xerox Looks also like...
audreyt wonders why it's the case that every language but perl has native support for named captures now :)
TimToady you'll have to define infix:<m/> first...
gaal $x ~~ m/m/ 15:40
ok enough foolin around for 5 minutes
audreyt: Java has named caprures?
xerox If you think of \ and / as the arm, and m as a hand on the elbow... 15:41
audreyt gaal: yes. jregex.sourceforge.net/
gaal if you think of m as the head, and \ and / as antlers...
TimToady hmm, culturally means different things though.
gaal in some places, "culturally" means nothign at all... 15:42
xerox !
gaal audreyt: I'll be.
audreyt because you think? 15:43
or rather, you'll think 15:44
TimToady when you said "named captures", I was thinking "sub foo (\$capture)"
and was dubious...
audreyt oh, sorry, regex context :)
gaal caribou, ergo moose
TimToady k, I'll just do a lookbehind
or maybe I should have done a lookahead. <headscratcher> 15:45
audreyt you mean lookaround. :)
gaal :hoogle [a] -> [(a,a)] 15:46
@hoogle [a] -> [(a,a)]
lambdabot Prelude.zip :: [a] -> [b] -> [(a, b)]
gaal nyuh. 15:47
15:47 DaGo joined
TimToady @foo = [\>>+<<]<< @bar 15:49
lambdabot Maybe you meant: faq todo yow
audreyt fixed. was a typo
svnbot6 r12466 | audreyt++ | * Repair >>+<<. "drop 2" was typo'ed into "take 2"
r12467 | audreyt++ | * Pugs.Prim.Keyed: sizeFromRef is unused
audreyt if I've used proper types for hyper, there won't be a chance for typo...
let's see. hyper only makes sense on prefix/postfix/infix 15:51
including postcircum
but not circum
hm. too many combinations.
so probably "Hyper / Fold / Scan" as enum 15:52
and each var can have a list of those on them
xerox gaal: map (id &&& id) 15:53
audreyt from innermost to outermost
TimToady: do they ever live in the sym table?
xerox (...or even map (join (&&&) id).)
gaal xerox: I think I should introduce you to asavige...
audreyt i.e. if the symtable has prefix:[+], then should it take prec 15:54
over the autogenerated fallback?
xerox gaal: yarrr, what?
gaal there's a guy I want you to meet
audreyt show him saturn :)
TimToady We've tried to keep the metas out of the sym table because if they're in there people will screw 'em up.
audreyt but S03:821. 15:55
TimToady yes
audreyt so probably still allowing its entry for now
xerox gaal: Okay! 15:56
TimToady so far we've only really allowed reduce ops
the mathematicians *will* screw up the hypers if you give 'em a chance though.
audreyt and if someone defines prefix:[>>+<<] 15:57
svnbot6 r12468 | gaal++ | * some golf in Pugs.Parser.Operator before audrey strikes
audreyt we can't help but let them get it.
so seems easier to just allow the userdefined hypers, if already in scope, win the dispatch...
TimToady it's either that or complain bitterly.
gaal xerox: search.cpan.org/~ASAVIGE/Acme-EyeDr...yeDrops.pm
lambdabot Title: Acme::EyeDrops - Visual Programming in Perl - search.cpan.org
audreyt that's one way out too 15:58
gaal xerox: also, www.perlmonks.org/index.pl?node_id=397958
lambdabot Title: Saturn
15:58 spoop joined
xerox stares blankly 15:59
TimToady we do have to have some internal way of doing syntactically magical reduces like [,]
or more semantically magical, I guess 16:00
but reduce is the one we already have an escape valve for
xerox gaal: I did a eye in C at some point ^_^ 16:01
gaal did it see better when you expanded the circumference? :p
TimToady and there's a sense in which all the names of the available metaops have to be pregenerated so that longest token can win.
audreyt wow. r12465 exceeds my expectation.
TimToady so I guess they all go in lexer table, if not sym table
gaal in compilation speed?
TimToady in failures? 16:02
audreyt in parse speed.
profs shows 2x speedup
but how is that possible.
clkao it's getting cold... is it christmas yet?
audreyt maybe implicit parameters are really slow ;)
clkao becuse it didn't parse at all?
TimToady I think maybe I'll start a smoke?
gaal must be the speedbugs :)
TimToady that means yml is useless now?
audreyt must be .prof specific 16:03
gaal TimToady: I think we can afford more than x2 speedup...
audreyt yeah. in nonprofiled build the speedup is less significant 16:04
so it's more like the GHC profiler didn't like impl params before
that's more like it ;)
TimToady whew!
gaal spj needs to profile the profiler?
TimToady still, have started new smoke to see how many more tests pass with hyper fix. 16:05
if we have [>>!===<<]<< in the lexer table it becomes rather easy to look up and carp about, since those are just magic hashes that can be used without the magic outside of regexen. 16:07
we need to be sure not to add any metaoperators that produce exponentially more lexer table entries though... 16:08
hmm, still getting: 16:09
Actual: An exception was thrown : No compatible subroutine found: "&infix:Ā»-Ā«"
16:09 xinming_ joined, chris2 joined
TimToady ext/Benchmark/t/basic.t line 10, 16:09
audreyt ?eval (1,2,3) >>-<< (4,5,6) 16:10
TimToady and following
16:10 evalbot_12464 is now known as evalbot_12468
evalbot_12468 (-3, -3, -3) 16:10
TimToady french naughtiness?
audreyt ?eval my @a >>-<< my @b
evalbot_12468 ()
audreyt no, it was using texan
probably your pugs is not r12468?
ohh wait 16:11
it was using french.
TimToady Updated to revision 12468.
audreyt sorry.
TimToady ?eval (1,2,3) Ā»-Ā« (4,5,6)
evalbot_12468 Error: unexpected "\\" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input
16:12 xinming_ joined
gaal audreyt: I don't quite understand where the parsing for ops actually occurs. I'm looking at makeOp1 now: is it *just* symbol name >> lookAheadLiterals? 16:12
if so presumably in my case I have to conditionally change that to between startOp endOp lookAheadLiterals 16:13
audreyt sure
gaal lookAheadLiterals is confusing me though. why does it sometimes contain prefix etc.?
audreyt but then you just made circumfix. 16:14
gaal I'm doing circumfix now, yes
audreyt the horrible kluge was there to make -e parse
because longest token doesn't span levels yet
you don't need that for circum 16:16
gaal what's the concept that differentiates circumfix from {prefix, postfix} etc.?
audreyt circums nest
gaal I mean what's the name for this? 16:17
audreyt parsefail
gaal parser = if prec == Circumfix then regularParser else circumfixParser
where regularParser = symbol name
circumfixParser = between opener closer lookaheadmoose 16:18
(sorry, regularParser = symbol name >> lookaheadmoose)
16:23 cmarcelo joined, bernhard joined 16:26 Psyche^ joined
audreyt | MFold -- [+] 16:33
| MScan -- [\+]
| MPre -- >>+
| MPost -- +<<
| MHyper -- >>+<<
| MHyperFold -- [>>+<<]
| MHyperFoldPost -- [>>+<<]<<
| MHyperScan -- [\>>+<<]
| MHyperScanPost -- [\>>+<<]<<
did I miss something? 16:34
gaal don't we call scans productions now? 16:35
MProduce
or MTriangulate
<- ever ready with the paint bucket
TimToady I like triangulate as in "narrow in on the answer"
audreyt but is it narrowing? 16:36
gaal I liked the etymological profundity of produce
TimToady widening in on the answer?
produce is far to generic
*too
xerox Etymological profundity?
audreyt if I call it MTrig
that's principle of max surprise :) 16:37
gaal xerox: reduce/produce
xerox: that's the same root in both
xerox Right.
TimToady it's almost as bad as "scan"
gaal TimToady: well, I was happy when you suggested it :-p 16:38
audreyt the spec wording is "triangular reduce
svnbot6 r12469 | audreyt++ | * Fix hypers with unicode chars.
gaal wow, here's an error I never got before.
pugs: No match in record selector Pugs.Parser.Types.op_assoc
TimToady yay
audreyt gaal: how did you produce it? 16:39
or triangulate into it?
TimToady your meter doesn't scan.
and you're not allowed to rhyme with the same word... 16:40
gaal your merier doesn't run
*metier
TimToady Meteor? Run!
gaal audreyt: with the patch over at perlcabal.org:~gaal/tmp/circum.0.patch
audreyt 404 16:41
err nvm
gaal: Operator.hs line 57
add a case to splitop 16:42
rindolf Hi TimToady
16:42 Psyche^ is now known as Patterner
audreyt also instead of reuseing makeop1 16:42
I'd suggest makeOpCircum.
gaal so much for the error there...
TimToady howdy do!
gaal okies
rindolf TimToady: sup? 16:43
TimToady is my alias for "svn up" :)
16:43 luqui joined
rindolf TimToady: OK. 16:43
I don't have an alias for svn up. I type it quickly enough. 16:44
It's just 6 letters.
gaal I used to type 'cvs' when I meant 'svn'. Then I started typing 'svn' when I meant 'cvs'. Then 'svn' for 'svk'. Now I don't use source control any more.
rindolf I uploaded this today: search.cpan.org/~shlomif/Test-Count-0.01/ . 16:45
lambdabot Title: Shlomi Fish / Test-Count-0.01 - search.cpan.org
rindolf gaal: you're not using version control?
gaal cpan-upload -mailto [email@hidden.address] -user gaal Test-Baron
rindolf gaal: I've done my SICP exercises using CVS.
gaal: what's Test-Baron?
merlyn cp Module.pm Module.pm-GOOD 16:46
rindolf merlyn: hi.
merlyn cp Module.pm Module.pm-2006-08-20
gaal nobody gets my humor.
so I'll cry and you'll get my vitreous humour.
rindolf gaal: but we still lvoe you!
TimToady I got it, which is why I didn't say anything.
because I'm kind. :P
rindolf search.cpan.org/~shlomif/Test-Count-0.01/ 16:47
lambdabot Title: Shlomi Fish / Test-Count-0.01 - search.cpan.org
TimToady or is that type, or wtf?
gaal Help! I am surrounded by unconditional love!
rindolf Sorry.
better-scm.berlios.de/docs/shlomif-...ution.html
lambdabot Title: Shlomi Fish - Evolution of a Revision Control User
rindolf gaal: I love you only in condition that you love me uncondtionally. 16:48
gaal too late, you already signed
TimToady unconditional lover's quarrels...
*lovers'
gaal is MkOpRow.o_circumfix :: ![UnaryOperator] ? 16:50
audreyt sure
16:52 cmarcelo joined
rindolf Yay! Test::Count works. 16:53
audreyt: what is your current location?
audreyt Taipei
svnbot6 r12470 | gaal++ | * remove redundant export
gaal xerox++ # OMG Lojban Y-combinator
xerox chuckles 16:54
rindolf audreyt: what time is it there?
TimToady 01:54 I think 16:55
audreyt TimToady: infix:<[+]> should be definable
gaal in makeParser, what's the correct place to inject circumfixOp in the choice
audreyt right?
gaal rassocP x <|> lassocP x <|> nassocP x <|> listAssocP x <|> return x <?> "operator"
xerox ....and it overloads [+] ?
audreyt and unrelated to folding at all
TimToady yes, real [+] only lives in %prefix 16:56
audreyt gaal: in termp
gaal wow, I think we just interleaved to related questions :)
audreyt termP
xerox unsafeInterleaveQuestions
IRC = unsafeInterleaveQuestions -- hehe
TimToady ask 'em all, and STM will sort it all out 16:57
xerox @arrr
lambdabot Yeh scurvy dog...
gaal lol
but I don't understand audreyt's answer. 16:58
TimToady bbl &
audreyt gaal:
pres <- many $ (fmap Left prefixOp) <|> (fmap Right optPrefixOp)
Operator.hs:522 16:59
I think there's an easier way here
let me think
gaal ah ok
17:01 elmex joined
audreyt your conOp treatment won't work 17:02
the lookAheadLiteral doesn't do the actual match 17:03
it's postproc
so "between" will fail
gaal harumph.
audreyt Circum needs to carry two
gen parsers around
Circumfix (GenParser t st (a -> a)) (GenParser t st (a -> a)) 17:04
gaal one for content and one for terminal?
audreyt yes
and actually the first one is just (GenParser t st ()) 17:05
gaal Ah like ta carryah two pahsers in mah belt, yessum
audreyt it's the second one that will be a->a'ed
gaal so it's Circum terminal content?
audreyt Circum open close 17:06
Circum (GenParser t st ()) (GenParser t st (a -> a))
gaal erp. OK
audreyt is the constructor form
gaal wait no why is the seond one a->a?
audreyt because it gets Exp (the inner expression) 17:07
and returns Exp (wrapped in a circum)
same as other unaryops
gaal the exp it gets was already parsed? hmmmm 17:08
audreyt sure, just like postfix
17:10 cm joined, ludan joined
gaal okay, another thing I don't get (too much curry) : 17:11
postOps = (ops $ makeOp1 Postfix "&postfix:" doApp) . addHyperPostfix
where's the parser arg to Postfix? 17:12
audreyt App (_Var str) Nothing 17:13
gaal that's a parser? 17:14
17:14 ludan joined
audreyt oh sorry 17:14
line 324
conOp name = return $ \x -> case x of 17:15
Syn "" [] -> con name []
_ -> con name [x]
gaal oh, ok
got it!
clevah
audreyt moose!
gaal brb, need H2O
audreyt considering that's my first lines of Pugs code
it's probabl too clever
(I was still recovering from over-point-freeing in OpenAFP at that time)
xerox will NEVER recover. 17:16
audreyt xerox: you know point free is wrong when the eta-expanded form is _shorter_ 17:17
i.e. when @pl gives out a longer line
xerox closes his ears and sings ... ALALALALAL
pl doesn't find the best ones some time. 17:18
Also, some mild composition of points and points free is okay at times.
audreyt that I'd agree with.
xerox (For example for very-deep-into-the-expression formal parameters.)
gaal 20:15 < audreyt> considering that's my first lines of Pugs code
!!!
audreyt sometimes comprehension is correct.
xerox But how I found that out is creepy. 17:19
audreyt gaal: it has to be, as without that there's no parser :)
gaal nothingmuch wrote a language with no parser...
xerox He writes ELFs ? 17:20
audreyt forth
gaal no, blondie
audreyt oh. that.
xerox On the other hand it's cool to do points-free contests 17:21
One gives an expression and the people start trying to points-free it
Without using \bot of coure.
*course
audreyt it's like writing compressors
if you don't constrain the decompressor size
xerox Let's do it! yarrr :)
audreyt you can compress anything to nil ;) 17:22
xerox nil to anything? :D
Oh, "write a crazy id function" is also quite nice
audreyt just use a different decompressor for each different nil :)
xerox "without using id, \x -> x, easy-ones"
audreyt unsafeCoerc#
gaal replicate 1 17:23
audreyt er no, that's singleton
gaal argh
xerox hehe
gaal busted
head . (replicate 1) 17:24
head . singleton for that matter
xerox That's id?
> (head . (:[])) 1 17:25
lambdabot 1
gaal reverse . reverse
no that only works for lists
xerox _finite_ lists :D 17:26
gaal :)
ok this is distracting :)
xerox > ((flip const) undefined) 1
lambdabot 1
xerox will stop :P
17:30 DaGo joined 17:36 kanru joined 17:37 mdiep joined
audreyt gaal: note that inside Circum, the prec level is lifted to outermost 17:38
you can simulate it by not using <-termP 17:39
but simply use <-parsetightOperator
gaal audreyt: I'm still not grokking this fully. e.g.
makeOp1 prec sigil con name = prec $ try $ do
but makeOp1 Prefix "&prefix:" doAppSym
audreyt "prec" should be "fixity"
gaal Predix isn't a prec!?
audreyt please change away 17:40
bad name choice
gaal so the whole funtion body is an argument to its first arg?
(almost)
audreyt yeah 17:41
ok, the metaop change is implemented
surprisingly straightforward
9 possible metaops 17:45
svnbot6 r12471 | audreyt++ | * Pugs.Types and Pugs.Eval.Var: Make the choice of metaops
r12471 | audreyt++ | apparent during parsetime, by making use of the v_meta
r12471 | audreyt++ | slot in Var, instead of doing name mangling in runtime.
r12472 | audreyt++ | * Also remove sizeFromRef for real.
audreyt beats unbounded combinations ;)
gaal yay
audreyt though user-defined metaops will kill this
but fortunately, not going to do it until the Macro milestone
gaal I'm still confused about this 2nd parser stuff :( 17:46
pasteling "gaal" at 192.115.25.249 pasted "circumnabulation" (12 lines, 344B) at sial.org/pbot/19140
audreyt there's no \ex 17:47
17:47 justatheory joined
gaal the retrurned closure's it? 17:48
audreyt Circumfix (symbol opener) (symbol closer >> return (con name . (:[])))
will do
gaal I'm so glad I had that little game with xerox earlier :)
xerox is happy too
hehe, box.
audreyt gaal: commit what you have and let me have a look? :) 17:51
(or post it as a patch)
gaal one moment 17:52
perlcabal.org/~gaal/tmp/circum.1.patch 17:53
audreyt the prec level is wrong
unary \ is at that level
but \(...) is term level 17:54
fixing
gaal that's the makeParser change right?
it also doens't compile as you must have (fixed . noticed)
xerox > (fix >>= const) (1:) 17:58
lambdabot [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1...
xerox :P
audreyt fixed. testing 18:01
worked. 18:05
we can convert [...] to it then
gaal yay
though that's precircumfix 18:06
isnt' it?
audreyt huh?
[1]@a
is the syntax like that now?
audreyt missed the memo
ingy hola
audreyt ingy: hey!
ingy hi audreyt
is there anything I need to do today? 18:07
rindolf Hi ingy
audreyt release YAML.pm :)
ingy oh ok...
is it patched up?
audreyt sure, for some time now :)
*** No compatible subroutine found: "&circumfix:\( )" at <interactive> line 1, column 1-9 18:08
gaal: you'll take it from there? :)
rindolf ingy: did you end up integrating my patch to IO::All?
The one with the non-forking server.
gaal audreyt: hmm, it's [op
ingy rindolf: probably not yet :(
gaal [op] list
rindolf ingy: OK.
18:09 Patterner joined
gaal ah: prefix_circumfix_meta_operator 18:09
(whew)
audreyt I wonder if !>>cmp<< is legal 18:11
TimToady: does >><< retain the assoc for chainfix?
gaal audreyt: counterpatch url?
or just commit... 18:12
audreyt also I think syntactically autoquoted barework
bareword
x => 1
should just produce
Syn "named" [] 18:13
instead of
App "infix:=>"
that will save the post-munging
and will let \(...) automatically get named as named
gaal that's cool
but again, metaops seem to be a different grammatical category according to S02 18:14
audreyt will you do that? I'm about to sleep :)
gaal: nono, that's where you _define_ metaops
gaal I'm not too wakeful myself
audreyt oh ok
tomorrow then
committed.
gaal $work tomorrow :( 18:15
Circumfix (GenParser t st a) after all? 18:17
svnbot6 r12473 | audreyt++ | * Introduce Circumfix and circumfix:<\( )>. 18:18
r12473 | audreyt++ | It's all gaal++'s code, I just made it compile :)
audreyt yeah, since I pushed the entire term into it
it's better known as Term () actually.
18:19 luqui joined 18:20 lidden joined, diakopter joined
audreyt ok, named calls are in. 18:25
gaal whoops primDecl will barf on circum names :/ 18:26
fixing
audreyt TimToady: now that we have 18:29
'x'=>1 # pair
x=>1 # named
can we relax the () rule so that 18:30
(x=>1) # still named
?
luqui I don't see an advantage to doing that...
audreyt will make implementation easier (one less parens to track)
luqui: you think () as disambiguator is still valuable? 18:31
luqui first answer this: my $x = foo => 42; # succeeds, $x is a Pair ?
audreyt sure
luqui then yes, I think () as a disambiguator is still valuable 18:32
I'm seeing foo x => 42, y => 91 as "extended call syntax" not "pair construction"
audreyt I see your line of reasoning
because if we relax (), then that will fail with
infix:<=>: unknown named argument 'foo'
luqui also that... 18:33
in a way, though that wasn't my direct concern
18:33 Patterner joined
TimToady audreyt: cmp is not chainfix so you couldn't apply ! to it even without >><< 18:40
but !>>==<< is also nonsensical, I think 18:41
if you mean >>!==<< you should write that. 18:42
luqui >>==<< returns a list, right?
TimToady right
luqui yeah, so neither of them is probably what is intended when that is used
audreyt circumfix macros is in. 18:43
TimToady >>!==<< would return a list of booleans
yay
I don't really have a feeling one way or the other about (x=>42) yet. 18:44
audreyt that's ok, I'll just make circumfix macros take the same parse rule
as function calls with aprens
but that means
[x=>1]
and
\(x=>1)
the first one needs to do a post transformation to retain ordering
since it certainly does not mean named inside [] 18:45
(hash construction doesn't care either way.)
TimToady or the decision to de-order is done lazily based on context... 18:46
like the meaning of *
audreyt yeah
TimToady sub foo (\$foo) { # can I here get the original ordering? 18:47
audreyt Pugs.Parser.Operator is looking more and more like PGE.OpTable now...
...by neccessity
TimToady not suprising, since I keep boxing in all the parsers with strange ideas... :)
audreyt TimToady: the previous ruling is that ordering is retained only upto same-nameds
x=>1 y=>2 # would lose ordering 18:48
I'm not sure...
TimToady I suppose one could tag them so that you could at least sort them back into the right order.
audreyt tricky to do in the face of [,]%
still possible 18:49
TimToady or the named list is threaded through the positionals
audreyt painful, though. I think it's far easier to just say
in the signature list of circum[]
that "I don't take named, all named is just pairs"
using a shorthand of is parsed()
and let the Capture type retain its idea of unordered names 18:50
easier to explain, too
18:51 Psyche^ joined
TimToady I hate throwing away information... 18:51
audreyt oy, we tag with match tree already
so you can get it with .from comparison if you must 18:52
it's just [,]% won't have that
(.from is parse/macro level only though)
I think a non-macro sub whose behaviour 18:53
depends on the ordering of named arguments
is hard to find a story for it
TimToady is kinda like a generic Unix command processor
audreyt -x -y 18:54
-y -x
would take different meaning?
(ordering here means "across names" not "within names")
TimToady many Unix commands have ordering dependencies of various sorts. 18:55
sort, for instance
audreyt not familiar with that 18:56
svnbot6 r12474 | gaal++ | * Captures make it to Prim.hs. Now we need to write the code inside Eval
r12474 | gaal++ | to convert an old argstack to a new one.
gaal I wish Haskell had conditional bindings...
audreyt what's that?
let (x, y) | cond = (1,2) -- valid 18:57
svnbot6 r12475 | audreyt++ | * &circumfix:<\( )> now understands invocants and named parameters.
r12475 | audreyt++ | * Also, circumfix macros is now made possible in parser level.
gaal audreyt: make (x,y) variable
see the ugly mangling to primDecl
if only I could do 18:58
rindolf TimToady: maybe you'd like to read www.shlomifish.org/philosophy/case-...-swapping/
lambdabot Title: The Case for File Swapping
gaal let (isCircum ?? (a:b:c:d) !! (a:b:d:e)) <- moose
wolverian find is another that needs ordering 18:59
find dir -iname '*.pl' -and -size 100
gaal I always found that one annoying
wolverian (well, that particular one doesn't, but there are cases where it is required)
rindolf Hi wolverian
wolverian yay, my packet loss to feather is gone!
hello rindolf
rindolf wolverian: sup?
luqui audreyt, did you change Maybe Exp to ParamDefault? 19:00
wolverian just came back from animecon
rindolf wolverian: nice.
wolverian lots of cosplay :)
(not me, though)
rindolf wolverian: I like a lot of Anime art.
audreyt luqui: it's just a newtype
find($dir, iname => '*.pl', :and, size => 100)
is this really sane
and is it worth supporting? :) 19:01
luqui ugh...
(about the find interface, that is)
audreyt, right, but the maybe left
why?
wolverian audreyt, junctions!
luqui find($dir, { .iname('*.pl') && .size(100) } # match functions, not attributes 19:02
gaal luqui: point xx 2
audreyt right. in that case the ordering info can be thrown away across named params
luqui oh, I get it 19:03
yes, throw away ordering
!
(I was not following the relevent discussion)
19:03 weinig joined
gaal audreyt: or are you encoding no ParamDefault as Exp.Noop? 19:04
(ick)
audreyt that's a thought.
svnbot6 r12476 | audreyt++ | * Pugs.Val.Code: luqui++ noticed I made a typo and forgot
r12476 | audreyt++ | the Nothing case for ParamDefault in newland Code.
audreyt though no it was just a typo.
wolverian $dir.find(all FileMatch("*.pl"), FileSize(500)); # java+haskellish I suppose 19:05
audreyt 3am... need to sleep :) 19:06
wolverian don't know if it pays off much to lift that to the type level.
TimToady good, I can let my smoke run now instead of restarting it every few minutes. :)
wolverian (add .new()s there if required) 19:07
gaal how could Param derive Show when ParamDefault doesn't?
it works, but it sohuldn't
ah, it doesn't -- #include :(
fixing
19:07 silug joined
audreyt ParamDefault has a Show instance 19:08
gaal arghblrmn sometimes Haskell questions have the simplest answers
audreyt arghblrmn indeed. 19:09
cmarcelo hello #perl6.
gaal hey cmarcelo
lumi_ gaal: Is the new AST thing live?
gaal some of it is! 19:10
?eval vv "moose"
19:10 evalbot_12468 is now known as evalbot_12475
evalbot_12475 CCall "perl" CaptMeth {c_invocant = VPure (MkStr "moose"), c_feeds = [MkFeed {f_positionals = [], f_nameds = {}}]} 19:10
audreyt chuckles
the MOP doesn't handle .perl yet
19:10 aph joined
audreyt so it dumps the Capture 19:10
gaal where'd that Capture butt in from?
oy
audreyt evalbot wants .perl from it
gaal yeah
svnbot6 r12477 | audreyt++ | * remove the commented-out, bogus Data pseudoinstance from Pugs.Val
lumi_ Wo. The Code types too?
luqui uh oh... Exp changed... 19:11
cmarcelo audreyt && gaal: using Judy.Hash for interning stopped segfaulting on prelude generation in ghc-6.5 + pugs-trunk. would you mind to checking if happens to you? (i'm checking 6.4.2 now too..)
luqui didn't realize
audreyt cmarcelo: I still sometimes get "Judy.StrMap: interruped"
gaal luqui: it's rather more articulated than the old one
audreyt and it's trunk GHC for me too
cmarcelo audreyt: from Judy.StrMap ?
audreyt and Judy.IntMap too 19:12
gaal lumi_: Code's active, but you can't construct one jsut yet
audreyt but only rarely
anyway, sorry but I really need to fade :)
g'nite!
cmarcelo ok
gaal lumi_: from userland that is. feel free to hack something up
night audreyt
lumi_ Night audreyt
gaal lumi_: I'm wandering off soon too
TimToady emulate a log 19:13
gaal TimToady: length $number
# perl 5 way to emulate a log
# works for integers and in base 10 only
lumi_ Heh
gaal # also, is off by one
lumi_ Not much of an emulation 19:14
gaal well, consider that perl 5 has a built in way of telling you about how big an array is
length @arr
TimToady length unpack('B*', $number) # base 2 log
19:15 Khisanth joined
gaal length (1 x $number) # where's xerox 19:15
lumi_ M. Why do the parser state fields start with "rule" like the parsing rules? 19:16
TimToady funny way to write int()
gaal TimToady: it's a base 1 log
lumi_ Not generic id 19:17
gaal aka "pointless id function of the day"
luqui gaal, yeah?
presumably, then: 1 ** (length(1 x $number)) == $number
which, well, doesn't look right
lumi_ That works perfectly, for certain values of $number 19:18
luqui lumi_, that's a good question...
lumi_, the serious one, that is
lumi_ I figured
luqui probably hacky oversight
lumi_ Maybe rs (for RuleState) or something 19:19
gaal it also works perfectly for certain values of ==...
luqui state?
gaal actually, by newconv, that would be: 19:20
data RuleState = MkState { s_env :: .. , s_parsePrograms :: .., .. } 19:21
fixing 19:22
19:22 jferrero joined
luqui is Sig supposed to go in a Val? 19:22
or is Sig a VPure? 19:23
gaal Sig is a VPure
there's an alias
type SigPure = Sig
luqui so to put it in a Val, I would write Pure (Sig ...) ? 19:24
gaal yes
or even val . Sig
luqui what is lc val?
gaal autocast
a -> Val
luqui not bad.
gaal class ICoercible m a => IValue m a where val :: a -> Val 19:25
defined in Pugs.Val
luqui ah, Sig doesn't have one of those instances yet
gaal please see Pugs.Val.Base and add 19:26
luqui doing so 19:27
19:30 luqui left, luqui joined
luqui oh, what monad do I use? 19:30
P?
gaal yes, that's for Pure 19:31
(it's Identity)
19:33 DaGo joined
luqui hmm 19:36
No instance for (Pugs.Val.IValue m Pugs.Val.Sig)
but there is an instance of Pure Sig
which ought to imply that, right?
19:37 renormalist joined
svnbot6 r12478 | gaal++ | * lumi++ observed that RuleState fields use names that are confusingly 19:38
r12478 | gaal++ | similar to parser functions. Change them over to use the new naming
r12478 | gaal++ | convention (perldoc lib/Pugs/Doc/Hack/Style.pod)
buubot Type 'perldoc lib' in your shell or go to perldoc.perl.org/lib.html
lambdabot Title: lib - perldoc.perl.org
gaal luqui: can you post a patch somewhere? 19:39
luqui sure
paste?
uh,
perlbot, paste?
gaal perlbot nopaste
perlbot Paste your code to sial.org/pbot/perl or erxz.com/pb and #perl will be able to view it.
Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel>
lambdabot Title: sial.org Pastebot - pasteling
pasteling "luqui" at 67.174.183.183 pasted "Sig no instance" (254 lines, 9.9K) at sial.org/pbot/19142 19:41
cmarcelo build error: Type constructor `Pugs.Val.ValNative' has conflicting definitions in the module and its hs-boot file
gaal cmarcelo: indeed it does! what version of ghc do you have? 19:44
it's a serious error but my ghc didn't catch it...
cmarcelo gaal: ghc-trunk.. 19:45
gaal: the problem is that boot file doesn't have the other constructors? 19:46
gaal if it has one, it has to have them all identically
fixed
svnbot6 r12479 | gaal++ | * cmarcelo++ notes a bogus datatype articulation in th boot file. 19:50
r12479 | gaal++ | luckily, the constructor isn't required, so we just omit it.
r12480 | audreyt++ | * Pugs.Parser.Literal: Move all ruleLit and its subrules
r12480 | audreyt++ | from Pugs.Parser to here to speed up compilation.
luqui gaal, any idea about that error? 19:51
gaal luqui: it's Just Working for me so far (I had to fix some minor problems in Eval.Var)
19:52 Psyche^ joined, Psyche^ is now known as Patterner
luqui it fails to compile in Prim/Code 19:52
gaal what ghc are you using? just worksforme 19:55
svnbot6 r12481 | gaal++ | * unbreak the build for GHC 6.4
luqui The Glorious Glasgow Haskell Compilation System, version 6.4.2
[
svk pull + compile again 19:56
(that's what I'm doing, rather)
gaal oh, #include
gaal pines for 6.6
luqui ? 19:57
gaal ugh, turns out my fix for ValNative was wrong too, fixing
luqui what is in 6.6
gaal luqui: instance declarations in hs-boot files
luqui hm
gaal so we don't need to do the ugly #include crock
luqui I would like to see a lack of hs-boot files
cmarcelo gaal: it doesn't work here too.. i was realcleaning and make'ing again just in case.. 19:58
gaal cmarcelo: yes my wc is a little weird right now
fixing...
xerox gaal: I'm back! 19:59
What was that? 20:00
gaal what was what?
xerox gaal: length (1 x $number) # where's xerox
luqui I don't think that was referring to you... 20:01
gaal xerox: it's an identity function on integers
it may also help you as you puzzle over this:
perl -wle '("1" x $_) !~ /^(11+)\1+$/ && print while ++ $_'
xerox I am not sure... 20:02
cmarcelo gaal: "wc"?
gaal working copy 20:03
cmarcelo testing...
gaal oh noes! the hs-boot conspiracy strikes again! I can't use existentials in hs-boot 20:04
cmarcelo: not done yet
xerox You want to use crazy things in weird places!
gaal xerox: I want to unbreak the build
xerox ....for correct purposes. 20:05
20:05 SamB joined
cmarcelo gaal: ok 20:05
20:07 foo\ joined
luqui that is too slick 20:07
gaal what is?
luqui just figured out that prime script
gaal luqui: don't spoil xerox's fun
(credit to Abigail, btw) 20:08
luqui I'm not going to explain it... it is easy to tell what it does by, er, running it ;-p
gaal I know someone who figured it out without running it.
And without knowing much Perl, too
luqui not bad
xerox OK!
xerox thinks 20:09
20:09 MacVince joined
luqui gaal, do you think that the desire to have the Val stuff in separate files is more trouble than it is worth? 20:10
xerox I am not sure what !~ is.
luqui maybe we ought to write a script to cat the files togheter
xerox ~~ is regext matching, ! adds a not?
luqui xerox, ! =~
xerox *regexp
Okay.
gaal luqui: well, that's what we do with Val.Code
it's included inside Val 20:11
luqui ah right
xerox I am not sure what print prints...
luqui xerox, print means print $_
xerox print while ++ $_
pmurias_ Convert::Binary::C++ #cool, usefull, and darned documented
gaal but that sucks - when I forget to touch the parent file, stuff's not rebuilt
xerox: $_ is like 'it' in ghci 20:12
xerox I can't make sense of the while
luqui xerox, that is postfix while. foo while blah means while (blah) { foo }
gaal heh, that's a touch of obfuscation
postfix while, prefix ++
xerox while (++ $_) {print $_}
Is ++ like in Haskell?
luqui xerox, except while binds very loosely, so the whole script is inside the while
xerox Ah!
luqui xerox, ++ is like C
xerox ooooh.
I think I have enough data 20:13
luqui :-)
xerox perl -wle '("1" x $_) !~ /^(11+)\1+$/ && print while ++ $_'
$_ is the arguments you pass initially, or what?
luqui it's just like any other var. starts as undef (which is basically 0) 20:14
xerox Ah-ha.
gaal OK I just don't understand this. In a hs-boot file I have data ValNative 20:15
in the consuming file I have something that uses a constructor
but it dies with Not in scope: data constructor `NBuf' 20:16
xerox So for 1, 2, 3, 4, ... it computes strings of ones of length 1, 2, 3, 4, ... and prints such numbers depending on the fact that such string is ...
luqui gaal, NBuf is in the boot file?
gaal xerox: yes
luqui: no
oh
creap
xerox odd?
Oh no.
gaal xerox: you're getting warmer
xerox \1+
luqui xerox, I think what you said was correct 20:17
for a certain value of "..."
xerox That regexp involves much backtracking right?
luqui yes.
gaal hella backtracking
xerox I have a theory... 20:18
But I don't know how it does accomplish it :)
cmarcelo xerox: what's your theory?
xerox Prime numbers?
luqui peano arithmetic
xerox That'd be the coolest thing you'd do with a series of numbers 20:19
gaal cmarcelo: please try 12482
xerox Aaaaah, there's the not!
Yes, now I see it. That's clever! 20:20
svnbot6 r12482 | gaal++ | * unbreak the build
xerox Clever clever.
luqui the regex is the neatest part about it
cmarcelo =)
gaal: i'll try it..
xerox Does it run on pugs?
(That precise code)
luqui xerox, no
you would have to perl6ify it
gaal TWO YEARS LATER... "Hey guys, this is xerox, want to help me write a Haskell compiler in Perl 6?" 20:21
luqui which... well
xerox @arrr
lambdabot Aye Aye Cap'n
xerox laughs
luqui I think this is perl 6 (not sure about the !~ operator):
xerox gaal: I spot general recursion in your idea...
gaal xerox: that's okay, by then 6.6 will be out and boot files will work 20:22
luqui pugs -e '("1" x $_) !~ /^(11+)$1+$/ && .say while ++$_'
?eval ("1" x $_) !~ /^(11+)$1+$/ && .say while ++$_ < 20
20:22 evalbot_12475 is now known as evalbot_12481
evalbot_12481 Error: unexpected "!" expecting comment, operator, postfix conditional, postfix loop, postfix iteration, ";" or end of input 20:22
lumi_ !~~ I think?
luqui ?eval ("1" x $_) !~~ /^(11+)$1+$/ && .say while ++$_ < 20
gaal yes
20:23 traecer joined
gaal *still* hasn't reproduced luqui's breakage 20:23
pmurias_ gaal: was your comment regarding suckage regarding Convert::Binary::C?
gaal no
luqui hasn't reproduced it either (rebuilding from clean)
xerox > let fun xs ys = join ["implement ",xs," in ",ys," "] in fix (fun "Perl6" . fun "Haskell") 20:24
lambdabot "implement Perl6 in implement Haskell in implement Perl6 in implement Haskel...
luqui ?eval "you there?" 20:25
xerox grins
pmurias_ gaal: good :)
xerox luqui: ah cool, that would be it?
luqui I think so
evalbot_12481 is k.o. apparently
xerox In Haskell it would just be [1..] >>= f . show, for some value f. 20:26
Well, not exactly, sorry.
20:26 jferrero joined
luqui xerox, in haskell it is just main for some value main 20:27
gaal filter isPrime $ 1 .. ...
svnbot6 r12483 | gaal++ | * do away with redundant import
xerox Well, I have a neat primes definition now that I think of it.
But the (11+)\1+ is really funny.
> let primes = 2 : 3 : [n | n <- [5,7..], all (\p -> n `mod` p /= 0) (takeWhile (\p -> p*p <= n) primes)] in primes 20:28
lambdabot [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...
luqui yeah, that's more elegant than clever 20:29
xerox Which? :-)
luqui and I'm used to seeing elegant haskell, so whatever :-p
gaal luqui: how's your build going?
xerox :-D
luqui it died somehow, and I saw you committed, so I pulled and am rebuilding 20:30
it did not die the same way as before though
looks like it compiled
:-D
gaal variant death
luqui would like a hoogle that did project-local stuff easily 20:35
gaal luqui: run hihoo.pl on your own project 20:36
luqui hihoo?
gaal the thing that constructs the hoogle data
luqui oh 20:37
after getting and compiling hoogle, of course ;-)
later
gaal alternatively, ndm noticed that ghci has a command that almost does it for us. :i I think
luqui thanks though
gaal well, you wanted a project local hoogle that ran where exactly? :) 20:38
luqui uh pugs
oh
right
yeah
I was just whining
gaal luqui: also ask xerox++ about GOA 20:39
I'm off to bed
have a good 'un everybody!
xerox Goodnight!
luqui night
cmarcelo gaal: it worked! =)
gaal cmarcelo: excellent! 20:40
night :) z&
20:43 evalbot_12433 joined
luqui ?eval "I'm back" 20:44
20:44 evalbot_12433 is now known as evalbot_12483
evalbot_12483 "I\'m back" 20:44
svnbot6 r12484 | luqui++ | * Added the beginnings of Code::signature (returning a VV Sig).
r12484 | luqui++ | * Changed all references to Val from AST/Internals to qualified.
luqui ?eval "I can do regexes" ~~ /regex/
evalbot_12483 Match.new( ok => Bool::True, from => 9, to => 14, str => "regex", sub_pos => (), sub_named => {} )
xerox ?where goa 20:45
lambdabot I know nothing about goa.
xerox Ack1
luqui ?eval ("1" x $_) !~~ /^(11+)$1+$/ && .say while ++$_ < 20
hmmm.. I wonder if I killed it again...
xerox :-( 20:46
luqui: can you do a wordy explanation of the regexp? 20:47
I'd like to translate it but by brain isn't collaborating. 20:48
TimToady you wanted $0 20:51
$1 is gonna match a lot of nulls...
luqui oh right
TimToady a LOT of nulls 20:52
luqui ?eval "still here"
damn
TimToady still thinking about the last thing you said, i suppose
svnbot6 r12485 | audreyt++ | * Oops; the Literal.hs refactoring accidentally broke
r12485 | audreyt++ | interpolated variable parsing. This fixed it.
TimToady I thought evalbot had resource limits, but maybe if it has delegated to pge they don't apply? 20:53
20:53 diakopter joined
luqui but don't limits apply to forks too? 20:54
hmm.
TimToady probably get the choice
svnbot6 r12486 | audreyt++ | * Pugs.Parser.Operator: Introduce an OpName type to more 20:55
r12486 | audreyt++ | succintly capture the idea of longest-token matching;
r12486 | audreyt++ | this currently only helps performance marginally
r12486 | audreyt++ | (the schwartzian transform "ops" is now gone),
r12486 | audreyt++ | but will be very helpful once we allow generalized
r12486 | audreyt++ | longest-token matching across levels.
luqui xerox, oh, just saw your request
yeah, the first parenthetical captures two or more 1s, right? 20:56
call that string, oh, say $0
then the regex asks whether the entire string is just a repetition of two or more $0s
TimToady actually, the manpages on setrlimit and fork are unhelpful
svnbot6 r12487 | audreyt++ | * restore evalbot-loop's "make" cycle
r12488 | audreyt++ | * restore mandel.pl so it draws 30, not 3, lines.
MacVince I was checking out t/operators/range.t and I saw that there were no tests for things like 1..10:by(2). I tried it in pugs and it doesn't work, so I guess that hasn't been implemmanted yet. I don't believe I know enough to implement it myself, however I could probably write tests for when it becomes available. Shall I do that or should I wait until :by() is implemented to write the tests? 20:57
luqui that is, is the string a product of two numbers (the length of $0 and the number of times it matched)
TimToady go ahead and write the test. if you get a parsefail, slap eval '...' around it 20:58
luqui MacVince, definitely write tests first!
MacVince okay!
luqui what was the rule for operator adverbs? 20:59
it just binds to the tightest one preceding it?
TimToady yeah, not counting inside parens
luqui so (3..4):by(2) works?
TimToady *not* counting inside parens
xerox Aha 21:00
I did it in Haskell.
luqui (the term "inside parens" confuses me)
xerox Thanks luqui, I just read.
TimToady an adverb outside parens doesn't modify an operator inside
luqui basically I can make the grammar rule for an operator: term op term advs
xerox Unfortunately lambdabot doesn't do parallel list comprehensions.
luqui and make it greedy, so if there are advs and they don't work, commit and fail
TimToady yes, it just has to be where an operator is expected
in which case it becomes a named parameter for operator in question 21:01
hmm, could have said that better...
luqui tries to decipher Parser/Operator.hs 21:02
TimToady so anyway 3..(2+2):by(2) will become infix:<..>(3,(2+2),:by(2))
luqui right
xerox luqui: strangely enough, it's cool in Haskell too
luqui paste? 21:03
21:03 SageLT joined
xerox Let me investigate how to desugar parallel list comprehension so I can do it in lambdabot for more coolness points. 21:03
luqui xerox, zip3 etc.?
lambdabot supports parallel comprehension though, doesn't it?
xerox zip! that's an idea.
No :(
No fglasgow-exts. 21:04
luqui ah
xerox > [(n+m) | n <- [1..3] | m <- [1..3]]
lambdabot Parse error
xerox Wow 21:05
It's *very* cool!
A sec.
21:11 DaGo joined 21:14 evalbot_12487 joined
luqui ?eval ("1" x $_) !~~ /^(11+)$0+$/ && .say while ++$_ < 20 21:15
evalbot_12487 OUTPUT[1 2 3 5 7 11 13 17 19 ] Bool::False
luqui yee-hah!
xerox Prepare!
lumi_ Is it sane to generalize the parse state's s_blockPads to Exp->Exp transformations, so it could manage the closure traits in the same way?
xerox > map (length . (undefined:) . uncurry (++)) $ join zip $ flip replicate [undefined] `map` [1..]
lambdabot [3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51,53,5...
xerox Ops. 15?
gaal 9?
luqui oops
lumi_ luqui: 1 isn't prime
xerox lumi_ is right
unique factorization rocks 21:16
lumi_ gaal: Go to sleep!
luqui lumi_, yeah, kind of a definitional thing more than a purely mathematical thing though
xerox Well, it worked
Let me see what I did wrong
gaal there's a good mathematical reason not to call 1 prime, but I'm asleep
xerox Unique factorization is it.
luqui knows.
xerox Uff 21:17
lumi_ gaal: Or do you have an opinion on what I asked? Whether it's sane to generalize s_blockPads to any Exp->Exp and do closure traits inside the same mechanism?
xerox It didn't as parallel comprehension either
I miss some check.
luqui lumi_, he is asleep
xerox It was too easy this way!
gaal looking
lumi_ xerox: A bit too pointless for me to follow 21:18
xerox lumi_: it is just:
21:18 mdiep joined
xerox let yuck = map (\n -> replicate n [undefined]) [1..] in [undefined:xs++ys | xs <- yuck | ys <- yuck] 21:18
But 9 = 1 + 4 + 4 so it doesn't make sense this way. 21:19
Well, length (undefined:xs++ys) in fact.
svnbot6 r12489 | fglock++ | * v6 - fixed Statements and Expression grammars to implement
r12489 | fglock++ | "new-line after a block may terminate an expression"
gaal lumi_: sorry, ENOWAKIES 21:20
lumi_ So it's generating odd numbers
xerox Right.
lumi_ Okie, night gaal
xerox What do I miss.... 21:21
lumi_ The +
:P
xerox ...
Hmmmm!
lumi_ The + in \1+ 21:22
xerox I can implement the first + .. I think
But the latter one is a complete disaster.
21:23 fglock joined
luqui xerox, aye 21:23
I've been trying too
the solution is uninteresting to me
(Even though I didn't get it right, I got close)
lumi_ At last, Perl's more elegant than Haskell :)
xerox Well... 21:24
> let primes = 2 : 3 : [n | n <- [5,7..], all (\p -> n `mod` p /= 0) (takeWhile (\p -> p*p <= n) primes)] in primes
luqui [ n | n <- [1..], l <- [2..n], m <- [2..n], replicate n () == concat (replicate l (replicate m ())) ]
xerox This is elegant.
lambdabot [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,...
luqui mine prints all non-primes
... multiple times
and that is close to the method of the perl version 21:25
xerox I like the method
But I need prolog for it I think :P
luqui starts up prolog
xerox Programming in perl is like oracle programming, and the oracle is some regexp deity.
luqui does not know the prolog builtins well enough to implement this 21:26
gaal > replicate 5 $ replicate 5 "moose"
lambdabot [["moose","moose","moose","moose","moose"],["moose","moose","moose","moose",...
gaal # based on a zen poem
xerox Well, I think I can do primes in the type system with that method... 21:27
HELL I should hack cabal-install! Shame on you! 21:28
gaal xerox: start an (Evolution of a Haskell Programmer)' page
it'll fill up quickly enough.
xerox I was thinking of a post, yuck.
gaal sorry... I'll go back to sleeping 21:29
xerox Well, I think I can..
21:29 dbrock joined
xerox Will think about it. 21:29
In fact I AM thinking about it, I can't avoid the challenge now that I know of it
gaal audreyt: in case you're sleeping well, I noticed that no primDecl line at the bottom of Prim.hs is correct for \( )
with some decls, I only see positional elements 21:30
dbrock is there a specification for the subset of Perl 6 that Pugs implements?
gaal with others, it only finds th prim if there's on arg
some don't work at all
I tried rw!Any, Any, List, rw!Lst
dbrock it would be cool if there were, because that would be a specification for a non-vaporware language
gaal luqui: if you're looking for something to moose, maybe this? 21:31
?eval \(1) 21:32
21:32 evalbot_12487 is now known as evalbot_12489
evalbot_12489 "--- !hs/VInt \n- 1\n" 21:32
gaal ?eval \(1, 2)
evalbot_12489 Error: No compatible subroutine found: "&circumfix:\( )"
luqui uh, what the hell?
lumi_ [x | x <- [2..30], not $ x `elem` takeWhile (<= x) [n | n <- [1..], l <- [2..n], m <- [2..n], replicate n () == concat (replicate l (replicate m ())) ]]
gaal the yaml dump is instead of a Capture translation
luqui lumi_, yucky
gaal luqui: it's the expected interim result
lumi_ True
luqui oh that is capture syntax 21:33
okay, that makes me feel better
I'll have a look at it
gaal to make me feel better, I'll try to go back to sleep
luqui please do
gaal I feel better already 21:34
luqui (you're as bad as audrey)
gaal not by a mile! but &
21:37 hexmode joined 21:45 weinig is now known as weinig|bbl
svnbot6 r12490 | fglock++ | v6 - fixed dispatch for Terms starting with ':' and 'perl5:' 21:47
r12489 | fglock++ | * v6 - fixed Statements and Expression grammars to implement
r12489 | fglock++ | "new-line after a block may terminate an expression"
wolverian hm. the synopses really need tables of contents. 22:02
MacVince agrees
svnbot6 r12491 | fglock++ | v6 - moved 'use v5;' to a Term "macro" 22:05
xerox lumi_: composite = do x <- liftM2 (:) (char '1') (many1 (char '1')); y <- many1 (string x); z <- look; guard (null z); return (x,y) 22:25
lumi_: import Text.ParserCombinators.ReadP
readP_to_S composite "111" ===> []
readP_to_S composite "111111" ===> [(("11",["11","11"]),""),(("111",["111"]),"")]
Thanks to Cale on #haskell
svnbot6 r12492 | fglock++ | v6 - 'do' doesn't require '{}' 22:29
22:33 rashakil joined
MacVince If I want to start writing tests for Perl 6, do I just need to read the synopses to know what behavior the different elements should have or do I need to read the apocalypses and exegeses too? 22:37
wolverian synopses, generally. apos and exegeses are not updated anymore.
MacVince kay
22:38 wilx joined
svnbot6 r12493 | fglock++ | * v6 - added given/when/default to the grammar (need emitter) 22:38
22:40 fglock left
svnbot6 r12494 | Sage++ | Newest version of the translator test script. No big changes, just minor updates. It will recursively run the translator over all .yml files in the directory it is run in, and all subdirectories. 22:40
r12495 | Sage++ | The translator no longer explicitly names nodes. The node type is now a string, which means it can be grabbed directly from the .yml file. 22:43
r12495 | Sage++ | This is a major reversal of previous code, but I've come to see that my original design was unnecessarily bulky, and this revision makes code cleaner and gets rid of unknown nodes. All translation still runs correctly (or at least as correctly as before).
MacVince Does the cperl-mode.el for Perl 6 work for anyone here? When I load it, I get an error saying "File mode specification error: (error "Non-hex digit used for Unicode escape")" 22:49
TimToady MacVince: dunno--I tend to use vim myself. It's possible we broke it recently without noticing. 23:03
In which case, it would be good to have someone using it regularly. 23:04
MacVince TimToady: Does the maintainer hang around here?
TimToady everyone maintains everything around here. 23:07
so just whack on it if it's hosed.
we operate on the easier to ask forgiveness principle
well, that, and revision control. :) 23:08
looks like renormalist has done most of it. 23:10
TreyHarris MacVince: fixing (no i'm not "the maintainer", but I found the problem) 23:17
how do people do the "[file]: comment" business in their commits? manually, or is there a flag to svn commit i haven't noticed? 23:18
svnbot6 r12496 | Sage++ | Updating ASTTranslate.hs to match ASTranslate-sage.hs, to be compatible with major changes in ASTDefinition.
TimToady as far as I know it's manual. 23:19
if I see a comment go by and wonder about it, I just watch which files update in the next svn up.
does it not like \xFg or \x{FFF}? 23:20
svnbot6 r12497 | trey++ | Fixed compile error in cperl-mode.el
TreyHarris my elisp is too poor to figure out my problem. $.y is interpreted as the start of a tr
TimToady: it was simpler than that. the help text used the string "\u" literally, when you have to double-backwhack it. 23:21
23:22 Bit-Man joined
TimToady I suppose whatever figures out variables needs to be taught about twigils. 23:22
23:24 traecer left
TreyHarris well, the only reason i care is that Point is a very convenient playpen class. for the moment my workaround is to just implementing the storage as polars, as it has no problem with $.r and $.[theta] (i can't do utf-8 in irc) 23:24
method x and method y work just fine :-)
TimToady: synopses have "but True" and "but false". is one or the other a typo, or is it saying that True is provided but false is user-defined? 23:27
23:27 weinig|bbl is now known as weinig
TimToady probably can be considered a fossil. 23:30
(the false)
TreyHarris ok, so i can write tests for "but False"? 23:31
TimToady yes.
short for Bool::True and Bool::False, but "but" will intuit unambiguous enums.
well, actually, all imported enums are considered type names that just happen to represent one value. 23:33
TreyHarris what happens when somebody defines "SQL::True" and "SQL::False"? everything preexisting breaks? 23:34
TimToady in the lexical scopes where both exist, you'd have to disambiguate. 23:35
better than silently doing the wrong thing.
TreyHarris the writer of SQL::True and SQL::False can't just say "these don't import so you have to refer to them by long name"?
TimToady at least it'd be caught at compile time
sure
23:36 Limbic_Region joined
TimToady I dare say most module's enums won't be exported by default. 23:36
however, Bool is one that everone gets for free. :) 23:37
TreyHarris ok. i still don't quite have my head around how imports work in the context of mmd existing. because if anyone defines a multi anywhere in your running program, even if it's not in your import path, you may call it, right?
TimToady yes, unless they lexically scope it, which is probably dumb most of the time. 23:38
but most imports will be of simple subs or types (incl enums), I expect 23:40
if you import a simple sub it hides all multies of the same name.
(lexically)
import is lexical by default in P6
TreyHarris really? i thought at one point i read about a fallback from non-core multi to the core sub... 23:41
TimToady almost everything in core will be multi 23:42
TreyHarris i need to just brainwipe and read the synopses over again from scratch. too much cruft hanging around. i've been reminded umpteen times that it's ?? !! now but I still write ?? ::. so i can register-shift between perl 5 and perl 6, but i can't register-shift to today's perl 6 :-)
TimToady if you set up non-core multi in a scope, you generally do it with a "my proto".
but that proto multi can explicitly call outward if it decides to.
think of it as an exercise in brain plasticity. : 23:43
:)
biab & 23:48
TreyHarris i'm confused. does eval_ok's eval not run in the lexical scope of the eval_ok? 23:54
?eval use Test; my $foo; eval_ok '$foo = 3'; say $foo 23:55
23:55 evalbot_12489 is now known as evalbot_12497
evalbot_12497 pugs: *** Unsafe function 'use' called under safe mode at -e line 16, column 7-108 23:55
TreyHarris oh. well, the error is Actual: eval was fatal: Undeclared variable: "$foo"