Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2006-04-05

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:23 svnbot6 r9836 | clkao++ | turn on most of the scalar tests.
00:25 stennie joined perl6
00:57 amnesiac joined perl6
01:03 svnbot6 r9837 | fglock++ | PCR - working subscripts parser (postcircumfix); new module Pugs::AST::Expression
01:17 justatheory joined perl6
02:26 xinming joined perl6
02:32 justatheory joined perl6
02:48 DesreveR joined perl6
02:52 mako132_ joined perl6
03:20 hlen joined perl6
03:27 FurnaceBoy_ joined perl6
03:34 justatheory joined perl6
03:52 weinig|out_ joined perl6
04:01 amnesiac joined perl6
04:35 kane_ joined perl6
04:39 qu1j0t3 joined perl6
04:50 sean` joined perl6
05:22 iblechbot joined perl6
05:26 justatheory joined perl6
05:27 alec joined perl6
05:38 justatheory joined perl6
05:55 GeJ joined perl6
06:36 marmic joined perl6
07:16 gaal will there be a way to remove elemets from an array while iterating over it?
07:24 tomyan joined perl6
07:24 arcady it would be convenient
07:25 arcady one of the features of explicit java-style iterators is the ability to do just that
07:28 renormalist joined perl6
07:40 tomyan left perl6
07:44 kane__ joined perl6
07:46 xinming joined perl6
07:55 drrho joined perl6
08:13 nothing_pasta joined perl6
08:16 nothing_pasta joined perl6
08:19 renormalist joined perl6
08:23 renormalist Hi! Anyone awake? -- I'm trying to compile Pugs with PUGS_EMBED="perl5", but have problems. First: Is this what I need to use Perl5 libs via "use perl5:Some::P5::Lib" in Pugs-Code?
08:24 integral yep
08:24 renormalist Second: If I need it, I get compilation error: *** Wasn't able to find 'Perl5_stub.o', aborting...
08:24 whitay joined perl6
08:24 renormalist I installed libperl-dev package and so on but not sure whats' missing
08:24 integral you're building from a totally clean pugs tree?
08:25 renormalist Uh, no, no "make clean"
08:25 renormalist should I?
08:25 renormalist last version was 6.2.11
08:25 integral it'd be best I think
08:26 renormalist ok. I try it. Should this be enough? Any else hints what could be missing when compilation arrives in a few hours?
08:30 renormalist ok. re-compile runs. I'll be back in ~5 hours. :-)
08:43 KingDiamond joined perl6
08:56 whitay left perl6
09:19 awwaiid joined perl6
09:21 ghenry joined perl6
09:35 awwaiid_ joined perl6
09:48 autark .trivia kunyomi_gr4 20
09:53 diotalevi joined perl6
09:56 KingDiamond joined perl6
10:07 bsb joined perl6
10:08 xinming joined perl6
10:22 elmex joined perl6
10:28 snowstalker joined perl6
10:30 kane_ is now known as kane-xs
10:31 hlen joined perl6
10:53 yourlordship_ joined perl6
10:54 yourlordship_ does perl6 has a logo?
10:54 yourlordship_ actually: does perl6 have a logo?
10:59 spinclad one good candidate and two relations:  the Chamelmaera that appeared on the Not'Reilly Parrot cover on April 1, 2000;
11:01 spinclad and the parrot and pug found on the http://www.parrotcode.org and http://pugscode.org sites.
11:05 spinclad (a use case of the Chamelmaera is on slide 11 of http://pugscode.org/osdc/pugs.xul .)
11:07 spinclad don't know if it's anything like official, though.
11:09 xinming audreyt: ping
11:10 xinming hmm, There is a bug which will crash the newest firefox... I think I might not disturbe you. :-/ Sorry audreyt
11:11 yourlordship_ Chamelmaera = chimera?
11:11 yourlordship_ spinclad:
11:11 * nothing_pasta barfs
11:12 obra bad pasta?
11:12 nothing_pasta obra: more like bad oracle
11:13 obra oh
11:13 obra yeah.
11:17 nothing_pasta audreyt: pingf
11:21 clkao obra: isn't it very early for you
11:21 obra It is.
11:21 nothing_pasta q!
11:21 nothing_pasta q!
11:21 obra I um. So. I got back from Japan monday at 11pm. Fell asleep at 1am. Woke at 5am.
11:21 nothing_pasta gh
11:21 obra Took a "nap" at 6pm.
11:22 obra Woke up briefly at 11pm.
11:22 obra Woke up at 6am.
11:22 nothing_pasta at YAPC::NA in toronto i was awake for 30 hours or so
11:22 nothing_pasta went to bed at 22:00
11:22 nothing_pasta woke up at 8
11:22 nothing_pasta then I went to bed at 2, 3 or so every night
11:22 nothing_pasta and woke up at 6
11:22 nothing_pasta except on the last day of the hackathon
11:23 nothing_pasta when I woke up at 9ish
11:23 nothing_pasta i really liked that
11:23 nothing_pasta because I could sleep just a little without being too tired
11:23 obra I'm not so lucky
11:26 nothing_pasta Parse::Binary seems amazingly useful
11:27 nothing_pasta too bad it's undocumented
11:27 nothing_pasta or underdocumented
11:27 theorbtwo I think TimToady said at one point that he expects Perl6 to have a camel just like Perl5, but that was in the context of an RFC saying that the perl6 version should be two-humped.
11:27 theorbtwo (Which is silly, since perl7 would need a three-humped one.)
11:29 KingDiamond joined perl6
11:36 gaal theorbtwo: I suppose we hump that camel when we get to it. or something
11:37 yourlordship_ if we are going to vote for a mascot, i vote for that chimera monster
11:38 * gaal doesn't have to say what he votes for
11:39 * theorbtwo doesn't think we need to define a mascot.
11:39 theorbtwo Let the market take care of it.
11:46 jiing joined perl6
11:51 nothing_pasta i think we need a gay camel who is a ninja, a pirate *and* a doctor
11:58 kolibrie joined perl6
12:02 renormalist integral: Back in bizz. My Pugs can now use Perl5 libs. Thanks.
12:04 Limbic_Region joined perl6
12:12 theorbtwo Aaaargh: "Programming PERL / [by] Wall, Larry ; Schwartz, Randal L. . 1993 "
12:13 theorbtwo Edinburgh - Moray House (Holyrood) - Lending ; 005.133 PER
12:13 theorbtwo Edinburgh needs to learn to put correct records in their card catalog.
12:19 integral renormalist: np :-)
12:25 svnbot6 r9838 | clkao++ | Need IOK_on.
12:31 b_jonas joined perl6
12:31 hugues23 joined perl6
12:37 hugues23 joined perl6
12:45 hugues23 joined perl6
13:13 yourlordship_ left perl6
13:13 stennie joined perl6
13:43 kane_ joined perl6
14:16 hexmode joined perl6
14:16 fglock joined perl6
14:20 pawel joined perl6
14:21 pawel hi all
14:21 pawel is now known as pmurias
14:26 fglock joined perl6
14:27 fglock what's the syntax category of '[+] (1,2,3)' ? it looks like 'quoting precircumfix' :)
14:27 fglock pmurias: hi
14:30 theorbtwo Hm, it's almost just circumfix that takes a code as an argument, and returns a code.
14:30 theorbtwo That'd be [+].(1,2,3), though.
14:31 theorbtwo ...and that assumes a bare operator is a valid code.
14:33 theorbtwo IIRC, one of Larry's early posts about [...] gave it's category.
14:38 renormalist left perl6
14:39 fglock in order to accept a bare operator, it would need to be defined in a mini-language, or there could be a macro called '['
14:47 b_jonas mini-language? the whole point of bnfs is to have mini-languages
14:47 theorbtwo bnfs?
14:49 b_jonas BNF as in Backus-Naur Form, what we use to describe languages to parsers
14:49 theorbtwo We don't.
14:49 theorbtwo We use perl6 grammars.
14:49 theorbtwo But I see your point.
14:50 theorbtwo The idea, however, is to not have /specialized/ mini-languages, or at least not have many of them.
14:50 Juerd Mini languages rock.
14:50 theorbtwo If the user wants to, they should be able to make their own things which can parse like brackets.
15:07 iblechbot joined perl6
15:10 justatheory joined perl6
15:13 bsb Is anyone else bothered by "Arguments" being a single object with a plural name?
15:14 b_jonas bsb: are you a female? do you never wear trousers? are you never bothered it being a single object with a plural name?
15:15 theorbtwo bsb: "Arguments" is the plural of "Argument".
15:16 audreyt bsb: I tried to call it ArgList
15:16 audreyt but that doesn't quite help, and CamelCase sucks
15:16 audreyt then I tried ArgSpec
15:16 bsb Maybe we can rename List to Scalars :)
15:16 audreyt doesn't quite work either
15:16 b_jonas lol
15:16 audreyt larry called it a Tuple
15:17 audreyt but then we realized it can alsohold named args
15:17 b_jonas well, I do have the policy that I don't name an array @foos only @foo
15:17 audreyt so, Ithought of the .arguments thing that javascript does and went with it
15:17 audreyt better names definitely welcome; it also bothers me
15:17 b_jonas what about Frame as in stack frame? no that's not a good name either.
15:17 audreyt the counterpart is Signature
15:18 audreyt which is not called "Parameters"
15:18 audreyt again an inconsistency
15:18 audreyt You bind the right-hand-side _____ to the left-hand-side Signature in :=
15:18 audreyt fill in the blank
15:18 bsb Invocation, bleck
15:19 audreyt nah :/ conflicts with "Invocant"
15:20 b_jonas Tail? no, that's stupid too.
15:20 audreyt I'd call it Arglist but it's not really a list
15:20 audreyt (has named parts)
15:21 bsb Typeglob :)
15:21 audreyt we thought about that too :)
15:21 audreyt maybe we can call it a Blog
15:22 audreyt "like a glob but better"
15:22 b_jonas lol
15:22 b_jonas ArgData?
15:22 audreyt Perl 6: Blog-based language
15:22 audreyt "you can do anything with Signatures and Blogs"
15:22 b_jonas Bug then
15:23 audreyt Argdata is also plural... and has the "static data" connotation
15:25 bsb I can't even think of any C.S. terminology to steal
15:26 Qiang joined perl6
15:27 bsb Also, shouldn't Arguments be slotted into the smartmatch table somewhere
15:28 bsb I'm not sure how, I'm still reading about them
15:29 bsb $arguments ~~ $signature
15:29 bsb ?
15:30 audreyt Match isn't in S04 either
15:30 audreyt and Arguments is isomorphic to Match
15:31 audreyt I guess
15:32 audreyt "or" of all the inv/named/pos/block parts?
15:32 audreyt I don't know, I'm not sure if it even makes sense
15:34 bsb thought it might be nice for dispatching with a given/when
15:34 bsb (say if the multimethod hyperspace was too confusing)
15:35 audreyt example?
15:36 gaal helloooo. sorry to repeat my query from before, but will we have a way to remove items from an array while iterating over it?
15:36 autark joined perl6
15:36 * gaal tried doing this in C++ today and finally found a reason to hate the language
15:36 gaal then I realized it's not elegantly doable in Perl 5 either
15:37 gaal s/C++/STL C++/
15:37 rgs because the stack is not refcounted.
15:38 gaal which stack?
15:38 audreyt for @array.kv -> $k, $v { @array.delete($k) if $v }
15:38 audreyt like this?
15:38 gaal yes but does that work? :)
15:38 audreyt sure; you are just undefing elements
15:38 rgs perl five's argument stack
15:39 gaal audreyt: ah, no no; I meant think of the array as a list: remove an item (shortening the arary)
15:39 gaal rgs: how's that related to the problem?
15:39 audreyt @array := gather { @array.map:{ take if $v } }
15:40 gaal audreyt: what's the memory profile of that?
15:40 gaal of course I thought of functional languages but it's only in haskell that that's cheap.
15:40 chris2 joined perl6
15:40 gaal ie is gather/take lazy?
15:40 audreyt gaal: I think it will alloc at most twice the size of @array, but involve no copy
15:42 audreyt we can make it lazy with a
15:42 audreyt lazy { take }
15:42 gaal also, I'm not sure this is my precise problem: suppose I have general imperative code that iterates over a list, and might decide among other things to drop an element
15:42 gaal as it visited it.
15:42 audreyt so you really want a deleting-splice
15:43 gaal yes, which in pure c doubly-linked lists is straightforward
15:43 gaal can you do it in Perl 6 w/o confusing the for?
15:43 gaal (in Java apparently you can)
15:44 audreyt well, if the .kv is to work on streams
15:44 audreyt then it cannot be strict, and hence will indeed be confused
15:44 gaal :(
15:44 audreyt though you can calibrate it with a redo
15:45 audreyt which would work even in p5 I believe
15:45 audreyt it's klugy though.
15:45 gaal unless there's some way to mark an iterator as dirty, which is kind of a kludge for this particular application
15:45 audreyt aye
15:45 gaal (which incidentally is what i suspect java does)
15:45 audreyt *nod*
15:46 gaal phewey.
15:46 gaal anymoose, I'm off for home, see you in a few
15:46 audreyt cool. I'm off to sleep too
15:46 audreyt though I slept for 16hrs yesterday
15:46 gaal dream of no iterators
15:46 audreyt :)
15:46 audreyt &
15:48 amnesiac joined perl6
15:50 mj41_ joined perl6
15:51 vel joined perl6
15:53 mj41_ joined perl6
15:54 pmurias fglock: do you have any experience with xs?
15:58 pmurias you said using PGE would be inpractical, would embedding parrot solve any of the issues?
15:58 pmurias considering trying to do it today
16:48 xinming joined perl6
16:55 TimToady fglock: a [+] 1,2,3 is a prefix_circumfix_meta_operator, I expect.
16:56 TimToady And the insides must be an existing infix operator or it'll be ambiguous with [1,2,3].
16:56 TimToady As a whole [+] parses as a list operator token such as "print".
16:57 TimToady But it would appear the the synopses don't actually list all the grammatical categories in one spot...
17:03 _bernhard joined perl6
17:27 gaal TimToady: the latest update to S03 doesn't say where the programmer sets this default identity value
17:28 gaal also there's a misformatted line near the end
17:30 ruz joined perl6
17:33 Ishvires joined perl6
17:34 arcady gaal: the way java does it is via calling the remove() method on the iterator (not the list object itself)
17:34 arcady and gets angry if you try to modify the list directly
17:34 arcady so presumably the iterator keeps track of what needs to be removed
17:36 ghenry joined perl6
17:38 gaal arcady: yes, looks somewhat kludgy to me
17:38 gaal presumably it just raises a flag in the iterator state that says "noop the next next"
17:39 gaal even if this is conceptually clean in some perspective, we can't readily steal it because we don't have an explicit iterator :)
17:41 gaal .oO( &?ITERATOR.delete )
17:41 theorbtwo TimToady: I hope [.{}] (%hash, @path) still works, so it doesn't need to be an infix?
17:42 gaal wow, nice catch t02
17:42 theorbtwo Thanks.
17:43 Ishvires left perl6
17:52 siosiosios joined perl6
17:52 ruoso joined perl6
17:54 svnbot6 r9839 | nwc10++ | SvIOK_on(target); is too dangerous, as it can cause floating point values to
17:54 svnbot6 r9839 | nwc10++ | be truncated to integers when the target is read. (See the source code comment
17:54 svnbot6 r9839 | nwc10++ | for more details)
17:55 clkao bwahaha, that's nicholas
17:56 * ruoso is sad 'cause he's working too much and having no time to play porting lrep to parrot...
17:58 pmurias joined perl6
17:58 ruoso all work and no play makes Jack^H^H^H^Hruoso a dull boy!
18:00 pmurias ruoso: hi!
18:03 ruoso pmurias, hi
18:05 wilx` joined perl6
18:08 b_jonas joined perl6
18:14 justatheory joined perl6
18:20 GeJ joined perl6
18:31 fglock pmurias: I've asked parrotfolks about the state of embedding parrot - it's not being worked on - I think it would be nice if somebody worked on it
18:32 mako132 joined perl6
18:32 pmurias fglock: how usefull would it be?
18:33 fglock TimToady: I'm trying to figure out the grammatical categories, mini-languages and such. Maybe I should try to document this somewhere
18:34 fglock pmurias: it allows interoperation - you would be able to call parrot languages from p5 (such as PGE-rules, but there are others)
18:35 fglock it's not useful to me, but useful to perl5 in general
18:36 fglock the current Inline::Parrot can/could do this, but it's not efficient
18:36 pmurias fglock: seen the code
18:37 fglock theorbtwo: what does [.{}] (%hash, @path) do?
18:37 elmex joined perl6
18:38 theorbtwo %hash{@path[0]}{@path[1]}...
18:41 pmurias fglock: i'll put my ~ under version control (lost a script-fu script today and they are a pain to write) and i'll work on embedding parrot(i don't have any xs fu so don't expect quick results)
18:42 fglock pmurias: I can give you co-maintainer to inline::parrot, so that the xs version can be kept together with the pure perl version - just ask me when you need it
18:50 rashakil joined perl6
18:51 lumi For the Arguments object, there's a CS name similar and free
18:52 lumi Which is "record"
18:55 * Juerd will use [.{}] (%hash, @path) so often that he'll probably alias it to something that is actually typable :)
18:56 wolverian %hash.walk(@path) # ?
18:58 Juerd I'd expect anything called 'walk' to iterate linearly, not to dive into a tree structure
18:58 justatheory joined perl6
18:58 wolverian .dive? :)
18:58 Juerd Heh.
18:58 wolverian (python's walk dives into the filesystem structure)
18:58 Juerd Perhaps :)
18:59 Juerd But Python has bad identifiers all over the spectrum. They're often an example of how not to name things.
18:59 wolverian yeah. and homonyms. 'in' comes to mind.
19:00 Juerd Homonyms? We have them too, but we're PROUD of them. We call them context sensitive ;)
19:00 Juerd Or syntax sensitive
19:00 Juerd (select)
19:00 fglock [[ @path ]] %hash
19:00 Juerd (do)
19:00 wolverian we're getting rid of some. eval.
19:01 Juerd fglock: Hmmmh?
19:01 Juerd fglock: Don't steal my nested arrayrefs from me.
19:01 Juerd afk
19:01 fglock it's a a reduction operator on subscripts
19:02 Juerd That explanation, combined with that syntax, makes me think of PHP. No offense.
19:02 Juerd afk
19:06 fglock ' %hash [.{}] @path ' is more likely to pass through the parser
19:09 fglock but reduction is list-infix - it needs an operator between %hash and the subscript list
19:13 theorbtwo fglock: Why?
19:13 theorbtwo [...] is a prefix list operator.  It figures out what the operator inside it is, and calls it by it's full name.
19:14 theorbtwo That is, postcircumfix:<.{}>($hash, $element).
19:15 fglock my last reduction means %hash @path[0].{}( @path[1].{}( @path[2] ... ) )
19:20 theorbtwo Ah, but I think it's a case of it being ...postcircumfix:<.{}>(postcircumfi​x:<.{}>(postcircumfix:<.{}>(%hash, @path[1]), @path[2]), @path[3])...
19:21 theorbtwo The magic is in how it figures out if it's left- or right- associative, assumadly by checking the assoc property of postcircumfix:<.{}>
19:26 fglock [&postcircumfix:<.{}>.assuming( %hash )] @path
19:31 fglock YAPC::Brasil stuff: http://gnosislivre.org/twiki/bin/v​iew/PerlMongersSSA/YapcBrasil2006
19:35 b_jonas uh. so it's a fold/reduce/inject/insert metaoperator? I thought that had a different name last time
19:35 justathe1ry joined perl6
19:36 fglock b_jonas: we are just playing with the possible syntax - these things don't work (yet)
19:39 b_jonas well, I like it better this way, as a binary operator, not a unary one
19:40 FurnaceBoy joined perl6
19:55 stevan joined perl6
19:59 larsen joined perl6
20:00 Limbic_Region joined perl6
20:12 meppl joined perl6
20:13 meppl joined perl6
20:17 * ruoso wonders if a parrot gcc front-end would ever be possible
20:18 ruoso if Perl 6 will allow me to write a strongly typed program... this type of program would be 'compilable'
20:18 * ruoso wonders if he's completely out of his mind...
20:18 b_jonas no, you're not. not completely at least.
20:18 b_jonas not more than others here
20:20 stevan_ joined perl6
20:20 ruoso so... it means that we'll be able to rewrite parrot in Perl 6 at some time... that would be beautiful..
20:23 SamB joined perl6
20:30 avar ruoso: I think Perl 6 still needs a compiling compiler
20:30 FurnaceBoy_ joined perl6
20:30 b_jonas I don't think so
20:30 ruoso avar, you mean, in place of gcc?
20:31 b_jonas compiling an interpreted language just makes things worse
20:31 avar b_jonas: That statement makes no sense
20:31 ruoso b_jonas, but what if an interpreted language offer ways of writing in a not-so-dynamic way
20:31 ruoso this type of programs can be compiled
20:31 b_jonas avar: yes, but
20:31 avar b_jonas: It's only an interpeted language because no to-machine-code compiler exists for it
20:32 avar b_jonas: Hence it's not a definition of the language but of its compiler
20:32 avar There are both C interpeters and compilers around for instance
20:32 ruoso avar, if you have a reference counting garbage collector... it's kind of hard to compile it...
20:32 svnbot6 r9840 | fglock++ | PCR: added more info to the Expression AST
20:32 b_jonas but perl6 inherently dynamical, so you wouldn't get a good performance compiling it. it's much more dynamic than java.
20:33 ruoso b_jonas, my point is that you *can* write a not-so-dynamic program in Perl 6
20:33 b_jonas perl6/parrot won't have a reference-counting gc
20:33 b_jonas ruoso: I don't know. maybe.
20:33 ruoso b_jonas, and that these not-so-dynamic written programs can be compiled
20:34 avar You could however make a subset of Perl 6 that would lend itself well to compiling to machine code
20:34 avar i.e. no eval(), no need-to-execute-to-lex-the-stuff etc.
20:34 ruoso avar, that's the point...
20:34 avar and write a compiler for that
20:34 avar ruoso: I know;)
20:35 b_jonas so will you be able to write a program where you don't have to keep checking types, array limits, overflow, and even the passing of arguments to functions will be static?
20:36 avar I suspect once you were done doing that you wouldn't have anything like Perl at all;)
20:36 ruoso hmmm
20:37 b_jonas what I can think of is number-crunching, where compiling might be advantageous, but again the parrot vm will be much better in that than, say, perl5
20:38 b_jonas or even java
20:39 ruoso but if you have: "my $a is Int; my $b is Str; $a = $b;" the conversion is presumed... the emitted code can include the conversion even the source not checking it...
20:40 ruoso ruoso, it's something you can get in the AST level
20:40 b_jonas yes, but even for a code like that, most of the compiled code will either have long repetitions or most of it will be C function calls
20:41 ruoso s/C funtion calls/shared library function calls/
20:41 b_jonas and I think it's more efficent to interpret that kind of code with a vm instead of compiling it
20:41 ruoso shared libraries could be written in Perl 6 too
20:41 ruoso and compiled themselves...
20:41 b_jonas don't trust me of course, I don't know much of this topic
20:41 pmurias it depends on how advanced the compiler machinery is
20:42 avar Why bother with it at all though?
20:42 ruoso I was thinking if parrot could be self-hosted at some time...
20:43 b_jonas I don't see the connection
20:44 avar parrot written in PASM?
20:44 b_jonas it would be self-hosting only if you could compile the C code of parrot to parrot code
20:44 * pmurias *shudders*
20:44 pmurias avar: it would take the "we use c++ for Speed" argument out of the propaganda game
20:45 ruoso b_jonas, or if you could compile PASM to i386 and rewrite parrot in PASM
20:45 b_jonas oh, I see
20:45 b_jonas but I think it's impossible to rewrite parrot in pasm
20:45 ruoso b_jonas, why?
20:46 b_jonas it would still depend on some objects whose code is written in C, so it wouldn't really be a full rewrite to parrot I think
20:46 b_jonas but maybe I'm wrong
20:47 b_jonas no, forget that, that's stupid
20:47 b_jonas you could rewrite parrot in low-level parrot, but then you'd have to write even a gc and hashes etc
20:47 b_jonas and lambdas and continuations etc
20:47 b_jonas which is terribly impractical
20:48 ruoso but beatiful...
20:48 ruoso :)
20:48 b_jonas it's like rewritng parrot in assembly. you wouldn't use the features of parrot which makes them better.
20:49 b_jonas it wouldn't be beautiful. and automatic compilation from C to parrot could do it the best.
20:50 ruoso b_jonas, but you don't need to write it in PASM actually... just in any language that can be compiled to Parrot... including Perl 6
20:50 ruoso or C
20:50 theorbtwo C can be compiled to PASM?
20:51 ruoso theorbtwo, maybe not yet... but why not?
20:51 theorbtwo Certianly can't do language interop with it.
20:51 theorbtwo I suppose you could, but I don't think it'd make much sense to do so.
20:52 theorbtwo There's a huge impedence mismatch with pointers.
20:52 theorbtwo To C, memory consists of a big huge array of bytes.
20:52 theorbtwo To Parrot, it consists of a bunch of objects.
20:52 pmurias unless we want to compete with gcc in the static language niche
20:53 pmurias you would propably need to defined custom ops to get a decend execution speed
20:53 pmurias s/defined/define
20:55 b_jonas you mean like unrestricted pointer manipulation and the like?
20:55 fglock "self-hosting parrot" made me remember this for some reason - http://www.acm.org/classics/sep95/
20:58 b_jonas ah, quines written in C?
20:59 fglock self-hosted compilers
21:00 b_jonas oh, I know that speech
21:00 b_jonas that's the classic about how he would hide a trojan in the compiler
21:00 b_jonas it's a great speech
21:10 Limbic_Region joined perl6
21:10 avar How does one go bootstraping a computer, given that you have no other computer
21:10 avar I.e. how did they do it in ~1940-60
21:12 justathe1ry is now known as justatheory
21:13 theorbtwo avar: Rewire the computer.
21:13 avar In this scenario there would be no computer to rewire, and once I'd constructed it why would I be rewiring it?
21:14 theorbtwo That's how they did it in the bad old days.
21:15 theorbtwo In the slightly less bad old days, convert everything to machine code by hand, then modify the memory, possibly.
21:15 theorbtwo I'm not old enough to remember.
21:16 * ruoso doesn't undertand how 'bootstrap' applies to hardware...
21:17 avar A "computer" here would be hw+sw
21:17 avar But then again you also need to bootstrap hardware in a similar way
21:18 avar you need a high-tech facility to construct a cpu factory for instance, and what do you need to construct a high-tech facility?
21:18 avar Another high-tech facility
21:18 theorbtwo In the modern age, you compile your BIOS down to machine code on a different machine, burn it to a ROM, put it in the socket, and boot.
21:19 ruoso theorbtwo, that's software...
21:19 avar I'm facinated by the general idea of bootrapping
21:19 theorbtwo avar: Check out reprap.org.
21:20 avar Like, say you had a brand new earth without any man-made technology, yet all the people had lived in the old earth, how quickly could you get back to "modern" civilization given that the knowledge of how to build complex stuff wouldn't die out?
21:20 ruoso theorbtwo, wow... that's bootstrapping hardware...
21:20 FurnaceBoy_ I've been thinking about that recently
21:20 theorbtwo Exactly.
21:21 theorbtwo It's not as easy to bootstrap as all that, actually.  I've been trying.
21:21 FurnaceBoy_ there was a very long thread about that ... somewhere ... (wishes I could remember)
21:21 theorbtwo Now, my playing-with-power-tools skills are very rusty.
21:21 avar Just thiink about the complexity of the technology needed to make something like a modern hammer for example
21:21 theorbtwo ...but the main devs are playing with a very expensive piece of hardware that does what they're cheap one does, and bootstrapping with that.
21:21 theorbtwo A modern hammer?  A decent bit.
21:22 theorbtwo But you can make a non-modern hammer that's nearly as good, if a bit less good-looking.
21:22 FurnaceBoy_ yes, but how much is germane to function. I'm not sure a hammer is agreat example
21:22 FurnaceBoy_ for that reason
21:22 ruoso avar, actually (/me puts anthropologist hat) culture in this way is a constant bootstrap proccess..
21:22 avar Or being able to take 50 trees and cut them down in a way sutable for building a house
21:23 FurnaceBoy_ that stuff is easy compared to telecommunications ;-)
21:23 FurnaceBoy_ or aviation
21:23 FurnaceBoy_ you kinda learn it, or die of exposure ;-)
21:23 ruoso i mean... the same way gcc lost it's assembler that was substituted by C code, culture lost the older knowledges that were substituted by newer knowledges...
21:24 ruoso breaking a stone to make an axe is quite hard actually... few people would know how to do that these days...
21:24 avar Exactly
21:24 FurnaceBoy_ I'm speaking relatively
21:25 avar But probably about as many as could do it 5000 years ago due to increasing population numbers
21:25 justatheory joined perl6
21:26 ruoso avar, I don't think so... only very specialized people have the hability of make scultures..
21:26 ruoso many people did make tools from rocks...
21:27 avar mm
21:28 fglock anyone knows of a shift-reduce parser in perl5? I've found this: http://perl.plover.com/units/units
21:28 avar How many people would be able to survive in the wilderness today for example
21:28 integral fglock: Parse::Yapp I thought was just yacc's shift-reduce system, but for perl
21:29 KingDiamond joined perl6
21:29 Limbic_Region after googling, I second integral's statement
21:30 fglock I'll take a second look - thanks
21:31 integral mjd has a hack on that website that postprocesses yacc's output into being perl (by interpreting the tables yacc uses to drive it's shift-reduce parser)
21:33 theorbtwo I think if you got everybody from this earth onto new-earth, with magically un-reverse-engenerable universal communications, we'd do OK.
21:33 theorbtwo Without the comms, we'd quite possibly face 99% dieout.
21:33 avar We need to terraform mars!
21:33 theorbtwo >99%, even.
21:33 Limbic_Region fglock - you want a perl implementation because you don't want to be bothered porting the existing C ones?
21:35 b_jonas I agree. We'd die out before we could do anything useful.
21:36 b_jonas one of the books of Jules Verne talks about bootstrapping technology but isn't very realistic
21:36 fglock Limbic_Region: I want something that I can wrap that make it work like a p6 rule, for the p5 based p6 compiler
21:37 b_jonas (meaning that the people don't die out)
21:37 fglock ... to make it work like
21:38 * Limbic_Region assumes that means with as little effort as possible so porting the C based ones is sub-optimal
21:39 fglock I want something tested to start with - it can be replaced later
21:40 fglock Parse::Yapp seems to be what I need - will make some tests
21:40 Limbic_Region Ok - well all I can find for Perl is Parse::Yapp
21:40 Limbic_Region everything else is Java or C
21:45 * Limbic_Region wonders if Ovid built a shift-reduce parser as part of his Prolog in Perl work
21:52 fglock I'll probably need to modify it, because my tokens may be defined by p6 rules
21:53 theorbtwo Parse::Yapp won't work at all, then, I expect...
21:53 theorbtwo ...its algo, IIRC, is based on figuring out "if the next char is foo, it must be a bar".
21:54 theorbtwo I could be wrong, though, it's probably worth a good loog.
22:04 p5evalbot joined perl6
22:04 PolettiX joined perl6
22:20 p5evalbot joined perl6
22:26 azuroth in "$foo .set $y" is .set infix?
22:27 fglock azuroth: I think so
22:27 fglock biab &
22:28 fglock left perl6
22:28 azuroth nifty. so [.set] ($a,$b,$c) might be like... $a.set( $b.set($c) ) ?
22:30 theorbtwo azuroth: OTOH, in $foo.set($y), it's not infix; we assumed you defined an infix .set operator.
22:30 theorbtwo OTGH, it might work anyway.
22:30 theorbtwo ...in the same way [.{}] works anyway.
22:31 azuroth .{} like .[]? wow
22:34 PerlJam yeah, it's magic :)
22:42 p5evalbot joined perl6
22:45 p5evalbot joined perl6
22:48 justathe1ry joined perl6
22:48 gaal uhhhh, doesn't having a nullary MMD variant for infix:<*> and the like mean their proto is more or less useless?
22:48 p5evalbot joined perl6
22:48 TimToady Hmm.
22:49 TimToady can probably still make it work out somehow.  Both args to proto are optional, maybe?
22:49 TimToady Hmm.
22:49 TimToady proto doesn't have to be shortest form, maybe?
22:49 TimToady Hmm.
22:49 azuroth 'sub foo(){}' and 'sub foo{}' are the same?
22:49 gaal what's bad about an identity property?
22:50 gaal TimToady: what you Hmm three times is false?
22:50 TimToady :)
22:50 TimToady :)
22:50 TimToady :)
22:51 PerlJam does that make him the antisnark or something?
22:51 p5evalbot joined perl6
22:51 TimToady azuroth: no, the problem is having multi foo () plus proto foo ($x,$y).
22:52 TimToady if it is a problem...
22:53 TimToady The infix form always knows at compile time it has two args, so the situation only arises for reduce and for foo(*@args).
22:53 azuroth so multi foo(){} is like multi foo{}? *better look it up*
22:53 TimToady No, multi foo{} would be multi foo (*@_) {}
22:54 * clkao reasks yesterday's question. sub foo (@a) { }, can we modified @a[2] in foo()?
22:54 clkao s/modified/modify
22:54 PerlJam clkao: if @A IS RW
22:54 TimToady Not sure since Audrey did away with refs.  :)
22:54 PerlJam er pardon the caps
22:54 clkao yes, but in pugs' test it's expecting we can modify @a even if it's not rw. only in scalar case it's ro
22:55 clkao i was kindof wonderinf if that's because we see array as object and it's simply methods operated on it
22:55 TimToady But we've basically unified all the containers now, so I'm not sure if that still holds.
22:55 gaal that sounds.... cish to me (const * char bleh)
22:56 gaal (that == being able to modify @a's elements)
22:56 arcady joined perl6
22:57 gaal I'd better go to bed. Have a moose everyone &
22:57 PerlJam well, that depends on if we mean "modify @a's elements in the calling environment" or not I guess.
22:58 TimToady You certainly can't push onto a readonly @a.
22:59 TimToady But in the case of *@a we would really want the default readonliness to distribute to its elements.
23:05 TimToady audreyt: maybe Arguments and Match objects can be unified as a Capture object.
23:13 drbean joined perl6
23:14 apple-gunkies joined perl6
23:35 justatheory joined perl6
23:43 justathe2ry joined perl6
23:53 zgh joined perl6
23:58 PerlJam how often do the docs on the website update from the docs in subversion?
23:59 Juerd Daily, iirc
23:59 * Juerd z

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo