pugscode.org <<Overview Journal Logs>> | You have safely opened the door to many Perl 6 hackers. | pugs.kwiki.org | smoke: xrl.us/fmw2 | Mac OS X (195/3716) | Win2k r1534 (210/3779) Set by kbrooks on 4 April 2005. |
|||
putter | is there a favored nopaste for #perl6 haskell code? i've a three line untodo which I'd like stylistic feedback on... | 00:07 | |
stevan | perlbot nopaste | 00:08 | |
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
pasteling | "putter" at 66.30.119.55 pasted "new code for Prim.hs" (4 lines, 180B) at sial.org/pbot/8942 | 00:10 | |
stevan | pugscode.org <<Overview Journal Logs>> | You have safely opened the door to many Perl 6 hackers. | pugs.kwiki.org | smoke: xrl.us/fmw2 | Mac OS X r1537 (212/3783) | Win2k r1534 (210/3779) | 00:10 | |
putter | Caveats: it handles ["a"].join("x") but not ("a").join("x"), so its not a complete join.t untodo. my attempts at () were excessively slurpy. | 00:11 | |
feedback of any flavor welcome. | 00:13 | ||
any flavor at all... | 00:16 | ||
Schwern | Pork ripple | 00:18 | |
Holy crap, that's all the code? | 00:19 | ||
<--- non Haskell programmer | |||
putter | is there any interest in having tests consolidated. eg, there are eq tests in operators/cond.t and in operators/eq.t. with the former also doing halfhearted string<->number conversion. any thoughts? | 01:07 | |
er, thats test _files_ consolidated. | 01:08 | ||
Khisanth | S10 is rather brief! O_o | 01:19 | |
metaperl | wow Juerd actually agreed with me for once! | 01:25 | |
Khisanth | must be a ruse | 01:31 | |
stevan | metaperl: is it a Full Moon tonight in Holland? | 01:32 | |
metaperl crosses himself with garlic | |||
it must be a full moon for Juerd to agree with me | 01:33 | ||
stevan loads his gun with silver bullets | |||
putter | would it be plausible to drop the implementation of additional operators in Prim.hs? they probably need a better home, but I dont immediately see one... | 02:06 | |
err, additional _filetest_ operators. | |||
shapr | will vCast work for every type? | 02:09 | |
Is the precision of log part of the specification? | |||
I have this from log.t, should I just change the expected and check it in? # Expected: 1.6094379124341 \n # Got: 1.6094379124341003 | 02:11 | ||
I search, for a clue. | 02:13 | ||
putter thinks things are quiet... tooo quiet... | |||
shapr | putter: is your nickname from perl golf? | ||
putter | ah, that's the question. just _which_ pun is being made. ;) | 02:17 | |
shapr | All of them? | 02:18 | |
putter | not telling. | ||
shapr | I like mystery. | ||
Anyway, do you know if the precision of log is specified? | |||
putter | hmm, exploring... | 02:19 | |
shapr | It's getting light outside, I should go to sleep. | 02:24 | |
btw, what's the more polite approach? should I knock over more builtins or leave them for camelfolk who are learning Haskell? | 02:25 | ||
putter | ah, I'm losing. why not commit. possible outcomes are need to back out, or that it demonstrates need to truncate as comment in file hypothesizes. | 02:28 | |
shapr | works for me. | 02:29 | |
putter | re knocking off builtins... given the range of tasks available, perhaps addressing things that novices can't will have a higher collective payoff. | 02:30 | |
shapr | Yeah, true. | 02:31 | |
putter | oh, and perhaps leave a comment in log.t about the change, just in case thought did go into the precision. | 02:34 | |
shapr | How do you create complex numbers in perl? | 02:36 | |
Alias_ | I'm sure there's a module | 02:37 | |
putter | Math::Complex? in p6, checking... | ||
Alias_ | Math::Complex perhaps? | ||
shapr | I just want to know for the unit test. log should work on complex numbers just the same, I think. | ||
putter | s09: my complex $n; | 02:40 | |
oh, but that doesnt help you with a constructor... checking... | 02:41 | ||
shapr | I'll just check in what I have and go to sleep. | 02:45 | |
putter | i dont see it in the assorted docs. Math::Complex does 4 - 3*i. perhaps do that, and add a question to... wherever we are accumulating questions for p6l. | ||
sleep is good. | |||
shapr | I think someone new to Haskell should be able to implement exp.t and sign.t without too much trouble. | 02:47 | |
shapr falls over asleep | 02:48 | ||
putter | sounds good. i think i'll leave some of the filetest operators, after correcting the return type of the current ones. | ||
good night shapr | 02:49 | ||
does anyone know what the pugs "bootstrap philosophy" is? just enough coverage of p6 to bootstrap a rules engine? full coverage? something in between? if full, how is "i'm an object pretending to be a string" handled? (probably not the right time of day to ask...) | 03:21 | ||
Alias_ | Isn't the Rules engine Haskell? | 03:24 | |
1) Load Haskell 2) Parse Perl | |||
:) | |||
putter | my understanding is p6 will eventually be parsed by p6 rules. | 03:28 | |
putter putters off for the night. | |||
Alias_ | sure. But not pugs | ||
AFAIK | |||
putter | Alias_: tnx | ||
Alias_ | Pugs is P6 in Haskell... P6 is P6 in P6 | 03:29 | |
There will be a limited bootstrapping parser of some sort though | |||
autrijus | pugs will eventually be translated from haskell to p6. | 03:31 | |
that's our strategy. see roadmap | |||
Alias_ | So Haskell will be the bootstrapping parser, with P6 as the real parser? | ||
autrijus | yes. | 03:32 | |
putter: the philosophy is that we do full coverage until the day that p6 macros is supported. | 03:33 | ||
because without them there's little chance to translate pugs to p6 | |||
putter | the "bootstrap philosophy" question came to mind as i went to fix a filetest operator, and it struck me that strings are being used in situations where an object-vs-its-stringification distinction may need to be drawn. so i was wondering how much dynamic pain pugs is signing up for... | 03:35 | |
autrijus | oh. those will be rewritten using our OO core. | ||
the OO core needs to be attached soon. | |||
once we fix the remaining significant bugs and deem the next release (I think) 6.2.0. | 03:36 | ||
again, please see the roadmap. | |||
sdtr443w | I've been seeing a lot of examples have something like *@xs in a subroutine prototype. Is that a reference to an array? | 03:37 | |
putter for the record, quoteth "6.2: Basic IO and control flow elements; mutable variables; assignment." | 03:39 | ||
autrijus | right. that means we /completed/ them. | ||
then we start hacking in OO | |||
once OO support is considered complete, we call that 6.28.0. | |||
sdtr443w: search.cpan.org/dist/Perl6-Bible/li...urpy_array | 03:40 | ||
Alias_ | This versioning thing is gunna bite you in the ass everntually :) | ||
sdtr443w | I guess referencing and dereferencing has changed | ||
autrijus | Alias_: nope. there is a finite number of milestones :) | ||
Alias_: after the last one, we'll be called "Perl 6.0.0." | |||
sdtr443w | Oh wait I guess I picked up somebody else's dialog first and got confused | 03:41 | |
Alias_ | autrijus: For all you know pugs could end up becoming the Haskell -> Parrot doohicky permanently | ||
sdtr443w | I see it in a scalar context too: *$x | ||
autrijus | Alias_: I will not let that happen :) | 03:42 | |
of course if I get hit by a bus, oh well. | |||
sdtr443w | I have a short bus. Where you at? | ||
autrijus | ;) | ||
ninereasons | autrijus, I wrote a test that assumes that 'my (@a) = 1 .. 3' is the same as in perl5. was I correct? | 03:43 | |
autrijus | sdtr443w: search.cpan.org/dist/Perl6-Bible/li...parameters | 03:44 | |
03:44
knome is now known as rblackwe
|
|||
autrijus | ninereasons: correct. | 03:44 | |
lunch. bbiab! & :) | |||
sdtr443w | autrijus: I scrolled to the top of the first link you sent me and I'm just reading it sequentially | ||
putter still puzzled, but too tired to think. | 03:45 | ||
ingy | autrijus: ping | 03:46 | |
sdtr443w | Hrm I see things in the grammar about explicitly declaring the return value of a sub, but is there a way to explicitly declare the parameters? | 03:52 | |
Oh finally... somewhere past a third down it gets into it | 03:54 | ||
Is there a problem with this subroutine declaration in pugs: sub void_run_strarray(str @test_array is r) { } | 04:00 | ||
I put a print in there and get nothing; it's giving me the silent treatment | |||
ninereasons | I don't think that "is" works yet, sdtr443w | 04:01 | |
and I think that 'str' will work if written as 'Str'; | 04:02 | ||
sdtr443w | Yeah it works with caps | 04:37 | |
I mean, capitalized 'S' | |||
That's odd -- doesn't that mean I'm casting it as an object? I thought those don't work yet | 04:38 | ||
gaal | morning all | 06:37 | |
06:39
castaway_ is now known as castaway
|
|||
gaal | are builtins meant to really be built in? after all in S29 they have Perl signatures | 06:42 | |
so theoretically they can be implemented in a core library? | |||
is the ordering in the list at the bottom of Prim.hs important? | 06:48 | ||
Juerd | gaal: Perl 6 will eventually be written in Perl 6 | 06:58 | |
gaal: Fortunately, Perl 6 is fast and thus so will Perl 6 | 06:59 | ||
gaal | yay! i added sign! :) | 07:08 | |
ingy | hola | 08:46 | |
gaal | aloh | ||
ingy | hi gaal | 08:47 | |
gaal | hello. do you know where we stand in terms of embedding c? | ||
inlining from perl, that is. | 08:48 | ||
ingy | well we can almost inline haskell | ||
but there are outstanding dynaloaderish issues | |||
I assume that once we resolve those issues, inlining C will be rather trivial | 08:49 | ||
gaal | neat! | ||
in Prim's initSyms, what does ~ mean as a prefix to a type? eg.. \\n Scalar left && (Bool, ~Bool)\ | 08:51 | ||
eval lazily? | |||
Khisanth | coerce into a bool? | 08:53 | |
gaal | so why doesn't the first arg have it too? | ||
it looks like it's there only in the short-circuits | 08:54 | ||
any lambdafolk around? | 09:23 | ||
theorbtwo | Looking at Prim.hs line 859, gaal? | 09:25 | |
gaal | more or less :) i'm doing exp now, which has an optional arg | ||
theorbtwo | I think you're right -- it looks to me like it's building a thunk, but I'm certianly not a lambdaite. | ||
Just list it as defaulting to... whatever? | 09:26 | ||
(Presumably e.) | |||
gaal | those aren't very common - so i was peeking at the implementation of rindex, which is simple enough | ||
theorbtwo | (Num, ?Num=2.7...) | ||
gaal | but i don't understand the syntax of 'let' there, which doesn't have an 'in' clause | ||
no, i don't want to hardcode e | |||
theorbtwo | Or, IIRC, just ?Num, and check if it's undef. | ||
gaal | i want to use the best haskell function -- | 09:27 | |
either exp or ** (or maybe even ^ and ^^) | |||
the p5 code i am thinking of is something like return defined $base ? $base ** $exponent : builtin_exp($exponent); | 09:29 | ||
because haskell provides me with a presumably efficient and exact exp builtin. | |||
so back to rindex: | |||
about line 630 - it has this code to do a let based on the results of a vCast | 09:30 | ||
which looks like what i want, but mimicing the syntax doesn't work | |||
ah, i think i see what my problem was, i forgot the -> do | 09:33 | ||
autrijus | greetings | 09:41 | |
gaal | heya! | ||
autrijus | the "in" is omitted in monads | ||
theorbtwo | Allo, autrijus. | ||
gaal | i changed it to an if, makes more sense anyway :) | ||
but now i get errors saying Couldn't match `Eval Val' against `Exp'. is there an explanation about pugs types somewhere i can stare at? | 09:42 | ||
autrijus | yeah | 09:43 | |
pasteling | "gaal" at 192.115.25.249 pasted "my naive attempt" (14 lines, 401B) at sial.org/pbot/8951 | 09:44 | |
gaal | doesn't work when i vCast, either. | 09:45 | |
autrijus | a sec | 09:46 | |
theorbtwo | I think you just need a "do" after that =, but could well be wrong. | 09:47 | |
gaal | no, it's a,er, the find of function that doesn't do .. return | 09:48 | |
theorbtwo | pure function. | ||
But it's getting called impurely. | |||
gaal is in the "programming in the dark" state | |||
rgs | beware of the dark side | 09:49 | |
gaal | or, more like, programming in the twilight state. | ||
jabbot | pugs - 1544 - build fix for Eclipse | 09:52 | |
pugs - 1543 - sign builtin | |||
pugs - 1542 - implemented log and log10. | |||
pugs - 1541 - more hangman.p6 work; improved gameplay/ | |||
pugs - 1540 - some tests for return statement | |||
pugs - 1539 - array .join added | |||
pugs - 1538 - my(@a)=1..3 with parens should return th | |||
theorbtwo | Hm, I think I know what's going on, but not how to explain it. | ||
jabbot | pugs - 1537 - Correct the test count | ||
pugs - 1536 - Add tests for list assignment bug, not d | |||
pugs - 1535 - add code to demonstrate arg list flatten | |||
gaal | theorb2, i think my problem is one of types, not purity. | 09:53 | |
theorbtwo | Except that Eval is a monad. | 09:54 | |
It's also a type, of course. | |||
nothingmuch | ginger.ucdavis.edu/paloverde/paloverde.html | 09:59 | |
autrijus | back | 10:03 | |
<- just installed Mac Mini | |||
using usb keypad no less | |||
nothingmuch | yay! | 10:04 | |
start a smoke server | |||
i'll check in my "alternative" script | |||
autrijus | that sounds like an idea | ||
please do | |||
gaal | haha. reminds me of the time i had to use a keyboard where the middle row didn't work | ||
it was in DOS | |||
nothingmuch | no wait, i have an OSX one | ||
gaal | so ALT-numkeypad gave out chars by their ascii values | ||
nothingmuch | damnit, i need to get that real smoke server stuff done | ||
gaal | and thankfully, although many numbers were inaccessible -- anything with 4,5, or 6 in it -- | 10:05 | |
ALT accepted modulos! | |||
castaway wonders if pasta is working again | |||
gaal | so if i needed eg 65, i could try 65+256 | ||
nothingmuch | castaway: err, yes | 10:06 | |
what port do you want SEE on? | |||
gaal | which is 321 | ||
nothingmuch | gaal++ # great heroism | ||
gaal | and that was how i typed "A" :) | ||
theorbtwo | Wow, gaal... I wouldn't have thought of that. | 10:07 | |
castaway | pick one :) | ||
gaal | you get to think of all sorts of things when you're desperate :) | ||
theorbtwo | I would have thought of replacing the keyboard first... | 10:08 | |
castaway | but then we have about 3 extra keyboards lying around | ||
theorbtwo | More, I think. | ||
theorbtwo loves his IBM type M. | |||
jabbot | pugs - 1545 - * `\_ ->` is now spelled `const` | 10:12 | |
castaway does actual work, having spend all morning see hacking (ahem ,) | |||
nothingmuch | castaway: one minute, i need to carry up a monitor | 10:14 | |
castaway | no hurry :) | 10:15 | |
nothingmuch | see://woobling.org:6944 should work eventually, | 10:16 | |
theorbtwo | WOOHOO! | ||
It doesn't work yet, but I've gotten past the first hurdle. | |||
gaal | what does see:// mean? | ||
castaway | hurdle? | ||
theorbtwo | Thing that one has to jump over to continue the race. | 10:17 | |
castaway | SubEthaEdit | ||
castaway grins | |||
theorbtwo | emacswiki.org/wiki/SubEthaEdit | ||
wolverian | are there SEE-compatible, free software linux editors? | ||
castaway adds a 'cw' in that url somewhere | |||
gaal doesn't own a mac | |||
theorbtwo | Not yet, wolverian; castaway and I are working on one. | ||
nothingmuch | wolverian: they're working on it | ||
castaway | not yet, wolverian, but we're working on it | ||
heh :) | |||
wolverian | I love you guys. :) | 10:18 | |
castaway blushes | |||
wolverian | what are you coding it in, and what are you using as components? | ||
theorbtwo | Thanks, wolverian. | ||
We're writing in emacs lisp, and creating many of our own components. | |||
castaway lets theorbtwo answer and does some work instead | |||
wolverian | oh, I hate you guys. emacs. :( | ||
castaway | well you can use our protocol deciphering to make your own | 10:19 | |
nothingmuch | castaway: are there howl bindings for emacs? | ||
castaway | who/what? | ||
wolverian | mmhm. I wonder if simlpy using vim's perl bindings would be adequate. | ||
autrijus | gaal: what does exp do again? | ||
wolverian | simply, rather. | ||
autrijus | is it not the perl5 exp? | 10:20 | |
it should be a op1, no? | |||
nothingmuch | rendezvous | ||
i think it should have two variants | |||
one being op1, using haskell's exp | |||
and vcasting it appropriately | |||
and the other being an op2 alias to ** | |||
autrijus | exp(2, 3) ? | 10:21 | |
nothingmuch | uhuh | ||
theorbtwo | rendezvous forms only a very minor part of SEE's protocol stack; we're ignoring that bit. | ||
Where is that specified, BTW? | |||
autrijus | is it defined in the bible? | ||
theorbtwo | wolverian: If you want to write your own SEE-compatable client, you'll need to start with bencode/bdecode and BEEP (RFC 3080)> | 10:22 | |
autrijus | and isn't it serialized ObjC objects? | 10:23 | |
i.e. you have little chance to munge them without ObjC | |||
theorbtwo | No, autrijus, it isn't. | ||
nothingmuch | theorbtwo: it should be a nobrainer with some rendezvous browser | ||
wolverian | theorbtwo: thanks. | ||
castaway | nm, I doubt there is.. but one doesnt need that bit anyway, much | ||
nothingmuch | autrijus: in that case, won't GNUStep be able to provide good enough remote objects? | 10:24 | |
autrijus | nothingmuch: no idea. I'm just respewing rumours | ||
wolverian | theorbtwo: what is bencode? | ||
theorbtwo | The encoding scheme used in torrent files; the spec is in www.bittorrent.com/protocol.html (search for "bencoding"). | 10:25 | |
wolverian | right. there's a module for that. | ||
thanks again. | |||
theorbtwo | Note that it uses a small extension to that specification: Strings can start with : or '.'. | ||
Right; Convert::Bencode. | |||
wolverian | there's also BT::Bencode; I don't know how good that is or if it's even on CPAN. | ||
theorbtwo | I'm also working with a server in perl, but it's meant largely as a development tool. | 10:26 | |
wolverian | (just googling around while reading the RFC.) | ||
theorbtwo: are you going to implement BEEP in it, though? | |||
nothingmuch | theorbtwo: do you have some wikipage where these notes are scribbled? | ||
wolverian: there's already BEEPCORE for perl | |||
castaway | emacswiki.org search for subetha | ||
gaal | sorry, was making coffee | 10:27 | |
wolverian | nothingmuch: oh. so I wouldn't have to write any protocol cruft myself, just the application layer? | ||
theorbtwo | I know, nothingmuch, but it doesn't do what I want. | ||
Quite possibly. | |||
wolverian | hmm. there is no POE BEEP component. :) | ||
gaal | 2arg exp is not **, it's ** with the order of args switched :) | ||
castaway | iek, POE :) | ||
wolverian | Net::BEEP::Lite looks nice. | ||
gaal | it's defined in S29 | 10:28 | |
theorbtwo | There isn't a callback for the creation of a channel in Net::BEEP::Lite, though. | ||
wolverian | yeah, the POD indicates it's _very_ lite | ||
that is, no asynchronous channels | |||
castaway wonders what its point is then | |||
wolverian | I don't see perl on beepcore.org :/ | 10:30 | |
autrijus | gaal: got it. | ||
wolverian | (besides Net::BEEP::Lite, and it's probably not enough of an implementation.) | ||
castaway | DIY all the way, baby | 10:31 | |
(neither of them existed for elisp ,) | |||
wolverian | argh. :) | ||
castaway | which is why we're only just getting to the actual SEE stuff | 10:32 | |
nothingmuch | autrijus.explain($_) for Ā«vCast castVĀ» | ||
castaway | iek | ||
wolverian | the python library seems to be more complete. augh. | 10:33 | |
castaway must remember to set utf-8 permanently | |||
autrijus | castV casts anything into a Val | ||
vCast casts a Val into anything. | |||
however vCast can't be used for a mutable variable | |||
nothingmuch | autrijus.elaborate | ||
autrijus | ok. the args for op are Val types | 10:34 | |
you can't directly perform operation on them | |||
so you need to use vCast to read them | 10:35 | ||
nothingmuch | so in gaal's question | ||
gaal | autrijus, okay, so please look at the following: | ||
nothingmuch | op1 "exp" = \x -> exp(vCast x) appearantly doesn't work | ||
pasteling | "gaal" at 192.115.25.249 pasted "vCast?" (22 lines, 1K) at sial.org/pbot/8952 | ||
wolverian | do you have any basic implementation notes somewhere on BEEP? if I decide to do this myself, I'm going to need some guidance. :) | ||
nothingmuch | :t exp says it wants to eat a Float | 10:36 | |
i assume you can make a VRat into a Floating | |||
castaway | BEEP has RFCs, and is fairly easy | ||
rfc3080 | |||
theorbtwo | Hm, now I segfault. | ||
I'm not sure if I should define that as progress or not. | |||
Also, 3081. | |||
castaway has ignored 3081 so far | |||
wolverian | castaway: yeah, I'm reading that. I was just wondering if there are any specific issues not addressed in that, or anything else you'd like to share. :) | ||
castaway | I cant think of any offhand, its fairly simple | 10:37 | |
nothingmuch | libetha should be C IMHO, if there are volunteers | ||
castaway | I did it from there, plus a tcpdump of a SEE session | ||
nothingmuch | that way everyone can eat it | ||
castaway | which you're welcome to have | ||
C-- | |||
wolverian | I'd very much like to have the dump. | ||
nothingmuch | C++ for being portable, is all | ||
wolverian | (that sounded wrong..) | ||
nothingmuch | ofcourse, when all our editors will be compiled for parrot... ;-) | 10:38 | |
castaway wishes other things also produced useful shared libs | |||
theorbtwo wonders if we should start an SVN repo, and dump everything we've got in it. | |||
castaway | that is, if theorbtwo is in agreement | ||
theorbtwo | Hm? | 10:39 | |
In agreement on what? | |||
castaway | giving wolverian the ethereal dumps | ||
theorbtwo | Of course. | ||
castaway | is SVN safe? | ||
theorbtwo | Link to them from the wiki. | ||
Safe? | |||
wolverian | you have a wiki? :) | ||
autrijus | gaal: you are missing a return. | ||
gaal: you can't return things w/o a return. | |||
theorbtwo | We're abusing the emacswiki. | ||
gaal | when do i need to return things as opposed to just have a function evaluate to them? | 10:40 | |
theorbtwo wonders if we should start decorating the source code with L<...> markers. | |||
castaway | desert-island.dynodns.net/misc/dump.etherealdump (for now) | ||
theorbtwo | gzip that, love. | ||
castaway | safe, as in secure, if we run it locally | 10:41 | |
wolverian | thanks! | ||
autrijus | gaal: when you are in a monad. | ||
castaway | done, add a .gz | ||
autrijus | > :t return | ||
return :: (Monad m) => a -> m a | |||
gaal | theorbtwo was right :) | ||
wolverian | it's gzipped by the server automatically. | ||
autrijus | return takes a value and put it into a monad. | ||
wolverian | (if the client supports that, anyway. or so wget seems to claim.) | ||
autrijus | so I fixed your code and checked it in. | 10:42 | |
gaal | so i need that in a do block as well, right? | ||
autrijus | thanks :) | ||
theorbtwo | ...and when I'll get the hubris to yell at ingy again, to tell him that Perl6::Bible should have a function that gives me the contents of the document I ask for (as raw POD). | ||
autrijus | well sure, because a do block is just a way to write monadic code. | ||
gaal | autrijus, my code? hah | ||
autrijus | gugod_: can we have jabbot announce freepan commits? | ||
wolverian | hmm, BEEP can run out of reply codes. :) | ||
castaway | hmm, if we want to get/chat about multiple implementations, we should probably add a section on the kwiki on perlmonk.org | ||
wolverian | I so suck at reading RFCs. | 10:43 | |
theorbtwo | wolverian, it's supposed to wrap at that point, which is why the spec is written to say that you can reuse msgnos that have had both a MSG and a RPY on them. | ||
gaal | thanks, autrijus :) | ||
wolverian | theorbtwo: ah, thanks. | ||
castaway | right, but it has quite a few before it gets that far :) | 10:44 | |
gaal | map (++) [ autrijus, nothingmuch, theorbtwo ] | ||
theorbtwo | Hm, any purticular reason that SHA1__0_0_1.hs gives extern__ = [['s', 'h', 'a', '1']], rather then extern__ = ["sha1"] ? | 10:45 | |
autrijus | theorbtwo: because that's how TH prints out code. | ||
"sha1" is a Data.PackedString converted | |||
theorbtwo | Ah, OK. | ||
autrijus | 's' etc is primitive to haskell | ||
castaway | wolverian: anyway, any questions, just ask.. I may even know the answers | 10:46 | |
theorbtwo reminds castaway that she's supposed to be working while she's at work. | 10:47 | ||
wolverian | castaway: thanks. I'll do that. :) | 10:48 | |
castaway | oops :) | ||
castaway fetches more tea instead | 10:49 | ||
jabbot | pugs - 1546 - * exp | 10:52 | |
theorbtwo | Hm, how do I do a <- and explicitly give the type of the var I'm putting into? | ||
extern :: [String] <- loadFunction mod "extern__" doesn't quite do it. | |||
autrijus | extern <- loadFunction mod "extern__" :: [String] | ||
extern <- (loadFunction mod "extern__" :: [String]) | 10:53 | ||
extern <- (loadFunction mod "extern__" :: Eval [String]) | |||
something like that | |||
theorbtwo | Thanks. | ||
autrijus | np :) | ||
castaway sighs.. elisp/see hacking is so much more interesting than SQL project updating.. | 10:54 | ||
somebody motivate me ,) | 10:55 | ||
Alias_ pulls out the whip | |||
Do some work and if you're good I'll use it! | 10:56 | ||
theorbtwo | You just told your boss that you don't have time; if he thinks that you don't have time because you're playing at work, he probably won't look kindly upon it. | ||
Hey, watch it, there. | |||
castaway | hacking isnt playing! | ||
wolverian | wow, reading an RFC really makes you tired. | 11:02 | |
castaway | and thats actually quite a sane one, IMO | 11:03 | |
autrijus | the UTF9 one? | ||
wolverian | BEEP. 3080. | ||
autrijus | ah. | ||
wolverian | where is the wiki on perlmonk.org? | 11:04 | |
castaway | theorbtwo.perlmonk.org/kwiki | 11:05 | |
wolverian | thanks. | ||
castaway | as yet no SEE pages | ||
autrijus | hrm, sign() should prolly return undef for undef | ||
castaway | I could stuff my local "notes" ones in there | ||
Alias_ | So any news on a truly common SEE'like application? | ||
wolverian | castaway: I'd be grateful. | 11:06 | |
castaway | Alias_: been asleep the last hour ? :) | ||
Alias_ | yes | ||
castaway | anything to keep me from working :) | ||
Alias_ | castaway: Give me the 20c update | 11:07 | |
wolverian | I wonder how hard it would be to wrap beepcore-c | 11:08 | |
it doesn't sound like fun. | |||
castaway | Alias_: we're writing an elisp implementation .. 2/3s done maybe. | ||
Alias_ | elisp... | ||
So in other words a SEE client for emacs? | 11:09 | ||
castaway | correct | ||
wolverian | Alias_: I'm currently planning my own implementation of the protocol stack. I'm not sure yet about the application layer; I'd like to tie it into vim somehow. | ||
Alias_ | This is why I hate it when editors have their own language | ||
castaway | wolverian: in no particular order (and not linked anywhere): BEEPDecode, BencodeBdecode, SubEthaEditProtocol, SubEthaEmacs (wiki pages= | ||
wolverian | castaway: thanks! castaway++ | 11:10 | |
castaway | the orginal (local) wiki is actually reachable, but seems to be terribly slow for most people | ||
wolverian | damn, I need to get home to read these. | ||
castaway | hmm? | ||
theorbtwo | He's trying to actually work at work. | 11:11 | |
wolverian | I don't have a comfortable hacking environment currently. | ||
castaway | Alias_: well, it was that or perl.. I dont touch C/C++ in my free time | ||
Alias_ | So with vim and emacs caught up, and a mere mortal Win32 Ultraedit user like me find a program that the plugin will work with? | ||
s/and/what is/ | |||
castaway | hmm, you'd need a DLL | ||
presumably | |||
jabbot | pugs - 1547 - * according to s29 draft from rod, sign | 11:12 | |
Alias_ | Is there a Win32 emacs or vim spawn that works "normally" and isn't 90% obscure key-combination driven? :) | ||
theorbtwo | emacs has menus. | ||
castaway | win32 emacs should run it | ||
Alias_ | ok | ||
Then all is good good good :) | |||
castaway will test at some point | |||
what was I.. ? oh yeah, work.. | |||
theorbtwo | But not while she's at work. | ||
wolverian | the rendezvous part of SEE isn't connected to BEEP in any way, is it? | 11:14 | |
castaway | no, just replaces the typing of URIs | ||
wolverian | right. | ||
castaway | bah.. | 11:15 | |
castaway wonders if SQL can bitshift | |||
wolverian | that sounds nasty. | 11:16 | |
shapr | I usually call that filesystem corruption. | ||
castaway | hmm? | 11:17 | |
shapr | Sorry, standard smartass comment from me. When all my SQL is bitshifted, I call that filesystem corruption. | ||
shapr boings cheerfully | 11:19 | ||
I think I'm going to give up on Rob Nagler. | |||
theorbtwo | Rob Nagler? | ||
shapr | extremeperl | ||
theorbtwo | Doesn't ring any bells. | 11:20 | |
Oh, a book? | |||
shapr | groups.yahoo.com/group/extremeperl/messages | ||
jabbot | pugs - 1548 - * according to S29 atan2 is now spelled | 11:22 | |
Alias_ | Will be interesting to see the combination of SEE and Test::Inline | 11:23 | |
Multiple people on one file writing the docs, tests and code simultaneously | |||
castaway | ick :) | 11:26 | |
umm, iek :) | |||
wolverian | shapr: how are you giving up on him? | 11:28 | |
theorbtwo | nopaste? | 11:29 | |
jabbot, nopaste? | |||
jabbot | theorbtwo: nopaste is Use sial.org/pbot | ||
theorbtwo | jabbot, thank you. | ||
jabbot | theorbtwo: You're not really talking about me -- are you? | ||
shapr | wolverian: I'm tired of talking to him. It seems to me he's not looking for a better way, he's looking to stay inside the way he's got at all costs. | 11:30 | |
autrijus | stevan: I'm hacking your hangman | ||
sub cls returns Void { | |||
system( ($?OS eq any(<MSWin32 mingw cygwin>)) ?? 'cls' :: 'clear'); | |||
} | |||
that should work for now | |||
mm any<MSWin32 mingw cygwin> | 11:31 | ||
wolverian | shapr: oh. :/ | ||
autrijus discovers a nice idiom for p6 :) | 11:32 | ||
shapr | As much as I enjoy using Haskell, Epigram, Joy, or whatever, I'm sure there will be better solutions available in fifty years. I'd like to steal parts of that better future and use them today. | ||
theorbtwo | Shapr: We hope to take less then 50 years to get perl6 usable. | 11:33 | |
shapr | haha | ||
I'm just saying that everything we use and know has beauty and quality, but is necessarily imperfect. So it's best to look for lots of grains of goodness and keep them all in mind. | 11:34 | ||
pjcj | perl6 is for the next 20 years, no? But five of them have already gone ;-) | ||
theorbtwo | shapr++ | 11:35 | |
You are indeed quite eloquent for what I am assuming is not your native language. | |||
shapr | Heh, I'm from Alabama. Redneck is my native language! | 11:36 | |
theorbtwo | Oh, damn. | ||
That makes that reference somewhat less funny. | |||
shapr | My swedish isn't nearly as eloquent. | 11:37 | |
theorbtwo | sial.org's pastebot seems to be down; what's a good alternative? | ||
theorbtwo sighs... I'm getting closer, I think. | 11:40 | ||
autrijus | theorbtwo++ | 11:41 | |
theorbtwo: nopaste.snit.ch ? | |||
jabbot | pugs - 1549 - * more p6ification for hangman | 11:42 | |
stevan | autrijus++ # nice hangman/clear screen fix :) | 11:47 | |
theorbtwo | nopaste.snit.ch:8001/2256 | ||
autrijus | any<foo bar baz> | 11:48 | |
is such a nice idiom. | |||
stevan | I like that too | ||
theorbtwo | Tis indeed. | ||
I think it'd like it better with a ~~, though. | |||
stevan is very much in love with junctions :) | |||
theorbtwo | $?OS ~~ any<MSWin32 mingw cygwin> | 11:49 | |
stevan | theorbtwo: with the mutiple operators you have greater control | ||
autrijus | theorbtwo: you have this committer right thing | ||
:) | |||
stevan | $?OS ne any<MSWin32 mingw cygwin>; $?OS eq any<MSWin32 mingw cygwin>; etc... | ||
stevan has to unplug and drive to his weekly work meeting | 11:50 | ||
bye all | |||
theorbtwo | True, but I'm not so sure if the code I have is actually better then the code that is already there. | 11:51 | |
autrijus | oh, that works? | ||
the bit you posted | |||
theorbtwo | Well, it works up to the (`mapM`) bit. That segfaults. | 11:52 | |
Alias_ | autrijus: You're involved in various Module::(Build|Install) stuff right? | ||
autrijus | can you print out extern? | ||
Alias_: not M::B | |||
theorbtwo | How? | ||
autrijus | M::I is my work yes. | ||
theorbtwo: print extern | |||
Alias_ | autrijus: Is there any "standard" way to install a data file? | ||
autrijus | Alias_: no. I think we've had this discussion before :) | ||
many moons ago | |||
Alias_ | I _am_ having a bit of deja-vu... | ||
But them I'm working on Data::Package again, so that might be why | 11:53 | ||
theorbtwo | I don't see any output. | ||
autrijus | theorbtwo: hrm, try using trace | 11:54 | |
trace (show extern) return () | 11:55 | ||
but, maybe you can commit that bit | |||
so I can svk pull and go to dinner where there's no network :) | |||
Alias_ | autrijus: OK, so in that case, I'd like to _propose_ a standard way :) | ||
autrijus: If you think it will integrate with M:I | |||
autrijus | I'd be happy to integ it w/ M::I. | 11:56 | |
theorbtwo | Still no output, but ci'd anyway. | 11:57 | |
autrijus | k. | ||
bbiab. :) & | |||
theorbtwo | You'll have to change the hardcoded path, of course. | ||
autrijus | sure. | ||
jabbot | pugs - 1552 - r6230@speights: samv | 2005-04-05 19:5 | 12:02 | |
pugs - 1551 - r6229@speights: samv | 2005-04-05 19:2 | |||
pugs - 1550 - inline haskell support -- I think this i | |||
shapr hops cheerfully | 12:13 | ||
theorbtwo | You seem very cheerful, shapr. | ||
shapr | I am! I had food! I have sugary drinks! w00! | 12:14 | |
and I committed code to an open source project in the last 24 hours! w00h00! | |||
theorbtwo grins. | 12:15 | ||
Alias_ | Question: Is a "lambda" basically the technical term for an anonymous subroutine? | 12:26 | |
shapr | How much detail do you want? | 12:27 | |
wolverian | I'd say the technical name is 'anonymous subroutine'. :) | ||
Alias_ | shapr: The level 2 version | ||
shapr | \x -> x + 1 is a nameless Haskell function that adds 1 to a number. | 12:29 | |
Technically it's the lambda from lambda calculus. | 12:30 | ||
theorbtwo | en.wikipedia.org/wiki/Lambda_calculus | ||
shapr | In short, the turing machine and the lambda calculus are two approaches to computational theory. They can both do anything a general purpose computer can do, but one or the other is easier to reason about for varying purposes. | 12:31 | |
Alias_ | damn the informal description on wikipedia is dense | 12:32 | |
"In lambda calculus, every expression stands for a function with a single argument; the argument of the function is in turn a function with a single argument, and the value of the function is another function with a single argument. A function is anonymously defined by a lambda expression which expresses the function's action on its argument." | |||
shapr | The first example I saw of that dense description was these crazy things called 'Church numerals' (Church numbers?). | 12:33 | |
elmex | shapr: it just popped into my mind, aren't u a regular #haskell idler? | ||
shapr | elmex: yeah, I show up there sometimes. | ||
shapr grins | 12:34 | ||
Alias_ | so yes, a "lambda" is a function, just without a name | ||
... and apparently only one argument | |||
shapr | Technically, Haskell functions only take one argument, even when they take several. | ||
theorbtwo | All functions in haskell only have one argument. | ||
They just fake it really well. | |||
elmex | shapr: i only remember you, back from the days when i idled there and tried to learn haskell ;) now i barely remember how to code in haskell ;/ | 12:35 | |
Alias_ | hmm... and it explains a lot about why they teach Haskell at university | ||
shapr | Alias_: it does? | ||
gaal | Gordon Freeman was a lisp hacker. | ||
theorbtwo | OTOH, all functions in perl5 only take one argument, and that argument is always named @_. | ||
Alias_ | Because is Haskell is a lambda-focused language, mathematicians probably love it | ||
shapr | I dunno. I've never had any CS classes, or any math classes. | 12:36 | |
theorbtwo | Mathematicians proveably love it, you mean. ;) | ||
Alias_ | and thus in the "early" days of computer when it was mathematician heavy, haskell got used a lot | ||
shapr | theorbtwo: haha! | ||
theorbtwo | Alias, Haskell isn't that old. | ||
shapr | Alias_: actually, lambda calculus is older than computers, and Haskell is only fifteen years old. | ||
castaway returns, out of breath | |||
Alias_ | And when those people got old and wanted to teach and introductory language they already knew, Haskell got pushed onto another generation of uni students | ||
Anyways... | |||
It spans comp and math | |||
So I see why the unis like it | 12:37 | ||
pjcj | but there was a plethora of other functional languages | ||
castaway falls on theorbtwo. | |||
shapr | I'm just looking for better ways of doing things, that's how I found Haskell. | ||
Alias_ | But Haskell was the coolest one of the most recent generation? | ||
shapr | Depends on what you mean by cool. | ||
Alias_ | The one all the cool kids were using | 12:38 | |
being the people that dictate the courses :) | |||
pjcj | haskell was designed to replace all the others, IIRC. | ||
shapr | Haskell was designed because the most popular lazy functional language was a commercial closed source product. | ||
pjcj | or at least the others in its class | ||
shapr | And a bunch of guys wanted something they could hack on. | 12:39 | |
castaway | hmm, where'd he go? | ||
shapr | castaway: I'm sorry, you squished him. | ||
Remember, don't jump on people from six stories up! | |||
pjcj | My college used Hope, but no one else did. | ||
shapr | I always feel like a total geek when I want to say "Oh, Hope had some really cool features!" | 12:40 | |
castaway | hmpf, and I just climbed 4 floors, how did you know? | ||
shapr laughs | |||
castaway: are you really German? | |||
castaway | No | ||
shapr | whew. | ||
castaway is a brit! | |||
Odin- | Poor thing. | 12:41 | |
theorbtwo kisses castaway. | 12:42 | ||
(I was reading CNN.) | 12:43 | ||
castaway | Aha! | ||
shapr | I'm amazed that Haskell is so close to lambda calculus. The more I find powerful patterns in software, the more I think they depend on being powerful patterns from mathematics. | ||
Odin- | theorbtwo shares a host with castaway, so I feel I must ask: In real life, or? | ||
:p | 12:44 | ||
castaway | correct | ||
Odin- curious. | |||
castaway snuggles theorbtwo. (mines!) | |||
theorbtwo snuggles back. | |||
shapr | I'm tryin to code here! geez! | ||
castaway | sowwy shapr | 12:45 | |
,) | |||
shapr grins | |||
castaway attempts more SQL, while waiting for the next interruption | |||
shapr | select * from irc where username >= 5; | 12:46 | |
theorbtwo | shapr, any idea about the segfault autrijus and I were discussing a bit ago? | ||
Limbic_Region | autrijus - www.perlmonks.org/index.pl?node_id=444853 # Perl6 and Ruby on Rails | 12:47 | |
shapr | I used to work on this 65,000 line visual basic trust management application. It had SQL queries that were several pages long, with no line breaks. Debugging those was fun. | ||
castaway | ick | ||
theorbtwo | Limbic, autrijus is at dinner. | ||
castaway | BEEP! username is not numeric | ||
shapr | doh | ||
Limbic_Region | theorbtwo - he usually catches back up on the log, but I /msg'd him anyway | 12:50 | |
wolverian | Limbic_Region: I like how he hasn't apparently read any apos or even synopses. (re: perlmonks) | 12:52 | |
I guess perlmonks isn't the right place to say RTFM. | |||
theorbtwo | We generally prefer that you say something else in addition to RTFM. | 12:53 | |
...like how to find the FM, and what FM to R. | |||
wolverian | I try to do that on #perlhelp and such, yes. | 12:54 | |
Limbic_Region | wolverian - I haven't read the article yet. I make a daily scan of use.perl journal entries and posts at the Monastery and mention anything parrot related to chip and anything p6/pugs related to autrijus | 12:55 | |
shapr | theorbtwo: have you considered the hightech option of throwing putStrLn in there? | 12:56 | |
castaway | ooh, hightec | ||
theorbtwo | Hm, no, good idea, shapr. | ||
wolverian | Limbic_Region: oh, right. thanks, too, it's always good to read such things, even if they're by IGNORAMUSES. | 12:57 | |
I think I need to sleep. :/ | |||
shapr | I get tired of reading stuff written by Ignoramuses. I'd rather read stuff by Oleg Kiselyov. Then I feel like an Ignoramuses who can improve! | ||
I feel that way when reading of autrijus' code too. Like "wow, I can really learn something here." | 12:59 | ||
castaway | you can learn a fair bit attempting to fix other peoples crap code, too :) | ||
Limbic_Region agrees with castaway | 13:00 | ||
castaway | But I agree that one gets tired of it ,) | ||
shapr | Alias_: btw, church numerals and all that lambda calculus stuff is tremendously fun. | 13:01 | |
Alias_ | shapr: So you say :) | ||
shapr | c2.com/cgi/wiki?ChurchNumeral | ||
Alias_ | shapr: I don't program for fun. Just to be ! bored | ||
shapr: Fortunately for CPAN, I get bored a lot | |||
shapr | I can intellectually realize that some people do not program for fun. But I do not think I'll ever really get it. | 13:02 | |
Alias_ | shapr: I've done practically everything fun I can think of with programming | 13:03 | |
shapr | My current email signature is "Programming is the Magic Executable Fridge Poetry, It is machines made of thought, fueled by ideas." | ||
Alias_ | shapr: And now I'm just out to make it not suck | ||
shapr | Alias_: if you don't know about lambda calculus, there's a whole new world to be found. | ||
Alias_ | meh... but what's the point, really | 13:04 | |
shapr | What's the point of programming at all? | ||
Alias_ | I've probably discovered it myself independantly | ||
mugwump laughs | |||
Alias_ | mugwump: It's a bad habit :) | ||
shapr | Alias_: c'est votre choix | ||
castaway | he speaks french too! | ||
shapr | Peut etre. Parlez vous franƧais Mademoiselle? | 13:05 | |
Alias_ | yes, but unfortunately my spelling issues are far worse in French, so I don't dare type it | ||
castaway | Non ,) | ||
shapr | quelle dommage. | ||
castaway | wot? :) | ||
rgs | "quel" | ||
shapr | rgs: man, I did that again! ouch! | ||
rgs: thanks! | |||
castaway got a B about 15 years ago (GCSE) | |||
rgs | :) | 13:06 | |
Alias_ | I wonder... | ||
Take a machine learning algorithm for recognising languages, add babelfish, and mix with an IRC client | |||
shapr | Last time I took french classes was 1992. | ||
Alias_ | The mis-tranlations would be hilarious... but it might actually be functional | ||
Implementation is left as an exercise for the reader | 13:07 | ||
castaway | those things are bad enough when you give them a specific language | ||
shapr | But I spent a few hours in some bars in Lille last christmas speaking only French. That was fun. No one really understood me, but I sure felt cool. | ||
Alias_ | Masque: About the only knife I had I really like is my swiss army knife | ||
shapr | Alias_: oh, try a leatherman! | 13:08 | |
Alias_ | Masque: milspec... from Switzerland | ||
shapr | Alias_: EMISCHAN | ||
castaway looks confused. | |||
Alias_ | shapr: Nah... I have a "real" swiss army knife, and that is enough for me | ||
ack, channel | |||
shapr | I have a stick. It is enough for me. It is turing complete. | 13:09 | |
shapr beats himself with his stick. | 13:10 | ||
xerox | You need brainpower for fullify the turing completeness of your stick :-) | ||
castaway stopped carrying a knife when people started complaining about them on various transport mediums | |||
xerox | ^__^ | ||
castaway | (that was abt 15 years ago too) | ||
Alias_ | castaway: Now you just pack a sword in your carry-on? | 13:11 | |
castaway | heh, no, theorbtwo has the sword ,) | ||
Alias_ | I like the idea of getting a sword | ||
Even one of the knock off dodgy cheap ones | 13:12 | ||
But instead of mounting it or some shit, just leave it lying around in the loungeroom | |||
castaway | heh | ||
Alias_ | "Oh, that's for roach killing" | ||
theorbtwo | Mine is indeed lying around the living-room somewhere. | ||
Well, the small one; the big one is still in the US. | |||
BTW, check them, not carry-on. | 13:13 | ||
shapr | Yeah, I have to check my leatherman too :-( | ||
Alias_ | "Crap a spider, $guest can you grab the sword? I think it fell down the back of the lounge" | ||
castaway assumes Alias_ isnt quite that daft | |||
elmex | ? | ||
castaway lost a pair of pliers that way.. (coming back that is, going they didnt notice/complain... sigh) | |||
Alias_ | castaway: Well, if I were to do it, it would be the biggest craziest looking over the top sword I can find | 13:14 | |
castaway | yup, but putting it in the carry-on is asking for trouble | ||
Alias_ | 5-6 feet long, spikey bits, dragon's head on the pommel | ||
The whole 9 yards | |||
castaway | :) | ||
shapr | that's not 5-6 feet | ||
castaway | 9 yards is 27 feet | ||
castaway high-5s shapr | |||
shapr | Isn't that like the whole two yards? | ||
Alias_ | heh | ||
shapr snickers | 13:15 | ||
castaway | dammit folks, this isnt SQL | ||
shapr | and this isn't $work | ||
theorbtwo threatens castaway with the shortsword. | |||
castaway | iek! | 13:16 | |
jabbot | pugs - 1553 - * fix parsefail bug on false unaries | 13:22 | |
Alias_ | ok, I've read the description of lambda calculus on wikipedia and it makes practically no sense | 13:23 | |
Which probably means Haskell is not for me :) | |||
autrijus | the old parsebug fixed | ||
Alias_ | sorry lambas :( | ||
autrijus | next; last; return; | ||
now all just work. | |||
theorbtwo | Alias, the description there seems very dense for programmers. | 13:24 | |
shapr | autrijus: can you suggest a task that is one step up from implementing builtins? do you think the want.{Scalar,...} fits in there? | ||
theorbtwo | autrijus, any dice on my problem? | ||
Alias_ | I'm liking "lamba calculus as birds" a bit better though | 13:25 | |
autrijus | theorbtwo: I had not looked; sorry | ||
Alias_ | uq.net.au/~zzdkeena/Lambda/index.htm | ||
autrijus | shapr: want.Scalar requires OO subsystem | ||
Alias_ | of course, I'm still not seeing the point | ||
shapr | oh | ||
autrijus | and we currently don't have one | ||
maybe implement kill()? :D | |||
shapr | Alias_: whoa, that rocks. | ||
autrijus | that's still a builtin, though | ||
shapr | maybe a builtin that requires more than just filling in initSyms? | 13:26 | |
autrijus | not sure... you grok GADTs? | ||
shapr | vaguely | ||
autrijus | kill() requires a bit more thought | ||
shapr | not grok :-) | ||
ok, I'll check that out. | |||
autrijus | or maybe help theorbtwo with DynamicLoader :) | ||
shapr | ok | ||
theorbtwo: is that paste all that you need to get the segfault? | 13:27 | ||
Alias_ | I don't like the use of . in lamba calc, because it makes it really bloody hard to read | 13:28 | |
castaway | ieks, COBOL | ||
autrijus | shapr: you need just to check out the trunk of pugs | ||
Alias_ | I'm too used to . as method or concat | ||
autrijus | install that, then checkout tpe.freepan.org/repos/ingy/SHA1/ then install that (perl Makefile.PL ; make install) | ||
then you can witness the segfault with | |||
make ghci ; loadHaskell | 13:29 | ||
theorbtwo | Alias_: That's probably why Haskell spells it -> | ||
(And \ instead of lambda.) | |||
shapr | I get an error building with the latest svn, anyone else? | 13:33 | |
shapr tries make clean && make | |||
autrijus | is it an impossible error? | 13:34 | |
shapr | yup | ||
fromJust: Nothing | |||
autrijus | I get that too | ||
GHC bug. a clean fixes it | |||
shapr | ok | ||
Alias_: this lambda calculus is birds is a great find, thanks! | 13:36 | ||
Alias_ | shapr: I'm still confused as hell, but I think I at least have an idea of the point of it, from the math side of things | ||
in that sense the bird thing is handy | 13:37 | ||
castaway | bird thing? | ||
Alias_ | uq.net.au/~zzdkeena/Lambda/index.htm | ||
"To shred a Mockingbird" | |||
Lambda calculus animated and described in bird names | |||
shapr snickers wildly, "In the case of the Idiot song being heard by an Idiot bird we can perform another beta reduction and obtain a result which is just the Idiot bird/song." | 13:38 | ||
xerox | "In the case of the Idiot song being heard by an Idiot bird we can perform another beta reduction and obtain a result which | 13:39 | |
Whoops. | |||
castaway | cute | ||
mj | t/pugsbugs/die_and_end.t 1 256 1 2 200.00% 1 :-) | 13:41 | |
jabbot | pugs - 1554 - * there is no nullary eval form. | 13:42 | |
Alias_ | castaway: Of course, reading any haskell file in pugs still makes no sense... :) | ||
castaway | It doesnt to me either, Alias_ | ||
shapr | I can help! | ||
Alias_ | heh | ||
castaway | you can translate to perl? | 13:43 | |
shapr | oh, probably not. | ||
castaway | elis? | ||
elisp? | |||
Alias_ | I'm guess it's going to be easier to put a lamba on a camel than to put a camel on a lambda | ||
shapr | maybe to elisp. | ||
castaway | hmm | 13:44 | |
Alias_ | shapr: Or maybe, "where the fuck do you start" | ||
xerox | I do like the effort going on in putting a camel on a lambda, as in pugs :-) | ||
shapr | I wrote a Baskin-Robbins introduction to Haskell for those who value methylphenidate - www.haskell.org/hawiki/HaskellDemo | ||
Alias_ | Haskell seems like the sort of language that really needs a video introduction | ||
shapr | Hey, that's a good idea! | 13:45 | |
theorbtwo | vnc2swf ? | ||
Alias_ | Hi I'm Troy McClure. | ||
shapr | And I'm Shae Erisson | ||
And today we'll introduce you to the new LambdaCamel TV series! | |||
Alias_ | You may have seem me in such educational videos as "Sex. Know you know how, DON'T DO IT!" and "Forks and Toaster. A bad thing?" | 13:46 | |
vnc2swf? | |||
So THAT's how he did it | |||
Alias_ saw a swf video demo some some program the other day | |||
theorbtwo | You may remember me from such educational films as Lambda does Latin Dancing and Beta Reduction -- the SEXY Way. | ||
shapr | And you may have seen me in such educational films as "Ivory Towers, more fun than tilting at windmills?" and "Will the university of Lyon lie down with the lambda?" | 13:47 | |
Alias_ | So tell me, do you have to define "add" in every single program? | ||
shapr | no | ||
Alias_ | I also worry about anything where "true" is defined as a set of functions :) | ||
shapr | Oh, you mean the temperature equality typeclass? | 13:48 | |
Alias_ | shapr: Are you taking suggestions for that demo page? | ||
shapr | I am. | ||
I encourage them even. | |||
Maybe there's no outright begging, but it is implied. | 13:49 | ||
Alias_ | somenumber = 1 (good) | ||
somestring = "somestring" (good) | |||
shapr | you think monads shouldn't go right after that? | ||
Alias_ | add1 :: Integer -> Integer and add1 x = x + 1 | ||
slowing down a bit... but ok | |||
theorbtwo | The first line tells you the signature of add1, the second tells you the defintion. | 13:50 | |
Alias_ | yeah, I managed to get the idea after 10 seconds | ||
castaway | just wait til you get to multiple arguments :) | ||
Alias_ | My next question, before you got any more complex, was "and how do you use it" | ||
How does one "do" anything | |||
theorbtwo | Well, the sort answer is "just like perl, except for the parens". | 13:51 | |
Alias_ | I need a 1 + 1 = 2 example, using your add1 function | ||
castaway | good idea, Alias_ | ||
Alias_ | immediately after you defined ad1 | ||
xerox | Missing function application? | ||
shapr | Alias_: excellent point. | ||
Alias_ | here is how to define the most basic function, and how you use it | ||
shapr edits | |||
Alias_ | here is how you define a lambda, and how you use it | ||
etc etc | |||
slowly slowly... with lots of parallels to normal functional programming | 13:52 | ||
castaway | "a lambda" | ||
? | |||
jabbot | pugs - 1557 - r6235@speights: samv | 2005-04-05 21:4 | ||
pugs - 1556 - Implemented sum. | |||
pugs - 1555 - Add nick for shapr | |||
Alias_ | anonymous function ? | ||
castaway | ah | ||
Alias_ | Am I misusing the term? | ||
-- anonymous function (we give this one a name anyway) | |||
add2 = (\x -> x + 2) | |||
castaway | I dont know.. I know it from somewhere else :) | ||
autrijus | anonymous function is correct. | 13:53 | |
castaway | the word "lambda" seems to get thrown about a lot and used for various things | ||
shapr | nick? | ||
castaway | nickname? | ||
autrijus notes that | 13:54 | ||
data People = Person Name Age | |||
castaway digs out the LPC lambda stuff | |||
autrijus | reads worse than | ||
data People where Person :: Name -> Age -> People | |||
shapr | truly | ||
theorbtwo isn't sure what either of them are supposed to mean. | 13:55 | ||
autrijus | so I guess I'll convert more pugs code to use that form :D | ||
shapr | That's an interesting point. GADTs are more readable than boring datatypes? | ||
autrijus | theorbtwo: it defaults a new type "People" | ||
to construct them, use "Person" function | |||
13:55
Aankh|Clone is now known as Aankhen``
|
|||
autrijus | which takes two arguments of "Name" and "Age" type | 13:55 | |
and returns something that belongs to "People" type | |||
s/defaults/defines/ | |||
mj | WinXP ... 209/3795 subtests failed, 94.49% okay. After s/todo_//g ... 1087/3795 subtests failed, 71.36% okay ... $Pugs ~~ '71% percent Perl 6' ? | 13:56 | |
theorbtwo | Something like that, mj. | ||
shapr | I really like that idea. | 13:57 | |
Alias_: what do you think about the add1 example I used? | |||
castaway | wait, the 2nd reads easier than the first, autrijus ? | ||
Alias_ | shapr: /me looks | 13:58 | |
castaway notes parallels between LPC closures and LISP (hmm, what fun) | 13:59 | ||
theorbtwo | Unsurprising -- doesn't the L in LPC stand for LISP? | 14:00 | |
shapr | autrijus: GADTs for readability is a great idea, thanks! | ||
castaway | No | ||
"Lars" | |||
Lars Penji C (sp?) | |||
shapr | yay LPMuds! | 14:01 | |
castaway | confusingly, its docs call "anonymous functions written in a weird mini language" - "closures" :) | ||
precisely | |||
shapr | Closures have some other picky details that make them interesting. The word comes from the fact that you 'close over' the values. | ||
Alias_ | shapr: aaaah... so fortytwo = add1 41 is basically like a normaly function call but without the braces that add so much annoying readability | ||
shapr: That is a Big Deal(TM) | |||
theorbtwo | Alias: Yep. | 14:02 | |
castaway | yeah, but I'm not actually sure that LPCs do | ||
Alias_ | makes understanding at least somewhat possible, maybe | ||
shapr | Alias_: well, braces add readability for some folk, I assume. | ||
castaway | Alias_++ | ||
theorbtwo | I think Haskell would be much more readability if they added some parens and commas. | ||
castaway too | |||
theorbtwo | You can use parens, but they go around expressions, not argument lists. | ||
Alias_ | shapr: Well, for camels, the fact that add1 41 is add1(41) is gunna matter a LOT | ||
theorbtwo | (And around tupples.) | ||
Alias_ | shapr: Since we are used to full parens on things | 14:03 | |
castaway | closure max; | ||
max = lambda( ({ 'x, 'y }), | |||
({ #'? ,({ #'>, 'x, 'y }), 'x, 'y }) ); | |||
return funcall(max,7,3); | |||
(even more silly parentheses :) | |||
shapr | That is clearly closing over the values. | ||
shapr eats a value for lunch. | |||
theorbtwo | Alias, recall that parens are optional in perl. However, they are /disallowed/ in haskell. | ||
castaway | which vals? I seem to be blind | 14:04 | |
shapr | the 'x and 'y values. | ||
well, I think so. | |||
castaway | umm, they're passed in, not external? | ||
shapr | ok, they are.. | ||
but it could be closing over values! | |||
Alias_ | theorbtwo: True, but most people don't use implicit braces any more, since most coding now is OO, and OO MUST have braces | ||
shapr pouts | |||
castaway | I've never seen any that do | ||
Alias_ | There is remarkebly little use of function signatures to allow implicit braces | ||
castaway tickles shapr. | |||
shapr unpouts | 14:05 | ||
castaway: can you get partial application by filling in one part of a lambda? | |||
castaway | Alias_: who are these "most people" ? :) | ||
theorbtwo | That's because p5 prototypes aren't very good at that. | ||
Alias_ | castaway: Most camels | ||
castaway | Alias_: I wouldnt agree.. | ||
shapr umm, I dont think so | |||
Alias_ | castaway: As a percentage of the code you've written in the last year, how much uses implicit braces | 14:06 | |
castaway: Hell... how much is non-OO | |||
theorbtwo | I take advantage of implicit braces and non-OO quite a bit, Alias. | ||
I think OO is rather overrused by many. | |||
Alias_ | I've got maybe 2000 lines of functional stuff, and 150,000 lines of OO stuff | ||
castaway | umm, you can do it with unbound closures tho | 14:07 | |
shapr | hm, neat. | ||
castaway | Alias_: ALL of minie does.. I just know/have seen a fair few people who dont, per default | ||
theorbtwo | Alias: You almost certainly mean imperative, not OO. | ||
Er, imperative, not functional. | |||
Alias_ | sorry, procedural? | ||
castaway | And lots of it is non OO | ||
Alias_ | imperative... | ||
theorbtwo | shapr, you can always use closures to create currying. | ||
shapr | yay | 14:08 | |
Is a functor the opposite of an imperator? | |||
theorbtwo | I don't know what either of those are. | ||
Alias_ | (\x = x + 2) is equivalent to sub { return $_[0] + 2 } ? | ||
theorbtwo | Yes. | 14:09 | |
The return is optional, BTW. | |||
pjcj | perl -wle 'sub add1 { $_[0] + 1 } $forty_two = add1 41; print $forty_two' # I like missing parens | ||
Alias_ | right | ||
just trying to be clearer | |||
theorbtwo | Oh, right... /me forgot which language was your native, and which you were uncertian about. | 14:10 | |
Alias_ | shapr: And you use pooled idenfitiers? | ||
theorbtwo | (\x = x + 2) is exactly equvlent to sub { $_[0] + 2 }, down to the closing. | ||
shapr | Sorry, my identifiers can't swim. No really, what does that mean? | 14:11 | |
castaway grins | |||
Alias_ | is C< add1 x = x + 1 > equivalent to C< add1 = (\x -> x + 1) > | ||
castaway | lambda (x) (+ x 2) :) | ||
(lambda (x) (+ x 2)) (of course) | 14:12 | ||
shapr | Alias_: yes it is. | ||
Alias_ | so (\x = x + 2) differs in that while Perl would create a ref to the func, Haskell's IS the func? | ||
wilx | Hmm, OT question. | ||
Does SVK allow background syncing of reps while checking out something on foreground? | 14:13 | ||
shapr | I don't quite understand the difference between a ref and the function itself. | ||
Alias_ | well... for example... | ||
autrijus | shapr: easy | ||
Alias_ | $reference = sub { $_[0] + 1 }; | ||
autrijus | in perl, everything is IORef. | ||
shapr | oh! | ||
Alias_ | You have to escape the ref to use it | ||
shapr | that's wild! | 14:14 | |
autrijus | and all programs are in the IO monad. | ||
(with builtin ContT and ReaderT) | |||
that's all :) | |||
Alias_ | autrijus: I think you two need to create a pair of primers | ||
shapr appoints autrijus dual-citizenship lambdacamel | |||
Or at least fluent translator | |||
Alias_ | autrijus: Lamba for Camels, and Camel for Lambdas | ||
autrijus | Alias_: I have some URLs in PA01... | 14:15 | |
Alias_ | If the two communities are going to be mixing for a while, it may well be needed a lot | ||
autrijus | more suggestions welcome | ||
theorbtwo | shapr: Autrijus already is a fluent translator. | ||
shapr | It's sort of braintwisty for me to figure out how you would do stuff with everything wrapped in an IORef. | ||
Alias_ | theordtwo: Beware the English-only speaker who also knows only PHP | ||
autrijus | easy; you "deref" it. | ||
shapr | theorbtwo: yes, but he has now added Haskell <-> Perl to his lists. | ||
Alias_ | &$ref | 14:16 | |
The & derefs | |||
shapr | yeah, I dig it. | ||
&IORef | |||
autrijus | and by deref, it actually means "cast the thing in IORef to one of <Code Scalar Hash Array>." | ||
because you see, perl5 is a strongly typed language. | |||
with no subtypes. | |||
theorbtwo | It's sort of braintwisty for me to figure out how you do stuff when you keep having to enter and escape monads. | ||
shapr | Dare I ask what those types signify? | ||
theorbtwo | It just only has a very short list of types, and not the ones you'd think. | ||
Alias_ | Code is an anonymous function | ||
shapr | I'll gues that, Code is a sub, Array is an array, and... | 14:17 | |
theorbtwo | shapr, latin plural class, believe it or not. | ||
autrijus | Hash is a Data.Map | ||
Alias_ | Scalar is a string/number/reference | ||
shapr | oh wow | ||
Limbic_Region | autrijus - you get the link I /msg'd you? | ||
theorbtwo | Scalar is string/number/reference/undef (a bit catch-all). | ||
shapr | Geez, Larry Wall should hook up with Aarne Ranat. | ||
um "Aarne Ranta" | |||
autrijus | Scalar is Either Ref Value | ||
shapr | huh | ||
autrijus | and Value would be the union of String, Num, Int | 14:18 | |
pjcj | Also Regexp, IO | ||
autrijus | s/Num/Float/ | ||
Alias_ | autrijus: We'll ignore Ref and Glob for now? :) | ||
shapr | Why nested refs? | ||
autrijus | shapr: because somebody like it. | ||
shapr | fair enough | ||
autrijus | shapr: because that's how perl does multidim arrays. | ||
Alias_ | shapr: It's partly the C heritage | ||
autrijus | perl arrays can't contain arrays | ||
only scalars | |||
theorbtwo | Shapr: Arrays and hashes only hold scalars. | ||
autrijus | so those are references to arrays | ||
Alias_ | @inner = ( 1, 2, 3 ); | ||
@outer = ( \@inner ) | 14:19 | ||
shapr | Hm, interesting. | ||
Alias_ | bad example | ||
autrijus | shapr: e.g. perl allows for | ||
[ [1,2], 3 ] | |||
Alias_ | autrijus: Or specifically, how perl DOESN'T to multidim arrays | ||
autrijus | which is ill typed in haskell. | ||
the trick is to make it | |||
Alias_ | Perl has no proper multidimentional array, just arrays containing pointers to other arrays | 14:20 | |
autrijus | [ (Ref Array [1,2]) (Int 3) ] | ||
Alias_ | So the length of each dimention is not enforced | ||
theorbtwo | s/pointers/references/ | ||
autrijus | (Int) and (Ref a) being both constructors to Scalar. | ||
castaway looks slightly lost. | |||
autrijus | so that has type [Scalar] | ||
theorbtwo | Indeed, the number of dimensions is not enforced. | ||
autrijus | and hence well typed. | ||
theorbtwo | castaway: A haskell array is limited to containing any number of elements, all of which have the same type. | 14:21 | |
shapr | That kind of makes sense, an array of pointers. | ||
castaway | hmm, so are LISP ones, thats why it also has lists :) | ||
autrijus | the weirdo thing is that Scalar is a union of pointer or pure values. | ||
castaway | No pointers! | ||
Alias_ | shapr: Thus, to be camel-friendly, you may need to point out that add2 = (\x -> x + 2) is exactly equivalent to add2 x = x + 2 | ||
shapr | Right, I'm beginning to see that. | 14:22 | |
Alias_ | Big difference between "reference to" and "is" for us | ||
The sigil is what defines the IS | |||
castaway | does haskell have anything that does allow a dynamic number of elements? | ||
autrijus | castaway: a list? :) | ||
theorbtwo | Sadly, perl 6 is trying to hide the difference, without getting rid of it. | ||
castaway | oh sorry, misread.. any number of els, same type | 14:23 | |
what about multi types then? | |||
shapr | You can do multi-types with HList, but it's not for the faint of heart. | ||
Alias_ | shapr: In fact, I'd do naked (\x -> x + 2) first, then show assigning it, THEN show it's the same | ||
autrijus | castaway: that's called a HList. | ||
shapr | Alias_: show me? | ||
autrijus | but usually in haskell, you either fix the number of els | ||
or the type. | |||
Alias_ | -- anonymous function | ||
autrijus | if you fix the els, it's called a n-tuple | ||
Alias_ | (\x -> x + 2) | 14:24 | |
autrijus | written as (a,b,c) | ||
theorbtwo | Tupples allow elements of any type, but you have to declare how many elements, and of what types, the purticular tupple will have. | ||
autrijus | right. | ||
Alias_ | -- but you can assign these anyway | ||
autrijus | if you want to keep both variadic | ||
you want HLists. | |||
castaway | yeah, I gave up reading the tutorial somewhere there | ||
Alias_ | add2 = ... | ||
-- assigning in this way is exactly the same as the basic function def | |||
add2 x = x + 2 | 14:25 | ||
autrijus | oh also, Alias_, "=" in haskell reads "binds to" | ||
castaway hands around tea and biscuits. | |||
autrijus | it's roughly the same as := | ||
in perl6 | |||
chip | autrijus: If you'll indulge me, what in your Rule modules should I look for as the key difference from stock Parsec? Interface? New concept(s)? | ||
Alias_ | autrijus: I'm sort of getting that | ||
It's a type-less pooled identifier space | |||
autrijus | chip: uhm, from the outside, there's no difference really | 14:26 | |
theorbtwo | Oooh, tea and biscuts! | ||
autrijus | chip: I added the "List" and "Chain" assocs | ||
chip | Alias_: but with packages! foo is Main.foo | ||
autrijus | chip: and there's some code cleanups | ||
shapr | Alias_: cool, I'll add that. thanks for the contribution! | ||
autrijus | uh it's not type-less | ||
chip | autrijus: I haven't read the code yet, thus the "obvious" question; I'm asking for what to look _for_ | ||
autrijus | each identifier has one type | ||
Alias_ | sorry, non-type-split? | ||
autrijus | chip: ok. assume they are identical. | ||
"sigilless" is the term. | 14:27 | ||
Alias_ | in the sense that perl has $foo and @foo and etc | ||
theorbtwo | D'oh! | ||
autrijus | Alias_: do you know that in perl6 you can say | ||
theorbtwo | is foo <- bar in a monad lazy? | ||
That is, will bar never be executed if I never use foo? | |||
autrijus | my %foo is Array; %foo[0] = 1; | ||
theorbtwo: that is mostly the case. | |||
there are exceptions. | |||
theorbtwo | Blast. | ||
Alias_ | autrijus: Yeah, I've been getting some funny smells from certain p6l posts, so it doesn't surprise me too much | 14:28 | |
autrijus | hence my suggestion in using trace() | ||
theorbtwo | That explains it; I'm segfaulting earlier then I thought. | ||
autrijus | which forces strictness. | ||
chip | autrijus: Maybe you could pass it as an argument to a function that declares its parameter with "!" for forced evaluation. I forget what that's called. | ||
autrijus | strictness annotation. | ||
chip | ah | ||
autrijus | the most usual form is $! | ||
Alias_ | autrijus: I'm presuming some form of use strict will stop that from being legal? | ||
autrijus | which evals the rhs and hands it to lhs for apply, just like $ | ||
Alias_: I have no idea. I think that may be intentional. | 14:29 | ||
intentionally legal anyway. | |||
shapr | Alias_: better? | ||
Alias_ looks | |||
shapr | It's exactly what you wrote, so... | ||
Alias_ | whoa... hang on | ||
you added something | |||
shapr | I did? | ||
Alias_ | add2' <--? WTF you didn't mention that before | ||
shapr | huh? | ||
oh | |||
Alias_ | the quote | ||
theorbtwo | ' is a perfectly valid character in identifiers in haskell. | 14:30 | |
(I also find this confusing.) | |||
xerox | autrijus: I didn't understand, is it $! different from $ ? | ||
shapr | right, and it's a commonly used math thingy, a and a' means a and a prime | ||
theorbtwo | xerox: A bare $ is meaningless in perl. | ||
Alias_ | theorbtwo: kinda | ||
xerox | theorbtwo: whoops, perl's $! equals Haskell's $ ? | ||
Alias_ | theorbtwo: The sigil doesn't strictly have to touch the idenfier | 14:31 | |
$ foo is the same as $foo | |||
xerox | I tought you were talking about Haskell's $!. | ||
autrijus | I'm talking about haskell's $! | ||
Prelude> :t ($) | |||
($) :: (a -> b) -> a -> b | |||
Prelude> :t ($!) | |||
($!) :: (a -> b) -> a -> b | |||
see, same type | |||
shapr | Alias_: if you have any other suggestions, I'd like to hear 'em. | ||
xerox | autrijus: yep, different semantics? | 14:32 | |
Alias_ | shapr: So you added ' to make it a different name, but using ' was a convention of familiarity to math'heads? | ||
autrijus | the only difference being that ($!) evaluates the right hand side strictly. | ||
castaway | shapr: Is there an infinite arg function? eg: (defun addall (&rest args) .. ? | ||
autrijus | while ($) does not evaluate right hand side until needed. | ||
Alias_ | shapr: In that case, you could put the add2 x = x + 2 in the comment | ||
shapr | Alias_: I changed to add3 x = x + 3 | ||
Alias_ | better to make it truly identical | ||
autrijus | castaway: yes there is :) | ||
Alias_ | just put it in the comment | ||
shapr | ok | ||
castaway | care to add that, while you're there? | ||
xerox | autrijus: I see, thank you. | ||
autrijus | castaway: see Text.Printf | ||
it needs tricks. | 14:33 | ||
i.e. not "elementary" haskell. | |||
castaway is trying to improve the demo too :) | |||
Alias_ | oh! | ||
shapr | castaway: you can also do sum [1,2,3,4,5] | ||
Alias_ just noticed this page is a wiki | |||
castaway | Alias_: heh, didnt notice? | ||
shapr | Yeah, I'm maintainer of the HaskellWiki too. | ||
It's funny how admin/maintainer so often means "hi-tek janitor" | 14:34 | ||
Alias_ | Can I make minor changes? | ||
shapr | sure | ||
Alias_ | just to presentation really | ||
shapr | it's a wiki | ||
PerlJam hands shapr a broom | |||
Get to work! | |||
;-) | |||
shapr upgrades to broom 2.0 | |||
castaway as yet doesnt even remember what [..] means in haskell | |||
PerlJam | castaway: just like perl IIRC | 14:35 | |
shapr | castaway: in what context? | ||
theorbtwo | Creates a list. | ||
More or less like [] in perl. | |||
castaway | your sum example | ||
shapr | ok, now we have the big guns. | ||
castaway hugs lambdabot | |||
shapr | @plugs [1..5] | 14:36 | |
The plugs command runs a full Haskell subprocess (with IO limitations, of course) and gives the results. | |||
theorbtwo | Odd, shapr, lambdabot just gave the answer to that to me in a /msg. | ||
castaway | PerlJam: that would mean it creates a reference to an anon-array :) | ||
Alias_ | shapr: Damn, it's getting denser :) | ||
shapr | theorbtwo: it's actually, a notice | ||
theorbtwo | Oh. GAIM doesn't handle those well, then. | 14:37 | |
castaway gets it in the channel, in purple | |||
shapr | theorbtwo: The IRC RFC specifies that automated processes should only send via NOTICE because otherwise those same processes might get into a loop. | ||
list via PRIVMSG, send via NOTICE | |||
theorbtwo | Makes some degree of sense. | ||
castaway | so it wont read its own output? | ||
@plus sum [1,2,3,4,5] | 14:38 | ||
shapr | Right, it might get into a loop. | ||
theorbtwo | Most bots I've seen ignore that, though. | ||
castaway | @plugs sum [1,2,3,4,5] | ||
ooh, I can do haskell, me :) | |||
shapr | yay! | ||
castaway | @plugs sum [1..2] | ||
theorbtwo | Is there a way to use lambdabot to do the equiv of :t from ghci? | 14:39 | |
castaway pats lambdabot on the head. | |||
xerox | @type foldr | ||
Alias_ | shapr: You've got a bit of a circular description there, re partial application | ||
theorbtwo | Ah, nifty. | ||
shapr | Alias_: how so? | ||
ninereasons | @plugs product [1,2,3,4] | ||
cool | |||
xerox | @plugs intersperse 'Z' "zzzz" | 14:40 | |
Alias_ | You describe the multi-arg is invoking partials, which I haven't seen, then shows partial using the multi :) | ||
xerox loves intersperse. | |||
Alias_ | s/is/by/ | ||
autrijus notes that lambdabot is much safer than Safe.pm :) | |||
shapr | Alias_: It's difficult to explain one without the other. Can you think of something better? | ||
castaway | what a useful function, xerox ,) | ||
xerox | castaway: it is! :-) | 14:41 | |
Alias_ | shapr: I'll see what I can do | ||
chip | autrijus: sorry to bother you again, but I can't find any definition for ($). Where to look? | ||
shapr | I guess I can just start with multi-arg functions. | ||
autrijus | Alias_: do you have pugs installed? :) | ||
Alias_ | shapr: But I find this idea of partial evaluation built into the language to be quite amazing | ||
autrijus: I have a checkout... but no | |||
shapr | Alias_: yeah, I agree. It r0xx0rs. | ||
Alias_: And it's totally based on lambda calculus. | |||
Alias_ | shapr: Since I've been debating how to do partial evaluation in Perl | 14:42 | |
autrijus | chip: sure. haskell.org/onlinereport/standard-prelude.html | ||
shapr | lambda calculus has a bunch of cool tricks like that. | ||
chip | ah, of course | ||
autrijus | f $ x = f x | ||
Alias_ | shapr: Mainly be using PPI to "read" perl and manipulate the source manually, then eval it :) | ||
shapr: Which would be absolutely insanely evil | |||
s/be/by/ | |||
autrijus | Alias_: there is search.cpan.org/~dconway/Perl6-Curr...urrying.pm | ||
Alias_ | You'll have to escuse my little spelling/grammarisms. I type quickly and have got a little mild ADD/dyslexia | 14:43 | |
autrijus | Alias_: also if you have pugs installed, you can try it out easily :) | ||
pugs> my $add = sub ($x, $y) { $x + $y } | |||
theorbtwo | From the top of my head: sub partial {my ($coderef, @args)=@_; return sub {$coderef->(@args, @_) }} | ||
autrijus | pugs> my $add1 = $add.assuming(1) | ||
pugs> $add1(2) | |||
3 | |||
that's partial application for you. | 14:44 | ||
theorbtwo | This is what I said earlier about building currying off of closures. | ||
shapr | Alias_: It's okay, I have heavy ADHD. I can dig it. | ||
Speaking of which, it's time for more DRUGS! | |||
autrijus | and the perl6 ways is better because you can partially apply $z first for a function that takes $x $y $z | ||
Alias_ | Well it's no wonder Haskell makes for such nice optimising compilers then | ||
wolverian | autrijus: does &add.assuming(1) work? (I don't have a recent pugs due to the new GHC requirement.) | 14:45 | |
autrijus | to do that in haskell using point free style is... an exercise in madness. | ||
shapr | Alias_: just wait till you see monads. They make compilers soooo much easier. | ||
autrijus | wolverian: uhm, what's your platform that prevents you having GHC 6.4? | ||
wolverian: yes it works | |||
Alias_ | You can take things like if ( $os eq 'Win32' ) { and remove it from the functions for the current platform | ||
wolverian | autrijus: it doesn't prevent, I'm just lazy and haven't compiled it myself yet | ||
autrijus | Gruber: welcome aboard! | ||
theorbtwo wonders who Gruber is. | |||
castaway | .. and where | 14:46 | |
Gruber bows | |||
shapr | Anton Berezin? | ||
shapr knots | |||
theorbtwo | Ah, hello, Gruber. | ||
castaway wonders how it knows which param is being assumed | |||
autrijus is proud to have tobez, the BSDPAN czar, on board :) | |||
castaway: always the first. but you can also do | |||
$add.assuming( :y(3) ) | |||
shapr waits for flip | |||
castaway | ah, sneaky | 14:47 | |
Alias_ | shapr: I think the problem with invoking partials in the multi-variable comment is that you insert $difficult topic in the middle of a description of another $difficult concept | ||
autrijus | castaway: it's absolutely crazily nice. | ||
Alias_ | shapr: My head was fully occupied with Integer -> Integer -> Integer and you threw in a wrench | ||
autrijus | nothingmuch++ # implemented it in 3 days with _no_ prior haskell knowledge | ||
castaway | Yeah, that'll get rid of most of the stuff I'd keep global :9 | ||
wow | |||
assuming($dbh) - yay | 14:48 | ||
autrijus | and largely without my help | ||
Alias_ | Haskell will rock for doing platform-adaptive coding | ||
theorbtwo | Note that it just replaces global variables with global functions. | ||
shapr | Alias_: what about moving the partial application explanation down under the multi-arg function, to just before the first demonstration of partial application? | ||
autrijus | theorbtwo: strangely, we find global functions easier to reason about :) | ||
Alias_ | shapr: Yeah, split it in half or something | ||
castaway | you cant have everything.. (anyway whats wrong with global funcs, are we going java-like now?) | ||
autrijus | theorbtwo: partly because you can't assign into a function. | ||
wolverian | hmm. aren't statement modifiers (postfix 'if' and such) macros in perl6? but can they affect the parsing of the RHS? hmm. | 14:49 | |
Alias_ | shapr: If I read the first three lines of the comment 2 or 3 times I "get" it | ||
castaway | assuming("sql is already written") -> false, damn | ||
Alias_ | shapr: It was the last two that screwed me up mid-trying-to-understand | ||
shapr | Alias_: better? | 14:50 | |
autrijus | wolverian: yes. now, try to get macros specced :-( | ||
wolverian: I can fake/improvise lots of missing synopses | |||
but macro I cannot | |||
wolverian | autrijus: eugh. they need the whole parse tree interface. | ||
autrijus | because there's nothing equiv in perl5. | ||
wolverian: we have that. | |||
shapr | y0 metaperl | ||
wolverian | in perl6? | ||
autrijus | oh, you mean we bind Exp as a perl6 structure? | 14:51 | |
Alias_ | shapr: No... I'll show you | ||
autrijus | sure, I can do that if you want | ||
wolverian | that's what I assume larry wants to do | ||
it's also the only way I can see this will work | |||
shapr | Alias_: you want the type sig part up with add, and the two lines of partial app down with partial app itself? | ||
wolverian | but I don't know anything really. | ||
autrijus | sure, but that's the semantics | ||
I also need the syntax. | |||
Alias_ | shapr: Editing it now... | ||
wolverian | yes. that's what I can't provide. :) | ||
autrijus | yeah :) | 14:52 | |
jabbot | pugs - 1558 - This test reads its own source; this be | ||
theorbtwo | Hm, what syntax do you need that's not in the subs Apoc? | ||
ninereasons | autrijus, I still get a seg fault in pugs-i, when I say '?' or ':r' -- well known? | ||
wolverian | hmm, isn't the parse tree just a match object as returned by rules? | ||
autrijus | theorbtwo: how "is parsed" works; also I need a definition for if/elsif/else. | 14:53 | |
wolverian | I would implement if/elsif/else as macros as well | ||
but that needs the former. | |||
autrijus | wolverian: sure. try implementing it, assuming that the Pugs AST in AST.hs (Exp) is the object :) | 14:54 | |
Alias_ | shapr: Done | ||
wolverian | autrijus: hmm. :) | ||
autrijus | I tried and failed to come up with anythiing | ||
but I didn't give it much effort | |||
note to test/example writers: if you want to read from the source file itself, do not use hardcoded pathname | 14:55 | ||
my $fh = open $*PROGRAM_NAME; | |||
# that's the way to go | |||
thanks to Gruber for catching it | |||
wolverian | I really don't have a clue how to do this | ||
autrijus | yeah. but it's the thing that prevents pugs from fully bootstrapping. | ||
fortunately we still has lots of things to do before that. | 14:56 | ||
wolverian | we just need the design team to call in with the macro stuff | ||
autrijus checks for design team presence here | |||
chip? obra? :D | |||
theorbtwo | Hm, L<A06/" is parsed( <rule> )"> looks to have enough information to get started, I think... | ||
Gruber | autrijus: ah, even better! | 14:57 | |
theorbtwo pokes chip on #parrot. | |||
autrijus | theorbtwo: you want to help? :) | ||
the [Update:] that begins with | |||
"The default parse rule probably turns out to be dependent " | |||
theorbtwo | OTOH, the bit spec'd there isn't enough to create non-prefix macros. | 14:58 | |
autrijus | is vague enough that I can't get nontrivial macros to work, let alone the entire Syn category. | ||
Syn here being "special forms" that Pugs currently use for macros. | |||
theorbtwo | spre, you mean? | ||
autrijus | no, Syn | 14:59 | |
see Eval.hs | |||
Syn "if" | |||
Syn "given" | |||
etc. | |||
Alias_ | ew... type stuff bogs me down a bit | ||
autrijus | Alias_: quick, when you see type, think class :) | ||
and when you see class, think roles | |||
wolverian | we need the match object interface, I guess | 15:00 | |
Alias_ | What amazes me the most is that you can make ANYTHING defined in these sorts of terms run on a processor, let alone run fast | ||
wolverian | if we want to be able to modify what has been already parsed | ||
autrijus | wolverian: write tests :) | ||
wolverian | (postfix macros need this, I think) | ||
autrijus: I don't know what the interface should look like. | |||
theorbtwo | We need that anyway, as the sub half of the macro needs to get passed the results of the is parsed half of the macro. | 15:01 | |
autrijus | read up and improvise? post to p6l? | ||
Alias_ | shapr: I think the concept "type" needs to be introduced earlier | ||
wolverian | good point, theorbtwo | ||
Alias_ | shapr: Give me a sec... | ||
I'll edit | |||
wolverian | autrijus: very well. | ||
(post to p6l) | |||
jabbot | pugs - 1559 - * do not hard code filename | 15:02 | |
wolverian | do we need anything else besides the match object? | 15:03 | |
reading S05. | 15:04 | ||
theorbtwo | Perhaps the is parsed half should start where the keywork was seen, as specced outside of the square brackets, and $_ should be the match object of the thus-far bit? | ||
theorbtwo checks the S06. | |||
castaway attempts to persuade gentoo to emerge ghc 6.4, and fails - any ideas? | |||
theorbtwo | Fails how? | 15:05 | |
castaway | it insists on giving me 6.2.2 even tho I set the ~x86 keyword | 15:06 | |
gaal | by the way: | ||
find t -name \*.t | xargs wc -l -> 14174 total | |||
find src -name \*.hs | xargs wc -l -> 10321 total | |||
autrijus | nice. | ||
shapr | Poo, $work calls. Nay, it screams. | 15:09 | |
castaway | Oh.. it has a ghc 6.4 but not a ghc-bin 6.4 ebuild (whatever the difference may be, the first depends upon the second for something) | ||
castaway syncs and crosses her fingers | |||
shapr takes the fun out of work with a defun | |||
PerlJam | shapr: that's always been a problem with LISP-like languages ;) | 15:10 | |
wolverian | I just can't figure out what the parse tree would look like | ||
Alias_ | autrijus: type Name = String | 15:11 | |
just equivalent, or more like transparent subclass? | |||
shapr | equivalent | ||
Alias_ | shapr: Check out the page now | ||
You needed to introduce types a bit earlier, when I was more receptive | 15:12 | ||
castaway | no gentoo users in here? | ||
jabbot | pugs - 1561 - Added tests for pi(), sin(), cos(), tan( | ||
pugs - 1560 - Implemented tan. (Well, I had to add two | |||
Alias_ | I completely skipped over that initial comment about types, because I saw the shiny C< something = 1 > | ||
shapr | Alias_: oh, I like that. | ||
I'd say what we *could* have written. | 15:13 | ||
Alias_ | Very important to introduce ideas one at a time and fully explore each :) | ||
shapr | yeah, I agree. | ||
For the most part, you don't need type signatures. | 15:14 | ||
Alias_ | which was the bit of what you wrote I kept | ||
castaway blinks cos the partial stuff on shapr's page now makes sense :) | |||
Alias_ | But it read as "don't need type signature... huh? don't need them for what?" | ||
Since I hadn't even seen something = 1 yet | |||
shapr | oh I see | 15:15 | |
wolverian | hmm, what primitives can a 'if' macro use? :) | ||
metaperl | hi shapr... on my way to the store and then work... cya in 45mins | ||
shapr | ok | ||
I'll be working in a few minutes, cya tomorra | |||
castaway | later shapr | 15:16 | |
shapr | I really like the way autrijus unified all the other type and function understanding with GADTs in the Person type | ||
I'll add that in a moment of work frustration. | |||
autrijus | :) | ||
Alias_ | shapr: You skip from C< data Temp = Cold | Hot > to Show too quickly | ||
autrijus | GADTs is da way of da future | ||
shapr | Alias_: I appreciate your help on HaskellDemo, and hope you find more to clarify :-) | ||
autrijus: truly, but I had not yet noticed. | |||
Alias_ | shapr: Happy to help as I go | 15:17 | |
shapr | right, I'll be back later | ||
theorbtwo | Hm, from L<A6/Macros>, we've got more then I thought... | ||
iblech | castaway: ghc 6.4 is masked in /usr/portage/profiles/package.mask | ||
castaway | hmm, I cant unmask it in /etc/portage/package.keywords? | 15:18 | |
(cant check now, emerge sync is running) | |||
Alias_ | autrijus: Damn this is amazing dense stuff... cool, but oh so nastily dense | 15:19 | |
even the basic demo | 15:20 | ||
iblech | castaway: Dunno about portage.keywords. ghc-bin is mostly precompiled (took 25min to install), ghc is not (took 2h40min) | 15:21 | |
castaway | package.keywords | ||
ninereasons | ghc-bin must surely be the bootstrap binary? | ||
iblech | right, typo | ||
castaway | presumably | ||
ninereasons | I wonder why the package would require ghc-bin if ghc is already installed? | 15:22 | |
castaway | It isnt | ||
ninereasons | ah - | ||
chip | yo! | ||
autrijus | Alias_: it just require you to newfs your brain a bit | 15:23 | |
theorbtwo | Yo, chip. | ||
autrijus | try find some more unused partition in it -- I hear the fs is 90% unallocated | ||
iblech | ninereasons: ghc requires virtual/ghc, and both ghc and ghc-bin provide virtual/ghc. Now you first need ghc-bin, and then ghc can get compiled. Afterwards, you can unmerge ghc-bin | ||
castaway | ah, sneaky :) | ||
Alias_ | autrijus: I've yet to see anything particularly new... it's just packed into with a high degree of Huffman optimisation | ||
theorbtwo | You guys need to design macros. | ||
autrijus | Alias_: wait till you see monads :) | 15:24 | |
chip | I wish to understand why PIR should have macros. That's what HLLs are for. | ||
castaway drums fingers.. | |||
theorbtwo | I was using "you guys" in a rather large sense. | ||
Alias_ | autirjus: As I said earlier, I have a bad habit of independantly discovering things, only to find out later they have names :) | ||
autrijus | Alias_: MJD said to me that in his Higher Order Perl, the more advanced things are, the more penalty perl5 gives | ||
theorbtwo | IE the p6 cabal. | ||
castaway | Alias_: yeah, sucks dont it :) | ||
autrijus | Alias_: and he could not do monads in p5 reasonably anymore | ||
so monads are not in HOP. | |||
(not to mention arrows or functors) | 15:25 | ||
Alias_ | autrijus: Hell, partial evaluation itself is a bitch in Perl | ||
autrijus | Alias_: true, but it's just verbose | ||
theorbtwo | autrijus: Doesn't that mean that the hufmanization is right? More advanced things should be harder. | ||
castaway | not really, you just wrap a subref around | ||
autrijus | and linearly verbose at that | ||
theorbtwo: sadly, the advanced things are also common things. | |||
Alias_ | autrijus: I wanted to use PPI to find things like $0 eq 'Win32' and convert them into a constant so that the perl tree-pruner would optimise it | ||
theorbtwo | What? I just implemented partial application in less then 128 characters... | ||
autrijus | theorbtwo: huffmanization uses that "uncommon" things needs to be long. | 15:26 | |
Alias_ probably uses the wrong magic var | |||
autrijus | theorbtwo: however, programmers uses recursion etc all the time. | ||
Alias_ | There's way too much OS-specific testing code that isn't compiled away | ||
autrijus | or reduce, or schwartzian transform | ||
chip | I was being paged? | ||
theorbtwo | Alias, $^O. | ||
chip | Was the macro question the reason? | ||
Alias_ | theorbtwo, right | ||
theorbtwo | Aye, chip. | 15:27 | |
autrijus | Alias_: use constant IsWin32 => ($^O eq 'MSWin32') | ||
like that? | |||
Alias_ | autrijus: exactly, but you'd be amazed how much core module don't do that | ||
autrijus | $^O lookup is cheap anyway | ||
unless you are inside a real tight loop | |||
Alias_ | And there any many cases of such | ||
chip | Hm. My part of macros will probably be the AST, but I'm weeks away from being able to work on that. | ||
Alias_ | $^O reduntantly checking OZ millions of times | 15:28 | |
autrijus | chip: let me know when you're able :) | ||
Alias_ | OS | ||
chip | autrijus: you'll be the 2nd to know :) | ||
autrijus | that is, of course, that you actually need that millions of times :) | ||
autrijus raises the benchmark flag | |||
Alias_ | yeah | ||
in any case, I've been thinking about some form of Const module | 15:29 | ||
which just defines the 100 most common useful-as-constant things | |||
castaway looks at the clock | |||
theorbtwo | Hm, I wouldn't think it'd be a horribly difficult thing to make the p5 constant folder aware that $^O is a constant. | ||
Alias_ | theorbtwo: I'm not sure it can fold the equality though | 15:30 | |
cognominal | what is the meaning of "use v6" in pugs programs? Does pug intend to support perl5 with "use v5"? | ||
theorbtwo | Yeah, folding equality is easy. | ||
Alias_ | autrijus: Does it only fold plain booleans? | ||
autrijus | Alias_: it can. | ||
[not|autrijus]~$ perl -MO=Deparse -e '1 eq 1' | |||
'???'; | |||
there you go. | |||
Alias_ | hmm.. | ||
let me check something | |||
theorbtwo | perl -MO=Deparse,-p -e '"x" eq "x" and print "Yep!"' | ||
perl -MO=Deparse,-p -e '"x" eq "y" and print "Yep!"' | 15:31 | ||
autrijus, you can't actually tell in that context; it could have been optimizing that away as don't-care. | |||
cognominal | and why "use v6" and "require Test"; why not "use Test" as well? | ||
theorbtwo | Because 'use' is only implemented for use-version. | 15:32 | |
autrijus | right. | ||
cognominal | can you elaborate? | ||
ok, I got it | |||
theorbtwo | use Test isn't implemented, only use v6. | ||
Alias_ | in any case... there's quite a bit of code that would benefit from $^O being read-only and constant | 15:33 | |
theorbtwo wonders if he should get in the habit of writing "use 5;" at the top of his p5 scripts. | |||
Alias_ | Perl would most certainly get faster for many things | 15:34 | |
and have a lower overhead | |||
rgs | theorbtwo: no, but maybe "no 6" if I get this implemented :) | ||
theorbtwo finds with some amazement that $^O isn't already read-only. | |||
cognominal | ho boy, this is good to read Perl6 code. /me reading Test.pm | ||
Alias_ | theorgtwo: Which is what worries me a little... if it's writable, there may well be a reason | 15:35 | |
theorbtwo | The concept scares me. | ||
Alias_ | theorbtwo: Giving you enough rope, and all that | ||
castaway wanders off home | |||
theorbtwo | Since setting $^O to 'MSWin32' does not cause my machine to reboot, I'd say it's a bug. | ||
rgs | $^O being writable is a feature, iirc | ||
Alias_ | theorbtwo: Use File::Find::PPI and see if anything in CPAN actually modifies it | 15:36 | |
theorbtwo | Sounds like work. I'll let the pumpking handle that. | ||
I just suggest ideas. | |||
iblech | cognominal: You might also want to read some ports of Perl 5 modules to Perl 6 on freepan.org/ | 15:37 | |
pjcj | Windows builds from way back used to claim they were Irix, so setting $^O was very useful then. It's also handy for testing purposes. | ||
Alias_ | Anyways, I'm stuck at data Temp = Cold | Hot | ||
I'll leave it till next time | |||
theorbtwo | Alias, that says that there is a data type named Temp, and that there are two functions that construct it, Cold and Hot. | ||
chip | And you can tell which function constructed it. | ||
Alias_ | So what does type Foo = Bar say? | 15:38 | |
autrijus | type Foo = Bar says that Foo is a synonym to Bar. | ||
"data" vs "type" | |||
Alias_ | wait a sec, Cold and Hot are functions? | ||
autrijus | they are constructor functions. | ||
Alias_ | Why use an uppercase name? | ||
autrijus | because they are not user-defined functions. | ||
and also, because they can be pattern-matched. | |||
Alias_ | I really need to see what how you actually USE data Temp = Hot | Cold, before continuing | 15:39 | |
autrijus | sure. | ||
data Temp = Cold | Hot | |||
mix Cold Hot = "nice and warm" | |||
mix Hot Hot = "boiling, man" | |||
Alias_ | aaaah! | ||
autrijus | mix _ _ = "they do not mix" | ||
Alias_ screams | |||
my head! | |||
autrijus | mix :: Temp -> Temp -> String | 15:40 | |
cognominal | autrijus, I will write in a French mag about pugs in a few month. Can you tell me why you crated #perl6 on freenode? Is the idea similar to Larry infecting shell related newgroup with perl posts? | ||
Alias_ | still explodey | ||
autrijus | cognominal: uh, yes, I think. | ||
Alias_ | More examples needed for basic data Temp in use | 15:41 | |
autrijus | ok... try this | ||
cognominal | autrijus: thx | ||
Alias_ | Tell, See, Do | ||
autrijus | fromCelsius :: Int -> Temp | ||
fromCelsius n | n > 30 = Hot | |||
fromCelsius _ = Cold | |||
Alias_ | Medicine has taught using "Hear it, See it, Do it" forever | ||
autrijus | or, written less fancily | 15:42 | |
Alias_ | So Hot is something like a constructor/constant? | ||
autrijus | fromCelsius n = if n > 30 then Hot else Cold | ||
yes. it is a constructor, and a constant. | |||
Alias_ | That's the bit missing from the examples | ||
autrijus | it has the type | ||
Hot :: Temp | |||
Alias_ | Need it to communicate that "Temp is one of two values" | 15:43 | |
autrijus | actually in GHC 6.4 and above you can say exactly that. | ||
data Temp where | |||
Hot :: Temp | |||
Cold :: Temp | |||
which is crystal clear. | |||
chip | why would you want to? | ||
autrijus | want to say that? | ||
or want to use that notation? | |||
it reads more clear :) | 15:44 | ||
chip | why be able to say "::Foo" when it's redundant? | ||
why add the grammar for it? | |||
autrijus | but more importantly, because that notation lets you say things like: | ||
theorbtwo | Oooh, that syntax is far more clear then the other ways you said it earlier. | ||
autrijus | data Term a where | ||
TrueT :: Term Bool | |||
ZeroT :: Term Int | |||
which Cannot Be Done using the old notation. | 15:45 | ||
Alias_ | autrijus: Time for me to head home. I'll take up this whole demo thing another time | ||
autrijus | Alias_: sure :) | ||
autrijus.org/tmp/old.hs # old, error-prone, impossible to reason about notation | |||
Alias_ | But it's no wonder nobody codes commercially in Haskell :) | ||
autrijus | autrijus.org/tmp/gadt.hs # new, guaranteed correct notation | 15:46 | |
Alias_ | Only technical wizards in places nobody else gets to look | ||
:) | |||
autrijus | Alias_: eh, I do :) | ||
Alias_ | I could never tech this crap to my LUG'mates | ||
It's the sort of language that has a minimum IQ of 120 | |||
ninereasons | I have a friend who programs ATMs and Mil crypto in Haskell | ||
Alias_ | Or you spend a year learning | ||
autrijus notes that Java people say that that about Perl too. | |||
Alias_ | autrijus: Perl is just twisty.. there's nothing there that's particularly twisty | 15:47 | |
errr | |||
hard | |||
autrijus | ah that's because you have learned it :) | ||
Alias_ | regex maybe | ||
regular expressions were the only true "hard" thing, from memory | |||
chip | autrijus: you could do that with named fields in records, I think, but it would be uglier | ||
autrijus | chip: you can't typecheck the named fields. | 15:48 | |
chip: which is the whole point :) | |||
Alias_ | And the initial translation from functions to OO | ||
Odin- | autrijus: Nah. There's different types of people. There's java people, there's perl people, there's haskell people, there's lisp people... ;) | ||
Alias_ | Which just required "Collections of data that know where their functions are without you having to tell them" | ||
autrijus | chip: using the old notation you can write nonsensical things like "Succ TrueT" | 15:49 | |
Alias_ | But regex and pattern'stuff was a very different concept | ||
Alias_ & | |||
autrijus | i.e. "bool::true++" | ||
Alias_ | night | ||
chip | autrijus: named fields have types, though. | ||
<- confused | |||
autrijus | chip: and they are all of the same type. | ||
chip: the point of GADTs is allow each term to carry different type. | |||
chip | I think I see | 15:50 | |
autrijus | the example: | ||
data Term a where | |||
TrueT :: Term Bool | |||
ZeroT :: Term Int | |||
cannot be rewritten using records | |||
data Term | |||
= TrueT { typeOfTerm :: Bool } | |||
| ZeroT { typeOfTerm :: Int } | |||
is invalid. | |||
because all field selectors of the same name needs to have same type. | 15:51 | ||
and that did not let you write | |||
chip | I see | ||
autrijus | eval :: Term a -> a | ||
chip | Is this new syntax standard or just ghc-author-fu? | ||
autrijus | this new syntax is shiny new and specific to ghc. | ||
ninereasons | it won't work in hugs? | 15:52 | |
autrijus | pugs's symbol table type "Pad" and "Symbol" has just been converted to GADT. | ||
ninereasons: not today. eventually in the future | |||
converting them to GADT has raised some subtle bugs :) | 15:53 | ||
I expect more bugs to be uncovered after we go all the way to GADTs. | |||
mm 46 revs today. | 15:55 | ||
autrijus journaling | |||
chip: oh. the point of GADTs is that there is no need to write a "context propagator". | 15:56 | ||
remember how hard it was in perl5? or in languages/perl6/ (P6C in parrot)? | |||
GADTs makes them all _obsolete_ :) | 15:57 | ||
chip | neat | ||
chip fixed a bug in Devel::Profile WRT contexts | |||
autrijus | cool | 15:58 | |
autrijus tries out the new ebug | |||
ninereasons | ebug is very slow, but what a concept! | ||
theorbtwo | ebug? | ||
ninereasons | a new cpan debugger maker | 15:59 | |
autrijus | theorbtwo: search.cpan.org/dist/Devel-ebug/ | ||
one of the fruits generated from YAPC::Taipei hackathon | |||
fueled by bad ideas from lots of people, including yours truly :) | 16:00 | ||
Alias_ | still impressed with it being a web front end | ||
Alias_ leaves really this time | |||
:) | |||
chip | autrijus: now I know I must use ghc 6.4 despite Debian slowness to upgrade, thank you | 16:03 | |
theorbtwo | chip: it's in experimental. | ||
chip | theorbtwo: but trying to install it uninstalls some of the ghc-dependent libraries, whcih means I have to rebuild them myself | 16:04 | |
theorbtwo | Ah. | ||
chip | theorbtwo: but now I know that's worth the trouble | ||
ebug++ # autrijus is a hub of innovation | 16:06 | ||
oh wait, Leon wrote it. leon++ | |||
autrijus | acme++ | 16:07 | |
PerlJam | chip: still acme had to rub up against autrijus for it to happen ;) | 16:08 | |
autrijus | and obra. and beer. :) | ||
beer being perhaps the most imporatnt. | |||
PerlJam | chip: go hang out with those guys. The productivity seems infectous! | ||
ninereasons | I don't really understand String-Koremutake | 16:09 | |
what does ebug use it for? | 16:11 | ||
use it to do? that is | |||
jabbot | pugs - 1562 - Added todo tests for the delete builtin. | 16:12 | |
chip | PerlJam: I'm here, aren't I? :-P | ||
theorbtwo | Hmm, what's the syntax at the top of Eval.hs's reduce: reduce env@Env{ envContext = cxt } exp@(Syn name exps) = case name of... | ||
What's with the @s? | |||
PerlJam | chip: you might need physical contact to catch the disease | 16:13 | |
ninereasons | perl -MString::Koremutake -le 'my $k = String::Koremutake->new(); my $s = $k->integer_to_koremutake(123456789); print $s;' # nugrohigo | 16:14 | |
PerlJam | theorbtwo: I forget what it's called but that's a syntax to make a name that is the whole of the parts. | ||
autrijus | theorbtwo: what PerlJam said | ||
fun arg@(x:xs) = ... | |||
here x is head arg | 16:15 | ||
and xs is tail arg | |||
cognominal | autrijus: what is the GADT ,entionned in your journal? | 16:16 | |
autrijus | cognominal: see the log above :D | 16:18 | |
also compare autrijus.org/tmp/old.hs with autrijus.org/tmp/gadt.hs | |||
ninereasons | i see ... a way to keep secrets | 16:19 | |
PerlJam | secrets? | 16:20 | |
It looks more like a way to eliminate "useless" code :-) | |||
cognominal | stands, for Glasgow Abstract Data Tree? | ||
ninereasons | sorry PerlJam, I'm OT | 16:21 | |
talking to myself | |||
chip | I wonder when autrijus will be visiting $Continent::NA | ||
autrijus | chip: YAPC::NA | ||
cognominal: Generalised Algebraic Data Types | |||
jabbot | pugs - 1563 - removed 2 globals (kind of) and further | 16:22 | |
chip | autrijus: Marvelous! | 16:25 | |
chip will be there too | |||
autrijus | arrive 4 days earlier for our hackathon? | ||
www.nntp.perl.org/group/perl.perl6.compiler/487 | 16:26 | ||
crysflame | "and of course, a lake to put them in" | 16:27 | |
chip | autrijus: I think I cannot resist. The pull is too strong! | 16:28 | |
autrijus | yay! | ||
chip++ | |||
stevan | oooh hackathon for YAPC::NA | 16:31 | |
but wait,.. wont we be finished by then ;) | 16:32 | ||
jabbot | pugs - 1564 - Added tests for pairs and exists on arra | ||
autrijus | stevan: no way ;) | 16:33 | |
stevan | autrijus: should I consider AoH and AoP(airs) as todo or not todo? | 16:37 | |
autrijus | I don't know. I think not todo | 16:41 | |
stevan | ok | ||
jabbot | pugs - 1565 - Added tests for kv, keys, and values (mo | 16:42 | |
Limbic_Region | autrijus - out of curiosity, how long before Apocryphon 2? | 16:43 | |
autrijus | Limbic_Region: 1 week I think | 16:44 | |
now that the conf is over :D | |||
autrijus kept getting drawn into coding | 16:45 | ||
but, sleep first :) journal up. | |||
& | |||
theorbtwo | G'night. | ||
Limbic_Region | Sleep well | ||
stevan | iblech: are you around? | 16:46 | |
Limbic_Region is also wondering about huge jumps in versioning considering things in future versions (by roadmap) are already being implemented | |||
iblech | stevan: Yep | ||
stevan | hey | ||
can we move all those delete, kv, pairs test into like a hashs_and_arrays/ folder? | 16:47 | ||
or maybe I am being over-organized | 16:48 | ||
iblech | Of course | ||
If we don't stay organized, we'll have 100 tests in one directory soon :) | |||
stevan | iblech: cool | ||
stevan likes to use #perl6 as a sanity tester :) | 16:49 | ||
iblech | done as r1568 | 16:51 | |
stevan | iblech: thank you | 16:52 | |
jabbot | pugs - 1568 - Moved some builtin tests concerning both | ||
pugs - 1567 - (whoops forgot to save file before commi | |||
pugs - 1566 - some tests for mixed type multi-dimensio | |||
stevan | iblech++ # for writing soooo many tests and soooo many modules in sooo short a time :) | ||
Limbic_Region | perlbot karma for iblech | ||
perlbot | Karma for iblech: 14 | ||
Limbic_Region | perlbot karma for autrijus | ||
perlbot | Karma for autrijus: 60 | ||
iblech | thanks :) | 16:53 | |
stevan | perlbot highest karma | ||
perlbot | The top 5 karma entries: C: 65, autrijus: 60, nothingmuch: 46, stevan: 38, ~brad2901: 29 | ||
stevan | I think iblech needs to knock brad2901 off the list :) | 16:54 | |
Limbic_Region | and C plus plus too | ||
rgs | C cheats | ||
iblech is writing some more tests then :) | |||
nothingmuch | how the heck do i have that much karma? | 16:55 | |
stevan | C-- is great | ||
nothingmuch++ # for humility | |||
nothingmuch | nono, seriusly | ||
stevan | C-- is my favorite language now | ||
nothingmuch | i was lurking for 2 weeks now | ||
and i get ~10+, i think | |||
stevan | nothingmuch: it's still left over | 16:56 | |
Limbic_Region | nothingmuch, I don't believe perlbot distinguishes between channels | ||
so any karma from #perl applies here | |||
nothingmuch | Limbic_Region: i'm only occasionally on gentoo | ||
and that's it | |||
stevan | perlbot karma for Limbic_Region | ||
perlbot | Karma for Limbic_Region: 1 | ||
stevan | Limbic_Region++ # for slogging through perlmonks, use.perl etc | 16:57 | |
nothingmuch | anyway, this motivates me to try and clear more time for pugs | ||
otherwise i'll feel like a sellout ;-) | |||
Limbic_Region | stevan - I purposely keep my karma neutral, but thanks | ||
Limbic_Region-- | |||
Limbic_Region-- | 16:58 | ||
nothingmuch | you can get the same effect by ++ yourself... much more fun | ||
nothingmuch++ | |||
perlbot | What kind of idiot karmas himself? Your kind of idiot! | ||
Limbic_Region | hmmm - those should have been in /msg's to perlbot - sorry | ||
nothingmuch goes to dinner | 16:59 | ||
castaway wonders if she can crash SEE | |||
putter | filetest operators -d -f currently return bool, rather than the filename, so they dont chain. shall i fix? | 17:11 | |
stevan | pugscode.org <<Overview Journal Logs>> | You have safely opened the door to many Perl 6 hackers. | pugs.kwiki.org | smoke: xrl.us/fmw2 | Mac OS X r1567 (267/3922) | Win2k r1534 (210/3779) | 17:11 | |
stevan | putter: yes please :) | 17:11 | |
rgs | do -f etc accept filehandles ? | 17:12 | |
or only filenames ? | |||
stevan | rgs: good question | ||
Limbic_Region | out of curiosity - does the chaining of -f -d -r etc re-stat the file or use the equivalent of p5's _ ? | ||
putter | :) | ||
stevan | Limbic_Region: good question too | ||
rgs | Limbic_Region: in perl 5.9.2 this doesn't re-stat | 17:13 | |
stevan | hmm, who wants to post to p6l? ( I don't this is addressed in the Synopsis ) | ||
rgs | stevan, about the re-stating ? | ||
stevan | actually rgs's question is probably for p6l and Limbic_Region's is for p6c | ||
rgs | stevan, no, I remember having read that -f $filehandle is legal perl 6 in p6l | 17:14 | |
stevan | rgs: even better (we already know the answer) | ||
Limbic_Region | the cached stat is supposed to be available per file (IIRC), my question was more a matter of does Pugs support that with chained file tests now | 17:15 | |
rgs | and I think that -f -r $foo shouldn't re-stat, since I remember having already asked this question while implementing it in perl 5 | ||
ninereasons | for <1 2 3 4> -> $_ {say $_ } # 1 3 : odd behavior ? (unintended pun) | 17:16 | |
for <1 2 3 4> -> $a {say $a } # 1 2 3 4 : compare | 17:17 | ||
stevan | pugs -e 'for (1, 2, 3, 4) -> $_ {say $_ }' # prints 1 3 as well | 17:18 | |
ninereasons: post a bug to perl6-compiler please | |||
ninereasons | yea. it's the explicit designation of $_ as a topic that does it, I think | ||
Limbic_Region | rgs - dev.perl.org/perl6/doc/design/apo/A03.html | 17:19 | |
it appears that the operators are supposed to be smart enough to return the right thing to avoid the re-stat. If I am reading it correctly | 17:20 | ||
rgs | niiice | ||
Limbic_Region | search for "RFC 290" | ||
rgs | I've seen | ||
larry++ | |||
stevan | putter: feeling adveturous I hope :) | 17:21 | |
putter | Limbic_Region: currently pugs doesnt support chainging at all. or any filetest operators other than -d and -f. my intent is it will shortly support chaining, reflecting whatever the underlying haskell stat-ing is. excess stat avoidance i'll leave until the filetests are more fleshed out. i believe we will also need a filetest builtin. | ||
rgs | there's chaining (-d -r -w) and grouping (-drw) | ||
$handle = open -r -w -x $file or die; | 17:22 | ||
putter | anyone like to create a bunch of tests for t/operators/filetest.t ? | ||
Limbic_Region | putter - thanks - I am an innocent bystander just watching the flow of progress (to be read as I am not involved with pugs development) | 17:23 | |
stevan | iblech: wanna take on putter's request? | ||
stevan has to go set up servers soon | |||
putter | it's _very_ easy to create tests... ok(-r -w 't/operators/file_test_ops.t','-r -w file works'); | 17:24 | |
iblech | hm... such a test is a bit tricky, me thinks, because you've to create files with "unnormal" permissions, and sockets, and that | 17:25 | |
but as putter says, -r and -w should be simple -- will do | |||
stevan | iblech++ | 17:26 | |
putter++ | |||
stevan heads down to the server room | |||
putter | iblech: i check in a revised file_test_ops.t in a moment. (hmm, that should be renamed) | 17:29 | |
iblech: re -r -w, the p5 test file makes interesting reading. suggest using the recent mumble OS = any<mumble> idiom as a guard. | 17:30 | ||
gaal | shapr still around? | 17:31 | |
rgs | iblech: be sure to take the t/op/filetest.t from perl 5.9.2. It tests stacked operators. | ||
gaal | shapr++; # www.haskell.org/hawiki/HaskellDemo | ||
(and anyone else writing there) | |||
jabbot | pugs - 1569 - * Added tests for splice. | 17:32 | |
iblech | rgs: Is there a online svn/cvs repo somewhere? | ||
rgs | iblech: search.cpan.org ? | ||
iblech | rgs: of course, thanks :) | 17:33 | |
brb | 17:35 | ||
putter | anyone object to my renaming t/operators/file_test_ops.t to t/operators/file_test.t? (it uses its own name in the file, so I might as well deal now if this seems worthwhile...) | ||
gaal | putter: go for it | 17:39 | |
putter | its now operators/filetest.t. ill check in a revised version in a few minutes. | 17:45 | |
gaal | cool | ||
nothingmuch | castaway|theorbtwo: is see on woobling at port+2 working? | 17:50 | |
theorbtwo will check. | |||
nothingmuch | anyway, i'm off to a friends to fix his TV | 17:51 | |
gaal | pugs should talk like this, perhaps: www.effect.net.au/lukastan/humour/C...es-Mac.txt | 17:52 | |
theorbtwo | G'luck. | ||
jabbot | pugs - 1570 - renamed file | ||
gaal | is there a technical name for the kind of structure that can contain an XML node? ie something whose content can be thought of as text; or as an array of elements; or sometimes as an ordered hash of elements | 17:58 | |
putter | iblech: this might help... web.mit.edu/ghc/www/libraries/base/...ctory.html | 18:00 | |
castaway | nope, not working nm | ||
jabbot | pugs - 1571 - Added more filetest tests. | 18:12 | |
putter | iblech: beat me to it. looks like you did a superset of my changes (hmm, and nicer style too), so i'm done with filetest.t. | 18:19 | |
iblech | will do some cleanup and, finally, a is_rw.t now | ||
18:25
Aankh|Clone is now known as Aankhen``
|
|||
iblech ~~ off, school tomorrow | 18:26 | ||
jabbot | pugs - 1575 - Some organizational cleanups. | 18:32 | |
pugs - 1574 - Added test for "is rw". | |||
pugs - 1573 - build fix for Eclipse, again | |||
pugs - 1572 - Added tests for stacking/cascading of fi | |||
gaal | anyone with Makefile-fu up? FileSpec isn't being make'd into blib | 19:01 | |
jabbot | pugs - 1576 - restored some forgotten semicolons (on m | 19:12 | |
putter | in haskell, is there a short variable name implying it contains a bool? eg, in scheme, "p". | 19:35 | |
wilx | isSomething? | 19:40 | |
Maybe. | |||
stevan | nothingmuch: ping! | 19:56 | |
19:59
crysflame is now known as krysflame
|
|||
putter | tnx | 20:01 | |
Odin-LAP | ) | 20:22 | |
Bah. | |||
Corion | Oooo. Segfaults have now reached Pugs/Win2k :)) | 20:27 | |
(segfault in operators/arith.t) | |||
... backloggin | |||
pugscode.org <<Overview Journal Logs>> | You have safely opened the door to many Perl 6 hackers. | pugs.kwiki.org | smoke: xrl.us/fmw2 | Mac OS X r1567 (267/3922) | Win2k r1576 (281/4129)+1Unex | 20:30 | ||
Corion | I've patched lots of tests to "if($?OS eq any<MSWin32 mingw cygwin>) {" where they previously used "if $?OS eq 'MSWin32'" - it might be that I broke some tests that way. Gaal - please test the msys stuff (I don't know how unixish it is) | 20:40 | |
... well, I haven't committed yet, and I'm running a local MSWin32 test to verify that the number remains constant before committing :))) | |||
metaperl_ | what is the colon after the parenthesis doing here: | ||
multi sub abs (: Num ?$x = $CALLER::_ ) returns Num | |||
nothingmuch | theorbtwo|castaway: retry see://woobling.org:6944 | 20:49 | |
Corion | Ooo - you got the SEE decoding going ? I need to hook Zaphod up with that :)) | 20:50 | |
gaal | Whoops, Corion, wasn't really here (and going to bed soon) | ||
Corion | gaal: np - I'm going to bed as well - I just wanted to tell everybody that I changed stuff so there is no frantic search in the code when just the tests broke :) | 20:51 | |
gaal | go ahead and commit whenever you want, i'll test it in the morning (or, well, whoever uses msys other than myself) | ||
:) | |||
Corion | Pugs porn was updated at datenzoo.de/pugs/win2k.html | ||
gaal: Ah well - Perl6 should aim for as many platforms as Perl5 already sits on! | |||
jabbot | pugs - 1577 - $?OS eq 'MSWin32' => if($?OS eq any<MSWi | 20:52 | |
gaal | if it works, it'd be a good idea to scan the whole tree for MSWin32 and judiciously apply that idiom | ||
corion, sure. | |||
Corion | gaal: I did just that :) | ||
re :) | 20:53 | ||
I did just that, grep for MSWin32 and then after a quick code scan replaced the code with the junction | |||
... so I might have broken some tests for the platforms that are more unixish | 20:54 | ||
gaal | including outisde t/ that is - though of course, not everywhere. | ||
Corion | gaal: Oh, yes! | 20:55 | |
Aaah - the one unexpected TODO is autrijus fixing "last()" to become "last" - I'll promote that test from TODO to real | |||
HTML test viewer++ | |||
gaal | Corion, consider doing the catalog thingie too so they become cross-referenced | 20:57 | |
Corion | Hmmm. autrijus promised that I was writing a real HTTP proxy, instead of the fakey proxy I've been using to simulate my testing environment. Maybe I should port HTTP::Proxy :) | ||
gaal: "catalog thingie" ? | |||
gaal | nothingmuch.woobling.org/pugs_test_status/ and click on a test | 20:58 | |
created with catalog_tests.jmm.pl | 21:00 | ||
i'm off to sleep now -- see you later! | |||
Corion | Ah, cute! Yeah, I should find out how to do that, and do it as well :) Ah, like that. I'll put that into my smoking batch too. | ||
good night | |||
gaal zzzz | 21:01 | ||
jabbot | pugs - 1578 - Promoted TODO test for 'last;' to real t | 21:02 | |
Corion | Gah. The second I decide to look at a port of HTTP::Proxy, BooK releases a new version with more features :)) | 21:25 | |
(But HTTP::Proxy might actually work without fudging under Win32 if ported to Pugs) | |||
& # zZzzzzZzzz | 21:32 | ||
21:42
krysflame is now known as crysflame
|
|||
crysflame | oo, neat | 21:54 | |
Corion: nice :) | |||
putter | ok, -r -w -x -e are in. sort of. and they chain. but they do multiple stat()s. we have to figure out how we are going to portablably do stat(). wonder what p5 does...? | 22:07 | |
jabbot | pugs - 1579 - added more filetest operators, and they | 22:12 | |
rgs | putter: it's awful | 22:17 | |
putter: see the filetest pragma for example | |||
need to handle acls etc... | |||
in my opinion this will be deferred to parrot at some point | |||
ask chip about that | |||
putter | blech. what a zoo. | 22:20 | |
my fuzzy impression is darcs uses a fake posix to get windows support. perhaps we might snarf it... | 22:21 | ||
rgs: some of the filetests (eg, -s ) probably cant be deferred to parrot, unfortunately. | 22:39 | ||
darcs approach: abridgegame.org/cgi-bin/darcs.cgi/d...c=annotate | 22:41 | ||
Limbic_Region | not sure if autrijus still plays catch up with the log, but www.perlmonks.org/?node_id=445097 is a nice reply in the thread I pointed out earlier showing the impressiveness of Pugs | 22:49 | |
putter | Limbic_Region: :) | 22:54 | |
it looks like pugs on non-posix systems already sheds functionality (eg, sleep)... | 22:58 | ||
jabbot | pugs - 1580 - fixed golf.t typo | 23:02 |