6.2.11 released! | pugs.blogs.com | pugscode.org | pugs.kwiki.org | paste: sial.org/pbot/perl6 | < audreyt> my fingers juxpatosed Set by nothingmuch on 24 February 2006. |
|||
00:32
binary42 joined
00:45
nothingmuch joined
01:06
jiing_ joined
01:12
binary42 joined
01:20
binary42 joined
01:36
FurnaceBoy_ is now known as FurnaceBoy
01:42
whiteg_fi joined,
whiteg_fi left
02:18
nothingmuch joined
02:35
DesreveR joined
03:15
scook0 joined
03:22
FurnaceBoy left
03:32
scw joined
03:41
tmlsd joined
03:49
Qiang joined
03:59
Qiang joined
04:03
tmlsd left
04:06
Limbic_Region joined
04:13
javierza joined
04:16
ayrnieu joined
|
|||
ayrnieu | ?eval loop (my $i = 0; $i < 10; $i++) { say $i } | 04:17 | |
... | 04:18 | ||
also, { chdir $noexist or ... } , { mkdir $noperm or ... } just die in haskell-space. | 04:22 | ||
I guess I need try {} ... | 04:23 | ||
ah, I guess that 'use fatal' is default. (although I can't 'no fatal', here) | 04:24 | ||
splice does not behave like perl5's splice, contrary to documentation. | 04:29 | ||
04:29
Eroick joined
|
|||
Eroick | How is P6 going? | 04:29 | |
Its been a while since I was last around these parts. | 04:30 | ||
ayrnieu | contrast: | ||
pugs -e 'my @a = <5 6 7>; say for splice @a, 0, 1000' | |||
perl -le 'my @a = qw/5 6 7/; print for splice @a, 0, 1000' | |||
eroick - well, I suppose. If you've any specific questions, someone more knowledgeable might come along to answer them. | 04:31 | ||
Eroick | ayrnieu: :)... good point. So, last time I checked, pugs had just come out and everyone was amazed. Is pugs still comming along nicely? What about parrot? | 04:32 | |
04:33
Hamilton joined
|
|||
ayrnieu | people seem pleased with pugs's progress. I recently saw allison express confidence in parrot's imminent maturity. | 04:33 | |
Eroick | is there any more information on when we will see perl6's own compiler come out | 04:36 | |
ayrnieu | the last I heard someone speculate, which may have been a few weeks ago: this year. | ||
my impression is that pugs will compile perl6 to something that runs on parrot, and then self-compilation will happen, and then everyone will be happy and excited :-) | 04:37 | ||
Eroick | i hope so :). I saw something quickly that was new. I believe it was caled ponie and it was a bridge between p5 and 6. | 04:38 | |
am I right? | |||
ayrnieu | I'm not familiar with it. Are you? | ||
Eroick | no | 04:39 | |
ayrnieu | are you right, I mean. | ||
randomly, www.perlmonks.org/?node_id=535873 | |||
04:39
Hamilton joined
|
|||
Eroick | www.poniecode.org/, hey, I was right :) | 04:39 | |
04:39
Hamilton left
|
|||
ayrnieu | the perl6 there is (not very) forward looking, in that it assumes a !broken loop and splice, and incidentally forward looking in that it assumes that perl6 is named 'perl'. | 04:41 | |
Eroick | Im liking this 'everything is an object' idea Ć la ruby. It is one thing that python is really missing. | ||
ayrnieu | I see python as missing other things, but OK. | ||
Eroick | ayrnieu: yes, so do I, but that is one of them. One reason that I prefer ruby over python. | 04:42 | |
ayrnieu | perl6 still has contexts, though, which makes direct ruby comparisons a bit interesting. | ||
but my favorite ruby example, one which I came up all by myself years ago :-) -- class Array; def rand; self[super length]; end end , translates to perl6 as: sub List::rand { @_[rand +@_] } | 04:43 | ||
Eroick | :) | 04:44 | |
ayrnieu | (which, alas, I did not come up with all by myself years ago.) | ||
Eroick | i hope p6 brings more life back to perl. people have been drifting off to other languages. | ||
ayrnieu | *shrug*, perl5 does not seem undead to me. | 04:45 | |
Eroick | its not undead, but it is less lively than it used to be | ||
ayrnieu | and of course people have been drifting off to other languages; it wasn't long ago that there were /no/ comparable languages, and even more recently thas those languages had relatively little going for them. The whole world is more lively, now. | 04:46 | |
Eroick | yep. | ||
but, perl has cpan. the very very large swiss army knife which can do /almost/ anything and is constantly growing :). | 04:47 | ||
ayrnieu | CPAN, yes, and all of the (sometimes human) machinery that CPAN assumes. | ||
Eroick | will parrot run on mac/*nixs/w32? | 04:50 | |
ayrnieu | I'm not familiar with Win32, and 'mac' is now 'unix' for many purposes. | ||
jisom | parrot is cross platform | ||
ayrnieu | will it? Absolutely. Does it? I haven't cared enough about win32. | ||
jisom | it runs on darwin, linux, freebsd, openbsd | 04:51 | |
smoke.parrotcode.org/smoke | |||
those are just reports in the past month | |||
even solaris! | 04:52 | ||
Eroick | school computers run windows. 'nuff said :) | ||
Supaplex | slowaris! | ||
jisom | but, no dos it seems, c'est la vie | ||
Eroick | wow, its a huge high res monitor! too bad it can only display black and white! | ||
ayrnieu | eroick - hm? | ||
Eroick | the old solaris needed very highres monitors to display a console | 04:53 | |
ayrnieu | eroick - how hold? | ||
Eroick | before X. | ||
ayrnieu | how old is that? | ||
Eroick | hm | ||
04:53
hamilton_ joined
|
|||
jisom | isn't x from the 70's or something? | 04:53 | |
ayrnieu | well, that's before Ultra2, which is the only generation I've recent experience of. | ||
jisom | i.e. really really really old | ||
04:54
hamilton_ left
|
|||
Eroick | yes. very old | 04:54 | |
jisom | in computer terms anyway | ||
1950 is ancient | |||
ayrnieu | complaining about unbelievably old Solaris (why even call it 'solaris'?) systems in the context of a casual reference to Solaris is a bit odd. | ||
anyway, I'm more impressed by the HP-UX build -- an OS which its proprietor no longer supports (who tells people to move to linux. See sun.com 'no! come over here!' propaganda ^_^) | 04:56 | ||
Eroick | yes, it is. I just remeber that I knew someone who held on to one and we were playing on it. One insane monitor which could only be used for console, black and white. | ||
jisom | parrot aims to support any platform with ansi c.... | ||
Supaplex | I sold off my hpux box last week | ||
*sniff* | |||
Eroick | i need to install linux on a computer. im thinking of using ubuntu, any suggestions? | 04:57 | |
jisom | although MacOS 9 and below I don't think are used, ever.... | ||
Eroick, www.freebsd.org :) | |||
Eroick | jisom: i never used BSD. want to convince me? :P | 04:58 | |
ayrnieu | eroick - do so? | ||
Eroick | ayrnieu: you like ubuntu? | ||
jisom | decades of development and stability? | ||
ayrnieu | eroick - I don't dislike it, but I also don't use it. I use OpenBSD and Solaris. | 04:59 | |
arcady | ubuntu has a pretty good installer though | ||
jisom | install cd's include gnome and kde, there's a linux compatability layer | ||
you know freebsd will be around in ten years | |||
Eroick | jisom: why? | ||
jisom: and what is the big differance? | |||
arcady | I don't like freebsd for their refusal to support powerpc | 05:00 | |
jisom | ports collection, standard, stable | ||
then netbsd? :-p | |||
I hear it runs on a toaster, although I don't want a toaster with a computer chip | 05:01 | ||
arcady | netbsd runs on everything... | ||
badly | |||
ayrnieu | this in an OpenBSD/macppc system, on a mac mini. | ||
Eroick | OpenBSD vs FreeBSD... is there a big differance? | ||
ayrnieu | arcady - no, it runs well enough on sparc64. | ||
eroick - yes. | |||
jisom | openbsd's focus is security above all else | ||
Eroick | and is it a compile everything type thing, or packaged? | 05:02 | |
ayrnieu | both offer both. | 05:03 | |
jisom | plus you either have to buy an openbsd or create your own iso....it's not too difficult(it's how I installed it)..but they have to make money somehow | ||
ayrnieu | jisom - that is not accurate. | ||
jisom | openbsd doesn't offer iso images | ||
ayrnieu | jisom - again, you are mistaken. | ||
jisom | last I checked, probably about a month ago, there weren't iso images | 05:04 | |
3.8 | |||
ayrnieu | jisom - you checked mistakenly. | ||
arcady | wow, OpenBSD is actually distributed via AFS... | ||
Eroick | hmm. i still am not very sure why BSD varies from Linux (other than the kernel) any recomended reading? | 05:05 | |
ayrnieu | OpenBSD.org does not distribute ISOs which incorporate pre-build packages and the system tarballs. It does, however, distribute perfectly normal ISOs for installation by a number of methods. The simplest way to get both packages and system tarballs and installation ISO on CD is to burn two CDs, although pages exist which explain the more involved process. | ||
arcady | Eroick the userspace is pretty different | ||
jisom | "CD-ROM: Of course, we prefer you use the Official CD-ROM set, but for special needs, you can also make your own." - openbsd.org/faq/faq4.html | ||
arcady | it uses BSD stuff, not GNU stuff | 05:06 | |
ayrnieu | jisom - please stop; you're mistaken. You don't have repeat your mistaken argument. You could have restated it in a way which was not mistaken. | ||
I generally net-install with the given cd*.iso and use the ports system, which (re: ports) I'd do anyway. | 05:07 | ||
Eroick | hm, I have a sandbox computer around here somewhere. | ||
jisom | Eroick, I can tell you for sure it's easy to dual boot openbsd and freebsd.....I just installed openbsd on one partition and freebsd on another and it was instantly dual booting | 05:08 | |
surprised me | 05:09 | ||
Eroick | i think i will install it and try it out. | ||
ayrnieu | That is the best way. | 05:10 | |
jisom | Eroick, since you're not familiar with bsd's, I don't recommend installing openbsd because it's installer isn't for beginners | ||
at least not at first | |||
Eroick | jisom: well, I have installed debian(s), gentoo, and some GUI stuff | 05:11 | |
05:11
f0rth joined
|
|||
rantanplan_ | Hehe. But you can read the manpage of the install tools while installing. :). | 05:11 | |
ayrnieu | amusingly, I think most highly of OpenBSD's installer, of all the Linux and BSD installers I've used. | ||
jisom | ayrnieu, it can be daunting, and when key lines of help text disappeared off my screen | ||
it's an expert installer more than a beginner installer | 05:12 | ||
ayrnieu | *shrug*, when I was a beginner (only redhad and (many-floppies-of:) slackware under my belt), I accidently had a very good experience with OpenBSD :-) | 05:13 | |
05:13
coumbes joined
|
|||
ayrnieu | anyway, ubuntu is probably also fine. | 05:14 | |
Eroick | heh, i have installed slack on a cd-drive-less computer | ||
jisom | eh, I had trouble partitioning the disk to allow dual boot, it didn't seem to want to let me format to split the hard drive and ignore the others.....but was able to partition in freebsd and then install openbsd | ||
arcady | I remember installing slackware before I had internet access | ||
many floppies that someone else had to make for me | |||
ayrnieu | jisom - ah. I've never bothered with dual booting. | 05:15 | |
jisom | I use it mainly just to build and test parrot... | ||
Eroick | does NDISwrapper work on FreeBSD? I need that | ||
jisom | what is it? | ||
arcady | probably not | ||
it's a hack to let linux use windows drivers | |||
ayrnieu | eroick - why do you need it? | 05:16 | |
Eroick | a linux module that lets you use wifi cards for windows only on linux | ||
arcady | OpenBSD does claim to support rtl8180 cards | ||
jisom | the card may be supported by freebsd perhaps | ||
Eroick | ayrnieu: i have a USB wifi card | ||
ayrnieu | eroick - so do I, but mine doesn't need a windows driver. | ||
Eroick | netgear wg111 | ||
ayrnieu | It helps to look at 'supported hardware' lists before buying things :-) | ||
arcady | problem is, they don't tell you what's actually inside the card | 05:17 | |
jisom | silicon? :-p | ||
arcady | you know, like FooBaz Brand 5530 Ethernet Card | ||
could actually be 2 or 3 entirely unrelated products | 05:18 | ||
with completely different chips inside | |||
Eroick | prism chip inside | ||
ayrnieu | in any case, it doesn't seem that anybody knows about NDISwrapper. #FreeBSD or a similar channel may help. I'd suggest supported hardware. | ||
arcady | I am about 90% sure that NDISwrapper is a linux only thing | 05:20 | |
jisom | freebsd 6.0 does have an ndis driver... | 05:22 | |
www.FreeBSD.org/cgi/man.cgi?query=n....0-RELEASE | |||
Supaplex | ndis is hacktackular :) | 05:23 | |
05:40
K joined
05:59
jisom joined
06:03
binary42 joined
06:22
szabgab left
|
|||
audreyt praises freebsd-ndis (otherwise she wouldn't be using internet now) | 06:40 | ||
Kattana praises your inexorable effort | 06:56 | ||
audreyt | for setting NDIS up? | 07:06 | |
yeah, that took a while ;) | |||
jisom | have you backed up the work? | 07:07 | |
audreyt | jisom: hm? | ||
jisom | for getting ndis working for you | 07:08 | |
audreyt | er no, I just kept chasing kernel cvsups until I hit a level that has a good version of ndis -- and then save if_ndis.ko | 07:09 | |
and has been using it since | |||
though recently if_iwi begins to work too | |||
(but is 11b-only) | |||
jisom | whatever works | 07:10 | |
audreyt | (and crashes when the network drop+reconnects) | ||
(but otherwise works fine ;)) | |||
jisom | eh, how's an isp that disconnects after nine hours? | ||
ayrnieu | hash context is hard. | 07:11 | |
audreyt | jisom: very bad? | ||
jisom | extremely annoying | ||
audreyt | ayrnieu: container contexts are in general difficult to reason... | 07:12 | |
ayrnieu | even 'my %a = %a.reverse' takes List::reverse | ||
audreyt | ?eval method Hash::reverse (Hash %x is rw) { ()} my %a = (:x); %a.reverse | 07:14 | |
ayrnieu | evalbot died a little while ago, when I asked it to splice something. | 07:15 | |
audreyt | how sad. resummoning. | ||
ayrnieu | ah, no, when I asked it to loop. ?eval loop (my $i = 0; $i < 10; $i++) { say $i } | 07:16 | |
07:16
kisu joined
|
|||
audreyt | fglock et al: I found the perfect solution to the p6-compiled-to-p5 file extension game! | 07:17 | |
perl6 modules should be .pm | |||
starting with "use v6-pugs;" | |||
the compiled perl5 code should live in the same filename | |||
with a .pmc extension | |||
with pure perl5 in it | |||
and lo and behold, perl5 will load the .pmc before .pm. | |||
("perldoc -f require" for the spec) | |||
it'd be v6.pm's duty to write the .pmc file. | 07:18 | ||
isn't that handy? :) | |||
jisom | confusing if you work with parrot and it's .pmc files | ||
audreyt | perl5's .pmc predates parrot, though. | ||
jisom | yeah | ||
07:19
Limbic_Region joined
|
|||
jisom | I think it's mentioned once in one of the pods, and it surprised me when I first tried parrot that it used .pmc | 07:19 | |
07:19
Qiang-zh joined
|
|||
Qiang-zh | ping audreyt | 07:20 | |
audreyt | Qiang-zh: pong | ||
Qiang-zh | hey, you are back to tw now ? | ||
audreyt | no, still in .at | ||
Qiang-zh | oh, you think you can passby beijing while you heading back for osdc tw? :) | 07:21 | |
audreyt | well, I need to visit .jp first | ||
what's the occasion in .cn? | |||
Qiang-zh | we are preparing a Perl conference in beijing 25th this month. | 07:22 | |
audreyt | oh... YAPC::Asia is 29th | ||
and I'd need to arrive by 27th I think | |||
Qiang-zh | hehe. yeah. i had the feeling that you have a tough schedule. | 07:23 | |
audreyt | indeed... any details on the conference? url? | ||
Qiang-zh | no biggie. just thought i would ask anyway. | ||
audreyt | (it's just two weeks away) | ||
Qiang-zh | here. xrl.us/kdg9 | ||
i wasn't going to ask you knowingly that you have so many conf to go. but chunzi is asking about you so i am giving it a try :) | 07:24 | ||
svnbot6 | r9402 | audreyt++ | * move Rule.p6 to the real Rule.pm. | 07:25 | |
audreyt | Qiang-zh: ok... then I probably couldn't make it. :/ perhaps if you asked a bit earlier.. | ||
Qiang-zh | audreyt: yeah. no problem. my bad that i didn't ask you earlier. well. untill YAPC::China :-) | ||
audreyt | indeed :D | 07:26 | |
07:26
evalbot_9401 joined
|
|||
arcady | ?eval loop (my $i = 0; $i < 10; $i++) { say $i } | 07:33 | |
07:33
evalbot_9401 is now known as evalbot_9402
|
|||
evalbot_9402 | Error: No such method in class Any: "&my" | 07:33 | |
arcady | well at least it doesn't crash | ||
ayrnieu | ?eval my @a = <a b c>; splice @a, 0, 1000 | 07:34 | |
evalbot_9402 | undef | ||
07:35
xinming joined
07:36
Barry joined
|
|||
Barry | Anyone know of an open source programmer's editor written in Perl besides open Perl IDE? | 07:38 | |
arcady | I recommend you write one | ||
in perl 6 | |||
: ) | |||
Barry | Ok. Give me a couple of hours. | ||
arcady | actually, does perl 6 have any GUI bindings yet? | 07:39 | |
Supaplex moans | |||
Barry | Why is *** moaning? | 07:40 | |
Supaplex | wth is *** suppose to mean | 07:41 | |
Barry | Probably something dirty, but you're apparently done. | ||
audreyt | Barry: EPIC allows pure-perl plugins | 07:42 | |
Barry | I've looked at EPIC...don't remember anything. Better look again. | 07:43 | |
Supaplex | instant perl editor: perl -e 'exec($ENV{EDITOR}||"vim",@ARGV)' | 07:44 | |
arcady | or pugs -e 'exec(%ENV<EDITOR>||"vim",@*ARGV)' for that matter | 07:48 | |
07:50
ghenry joined
|
|||
Barry | $695 for Epic...maybe I was thinking of Eclipse. | 07:50 | |
audreyt | I mean epic.sf.net. | 07:51 | |
I mean | |||
e-p-i-c.sf.net | |||
ayrnieu | class Buffer { has $.before; has $.after; method insert (Str $s) { $.before ~= $s }; method move_cursor (Int $i where $i < $.before.chars) { $.after = $.before.substr($i); $.before .= sustr($i) }; method move_cursor (Int $i where $i > $.before.chars) { $.before ~= $.after.substr(0,$i); $.after .= substr($i) }; method move_cursor (Int $i where $i == $.before.chars) {} } # mumble mumble mumble | ||
audreyt | ~V~ | 07:52 | |
# nullary hand-wavy operator | |||
07:53
pmurias joined
|
|||
Barry | Yeah, I though it was an Eclipse thing. I'm looking for something that could use a graphical, web based diff plug-in. Eclipse has a lot of stuff, but I'll see. | 07:53 | |
ayrnieu | multi method | ||
Eclipse is good because Java is bad. | 07:54 | ||
arcady | and how do you figure that one? | 07:55 | |
ayrnieu | yow, was that a controversial assertion? | 07:56 | |
arcady | i mean, how does one follow from the other? | ||
with the little I've seen of it, I don't really like eclipse as a text editor | 07:57 | ||
audreyt | it's probably not designed as a text editor | ||
ayrnieu | It's designed as something that makes Java feel less verbose. | 07:58 | |
So I imagine that it has all kinds of features, like autocompletion and introspection and refactoring wizards and code folding, to support this simple aim. | |||
arcady | yeah | ||
which are great and all | 07:59 | ||
but make it rather slow when all you want to do is write some java code | |||
ayrnieu | which are great and all in context of mindflaying verboseness. | ||
but I'm neither a Java programmer nor an Eclispe user, and but the bearer of truisms, so you should ask #java for more propaganda. | 08:00 | ||
oh, and Eclipse probably manages to write a surprising amount of code by itself. | 08:01 | ||
Barry | ...works up the courage to double click his Eclipse icon... | ||
ayrnieu | You can't have succint accessors, but you can generate comb-code very easily. | ||
arcady | so basically you end up programming in eclipse, rather than in java | 08:02 | |
thus saving a bit of time | |||
and demonstrating that Java really wasn't meant for human consumption | |||
I wonder if it puts in exception declarations for you | |||
ayrnieu | oh, it'd have to. | ||
Barry | I think Java was meant for human consumption and Perl was meant for programmer consumption. | 08:03 | |
arcady | that was probably the thing that annoyed me most about java | ||
no, i think java was not actually designed with users in mind | |||
ayrnieu | I think more of humans, Barry. | ||
so, unstated XML analogy complete. | 08:04 | ||
08:04
kanru joined
|
|||
arcady | ah yes, "human" "readable" | 08:05 | |
Barry | In the last Java discussion I heard, it sounded like Java is for businesses that want to play it safe, but it's not very flexible. | ||
arcady | well, businesses use it because they see other businesses using it | ||
svnbot6 | r9403 | audreyt++ | * p6prelude.p6: parse "use v6-pugs;". | 08:06 | |
r9403 | audreyt++ | * p6compiler.pl: all diagnostics messages go to STDERR. | |||
arcady | and it's not like java doesn't have its benefits | ||
ayrnieu | arcady - Java programmers, mainly. | ||
Barry | I just wish I had learned Java in high school instead of BASIC, and that Java was built into computers like the C-64. I'd have a bit more useful knowledge today. | 08:07 | |
ayrnieu | It's not kind to wish hardship upon your past selves, Barry. | 08:08 | |
arcady | I think the industry needs to standardize on a better language | 08:09 | |
like, say, intercal | |||
ayrnieu | Java is not worse than intercal. | ||
arcady | I know | 08:10 | |
but it would be amusing if people were convinced to use intercal anyway | |||
arcady goes to have some tea | 08:15 | ||
svnbot6 | r9404 | audreyt++ | * Pugs.Parser: parse for the magickal "use v6-pugs;" form. | 08:21 | |
Barry | I opened Eclipse 2.1 after years of disuse, did an update check, and it found none, but said my preferences affect that. Couldn't find preferences, so I clicked help and Windows said Java 2 Standard Edition Binary is blocked. I chose not to unblock it. Maybe I'll uninstall Eclipse and install the latest version. | ||
ayrnieu | blocked? | ||
Barry | Yeah. Maybe I have an updated version? | 08:22 | |
svnbot6 | r9405 | audreyt++ | * Pugs::Grammar::Rule - switch to 'use v6-pugs' for it; simplify .pmc generation. | ||
ayrnieu | I mean, what does it mean when windows 'blocks' something? | ||
Barry | I assumed it's not safe. That big Windows service pack update prompt you like that foe some things. | 08:23 | |
svnbot6 | r9406 | audreyt++ | * rename the directory Pugs-Compiler-Rule to Pugs-Grammar-Rule to agree | ||
r9406 | audreyt++ | with the module. | |||
Barry | If I get the prompt after installing Eclipse again, I'll unblock it. | 08:24 | |
svnbot6 | r9407 | audreyt++ | * Pugs::Grammar::Rule: add the generated Rule.pmc. | 08:26 | |
Barry | But Eclipse is meant for real programmers, and the plugin I'm looking to add to something isn't that powerful, so I better look for a less technicall editor. Like for HTML. | 08:28 | |
Something between Epic and TinyMCE. | 08:29 | ||
ayrnieu | On windows, you should probably consider Emacs or possibly UltraEdit. Unless you'd like to start by writing one. | 08:31 | |
Barry | And written in Perl, and good, with good documentation. Emacs has everything, doesn't it? My plugin is a graphical diff tool. Emacs is also too good for my plugin. Maybe UltraEdit. | 08:32 | |
I'm sure I won't find exactly what I want, but that never stops me from trying. | |||
svnbot6 | r9408 | audreyt++ | * some POD sections for Pugs::Grammar::Rule | 08:33 | |
Barry | Doesn't have to be for windows. I have access to a Unix server, from my website. | 08:34 | |
gaal | morning | 08:36 | |
08:36
iblechbot joined
08:37
mtve joined
|
|||
audreyt | gaal: hey | 08:38 | |
svnbot6 | r9409 | audreyt++ | * prepare to reorg Pugs::*::Rule for release | 08:39 | |
gaal | lots of backlogging for very short time :) | ||
Barry | Can't believe I've been here for an hour already. | 08:41 | |
08:41
kane_ joined
|
|||
svnbot6 | r9410 | audreyt++ | * move the iterator engine to Pugs::Runtime::Rule | 08:45 | |
r9411 | audreyt++ | * stubs: Pugs::Compiler::Rule, Pugs::Emitter::Rule::Perl5 | |||
pmurias | Barry: what do you need the editor for? | ||
svnbot6 | r9412 | audreyt++ | * rename Pugs-Grammar-Rule back to Pugs-Compiler-Rule. | 08:47 | |
r9412 | audreyt++ | yes, I'm practicing the art of changing-my-mind-faster-than-larry. | |||
Barry | I created a web-based graphical diff application that I want to turn into a plugin for something. A remote plugin...it will run from my server, so the tool it's plugged into has to be used with an internet connection. I like to be different. | ||
gaal | do we have the beginning of grammars for Perl 6? Apart from Rules themselves? | 08:48 | |
audreyt | Pugs::Grammar::Perl6 | ||
gaal: a very primitive beginning at misc/pX/Common/lrep/p6prelude.p6 | |||
08:49
tcliou joined
|
|||
pmurias | Barry: try vim it supports perl plugins(and python and ruby ones) | 08:49 | |
audreyt | Barry: got a demo somewhere? | ||
Barry | I'd love to do it for Vim. I was scared that there's something better for Vim, but I'll look into it. | ||
audreyt: www.polisource.com/diffnote | 08:50 | ||
pmurias | if you want it fit for a statisitc win32-er you can turn the modality of in vim | 08:51 | |
gaal | audreyt: thanks | 08:53 | |
Barry | I installed gVim (graphical) a couple of years ago. I'll dust it off. I still use Windows Word Pad. Never felt like learning anything fancier. | ||
ayrnieu | vim also supports tcl extensions, or used to. | ||
gaal | is Pugs::Grammar::Perl6 in the source tree? where does it live? | 08:56 | |
pmurias | any one here using the wmii window manager(www.wmii.de) ? | ||
audreyt | gaal: it lives in the future where the Common/lrep/ things are moved into perl5/ | 08:57 | |
svnbot6 | r9413 | audreyt++ | * chase the name change of Pugs::Runtime::Rule. | ||
audreyt | gaal: for example, perl5/Pugs-Compiler-Perl6 | ||
ayrnieu | pmurias - no, but why? | 08:58 | |
audreyt | gaal: but I'm getting the Rules part factored out and released first | ||
gaal | gotcha | 09:00 | |
pmurias | just wanted to mention it as a counter balance to Word Pad, it would be cool to be able to extend it with perl6 | ||
though | |||
ayrnieu | ah. | ||
audreyt | gaal: I'm thinking that the v6-pugs pragma can be the catalyst of piecemeal migration | 09:01 | |
gaal: i.e. we should work on rationalizing VCode and Pad structure etc | |||
and for Emit.Perl5 to output perl5 code (at this time more complete than the primitive lrep-based grammar) | |||
so that we can write more complex parsing logic inside {return...} blocks for Pugs::Compiler::Perl6 (in perl6) | 09:02 | ||
and let v6.pm invoke pugs.exe to compile it to Perl6.pmc | |||
until a day where it can parse itself | |||
then let v6.pm switch to that | |||
and all code will remain working as-is | 09:03 | ||
meanwhile, make a DrIFT.Perl6Class or something like that | |||
to convert Hs data structures verbatim into p6 land | 09:04 | ||
gaal | I have to learn to use these new tools... /me goes to follow fglock++'s email to p6-l | ||
audreyt | and as such the yaml dump of intermediate structures (parse tree, objs) etc | ||
can be shared among p5/p6/hs/pir/whatever lands | |||
end of digression. back to coding | |||
gaal | oh, that should be relatively straightforward (I think?) | ||
audreyt | yup | 09:05 | |
for someone who knows how to use DrIFT, that is | |||
:) | |||
miyagawa | hi audreyt | ||
audreyt | hi miyagawa-san! | ||
miyagawa | helllllo | ||
did you sort out the accommodation stuff for YAPC? :) | |||
audreyt | miyagawa: looking at shigetsu now | 09:07 | |
miyagawa | oh, okay | ||
audreyt | still a bit expensive :/ | 09:08 | |
miyagawa | right :/ | 09:09 | |
audreyt | so I think still Dan's | ||
miyagawa | ok | 09:10 | |
er, Japanese Sutie Y 26k | 09:11 | ||
that's expensive | |||
audreyt wonders if "use v6-pugs;" will be ready in time for YAPC::Asia | 09:12 | ||
09:29
tuxxboxx joined
09:30
xinming joined
09:51
Barry left
09:54
nothingmuch joined
10:00
tuxxboxx joined
|
|||
arcady | wow, what exactly is misc/pX/Common/lrep/p6object_space.p6 supposed to be? | 10:01 | |
wishful thinking that someone will come along and fill it in? | 10:02 | ||
10:04
tuxxboxx joined
|
|||
audreyt | arcady: yeah, mostly a hint for stevan et al to fill in, iirc | 10:06 | |
brb | |||
10:16
turrepurre joined
10:37
larsen joined
10:43
iblechbot joined
10:45
tuxxboxx joined
10:50
ruoso joined
10:57
elmex joined
11:07
clkao joined
11:16
hlen joined
|
|||
ruoso wonders if there is a xemacs init file for the code standards in pugs... | 11:17 | ||
11:24
Aankhen`` joined
|
|||
svnbot6 | r9414 | ruoso++ | now support reading a file from STDIN | 11:37 | |
ruoso now working on how p6compiler.p6 would looks like | 11:39 | ||
11:43
chris2 joined
|
|||
ruoso will use a trick to bootstrap p6compiler.p6. Will use as many p5 modules as possible. So they can be rewritten in perl6 later. | 11:49 | ||
audreyt | yes! | 11:50 | |
pull in the whole CPAN! | |||
(that way we will collect those module's authors as new pokemons) | 11:51 | ||
I mean committers | |||
ruoso | audreyt, I'll use IO::File, so there will be no need to implement the rules for open or anything... | 11:54 | |
audreyt | nod | 11:55 | |
ruoso | audreyt, what do you think? | 11:56 | |
audreyt | I think the more cpan modules the merrier | ||
ruoso | :) | 11:57 | |
gaal | DrIFT.Perl6Class - representation of e.g. our ASTs? Is there a good way to represent Hs tagged unions in p6? | 12:02 | |
integral | ["tag", $data]; given $foo.[0] { when "tag1" { ... } when "tag2" { ... } } | 12:03 | |
audreyt | gaal: case classes | ||
12:04
TimToady joined
|
|||
gaal wants a way to patmatch those | 12:04 | ||
audreyt | gaal: S06 gives you a way. | ||
using :() in rules | |||
as well as multis | |||
gaal: VInt VStr are classes; they all "does Val" | |||
Val in turn does Exp | |||
pmurias | ruso: if you need any help in convincing fglock to increase the dependency could I'll be back in ~15min | 12:05 | |
:) | |||
audreyt | gaal: basically: make constructor into classes, and make types into roles | ||
gaal | that'd work, but it looks a little bass awkward | ||
audreyt | how so? surely VInt can become a Val? | 12:06 | |
gaal | since in Hs a data type doesn't have to know some *other* type has it in a variant | ||
audreyt | er no, sorry for the punning | ||
data Moose = M Oo | S Ee | 12:07 | ||
M and S are classes; Moose is role | |||
Oo and Ee has no knowledge of anything. | |||
gaal | okay, how do you represent | ||
data Alces = Moose Moose {- depun -} | Caribou Caribou | 12:08 | ||
audreyt | we use role/class duality | ||
nothingmuch bangs head on table | |||
gaal | read "Exp" for Alces and "Val" for Moose | ||
audreyt | Moose is now a class that can construct anything that does Moose into somthing that does Alces. | 12:09 | |
nothingmuch | wrapper mc parsec represents class | ||
gaal | nothingmuch: MC really stands for Moose Caribou | ||
nothingmuch | www.seeklyrics.com/lyrics/Lil-Jon/P...Remix.html | ||
there's lots of representation in there | 12:10 | ||
12:10
TimToady joined
|
|||
nothingmuch | (googled for 'yo represent' ;-) | 12:10 | |
nothingmuch goes back to fixing his address book | |||
gaal | so are we going to rap in YAPC::NA or what? | ||
nothingmuch | moral of this weekend: nnever EVER EVER EVER use a "cool" address book interface without first backing your address book up | ||
gaal | moral, golfed: 'grep'. | 12:11 | |
audreyt: so, data constructors are factory methods in a Role? | 12:12 | ||
(is dev.perl.org/perl6/doc/design/syn/S06.html up to date or should I always use the svn version?) | 12:13 | ||
audreyt | gaal: factory methods in a design | ||
s/design/class/ | |||
or rather, actually, just classes with infix:<as> | |||
remember that | |||
Foo(1,2,3) | |||
is | |||
infix:<as>(\(1,2,3), ::Foo) | 12:14 | ||
i.e. the same as | |||
(1,2,3) as Foo | 12:15 | ||
12:16
DesreveR is now known as r0nny
|
|||
gaal | whoa. that's pretty deep | 12:16 | |
ruoso | is "$arg1 = shift;" still a valid way of getting the command line arguments? | ||
gaal | ruoso: look in @*ARGS | 12:17 | |
audreyt | unspecced, so currently not | ||
gaal | ruoso: there's a Getopt::Std module in ext/ you can use for basic stuff. | 12:18 | |
migo and ran are working on a much better thing | |||
audreyt: so basically, (1, 2, 3) would have been Foo automatically if we had an inferencer; since we don't, we need to coerce manually | 12:20 | ||
? | |||
(there's a missing application there) | |||
ruoso | gaal, I'll leave that to a second moment, for now I'll receive "inputfile" "outputfile" as parameters | ||
audreyt | gaal: no, Foo(1,2,3) is just a call to &Foo | 12:21 | |
gaal: it's just "class Foo" defines a ::Foo _and_ a &Foo | |||
&Foo handles coercion toward Foo | |||
in fact, maybe the default infix<as> will fallback to that. | |||
gaal | ruoso: sure, all I'm saying is that FWIW, you can have -i and -o too if you like. | ||
ruoso: not really advocating that :) | |||
audreyt | class Val { multi infix:<as> (VInt, Val) { ... } } | 12:22 | |
this may be generated as a factory | |||
from DrIFT, or from p6land | |||
ruoso | gaal, I will, just not right now... | 12:23 | |
gaal | the content of that multi being new :tag<VInt> | 12:24 | |
oops | |||
new(:tag<VInt> :VInt<$x>)? | 12:25 | ||
or whatever representation we use? | |||
audreyt | yah. | 12:27 | |
gaal | what representation lends itself to pattern matching a la integral's [$tag, $data] example above? | 12:29 | |
has $tag; has $data; # and has nothing else? | 12:31 | ||
audreyt | thinking | 12:32 | |
12:32
kane_ joined
|
|||
audreyt | I think it should be arglists all the way down | 12:33 | |
that is | |||
pmurias | is xgrammar2p6 for a tool that converts the xquery grammar from xml to p6? | 12:34 | |
audreyt | data T = Nul | Pos A B | Rec { l1 :: X, l2 :: Y } | ||
pmurias | s/6 f/6 a good name f/ | 12:35 | |
audreyt | Rec(l1=>$x, l2=>$y) should just preserve the arglist | ||
into "has X $.l1, has Y $.l2" | 12:36 | ||
which can be matched using | |||
multi f (Rec $r ( $l1, $l2 )) {} | 12:37 | ||
12:37
ruz joined
|
|||
audreyt | see "Unpacking tree node parameters" | 12:37 | |
S06 | |||
gaal | okay. do we have fancy arglists in pugs already? | ||
audreyt | no. but this will be a great motivation to hack them in. | ||
gaal | ( | ||
("Argument list binding") | 12:38 | ||
k | |||
audreyt | you can start by modelling it as Hs data structures :) | ||
now for Pos, we can settle on traditional numbering | |||
$a $b $c $d | |||
and match them likewise | |||
gaal | how do you model Nul? dummy var? | ||
s/model/match | 12:39 | ||
svnbot6 | r9415 | pmurias++ | a tool to convert the xquery grammar to p6 | 12:40 | |
12:41
iblechbot joined
|
|||
audreyt | class Nul {} | 12:42 | |
multi f (Nul) {} | |||
will do | |||
multi f (Rec ($l1, $l2)) {} | |||
multi f (Pos ($a, $b)) {} | |||
er I mean | 12:43 | ||
mulfi f (Rec:($l1, $l2)) {} | |||
(because we omit $r) | |||
gaal | class Nul does T | ||
audreyt | yup | 12:44 | |
gaal | class T does what? | ||
audreyt | T is not a constructor | ||
hence not a class | |||
gaal | HsishClass? | ||
audreyt | it's just dummy role | ||
role T {} | |||
gaal | Role T is Hsish | ||
audreyt | yeah | ||
gaal | is TaggedUnion or something | ||
audreyt | right. but we don't need them at the moment | 12:45 | |
if the type names are not conflicting, we can pun | |||
class Pos { has $.a; has $.b } | 12:46 | ||
class Pos { has A $.a; has B $.b } | |||
if there are two As | |||
class Pos { has A $.a1; has A $.a2 } | |||
perhaps. | |||
makes sense? | 12:47 | ||
gaal | uh, where's the pun here? | ||
audreyt | data T = Con Int Int String Val | 12:48 | |
class Con { has Int $.int1; has Int $.int2; has String $.string; has Val $.val } | 12:49 | ||
that's the pun | |||
not sure if it works better than $.a $.b etc in practice or not. | |||
or even $.0 $.1. | |||
gaal | ah, okay | ||
audreyt | has Int $.0; # now that's a charming thought | ||
gaal | it's less confusing than the Hs puns | ||
sufficiently less confusing that I was confused about where the pun was :) | 12:50 | ||
audreyt | :D | ||
I take that as a compliment | |||
gaal | drafting up a simple transliteration of Exp | 12:51 | |
audreyt | gaal++ | 12:52 | |
I think modeling the core structures in Hs for the short term is still going to be a win | |||
over modeling it in p5 | |||
and as such making Hs as the upstream and simply carrying the modelled result to p6/p5/pir would be a win indeed | |||
gaal | I forget, do we have nullable types? | 12:53 | |
(Maybe Exp) => ? | |||
audreyt | in p6 everything is nullable | 12:54 | |
so we are forced to do | |||
class Just { has Any $.a } | 12:55 | ||
class Nothing {} | |||
which really sucks :/ | |||
gaal | class App { has Exp $.func; has Exp $.invocant; has Exp @.args; } # wrong, because of $.invocant | 12:56 | |
audreyt | otoh, maybe we can ignore Maybe for now. | 12:58 | |
has Maybe[Exp] $.invocant; # correct translation, requires parameterized roles | |||
wow, Rails runs on YARV. | |||
YARV got there fast. | 12:59 | ||
that's like, Catalyst runs on Parrot :) | |||
gaal | brb | ||
nothingmuch | is diff(ruby2.0, ruby) big? | ||
audreyt | nothingmuch: ruby2 is less well defined than perl6 | ||
nothingmuch: so nobody knows ;) | 13:00 | ||
nothingmuch | ah | ||
audreyt | try JS2 for some well-defined stuff :) | ||
nothingmuch | i thought YARV was for ruby 2 | ||
audreyt | it is | ||
but it's also for ruby 1. | |||
because ruby people care about migration | 13:01 | ||
:) | |||
(also because its metamodel is considerably easier to port than perl5's.) | |||
nothingmuch | aye | ||
chris2 | nothingmuch: the changes will be far less than p5->p6, but significant and require fixing code | 13:02 | |
audreyt | that reminds me. I need to invite sasada over to the YAPC::Asia hackathon. | 13:03 | |
now that matz and takahashi will already be there. | |||
audreyt goes mail-writing | 13:04 | ||
chris2 | wow | ||
nothingmuch | ciao | ||
nothingmuch goes to amuse his sister | |||
audreyt: please tell balas that the Amazing Toy For 21st Century is Bringing [my sister] Sci Fi Fun! | 13:15 | ||
audreyt | nothingmuch: done. we are glad to hear it! | 13:19 | |
nothingmuch | our cat scratched it though | 13:23 | |
so it's now taped | |||
and slightly leaky | |||
(has to be refilled daily) | 13:24 | ||
audreyt | which adds to the fun? | ||
nothingmuch | uh | 13:25 | |
not really ;-) | |||
audreyt | aw ;) | ||
nothingmuch | it's life expectancy is not that big, i guess | ||
nothingmuch was hoping to go to the local cheap-crap store and filling it with helium | |||
oh | 13:26 | ||
bah | |||
she just showed me a hole the size of a foot | |||
=( | |||
okay, please tell balas that the amazing toy for 21st century is no longer going to bring my sister sci fi fun | 13:27 | ||
audreyt | ...done. | ||
though you can perhaps still patch it up | |||
but with ongoing cat presence | |||
maybe ultimately futile | |||
nothingmuch | hole size of foot == no go | ||
will upset the balance | |||
and it's hard to find a good adhesive | |||
audreyt | nothingmuch: balas would like to remark that she is glad that your _cat_ had sci fi fun. | ||
nothingmuch | heh | ||
it was more territorial than sci fi ;-) | 13:28 | ||
his personality is very much like foo's | |||
seen bsb? | 13:33 | ||
oh shucks | |||
audreyt starts SEE hacking with ingy on pmc.pmc | |||
(the module that enables v6.pm magic) | 13:34 | ||
13:34
whiteg_xen joined
|
|||
LeTo | audreyt: .pmc is confusing (for parrot folks at least:) | 13:34 | |
audreyt | LeTo: it's in use since 1999 :) | 13:35 | |
ingy | in non-use since 1999 :p | ||
er... in no since 1999 :D | |||
13:36
saorge joined
|
|||
audreyt | LeTo: after this session I'll go find you and hack on pugs.pmc | 13:36 | |
the _other_ pmc | |||
ingy | whiteg_xen: did you install postgres on xen1? | ||
whiteg_xen | ingy: no, I didn't do anything on xen1 | 13:37 | |
whiteg_xen is using **** gprs | |||
nothingmuch | hola ingy | ||
ingy | whiteg_xen: ok | 13:38 | |
audreyt | ( SEE session at see://freepan.org/ ) | 13:41 | |
nothingmuch joins for fun | 13:43 | ||
13:46
dolmen joined
|
|||
nothingmuch continues Blondie in Haskell | 13:47 | ||
audreyt | have fun :) | 13:48 | |
nothingmuch | danke | ||
ooh | 13:51 | ||
dad thinks he fixed the tear | |||
xinming | wiki.freepan.org/ | 13:53 | |
How can the spammer work so hard? :-S | 13:54 | ||
s/hard/fast/ | |||
nothingmuch | fast, hard - it's all the same to those spammers ;-) | 13:55 | |
13:58
fglock joined
|
|||
stevan loves the fact that all the part of Perl 6 will end up on CPAN | 13:59 | ||
fglock | audreyt: I've added some things to Pugs::Grammar but I don't have time to merge right now :( | 14:00 | |
audreyt | fglock: that's ok | ||
nothingmuch | i wish the world had a volume button | 14:01 | |
fglock | audreyt: I merged p6rule_lib into the grammar, it is no longer needed | ||
nothingmuch | crap | 14:02 | |
i just tried to use it too | |||
fglock | later... & | ||
nothingmuch turned down his laptop's volume | |||
14:02
fglock left
|
|||
stevan | audreyt++ ingy++ # the smell of crack smoke is in the air | 14:08 | |
ingy | :p | ||
stevan | pmc++ very cool (your's too LeTo :) | 14:09 | |
stevan has to go fetch bagels or his children will revolt | |||
14:09
rantanplan_ joined
|
|||
stevan | audreyt: I will start doodling some in p6object_space.p6 sometime today | 14:09 | |
audreyt | stevan: excellent | 14:10 | |
stevan | ingy: my Moose will beat up your Spiffy,.. (ask nothingmuch for more info) | ||
ingy | :) | ||
stevan dashes off & | |||
nothingmuch | Spiffy Moose | 14:12 | |
audreyt: i was losing my concentration | 14:16 | ||
so instead i tried to make a cleaned up parse tree thing for fglock | 14:17 | ||
ingy | nothingmuch: m00z3 | 14:27 | |
nothingmuch | ingy: oh come on, i was not serious | ||
i was actually going to make a real comment | |||
ingy | neither was I ;) | ||
nothingmuch retires from conv | 14:37 | ||
not enough concentration-fu | |||
pmurias | fglock: It there anything I could do help the move to the new layout?(which dosn't require much project vision) | 14:45 | |
/exit | |||
wolverian | um.. | ||
audreyt | wow | ||
14:45
pmurias joined
|
|||
wolverian pokes pmurias | 14:46 | ||
14:46
Khisanth joined
|
|||
pmurias | sorry, the irc client mefunctioned | 14:46 | |
again :) | 14:47 | ||
nothingmuch | audreyt: ? | 14:48 | |
audreyt | hm? | 14:50 | |
nothingmuch | what was the wow aabout? | ||
actually, neverkmind | |||
i can't bring myself into listening to anything | |||
off to drown myself in the shower | |||
audreyt considers the slogan "deploying source filters without the user knowing about it" for pmc.pm | 14:53 | ||
audreyt ponders real macros for p5 (via MAD or PPI) using a filter supporting q:code and {{{}}} | 14:54 | ||
nothingmuch | the problem is that they're parse trees | 14:55 | |
14:55
beppu_ joined
|
|||
nothingmuch | == more special cases to deal with | 14:55 | |
14:56
szabgab joined
|
|||
audreyt | MAD is actually the optree | 14:56 | |
nothingmuch | oh, right | ||
with syntax annotations, right? | 14:57 | ||
audreyt | yup | ||
szabgab | ppl: what do you think about setting up a beginner mailing list for perl6 on learn.perl.org/ ? | 14:58 | |
audreyt | very good idea! | 14:59 | |
nothingmuch | szabgab: i'll help out | 15:00 | |
15:00
pmurias joined
|
|||
szabgab | is any of the perl.org admins here or shall I send a message to Ask ? | 15:00 | |
audreyt | don't ask, just ask ask :) | 15:01 | |
szabgab | err I did mean to Ask :) | ||
what name do you suggest for the mailing list ? | |||
integral | perl6-beginners? | 15:02 | |
szabgab | integral: that's probably the right name | ||
nothingmuch | FUCK!!!!!!!!!!! | 15:03 | |
fucking vim | |||
at least it has .swp files | |||
audreyt | just lost a year's worth of work? :) | 15:04 | |
nothingmuch | no | ||
just almost lost an hours worth of non work | |||
my brain is not functioning | 15:05 | ||
and despite almost nil progress I still felt like i couldn't redo it | |||
pasteling | "nothingmuch" at 82.81.247.180 pasted "# some desugaring for a simple" (155 lines, 4.8K) at sial.org/pbot/16254 | ||
nothingmuch | eek | ||
why does pbotutil take the first line instead of the filename as a desc | |||
anyway | |||
this is the beginings of a non parse level AST for Perl 6 programs | |||
please comment somehow | 15:06 | ||
but i won't be here to read /msgs etc | |||
15:10
hlen_ joined
15:45
dolmen joined
15:46
audreyt joined
15:52
avar joined
16:14
justatheory joined
16:15
nothingmuch joined
|
|||
nothingmuch | moosen | 16:16 | |
ingy | ! | ||
nothingmuch | SpĆøĆøne | ||
SpĆørk SpĆørk SpĆørk! | |||
ingy | dƶt | ||
nothingmuch wonders if his torrent picked up | 16:19 | ||
and how risky it is to watch BSG in the bathtub | |||
TimToady | PĆøĢ | 16:21 | |
PĆøĢrl | 16:22 | ||
ingy | hi TimToady | ||
TimToady likes combining characters... | |||
ingy | audreyt has started me down a path sufficiently evil... | 16:23 | |
TimToady | That should have come out as a slashed o with an umlaut. | ||
nothingmuch | isn't the order ĀØĆø ? | ||
hmm | |||
TimToady | combining characters always follow in Unicode. | 16:24 | |
nothingmuch | ah, didn't know | ||
TimToady | my evil thought for the day: | ||
nothingmuch | so MacOS's convention of combining first is kinda silly? | ||
TimToady | sub main ($a, $b, :$switch, *@files); | ||
note semicolon. | 16:25 | ||
nothingmuch | TimToady: see also Migo and Ran's work on Getopt | ||
TimToady | nothingmuch: both conventions are silly. | ||
audreyt | TimToady: we already started on a sigs-based getopt | ||
TimToady | Yes, but do you have a syntax for turning the entire file into a sub? | 16:26 | |
nothingmuch | TimToady: should that really be a special case? | ||
TimToady | I was just looking at some code with @*ARGS and thinking how ugly that was... | ||
nothingmuch | could we just write a macro to specialize $?SUB in the main body? | ||
TimToady | not a special case if sub is in the same category as module or class. | ||
audreyt | TimToady: yes I do | 16:27 | |
# in main.p6 | |||
nothingmuch | even so, that dirties up the macro i think | ||
i think that much mroe useful would be a meta api to get at the code ref to main() | |||
whatever it may be | |||
audreyt | module Main; | ||
is signature($a, $b); | |||
done! | |||
nothingmuch | and then add a signature to that | ||
err, like that =) | |||
TimToady | multi main (:$foo, :$bar); | 16:28 | |
(just call some main that matches my args...) | |||
nothingmuch | TimToady: see also Getopt::Process which can coerce an argument list into subroutine arguments | ||
but not consolidate nicely | |||
that logic is already written =) | 16:29 | ||
isn't that multi *main, btw? | |||
TimToady | I spose. | ||
audreyt | TimToady: why "main"? | 16:30 | |
why not just the module itself? | |||
TimToady | hysterical raisins | ||
nothingmuch | i have an idea | ||
every package has a special named subroutine | |||
that is just it's body | |||
audreyt | nothingmuch: the name is &::('') in my mind | ||
TimToady | sub (*%switches); | 16:31 | |
nothingmuch | i think so too | ||
either that or ::main | |||
16:31
jdv79 joined
|
|||
nothingmuch | or __main | 16:31 | |
if we're going for that feel ;-) | |||
jdv79 | if i would like to use p6 rules in p5 - what of it? | ||
TimToady | s/__/{die}/ | ||
nothingmuch | then we &*main ::= &::(''); | ||
and we get DWIM semantics for that bit | |||
audreyt | jdv79: wait a few hours and start using re::override-perl6 | 16:32 | |
jdv79 | fabulous! | ||
will do, thanks:) | |||
audreyt | see perl5/Pugs-Compiler-Rule and misc/pX/Common/regexp_engine_demo.pl for now | ||
they need to be packaged a bit | |||
nothingmuch swears that no couch worth less than $1000 will ever enter his house when he grows up | 16:33 | ||
TimToady | I don't want someone to have to lean a different syntax for processing args to the main program than to a normal binding, at least for ordinary arglist processing. $*ARGS is always available. | ||
*learn | |||
nothingmuch | we have a crap sofa and I can't comfortably sit on it for than 15 minutes | ||
okay, in that case isn't it 'proto' ? | 16:34 | ||
proto *main (...) after &*main ::= Main::('') gives you that, right? | |||
TimToady | Are you suggesting that mere mortals have to write that? | 16:35 | |
ingy | nothingmuch: you really planning on growing up? | ||
nothingmuch | ingy: yes, in about 30 years | ||
actually, pretty soon | |||
ingy | sad :( | ||
nothingmuch is moving abroad | 16:36 | ||
sick of israel | |||
audreyt | TimToady: ok, so any module can serve as a main program as long as it has some sort of &main defined | ||
ingy | let's pair up | ||
nothingmuch | i don't think i'm crazy enough for .tw ;-) | ||
TimToady | maybe. It'd be nice to serve mains up from that end too. | ||
nothingmuch | audreyt: i think a cleaner variant is to add multi variants to Main::('') | 16:37 | |
audreyt: i think a cleaner variant is to add multi variants to &Main::('') | |||
audreyt | nothingmuch: right, and the logical syntax is | ||
multi module Main (...) { | |||
} | |||
multi module Main (...) { | |||
} | |||
;) | |||
nothingmuch | oh dear me | 16:38 | |
Juerd | .oO( multi grammar ) |
||
nothingmuch | that mushes up two modules, and combines all their subs as variants | ||
audreyt | er no, not really | ||
nothingmuch | Juerd: it's very simple, actually... all the methods of a grammar are just things operating on $?SELF as a sort of curer | ||
audreyt | it just let the main body sub take args. | ||
nothingmuch | audreyt: that was a question, actually | ||
TimToady | no, I think it's just multi main in Main package, and multi Main::main elsewhere. | ||
nothingmuch | just missed the question mark | ||
ah | |||
Juerd: then the only args they normally get are rules | 16:39 | ||
so you could in theory make a multimethod + | |||
audreyt | TimToady: I agree with you, I'm just trying to show the logical end of nothingmuch's line of thought and how strange it is | ||
nothingmuch | that optimizes simple subrules | ||
and a general one for any rule | |||
and implement that with multi rule &whatever_category_its_in:<+> | 16:40 | ||
Juerd | nothingmuch: Please - discard my remark :) | ||
nothingmuch | Juerd: it's actually very practical =) | ||
and useful | |||
think | |||
audreyt | TimToady: in Haskell, you can have a test.hs that goes | ||
TimToady | so 'sub main' and 'proto main' would be valid variants in Main. | ||
nothingmuch | a+ | ||
audreyt | module Test where | ||
main = print "Hello" | |||
nothingmuch | vs <something_hairy>+ | ||
audreyt | and if it's run as the main program | ||
nothingmuch | we know how to make 'a+' more efficient | ||
audreyt | it will use Test.main instead of Main.main as the entry point | ||
TimToady | module Test :main{ say 'howdy' }; | 16:41 | |
audreyt | TimToady: but then, hs doesn't have the .pm/.pl distinction | ||
so maybe Main is still good (for .pl) and .pm are named as non-main | |||
TimToady | well, at least we know whether we were execed or used. | 16:42 | |
nothingmuch | audreyt: also, haskell doesn't have any exprs that aren't bindings/decls at the top level | ||
audreyt | yeah... but this concerns the Main::main generation. if I run Test.pm as my main program | 16:43 | |
Test::ok doesn't somehow become Main::ok | |||
nothingmuch | ofcourse not | ||
TimToady | I think if you run a module Test we can look for Test::main to run... | ||
audreyt | but Main::main will dispatch to Test::main | ||
nothingmuch ponders | |||
audreyt | and failing that, &('Test::') | ||
nothingmuch | where do we use the name 'main' | ||
event loops | |||
objects with one action | 16:44 | ||
bad code (C written in Perl) | |||
Juerd | nothingmuch: do_one_loop | ||
Oh, you had event loops already | |||
TimToady | A lot of P5 code currently has 'sub main' | ||
audreyt | TimToady: so | ||
# test.p6 | |||
integral | TimToady: not necessarily *good* P5 code that should be copied | ||
audreyt | sub main { say "Hi" } | ||
say "ho!"; # never said? | |||
TimToady | have to translate it though. end up with 'sub main_' or some such... | ||
Juerd | TimToady: I speculate that most of that is because they like main-before-subs, where you need a block to keep lexicals from leaking into the rest. | 16:45 | |
And if you have a block, it's good style to name it. This is only rarely done with labels. | |||
TimToady | We could detect if the only thing outside the sub is the call, and optimize it away. | ||
Juerd | I think claiming "main" is a bad idea. | ||
There must be a better word | |||
Or even symbol? | |||
audreyt | Main ;) | ||
since we are already renaming ::main to ::Main ;) | 16:46 | ||
Juerd | Main is better | ||
But maybe just _? | |||
nothingmuch | TimToady: yes, but 99% of the time it's along side 'main(@ARGV)' | ||
i'm tryhing to think where this might conflict | |||
with the 99% approach | |||
test... test.... | |||
audreyt | Juerd: no, _() is gettext() | ||
Juerd | _ is weird in Perl 5 anyway. | ||
nothingmuch | bah | ||
network nearly died | |||
TimToady | magically called sub should be MAIN... | ||
Juerd | audreyt: Bah; But true. | ||
TimToady: ++ | |||
AUTO? ;) | |||
audreyt | TimToady: so if I have | ||
# Test.pm | 16:47 | ||
module Test; | |||
say "hi"; | |||
does Test::MAIN automatically get bound? | |||
as {say "hi"} | |||
TimToady | why not? | ||
audreyt | well | ||
Juerd | Ahh, goto &MAIN; # like basic's run | ||
audreyt | module Test { say "hi" } | ||
module Test { say "ho" } | |||
nothingmuch | audreyt: any comment about the nopaste, btw? | ||
audreyt | concatenated together? | ||
(the "multi module" problem) | 16:48 | ||
Juerd | audreyt: sub MAIN { { say "hi" } { say "ho" } } | ||
audreyt | Juerd: that's what I mena by concat | ||
TimToady | error unless "is mumble"... | ||
audreyt | yeah, "is reopen" | ||
"is extended" | |||
but the semantic is to concat? | |||
Juerd | TimToady: But open classes etc were default, right? | ||
TimToady | yeah, whatever it was... | ||
but you still have to say that you're reopening it, to prevent accidents. | 16:49 | ||
Juerd | I see | ||
audreyt | Juerd: they were. under ./pugs -o (which closes classes), "is reopen" would be fatal | ||
I mean -O | |||
-Ofin # finalize classes | |||
TimToady | there's also 'is instead' to say that you're replacing it. | ||
Juerd | "is okay("Just do it")" | ||
;) | |||
TimToady: Why not use self-documenting "is replacement"? | 16:50 | ||
audreyt | TimToady: "is also"? | ||
Juerd | audreyt++ # I like is also | ||
audreyt | sub MAIN is also { say "run this after the body" | | ||
TimToady | Yeah, that seems like the one I like most often.. | ||
yikes. | |||
audreyt | TimToady: btw, :COMPILING turning off hygeine worksforme. should I just commit to S06? | 16:51 | |
nothingmuch | so the is also trait is like adding a wrapper | ||
that basically does 'call; ....' | |||
Juerd | audreyt: END == sub MAIN is also? | ||
audreyt | Juerd: nope; END runs even if you dies | ||
different control step | |||
Juerd | Oh, right | ||
nothingmuch | what's program global UNDO then? | ||
audreyt | same thing | ||
TimToady | just a sec--i have some damian edits to commit first.. | 16:52 | |
audreyt | TimToady: ok | ||
nothingmuch | UNDO is per block though | ||
audreyt | the main program is a block | ||
nothingmuch | right | ||
but you don't always get access to that | |||
audreyt | why not? | ||
nothingmuch | if you have a module, that is creating a structure | ||
that needs to be cleaned up | |||
well, what do you do? | |||
audreyt | to be cleaned up... when? | ||
at program exit? | |||
nothingmuch | &*MAIN.meta.pad.get('@*UNDO').push(sub { }); | 16:53 | |
yes | |||
due to die | |||
or rather fail | |||
16:53
bsb joined
|
|||
audreyt | well, easily | 16:53 | |
sub Main::MAIN is also { UNDO { ... } } | |||
nothingmuch | bsb: messaged you on perlmonks | ||
oi | |||
TimToady | audreyt: k, s6 free | ||
nothingmuch | right | ||
audreyt | actually, bsb is here... | 16:54 | |
bsb | hey nothingmuch | ||
gaal | remoose | ||
bsb | what did I do? | ||
Juerd | Is it okay to use "is instead" on the *first* definition? | ||
TimToady | 'sub is also' looks an awful lot like what p5 is doing internally with CHECK blocks, etc. except that we need 'is prealso'. | ||
nothingmuch | bsb: your resume's capoeira link goes to a "free porn" link farm | ||
audreyt | bsb: have cycles to create a patch to S06 that says hygeine is assumed (implicit scope around q:code) unless you say :COMPILING ? | 16:55 | |
that's the saner option I have for hygiene | |||
the insane option is to encourage use of macro-scoped lexicals as containers ;) | |||
macro f { my $x; q:code/ $x = ... / } | 16:56 | ||
Juerd | TimToady: "is also :before"? | ||
audreyt | "is butfirst" of course ;) | ||
TimToady | I guess most of the BEGINish blocks are 'is (pre|post)also' | ||
audreyt | </troll> | ||
nothingmuch | audreyt: the lexical scopes of 'is also' are not fudged though, right? | ||
TimToady | 'is first' is taken... | ||
nothingmuch | s/fudged/mashed/; | 16:57 | |
Juerd | Is there a specific reason for having "before" in rules, but "pre" outside them? | ||
nothingmuch | &*MAIN.=wrap(sub { .... }); ? | ||
Juerd | (Maybe that "before" is an assertion, while "pre" is not?) | ||
audreyt | sub foo { BEFORE { ... }; AFTER { ... } } | ||
just doesn't quite read correctly | |||
nothingmuch | is that what the trait is doing? | ||
Juerd | audreyt: I think it does. I read it just the same as PRE/POST | ||
nothingmuch | or is it really combining the bodies? | ||
Juerd | nothingmuch: Maybe a sub is really an array of subs :) | 16:58 | |
audreyt | sub foo { BEFORE { this; } AFTER { that; } body; } | ||
Juerd | If so, we should be able to splice it. Oh my. | ||
nothingmuch | Juerd: you mean a matrix.... | ||
audreyt | Juerd: what's the sequence? that-body-this? | ||
Juerd | nothingmuch: Perhaps. | ||
audreyt | or this-body-that? | ||
Juerd | audreyt: this-body-that, but your point is a very good one. | 16:59 | |
"before" and "after" beg for a grammatical object | |||
TimToady | with most of our BEGINish blocks, the block itself determines whether it should be pre'ed or post'ed. So maybe 'is also' should just tell the block and let the block decide. | ||
Juerd | "pre" and "post" don't have this, because they're not English. | ||
TimToady | can always .wrap if you want better control. | ||
Juerd | They don't feel natural anyway, and that's the property that is (ab?)used here. | ||
Okay :) | |||
audreyt | stevan: any/bit/int/num/str are in parrot now | 17:00 | |
TimToady | Every CHECK/INIT/FIRST/ENTER/UNDO is 'is also' | ||
stevan | audreyt: nice | ||
audreyt | nil/sub/seq/map/obj next | ||
stevan | cool | ||
audreyt | parrot is very annoying in that it thinks all values are also containers | ||
Juerd | TimToady: is CHECK/INIT/... an argument for "also"? (is also("CHECK")) | ||
audreyt | so I need to disable all mutators | ||
otherwise | |||
1++; # always succeeds | 17:01 | ||
# and changes the idea of 1 elsewhere! | |||
stevan | audreyt: I am fudging a p6metamodel_bootstrap.p6 right now | ||
Juerd | audreyt: readonly | ||
audreyt considers it utterly broken | |||
Juerd | audreyt: In Perl 5, a "value" is also always a container, but with the readonly flag. | ||
stevan | :D | ||
nothingmuch | in python does 1++ cause all 1s everywhere to be a 2? | ||
;-) | |||
Juerd | audreyt: Interesting things happen if you make "undef" writable, changing the definition of undef. | ||
bsb | audreyt: I'll try to write a hygiene note of S06 | ||
Juerd | Undef can be defined. | ||
audreyt | Juerd: bsb danke | ||
Juerd | (What's bsb?) | 17:02 | |
audreyt | er | ||
bsb: danke | |||
Juerd: | |||
TimToady | ohh a ghostghostwriter. | ||
audreyt | yeah, parrot just took the SV idea | ||
metaghostwriter | |||
Juerd: I think the SV idea is unsound really, because it prevents "1" to be shared. | |||
Juerd | audreyt: The SV idea is useful when you *want to* override literals. Though you could quite easily argue that that is always a bad thing. | 17:03 | |
audreyt | when you autobox "1" twice, you get two SVs | ||
stevan | audreyt: do you have a moment to discuss object space primatives for lrep? | ||
audreyt | Juerd: there are cleaner way to override literals _lexically_ | ||
Juerd | audreyt: I guess so. | ||
audreyt | macro term:<1> | ||
is the way | |||
nothingmuch | audreyt: but if it's unshared then the value can have a pointer to it's box cached, right? | ||
Juerd | That's nice | ||
audreyt | nothingmuch: well yes, but neither p5 nor parrot can do that | 17:04 | |
17:04
GabrielVieira joined
|
|||
nothingmuch | right | 17:04 | |
audreyt | also it results in different | ||
1.id | |||
nothingmuch | just a semantics question | ||
audreyt | values | ||
across program runs | |||
Juerd | userfriendly.org/ # Applicable to Perl 6? ;) | 17:05 | |
audreyt | compare ruby, which always has 1.id at 3 :) | ||
TimToady | "Everything is an object" :) | ||
audreyt | Everything.isa(Object) | ||
TimToady | given P6 Everything.does(Object) | ||
Juerd | audreyt: As long as two different $foo and $bar that happen to both contain 1 have their .id equal, it's fine with me :) | 17:06 | |
TimToady | given P6 { Everything.does(Object) } | ||
stevan | Object.isa(Everything) # metacirculatiry :) | ||
Juerd | Just please don't have Python's foo = 2; bar = 1+1; foo == bar | ||
nothingmuch | Juerd: but their IDs don't equal | ||
audreyt | Juerd: yeah, that is not quite easy to do in parrot. I'm still thinking about it | ||
Juerd | eh, foo.id == bar.id | ||
nothingmuch | i mean, it makes no sense | ||
they're not the same | |||
Juerd | Because containers are incredibly useful :) | ||
nothingmuch: Agreed. Tell Python, though :) | |||
nothingmuch | they just map to the same value | ||
audreyt | Juerd: well, variable($foo).id and variable($bar).id would be different | 17:07 | |
nothingmuch | Juerd> audreyt: As long as two different $foo and $bar that happen to both contain 1 have their .id equal, it's fine with me :) | ||
didn't you just contradict yourself? | |||
audreyt | but larry has this axiom that $scalar.method never dispatches to the container. | ||
Juerd | audreyt: Eh, hm, ... | ||
I have to think about that. | |||
TimToady | There are times you want identical values to be distinguishable, and times you don't... | ||
audreyt | since you can always get the container with variable($foo) | ||
nothingmuch | err... in that case how do &infix:<=>, &infix:<:=> etc work? or are these back to being special cases? | ||
audreyt | which is btw special form. | ||
nothingmuch: they desugar with variable() semantics | 17:08 | ||
$foo = 3 | |||
nothingmuch | how can I declare a variable() desugarer? | ||
audreyt | variable($foo).infix:<=>(3) | ||
Juerd | nothingmuch: I meant unequal :) | ||
nothingmuch | Juerd: oh | ||
audreyt | nothingmuch: you use the "is rw" trait. | ||
nothingmuch | =) | ||
audreyt: oh | |||
so same thing ;-) | |||
audreyt | subtly different though :) | ||
Juerd | Can we rename variable to container? | ||
Variable has always been an exeedingly confusing word. | 17:09 | ||
nothingmuch | how do implicit variable($x) and $x compete in multimethods? | ||
TimToady | The point of eqv^H^H^H=== is to give you the 'values equal for value types, ids equal for object types' semantics. | ||
use =:= if you want the other thing. | |||
Juerd | TimToady: Wasn't everything an object? | ||
nothingmuch | i thought that ids equal for object types unless objects compare themselves in a silly way? | ||
TimToady | Juerd: you missed the quotes... :) | 17:10 | |
Juerd | TimToady: No, I just don't get the difference between value and object... | ||
TimToady | and the s/is/does/ :) | ||
A value is an object that wants to pretend that it's a value. | |||
Juerd | TimToady: values are unreferenced? | ||
TimToady | Like the 3 object. | ||
Juerd | (In perl 5 jargon) | ||
nothingmuch | as in, multi &infix:<===> (Str, Str) and Num Num, and whatever are just defined in the prelude to not work on .id | ||
and &infix:<===> (Object $x, Object $y) { $x.id === $y.id } | 17:11 | ||
pasteling | "gaal" at 192.115.25.249 pasted "Example transliteration of Exp" (50 lines, 1.5K) at sial.org/pbot/16255 | ||
TimToady | One could say that the value types are the ones that define infix:<===>. | ||
Juerd | Ah | ||
Do I understand it correctly if I think that Str, Int, Num are value types, but LWP::UserAgent would be an object type? | 17:12 | ||
TimToady | I think infix:<===> is also related to the mystery of what you can use as an "untyped" hash key. | ||
gaal | oh, another question re: transliteration: do we use qualified names? Pugs::AST::Internals::Exp, etc.? | ||
Juerd | And which would Array be? | ||
fsck; afk. | |||
TimToady | except historically hashes have forced to type Str. | 17:13 | |
nothingmuch | TimToady: i think that can't work except as a convention | ||
TimToady | There are, like, how many things in P6 that aren't conventions? 15 or so? | ||
nothingmuch | heh | ||
TimToady | It's sugar turtles most of the way down. | ||
wolverian | was Juerd right with the LWP == object, Str == value thing? and what is an Array? | 17:14 | |
gaal | mmm sugar turtles | ||
nothingmuch | in that case we also want: class Object { method canonical_key_for_hash_with_better_name { self.id } } | ||
imho Array is an object | |||
TimToady | Str is probably an object too. Too much Unicode floating around to do anything else... | 17:15 | |
And we have 'eq' for forcing string comparisons. | |||
wolverian | then what is a value? an object without methods? :) | ||
17:15
elmex joined
|
|||
nothingmuch | multi method &infix:<eq> ( $x, $y ) { $x as Str === $y as Str } ? | 17:16 | |
wolverian | Str $x === Str $y # :) | ||
TimToady | A value is something you don't have to clone if you want another one of it. | ||
nothingmuch | err, right | ||
wolverian | TimToady, ah. so really really primitive. | ||
nothingmuch | wow, that's a nice distinction | ||
TimToady | I suspect Str has to define === though... | 17:17 | |
gaal | audreyt: so, which types are high targets for DrIFT.Perl6? Exp? | ||
nothingmuch | TimToady: i thought it already does ;-) | ||
TimToady | which would make it a value type. Maybe it just can't decide... | ||
nothingmuch | oh | ||
i'd expect $str === $other to be a "stringish equality" thing | |||
wolverian is tempted to put the value/object distinction into the topic | |||
TimToady | === always fails for differing types. | ||
nothingmuch | that converts to the "best" encoding and compares | ||
does MMD let it coerce? | 17:18 | ||
TimToady | could | ||
nothingmuch | 2 === "2" ? | ||
if it matches Object, Object instead it's on .id which is fail | |||
TimToady | === always fails for differing types (in the absence of MMD) | ||
nothingmuch | if it matches Str, Str or Num Num (depending on which coercion is chosen, and whether Num "2" fails) | 17:19 | |
but it won't | |||
since coercion happens after proto | |||
right? | |||
TimToady | don't follow... | ||
nothingmuch ponders a new coercion semantic: | |||
17:19
saorge_ joined
|
|||
nothingmuch | mutli &infix:<===> (Object $x, Object $y) { }; # this is " | 17:19 | |
"more specialized" than | 17:20 | ||
multi &infix:<===> ( Str, Str ) # on a 2, "2", | |||
right? | |||
repharse: | |||
TimToady | 2,"2" doesn't even see Str,Str | 17:21 | |
audreyt | gaal: start with PIL.Native.Types.Native, actually :) | ||
nothingmuch | TimToady: until it tries to coerce, right? | ||
but it will never coerce, because Object, Object will match it, right? | |||
anyway, new semantic for 'as': | |||
17:21
hcarty joined
|
|||
nothingmuch | $x = mmd_distance( Object, Num ); | 17:21 | |
TimToady | we haven't really nailed down MMD distance yet, except to nail up Manhattan... | ||
nothingmuch | $y = mmd_distance( Str, Str ); | 17:22 | |
$y += mmd_distance( Num, Str ); # for 'as' | |||
i'm having trouble saying this | |||
but if the distance in the same variant is bigger than the distance through an 'as', maybe we prefer the 'as'? | |||
audreyt | nothingmuch: you grokked docs/notes/multimethods.pod ? | ||
TimToady | probably needs a slightly more formal proposal. | ||
nothingmuch | which incarnation? | ||
audreyt: i think so | 17:23 | ||
audreyt | nothingmuch: there's only one incarnation | ||
nothingmuch | there around 3-4 mmd docs, IIRC | ||
two by luke, one by me | |||
gaal | audreyt: that's a fairly simple structure, if you don't descend to its children... | 17:28 | |
audreyt | gaal: but suppose I do... | 17:29 | |
gaal | ...but stop at the type level, surely? | ||
audreyt | surely. | 17:30 | |
17:30
pdcawley joined
|
|||
nothingmuch | audreyt: does my as-in-distance proposal disagree with multimethods.pod? | 17:30 | |
17:30
hcarty left
|
|||
gaal | okay, so NativeObj is another style of thing to emit | 17:31 | |
nothingmuch | gaal: err... remember the blondie conclusions | ||
this is all a generalization of linking | |||
gaal | "this"? | ||
undefined symbol | |||
nothingmuch | emitting "native" constants, native ops, etc | ||
XS type behavior | 17:32 | ||
FFI | |||
except that some of this linking is done in the emitting stage | |||
audreyt | nothingmuch: yes, because fallbacking-to-coercion yields a different type | ||
nothingmuch | and you're not always linking with symbols | ||
audreyt | that has no subtyping relationship with the original type | ||
nothingmuch: I proposed "sub f ($x as Dog)" as a encouraging-coercion form | 17:33 | ||
nothingmuch | audreyt: so how *do* i say Num is closer to Str than it is to Obj | ||
audreyt | TimToady said he's thinking about having "sub f ($x does Dog)" to mean the same | ||
gaal | nothingmuch: I have no idea what you are telling me | ||
nothingmuch | gaal: when you are emitting '1 + 2' | ||
audreyt | nothingmuch: "Num does Str", clearly. | ||
(according to the encouraging-coercion theory) | |||
nothingmuch | i meant the other way | ||
numify a string | 17:34 | ||
that is not well described as a role | |||
much better as a coercion | |||
audreyt | well, it's closer to a Num because they share a nearer common ancestor | ||
let's call it Val | |||
nothingmuch | i guess method f ($x as Num) is a good way to go | ||
audreyt | than Object's common ancestor, let's call it Any | 17:35 | |
TimToady | sub f (Dog $x) already means 'does', so 'as' is probably better for coercion. | ||
Unless we mean 'to'. | |||
audreyt | TimToady: as in JS2 "to"? isn't that just the perl6 "as"? | 17:36 | |
(user-defined casting) | |||
TimToady | Yeah, and 'does' says 'can you do this without changing yourself?' | ||
nothingmuch | changing? isn't that more of a "deriving a copy"? | 17:37 | |
TimToady | nothingmuch: yes | 17:38 | |
audreyt | ($x as Num) then. I like the punning | ||
nothingmuch | *phew* | ||
okay | |||
what about from the other direction? | |||
audreyt | it's asif you said f($x as Num) at caller site. | ||
nothingmuch | yes | ||
17:38
netanya_goy joined
|
|||
nothingmuch | wait | 17:38 | |
what other direction.... | |||
nothingmuch tries to remember | |||
oh, yes | |||
how do i declare in role Str that Str is *always* as Num before it's does Object? | 17:39 | ||
err, isa Object | |||
we have 3 "locations" which control the outcome of MMD, the call site, the class declaration, and the method declaration, but this gives only call and method decl | |||
audreyt | nothingmuch: well, Str and Num share common ancestry, let's call it Val, so you can say that everybody does Val with various coercion forms | 17:40 | |
automagically | |||
that is, Num isa Val and Val does Num | |||
nothingmuch | i thought that was a nono in luke's proposal | ||
audreyt | this is bizzare though. | ||
nothingmuch | very bizzare | 17:41 | |
audreyt | it is a nono, because of circularity | ||
say, if all our common builtins are declared with "as" | |||
then this problem does not arise | |||
nothingmuch | hmm | ||
audreyt | numeric ones, at least | ||
nothingmuch | i think we want a class level 'as' thing | ||
audreyt | class Dog as Cat { ... } | ||
nothingmuch | i'd also like to say that MyUriObject as URI even though it doesn't inherit it | ||
and that URI isn't a role in any logical way | 17:42 | ||
audreyt | and you don't want to say does | ||
nothingmuch | i think that works | ||
audreyt | because you can't emulate its api | ||
TimToady | C++ handles all that with constructor/coercion | ||
nothingmuch | right | ||
audreyt | you can only, on demand, construct a URI for it | ||
nothingmuch | exactly | ||
nothingmuch is getting the hackathon feeling | |||
when my brain is too clogged to actually work i start bugging audreyt and TimToady | 17:43 | ||
;-) | |||
audreyt | and all this just so you can omit explicit coercions. | ||
(in call site or function site.) | |||
nothingmuch | exactly | ||
because they are orthogonal | |||
you might have control only over one of them | |||
audreyt | certain languages has special method designed for value classes ;) | ||
as_num | |||
etc | 17:44 | ||
but class-level "as URI" may be useful. | |||
TimToady | That's why I originally had coerce:<as> make both coercion and constructor semantics, if I recall... | ||
audreyt | TimToady: I don't think coerce:<as> is defined anywhere in the docs... | 17:45 | |
TimToady | Maybe the constructor autogen is just an "is deep" variant. | ||
it was historical | |||
Anyway, I'm pretty comfy with "as" allowing a single direct coercion on MMD 'as' args, as long as we don't get into coercion chains like C++. | 17:46 | ||
17:46
mako132_ joined
|
|||
TimToady | I presume it's just infix:<as> these days, but as I said, we could have an 'is deep' variant to autogen the corresponding constructor. | 17:47 | |
nothingmuch | the usefulness of class level as is that sometimes the class writer has no control of either the call site or the method def site | ||
and wants to have "correct" semantics" | 17:48 | ||
this can also simplify MMD | |||
audreyt | nothingmuch: I already agreed. now write a S12 patch? | ||
nothingmuch | in that 'as URI' could short circuit the MMD dispatch much earlier | ||
17:48
fglock joined
|
|||
nothingmuch | i'm off to take that bath I was talking about | 17:48 | |
audreyt | oh ok :) | ||
nothingmuch | i think i'll do it later | 17:49 | |
i am too blocked mentally to write something coherent | |||
TimToady | Actually, given MMD there's really no constructor/coercion distinction, so nevermind the 'is dep' | ||
*deep | |||
audreyt | (and given structural unpacking in MMD, coercion can be 1)deep 2)automatic 3)fun) | 17:50 | |
TimToady | agreed | ||
nothingmuch | oh wait: | ||
how do parametrized types work with this? | |||
TimToady | brain melts | 17:51 | |
nothingmuch | does 'as' affinity on the parameter type leak up to the parametrized type? | ||
e.g. if Str as Num, then does Array[Str] as Array[Num] wwrt MMD? | |||
audreyt | don't think so. | 17:52 | |
nothingmuch | how come, actually? | ||
audreyt | because of contravariance. Str as Num, but when you store a Num into a Array[Str] | ||
no matter how Str-as-Num you are | 17:53 | ||
TimToady | But perhaps a generic 'as' could use that info to autogenerate the specific one. | ||
audreyt | it can affect only existing Array[Str] lements | ||
but not affecting the STORE call | |||
i.e. it'd only work on FETCH. | |||
TimToady | feels like a co/contravariant conflict of some sort. | 17:54 | |
fglock | audreyt: I'll try to merge the Pugs::Grammar code now - I was distracted testing optimizations - none implemented, but there could be much improvement with inlining - 10x? | ||
audreyt | fglock: cool! | 17:55 | |
fglock: ingy just pulled together Filter::PMC | |||
17:55
avar joined
|
|||
audreyt | v6.pm is trivial based on it | 17:55 | |
so instead of a .sh or Makefile.PL rules | |||
Rule.pm -> Rule.pmc can happen reliably and automagically | |||
17:55
FurnaceBoy joined
|
|||
fglock | audreyt: cool - will it use lrep in the beginning? or maybe pugs - is it possible already? | 17:56 | |
audreyt | fglock: pugs is possible already -- parses much more stuff than lrep -- but you can switch | ||
use v6-lrep; | |||
use v6-pugs; | |||
fglock | audreyt: ws can send the pmc files to cpan, so people don't have to compile | 17:57 | |
audreyt | fglock: that is the whole plan. | ||
so, yes! :) | |||
and that can really encourage people starting new cpan modules with Perl6 | |||
(or with Spiffy, or with some other source-filterish-technologies that will no longer be recompiled every run) | |||
and because Filter::PMC can do nesting and ordering | 17:58 | ||
the dreaded no-two-filters-at-once bug can at least be partially solved | |||
TimToady | audreyt: I wonder if you could STORE.wrap something that redispatches MMDly to proper constructor before calling "real" STORE... | ||
fglock | ruoso, pmurias: no problem with CPAN anymore (the initial plan was 100% perl6) | ||
audreyt | TimToady: but it needs the other direction's "as" | ||
ok, I need to write a rant about the parrot container system. a sec :) | 17:59 | ||
TimToady | well, it doesn't seem all that important to nail down, so don't let me distract you. | ||
audreyt | TimToady: yeah, I'll just delegate it to the metaghost protocol | 18:00 | |
TimToady | are those sugar ghosts? | ||
or turtle ghosts? | |||
or sugar turtle ghosts? | |||
audreyt | cute tutle ninja ghosts, more likely | ||
turtle ninja, even | |||
# news.bbc.co.uk/olmedia/705000/image...les300.jpg | 18:01 | ||
TimToady | what kind of a rant is that? :-) | ||
audreyt | TimToady: parrot has no idea of SV_readonly | 18:02 | |
18:02
Limbic_Region joined
|
|||
audreyt | TimToady: and hence, no distinction between Val and Ref | 18:02 | |
TimToady: and hence, "$x is readonly" is not practical | |||
TimToady: and hence, reference semantics are broken; 1.id != 1.id, and you can modify how 1 works by calling 1++. | |||
TimToady | Yes, I saw your earlier rant. | 18:03 | |
thought maybe you had a better one. :) | |||
audreyt | I think the workaround is simply to have a "readonly" interface to PMCs in addition to the current "scalar" | ||
fglock programs always have big TODO lists | |||
18:04
GabrielVieira left
|
|||
audreyt | TimToady: the default f(*@_) thing | 18:04 | |
you can't say @_[0]=1, but can you say @_.push(3)? | |||
(two conceptual levels) | |||
TimToady | I think @_.push probably works by default. The "readonly" distributes along with the *. | 18:05 | |
audreyt | so we don't get "locked hash" style things by default | 18:06 | |
that's good, because it's far easier to explain :) | |||
TimToady | sub f(constant *@_) {...} | ||
audreyt | right. parrot doesn't do that either. hm | 18:07 | |
audreyt adds another rant item | |||
TimToady | constant %hash = (...) is a locked hash, presumably. | ||
audreyt | nod. | 18:08 | |
TimToady | though maybe constant locks the values as well as keys. | ||
audreyt | so it's basically "is readonly is locked" | ||
or some such. | |||
thought parrot calls it "fixed" | 18:09 | ||
TimToady | okay to lock the values if you only change values thru existing ref. | ||
audreyt | er, "fixed_size", and maybe it reads better than "locked" | ||
nod. | |||
LeTo | fixed_sized is still r/w but not extendible | 18:10 | |
TimToady | I think constant should lock values too by default, since constant hashes are good -O fodder. | ||
audreyt | LeTo: yes, "readonly" and "fixed_size" are orthogonal concepts | ||
and "constant" is them together | |||
TimToady | constant is more than that. It's a compile-time thing in P6. | 18:11 | |
audreyt | nod. | ||
though persumably: | |||
sub f (*@_ is constant) | |||
TimToady | That's why it's a declarator unlike "readonly". | ||
audreyt | or is it more | ||
sub f (*@_ is readonly is fixed_size) ? | |||
TimToady | nod | 18:12 | |
LeTo | well, constant in Parrot terms means that storage is from a different object arena, which isn't scanned by GC - its for very long-lived objects | ||
audreyt | LeTo: rant sent | 18:35 | |
18:35
GabrielVieira joined
|
|||
fglock | GabrielVieira: hi! | 18:36 | |
svnbot6 | r9416 | fglock++ | Pugs-Compiler-Rule: merged new tests, TODO | ||
GabrielVieira | GabrielVieira hi ;D | 18:37 | |
fglock where can i find some topics about what is being doing and where can i help (or try to)? :) | 18:38 | ||
fglock | GabrielVieira: want a commit bit? so you can start coding | ||
GabrielVieira | humm | ||
yep | 18:39 | ||
fglock where can i find? | |||
audreyt | GabrielVieira: your email addr? | 18:40 | |
fglock | GabrielVieira: you can start by making a local copy of pugs with svn | ||
GabrielVieira | [email@hidden.address] | ||
audreyt | GabrielVieira: commit bit sent. add yourself to AUTHORS. welcome aboard! | ||
GabrielVieira | tkz ;) | 18:41 | |
audreyt | dinner, bbiab & | ||
GabrielVieira | i'll check | ||
fglock | GabrielVieira: you can get the current p6 specification by installing Perl6::Bible from CPAN - then type p6bible ; if you are in debian, you can install pugs/unstable | 18:43 | |
18:43
nnunley joined
|
|||
fglock | or compile it yourself | 18:43 | |
GabrielVieira | hum | ||
i'll see here wicht one is the best for me | 18:44 | ||
i thing ill install fbsd here just for it | |||
:P | |||
fglock | also, talk with ruoso (Daniel Ruoso from cascavel-pm) - he is here too | ||
GabrielVieira | yeah | 18:45 | |
i thought about | |||
:) | |||
he is away right now | |||
GabrielVieira is going to lunch right now.. so.. <- when i come back i'll get involved with it ;) | 18:47 | ||
fglock | GabrielVieira: ok! | ||
18:49
fglock joined
|
|||
pmurias | fglock:is it ok to move emit.pl to perl5/Pugs-Compiler-Rule/lib/Pugs/Emitter/Perl5.pm? | 18:52 | |
18:53
Daveman joined
|
|||
pasteling | "bsb" at 192.115.25.249 pasted "S06 q:code scoping patch" (53 lines, 2.5K) at sial.org/pbot/16257 | 18:53 | |
fglock | pmurias: I'm trying to do that :) if you can help, plese do | 18:55 | |
I'll work in the parser side now | |||
pmurias: wait! | 18:56 | ||
pmurias: Compiler-Rule is the rule compiler - the emitter code is p6rule.pl | 18:57 | ||
18:57
Daveman left
|
|||
fglock | pmurias: you can remove the non-emitter code in the first part of the file | 18:57 | |
pmurias: I'm moving that code to the grammar | 18:58 | ||
18:58
FurnaceBoy_ joined
|
|||
fglock | pmurias: the Rule compiler will be completely separate from the p6 compiler - 2 reasons: | 18:59 | |
it's a simple language, can have a faster compiler; | |||
and Rule can be used separately, in p5 programs | |||
19:02
fglock joined
|
|||
FurnaceBoy_ | audreyt: I didn't know there were female ninja turtles. thx. | 19:05 | |
fglock | where is v6-pugs.pm ? | 19:09 | |
audreyt | fglock: it will bein lib/v6.pm | 19:10 | |
the -pugs is just a import switch | 19:11 | ||
fglock | audreyt: I need it to use the grammar... | ||
audreyt | fglock: the Makefile.PL should gen it for you for now | ||
in this hour | |||
19:12
amnesiac joined
|
|||
audreyt | p6i rant: www.nntp.perl.org/group/perl.perl6....nals/33240 | 19:12 | |
fglock | audreyt: will it be a aeparate cpan package? | 19:13 | |
audreyt | fglock: v6.pm? very likely, yeah | ||
fglock: but not really needed | |||
fglock: the .pmc will contain the magic and v6 will not be needed on user site | 19:14 | ||
you only need v6.pm if you modify the .pm file and need to regen pmc | |||
in which case you probably want to have a pugs tree anyway | |||
fglock | audreyt: it didn't work for me: Error: Can't locate v6.pm in @INC | ||
audreyt | fglock: did you run MAkefile.PL? | 19:15 | |
which file is this? | |||
fglock | Pugs::Grammar::Rule (I didn't run makefile.PL - will retry) | ||
audreyt: String found where operator expected at Makefile.PL line 19, near "name 'Pugs-Compiler-Rule'" | 19:17 | ||
audreyt | fglock: hm, upgrade your Module::Install? | ||
actually nvm | 19:18 | ||
I can fix that | |||
fglock | audreyt: thanks | ||
audreyt | fixed | 19:19 | |
svnbot6 | r9418 | audreyt++ | * reuse M::I for P::C::R | ||
fglock | audreyt: "... Pugs-Compiler-Rule/inc/Module/Install.pm does not exist!" | 19:23 | |
audreyt | sec | 19:24 | |
audreyt curses the author of M::I | |||
tail re-cursing | |||
try again | 19:25 | ||
svnbot6 | r9419 | audreyt++ | * really use Pugs's own M::I. | ||
19:29
dduncan joined
|
|||
TimToady | obra: planetsix seems to have syndicated a huge mudball of your old bloggings... | 19:29 | |
fglock | audreyt: no errors in Makefile.PL, but still no v6.pm | ||
audreyt: how about just send v6.pm to CPAN? | 19:30 | ||
= less hacks | |||
audreyt | fglock: you are doing ./lib/Pugs/Grammar/Rule.pm? | ||
fglock: we'll certainly do that, but it doesn't quite help users who has no pugs /lrep on her machine | |||
fglock: it worksforme | 19:31 | ||
$ perl -Ilib t/01-iterator_engine.t | |||
ok 1 - use Pugs::Runtime::Rule; | |||
# etc | |||
19:31
rgs joined
|
|||
audreyt | fglock: try that in perl5/Pugs-Compiler-Rule ? | 19:31 | |
fglock | audreyt: I'm running make in perl5/Pugs-Compiler-Rule - it installs to C:\PXPerl\site\lib | ||
audreyt: try t/02- | |||
Limbic_Region | fwiw - I am currently unable to compile on Win32 | 19:32 | |
audreyt | # Error: Undefined subroutine &ruleop::alternation called at lib/Pugs/Grammar/Rule.pm line 267. | ||
Limbic_Region | if not a known issue and someone wants to investigate - /msg me | ||
Limbic_Region wanders back off | |||
audreyt | fglock: well, because it doesn't load Pugs::Runtime::Rule | ||
and hence no ruleop::alternation | 19:33 | ||
if you say | |||
use_ok( 'Pugs::Runtime::Rule' ); | |||
use_ok( 'Pugs::Grammar::Rule' ); | |||
then it works | |||
solution: compile "use perl5:" statements? | |||
fglock | audreyt: one sec | ||
audreyt | and put a "use perl5:Pugs::Runtime::Rule" in Pugs::Grammar::Rule body perhaps | ||
or just forget about "use perl5:" now and compile straight "use" | 19:34 | ||
pmurias | fglock:is it ok to move emit.pl to perl5/Pugs-Compiler-Rule/lib/Pugs/Emitter/Perl5.pm? | ||
fglock | audreyt: my problem is "can't find v6" | ||
pmurias: you mean p6rule.pl - the rule emitter | 19:35 | ||
pmurias: and Pugs/Emitter/Rule/Perl5 - we are not moving the p6 compiler yet, only rules | 19:36 | ||
audreyt | fglock: I wonder why "can't find v6" happens - can you paste the error here? | 19:37 | |
Limbic_Region: nopaste the log? | |||
fglock | audreyt: maybe my perl5 can't find .pmc files? | ||
what's the nopaste cmd? | 19:38 | ||
pasteling | "fglock" at 200.102.180.83 pasted "v6 error" (13 lines, 649B) at sial.org/pbot/16258 | 19:41 | |
19:41
nothingmuch joined
|
|||
audreyt | mm | 19:44 | |
fglock: do you have ib/Pugs/Grammar/Rule.pmc ? | |||
lib | |||
and is its modification time newer than Rule.pm? | 19:45 | ||
fglock | audreyt: will 'touch' it... | ||
audreyt: works! - Makefile.PL will need to touch Rule.pmc when installing from CPAN | 19:47 | ||
audreyt | ok | 19:48 | |
Limbic_Region | perlbot nopaste | ||
perlbot | Paste your code here and #<channel> will be able to view it: sial.org/pbot/<channel> | ||
pasteling | "Limbic_Region" at 24.35.57.240 pasted "snippet of compile failures on Win32" (87 lines, 4.1K) at sial.org/pbot/16259 | ||
audreyt | fglock: I hacked that together | 19:52 | |
svnbot6 | r9420 | audreyt++ | * Makefile.PL for Pugs::Compiler::Rule should always touch pmc | ||
r9419 | audreyt++ | * really use Pugs's own M::I. | |||
audreyt | (touching) | ||
Limbic_Region: we just fixed this | |||
should be fine now | |||
pmurias | fglock:where should match::{get,str} live? | ||
fglock | pmurias: Match will be a separate class (needs to be written) | 19:54 | |
19:56
fglock left,
fglock joined
|
|||
Limbic_Region | audreyt - good to know | 19:59 | |
will svk pull and try again | |||
fwiw - I am only lurking here so apologies if I should have known that | 20:00 | ||
audreyt | np, no apologies needed :) | ||
fglock | audreyt: perl5 will have ::Match, ::Rule, ::Str classes? | 20:01 | |
audreyt | fglock: Pugs::Runtime will provide them. | ||
using the MOP to map them to p5 packages | 20:02 | ||
/methods/etc | |||
nothingmuch | Darjeeling FTGFOP 1, 294 + 298 | ||
eep | |||
pretty slick: svn.code-host.net/project.html | 20:03 | ||
fglock | audreyt: the rule match will be: Pugs::?? | ||
Limbic_Region | Cannot write blib/lib/Pugs/Grammar/Rule.pmc:Permission denied at C:/Perl/lib/ExtUtils/Command.pm line 127 | 20:05 | |
still blowing up audreyt | |||
audreyt | fglock: "the rule match" ? | ||
Limbic_Region | unless of course I should do a make realclean and start over (again) | ||
audreyt | Limbic_Region: nono | ||
a sec, fixing that | |||
Limbic_Region | heh - thanks | ||
obra | TimToady: this is a bug in use.perl/planetplanet integration :/ planet perl gets justin mason's old postings every week :/ | ||
Limbic_Region | but this machine has resources (not like the dinosaur at work) | 20:06 | |
fglock | what class will be the object returned by running the object returned by Pugs::Emit::Rule :) | ||
audreyt | fglock: Match. I think. | ||
(yes, simply "Match") | |||
fglock | ok | ||
svnbot6 | r9421 | audreyt++ | * for win32, try to chmod 644 on .pmc | 20:10 | |
buu | Hey Limbic_Region | 20:11 | |
fglock | pmurias: are you ok if I commit the version of Emitter::Rule::Perl5 I was working on? | 20:12 | |
20:13
fglock joined
|
|||
Limbic_Region | hey buu | 20:14 | |
pmurias | fglock:np | ||
svnbot6 | r9422 | fglock++ | Pugs::Emitter::Rule::Perl5 - work in progress | 20:19 | |
nothingmuch | fglock: i have an AST brain dump for you | 20:20 | |
it's more of an "operation" level than a parse level one | 20:21 | ||
it's after desugaring | |||
and it's more consistified | |||
but it's still before folding, linking, and that stuff | |||
and it's definately not an intermediate language (loops etc are not "flattenned") | |||
fglock | nothingmuch: I've seen the paste | 20:22 | |
nothingmuch | okay | 20:23 | |
it's not a very complete example | |||
and I think it is a *tad* too dumb down | |||
e.g. functional calls should be different from object calls | |||
even though they are "really" the same thing under the surface (prototype multimethod crap ;-) | |||
but i think it's a balanced place to aim to as the step right after parsing | |||
note, ofcourse that Immediate is *immediately* (during the construction of the *PARSE* tree) translated in to this tree, and then compiled and executed into an AST to be put in that expression | 20:24 | ||
also, i should note that we need a Container note | 20:25 | ||
node | |||
or something like that | |||
sinc Syn('&fact') reduces to it's container | |||
and then only becomes the value right before dispatch if the parameter it's being bound to is not rw | |||
fglock | nothingmuch: the current work is to modularize the compiler a lot, so that we can test these new ideas - you'll be able to write this into a parl module and try it out :) | 20:27 | |
nothingmuch | i won't today | ||
or this week | |||
maybe this coming weekend | |||
(my weekend is fri,sat) | |||
so i just want to toss around food for thought | |||
on the other hand, I am quitting my job | |||
so in one month from tomorrow I should have a lot of free time | |||
fglock | s/parl/perl/ | 20:28 | |
nothingmuch | so, until i can hop on this wagon i still want you to casually review my ideas, or at least pretend you did ;-) | ||
fglock | nothingmuch: in one month I'll completely without time :) YAPC, studies, work... | ||
nothingmuch | so you should work on my ideas now and then i will replace you later ;-) | 20:29 | |
fglock | nothingmuch: sure | ||
nothingmuch | seriously though, this is just food for thought | ||
fglock | nothingmuch: I'm working in the rule language as a separate compiler - audreyt and stevan go on with p6 - porting pugs to p6/p5 | 20:30 | |
and gaal, and TimToady, and... | 20:31 | ||
nothingmuch: we've discussed how MOP could be a plug-in-like thing - that's one example of how things can be modularized | 20:32 | ||
Steve_p | seen TimToady? | ||
Hmmm...no infobot :-/ | 20:33 | ||
Limbic_Region | [13:13] <TimToady> nod | ||
my local time is now 15:34 | |||
ooops, missed something more recent | 20:34 | ||
[14:29] <TimToady> obra: planetsix seems to have syndicated a huge mudball of your old bloggings... | |||
Steve_p | OK, so a few hours ago | ||
20:35
K joined
|
|||
Steve_p | Ahh...I may have it figured out myself | 20:36 | |
fglock | nothingmuch: ping? | ||
Juerd | rafl: You also left a cacert form in my car. You lost it almost 7 years too early ;) | 20:39 | |
TimToady | Limbic_Region: you rang? | 20:41 | |
s/Limbic_Region/Steve_p/ | |||
Steve_p | TimToady, yes, I found something in the MAD code, but I've got it figured out. | 20:42 | |
Just testing now | 20:43 | ||
TimToady | Steve_p: glad one of us has it figured out. :-) | 20:44 | |
Steve_p | It was just a variable initialization out of place. Hopefully, I'm not breaking something else :-) | 20:46 | |
Steve_p would rather no add days to Nicholas's sentence^Wgrant time | 20:47 | ||
;) | |||
TimToady | All sorts of things are out of place in MAD. It's usually a hard choice between fixing it up in C or letting nomad move it back to the "right" place. | ||
But I assume you mean a C variable init out of place... | |||
Steve_p | Yes, a C variable. | 20:49 | |
TimToady | The whole MAD thing was predicated on the notion of being minimally invasive, so if you have a choice between breaking the mainline or making nomad's life harder, definitely make nomad's life harder. | ||
But occasionally you can refactor and get a win-win. | 20:51 | ||
20:51
proefgb joined
|
|||
Steve_p | No worries, it's just a little tweak :-) | 20:52 | |
TimToady | That sound's like the kind of quote you put at the front of the next chapter in that famous novel "Jenga Book". | 20:53 | |
s/'// | |||
TimToady wanders off to take an old-fogey-style nap. | 20:56 | ||
Steve_p | heh | 20:58 | |
21:03
FurnaceBoy_ is now known as FB|afk
|
|||
svnbot6 | r9423 | fglock++ | Pugs/Grammar/Rule - resolved dependencies | 21:10 | |
fglock | pmurias: re "return_block_hack" - any ideas how to fix it? | 21:14 | |
audreyt: ping | |||
audreyt | fglock: pong | 21:21 | |
fglock | audreyt: Pugs::Grammar::Rule is mostly in place, I'm trying to fix some hacks, but I'm out of ideas | 21:23 | |
audreyt: how does the return block "returns"? | 21:24 | ||
audreyt: how does it has access to the whole match? | |||
audreyt: it's currently a hack - it gets compiled after the whole rule is compiled | 21:25 | ||
audreyt: that is, the return is moved outside | |||
audreyt | a sec | 21:27 | |
it doesn't have acess to whole match | 21:28 | ||
it has access to a partially constructed match obj | |||
with the succeeding match before it | |||
fglock | audreyt: ok - I've got an idea how to do this | 21:35 | |
audreyt | cool! | 21:37 | |
fglock | audreyt: I'll make the ruleop abort, returning the subref in a flag - the subref will be called in the root op, which knows what the match is | 21:39 | |
audreyt: this way we can have multiple returns (is it allowed?) | 21:40 | ||
rafl | Juerd: D'OH.. how many? | 21:45 | |
fglock | audreyt: the 'abort' documentation says: "the match was stopped by a { return } or a fail()" :) | 21:46 | |
audreyt: I wrote that, and then forgot it | |||
Juerd | rafl: 1 | 21:57 | |
rafl: Sven's | 21:58 | ||
rafl | Juerd: That's useless anyway. I didn't assure him yet and he already has 150 points. | ||
Juerd | rafl: Shall I shred it or send it to you? | 21:59 | |
audreyt | fglock: multiple returns makes as much sense as multiple returns inside a sub | ||
i.e. makes no sense :) | |||
rafl | Juerd: Well. If it's not a problem for you i'd like to have it back, but you don't need to send it to me right now. | 22:01 | |
Juerd: Maybe if you're sending something else anyway (PBP, gadgets, ..) or when we meet the next time. | |||
Juerd: Easter Hegg maybe? | 22:02 | ||
fglock | audreyt: what if you have an alternation, and for each case you return a different thing? (just a thought) | ||
Juerd | rafl: What's Easter Hegg? | 22:03 | |
rafl | Juerd: A hacker meeting | 22:04 | |
Juerd: eh.cngw.org/ | |||
audreyt | fglock: then you return as soon as one alternation matches | 22:05 | |
Juerd | rafl: I've had enough of far travelling for a while, tbh | ||
audreyt | and maybe you use : for backtrack control | ||
nothingmuch | temp/local grudge: | 22:06 | |
local $i--; | |||
someone find a nice way to make that DWIM but not be "dirty" | |||
good night | |||
audreyt | fglock: perlcabal.org/~gaal/peek/slide37.html | ||
Juerd | nothingmuch: (local $i)-- :) | ||
Though temp. | |||
nothingmuch | in perl 5 it won't work | ||
Juerd | Sure, but that's because local sucks ;) | ||
nothingmuch | did semantics change such that bare 'local $x' retains the outer value? | 22:07 | |
audreyt | stevan: all PIL^N native types become PMCs now | ||
Juerd | I hope so. | ||
Though temp. | |||
rafl | Juerd: OK. How about the ultrabay? | ||
Juerd | rafl: Haven't ordered yet. Will confirm the price to you first. | ||
rafl: Please remind me Monday | |||
rafl: What kind of drive do you want in it? | |||
audreyt | I used S11 names, so Seq is now Tuple, and I call Map "Mapping" | ||
fglock | audreyt: :) - I didn't mean to return twice | ||
rafl | Juerd: OK, thanks. | ||
Juerd: What are the possibilities? | |||
audreyt | stevan: tomorrow I'll see if Bootstrap.pil can be made to run on parrot | 22:08 | |
Juerd | rafl: CDRW/DVD, CDRW/DVDRW, battery | ||
rafl: Or nothing :) | |||
nothingmuch | good night | ||
Juerd: if you feel like being a darling check if the synopses say that? if not i'll try to remember tomorrow ;-) | 22:09 | ||
Juerd | nothingmuch: No, sorry. | ||
nothingmuch | okies | ||
nothingmuch writes todo | |||
rafl | Juerd: I'd like to know the prices for DVD and DVDRW. | ||
Juerd | I'm already in hypermultitasking mode :( | 22:10 | |
rafl | Juerd: Is the battery stuff useful? How long does it run with a battery that fits into a cd drive slot? | ||
Juerd | rafl: Not long. | ||
And it's very expensive. | |||
rafl | Juerd: OK, then it's not useful. | ||
Juerd | The "nothing" option is cheapest. | ||
But puts very little extra value in having the ultrabay :) | 22:11 | ||
OTOH, if you're going to use it only on the road, I'd suggest getting a USB optical drive instead. It's much cheaper. | |||
The ultrabay is mostly valuable for its dockingstation-ness | |||
rafl | Juerd: Thought so. | ||
Juerd: Anyway. Knowing the prices first would be nice. | 22:12 | ||
Juerd | Oh, I should still have the order confirmation for mine | ||
Let's see | |||
160 for ultrabay, 210 for cdrw/dvd | |||
Excl. VAT | 22:13 | ||
22:19
SamB joined
22:28
FB|afk is now known as FurnaceBoy
22:32
uzair_ joined,
hexmode` joined
|
|||
audreyt | I'd like to stay up for longer but can't anymore :) | 22:34 | |
Juerd | Good night, audreyt | ||
audreyt | see you tomorrow :) & | ||
22:35
uzair_ is now known as uzair
|
|||
audreyt | ...and then I spent 30mins journaling ;) | 23:01 | |
sleep for real & | |||
obra | hah | 23:02 | |
sleep well, audrey | |||
audreyt | LeTo++ ingy++ # doing all the hard work on PMCs for Pugs and PMCs for Pugs :) | 23:03 | |
23:12
larsen joined
23:16
justatheory joined
23:19
nnunley joined
23:21
Nouk joined
23:57
|mjk| joined
|