Please test pre0: pugs.blogs.com/pre0/Perl6-Pugs-6.2.12.tar.gz | paste: sial.org/pbot/perl6 | pugs.blogs.com | pugscode.org | pugs.kwiki.org
Set by audreyt on 12 June 2006.
bx420 Pope Advised Hawking Not to Study Origin of Universe 00:24
00:31 hikozaemon joined 00:41 lollan joined
QtPlatypus bx420: Why is that news? 01:00
bx420 wrong windows sry
QtPlatypus Ok
dduncan seen audreyt 01:02
jabbot dduncan: audreyt was seen 9 hours 29 minutes 11 seconds ago
01:16 weinig|zzz__ is now known as weinig 01:27 christopher joined
svnbot6 r10711 | Darren_Duncan++ | updated the README file about the 'Rosetta' Perl 6 library extension so to clarify that its otherwise-GPL license permits linking with software of other free licenses without 'infecting' the latter 01:41
01:57 lisppaste3 joined 02:32 kanru joined 03:03 justatheory joined 03:10 lambdabot joined 04:11 mako132_ joined, Southen_ joined, kanru joined 04:24 justatheory joined 04:26 _SamB_ joined 04:47 _SamB_ is now known as SamB 05:03 kanru joined 05:06 Khisanth joined 05:22 christopher joined 05:26 kattana_ joined 05:29 hikozaem_ joined 05:30 TimToady joined, jiing joined, xern joined 06:24 Perl|z joined, Perl|z left 06:58 SM_ax joined 07:07 kanru joined 07:32 Aankhen`` joined 07:58 drrho joined 08:11 lisppaste3 joined
gaal audreyt: ping 08:18
08:18 Ymmv joined
audreyt gaal: pong 08:18
gaal hey. I'm fixing emit_yaml, but it's resisting treatment :) 08:19
audreyt patch?
gaal I've refactored the prim-filtering from GodeGen
patch coming up, sec
Alias_ aha! 08:20
audreyt !aha 08:22
svnbot6 r10712 | audreyt++ | * Some more chglogging...
Alias_ audreyt: Can I borrow 30 seconds?
gaal perlcabal.org/~gaal/tmp/emit_yaml.0.patch
Alias_ ---> #alias
gaal test case: ./pugs -e 'say Pugs::Internals::emit_yaml(42)' 08:23
svnbot6 r10713 | audreyt++ | * Makefile.PL: don't bother rm Data/Yaml before a make,
r10713 | audreyt++ | now that it's part of HsSyck
gaal yay for r10713 :) about time
audreyt heh :) 08:25
svnbot6 r10714 | audreyt++ | * Perl6::FAQ::FUD - slight stylistic cleanup. 08:26
gaal so, how come filterPrim doesn't weed out $*OUT, $*IN, $*ERR in the Prim.hs case but does in GodeGen? 08:27
svnbot6 r10715 | audreyt++ | * $?SUBNAME is no more (not since tokyo hackathon); use
r10715 | audreyt++ | &?ROUTINE.name instead. Also &?SUB is now &?ROUTINE
r10715 | audreyt++ | since it works in methods too.
audreyt I... honestly don't remember 08:28
I'll check after this talk
gaal oh! any('good luck', 'enjoy the talk') 08:29
theorbtwo "Have fun!" covers it, I think. 08:30
gaal ever the polymorphic golfer, eh theorbtwo? 08:31
theorbtwo grins.
gaal goes wandering for a while & 08:32
08:34 lisppaste3 joined
audreyt takesako: I'm going to give ppencode talk today in NPW :) 08:49
L10N'ing it to English
08:50 chris2 joined 08:59 YetAnotherEric joined 09:01 YetAnotherEric left 09:09 bjoern_ joined, marmic joined 09:14 kanru joined 09:23 lambdabot joined 09:24 dduncan left 09:35 lambdabot joined 09:43 f0rth joined 09:50 f0rth joined 10:03 buetow joined 10:15 lumi joined 10:25 nine joined 10:39 szbalint joined 11:04 ludan joined
ludan hi 11:04
11:32 ruoso joined 11:52 jsiracusa joined 11:59 weinig is now known as weinig|work 12:11 bjoern_ joined 12:17 datasieve joined 12:22 cookys joined 12:53 frederico joined
sahadev hello, what's a good unicode font to see the rt.openfoundry.org pages properly? I am using Firefox 1.5.0.4 on Debian unstable. I did configure Firefox to display unicode chars (I can see devnagari and other indic characters), but i think i am missing some fonts. 12:54
(sorry for asking a non-perl6 question)
audreyt arphic fonts?
or change pref to english... 12:55
arphic-ttf
sahadev ok. thanks. i'll try those.
audreyt np :) 12:56
sahadev hmm. changing language pref to English doesn't seem to help. at least on rt.openfoundry.org/Foundry/Trove/ 12:57
lambdabot The title of that page is "Project Directory -- OpenFoundry"
sahadev i'll try installing the arphic font later.
audreyt yeah, those projects are genuinely chinese-named... 12:58
sahadev oh, i see :)
whoswho.openfoundry.org/ too, it looks like
lambdabot The title of that page is "č‡Ŗē”±č»Ÿé«”äŗŗę‰č³‡ę–™åŗ«"
sahadev even though i won't be able to read chinese characters, seeing them displayed properly (instead of boxes of hex codes) would make me feel better. 12:59
audreyt first cut at the upcoming lightning talk (ported from takesako-san's yapc-asia talk): pugs.blogs.com/talks/npw06-ppencode.pdf 13:01
going to be on air in ~1.5hr. feedback welcome :)
sahadev i'll try not to bother you again on such trivial matters :) 13:05
sorry wrong window
audreyt nah, it's fine 13:06
13:06 chris2 joined 13:20 vel joined, elmex joined 13:21 christopher joined
Juerd audreyt: I don't think punctuation has a plural 13:26
13:32 vel6608 joined 13:33 m4rkl4r joined 13:39 fglock joined
kolibrie audreyt: I got kind of lost without audio, but it looks humorous and fun 13:39
theorbtwo Puncuation is a class; "a piece of puncuation" or "several pieces of puncuation" is probably what you want. 13:40
13:41 m4rkl4r left
kolibrie but with the 't': punctuation 13:42
theorbtwo Yeah. I can do grammar. Spelling is quite another matter.
audreyt ok. 13:46
reuploading 13:47
kolibrie: yeah, this is a 5-min no-content-at-all talk :)
13:47 amnesiac joined
theorbtwo Yeah, I should probably read the talk before making random grammar points. 13:48
audreyt reuploaded
fglock audreyt: the same things that I've been implementing with p5, could be implemented in p6 (lazy lists, rules) - but is it worth it, since this things are going to exist in Parrot? 13:53
is anyone implementing lazy lists in parrot?
audreyt not afaics 13:55
eventually having them in p6 = useful
meantime, p5 runtime is more strategically important imho 13:56
13:58 lollan joined 14:08 rzoz joined
sahadev audreyt: slide 14 shows up empty in my pdf reader (xpdf). is it intentional? 14:08
audreyt it's a bug in keynote's export I think 14:09
fglock is there any cpan module that permits to override or tie perl5 slicing? (I want to make lazy slices)
audreyt ok, the talk is coming :)
bbiab
xerox Any audio/video stream? (; 14:10
14:19 hexmode joined
kolibrie any ideas about this? 14:25
Invoking Parrot to generate runtime/parrot/include/config.fpmc --cross your fingers
./miniparrot config_lib.pasm > runtime/parrot/include/config.fpmc
/bin/sh: line 1: 30125 Segmentation fault ./miniparrot config_lib.pasm >runtime/parrot/include/config.fpmc
make: *** [runtime/parrot/include/config.fpmc] Error 139
it's been months since I last compiled parrot 14:26
14:32 Aankh|Clone joined 14:34 lambdabot joined
kolibrie hmm, this is weird, too: ./miniparrot -V says this is parrot version 0.4.4-devel (r12952), but the runtime is revision 11552, as well as the Configure.pl 14:47
I did an svn update 14:48
something else I should try?
14:52 penk joined
fglock kolibrie: maybe try the cpan version. also, 'make clean' 14:53
kolibrie fglock: I did 'make realclean' before 'svn update'. 14:54
I'll try re-checking out in a different directory
fglock kolibrie: no errors here, miniparrot says 0.4.4 15:02
kolibrie hmm, same problems with my new checkout from svn.perl.org/parrot/trunk 15:03
fglock: are you using the subversion copy, or CPAN? 15:04
audreyt takesako: the talk was very well received (again). thanks you :) 15:06
15:08 iblechbot joined
fglock kolibrie: svn version, Ubuntu 6.06 15:08
audreyt takesako: in addition of the .pdf, here's .ppt for you: pugs.blogs.com/talks/npw06-ppencode.ppt 15:09
theorbtwo So how'd the talk go?
audreyt well, people seems to be happy and laughing a lot 15:10
theorbtwo Cool.
leo kolibrie: do you have some installed copy of parrot about?
kolibrie leo: looks like I have one in /usr/local/bin 15:11
leo ok - pleaese rm -rf the installed parrot and try again, it's likely the reason for the failure 15:12
kolibrie oh, it's just a symlink to my build dir
leo: should I still remove it? 15:13
leo yes
also check for installed headers please
kolibrie whereabouts? /usr/local/lib? 15:14
leo likely, yep
include
kolibrie libparrot.so.0.4.1 15:15
leo locate parrot.h
yeah - that could interfer
kolibrie ok, wiped out parrot in lib and include 15:16
do I need to make clean before making again? 15:17
leo yes please
kolibrie crossed fingers 15:18
yipee, no errors 15:21
thank you leo, fglock
leo welcome
fglock leo: is there an example for writing a pmc using parrot? 15:27
I'm considering porting lazy arrays 15:28
leo these should better be written in .c but you can implement almost all in .pir too 15:29
fglock maybe it could be a plain object instead of a pmc? I'm reading the other pmc source files 15:31
15:31 bernhard joined
fglock is there much speed difference? 15:31
leo [example] pge's Match object implements a lot of functionality 15:32
compilers/pge/PGE/Match.pir 15:33
see vtable methods e.g. __get_bool or __get_string and keyed access like __get_pmc_keyed_int 15:34
fglock will look - thanks! 15:36
leo fglock: see also lazy.tgz on feather in my home dir ~lt
fglock ok 15:37
15:37 _bernhard joined
leo # some old experiments w a Lazy thingy 15:37
fglock bbiab & 15:39
15:39 buetow joined 15:42 Eimi joined
sahadev src/Pugs/Monads.hs:275:12: parse error (possibly incorrect indentation) 15:45
Fix:
- [ genSym "&?ROUTINE" (codeRef (orig sub))
+ [ genSym "&?ROUTINE" (codeRef (orig sub)) ]
is that the right fix? i have zero haskell knowledge 15:46
xerox Possibly. The paren closes the list.
sahadev it does compile :)
also: src/Pugs/Parser.hs:635:8: 15:50
The last statement in a 'do' construct must be an expression
15:51 meppl joined 15:59 justatheory joined
xerox sahadev: how does the code look like there? 16:11
sahadev 631 rulePerlVersion = rule "perl version" $ do 16:13
632 optional (string "v" <|> string "Perl-")
633 version <- many1 (choice [ digit, char '.' ])
634 optional $ do
635 variant <- ruleAuthorPart
636 {-
637 when (map toLower variant /= "pugs") $ do
638 pos <- getPosition
639 error $ "Perl implementation " ++ tail variant ++ " required--this is only Pugs v" ++ versnum ++ ", stopped at " ++ (show pos)
640 -}
641 return version
error is on line 635
xerox indent the `return version' as `variant' is. 16:14
Hmm no.
Move the {- up two lines.
(So that it is between `version..' and `optional..'
) 16:15
TimToady according to svn diff, that chunk replaced a line which read "optional ruleAuthorPart
maybe we should just revert it for now
xerox I do not know the semantics, the fact is that `variant' isn't used this way. 16:16
TimToady svn blames audreyt, so I think we can let her deal with it later. I'll check in a fix. 16:18
audreyt moose. 16:23
sorry about that
svnbot6 r10716 | lwall++ | Hacking around some build-breakers. 16:24
TimToady hi audreyt, I'm back from indiana... 16:25
audreyt hi!
and I'm done with NPW
so I'm good to release pugs tomorrow :D
TimToady by the way, my ($a) = x() should apply list context to x().
audreyt yes. but should
($a) = x()
?
TimToady yes 16:26
audreyt so no ($a,) kluges? hm
TimToady circumfix:<( )> is not in the list of simple ops
audreyt ok. :)
TimToady or we just special-case the outer ones
audreyt otoh, I was imagining circ() to be a macro
that returns identity
but perhaps not
ok, please fix the test again 16:27
svnbot6 r10717 | audreyt++ | * Fix syntax error. Moral: _always_ test and commit
r10717 | audreyt++ | from sleep, instead of waiting until the morning to commit it
r10717 | audreyt++ | without testing.
audreyt I'll see how to make it pass
btw, I think the (1.3 % 1) == 0.3 behaviour is really worth keeping
bc and ruby both has it at 0.3
python has it at 0.30000000000004
TimToady make mod the integer version?
audreyt yes 16:28
TimToady and rem the other thing
audreyt and div the integer version if you want
yeah
TimToady shades of Ada
audreyt rem echo "Hello from .bat world"
indeed, Hs also does it that way
I've been reading at the new Ada spec
they've also adopted dot
it amazes me how much of Perl6 is from Ada :)
TimToady shh 16:29
audreyt almost as much as how Ruby is repackaged Smalltalk
:D
TimToady It all started with =>
audreyt nod 16:31
people seems to like Moose
TimToady I think your fix might have collided with my fix... 16:33
audreyt indeed...
so much for smart merging
we really need Smalltalk-caliber semantic mergers 16:34
svnbot6 r10718 | audreyt++ | * uncollide
TimToady possibly also src/Pugs/Parser.hs 16:35
audreyt done 16:38
svnbot6 r10719 | audreyt++ | * uncollide even more.
r10720 | audreyt++ | * Test.pm: Switch to &?ROUTINE.name instead of $?SUBNAME.
Juerd Ooh, nice change
I like .name
TimToady also getting: 16:39
make[1]: Entering directory `/home/larry/pugs/ext/Perl6-Grammar'
make[1]: *** No rule to make target `lib/pugs', needed by `pm_to_blib'. Stop.
svnbot6 r10721 | audreyt++ | * more s/&?SUB/&?ROUTINE/.
TimToady don't know if it's related
16:39 Limbic_Region joined
Juerd So do we write "routine foo { ... }" instead of "sub foo { ... }" now? 16:40
;)
audreyt Juerd: no, but I wonder if &?SUB and &?METHOD gives you more specific foo. 16:41
TimToady no, we write "mud"
audreyt much like &?BLOCK and &?ROUTINE can be the same thing.
TimToady I guess it'd be "mub"
Juerd audreyt: Shouldn't it all be CLOSURE? :)
or CODE
:)
audreyt it's &?BLOCK for usercode 16:42
very hard to write a &?CODE literal without a scopee
s/scopee/scope/
(btw, rm blib6/lib/Test.pm.yml after r10721) 16:43
TimToady: I can't dup the lib/pugs bug here, weird
bbiab...
svnbot6 r10722 | lwall++ | ($x) = should imply list context 16:45
audreyt TimToady: so foo(1) doesn't trigger circumfix() right? 16:47
TimToady right
but we should probably allow inner (2 + 3) * 4 parens.
my theory on my error is that I had a symlink pugs down in that directory. realclean etc. now 16:48
so outer () implies list under the theory that they would have no other reason for putting the parens there (other than cargo culting) 16:50
and given that it's a frequent idiom in P5, I think we should keep it. 16:51
will patch S3
audreyt agreed
TimToady++
TimToady okay, fixed. Just an added line in the SIMPLE list, basically. 16:56
smoking now. it was the symlink, plus the fact that I run with . at the end of PATH. 17:04
maybe things that add to PATH should do so before any .
audreyt ah. that explains
TimToady or just strip it
where are you in the world now? 17:05
audreyt Oslo
TimToady so you don't know whether you're coming or going by now, I imagine, jet-lag wize
wise, even 17:06
audreyt well tomorrow I'll fly back to taiwan 17:07
sleep in the airport hotel for 7hr
then fly to Seattl
e
TimToady there should be a unicode symbol for jetlag. 17:08
audreyt heh :) 17:10
TimToady well, off to the shower for me...
& 17:11
audreyt dinner, be back in ~2hr maybe 17:28
&
17:55 vytautas joined
Juerd Concert: Perl is becoming a lot like Dutch, with language rules being bullet pointed lists forming groups and exception groups. 18:22
s/Concert/Concern/
Dutch is a very hard language to learn because of this. I'm not very happy with the "simple"ness things, because while obviously many things are considered simple, it makes the language exactly the opposite: complex. 18:23
Is there perhaps a simpler description? A philosophy rather than a bullet point list of examples?
ingy Juerd: Perl is simply complex 18:25
TimToady: are you heading to yapc? 18:26
and audreyt: when do you land here in Seattle? I could pick you up from the airport if you'd like... 18:27
18:29 fglock joined
audreyt ingy: purr 18:32
I'm @ dinner 18:33
ingy: 19jun 7:20p 18:34
pickup would be appreciated... I wonder if MS will send people to pickup
but probably not
18:35 bpederse joined
Juerd ingy: Complex is okay, but not too much. 18:36
This feels like a little too much complexity, from which we don't gain much.
TimToady Juerd: yes, the philosophy of the "simple" stuff is that it dwims based only on the knowledge of standard Perl operators, and most of the time it doesn't matter anyway, since the simple things would produce a scalar value in list context anyway. 18:38
we're just trying to document what people would normally expect to be sure of.
if you're unsure, you should say ()= or
audreyt TimToady: the change I had to do to Net::IRC is kinda sad 18:39
TimToady $x[+...] anywa
audreyt %channels{normalize($chan)}<topic> = $topic;
TimToady *anyway
audreyt it's a slice
and 1-elem slice can't be derefed as a hash for <topic>
TimToady normalize is list sensitive?
audreyt no, it returns one thing 18:40
but it's still a one-slice
a List
consider %channels{normalize($chan)}[0]
if it's a slice it should return the first thing
if it's not a slice then it derefs it as an array
semantically very different
basd on the slice/item info alone
(not saying it should change, just pointing out a potential case of confusion)
TimToady does it carp at compile time? 18:41
audreyt no 18:42
for the .<topic> case probably yes
but for the .[0] case
@foo[func()][0]
lambdabot Unknown command, try @list
audreyt it's almost always a mistake 18:43
but sometime it's not
sometime func() returns 3 things instead of 1
and you really want the slice
that's the place where it worries me
we can (and should) get parsetime warnings going on the slice-deref-as-hash case.
but slice-deref-as-array is normal and should be allowed...
thoughts? :) 18:44
gaal hey, can we have a divMod in Perl 6? it's really useful and very often cheap in the runcore 18:45
@t divMod 18:46
lambdabot Maybe you meant: tell time todo todo-add todo-delete topic-cons topic-init topic-null topic-snoc topic-tail topic-tell type . v
gaal @type divMod
lambdabot forall a. (Integral a) => a -> a -> (a, a)
gaal returns a tuple of the division results, whole and remainder.
audreyt ruby and python has it too.
same named
18:46 lisppaste3 joined
Juerd TimToady: The difference could use some more explanation. I'm seeing a list that makes the definition, where I think it would be more useful to let that list be a list of *examples* of how a definition in English works out. 18:47
svnbot6 r10723 | audreyt++ | * Prim.hs: Use "length" instead of "last" to force evaluation
r10723 | audreyt++ | for the entire list, otherwise we get a "Prelude: List.last"
r10723 | audreyt++ | error on the case of slurping in an empty file in list context.
gaal oh, did you get a chance to look at emit_yaml? 18:48
Juerd TimToady: And the way to disambiguate (to force a certain interpretation) should be mentioned in that section too, I think
TimToady Juerd: the specs aren't intended to be tutorials.
Juerd TimToady: Granted, but the specs are intended to be understood and feel solid, I hope?
audreyt gaal: no, sadly, my talk turned out to e the lst one in the conf 18:49
and after that we went to dinner
I'm still at (the head of) dinner table
typing madly for other people's entertainment
will definitely look at it tomorrow. :/
(or when I get back to hotel tonight if it's not too late)
ingy audreyt!! 18:50
Juerd TimToady: I strongly believe in "if you can't explain it in a simple way, the design probably sucks" and "the best definition is a short definition" and "every extra word you type is another chance to screw up" 18:51
audreyt ingy: yo
Juerd TimToady: Even though I realise that those can clash heavily :) 18:52
ingy audreyt: I'll grab you. email your itinerary
audreyt ingy: it's quite convoluted
I'll fwd you my arrival-to-seattle itinerary 18:53
ingy that's what I mean
audreyt and omit the seattle->portland->seattle->chicago->boston->seattle->portland->seattle part
ingy I just want the flight number in my email
audreyt done.
they apparently forgot my salad whilst they serve everyone else 18:54
so I'm still here typing...
ingy hmm, what are you doing in Portland?
audreyt speaking to .pm
and also to Galois
one each day of Fri and Sat
and then fly back to Sea on Sun morning
ingy huh, so how long in the sea/pdx/sea stay
audreyt and then fly to Chicago immediately
see above 18:55
I got a fullflex for Sea<->Por
so it's flex
TimToady I wonder if we could scrap the dwim and steal a special slice form.
audreyt but also full.
TimToady: that'd fix it.
TimToady %hash(SLICE) or @array(SLICE)
audreyt nod.
it'd be happy. I think.
TimToady would preclude calling a func on such an object, except as .()
audreyt not entirely sure
TimToady maybe
audreyt er
it _is_ calling a func on such an object 18:56
Hash and Array would do Code role by filing in slice as default impl.
ingy audreyt: I have a big house to myself these days
audreyt ooh.
ingy so max the flex
audreyt food here, bbiab
:)
TimToady happy herring
gaal audreyt: no problem :) I just think we need to fix it before the release 19:04
Galois is the company that has all those .hs programmers, right?
19:05 cdpruden joined 19:09 Aankh|Clone is now known as Aankhen`` 19:11 Kattana joined
gaal lols at "pair management" 19:11
audreyt gaal: we will 19:12
yes
gaal are those two characters really pronounced "otori tan"? that's hightly compressed! 19:13
audreyt yeah :) 19:15
and those two chars are in fact my chinese name.
TimToady 囮 恊ćØ悊 otori lure; decoy
?
audreyt and -tan means... cute little girl
(in japanese)
gaal otori is phoenix, isn't it?
TimToady oh, using non-Hepburn notation
audreyt so it's pretty good trilingual coincidential interlocking translation
yes.
gaal i'm just surprised that a glyph can have so many syllables 19:16
TimToady Japanese maps kanji to both chinese monosyllables (usually) as well as native polysyllables. 19:17
gaal in the spoken rendition. in Mandarin, is it sometimes the case that a character is two?
TimToady well, now I'm being hauled off to lunch... &
Juerd Hmm... Perl certification spam 19:18
audreyt gaal: no, never 19:20
it's always monosyllabic
which allegedly makes it a more ideal programming language according to Guy Steelr
lamb is here, bbiab again 19:21
&
xerox gaal: yes, Galois is Haskell powered :) 19:24
gaal <audrey xerox> >>: cool 19:25
xerox falls from the chair
xerox can't wait to see what's in the Google gift pack, yay....
xerox boings randomly 19:26
gaal so, what should p6 divmod return in scalar context? 19:43
assuming it exists :) 19:44
19:50 weinig|work is now known as weinig 19:54 Zemyla joined
Zemyla Holy crap, Dr. Michaud is here! 19:54
audreyt greetings, Zemyla. 20:05
gaal: in scalar context it returns a List object ;) 20:06
I think.
svnbot6 r10724 | audreyt++ | * ditto the s/last/length/ fix in Prim.hs for readline(). 20:11
kolibrie I just built pugs r10722, which worked fine, but make install says Could not find module 'Data.ByteString' 20:18
and make exits with Error 2 20:19
audreyt mmm weird. 20:23
did you makeinstall as root?
kolibrie yes
audreyt did it rerun Makefile.PL as root?
(trying to duplicate here now)
kolibrie not sure if in reran Makefile.PL 20:24
audreyt it worksforme
try chown everything to yourself again recursively
and reinstall as root? 20:25
(or give me a shell tomorrow)
kolibrie tries
still same error 20:26
audreyt which GHC version? 20:27
kolibrie 6.4.1 20:28
audreyt try hack Makefile by hand
look for
$(PERLRUN) util/ghc_setup.pl copy --copy-prefix=$(DESTDIR)
and change it to
copy --user
i.e.
$(PERLRUN) util/ghc_setup.pl copy --user --copy-prefix=$(DESTDIR)
and see if it helps
I'm not sure what's going on... 20:29
what's your cabal version as listed by ghc-pkg list ?
kolibrie ghc-pkg describe cabal: cannot find package cabal 20:30
audreyt Cabal
not cabal 20:31
kolibrie version 1.0
audreyt mm.
do you have easy access to 6.4.2? if not don't worry I'll still fix it.
also try the --user 20:32
kolibrie using debian unstable
don't see 6.4.2 there yet 20:33
will try the --user fix in Makefile
oh, and every time I run make install, I have to reset my terminal because no characters show up when I type (this is not something new) 20:35
audreyt wow. 20:36
hm.
if the fix doesn't work for you, maybe try upgrading your Cabal?
( www.haskell.org/cabal/release/cabal...1.4.tar.gz ) 20:37
kolibrie the --user thing didn't change anything
audreyt k. 20:38
20:39 prozessor13 joined
gaal should I make divmod infix or divmod($a,$b)? 20:43
TimToady func is fine
gaal ok. I'm actually making it equivalent to quotRem, which is the non-Integral version. 20:44
but we can still call it divmod, right? :)
TimToady hmm, we were just about to make div and mod the integer versions of % 20:45
and % rather
so I think divmod should integerize and we should have quotrem separately
gaal okay, no prob
pasteling "kolibrie" at 66.239.158.2 pasted "make install log, in case audreyt is interested" (141 lines, 9.6K) at sial.org/pbot/17784 20:46
gaal actually I'm wrong, quot in Haskell is a modulus truncated towards zero. 20:47
audreyt sorry, it's getting to 11pm here, my brain is shutting down (as on .tw timezone it's 5am)
but 1)it's still bright outside and 2)we're _still_ having dinner.
kolibrie audreyt: no hurry
TimToady still thinking about slices...
and whether we still allow [1,2,3] as synonym for (1,2,3) 20:48
audreyt not synonyms...
TimToady effectively
audreyt only synonyms at rhs scalar cxt
and in tokyo we cancelled that
$a := [1,2,3]; $a.push(4); # fine
TimToady I meant as lvalue
audreyt $a := (1,2,3); $a.push(4); # err
ah.
TimToady no, I'm talking about .() and .[] not bare forms 20:49
audreyt oh ok.
well, [] always scalar and () always list worksforme.
alternatives being [()] and [,]
I think the cleanest treatment of @a[1,2,3] is just to err out and tell user to write as @a(1,2,3) 20:50
maybe.
TimToady I'm just thinking if an object has both Array interface and Code, then we don't have .() available
and so there has to be a .[1,2,3] form
audreyt well we can also say that it is parsed as a list always
but actually does not do slice if the inner thing returns 1 thing. 20:51
that is
$a[f()][0]
if f returns a scalar then it's a [0] on the scalar
if f returns a list then it's a [0] on that slice.
and listcxt is only parselevel
and if f want to return a 1slice they have to return (1,)
or write
return (1)
which would be a 1slice. 20:52
but
return(1) and return 1
are both 1scalar
I think it's rather more intuitive and does not take the .() form out of reach
since .() currently suggests Code much more than it suggests list
that is, we go back to your decouple idea 20:53
the SIMPLE is always just parselevel
and the actual interpretation of lhs depends on the runtime evaluated expr
which for SIMPLE we know it's gonna be scalar
but for non-simple it may still be a scalar at runtime
TimToady and .[$x,] or .[($x)] is the escape valve to force list. 20:54
even if one element, if it matters. 20:55
audreyt aye.
TimToady does it have a run-time performance hit, I wonder...
for SIMPLE, I guess not.
audreyt not for SIMPLE
and for non-simple, well, yes, but it's worthit. 20:56
TimToady *n*o*d*
gaal @hoogle (a,a) -> (a -> b) -> (b,b)
lambdabot Data.Graph.Inductive.Query.Monad.(><) :: (a -> b) -> (c -> d) -> (a, c) -> (b, d)
gaal err, no
audreyt @djinn (a,a) -> (a->b) -> (b,b)
lambdabot f (_, a) b = (b a, b a)
audreyt heh, not helpful
@djinn (a -> b) -> [a] -> [b]
lambdabot -- f cannot be realized. 20:57
gaal @djinn (a,a) -> [a]
lambdabot -- f cannot be realized.
gaal @hoogle (a,a) -> [a]
lambdabot No matches, try a more general search
gaal @hoogle (a,a) -> [b] 20:58
lambdabot No matches, try a more general search
xerox It doesn't know about lists.
(Djinn, that is.)
gaal @hoogle Confused a, Unconfused b => a -> b
lambdabot Control.Monad.Error.throwError :: MonadError e m => e -> m a
Control.Monad.State.put :: MonadState s m => s -> m ()
Control.Monad.Writer.tell :: MonadWriter w m => w -> m ()
gaal wow 20:59
xerox Hoogle is a bit b0rked :)
gaal I just proved it's unsafe to understand haskell?
xerox No way.
gaal a -> b doesn't sound very sound to me :) 21:00
audreyt well, throwError is exactly what that does :)
gaal unless you stipulate that you can otherwise proove that confusion encapsulates intrinsically the source of unconfusion.
s/oo/o/ 21:01
xerox Your function is:
audreyt TimToady: please put in speclang, if possible, once you've given it some thought, so I can pickit up tomorrow and do a release :)
xerox join (***) :: (a,a) -> (a -> b) -> (b,b)
TimToady k
gaal whee, now I'm seeing stars 21:02
xerox (-:
21:02 fglock left
gaal @type join 21:02
lambdabot forall a (m :: * -> *). (Monad m) => m (m a) -> m a
gaal @type (***)
lambdabot forall (a :: * -> * -> *) c' c b' b. (Arrow a) => a b c -> a b' c' -> a (b, b') (c, c')
xerox grins evilly
gaal * -> * eh. I'd say, "how unkind", except kind is exactly what that is 21:03
xerox Hint: it uses the same type constructor in the m and a tyvar instances :)
(Our code, that is.
)
gaal I think I'll go with the ungolfy pattern match and longhand for now... :) 21:04
xerox > join (*) 2
lambdabot 4
xerox > ((+1) *** (*2)) 2 21:05
lambdabot add an instance declaration for (Num (b, b'))
xerox > ((+1) *** (*2)) (1,2)
lambdabot (2,4)
xerox Sorry.
gaal > ((+1) *** (*2)) (7, 13)
lambdabot (8,26) 21:06
xerox instance Monad ((->) e) where join f x = f x x ...
instance Arrow (->) where 21:07
(f *** g) (x,y) = (f x,g y)
(f &&& g) x = (f x,g x)
first f (x,y) = (f x,y)
second f (x,y) = (x,f y)
(>>>) = flip (.)
There you go.
gaal the problem with this is that it is not utterly incomprehensible 21:08
xerox Is it?
They are just combinators.
gaal yeah, so I'm going to try to understand them and thus lose sleep. hence, problem 21:09
audreyt dinner finally going to over 21:11
bbl :) &
21:12 larsen joined
xerox gaal - Sorry, I don't understand. The definitions aren't clear? (***) is an infix combinator which takes two functions, f, and g, and takes a pair. It applies the first function to the first element of the pair, and the second function to the second element. 21:13
gaal in "instance Monad ((->) e)", what's e?
xerox join takes a function and an argument, and applies the same argument two times to the function.
One uses e instead of a because the monad is also known as the Reader Monad. And the Reader Monad is used for Enviroments, mostly.
gaal and why does *** need to be an instance for (->)? I don't grok ->-as-a-type yet. 21:14
xerox > runReader (do {env <- get; return (env+2)}) 1
lambdabot add an instance declaration for (MonadState s (Reader r))
In a 'do' exp...
xerox Gasp.
> runReader (do {env <- ask; return (env+2)}) 1
lambdabot 3
xerox Sorry.
gaal you and audreyt explained that to me a few days ago, but I didn't get it yet
xerox Oh.
(->) is the type constructor of functions. 21:15
gaal please keep going :)
xerox It has this strange kind:
?kind (->)
lambdabot ?? -> ? -> *
xerox Nevermind the interrobangs..
It takes a type, another type, and returns a type.
gaal remind me what ?? and ? mean in kinds?
ah
xerox (??, ?, are GHC-specific notation for boxed/unboxed types or something.) 21:16
Anyway.
If you feed a type, say Int, and another type, say Char, to the type constructor (->) it will return you |Int -> Char|, a type.
gaal all right. how's ((->) e) equivalent to the Reader monad again? 21:17
xerox Okay!
gaal yup
xerox It comes directly from the definition of that monad, that is:
data Reader e a = Reader { runReader :: e -> a }
Are you familiar with this syntax?
gaal ah!
yes.
xerox class (Monad m) => MonadReader m e where 21:18
ask :: m e
local :: (e -> e) -> m e
gaal yes, I know this part 21:19
xerox Some interesting types under the Reader are those of (>>=), ap, join, fmap/liftM, liftM2, liftM*, ... 21:20
gaal so what's the relationship between reader and that arrow business? or in the arrow interpretation is this no longer a reader?
xerox The (->) Arrow is not a Reader Monad, nope.
Every Monad is an Arrow, not every Arrow is a Monad. (->) is an Arrow.
(Arrows are required to hold quite more laws, for one.) 21:21
gaal okay
xerox The definition is what I showed you. 21:22
In fact it is a rendundant definition, because some of the combinators can be derived from a little subset.
They are quite handy!
gaal in (->) 2-tuples play a big part. in other arrows is this still the case? 21:23
xerox That's one big point. The answer is yes, quite. 21:24
I would suggest to write your own ArrowState sometime (-:
gaal are there conventional roles for the two elements in an arrowish tuple?
xerox Yup. 21:25
gaal are you going to spill the beans? :)
xerox Let me think...
21:27 larsen joined
xerox They were born from Swierstra and Duponcheel's Parsing ideas. 21:27
gaal I feel safe already
xerox The problem with Monadic parsing is that backtracking is costly. 21:28
gaal nods
xerox So they built a framework where the choose combinator can choose between its arguments (parsers) immediately. 21:29
So no need to save the input in case other alternatives from the first one has to be tried.
(If I remember correctly.)
So passing through Category Theory, they defined Arrows (-: 21:30
(Their parser couldn't implement bind.)
gaal bind in this context =? (I know Parsec, oh wait, do you mean the very basic glue of parsec?) 21:31
xerox That is, rather than using |a -> Parser s b| Hughes defined a b c, which is an arrow from b to c.
That is, the data DynamicParser .. = .. didn't allow a (>>=) definition, so not being a Monad. 21:32
gaal yeah, ok 21:33
xerox The very precise reason for that is that the second argument is a function, and the only thing one can do with a function is apply it. But there are cases where you lack of a suitable `a' to apply it to.
So, Arrows. An Arrow is a type constructor with two parameter, along with the supporting operations analogous to return and bind for Monads. 21:35
a b c is `a computation with input b delivering a c'
gaal okay, and the two parameters are typically?
xerox GHC 6.5 and > has a nicer syntax for them:
(Arrow (~>)) => (a ~> b) -- Provided you have a good ~ in your font ;) 21:36
gaal input and output of what audrey I think named "flows"?
is ~> meant to be a visual pun on -> ?
xerox Yes :)
You want to rush to Arrows or want to see how Monads are potential Arrows? :) 21:37
gaal so (~>) is a type constructor?
xerox Yes.
gaal whichever
xerox Let's define:
class Arrow a where
arr :: (b -> c) -> a b c 21:38
(>>>) :: a b c -> a c d -> a b d
For any Monad m, functions of type |a -> m b| are potential arrows.
newtype Kleisli m a b = K (a -> m b)
gaal "apply" and "associate"?
xerox So to implement arrow operations as follows: 21:39
gaal (my nicknames according to what they look to me)
xerox instance (Monad m) => Arrow (Kleisli m) where
arr f = K (\b -> return (f b))
(K f) >>> (K g) = K (\b -> f b >>= g)
gaal I'm sorry, who's this Kleisli fellow and what is he doing with our bow? 21:40
xerox This gives for each Monad type the corresponding Arrow.
Ah, note that there _are_ non-monadic implementations of the Arrow signature.
gaal, it is just a name for those functions, which for each Monad m give us a potential Arrow. 21:41
gaal hmmm okay
xerox It shows how Monads go to Arrows.
However arr and (>>>) are not sufficient to write useful Arrow code. 21:42
So we extend the class to contain first :: a b c -> a (b,d) (c,d)
gaal where'd d come from here? 21:43
xerox It converts an arrow from b to c into an arrow on pairs, that applies its argument to the first component and leaves the second component untouched.
You see?
(b ~> c) -> ((b,d) ~> (c,d)) 21:44
Pairwisely we define second :: a b c -> a (d,b) (d,c) such that:
second f = arr swap >>> first f >>> arr swap
(You see now how some of the combinators come from the previous one.) 21:45
gaal hold on, I don't understand the type for first. how can it not diverge?
xerox Are you still with me?
gaal think curry-howard for a minute; how is d infered?
lumi It's the same d on both sides
gaal hey lumi
xerox The resulting arrow from `first' does do `id' on the `d' value. 21:46
So it could be forall d. d.
lumi Think of first :: (b -> c) -> ((b,d) -> (c,d))
Hi
xerox (It is better to use ~> for Arrows, even though (->) is an Arrow.)
gaal ah, (b,d) -> (c,d), that makes more sense
lumi Proofwisely, I know how to derive c given a b, and I know how to derive d given a d
gaal yes yes. the first definition was a (b,d) (c,d) 21:47
xerox Yup.
We also defin a combinator which processes both components of a pair:
*define
f *** g = first f >>> second g
And a combinator which builds a pair from the result of two arrows:
f &&& g = arr (\b -> (b,b)) >>> (f *** g) 21:48
A funny note is that like we abstracted the idea of applying a binary operator to the result of two monadic combinators with liftM2, we can do that for Arrows too. 21:49
gaal that's &&&, isn't it?
xerox liftA2 :: (Arrow (~>)) => (a -> b -> c) -> (b ~> c) -> (d ~> b) -> (d ~> c) 21:50
liftA2 op f g = (f &&& g) >>> arr (\(b,c) -> b `op` c) 21:51
Puff. Pant.
gaal hmmmmmm
ok 21:53
xerox (Hughes then gives explanations of how to use Arrows to build Interpreters, LC for instance.)
(Then how to define Swierstra and Duponcheel's Parsers as Arrows.) 21:54
Stream Processor, Functors (Maybe, State, CPS). 21:55
Which are probably what you were aiming for, talking about `what the type var usually look like'... :)
gaal well you know what they say, a little abstraction is a dangerous thing 21:56
xerox But I can satisfy your hunger with some code before going to sleep. 21:57
gaal yes, please do! :)
xerox haskell.galois.com/~paolo/haskell/ArrowState.hs 21:58
Have fun. Talk to you tomorrow =)
gaal hope so 21:59
thanks for the walkthrough!
xerox Quite fun. Oyasuminasai!
gaal night! 22:00
there's a hole in my understanding of basic haskell syntax. when not a function application, what does "a b" mean? I always assumed it was sugar for monads but apparently it isn't? 22:05
audreyt uh?
as type, or as term?
gaal xerox was earlier giving 22:06
first :: a b c -> a (b,d) (c,d)
the soundness of which I had problems understanding 22:07
integral that's application of a type constructor
gaal then this was given:
first :: (b -> c) -> ((b,d) -> (c,d))
which is more obviously sound to me. are they equivalent?
integral a = (->); first :: (->) b c -> (->) (b,d) (c,d)
gaal ah, because that was "first" in the -> arrow? 22:08
integral right :)
gaal so "x y" really is application of y to x
er
of x to y :)
integral or x to y
lumi It's an application of the type constructor 22:09
gaal but okay. what does it mean more generally?
TimToady audreyt: checked in an S3 revision. Have a glance if you're still awake.
lumi Er doh, integral said that already :P
integral runs off to sleep
lumi More generally how?
gaal e.g. (Monad m) => m a 22:10
first, what could have come in place of Monad there? 22:11
syntactically that is
lumi Class constraints?
gaal and what is "m a"? the application of m to a just like above?
Juerd TimToady: I apologize for my bad choice of words earlier today; I still feel the same way, but I should have waited before expressing my opinion. 22:12
TimToady np
gaal so Maybe Int (to pick a simple case) is the application of Maybe on Int?
lumi Yeah, m is of kind (* -> *), right? You can't use it in a concrete type until you fully apply it
Yeah
gaal ?kind Monad 22:13
lambdabot Class `Monad' used as a type
gaal ?kind Monad m
lambdabot Not in scope: type variable `m'
lumi ?kind Reader
gaal how did you infer m has that kind?
lambdabot * -> * -> *
gaal ?kind Maybe 22:14
lambdabot * -> *
gaal ?kind Maybe a
lambdabot Not in scope: type variable `a'
gaal ?kind Maybe Int
lambdabot *
gaal okay.
lumi Class Monad asserted it for me, I think
audreyt TimToady: you had
(SIMPLE) is simple in part of slic
so
@a[(1)] = f()
lambdabot Unknown command, try @list
audreyt is parsed as scalar= ?
xerox decided for a icecream before sleep 22:15
TimToady yes, that's still scalar, I think.
we can still have (@a[1]) = f()
xerox gaal, lumi is right. It looks like |class forall (m :: * -> *). Monad m where return :: a -> m a; (>>=) :: m a -> (a -> m b) -> m b|.
TimToady I thought the "useless use of parens" criterion was a bit too vague. 22:16
the alternative would be to special-case the inside of .[]
didn't really like either of those approaches...
xerox gaal - I highly reccommend a tour of the Prelude and the sensible modules of the library hierarchy.
TimToady and we do still have @a[1,] = f() as well. 22:17
xerox @fptools Prelude
lambdabot darcs.haskell.org/packages/base/Prelude.hs
gaal done that actually (twice), but not the past couple of months. will do again with kinds in mind.
audreyt TimToady: yup
gaal okay anyway. I should sleep. have fun everybody 22:18
lumi Have fun
xerox Goodnight again :) <licks last pieces> 22:19
TimToady otsukaresamadeshita.
audreyt it's well past midnight now... I'm feeling incoherent, overlapping and undecidable :) 22:20
so, g'nite
TimToady: the spec is I think good enough for the release. thanks!
TimToady dreat sweams
*dreet, I mean
TimToady realizes that what audreyt means is "keep your cotton-pickin' hands of the spec now"... :) 22:21
audreyt well, yeah, not another assign.t-style reverse-decision :) 22:22
(though that was for the better, definitely)
TimToady I wonder if the tests need tweaking? 22:23
audreyt prolly yes
TimToady I'll have a peep.
audreyt yay
TimToady++ TimToady++ TimToady++
TimToady she says feebly
audreyt *wave* &
23:03 chris2 joined 23:11 sahadev2 joined, macroron joined 23:49 bpederse left, cmarcelo joined
svnbot6 r10725 | lwall++ | Revised tests for list assignment syntax with scalar assignment semantics. 23:51
23:52 kanru joined 23:53 justatheory joined