Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-05-04

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:00 sorear the cloning IMO should be done in PAST::Compiler; PAST::Block should have a :closure(1) parameter that Rakudo sets when appropriate
00:00 sorear I'm going to ping pmichaud about that for tommorrow's #rs
00:01 TimToady um, q:s doesn't turn subst mode
00:01 sorear q:s is quote with scalar interpolation, isn't it?
00:01 TimToady :s would turn on scalar interpolation
00:01 masak sorear: I was looking more for an implementation-independent answer. :) I'm trying to ready myself for doing this in Yapsi.
00:03 TimToady (there's also no trans slang now, since it turned out to be the same as character class slang)
00:04 masak that mostly makes sense.
00:04 sorear TimToady: where did subst and trans come in?
00:05 masak the only difference, it seems, is that charclasses don't care about ordering.
00:05 sorear masak: Oh.  The cloning should be done at the execution time of the block statement.
00:06 sorear masak: { $p } compiles into a NEWCLOSURE instruction, which constructs a closure / PAP / trampoline object in the heap, using an entry pointer (static data) and an environment block
00:06 * masak swoons
00:06 masak I guess I asked for it.
00:06 sorear why?
00:06 sorear I'm trying to talk as abstractly as I can
00:06 masak you're doing a fine job. :)
00:06 sorear there are lots of ways lexical scope has been implemented
00:07 TimToady actually, clones are supposed to be done on entry to the surrounding scope
00:07 sorear it's funny, really; when lexical scope was first introduced, it was derided as ivory tower nonsense too inefficient to be used in the real world
00:07 masak TimToady: so the 'foo' block in this case?
00:07 masak sorear: and now they're everywhere.
00:07 sorear real programmers used dynamic variable lookup for everything and suffered
00:08 sorear yeah, well, eventually somebody invented frame pointer + offset
00:08 sorear and lexical scopes weren't inefficient anymore
00:09 masak in Yapsi we use hashes of hashes :)
00:10 TimToady masak: see S04:1618
00:10 TimToady errands &
00:10 masak yay, specref!
00:15 * sorear ponders patching grok to generate a [####] in front of every paragraph
00:16 sorear TimToady: &:: is sensitive to lexical scoping?  wow there's so much I don't know!
00:16 eternaleye joined #perl6
00:18 masak sorear: why a [####] ?
00:18 masak oh, you mean a first-line indent?
00:19 sorear I mean with the original line number.
00:19 masak oh.
00:19 sorear grok, like any good POD6 renderer, rewraps lines, so line numbers in output are meaningless
00:25 masak sorear: twice in a row now, I've tried and failed to clone your rakudo repo.
00:26 masak I'm getting this error: http://gist.github.com/388783
00:34 envi^home joined #perl6
00:35 masak 'night, #perl6
00:41 sorear now that is strange
00:43 snarkyboojum joined #perl6
00:44 sorear phenny: tell masak - that exact command worked fine for me 30 minutes after you pasted.  Could be a race, or a bug fixed before / introduced after git 1.6.6
00:44 phenny sorear: I'll pass that on when masak is around.
01:00 nihiliad joined #perl6
01:04 lue joined #perl6
01:04 lue Hello there!
01:07 eternaleye joined #perl6
01:08 snarkyboojum hi lue
01:20 snarkyboojum lue: what are you working on re perl 6 atm?
01:21 lue Right now, I'm trying to code a DNA parser :)
01:21 lue on contributing to Rakudo, nothing. Can't think of anything.
01:26 yinyin joined #perl6
01:26 nihiliad joined #perl6
01:38 snarkyboojum lue: DNA parser? Using Perl 6? :)
01:38 sorear lue: you'll need about 1PB of RAM for that.
01:38 sorear what's the going price on that thesedays?
01:39 * sorear looks through the roadmap for cool things to break (in)
01:40 lue no, it takes the base pairs (DNA code) and converts it to binary code, ready for conversion to readable characters!
01:41 lue if anything pops up in the noncoding DNA (which is what I'm going for), it'll be very creepy
01:43 lue such as a string of "42 42 42 42 42 "(etc.) or a message, i.e. "WE ARE SORRY FOR THE INCONVENIENCE".
01:44 TimToady "MIND THE GAP"
01:44 snarkyboojum sorear: fix the REPL to remember variables from one line to the next? :)
01:45 lue ooh! that'd be nice :)
01:45 sorear that... ties into other projects of mine
01:46 lue TimToady: the gaps in the human genome could mean I get "The Question to Life, the Universe, and Everything is [gap]. Happy?"
01:48 snarkyboojum does there exist a working "play with rakudo" web gui type app?
01:49 snarkyboojum there used to for pugs apparently...
01:49 lue I just need to know: if I type «my $filein = open("textfile.txt")», will I get all the contents of textfile.txt in $filein?
01:51 TimToady no
01:51 TimToady but if you add a .slurp you wil
01:51 TimToady will
01:51 sorear try slurp("textfile.txt")
01:51 TimToady that too :)
01:52 snarkyboojum was about to say that :)
01:52 TimToady my @lines = lines('textfile.txt') is also supposed to work
01:52 * sorear thinks he just figured out how to do crazy lexical persistence stunts
01:52 lue a simple s/open/slurp/ then.
01:52 tylerni7 joined #perl6
01:52 snarkyboojum slurp does an open for you
01:52 sorear lines should work too
01:52 TimToady and a close
01:53 alester joined #perl6
01:53 TimToady rakudo: say lines('/etc/passwd')
01:53 p6eval rakudo 1eef08:
01:53 p6eval ..OUTPUT«root:x:0:0:root:/root:/bin/bashdaemon:x:1:1:daemon:/usr/sbin:/bin/shbin:x:2:2:bin:/bin:/bin/shsys:x:3:3:sys:/dev:/bin/shsync:x:4:65534:sync:/bin:/bin/syncgames:x:5:60:games:/usr/games:/bin/shman:x:6:12:man:/var/cache/man:/bin/shlp:x:7:7:lp:/var/spool/lpd:/bin/shmail:x:8:8:mail:/var…
01:53 TimToady wahoo
01:53 sorear theoretically, p6eval runs in a chroot
01:53 snarkyboojum and lines is lazy?
01:53 TimToady in theory
01:54 snarkyboojum it uses gather in rakudo by the looks of it
01:54 colomon lue: the difference between lines and slurp is that lines creates a lazy array of lines from the file, and slurp creates a single string for the entire file.
01:54 lue I'd prefer the string for my case. Good to remember though.
01:54 sorear and our strings aren't fully lazy
01:54 TimToady which could, conceivably, someday, really be a lazy string on the order of cat(lines($file))
01:55 colomon I'm looking forward to cat, actually.  :)
01:55 sorear (gawking at the 24 byte per character String representation in Haskell was so much fun)
01:55 colomon TimToady:  is it presumed that operations like match and split on a cat string will be fully lazy?
01:55 TimToady yes, well, that's still not grapheme based
01:55 nihiliad joined #perl6
01:55 snarkyboojum lazy cats eh
01:56 sorear TimToady: oh?  lazy strings ARE planned for Rakudo?
01:56 sorear s/Rakudo/Perl 6/
01:56 TimToady colomon: presumably, as long as you don't ask for the length of the string
01:56 lue sb: what Andrew Lloyd Webber didn't have :)
01:56 colomon TimToady: \o/
01:56 TimToady but not necessarily for 6.0
01:56 colomon snarkyboojum: just don't get me started thinking about lazy Rats.
01:57 colomon ;)
01:57 sorear I prefer lazy infinite continued fractions, personally
01:57 snarkyboojum colomon: :)
01:57 TimToady just so you don't ask for the last digit of pi
01:59 lichtkind TimToady: is there a hidden difference between the metoops: zipwith and hyper ?
01:59 colomon TimToady: I don't know what anyone else has planned (and maybe this is totally impractical) but I was kind of hoping to see Cat in Rakudo later this year.
01:59 snarkyboojum isn't Mu the last digit of pi? :)
01:59 colomon lichtkind: explicit differences, even.
01:59 Psyche^ joined #perl6
01:59 colomon zipwith is lazy.  hyper is hyper.
01:59 lichtkind colomon: what please?
01:59 lue .oO(lazy length of string...)
01:59 lichtkind ah thanks
02:00 lichtkind colomon: hyper meaning eager?
02:00 colomon lichtkind: yes.
02:00 snarkyboojum or hyperactive? :)
02:00 sorear colomon: @*ARGS.map(&slurp).each.say ?
02:00 colomon (Though the implementation might be lazy at the moment, now that I think about it.)  :)
02:00 sorear s/say/print/
02:01 snarkyboojum is this the inspiration for Mu in Perl 6? http://en.wikipedia.org/wiki/Mu_(negative)
02:01 * sorear studies YOU ARE HERE
02:02 colomon also, zipwith stops when either source list runs out.  hyper either extends the shorter list to be the same length as the long one, or fails if they are different lengths, depending on how the >>s point.
02:02 snarkyboojum gosh, there are going to be some curly Perl 6 interview questions one day
02:03 colomon rakudo: ((1, 1, *+* ... *) Z/ (1, 2, 3 ... 20)).perl.say
02:03 p6eval rakudo 1eef08: OUTPUT«(1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1, 1/1)␤»
02:03 colomon whoops, gather bug
02:03 colomon rakudo: ((1, 1, *+* ... *) Z/ (1 .. 20)).perl.say
02:03 p6eval rakudo 1eef08: OUTPUT«(1/1, 1/2, 2/3, 3/4, 1/1, 4/3, 13/7, 21/8, 34/9, 11/2, 89/11, 12/1, 233/13, 377/14, 122/3, 987/16, 1597/17, 1292/9, 4181/19, 1353/4)␤»
02:04 lichtkind colomon: thank you
02:04 colomon sorear: if you could figure out how to get closures working correctly, you'd be a hero of the revolution.
02:04 snarkyboojum colomon: was that the bug biting your church numbers post?
02:05 colomon snarkyboojum: yes.
02:05 sorear colomon: tomorrow, I'll persuade pmichaud to implement closures in PAST::Compiler
02:05 colomon sorear: that will work too, of course.  ;)
02:05 sorear the problem is very simple
02:05 sorear closures need to be explicitly constructed in Parrot
02:05 sorear PAST::Compiler... doesn't do it
02:05 sorear look at --target=pir output
02:05 colomon snarkyboojum: and its the gather bug, too.
02:05 nihiliad joined #perl6
02:06 colomon *it's
02:06 lue what about binary IO? (in other words, buf)
02:06 colomon lue: that's masak's GSoC project.
02:06 sorear the sequence to generate a new closure is:
02:06 snarkyboojum masak++
02:06 sorear .const Sub $P1 = "..."
02:06 sorear $P1 = newclosure $P1
02:06 sorear capture_lex $P1
02:06 sorear if you leave out the second line, you get a lighter-weight lexically scoped block that doesn't close
02:07 colomon so that's our problem?  one missing line?
02:07 sorear yes
02:07 lue GSoC++ for helping us help ourselves
02:07 sorear quite probably a deliberate optimization
02:07 sorear which is why I'm not proposing to "fix" it without pmichaud consultation
02:07 JimmyZ joined #perl6
02:07 colomon and it's in PAST::Compiler, so none of us can have permission to change it?
02:07 colomon s/can have/have/
02:08 sorear it's in PAST::Compiler.  anybody with a parrot commitbit can change it
02:08 sorear but... I suspect this is not a simple oversight
02:08 sorear (talking before editing)++
02:09 colomon might be worth making the change locally just to see what happens.
02:09 sorear we can work around it at the Rakudo level, by adding a PAST::Op( newclosure PP ) around every PAST::Block
02:09 sorear this, however, is 1. wrong 2. not threadsafe
02:09 colomon afk # being called to dry dishes
02:12 lue grr... rakudo should ignore BOMs  (\ufeff)
02:16 lue .rnd(blender is a niiice program. Too bad you can only script in python)
02:23 lichtkind colomon: S is also eagerß
02:23 lichtkind ?
02:24 colomon lichtkind: the S metaop?
02:24 lichtkind yes
02:24 colomon I don't know.  I've never quite understood what it is intended to do.
02:25 lichtkind colomon: its like reduce, but only without autothreading
02:25 colomon which is why I haven't tried to implement it yet.  ;)
02:25 colomon do you mean like hyper, only without autothreading?  reduce doesn't autothread, as far as I know
02:25 lue the Perl 6 Programming wikibook has a (uncreated) page on save states. What is that about?
02:26 lichtkind lue: i dont know
02:26 colomon lue: no clue
02:26 lichtkind colomon: right but reduce has no guaranteed order of execution
02:26 snarkyboojum lue: link?
02:27 lue Yes, it's a redlink on their ToC
02:27 colomon colomon: reduce certainly does have a guaranteed order of execution.
02:27 lue oh! URL. just a second...
02:27 colomon [+] 1, 2, 3, 4 = (((1 + 2) + 3) + 4)
02:28 lue http://en.wikibooks.org/wiki/Perl_6_Programming#Multitasking_and_Concurrency
02:31 lue that's the scene of the crime, colomon ^^^
02:33 colomon lue: okay, now I know they're related to multitasking some how.  :)
02:34 snarkyboojum software transactional memory? :)
02:34 fda314925 joined #perl6
02:34 snarkyboojum that's my guess anyway :)
02:34 Danny-xh5ij2 joined #perl6
02:35 wolverian joined #perl6
02:36 lue I know full well the concept of save states, they'd just be interesting to implement in P6 :)
02:37 colomon time for bed...
02:37 lue g'night o/
02:56 xinming_ joined #perl6
02:58 plobsing joined #perl6
03:01 snarkyboojum joined #perl6
03:02 alester joined #perl6
03:03 alester joined #perl6
03:04 lichtkind good night
03:06 snarkyboojum lue: I don't know anything about save states, I was just hazarding a guess :)
03:09 lue yeah. In video game emulation, they allow you to save everything going on in the console at that exact moment. It can be quite a lifesaver.
03:13 huf joined #perl6
03:21 k23z__ joined #perl6
03:22 snarkyboojum it could be something like Smalltalk's ability to save the state of the virtual machine, but I doubt it :)
03:22 snarkyboojum or application state rather
03:24 sorear is it just me, or does Rakudo actually not use the lexical referencing environment at compile time?
03:26 JimmyZ_ joined #perl6
03:31 sorear I'm 65% sure that declaring lexical classes in the setting will not work
03:32 sorear the save state mechanism we use is ineffective at compile time, causing Perl6::Actions.is_lexical and Perl6::Grammar.is_name to return false negatives for lexicals inherited from the setting
03:33 sorear those two seem to be only used with ::-ish identifiers, though
03:36 rv2733 joined #perl6
03:40 molaf joined #perl6
03:42 sorear I now understand how to persist lexicals in the REPL.
03:43 JimmyZ_ joined #perl6
04:00 agentzh joined #perl6
04:06 spinclad [00:08 < sorear> yeah, well, eventually somebody invented frame pointer + offset]:  back in Algol 60, no?  i saw lexical scopes derided long after that!  it took a while to catch on.
04:08 spinclad (persisent lexicals)++
04:10 JimmyZ_ joined #perl6
04:13 sorear (being old enough to actually know what you're talking about)++
04:13 sorear Algol 60 ... that's 30 years older than me.
04:16 kaare joined #perl6
04:18 lestrratz joined #perl6
04:18 dual_ joined #perl6
04:19 christin1 joined #perl6
04:20 snarkyboojum young whippersnappers :)
04:22 justatheory_ joined #perl6
04:27 colomon joined #perl6
04:27 alexn_org joined #perl6
04:27 ascent_ joined #perl6
04:38 jhuni joined #perl6
04:39 BrowserUk left #perl6
04:46 lue goodnight
04:55 * diakopter been coding in my head for a few days... sometime soon I should type it out.
04:56 h joined #perl6
04:59 jhuni joined #perl6
05:01 sorear I could use some clarification on exactly what constitutes void context
05:01 sorear sink, excuse me
05:01 szabgab joined #perl6
05:01 sorear take, for instance, '@x = big lazy list'
05:01 sorear the return value of infix:<=> is ignored!
05:01 sorear so... should the lazy list be forced?
05:02 TimToady sink is eager
05:02 sorear exactly
05:02 sorear &infix:<=> returns the RHS
05:03 TimToady sez who?
05:03 sorear using &infix:<=> as the top of an expression, therefore, would seem to indicate evaluating the RHS eagerly
05:03 TimToady rakudo: (my $x = 2)++; say $x
05:03 p6eval rakudo 1eef08: OUTPUT«3␤»
05:06 kst joined #perl6
05:07 sorear ok, returns the LHS
05:07 sorear either way, the value is exposed to a sink evaluation
05:08 TimToady perhaps assignment to an array defeats the eagerness of sink context somehow
05:10 TimToady the point of sink context being eager is to force side effects; arguably the assignment is the side effect desired
05:11 Sanitoeter joined #perl6
05:12 sorear TimToady: I'm wondering how that would work in an implementation, though
05:13 sorear Be eager unless the top node is &infix:<=> doesn't seem very robust
05:14 deco joined #perl6
05:14 deco left #perl6
05:15 thowe joined #perl6
05:15 kcwu joined #perl6
05:15 cognominal joined #perl6
05:15 dhoss joined #perl6
05:15 PerlJam joined #perl6
05:15 pnu joined #perl6
05:15 moritz_ joined #perl6
05:24 eternaleye joined #perl6
05:27 kaare joined #perl6
05:31 [mark] joined #perl6
05:47 jonasbn joined #perl6
06:04 uniejo joined #perl6
06:06 kst joined #perl6
06:07 meppl joined #perl6
06:24 iblechbot joined #perl6
06:27 spinclad sorear: istm that sink pulls eagerly on the top node, whatever it be, and it's fairly natural that &infix:<=> will eagerly deliver the LHS, which lazily consumes the RHS...
06:27 sorear Unfortuately, TimToady hasn't defined WHNF yet.
06:28 spinclad WHNF?
06:28 sorear Weak head normal form
06:28 sorear the technical term for "pulls eagerly on the top node"
06:31 spinclad ah. thanks, i'll go ponder WHNF some then.  (/me knows the term 'head normal form', at least.)
06:34 sorear weak head normal form basically just means that it doesn't look inside lambdas
06:34 sorear -> $x { 2 + 2 } # this is WHNF but not HNF
06:35 sorear (full disclosure: my programming background involves Haskell quite a bit)
06:36 spinclad (makes sense -- HNF etc are at the roots of lambda-calculus theory)
06:45 spinclad i hear the suggestion here that defining WHNF, and the reduction that gets you to it,  would be the right step to clarify the normal form that sink context attaches to, and what it does.
06:45 eternaleye joined #perl6
06:46 spinclad that it might cut through some of the ambiguity by clarifying the picture.
06:47 krakan joined #perl6
06:48 riffraff joined #perl6
06:48 sorear the real question is what WHNF means in the context of Perl
06:49 sorear you'll want to consider cases like '$*RNG = slurp "/dev/random"'
06:51 spinclad (does slurp slurp eagerly forever?  it produces a single string -- can that string be lazy?  slurp's definition defines this...)
06:52 spinclad (or the definition of (lazy) strings)
06:52 moritz_ spinclad: it might return a Cat object
06:54 spinclad i'm wondering if the definition of WHNF will be composed of these piecemeal definitions, or is there some more synoptic guidance
06:55 spinclad (Cat object: a Rope-like string, a List of segments?)
06:57 moritz_ seems like, yes
06:58 spinclad (when everything is translated to lambdas, the different normal forms are well-defined.  we don't have well-defined translation to lambda, at this point; i wonder if it will/may be implementation-defined.)
07:01 kst joined #perl6
07:03 spinclad (a shared STDlambda form would be worth pursuing then, somewhere along the line.)
07:03 mdxi joined #perl6
07:03 athomason joined #perl6
07:03 spinclad (/me babbles away in his ivory tower)
07:04 lestrrat joined #perl6
07:07 spinclad (sorear: i don't know how much my babbling intersects with what you intend; i hope at least that it doesn't actively impede your argument.)
07:07 * spinclad -> bed &   o/ all
07:18 proller joined #perl6
07:34 eternaleye joined #perl6
07:36 rgrau joined #perl6
07:41 araujo joined #perl6
08:02 eternaleye joined #perl6
08:15 proller joined #perl6
08:38 dakkar joined #perl6
08:50 dalek rakudo: 961589a | moritz++ |  (10 files):
08:50 dalek rakudo: build on latest parrot
08:50 dalek rakudo: This involves
08:50 dalek rakudo:  * loading 'os' and 'file', which are now DynPMCs it seems - Coke++
08:50 dalek rakudo:  * marking all PMCs as either manual_attrs or auto_attrs - cotto++
08:50 dalek rakudo:  * bumping PARROT_REVISION
08:50 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/961589a0c26dc2c2adbfd552828b32c5ef4ba7b8
08:54 moritz_ it seems that perl6.pir isn't used in the build process at all
08:54 moritz_ can somebody please confirm that?
08:54 mathw move it and try again...
08:54 mathw :)
08:56 dalek rakudo: 168024a | moritz++ | src/pmc/objectref_pmc.template:
08:56 dalek rakudo: fix attribute specification in objectref
08:56 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/168024a8d366887813660a3bcf1e60ec52eb3602
08:58 jql joined #perl6
09:11 masak joined #perl6
09:12 masak oh hai, potentials and exponentials.
09:12 phenny masak: 00:44Z <sorear> tell masak - that exact command worked fine for me 30 minutes after you pasted.  Could be a race, or a bug fixed before / introduced after git 1.6.6
09:12 masak could be.
09:12 * masak tries again
09:13 dalek rakudo: e3153ad | moritz++ | perl6.pir:
09:13 dalek rakudo: rm perl6.pir since it is not used anywhere
09:13 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e3153adc44469dada39cbb42365baf9601817557
09:13 * moritz_ would welcome feedback on the two soon-to-be blog posts in http://svn.pugscode.org/pugs/misc/helpnow/drafts/
09:13 masak sorear: now it all worked fine.
09:14 masak moritz_: 'are are certain' in the announcement
09:15 sorear hello masak
09:15 masak oh hai
09:15 masak moritz_: I like the idea. this is the kind of thing that got me seriously involved with Rakudo.
09:15 sorear What's the easiest way to set a global variable in PAST?
09:16 moritz_ maybe a PAST::OP that caslls &infix:<=>?
09:16 moritz_ seems tehre should be something easier though
09:16 arnsholt Isn't there a PAST::Var :scope parameter that gives you set_hll_global?
09:16 sorear arnsholt: yes, there is
09:17 masak that first task seems very worthy. I hope someone jumps on the challenge.
09:17 arnsholt But that's not what you want? =)
09:17 sorear arnsholt: but I'm not past-leet enough to to go from a PAST::Var to an assignment op
09:17 arnsholt Oh, right. I think you can use PAST::Op with :pasttype assign
09:17 arnsholt And a PAST::Val or PAST::Var as the RHS
09:20 sorear thanks
09:20 moritz_ arnsholt++ # Past::Fu
09:20 arnsholt There's also :pasttype set, which is subtly different (but I'm not quite sure how)
09:21 sorear oh that's easy
09:21 arnsholt Hehe, thanks. I've been fighting with this a bit myself for Parrotlog
09:21 sorear I have Parrot::Fu
09:21 sorear and set vs assign is a Parrot thing
09:21 sorear set is :=, assign is =
09:21 arnsholt Ah, right
09:21 sorear assign attempts to modify the existing container
09:21 arnsholt Oh, spiffy
09:22 sorear Me, I'm just going down the list of 4/4 star ROADMAP items :)
09:22 arnsholt sorear++ # Parrot::Fu =)
09:25 sorear hmm
09:25 sorear I've made the REPL behave differently from -e
09:25 sorear and now...
09:25 sorear no backtraces :(
09:25 arnsholt sorear: REPL != -e? Fun ;)
09:25 sorear arnsholt: I'm implementing lexical continuity.
09:26 sorear In principle it's quite simple.
09:26 sorear I've factored out the YOU_ARE_HERE mechanism into a system of lexical continuations
09:26 arnsholt moritz_: You're missing an "a" before "list of known projects [...]" in the third paragraph
09:27 sorear at any point in a source file, you can save the lexical environment to a named continuation
09:27 sorear code can be started within the context of a lexical continuation
09:27 arnsholt (in the proto article)
09:27 moritz_ arnsholt: thanks (the a is in <a> :-)
09:27 moritz_ fixed locallz
09:27 moritz_ locally
09:27 sorear we've still got the old YOU_ARE_HERE lexcont, which is used to inject user code into the SETTING
09:28 arnsholt moritz_: Also, "woorks" in the end of the first paragraph
09:28 sorear additionally, every comp_unit processed with $*IN_REPL == 1 gets an implicit lexical continuation at the end
09:28 sorear so that every line is effectively within the lexical scope of all preceding lines
09:28 masak phenny: tell lue that I don't know if it corresponds exactly to what you're working on, but this might interest you: http://use.perl.org/~masak/journal/39238
09:28 phenny masak: I'll pass that on when lue is around.
09:29 moritz_ masak: did you notice that rough named enums are back in rakudo?
09:30 cosimo noob question, is there a perl6/rakudo deb to make 'apt-get install perl6' do what I want?
09:30 moritz_ cosimo: I think somebody wants to package parrot 2.3 + Rakudo #28 for debian, but I'm not sure
09:30 moritz_ cosimo: allison usually works on the parrot .deb packages
09:31 masak moritz_: I did, and I praised jnthn++ for it in the middle of the night. :)
09:32 cosimo moritz_: parrot is in ubuntu (v1.4.0)
09:33 sorear version *1*?
09:33 moritz_ cosimo: well, that's pre-historic
09:33 sorear Symbol '' not predeclared in 'namespace' scope in <anonymous>
09:33 sorear arnsholt!  I need you.
09:39 sorear ah, it should be 'package' scope
09:44 JimmyZ rakudo: my @a = (1,2,3,4); @a>>.say
09:44 p6eval rakudo 1eef08: OUTPUT«1␤2␤3␤4␤»
09:44 JimmyZ rakudo: my @a = (1,2,3,4); @a.>>.say
09:44 p6eval rakudo 1eef08: OUTPUT«Confused at line 11, near "@a.>>.say"␤current instr.: 'perl6;HLL;Grammar;panic' pc 501 (ext/nqp-rx/src/stage0/HLL-s0.pir:327)␤»
09:45 ruoso joined #perl6
09:57 sorear > my sub foo() { say "hi" }
09:57 sorear > foo
09:57 sorear hi
09:57 moritz_ does it work with sigiled variables too?
09:58 sorear no
09:58 sorear it *should*
09:58 sorear but I'll need to find a way to inject symbol knowledge into the PAST compiler
09:59 sorear what happens now is that compile-time is blind to settings
10:00 sorear $x statically checks scope, so it fails
10:00 sorear foo dynamically checks scope, so it succeeds
10:00 sorear it's just the YOU_ARE_HERE mechanism
10:01 pugssvn r30547 | moritz++ | [helpnow] fixes from masak++ and arnsholt++
10:02 * sorear publishes & zzz
10:05 * masak now has a built macro-rakudo o/
10:06 mathw macro-rakudo?
10:06 mathw should I be excited?
10:10 moritz_ makrudo?
10:11 moritz_ masak: sorear++ hacked some basic macro support into his rakudo tree on github
10:11 masak moritz_: that's the one I've now built.
10:12 moritz_ erm, I meant to talk to mathw, sorry
10:12 mathw ooh
10:12 mathw heh, m<tab> strikes again
10:12 viklund makrudo reminds me of the 'bulbous bouffant' song
10:14 * moritz_ has double-blogged at http://perlgeek.de/blog-en/perl-6/
10:15 mathw It makes me think of a big scotsman called Willie McRude'o, the Insulting Inhabitant of Inverness
10:15 masak I always planned to call the macro preprocessor to Rakudo 'makrudo'.
10:16 masak sushi &
10:21 kst joined #perl6
10:26 moritz_ $othernom&
10:39 agentzh joined #perl6
11:12 kst joined #perl6
11:36 * moritz_ back from nom
11:43 chitragupt joined #perl6
11:48 fridim joined #perl6
11:53 Guest3008 Whatever happened to cpan6?
11:53 Guest3008 Is that a loaded question?
11:53 masak no, just a premature one :)
11:54 moritz_ Guest3008: currently the development has stalled
11:54 moritz_ Guest3008: and we're looking for/building alternatives
11:54 moritz_ Guest3008: see http://www.perlmonks.org/?node_id=837538 and http://perlgeek.de/blog-en/perl-6/contribute-now-proto-website.html
11:55 takadonet morning all
11:55 masak takadonet: \o
11:59 envi^home joined #perl6
12:00 bluescreen joined #perl6
12:01 colomon o/
12:02 takadonet Wish I had time to work on bioperl6 today :(
12:03 masak moritz_: when you say 'the development has stalled', are you referring to http://cpan6.org/ ?
12:03 masak it was last updated in Januray, and says 'The first release of the CPAN6/Pause6 modules is planned for April 2010.'
12:03 moritz_ masak: ooh, I didn't notice that
12:05 * moritz_ should stop to spread FUD
12:05 * moritz_ selfslaps
12:05 masak well, it'd help if we actually had any real-time contact with the cpan6.org guy.
12:05 masak I mostly see him at conferences.
12:06 moritz_ or any information flow at all. Like blog posts
12:06 masak and the last thing he told me was that he believes that the auth/ver thing of Perl 6 will prove to be a mistake.
12:06 snarkyboojum any source code available?
12:06 snarkyboojum "CPAN6 is under heavy development"
12:06 masak snarkyboojum: seems he's putting modules on CPAN, at least.
12:06 masak but whether those tell the whole story, I don't know.
12:09 * masak tries `macro term:<ohhai> { q[say "OH HAI"] }; ohhai` in sorear++'s makrudo
12:09 masak it worked! \o/
12:12 * masak tries `macro term:<LOL> { q[say "LOL"; last] }; for 1..10 { .say; LOL if $_ == 5 }`
12:13 masak this is awesome.
12:16 takadonet macro term????
12:17 * takadonet waits for his url from masak or moritz_ to explain what is 'macro term'.....
12:17 * moritz_ wonders if 'macro LOL' should be shortcut for macro term:LOL
12:18 moritz_ takadonet: when parsing code, Perl roughly distinguishes between terms (literals, control structures etc.) and terms
12:18 masak er.
12:18 moritz_ takadonet: macro term:<thing> { ... } builds a macro with name 'thing' that can appear whenever a term is expected
12:18 masak should that be 'between terms [...] and operators'?
12:18 moritz_ masak: it's a *very* broad simplification
12:19 moritz_ yes
12:19 moritz_ sorry
12:19 masak then I agree :)
12:19 moritz_ (and I know, not all control structures are in term position)
12:19 masak well, realizing the mechanics of expecting-term and expecting-operator is a vary good first approximation of the Perl 6 parser, if you ask me.
12:20 Guest3008 moritz_: That's the blog that led to my question :-) (and sorry for the answer delay ...)
12:20 moritz_ it's just that some operators (prefix, circumfix) appear when terms are expected
12:20 moritz_ Guest3008: ah, great
12:20 masak it can then be fleshed out with details, such as prefix ops being in term position, and some control structures being special forms.
12:21 moritz_ Guest3008: my current position is that I don't want to wait for cpan6, because I don't understand it, and the development process is opaque to me
12:21 masak moritz_: right, and both prefix and circumfix restore the term expectation in the parser.
12:21 moritz_ and statement modifying control flow is expected in terminator position, or so :-)
12:25 Guest3008 moritz_: No, don't wait, of course. The challenge looks good; right now it's not easy to find the Perl6 projects.
12:26 masak that's true. the thesholds to entry are still way too high.
12:29 IllvilJa joined #perl6
12:29 moritz_ well, and I'm trying to lower tresholds where I can
12:32 takadonet thanks for the explaination  guys
12:32 moritz_ takadonet: so no more blog post necessary? :-)
12:33 takadonet moritz_: I take one if you have one or a pointer to which perl 6 spec doc
12:33 moritz_ std: 4++<foo>
12:33 p6eval std 30547: OUTPUT«ok 00:01 109m␤»
12:33 moritz_ takadonet: not yet, but I might write one some day
12:33 moritz_ takadonet: in the back of my mind I'm always collecting ideas for new posts
12:33 takadonet moritz_: sounds good
12:34 moritz_ sometimes I'm in this state where I want to be productive, but don't want to do any heavy coding - that's when I write blog posts
12:39 synth joined #perl6
12:42 rv2733 joined #perl6
12:46 masak moritz_++ # Perl 6 challenges
12:47 ruoso joined #perl6
12:49 colomon moritz_++ indeed
12:50 masak std: 4++while &o.O
12:51 p6eval std 30547: OUTPUT«ok 00:01 108m␤»
12:54 * masak tries `macro term:<][> { q[ "two" ] }; say "Apple ", ][`
12:54 masak it prints "Apple two" !
12:54 moritz_ woot
12:54 masak but `say ][` doesn't work...
12:54 masak I think that's a bug.
12:55 masak sorear: I think I may have found a bug.
13:22 chitragupt joined #perl6
13:33 pugssvn r30548 | kyle++ | ran util/purge-empty-dirs.pl -- old v6/mildew gone
13:37 JimmyZ joined #perl6
13:43 plobsing joined #perl6
13:43 lrnperl6 joined #perl6
13:46 lrnperl6 good morning all
13:47 moritz_ good morning lrnperl6
13:47 PerlJam lrnperl6: nice nick :)
13:47 lrnperl6 moritz_ : just the guy i was looking for :)
13:47 lrnperl6 PerlJam: thanks
13:48 masak morning, lrnperl6!
13:48 moritz_ lrnperl6: good. Though maybe others could help you too, I'm not omnipresent or anything :-)
13:48 lrnperl6 masak:  morning
13:48 lrnperl6 moritz_: it's regarding your today's blog post
13:48 masak welcome to our humble not-yet-evenly-distributed future! :)
13:49 PerlJam masak: are you saying we'll be evenly distributed at some point?  that seems to be working against entropy.
13:49 PerlJam :)
13:50 masak PerlJam: I have a hard time imagining something more evenly distributed than heat death... :P
13:50 moritz_ quite the contrary - right, what masak++ said
13:50 moritz_ lrnperl6: sure, shoot
13:50 masak PerlJam: and given what Rakudo does to my processor fans...
13:50 lrnperl6 you asked for 3 things, i can do first and third one
13:51 lrnperl6 a script to fetch all the info and dump into json
13:51 constant joined #perl6
13:51 constant joined #perl6
13:51 moritz_ lrnperl6: that would be a great start
13:52 PerlJam heat death?  that's just like believing in fairies or the FSM or string theory.  We've got a whole bunch of unexplained stuff in the universe, so there's no telling the probability of heat death.
13:52 PerlJam ;)
13:52 moritz_ writing a small HTML template and feeding the data into it should really be a small effort, which I can do
13:53 moritz_ masak: would it be allright to deposit the website building scripts in the proto repo at some point?
13:53 lrnperl6 moritz_: ok. so here is what i've thought
13:53 masak moritz_: certainly.
13:54 PerlJam moritz_++ masak++ lrnperl6++
13:54 lrnperl6 moritz_: a script will fetch the data and will create a dir for each project containing json file for details
13:54 lrnperl6 moritz_: parent dir of these dir will have a index file(that too can a json file) will have project name and it's dir
13:54 lrnperl6 moritz_: will that be ok?
13:54 moritz_ lrnperl6: yes, sounds great
13:55 lrnperl6 moritz_: but it will a python script :)
13:56 masak yay! python!
13:56 PerlJam lrnperl6: we don't have any particular language prejudices.
13:56 * masak slithers around doing the HSSSSSS sound
13:56 masak none whatsoever. :>
13:56 PerlJam lrnperl6: although COBOL is probably not looked upon with favor
13:56 moritz_ lrnperl6: I don't know python very well myself, but that's OK - then I'll have a good reason to learn it when I want to extend it :-)
13:57 lrnperl6 I think am at the right place
13:57 moritz_ there are many programming languages I don't know; most of them because I haven't had a good reason to learn them
13:58 alester joined #perl6
14:00 moritz_ others because I can't yet wrap my head around them (haskell)
14:01 Lorn joined #perl6
14:04 masak I suspect Haskell is like Git -- not really difficult, just consisting of primitives that don't mesh well with the primitives most of us have learned. so it takes a bit of unlearning.
14:05 moritz_ aye
14:05 masak in other news, continuations are really simple. really.
14:06 moritz_ they are
14:06 masak that's what I said.
14:06 moritz_ I can nicely imagine continuations in perl
14:06 moritz_ I have more problems with monads
14:06 masak monads are simple too.
14:06 masak as evidenced by how many on the web are explaining them :)
14:06 moritz_ yes; but they don't make sense in perl
14:07 * masak collects monad tutorials in his spare time
14:07 moritz_ well, everybody who understands monads writes a tutorial about them, at some point
14:07 masak they don't make much sense in a side-effect environment.
14:07 colomon I remember sailing through the Haskell book back in the early pugs days, only to hit monads and toss the book away with a big WTF?
14:08 moritz_ but the problem with monads is not the lack of tutorials
14:08 moritz_ but that you have to stay with them for a while and play around
14:08 moritz_ and then you'll finally grok them, and ask yourself "why didn't anybody tell me this simple truth before?"
14:09 masak :)
14:09 moritz_ and the you re-read the tutorials, and you'll find that they actually do
14:09 moritz_ you were just not ready to understand them
14:10 masak "if I have to understand category theory to write a program that does IO, IT IS A NON STARTER!" -- this is my main kvetch with monads. (from http://www.xent.com/pipermail/fork/Week-of-Mon-20091109/054578.html )
14:10 moritz_ haskell isn't exactly a starter, in that sense :-)
14:11 SmokeMachine joined #perl6
14:14 JimmyZ joined #perl6
14:16 moritz_ lrnperl6: I'm curious how you found my blog post - have you beeen following Perl 6 development for some time already?
14:17 moritz_ typically my readers are mostly perl 5 or perl 6 programmers
14:20 lrnperl6 moritz_: sort of. my google reader suggested me to subscribe to "planet perl six" feed
14:20 moritz_ cool
14:20 moritz_ google++
14:30 colomon random p6 question:
14:30 colomon is there a good way to partition a list into to bits with something like a grep?
14:30 colomon I mean, you can say my @even = @numbers.grep({ $_ !% 2 });
14:31 moritz_ colomon: classify
14:31 colomon my @odd = @numbers.grep({ $_ % 2 })
14:31 moritz_ grep for it in S32-list/
14:31 moritz_ don't know if implemented in master, but should be trivial to port from alpha
14:31 colomon even used my example!
14:31 colomon :)
14:32 colomon moritz_++
14:32 colomon actually not trivial, I think
14:32 colomon at least, the example uses binding....
14:32 masak that binding example is awesome.
14:32 moritz_ that's the usage example, not the implementation
14:32 colomon ah, yes.
14:33 moritz_ colomon: signature binding is implemented... you just have to formulate it as a smart match, or as a routine/block call
14:33 molaf joined #perl6
14:34 colomon alpha: (1..10).classify({ $_ !% 2 }).perl.say
14:34 p6eval alpha 30e0ed: OUTPUT«Method 'classify' not found for invocant of class 'Range'␤in Main (file src/gen_setting.pm, line 324)␤»
14:34 colomon alpha: (1...10).classify({ $_ !% 2 }).perl.say
14:34 p6eval alpha 30e0ed: OUTPUT«Method 'classify' not found for invocant of class 'List'␤in Main (file src/gen_setting.pm, line 324)␤»
14:34 * moritz_ thought it was implemented at some point
14:34 moritz_ alpha: Array.classify
14:34 p6eval alpha 30e0ed: OUTPUT«Method 'classify' not found for invocant of class ''␤in Main (file src/gen_setting.pm, line 324)␤»
14:34 moritz_ maybe I'm wrong
14:34 colomon alpha: my @a = 1..10; @a.classify({ $_ !% 2 }).perl.say
14:34 p6eval alpha 30e0ed: OUTPUT«Method 'classify' not found for invocant of class 'Perl6Array'␤in Main (file src/gen_setting.pm, line 324)␤»
14:35 * colomon needs to remind himself he doesn't have time to implement this this morning....
14:35 moritz_ maybe I can give it a shot later tonight
14:35 masak moritz_: I distinctly remember someone, probably you, starting to implement it.
14:35 colomon I was just translating the Perl 6 code where I wished I had that capability into C++...
14:37 colomon the reason it would be a bonus there is the classifying function is actually relatively slow, so calling it twice on all the array elements would be a pain.
14:37 masak seems it was frew, on 2009-03-03: http://irclog.perlgeek.de/perl6/2009-03-03#i_951396
14:38 frooh man, I don't remeber that at all
14:38 frooh :-P
14:38 iblechbot joined #perl6
14:39 masak frooh! \o/
14:39 frooh :-D
14:41 masak is anyone aware of a tool that starts from a grammar or EBNF-y thing, and generates interestingly distributed examples of things that parse according to the grammar?
14:41 masak I know jnthn has talked about starting such an effort.
14:42 moritz_ masak: I know that such a tool exists for regexes on CPAN
14:42 arnsholt Well, it's not a theoretically complicated thing to do, mostly
14:42 colomon seems like I recall discussion on that last year?
14:42 moritz_ masak: and that MJD talks about that in HOP too
14:42 colomon HOP++
14:42 arnsholt One thing that might be non-trivial is attaching probabilities to the different productions
14:43 masak moritz_: oh, right. HOP.
14:43 arnsholt Seeing how productions tend to not be equally likely
14:43 moritz_ masak: is there any topic it doesn't cover? :-)
14:43 masak arnsholt: indeed.
14:44 arnsholt But a first approximation would be to top-down recursively generate a parse
14:44 arnsholt Should be pretty simple once you have a strategy for the probabilities and some data structures
14:45 masak arnsholt: a first prototype might just assign equal probabilities to each alternation alternative.
14:45 arnsholt Yeah, definitely
14:46 masak arnsholt: whether 'tis better to do it transitively (like Perl 6) or not (like Perl 5) is not something I have a good intuition for :)
14:46 arnsholt Transitively?
14:46 clintongormley joined #perl6
14:46 * masak prepares an example
14:47 masak regex foo { <bar> | 3 }; regex bar { 1 | 2 }
14:47 masak treating the alternatives transitively would mean hoisting up the 1 and the 2 to the same level as the 3.
14:47 SmokeMachine joined #perl6
14:48 moritz_ a *first* prototype would do it not transitively
14:48 moritz_ because it's more work :-)
14:48 masak but in any case, the alternatives are always finite, so they're easy.
14:48 masak quantifiers may be unbounded.
14:48 masak and hence they cannot have a rectangular distribution.
14:49 moritz_ you need $n**$exp where $exp < -1
14:49 masak yah, something like that.
14:49 arnsholt Oh, modifying the grammar before you do stuff would definitely by a later addition
14:49 arnsholt Cause that's definitely not trivial
14:49 arnsholt Another question is which probabilities you want to maximise
14:49 masak arnsholt: the cool thing about Perl 6 grammars is that alternation transitivity is the default :)
14:50 arnsholt That's due to LTM, isn't it?
14:50 moritz_ for LTM, yes
14:50 moritz_ LTM defines "declarational prefixes"
14:50 moritz_ or so
14:50 moritz_ and these are transitive
14:50 arnsholt Yeah, I remember reading about that when looking into the Quad thing
14:51 cotto joined #perl6
14:51 masak right. a declarational prefix is the part a rule that doesn't involve actions of some kind.
14:51 masak it's a have-the-cake-and-eat-it thing.
14:51 moritz_ http://perlgeek.de/en/article/longest-token-matching
14:51 moritz_ delarative I've called it in there
14:52 ash_ joined #perl6
14:54 proller_ joined #perl6
14:54 masak @tell sorear that `macro postfix:<san> { q[~ "san"] }; say "sorear"san` just prints "san\n"
14:55 masak phenny: tell sorear that `macro postfix:<san> { q[~ "san"] }; say "sorear"san` just prints "san\n"
14:55 phenny masak: I'll pass that on when sorear is around.
14:55 moritz_ masak: time you start to write some tests, no? :-)
14:55 masak :)
14:57 christine joined #perl6
14:58 ash_ moritz_ i found a partial solution to the closure issues
14:58 phenny ash_: 03 May 23:25Z <sorear> tell ash_ - please contact me before raising more heckles over broken closures in PCT.  You're duplicating a ridiculous amount of work I did a week ago.
14:58 ash_ ah, well sorear already knows about it, oops
14:59 moritz_ well, I don't know yet
15:02 ash_ its missing a pir::newclosure after you create the lambda, both nqp and rakudo are not currently calling newclosure so when you make lambda's they aren't retaining their lexical values properly
15:02 colomon #rs in 3.5 hours or 4?
15:02 moritz_ 4
15:02 ash_ here is the example we were working with yesterday:
15:03 ash_ nqp: sub foo($i) { return { $i } };  my $a := foo(4); my $b := foo(3); say($a(), $b());
15:03 p6eval nqp: OUTPUT«33␤»
15:03 moritz_ do you know which component of the compiler should be patched to include the newclosure call?
15:03 ash_ nqp: sub foo($i) { return pir::newcolsure__PP({ $i }) };  my $a := foo(4); my $b := foo(3); say($a(), $b());
15:03 p6eval nqp: OUTPUT«error:imcc:syntax error, unexpected PREG, expecting '(' ('$P21')␤    in file 'EVAL_1' line 44␤Could not find non-existent sub newcolsure␤current instr.: 'foo' pc 83 (EVAL_1:0)␤»
15:04 ash_ oops, i can't spell
15:04 ash_ nqp: sub foo($i) { return pir::newclosure__PP({ $i }) };  my $a := foo(4); my $b := foo(3); say($a(), $b());
15:04 p6eval nqp: OUTPUT«43␤»
15:04 JimmyZ_ joined #perl6
15:04 moritz_ looks convincing
15:04 ash_ umm, i would imagine it needs to be after you create a lambda, but i haven't found the exact spot
15:05 masak ash_: S04:1618
15:05 masak ash_: when you enter the surrounding scope.
15:05 masak TimToady told me yesterday.
15:06 masak by the way, I've also independently discovered the need for pir::newclosure -- or rather, I discovered the symptoms and pmichaud++ showed me how to work around them. that was two or three weeks ago.
15:06 ash_ ah, there you go, i was just trying to find the place that made sense to me
15:06 masak we're rediscovering the same bug and the same fix a lot here :)
15:06 ash_ hehe
15:07 moritz_ and we'll keep doing that unless we fix it.
15:07 PerlJam now all that needs to happen is for someone to actually apply the fix!
15:07 masak PerlJam: it's non-trivial.
15:07 ash_ yeah, but one question, should it be fixed in nqp? or rakudo? Or both independently?
15:07 PerlJam masak: For some reason, I'm not surprised :)
15:07 masak PerlJam: pmichaud started doing it the straightforward way, and got lots of spectest failures.
15:07 moritz_ ash_: I guess fixing it in nqp would be a good first step
15:08 moritz_ unless it's really a PAST problem
15:08 PerlJam I guess sorear was working on the NQP fix?
15:08 moritz_ in which case it should be fixed in the PAST compiler
15:08 moritz_ and then nqp and rakudo would magically work :-)
15:09 masak it might well be a PAST problem.
15:09 masak seems to me neither nqp nor Rakudo should behave like they do now.
15:09 ash_ sorear: ping?
15:09 masak nor any sane HLL, for that matter.
15:10 colomon sorear claimed it was PAST problem last night.
15:15 nihiliad joined #perl6
15:22 kst joined #perl6
15:25 Trashlord joined #perl6
15:38 _buno_ joined #perl6
15:41 Trashlord joined #perl6
15:43 masak rakudo: class A { multi submethod foo() { say "OH HAI" }; method bar { foo(self) } }; A.new.bar
15:43 p6eval rakudo 1eef08: OUTPUT«Could not find sub &foo␤current instr.: 'perl6;A;bar' pc 553 (EVAL_1:50381579)␤»
15:44 masak should that work?
15:44 masak S12 says 'Within a class, C<multi submethod> is visible to both method-dispatch and subroutine-dispatch.'
15:45 ash_ masak, should it be:
15:45 ash_ rakudo: class A { multi submethod foo() { say "OH HAI" }; method bar { self.foo } }; A.new.bar
15:45 p6eval rakudo 1eef08: OUTPUT«OH HAI␤»
15:45 PerlJam ash_: he was testing the sub-dispatch case.
15:46 masak ash_: that's the method-dispatch, no?
15:46 masak what about the sub-dispatch?
15:46 PerlJam masak: seems like it should work to me.
15:46 ash_ oh, got ya
15:46 * masak submits rakudobug
15:47 ash_ i thought submethod was exactly the same as method except it is not inherited
15:47 TimToady we may revise that, and require a my or our for a submethod to be visible as a sub
15:47 masak I'll include that in the ticket.
15:47 TimToady that was written back before has did not imply my or our
15:48 PerlJam Though, the text from S12 may have been written when subs (and presumably submethods) were "our" and it was a natural consequence.
15:48 * PerlJam needs to type faster
15:48 ash_ rakudo: class A { our multi submethod foo() { say "OH HAI" }; method bar { foo(self) } }; A.new.bar
15:48 p6eval rakudo 1eef08: OUTPUT«OH HAI␤»
15:48 TimToady in fact, it was written before we made explicit the fact that all methods are really subs in disguise
15:48 TimToady it's all just lambdas, really :)
15:49 masak TimToady: still, methods usually resist being called as subs in Perl 6.
15:49 TimToady merely security through obscurity :)
15:49 TimToady methods hide themselves by default
15:49 masak indeed. but my point is that S12 as it stands goes against that.
15:49 masak please change it :)
15:49 TimToady feel free
15:50 * masak has been volunteered
15:50 TimToady I'm busy thinking about weak head normal forms, and how they might relate to Perl 6's monads :)
15:50 masak and the RT ticket vanishes in thin air! incredible!
15:50 PerlJam license to spec!  Is there a designation like 00 for that?  I guess it could be S0, but that could get confusing :)
15:51 masak S007 -- James OO Bind.
15:51 colomon S00
15:51 TimToady anyone with a pugs commit bit has a license to spec; we just don't tell 'em that at the start :)
15:52 ash_ monads in perl 6? so, which paradaigm is perl 6 not going to support? or is there one?
15:52 PerlJam TimToady: there "can change the spec" and there's "TimToady said it's okay".  The latter gets weighted a little more.
15:52 TimToady and pretty much anyone has a license to kill, provided it's "justifiable"
15:52 masak ash_: I believe it was a bit of a joke...
15:52 PerlJam ash_: Perl 6 is a 100 year language (give or take :-)
15:53 ash_ i know, i was joking too
15:54 masak oh. then I was joking too when I explained that it was just a joke.
15:54 TimToady it's just that for Mr. Bond, the notion of 'self-defence' kinda fuzzes into 'selves-defence'
15:55 masak rakudo: class A { our method foo { say "OH HAI" }; method bar { foo(self) } }; A.new.bar
15:55 p6eval rakudo 1eef08: OUTPUT«OH HAI␤»
15:56 masak so, is it the 'our' that makes methods (and submethods) participate in subroutine-dispatch nowadays?
15:56 masak or 'my', I guess.
15:56 masak it places the method in the lexical and/or package scope, and makes it callable as a sub.
15:57 TimToady depends on how much insecurity-through-non-obscurity you desire
15:57 masak are you saying I can spec it however I want? :)
15:57 PerlJam no, he /already/ said that ;)
15:57 masak *gasp*
15:58 TimToady however, remember there's such a thing as justifiable homocide...
15:58 justatheory joined #perl6
15:58 masak that takes of the pressure.
15:58 masak s/of/off/
15:59 TimToady so if you spec it wrong, we will merely evaluate your monad to completion of its computation
15:59 TimToady and then you will have no more side effects
16:00 PerlJam you'll be stable!
16:00 PerlJam (and, as such, ready for release)
16:00 masak masak.0.0!
16:04 lichtkind joined #perl6
16:06 cdarroch joined #perl6
16:06 cdarroch joined #perl6
16:09 M_o_C joined #perl6
16:11 nihiliad joined #perl6
16:14 kaare joined #perl6
16:15 lichtkind h
16:15 lichtkind i
16:15 pugssvn r30549 | masak++ | [S12] dug out a fossil
16:15 pugssvn r30549 |
16:15 pugssvn r30549 | The paragraph was written a couple of OO changes back, and doesn't apply
16:15 pugssvn r30549 | so much. Changing it to apply a bit more.
16:15 lichtkind what is the difference  between reduce and S metaop?
16:16 moritz_ they do different things :-)
16:16 moritz_ it's like asking "what's the difference between a banana and a telephone?"
16:17 PerlJam moritz_: DNA  ;)
16:18 lichtkind haha
16:19 PerlJam lichtkind: the S meta-op just makes things happen sequentially that otherwise aren't guaranteed to happen sequentially.
16:19 lichtkind moritz_: but both get chained on a list and produce a skalar
16:20 lichtkind ah thanks PerlJam
16:20 moritz_ so I don't see why it should produce a scalar
16:20 patrickas joined #perl6
16:21 lichtkind and S is eager?
16:22 moritz_ I don't think so, but the operations you apply it to usually are
16:22 PerlJam I don't think eagerness is a property of S at all.
16:22 colomon S meta-op does not necessarily produce a scalar.
16:22 moritz_ if you use a » or « meta op, they are eager (and even hyper)
16:23 moritz_ and if you apply S to them, they are still eager
16:23 moritz_ it doesn't really make sense to apply S to something like zip
16:23 masak moritz_: in your distributed-vcs post 'Fixed then link.' should be 'the'.
16:23 colomon might make sense if S goes down more than one level.
16:23 PerlJam But Perl is not about to deny you some nonsense if you really want it  :)
16:24 PerlJam masak: URL?
16:24 masak PerlJam: http://perlgeek.de/blog-en/perl-6/distributed-vcs.html
16:24 masak moritz_: "DVCS'" should probably be "DVCSes" or something.
16:24 PerlJam heh.  s/anohter/another/ too
16:24 moritz_ updated
16:25 meppl joined #perl6
16:25 PerlJam audrey++
16:25 moritz_ audreyt++ even
16:28 PerlJam moritz_: 2 other minor things:   s/By know it/By now it/  and  s/done three thing/done three things/
16:29 PerlJam moritz_++
16:29 PerlJam git is very much like perl.  The more I use it, the more it just seems to "fit"
16:29 * moritz_ should learn how to type and spell some time
16:29 moritz_ PerlJam++ # thanks, fixes are on their way
16:29 ash_ git is also written in perl, or bits of it are
16:30 moritz_ but not much, iirc
16:30 PerlJam what's really amazing (to me) is how well Perl 6 maintains the same "ability to fit" as Perl 5 and even enhances it.
16:30 ash_ i know parts of git-svn are written in perl, (as in macports they require perl 5 with the svn bindings)
16:30 moritz_ PerlJam: maybe related to some intersection of perl 5 and perl 6 language designer(s) :-)
16:31 moritz_ ash_: ah, that can very well be true
16:31 moritz_ I've also heard rumors that the test suite uses perl
16:31 skangas joined #perl6
16:31 ash_ sqlite's test suite still amazes me
16:31 moritz_ but I haven't bothered looking at the test suite and find out if it's true
16:31 moritz_ ash_: agreed
16:32 PerlJam moritz_: sure, but even with all the things that have changed, the spirit is the same.  (yes, I realize that was an explicit design goal.  I just boggle at how well that goal was achieved :)
16:32 PerlJam TimToady++
16:33 TimToady now just convince everyone else of that :)
16:34 patrickas joined #perl6
16:34 TimToady and Perl 6 is even still cork-brained in spots, just like Perl 5 :)
16:35 PerlJam TimToady: If I could find more than a fleeting passion for writing, I would turn out article after article that showed just how awesome Perl 6 is.
16:35 molaf joined #perl6
16:35 ash_ but at least it seems willing to evolve, unlike some other languages out there
16:36 TimToady that's the hubris of humility :)
16:36 PerlJam ash_: some languages paint themselves into a corner and the only way to "evolve" is through revolution
16:36 PerlJam ash_: Generally the pain of revolution keeps them from taking that route
16:37 TimToady it's one thing the U.S.'s founding fathers got at least a bit right
16:37 PerlJam TimToady: the right to bear arms?  :)
16:38 ash_ my arm's aren't very bear like
16:38 hejki the right FOR bear arms
16:38 ash_ personally
16:38 isBEKaml joined #perl6
16:38 hejki and i'm not meaning the verb either
16:39 moritz_ patrickas++ # first submission to This week's contribution to Perl 6
16:39 masak the founding fathers only talked about the right to bear arms, not actually possessing bear arms.
16:40 huf they probably kept the bear in the armpit
16:40 huf hence the confusion
16:40 hejki gun frenzy people are good people, and darwin usually takes care of his own
16:40 PerlJam For my high-school graduation, we themed everything on the Steppenwolf song "Born to be Wild".  We had t-shirts made etc.     #perl6 needs some "Born to Pun" t-shirts.
16:40 ash_ so... since i have a commit bit to pugs, could i add a bit to S12 & S14 about phasers for roles and object inheritance? what were their names again?
16:40 hejki they help us significantly to lower the overly populated planet
16:41 huf hejki: i prefer the aural method of heavy metal distribution
16:41 nihiliad joined #perl6
16:41 PerlJam huf++
16:41 TimToady what did you say?  can't hear ya!
16:42 masak ash_: phasers are usually about blocks, but your phasers are in connection to OO, which makes them feel a bit non-core.
16:42 huf get louder fonts? i've got nothing.
16:42 masak ash_: are you sure this can't be done through a clever module?
16:43 ash_ maybe? i haven't tried yet...
16:43 hejki huf: :))
16:43 ash_ and since this school semester is about to end, i have free time soon, so i can try it
16:44 TimToady it seems perfectly fine for anyone to add a paragraph here or there as long as it's marked [Conjectural: ...]
16:44 TimToady svn blame will tell us whodunit
16:44 masak ash_: make sure to mention your new phasers in S04... :)
16:45 ash_ alright
16:47 chitragupt joined #perl6
16:47 moritz_ masak: since we now have a submission for the proto website project, we need to think about where to put the HTML file
16:47 moritz_ masak: I can offer a subdomain or directory of perl6.org
16:47 masak moritz_: I was just about to suggest that.
16:47 moritz_ or rakudo.de
16:47 moritz_ or perl6.biz :-)
16:48 masak I'd go with perl6.org :)
16:48 moritz_ I'll see what I can come up with
16:48 masak afk &
16:56 TimToady .oO(Why do I keep reading Parrot::Fu as Parrot::Flu?)
17:00 hejki 20:00:09 <@yath            > wait for perl6 to become finished ;)
17:00 hejki 20:00:24 <@yath            > (duke nukem forever will be written in it)
17:04 PerlJam that's a joke that could become reality
17:04 moritz_ DNF development has been discontinued
17:04 diakopter which part
17:04 M_o_C Well, DNF got cancelled...
17:04 hejki so is it really a joke, or just a cunningly brilliant foresight of future?
17:04 hejki most perl programmers are said to be able to travel in the time-space continuum with power of multiline regexps
17:04 [particle] i think Druid is an oss version of DNF
17:04 [particle] ;)
17:05 Guest29502 joined #perl6
17:05 PerlJam Just because the *originaly* DNF has been cancelled doesn't mean someone else can't take up the bailiwick
17:05 PerlJam s/y//
17:05 cosimo by any chance, is there anyone already working on rakudo deb packages?
17:05 cosimo speak now :)
17:05 moritz_ speak friend, and enter
17:05 moritz_ erm, wrong movie
17:06 PerlJam melon
17:06 moritz_ I think there's an r somewhere in there, like melorn - no?
17:06 PerlJam no, just an accent.
17:06 PerlJam (at least, that's how I remember it from the book)
17:07 uniejo joined #perl6
17:07 diakopter could someone please remind me where in the Snn the syntax for subroutines-as-strongly-typed-parameters is defined.  Someone mentioned it a few weeks ago, but I can't find the reference.
17:08 moritz_ diakopter: you mean with subsignaturs for callable parameters?
17:08 PerlJam diakopter: um ... it would have to be in S06 I would think
17:10 diakopter ok; thanks
17:10 diakopter ahah :)
17:11 TimToady just grep for '&.*:('
17:11 frooh pmichaud: ping?
17:12 * PerlJam read that as "grep for an unhappy subroutine"
17:12 * mdxi laughs
17:13 diakopter TimToady: a block that has no parameters..?
17:13 diakopter &block:(--> Bool)
17:13 diakopter ?
17:13 diakopter (but does have a strongly-typed return value)
17:16 diakopter does anyone know?
17:16 diakopter if it's not spec'd, I'll go with (--> ReturnType)
17:17 moritz_ looks right
17:17 diakopter ok. it's not explicit in http://perlcabal.org/syn/S06.html#Closure_parameters
17:20 moritz_ hugme: add patrickas to proto
17:20 * hugme hugs patrickas. Welcome to proto!
17:20 Trashlord joined #perl6
17:21 patrickas whoa! thx :-)
17:21 moritz_ patrickas: thank *you* for contributing!
17:23 diakopter TimToady: I also need a way to declare a strongly-typed variable of closures with a full signature.
17:24 moritz_ let me announce... *drumroll* ... http://proto.perl6.org/
17:25 dukeleto moritz_: cool
17:25 moritz_ dukeleto: and it's by patrickas++ who took the challenge from my blog
17:25 patrickas damn it you guys are fast!
17:26 dukeleto moritz_: is that static or dynamically generated somehow?
17:26 moritz_ but before I polish it more, i'll need to prepare some num
17:26 diakopter TimToady: such as:   my $foo:(Int --> Int);
17:26 diakopter does that exist?
17:26 moritz_ dukeleto: it's generated by a script
17:26 moritz_ diakopter: that means: takes one positional parameter Int, and returns an Iint
17:26 moritz_ *Int
17:26 dukeleto moritz_: and is that publicly linkable?
17:27 diakopter moritz_: I figured.  did you see my question?
17:27 moritz_ dukeleto: yes; going to be polished
17:27 colomon patrickas++
17:27 moritz_ diakopter: yes; afaict there's no syntax for that yet
17:27 moritz_ diakopter: maybe invent one, such as :(-->Int):captures(Int :$x)
17:28 diakopter what's wrong with   my $foo:(Int --> Int);
17:29 moritz_ where would you pot that?
17:29 moritz_ in normal code?
17:29 moritz_ I'm a bit confused
17:31 masak kudos on http://proto.perl6.org/
17:32 masak patrickas++ moritz_++
17:32 masak could we add a UTF-8 encoding to the HTML head?
17:32 PerlJam moritz_: the section at S06:1358 seems clear
17:33 diakopter what?
17:33 diakopter I was asking about how to declare variables that will store strongly-typed closures.
17:33 diakopter I don't know what you mean by "normal code"
17:33 PerlJam Hmm.
17:34 diakopter Hmm?
17:34 diakopter you have an idea? :)
17:34 PerlJam no, just reviewing my assumptions.
17:35 PerlJam variable declaration is isomorphic with subroutine parameter declaration
17:35 diakopter "of the same shape"
17:36 ash_ joined #perl6
17:36 PerlJam so ... my $foo:(Int --> Int);   seems fine to me
17:37 diakopter (if that's what you meant, then yes, that's why I was asking whether  'my $foo:(Int --> Int);' was the proper way to declare such a $foo
17:37 diakopter ah
17:37 PerlJam Though I'm not sure if you /need/ to say that it's a Code or Routine or whatever
17:37 diakopter oh
17:37 jotr joined #perl6
17:37 diakopter oops, I meant to have a & in there
17:38 colomon ack.  does somewhere remember where the RT for the submitted patch to add laziness back to Seq and Array is?
17:38 colomon I seem to have misplaced it on my system...
17:39 PerlJam diakopter: Perl could perhaps infer that $foo is code-thingy given that you've given it a signature
17:39 colomon hmmm, http://osdir.com/ml/perl6-all/2010-04/msg00011.html
17:39 masak moritz_:  oh, oh, and maybe turn the ul into a dl?
17:40 PerlJam masak: I think the ul looks fine.  a dl would just add a little more vertical scrolling  :)
17:40 masak depends on the CSS, but yeah, point.
17:40 PerlJam right
17:40 colomon http://rt.perl.org/rt3//Public/Bug/Display.html?id=74008
17:40 * masak likes <dl/>s
17:40 masak they're the hashes of HTML.
17:42 masak oh, oh, and right now the projects are sorted Unicodibetically. should probably be alphabetically.
17:42 * masak is so full of nits!
17:43 moritz_ masak: patches welcome
17:43 * PerlJam didn't even notice that.
17:43 moritz_ masak: script is in proto/web
17:43 masak \o/
17:44 masak this changes everything! :)
17:44 masak I think I already have a commitbit to that repo.
17:45 masak patrickas++ # 'spew' is an excellent opposite of 'slurp'
17:46 * masak also loves the comment '#Please forgive me for parsing html this way'
17:46 masak hugme: hug patrickas
17:46 * hugme hugs patrickas
17:47 patrickas :-)
17:48 PerlJam so ... does patrickas get a t-shirt?  :)
17:48 moritz_ PerlJam: so far I only have sponsors for two t-shirts...
17:48 PerlJam (whose idea was it to have these challenges?)
17:48 stephenlb joined #perl6
17:48 moritz_ PerlJam: so if there'll be more than two successful submissions, we'll have to randomize :(
17:49 pmichaud frooh: pong
17:49 moritz_ I plan to contact TPF if they might contribute something
17:49 patrickas shipping tshirts to beirut lebanon might prove to be hard so it's ok :-)
17:49 PerlJam moritz_: I wonder if google might also.
17:49 moritz_ PerlJam: I have no contacts at google
17:49 moritz_ PerlJam: if you have some, please try to active them
17:50 frooh pmichaud: hey, are you gonna be around next week?
17:50 PerlJam I wish
17:50 frooh pmichaud: s1n is kinda MIA and I wanna know if we should plan a meeting at all
17:50 pmichaud frooh: I don't know yet.  Currently I'm planning yes, but it depends on how my wife's treatments go this week.
17:51 frooh pmichaud: ok, so you aren't at a conf or anything like that though
17:51 pmichaud frooh: definitely not.  :)
17:51 frooh alrighty
17:51 pmichaud my next conference is German Perl Workshop in June; after that is OSCON.
17:52 moritz_ pmichaud: speaking of which... did you get my /msg?
17:52 pmichaud moritz_: yes, I did (more)
17:52 mikehh joined #perl6
17:53 pmichaud moritz_: Under other circumstances, I'd definitely make arrangements to stay extra days around the conference; under current circumstances I think I should be away from home as little as possible.  Again, we should know more after this Friday (which is why I haven't booked flights yet).
17:54 moritz_ pmichaud: sure; I kinda expected that answer
17:54 pmichaud I am planning to do extra days around YAPC::EU, though.
17:54 moritz_ still wanted to make the offer, and it still stands
17:54 pmichaud thanks.  I'll take you up on it if circumstances allow :)
17:56 pmichaud and, in general, I'm planning to be back on Rakudo/nqp development a bit more full-time-ish starting next week
17:56 moritz_ \o/
17:57 pmichaud we should have everything taken care of around here by then (at least to the extent that things require my participation/active support)
17:57 moritz_ pmichaud: are you available for #rs tonight? (ie in one hour)
17:57 colomon \o/
17:57 pmichaud probably.  I'll join in now.
17:57 pmichaud but it's very likely I'll be called away from the keyboard at random
17:59 pmichaud (okay, it's not really "
17:59 pmichaud (okay, it's not really "at random" -- it's more of a poisson distribution that appears random.)
17:59 masak :P
17:59 * TimToady thinks better of making a pun on "poison distribution"
18:00 masak that's a fishy pun.
18:01 masak moritz_: how does the proto.perl6.org thing update?
18:01 diakopter but, what pun would you have made?  "poisson" or something?
18:01 moritz_ masak: currently not all... will install a cron job too
18:01 * TimToady was referring to chemotherapy, which is why he thought better of it
18:02 moritz_ masak: for now ping me if you want an update
18:02 masak moritz_: ping! :)
18:02 moritz_ done.
18:02 * pmichaud hadn't made the chemotherapy connection.  :)
18:02 cotto_work joined #perl6
18:02 TimToady good, don't!  :)
18:03 * masak had
18:03 SmokeMachine joined #perl6
18:03 pmichaud alas, that connection is surprisingly accurate at times.
18:03 * moritz_ also had
18:03 * TimToady and Julian are quite in agreement
18:04 masak the rest of us are hoping we won't have to find out...
18:04 TimToady fortunately Julian is now in his maintenance phase, and things are looking good
18:04 pmichaud +10
18:04 pmichaud I'm very happy to hear that.
18:04 pmichaud bbiab
18:07 masak ok, I want someone to look at example 4 here: http://www.maxdesign.com.au/articles/definition/
18:07 masak and tell me that isn't better than the current proto.perl6.org
18:07 masak I'm willing to change the script if I get the go-ahead from someone :)
18:08 moritz_ masak: I'm in the process of porting it to use HTML::Template::Compiled
18:09 masak moritz_: ok. I'll hold 'til you're done.
18:09 Tene masak: I like it.
18:09 masak \o/
18:10 masak (assuming you meant the proposed one.)
18:10 Tene That's right.
18:13 moritz_ masak: I've pushed a basic HTML template - it's not yet used, but I need to nom first
18:13 masak moritz_: no rush. it's not like I don't have other things to do. :)
18:13 * masak has a look at sigmund
18:35 SmokeMachine joined #perl6
18:43 isBEKaml joined #perl6
18:46 moritz_ masak, patrickas: version with templates pushed
18:47 patrickas ok I'll apply the style changes
18:48 masak patrickas++ did them while I was just idling. impressive.
18:56 masak rakudo: multi foo() { say "OH HAI" }; multi foo(*@a) {}; foo
18:56 p6eval rakudo 1eef08: OUTPUT«OH HAI␤»
18:56 masak the lack of an argument counts as narrower than a slurpy.
18:56 masak but what about a single optional?
18:56 masak rakudo: multi foo() { say "OH HAI" }; multi foo(Int $a?) {}; multi foo(Str $a?) {}; foo
18:56 p6eval rakudo 1eef08: OUTPUT«Ambiguous dispatch to multi 'foo'. Ambiguous candidates had signatures:␤:()␤:(Int $a?)␤:(Str $a?)␤␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
18:56 masak any reason one shouldn't count the lack of an argument as narrower there too?
18:57 spinclad diakopter: 'my Int &foo()'  is like  'my (--> Int) $foo'  is like  'my Int $foo'  as  'foo' (short for 'foo()')  is like  '$foo()'  is like  '$foo' , /me thinks
18:57 masak it would be a nice way to resolve the ensuing ambiguity between Int $a? and Str $a?
18:58 spinclad masak: a definite nothing is narrower than a possible Int or Str, i agree
18:58 * masak submits rakudobug
18:58 masak might need a bit of spec too, maybe.
18:59 spinclad #rs in 1?
18:59 masak yep.
18:59 TimToady .oO(Radio Shack? :)
18:59 masak oh, oh, oh! an idea for the proto.perl6.org page: the script fetches a logotype (in .png or .svg or whatever) from a fixed location in the repo, and shows it along with the name.
18:59 spinclad (rakudoshack)
19:00 TimToady (MoPerl Six, we'll leave the light on fer ya.)
19:00 Unixmonkey joined #perl6
19:01 masak also, we could have small medal-or-cup icons for things the community likes, such as a README, or tests, etc.
19:09 ShaneC1 joined #perl6
19:10 ShaneC1 left #perl6
19:11 moritz_ masak: feel free to hack away :-)
19:11 sorear joined #perl6
19:12 masak sure. just going to let patrickas apply his style patch first.
19:12 TimToady .u ⚱
19:12 phenny U+26B1 FUNERAL URN (⚱)
19:12 TimToady that's sort of a cup
19:13 masak I'm thinking one gold, one silver and one bronze.
19:13 isBEKaml sorta depressing... ;)
19:13 TimToady .u ⊔
19:13 phenny U+2294 SQUARE CUP (⊔)
19:13 isBEKaml trophy?
19:13 masak I was envisioning something with handles.
19:14 TimToady pity unicode stars don't come in gold
19:15 masak something like this. http://schools.bvsd.org/monarchhigh/athletics/cheerleading/large_trophy-cup.jpg
19:15 isBEKaml .u ч
19:15 phenny U+0447 CYRILLIC SMALL LETTER CHE (ч)
19:15 isBEKaml looks sorta like a cup..
19:16 tri1 joined #perl6
19:16 isBEKaml .u Ч Ч
19:16 phenny U+0427 CYRILLIC CAPITAL LETTER CHE (Ч)
19:16 phenny U+0020 SPACE ( )
19:16 phenny U+0427 CYRILLIC CAPITAL LETTER CHE (Ч)
19:16 isBEKaml more beer! :)
19:17 masak I think I like the funeral urn best so far, from an esthetic standpoint.
19:17 masak but dedicated .png icons would probably be even better.
19:17 isBEKaml Just don't show what that translates to... ;)
19:20 BrowserUk joined #perl6
19:20 masak I did not realize that patrickas++' style changes had already gone live.
19:21 masak isn't that beautiful? http://proto.perl6.org/
19:21 masak man, the Perl 6 community rocks!
19:21 moritz_ masak: patrickas++ has his changes in, so now it's your turn :-)
19:21 masak 'spose so :)
19:21 vegard what's with the ++ everywhere?
19:22 moritz_ vegard: karma tracking
19:22 masak buubot: karma patrickas
19:22 buubot masak: patrickas has karma of 8
19:22 masak patrickas++
19:22 masak buubot: karma patrickas
19:22 buubot masak: patrickas has karma of 9
19:22 vegard o..k
19:22 patrickas oh!
19:22 moritz_ vegard: ++ also increments variables in both Perl 5 and Perl 6
19:23 isBEKaml proto.. neat-o, patrickas++
19:26 patrickas Thanks all, got to go ... It was great making my very first own tiny contribution :-)
19:29 cdarroch joined #perl6
19:29 cdarroch joined #perl6
19:38 isBEKaml moritz_: The proto link on getting-started page of perl6 doesn't point to the latest one. Shouldn't it be proto.perl6.org?
19:40 moritz_ isBEKaml: I'd like to see a paragraph about what proto is on that page first
19:40 moritz_ (ie on proto.perl6.org)
19:40 moritz_ and a link to the github repo
19:40 moritz_ once that's done, we can change the link
19:43 isBEKaml ah, ok..
19:44 moritz_ isBEKaml: but you're welcome to do that, you can even grab paragraphs for the proto readme and HTMLify it
19:45 tri1 left #perl6
19:45 isBEKaml moritz_: sure, I can do that! I was just reading szabgab's p5-6 blogs and yours too! :)
19:45 kiffin joined #perl6
19:46 isBEKaml moritz_: HTMLify it in the sense, just apply HTML, with styles thrown in?
19:46 masak this day is just so full of contribution! \o/
19:46 masak isBEKaml: yes, I'd guess in that sense.
19:46 masak mostly make it look not-crappy on the HTML page.
19:46 kgish joined #perl6
19:46 isBEKaml masak: I have done some web dev, not too much. ;)
19:47 moritz_ yes
19:58 kst joined #perl6
20:11 isBEKaml moritz_: I got a basic draft done. Where do I put it up? pastebin it?
20:11 moritz_ isBEKaml: we'll get you a proto commit bit, and you just push it directly
20:11 masak hugme: add isBEKaml to proto
20:11 hugme masak: ERROR: Can't add isBEKaml to proto:  404 Not Found
20:11 moritz_ isBEKaml: what's your github id? (create one if you don't have one)
20:11 masak rakudo: Any ~~ /foo/
20:11 isBEKaml moritz_: Basically, I grabbed the entire readme from masak's github page.. :)
20:11 p6eval rakudo 1eef08: OUTPUT«Method 'match' not found for invocant of class ''␤current instr.: 'perl6;Regex;ACCEPTS' pc 525570 (src/gen/core.pir:84244)␤»
20:12 isBEKaml moritz_: svatsan
20:12 masak I'm trying to understand the root of this error message.
20:12 masak which class is it that doesn't have a .match method?
20:12 moritz_ masak: .match is in Cool, not in Any
20:12 masak what's .match?
20:12 moritz_ hugme: add svatsan to proto
20:12 * hugme hugs svatsan. Welcome to proto!
20:13 isBEKaml \o/
20:13 BrowserUk joined #perl6
20:13 masak isBEKaml: welcome aboard!
20:15 masak rakudo: Any.new ~~ /foo/
20:15 p6eval rakudo 1eef08: OUTPUT«Method 'match' not found for invocant of class 'Any'␤current instr.: 'perl6;Regex;ACCEPTS' pc 525570 (src/gen/core.pir:84244)␤»
20:16 masak ah; it omits the class name when talking about type objects.
20:16 moritz_ masak: .match is what regexes matches desugar to
20:16 isBEKaml masak: where do I commit to ? I got a basic HTML page done.
20:16 moritz_ isBEKaml: proto repo, file web/index.tmpl
20:21 kensanata joined #perl6
20:26 kst joined #perl6
20:31 colomon moritz_++ # p6c e-mail
20:32 colomon I don't think list(SList) should just hand back its argument.
20:32 colomon It should hand back an Iterator which yields the values in SList.
20:33 moritz_ that might be right, I forgot what we settled on
20:33 colomon I don't think we did settle on anything.  :)
20:33 moritz_ I should have re-read the irc log
20:33 moritz_ there's one potential problem with that
20:33 moritz_ consider
20:33 colomon but we're a lot closer to the same wavelength now.
20:33 moritz_ my $x = $str.split; # $x now contains an SList
20:34 moritz_ for $x { ... } # implicitly calls list() on $x
20:34 moritz_ or for @($x) { ... } not sure
20:34 moritz_ now 'for' exhausts the iterator that list($x) returned
20:34 moritz_ are the items in $x automatically reified?
20:35 colomon yes, that's the job of the SList iterator.
20:35 colomon just to be clear:
20:35 moritz_ so list($x) actually returns something which is still tied to to $x pretty tightly
20:35 colomon moritz_: has to be.
20:36 isBEKaml moritz_, colomon: sorry to butt in. Isn't the purpose of the iterator to be something of an use and throw? I can be sorely wrong here though. Coming from javaland, iterators are use-and-throw.
20:36 colomon you get weird interleaving combinations, with SList specified in terms of one iterator and giving you another iterator to process.
20:37 isBEKaml that is, once an iterator exhausts itself, it cannot reposition itself to the beginning of the lists..
20:37 colomon isBEKaml: yes, that's the idea.
20:37 colomon isBEKaml: right, but the idea is the SList type remembers the earlier values of the iterator.
20:39 colomon In particular, you can store an infinite iterator in an "SList" (that's a temporary named moritz_ coined), and everything will work as long as you don't try to get all the elements.
20:39 isBEKaml colomon: so, SLists are essentially Lists-in-iterator's clothing..
20:40 pmichaud I read it as being iterators-in-lists clothing
20:40 pmichaud i.e., looks like a list on the outside
20:40 colomon pmichaud++
20:40 moritz_ right
20:40 pmichaud I'm not sure the @ sigil means 'array', although perhaps it should.
20:40 colomon right now it means Positional
20:40 moritz_ pmichaud: @ means 'Positional', and defaults to 'Array'
20:40 pmichaud I disagree that gather/take should return an iterator
20:40 colomon but that's a big source of potential trouble IMO
20:40 pmichaud gather/take should return a Slist
20:40 moritz_ ie my @x # @x is an Array
20:41 pmichaud oh, wait, I need to read further
20:41 pmichaud (reading further)
20:41 pmichaud actually, I'll shut up until I read the whole thing
20:41 moritz_ :-)
20:41 isBEKaml I haven't seen the mail. I'm not on the mailing list. :)
20:41 isBEKaml gmane links?
20:42 pmichaud okay, I see one thing I disagree with :-)
20:43 pmichaud "Assigning an Iterator to a variable automatically turns it into an SList"   means there's no way to have a variable reference an iterator.
20:43 colomon moritz_: for maximal confusion, I think List should be your SList, and Seq should be your Iterator.  :)
20:43 moritz_ pmichaud: binding
20:43 moritz_ pmichaud: to a scalar
20:43 pmichaud moritz_: I don't think I like that sort of distinction.
20:43 smash_ joined #perl6
20:43 pmichaud it gives too much spooky behavior to assignment
20:43 smash_ hello everyone
20:44 masak smash_: \o
20:44 pmichaud in particulary, I think I should be able to do     my $h = %hash.iterator;   and know that $h is an iterator
20:44 moritz_ pmichaud: I thought it was the only sane-ish behavior that would solve the double iteration problem
20:44 colomon pmichaud: I don't think we can do this without some sort of spooky behavior.
20:44 pmichaud colomon: in which case binding should probably get the spooky behavior.
20:44 pmichaud putting it with assignment is too... spooky.
20:45 pmichaud also, it means filehandles would be a bit weirdish
20:45 pmichaud my $fh = open(...);   # don't convert me, please!
20:45 pmichaud unless of course filehandles aren't iterators, but ...
20:46 moritz_ maybe we need another type?
20:46 moritz_ auto-upgrading iterators, and iterators that don't
20:46 pmichaud that doesn't feel right to me either
20:46 pmichaud I think we need Lists that can encapsulate iterators and are the common return case
20:46 pmichaud and that gather/take returns a List
20:46 isBEKaml I don't see the mail here: http://www.nntp.perl.org/group/perl.perl6.compiler/
20:46 isBEKaml Takes upto a day?
20:47 colomon Lists that can encapsulate iterators and are common return case ++
20:48 moritz_ pmichaud: and then how do we solve the problem that for 1..1e6 doesn't store 1mio integers?
20:48 colomon the problem is, do those lists behave like moritz_'s Iteartor or SList?
20:49 masak rakudo: for 1, 2 { say $^a, $a }
20:49 p6eval rakudo 1eef08: OUTPUT«11␤22␤»
20:49 masak \o/
20:49 jonrafkind joined #perl6
20:49 moritz_ rakudo: for 1, 2 { say $^a, $^a }
20:49 p6eval rakudo 1eef08: OUTPUT«11␤22␤»
20:49 pmichaud moritz_: because the 1..1e6 isn't stored in an array or Slist ?
20:50 moritz_ pmichaud: you're right
20:50 moritz_ so list(1..1e6) would return... what? an Iterator?
20:50 pmichaud an Slist
20:50 pmichaud we want to hide iterators, in general
20:51 moritz_ which in turn would store the 1mio entries, right?
20:51 pmichaud only if it gets bound to something
20:51 pmichaud (I'm still working out the details also)
20:51 moritz_ now you're talking about a different SList than my proposal :-)
20:52 pmichaud moritz_: sure.  I just know that "assigning an iterator changes it" feels Very Wrong.
20:52 masak TimToady: S02:4013:
20:52 masak foo (bar()):        # bar().foo(1)  -- even if foo declared sub
20:52 masak TimToady: I think that's a stray '1'.
20:52 isBEKaml moritz_: in the case 1..1e6, they would behave like sequences in databases? Don't pre-calculate, do on need basis?
20:52 masak or I'm really missing something.
20:52 moritz_ isBEKaml: I'm not following you, but I'm probably just too tired
20:53 isBEKaml moritz_: And, we'd just be saving the position bit/marker?
20:53 tylerni7 joined #perl6
20:53 pmichaud note that 1..1e6 is neither a list nor an iterator :-)
20:53 * colomon is not clear on how "only if it gets bound" differs from "assigning an iterator changes it"
20:53 pmichaud colomon: because it puts the magic in the binding, not in assignment
20:53 pmichaud assignment (to a scalar) shouldn't be magical
20:54 kst joined #perl6
20:54 isBEKaml moritz_: In the case of doing 1..1e6 and storing into an iterator (SList? ), it doesn't pre-calculate all the values upto 1 million and store, right? Rather, we just update the position marker and spit out the next value when the user requests for it?
20:54 pmichaud isBEKaml: correct, we don't pre-calculate all of the values.  That's "laziness".
20:55 moritz_ isBEKaml: right... the question is how we can prevent it from storing all the *old* generated values
20:55 colomon so my $a = split (blah) makes $a a moritz_ Iteartor?
20:55 isBEKaml moritz_: discard? iterators are never meant to be reused, right?
20:55 pmichaud isBEKaml: sometimes the values they contain are.  Consider   my @a = 1..1e6
20:55 lisppaste3 joined #perl6
20:55 pmichaud we don't want that to calculate all 1 million elements either
20:55 colomon isBEKaml: the problem is that sometimes you do want to store all the old values.
20:55 pmichaud at least, not until they're needed.
20:56 colomon isBEKaml: we're trying to figure out how to cleanly handle both cases
20:56 pmichaud colomon: in my world,  my $a = split (blah)  should give back a list
20:56 isBEKaml IOW, you're seeking to find a way to bidirectionally traverse an iterator?
20:56 pmichaud isBEKaml: no, not really
20:56 colomon pmichaud: where a list is a wrapper around an iterator, with no memory.
20:57 colomon ?
20:57 pmichaud isBEKaml: we're trying to figure out how to make arrays lazy.
20:57 * moritz_ calls it a day, and hope he finds the courage to backlog
20:57 pmichaud colomon: lists can have memory, if bound
20:57 pmichaud colomon: we have cases where lists need to remember values also
20:57 isBEKaml pmichaud: I see now... as we move deeper into the iterator, the size just keeps growing and growing. We need to avoid that..
20:58 colomon pmichaud: this is why I liked moritz_'s terminology.
20:58 colomon are you proposing there would be one type for wrapper the iterator, and sometimes it remembers and sometimes it doesn't?
20:59 pmichaud colomon: I don't have a formal proposal yet.  I just know what pieces don't work :-|
20:59 pmichaud and "assigning an iterator makes it something else" is in the Won't Work category for me at the moment.
20:59 pmichaud so is  "split returns an iterator"
20:59 pmichaud (for similar reasons)
21:00 pmichaud to me, split should return something that acts like a list (and therefore contains an iterator to handle the laziness part)
21:00 colomon yes, that's a moritz_ Iterator (e-mail terminology)
21:00 pmichaud no, because moritz_ Iterators don't act like lists
21:01 pmichaud at least, I didn't see that part
21:01 colomon how does a list act?
21:01 orafu joined #perl6
21:01 pmichaud mainly, you can .[] it
21:01 pmichaud but you can also do things like ask for its elements, reverse it, etc
21:02 pmichaud the other place that "iterator converts on assignment" is wrong is in passing arguments to functions
21:02 pmichaud because function calls are binding operations, not assignment
21:03 masak rakudo: sub foo(@a) { @a[1] = "NOES" }; my @a = <OH HAI>; foo(@a); say ~@a
21:03 p6eval rakudo 1eef08: OUTPUT«OH NOES␤»
21:03 masak is this supposed to be allowed?
21:03 isBEKaml masak: I don't know how the page would appear online. How long before perl6.org gets updated?
21:03 masak moritz_: ping! :)
21:03 pmichaud masak: I haven't seen a clear answer to that question.
21:03 isBEKaml masak: I have never worked with tmpl.. :(
21:03 masak isBEKaml: have you pushed?
21:04 isBEKaml masak: yet to..
21:04 masak I can take a look at the commit after you've pushed.
21:05 buu joined #perl6
21:06 buubot joined #perl6
21:06 * arnsholt is starting to get adventurous with LaTeX
21:06 arnsholt Which is interesting ^^
21:06 isBEKaml masak: done..
21:06 * masak looks
21:06 SmokeMachine joined #perl6
21:07 masak isBEKaml: check again. I don't see a commit.
21:08 masak pmichaud: ISTR there was some wording in the spec about the readonlyness stretching 'one level down' into arrays/hashes, but I can't find it now, despite trying.
21:08 pmichaud masak: From an implementation perspective, I see nothing but pain in trying to make that happen.
21:08 isBEKaml masak: I get a return code 22 when I try to push it. I then tried git commit -a.
21:09 masak pmichaud: anyway, this already fails:
21:09 masak rakudo: sub foo(@a) { @a[0, 1] = <OH NOES> }; my @a = 0, 1; foo(@a)
21:09 p6eval rakudo 1eef08: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 17868 (src/builtins/Junction.pir:393)␤»
21:09 masak so something is inconsistent, at least.
21:09 * masak submits rakudobug
21:09 masak isBEKaml: the 'return code 22' doesn't tell me much. maybe nopaste the whole error situation somewhere?
21:10 masak isBEKaml: have you changed your repo location to the writable one?
21:10 Guest80365 left #perl6
21:10 colomon pmichaud: I guess I'm completely lost as how you expect split's return value to act like it has memory except when we want it to not to have memory.   We've all been assuming that these were two such different functions it required two different classes to implement them.
21:12 pmichaud colomon: I think that if we have   split(...).WHAT   that we probably should not get "SomethingIterator"
21:12 isBEKaml masak: http://pastebin.com/xJ6JSYJE
21:12 colomon pmichaud: yes, I think we all agreed on that a month or two ago.
21:13 colomon but I think most of us were assuming it would be something very close to an iterator, just cleaner.
21:13 isBEKaml masak: I'm right now thinking of forking..
21:13 pmichaud then split() can't return an iterator, it has to return something that encapsulates the iterator and makes it look more like a common list
21:13 pmichaud I have an errand that must be done in the next 17 mins -- bbiaw
21:14 masak isBEKaml: I'm not 100% sure, but might be that https://svatsan@github.com/masak/proto.git/ is wrong. did you get it from the project page at github?
21:14 isBEKaml masak: yes.
21:14 masak then maybe fork. or nopaste your patch.
21:14 isBEKaml masak: I took it only after I saw something mentioning "This URL has read+write access"
21:15 masak sounds right to me.
21:16 Unixmonkey left #perl6
21:17 smash_ can't build rakudo on macosx ? i'm the only one having problems ?
21:18 masak worksforme.
21:20 kst joined #perl6
21:20 smash_ grr.. it works now :\
21:21 molaf joined #perl6
21:21 isBEKaml masak: Can you check? I just committed to my repo.
21:21 isBEKaml masak: grrr.. I don't have command line access. Just now did via web interface. :/
21:23 * masak looks
21:24 masak isBEKaml: it looks sane. you accidentally the newline at the end, but it probably doesn't matter.
21:25 isBEKaml masak: I wasn't sure about float bits that I added to the about text. I couldn't try setting a trial run locally.
21:25 masak I'd suggest that, yes.
21:25 spinclad i can see the <omit/>s!
21:26 isBEKaml masak: mainly because I don't know how to work with tmpl files.. :|
21:26 isBEKaml masak: kind of like YAML? Then I need to go get a grip on it...
21:27 masak er, no HTML::Template isn't a lot like YAML...
21:28 masak isBEKaml: hm. I'm not sure floats are the right solution here, on second thought.
21:29 masak see, the table with the content is centered on the page.
21:29 masak that meshes badly with floating right.
21:29 masak ...I'd imagine.
21:29 isBEKaml masak: divs are block elements and they are not centered. the margin styles are doing their work.
21:30 masak ok.
21:30 wknight8111 joined #perl6
21:30 isBEKaml masak: I'll try to set up something here to try view the page on a dry run..
21:32 isBEKaml masak: Can you tell me how the page looks like?
21:32 masak which page? URL?
21:33 isBEKaml it's updated?
21:33 * masak is utterly confused
21:33 isBEKaml masak: I was referring to the index page for proto.. I was asking if that was updated on perl6.org yet?
21:34 masak I'll generate the page locally and get back to you :)
21:34 * isBEKaml is setting up HTML::Template here
21:40 masak isBEKaml: I've now finished generating it.
21:40 isBEKaml masak: I'm generating it here too.
21:40 masak the right float causes the centering to disappear here on Google Chrome.
21:40 isBEKaml hmmm, let me see..
21:41 masak I think I'd prefer a solution which didn't involve floats.
21:41 isBEKaml ah, yes, it's too far off..
21:41 masak floats have other problems as well. they cause things to jump around when the browser canvas is resized, for example.
21:42 masak but it was a good first attempt! :)
21:42 * masak tries generating the HTML without the floats
21:43 isBEKaml masak: No!
21:43 isBEKaml they are block elements and would come one after another.
21:44 masak they do.
21:44 masak it looks much better.
21:44 masak but now it feels odd that only the headings are right-justified.
21:44 isBEKaml masak: hmm, in that case, I can push the about text right..
21:45 masak since all of the rest of the page is centered now.
21:45 isBEKaml let the proto listing come down further left indexed.
21:45 isBEKaml s/indexed/aligned/
21:45 masak it was left aligned when we started fiddling. we decided centering it looked nicer.
21:46 masak I still think it looks nicer.
21:46 diakopter .
21:47 isBEKaml masak: I'm trying to make the about text right aligned, with proto listing further down left aligned..
21:48 masak isBEKaml: I know. I'm trying to convince you otherwise... :)
21:48 masak isBEKaml: is it alright with you if I adapt your patch without the floats, and commit it to proto?
21:49 ive joined #perl6
21:49 isBEKaml masak: I added floats since they were the first thing that came to mind. Now that I think about it, I could alter them to margins. :)
21:49 masak the margins were already there.
21:49 masak but they were canceled out by the floats.
21:49 isBEKaml masak: Plus the text isn't all that nicely done.. jagged right ends..
21:50 masak that can be improved later. :)
21:50 masak we probably want to change the text itself, too. but this is better than no text.
21:50 isBEKaml alright, first commit, 0320 hrs here.!
21:51 isBEKaml :)
21:51 kst joined #perl6
21:52 isBEKaml masak: to the #about style, just add one more property there. text-align: justify
21:52 masak isBEKaml: pushed: http://github.com/masak/proto/commit/e59289722571c4a7d78259b16493a4f9b12ddf0d
21:52 masak isBEKaml: I'll try the justify thing locally.
21:53 isBEKaml masak: the justify thing is to smooten the jagged text..
21:53 isBEKaml smoothen*
21:53 masak aye.
21:54 isBEKaml ah, looks much nicer. no floats, all worked to margins.. :)
21:54 masak proto.perl6.org is doing the rounds at Twitter now, much thanks to alester++ and chromatic++
21:56 isBEKaml nice..
21:56 masak isBEKaml: the 'justify' did indeed look a bit better. I pushed a commit for that, too.
21:56 masak time for me to head home and sleep a bit.
21:56 isBEKaml me too. it's already 03:30 am here.. :)
21:56 isBEKaml gotta rush back to work in 3 hrs...
21:57 masak :)
21:57 masak isBEKaml++
21:57 masak 'night
21:57 isBEKaml g'night
21:59 patrickas joined #perl6
21:59 smash_ where is ^^ operator defined ? or there is some trickery here with or/xor ?
22:05 sjohnson every day i learn something cool about perl
22:10 pjcj joined #perl6
22:12 chitragupt joined #perl6
22:22 colomon smash_: ^^ is defined in grammar.pm.
22:23 colomon pmichaud: are you saying the List class should "has $.bound" flag, and only remember if it is set?
22:25 abbe joined #perl6
22:25 abbe Hi everyone
22:26 pmichaud colomon: you're trying to nail me to specifics where I don't have any yet.
22:26 pmichaud colomon: Sorry.
22:26 abbe If a perl5 program doesn't use any other module except Data::Dumper, is it transformable into a perl6 code ?
22:28 pmichaud colomon: I don't have a detailed proposal down to the point of flags and the like yet.  I know that binding is involved in the equation.  I also know (from other discussions with jonathan) that binding has a strong impact on autovivification of array and hash elements
22:28 pmichaud I know that having functions like split and gather/take return iterators directly is likely to leak details we don't want leaked
22:28 pmichaud I know that Seq as defined in the specification currently leads down false paths
22:29 pmichaud So, in many ways solving this problem is like carving an elephant out of a block of stone.  We just remove pieces that we figure out aren't parts of the elephant.
22:30 pmichaud and we don't keep pieces that we're fairly certain "can't work".
22:32 pmichaud and lastly, having done this at least three times already, I know that it's pretty hard to get to a working solution via incremental changes in the existing code base.  Each underlying change to some basic assumptions pretty much needs a branch to explore the full ramifications
22:33 pmichaud </core_dump>
22:33 k23z__ joined #perl6
22:33 k23z__ joined #perl6
22:36 lichtkind pmichaud: hej welcome back
22:38 * diakopter agrees about gigantic refactorings in branches
22:41 lichtkind ist the defer block modifier still valid?
22:41 lichtkind cant find him in syn
22:44 Juerd Would anyone object to using feather2 to host the Amsterdam PM website?
22:44 abbe any ideas how to read from a process output using perl6 ?
22:45 Juerd It's not directly Perl 6 related, of course.
22:47 diakopter I don't mind...
22:47 diakopter :)
23:06 mikehh rakudo (e3153ad) builds on parrot r46288 - make test PASS, spectest_smolder -> #33630 (pugs r30549) PASS - Ubuntu 10.04 amd64 (gcc with --optimize)
23:06 mikehh t/spec/S05-mass/properties-general.rakudo - TODO passed:   4-6, 11-13, 544-546, 550
23:09 diakopter phenny: tell pmurias hi
23:09 phenny diakopter: I'll pass that on when pmurias is around.
23:17 spinclad Juerd: it's your machine, and your hospitality.  we can join in that hospitality if we like, and i hereby do.
23:18 Dori10 joined #perl6
23:35 Juerd spinclad: It's the community's machine
23:37 Juerd spinclad: My company provides for bandwidth and electricity but the current machine was paid for by The Perl Foundation, the Dutch Foundation for the Promotion of Perl (SPPN) and by private donors
23:43 rv2733 joined #perl6
23:47 BrowserUk joined #perl6
23:47 snarkyboojum sweeeet - http://proto.perl6.org/ :)
23:48 snarkyboojum that happened so quickly :)

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

Perl 6 | Reference Documentation | Rakudo