Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-07-08

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:02 astrojp joined #perl6
00:07 masak TimToady: attempting to implement your $input.comb( / \N*\n | \N+$ /, $limit ) in Rakudo revealed a bug -- non-final lines get their newline combed along with the line content, in contrast to the old IO.lines (and most anything in Perl 6). plz fix. :)
00:08 * masak goes to sleep
00:09 masak 'night, #perl6!
00:11 ewilhelm joined #perl6
00:11 * jnthn sleeps too
00:11 jnthn o/
00:14 ruoso joined #perl6
00:16 ewilhelm is there a more current "cheatsheet" than Damian's 2003 draft?  (http://www.perlmonks.org/?node_id=238031)
00:17 ewilhelm I'm going to throw a whole pile of perl mongers into the deep end and thought it would be neat to get them some of those little floaty things :-D
00:20 TimToady something that old is likely to behave more like sinkers
00:22 TimToady lemme see if I can update it
00:22 lue Is there a Perl6 syntax highlighting file for emacs?
00:24 ewilhelm lue, the vim one has been in the pugs repo iirc
00:26 ewilhelm lue, this is next to that:  http://svn.pugscode.org/pugs/util/cperl-mode.el
00:26 ewilhelm svn log implies that this is what you want
00:27 lue ah, I missed it. thank you.
00:28 ewilhelm TimToady, it would be awesome to be able to have a handout for this kind of thing:  http://pdx.pm.org/kwiki/?July2010Meeting
00:29 kensanata joined #perl6
00:39 kid51 joined #perl6
00:44 ashleydev joined #perl6
00:53 * lue is shocked that he can't find out how to update an emacs major mode...
00:59 ashleydev joined #perl6
01:02 sorear the vim syntax highlighting file is quite slow
01:02 sorear I haven't decided yet if it's worth using
01:03 lue (apparently, the one piece of information they left out was how to update your major modes.)
01:07 kensanata joined #perl6
01:09 tylercurtis lue: just add a (load "/path/to/the/cperl-mode.el") to your .emacs
01:09 sftp_ joined #perl6
01:10 lue I don't want to conflict with my exisitng cperl-mode, which is why I want to update.
01:15 ingy greetings
01:16 lue hello
01:16 PerlJam greets
01:25 astrojp left #perl6
01:25 pmichaud ewilhelm: you might also tell people about the book:  http://github.com/perl6/book/
01:26 pmichaud we'd love to get feedback
01:26 lue .oO(hrm, how to set up cperl-mode to highlight Perl *6*....)
01:26 pmichaud (click "downloads" to get to the already-converted pdf versions)
01:33 kid51 pmichaud:  Looks like I will give that talk on Rakudo* at NYLUG in two weeks.
01:33 pmichaud kid51: excellent
01:34 pmichaud I'm hoping to write up some of those notes tonight, will send you a link to the draft
01:34 kid51 Would reading that book be useful prep for that.
01:34 kid51 ?
01:34 pmichaud it might -- at least the first couple of chapters (more)
01:34 pmichaud you might also just skim each section and see what (if anything) jumps out at you as being "whoa, that's cool"  :-)
01:34 pmichaud and if nothing jumps out, we need to know that too :)
01:34 kid51 k
01:35 kid51 I think I'm going to present this talk as "an announcement, and also as an invitation," but NOT as "an explanation"
01:35 plobsing joined #perl6
01:36 TiMBuS joined #perl6
01:37 pugssvn r31573 | lwall++ | [Str] limits should default to Inf rather than * since that is (supposedly) compatible with Int
01:41 tylercurtis Why do I get a segfault on eager-ing a large enough list in rakudo? Is that a Parrot bug?
01:41 pmichaud tylercurtis: might be running out of memory
01:41 sorear probably not
01:41 sorear just stack overflow
01:42 sorear parrot doesn't like big linked lists in the GC
01:42 ruoso joined #perl6
01:52 silug joined #perl6
01:54 proller joined #perl6
01:56 eternaleye joined #perl6
02:09 lue afk
02:09 ewilhelm pmichaud, no html version posted somewhere?
02:11 jimk joined #perl6
02:11 pmichaud ewilhelm: alas, not yet
02:12 pmichaud pdf tends to work for our needs
02:15 ewilhelm suppose I could print a couple of those to have on-hand at the meeting
02:17 pmichaud I tend to just view them via pdf reader
02:17 pmichaud works about the same as html :-)
02:17 eternaleye joined #perl6
02:17 ewilhelm you have one of those tallscreen monitors? ;-)
02:19 pmichaud no, but I know how to minimize the menus and sidebars in acrobat reader :)
02:19 pmichaud anyway, yes, we need more cheat sheets and intro materials
02:20 pmichaud afk for a bit
02:46 perigrin joined #perl6
02:51 perigrin I had a curiosity question about callsame as illustrated in masak's "mixin" post ... is it implicitly a method call there?
02:52 perigrin (http://use.perl.org/~masak/journal/40434 context)
02:53 redicaps joined #perl6
03:02 redicaps left #perl6
03:03 redicaps joined #perl6
03:03 agentzh joined #perl6
03:22 TiMBuS perigrin, you mean callsame?
03:22 perigrin TiMBuS: er ... yes did I spell it wrong?
03:23 TiMBuS no i meant, are you asking if callsame is implicitly a method call or is something else in the code misleading you
03:23 TiMBuS (and yes, it is a method call)
03:24 perigrin hmm 'k that's what I figured ... but it didn't use the '.' sigil for implicit invocants so I wasn't sure.
03:25 TiMBuS callsame/callwith/nextsame/nextwith are all a bit special
03:25 perigrin that means to directly replicate masak's code in Perl5 I'd have to resort to XS witchery. I'm fine with an explicit invocant instead :)
03:27 perigrin or hmm possibly Devel::Declare whcih is XS witchery but XS witchery I'd already brought in when I used MX::Declare.
03:28 TiMBuS are you planning on making a mixin library for perl5?
03:30 perigrin other than does and callsame, Moose basically gets there
03:31 perigrin https://gist.github.com/raw/56f4618d33c3bbc30d40/09eecdcbffddb8e5f0657d516446a5a1adad1c72/gistfile2.txt is very very close to what masak had and I can't see why it wouldn't work.
03:33 TiMBuS that's about right.
03:35 TiMBuS the bigger difference is callsame will work in subroutines as well
03:35 TiMBuS and in wrapped methods/subs
03:37 perigrin right
03:38 ash_ joined #perl6
03:38 perigrin which is partly why I was confused by it's nature here ... did it supply an invocant ... and if so why didn't it use .callsame
03:38 * perigrin shrugs
03:42 TiMBuS i guess its not really needed because you cant callsame on something that isnt the same? ¯\(°_o)/¯
03:43 perigrin yeah and perl6 doesn't have perl5's issues with context being the only differentiator between function calls and method calls.
03:47 TimToady callsame doesn't know what its object is until it has a conversation with the surrounding dispatcher
03:47 [Coke] joined #perl6
03:47 TimToady the routine it is going to call is certainly *not* in $_
03:48 TiMBuS yay someone who can explain it more concretely! i didnt want to make assumptions because, well you know.. 'yada yada, u and me'
03:49 TimToady to the first approximation, nextsame is equivalent to "next CANDIDATE", assuming that some dynamically surrounding dispatcher has a loop over the candidates that is labelled CANDIDATE:
03:50 TiMBuS i think he meant $.callsame though
03:50 TimToady the other variants are not as much like "next LABLE"
03:50 TimToady LABEL even
03:51 TimToady since next doesn't allow you return ("call"), nor pass arguments ("with")
03:52 TimToady one way it might work is if the surrouding candidates are in @*CANDIDATES
03:52 TimToady then callsame is equivalent to @*CANDIDATES.shift.callsame
03:53 TimToady but the specs don't currently specify how a dispatcher communicates with its control verbs
03:56 TiMBuS i like lable better. adds a bit of french romance to the language :)
04:03 diakopter it's mushy enough as it is ;)
04:04 silug joined #perl6
04:13 perigrin TiMBuS: I did mean $.callsame, confusing that with .callsame is my bad.
04:14 ashleydev joined #perl6
04:32 ashleydev joined #perl6
04:34 jaldhar joined #perl6
04:56 thebird joined #perl6
05:12 TimToady $.callsame implies that there's a callsame method on self, which is doubtful
05:12 TimToady unless self happens to be a routine
05:19 sorear How does lastcall work then?
05:24 pmichaud joined #perl6
05:53 jaldhar joined #perl6
06:10 _mpu joined #perl6
06:25 tadzik joined #perl6
06:27 TimToady ewilhelm: here's a more up-to-date cheat sheet: http://www.wall.org/~larry/cheatsheet
06:28 TimToady anyone else who cares to may also proofread it
06:32 ewilhelm TimToady, awesome.  Thank you.
06:34 uniejo joined #perl6
06:35 lue I love the descriptions for augment and supersede.
06:35 TimToady just revised it a bit
06:35 TimToady list ops was a fossil
06:38 TimToady more tweaks
06:40 sorear TimToady: I don't see m// anywhere
06:40 lue rakudo: #`(parasite!) supersede class Int { method Str { "hi" } }; say Int.Str
06:41 p6eval rakudo 894e79: OUTPUT«===SORRY!===␤"supersede" not yet implemented at line 11, near " class Int"␤»
06:43 lue .oO[ Figures I'd find a 6502 compiler in Perl :) ]
06:46 TimToady revised again, but dunno where I'd put m//
06:47 moritz_ hehe, my browser shortens the title of the cheatsheet to ...eatsheet
06:47 moritz_ #rakudo is new to mee
06:47 moritz_ s/ee/e/
06:48 lue I went there, and I became a chanop of 1 people.
06:49 TimToady oh, was thinking #parrot
06:50 TimToady changed
06:51 lue .oO(It's the kind of cheat sheet to have printed upside-down on a tshirt)
06:52 moritz_ \w == <+space+digit+[_]>
06:52 moritz_ s/space/alpha/
06:54 TimToady right
06:55 sorear wait, !after !before !eq !eqv and !=== are real operators?
06:56 TimToady rakudo: say 1 !after 2
06:56 p6eval rakudo 894e79: OUTPUT«1␤»
06:56 * lue wants an updated periodic table of operators!
06:56 sorear they look like metaop instantiations to me
06:56 TimToady well, sure, it doesn't say they're
06:56 moritz_ does them make a less "real" operator?
06:56 TimToady "real"
06:57 TimToady the main omission is there are no roles
06:58 sorear apparently, in C#, you have to say foreach (foo in bar)
06:58 sorear saying for (foo in bar) fails with a ten-page error cascade
06:58 sorear even Perl5 did this better :(
06:59 lue thanks to roles separating the two common functions of classes, I'm having to think about how to structure my code. Curse you, good language design!
06:59 sorear lue: rule of thumb, never use 'is'
06:59 sorear superclasses are so 1960's
07:00 sorear also, I've yet to find a reason to use inheritance other than "this @*$#* language won't let me declare a role"
07:02 lue I had to do that in Python. I think, once I figure how to structure my code, roles will help big time.
07:03 Ross joined #perl6
07:04 TimToady I guess I'll post it to perlmonks now
07:12 kfo joined #perl6
07:17 lue afk
07:18 TimToady zzz
07:20 f00li5h joined #perl6
07:20 f00li5h joined #perl6
07:23 shade_ joined #perl6
07:24 sorear awesome.  my &die just crashed.
07:27 envi^home joined #perl6
07:30 indra joined #perl6
07:34 dalek niecza: 91d480a | sorear++ |  (3 files):
07:34 dalek niecza: Implement C3 MRO.  Allow classes to have superclasses.
07:34 dalek niecza: review: http://github.com/sorear/niecza/commit/91d480a65f90ac46f41bb05f4d0c969a1f965164
07:34 dalek niecza: bd25cc5 | sorear++ |  (2 files):
07:34 dalek niecza: Add add-super to the MOP.  NEW CLASSES: Any, Cool
07:34 dalek niecza: review: http://github.com/sorear/niecza/commit/bd25cc57c01209bdd126ae0395c0e1e0d8917cbb
07:51 xinming joined #perl6
08:01 Mowah joined #perl6
08:02 timbunce joined #perl6
08:26 dakkar joined #perl6
08:31 Mowah joined #perl6
08:36 shade_ joined #perl6
08:38 kensanata joined #perl6
08:39 dakkar joined #perl6
08:40 LionMadeOfLions joined #perl6
08:47 Trashlord joined #perl6
08:55 clintongormley joined #perl6
08:58 dalek niecza: a3a064e | sorear++ |  (5 files):
08:58 dalek niecza: Tie the knot and grandfather Scalar and Sub under ClassHOW
08:58 dalek niecza: review: http://github.com/sorear/niecza/commit/a3a064ea507d9b843ea3364d3ea9652d83d8021f
09:04 sorear niecza now has something you could call a class hierarchy
09:04 sorear Mu -> Cool
09:04 sorear erm.
09:04 moritz_ Mu -> Any -> Cool I hope
09:04 sorear Mu -> Any -> Cool
09:04 sorear -> Sub
09:04 sorear -> Scalar
09:05 sorear nothing else yet
09:05 meppl joined #perl6
09:05 sorear next up is the numbers
09:05 sorear I need to learn how coercions work
09:07 moritz_ method calls :-)
09:08 mathw gotta start somewhere
09:08 mathw so clearly you now need Junction and autothreading :)
09:09 sorear that can wait
09:09 sorear after numbers, I'm doing regexes
09:10 * moritz_ recommends strings too
09:11 sorear I already have str
09:11 arnsholt Heh. Those might be useful for testing the regexes one supposes =)
09:11 sorear Str shouldn't be too hard
09:12 sorear arnsholt: I plan on giving the regexes the ultimate torture test
09:12 mathw Depends, do the underlying .NET strings do .graphs and .chars and all that?
09:12 sorear a regex so nasty that Rakudo chokes and dies
09:12 arnsholt Interesting. What is it?
09:12 sorear STD.pm6
09:12 arnsholt =D
09:12 arnsholt Nice, nice
09:13 sorear .NET strings only do .chars
09:13 mathw haha
09:13 sorear but I think that's ok
09:13 sorear for now
09:13 mathw it's a good start :)
09:13 sorear .bytes is quite easy, it's just 2 * .chars
09:13 phenny sorear: "is quite easy, it's just 2 * .chars"
09:14 mathw are they always in two-bytes-per-character format then?
09:14 sorear they're always in either UCS-2 or UTF-16
09:14 sorear the docs are not quite clear on which it is
09:15 * sorear will have to RTFS, but not now
09:15 mathw well that could be entertaining :)
09:16 sorear "Mono"
09:19 jnthn ddmorning
09:20 jnthn s/dd// :-) # oops
09:20 moritz_ jnthn: good morning. Are you shivering? :-)
09:20 jnthn I can only conclude I wrong-windowed this one for vi at some point... :-)
09:22 hejki hehe, i'm usually saying :wq to irc :P
09:22 moritz_ :wq
09:22 * hugme hugs moritz_, good vi(m) user!
09:22 arnsholt I've just given up and started signing all my mails with :wq =)
09:25 * hejki hugs hugme, good huggiving hugmachine
09:26 jnthn #18010 0x00007ffff7a5e708 in Parrot_gc_mark_PMC_alive_fun
09:26 jnthn ENOTFUN
09:26 pugssvn r31574 | moritz++ | [perl6.org/documentation] add cheat sheet, clean up a bit
09:28 sorear jnthn: nothing to see here, just a run of the mill "linked lists are not supported on Parrot" crash
09:28 sorear OK
09:28 sorear I need to understand more of the implicit coercion case
09:29 sorear sub foo (Num $x) { } # Can I pass 2 to this?
09:29 moritz_ no
09:29 moritz_ (rakudo gets this wrong, because it follows an older spec)
09:30 moritz_ if you want to allow 2, you'd write sub foo (Real $x) { }
09:30 sorear Are there any implicit coercions?
09:30 jnthn sorear: No
09:30 jnthn sorear: Not so far as I can tell
09:31 jnthn sorear: It's more like, some operators put things into a certain context, and that is what leads to a coercion
09:31 sorear Hah... this simplifies things.
09:31 jnthn But the actual coercion is always explicitly requested somewhere
09:31 jnthn like the multi candidate :(Any, Any) for infix:<+> does a Numeric coercion on each argument.
09:32 jnthn And re-dispatches.
09:35 pugssvn r31575 | moritz++ | [perl6.org/documentation] remove a book with wrong link (there does not seem to be a correct link on the apress site for it)
09:38 sorear Not :(Cool, Cool)?
09:38 sorear I thought Cool was the type for objects that could be expected to support .Numeric and .Stringy
09:40 moritz_ I don't think that notion has propagated to operators yet, only ordinary routiines
09:40 moritz_ might be worth considering though
09:45 sorear Stringy doesn't seem to actually be specced
09:46 sorear ~ coerces /to/ Stringy, Str and Blob /do/ Stringy
09:46 sorear but what Stringy /is/? No
09:46 moritz_ it's the common role of strings and buffers
09:46 * sorear is trying to understand how Cat pretends to be Str, ish
09:47 moritz_ it is Cool, and supports substr(), split, match, subst, ...
09:47 sorear so Cat needs to duplicate all the methods of Str?
09:48 moritz_ unless it finds a clever way to delegate them
09:48 shade_ joined #perl6
09:49 sorear have we solved the &reducewith problem yet?
09:49 moritz_ which one?
09:50 sorear defining helper subs in the setting that the compiler can find, but without polluting
09:50 moritz_ that's easy - put it in a package
09:51 moritz_ the question was more if we want reducewith to be seen
09:51 arnsholt One of the PDDs (can't remember which one off-hand) suggests storing private bits in a different HLL namespace
09:51 moritz_ and iirc the answer was "yes, but maybe with a different name"
09:51 sorear PDDs have no meaning here
09:51 sorear neither do HLL namespaces
09:51 sorear this is #perl6, not #parrot
09:51 moritz_ arnsholt: that's a parrot thing, and sorear is working on a non-parrot implementation :-)
09:52 sorear and I happen to be working on a .NET implementation
09:52 arnsholt Oh, right. My bad, my bad
09:52 moritz_ anyway, the specs talks about all-cap names being potentially resevered
09:52 moritz_ so it doesn't feel so bad to have an INTERNAL namespace where all semi-private stuff is put
09:53 sorear and if you shadow my package INTERNAL { }, is the compiler allowed to blow up in your face?
09:53 moritz_ yes
09:53 dalek book: 19a45cb | (Dean Serenevy)++ | bin/book-to-latex:
09:53 dalek book: Properly render side bars.
09:53 dalek book: Makes use of new Pod::PseudoPod::LaTeX features.
09:54 moritz_ because you mocked with a potentially reserved name
09:54 mberends joined #perl6
09:54 dalek joined #perl6
09:54 arnsholt sorear: I imagine that'd be a bit like shadowing stuff like defun() in CL. At your own peril, and you better be sure it works =)
09:56 sorear arnsholt: well, it gets more interesting because a lot of stuff desugars to use INTERNAL:: stuff
09:57 sorear like 'my $x' uses INTERNAL::Scalar
09:57 sorear and INTERNAL::Any
09:58 arnsholt Heh. Then explosions would be entirely warranted I think =)
09:58 sorear (OOC, why don't we use cia.vc?)
09:58 sorear I guess I'll need to implement packages soon. :)
09:58 sorear hmm.
09:59 sorear rakudo:   eval 'package Foo; my $x = 2'; say $::Foo::x;
09:59 moritz_ another possible... "solution" is to store lexicals with sigils taht aren't accessible from within normal Perl 6 code
09:59 p6eval rakudo 894e79: OUTPUT«Null PMC access in type()␤  in main program body at line 11:/tmp/Klhmjdqhp7␤»
09:59 moritz_ NPMCA is LTA, but better than giving away $x :-)
09:59 sorear moritz_: you mean, having a special sigil which only parses in the setting?
09:59 moritz_ rakudo: eval 'package Foo; our $x = 2'; say $Foo::x
09:59 p6eval rakudo 894e79: OUTPUT«Null PMC access in type()␤  in main program body at line 11:/tmp/XLMtU30RgN␤»
10:00 sorear rakudo:  eval 'module Foo { our $x = 2 }'; say $::Foo::x;
10:00 p6eval rakudo 894e79: OUTPUT«2␤»
10:00 moritz_ sorear: for example. Or having a lookup-by-name that doesn't even need to parse the sigil
10:00 sorear moritz_: I have to define them somehow
10:01 sorear question: should that code example I just gave run?  There's some stuff hinting that 'our' names are only visible if they are defined in a compilation unit transitively depended on by the current
10:04 * sorear out.
10:25 masonkramer joined #perl6
10:39 JimmyZ joined #perl6
11:13 redicaps joined #perl6
11:18 sorear on the subject of no coercions:
11:19 sorear What is the type of pi?
11:19 Mowah joined #perl6
11:21 moritz_ STD.pm6 seems to assume it's Num
11:22 moritz_ CORE.setting
11:22 moritz_ 100:import Num <pi e i>;
11:22 moritz_ oh wait, that's only the package holding it
11:22 moritz_ either Rat or Num, I think
11:24 moritz_ constant pi is export = 3.14159_26535_89793_238
11:24 moritz_ that's a Rat
11:25 sorear you're looking at the wrong definition
11:25 sorear that's the Rakudo definition
11:25 moritz_ nope
11:26 moritz_ that's in src/perl6/CORE.setting in the pugs repo
11:26 moritz_ line 96
11:26 sorear hrm
11:26 sorear maybe I should use that.
11:27 sorear but my question stands:
11:27 sorear constant pi is export = 3.14159_26535_89793_23846_26433_83279_50288;
11:27 sorear what is the type of this?
11:27 sorear S02 says that it's some magic thing that knows how to be a FatRat, but isn't unless you explicitly ask it to be one
11:30 moritz_ I guess making it a FatRat by default isn't too bad
11:31 pmichaud good morning, #perl6
11:32 arnsholt Moin
11:32 moritz_ good localtime()
11:36 redicaps left #perl6
11:40 rv2733 joined #perl6
11:42 kensanata joined #perl6
11:49 jnthn morning, pmichaud
11:49 pmichaud jnthn: o/
11:50 Mowah joined #perl6
11:52 masak joined #perl6
11:52 masak oh hari, #perl6!
11:52 masak (mata hari, that is)
11:54 jnthn ohlolitsmasak
11:55 frettled The Gang of Three are all active, wooohooooo.
11:59 bbkr joined #perl6
12:05 timbunce_ joined #perl6
12:11 sftp joined #perl6
12:21 szabgab joined #perl6
12:28 gfldex joined #perl6
12:35 * masak forgets the parentheses around an if expression in Perl 5
12:42 TiMBuS hmm. so Sub.wrap isn't working.. it's looking for an attribute in Sub that doesn't exist, then trying to get a property from this nonexistent attribute
12:42 cinch joined #perl6
12:42 TiMBuS is this code copied from alpha that hasn't been fully hooked up again?
12:42 moritz_ rakudo: (sub f { }).wrap()
12:43 p6eval rakudo 894e79: OUTPUT«too few positional arguments: 1 passed, 2 (or more) expected␤  in main program body at line 1␤»
12:43 moritz_ rakudo: (sub f { }).wrap(-> {  })
12:43 p6eval rakudo 894e79: OUTPUT«No such attribute 'proxy' in class 'Sub'␤  in main program body at line 1␤»
12:43 TiMBuS yep thats the one
12:43 moritz_ looks like it, yes
12:43 TiMBuS cur_sub = getattribute self, ['Sub'], 'proxy'
12:43 * masak submits rakudobug
12:43 TiMBuS no mention of proxy anywhere else in the code..
12:44 ghfhdf joined #perl6
12:44 TiMBuS if i knew what a 'property' was i could probably patch this up
12:44 * moritz_ tries if adding a 'proxy' attribute fixes it... would be surprising :-)
12:44 moritz_ TiMBuS: a "property" is simply a piece of data attached to any parrot PMC
12:45 moritz_ which can be set with setprop
12:45 moritz_ and be retrieved with getprop
12:46 jnthn wrap needs re-writing for R*
12:46 jnthn er
12:46 jnthn Since ng
12:46 jnthn Well both :-)
12:47 TiMBuS moritz_, ahh ok, i gathered that from google snippets but wasn't sure
12:48 TiMBuS ive always just used attributes. there's probably a difference
12:49 rgrau_ joined #perl6
12:50 ruoso joined #perl6
12:58 [Coke] joined #perl6
13:01 moritz_ I've now started a guerilla (unofficial) #yapc-eu channel on irc.perl.org
13:01 perlygatekeeper joined #perl6
13:01 pmichaud there's not a #yapceu already?  or you want a separate one?
13:01 moritz_ I wasn't aware of one
13:02 moritz_ no, #yapceu is *so* empty
13:02 pmichaud interesting
13:02 pmichaud I think traditionally it's been without the hyphen
13:03 szabgab there is one called #yapc
13:03 szabgab on irc.perl.org
13:03 moritz_ oh
13:04 moritz_ so maybe it's counter-productive to start another one
13:04 szabgab and it is shared between the us and the eu people
13:04 pmichaud szabgab++
13:05 szabgab moritz_: I'd be happy f you sent me your slides for yapc so I can try to work around it in my class :)
13:05 moritz_ szabgab: I'd be happy to have slides that I could send you :-)
13:05 moritz_ szabgab: I'll start coding them soon, and let you know about them
13:05 pmichaud szabgab: looks like I'll be in pisa most of the day on Saturday... okay if I sit in on your course?  ;-)
13:06 pmichaud (on Aug 7, that is)
13:06 szabgab pmichaud: if you don't talk too much with the classmates :)
13:06 szabgab wrong
13:07 szabgab only if you DO talk a lot with the classmates
13:07 pmichaud I will do my best to be helpful and not distractive, yes.  :-)
13:09 * jnthn afk for a bit, attempting not to fail some cert :-)
13:09 szabgab pmichaud: so as I am blogging about the class, I think I can alrady tell them that I have at least one student :)
13:10 moritz_ is davorg == Dave Cross?
13:11 szabgab moritz_: yes
13:11 moritz_ szabgab: thanks
13:12 skids joined #perl6
13:18 pmichaud TimToady++   # Perl 6 cheatsheet v2
13:18 pmichaud TimToady: could we perhaps put the file for the cheatsheet into the pugs repo?
13:19 pmichaud and, has anyone tweeted the cheatsheet yet?
13:19 sftp joined #perl6
13:19 moritz_ don't think so
13:21 Juerd Ooh, cheatsheet? Sweet.
13:21 pmichaud hugeme tweet rakudoperl  New Perl 6 cheatsheet available!  http://www.wall.org/~larry/cheatsheet
13:21 Juerd I was just about to ask for the url :)
13:21 pmichaud hugme: tweet rakudoperl  New Perl 6 cheatsheet available!  http://www.wall.org/~larry/cheatsheet
13:21 * hugme hugs pmichaud; tweet delivered
13:21 pmichaud ta-daa!
13:22 * Juerd only just in time hit ^U instead of enter
13:22 Juerd Wow. Nice work, TimToady++
13:22 Juerd I love how the types were crammed in :)
13:23 cosimo lazy question, what's the Perl 6 equiv for '$self->SUPER::new($something)' ?
13:23 cosimo self.SUPER.new($something) ?
13:24 moritz_ nextwith($something) # dispatches to the next candidate
13:25 arnsholt callsame/nextsame and friends I think
13:25 arnsholt Right. What he said
13:27 masak I'm partway through making a PDF version of the cheatsheet. http://masak.org/carl/cheatsheet.pdf
13:27 masak part-way feedback welcome.
13:27 arnsholt Looks pretty good so far
13:28 moritz_ looks part-way nice
13:28 Juerd I think non plaintext cheatsheets should be designed from scratch
13:28 masak yes, probably :)
13:28 Juerd Much of the layout is dictated by the plaintext format, and when you don't have those constraints, you can make much nicer designs
13:28 Kodi joined #perl6
13:29 masak Kodi: ping
13:29 Kodi masak: Hey.
13:29 Juerd I don't know how TimToady feels about this, but as the author of the p5 cheatsheet I usually dislike the PDFs that people make (several have tried), even though I really do appreciate the effort.
13:29 masak Kodi: one very sane definition of "quarter" is "three months".
13:30 Kodi masak: That makes sense.
13:30 Kodi Is it what people will expect, though?
13:30 masak I don't know.
13:31 pmichaud I would expect that whatever it is, it's not what I ultimately want.  :-)
13:31 masak and I'm not going to defend re-instating quarters. they're pretty uncommon.
13:31 masak just slightly surprised that they went without any preceding discussion.
13:32 Kodi Well, it's weird. It's the kind of thing you would expect would be in ISO 8601, but it ain't.
13:32 [Coke] while I appreciate the #parrot shout out, does it fit?
13:32 Kodi I could implement this notion of quarter pretty easily, but the question is: does anybody care?
13:32 [Coke] masak: quarters are very common, depending on your business. =-)
13:33 [Coke] Kodi: probably not worth it.
13:33 [Coke] so, err on the side of smaller spec.
13:33 pmichaud omg, that reminds me!
13:33 masak :)
13:33 * pmichaud files his quarterly sales tax report.
13:33 Kodi [Coke]: So be it.
13:33 Kodi Now, here's a funny issue:
13:34 Kodi rakudo: +(-'0')
13:34 p6eval rakudo 894e79:  ( no output )
13:34 Kodi rakudo: say +(-'0')
13:34 p6eval rakudo 894e79: OUTPUT«-0␤»
13:34 moritz_ yeah, known
13:34 pmichaud o_O
13:34 moritz_ the problem is that numification of strings returns a Num
13:34 moritz_ and not Int
13:34 moritz_ and there's a negative zero with floating point arithmetics
13:35 Kodi What's the best way to make sure $x becomes 0 if it's -0 but is otherwise unchanged?
13:35 moritz_ $x.=Int if $x == 0
13:35 moritz_ maybe
13:35 tylercurtis joined #perl6
13:35 Kodi rakudo: say (-'0').Int
13:36 p6eval rakudo 894e79: OUTPUT«0␤»
13:36 Kodi That should do, then. I need an Int here, anyway.
13:36 pmichaud I'm still surprised that the negative zero leaks into rakudo like that.
13:36 moritz_ I hope that colomon++ fixes this soonish
13:37 moritz_ so that my Int $x = +"3"; also works
13:37 pmichaud I'm surprised that  -'0'  and +'0' returns a Num, too.
13:37 pmichaud I kinda thought that had already been taken care of.
13:37 moritz_ it's one of those seemingly small but often annoying problems
13:37 moritz_ rakudo: say (+'4').WHAT
13:37 p6eval rakudo 894e79: OUTPUT«Num()␤»
13:37 masak http://rt.perl.org/rt3/Ticket/Display.html?id=74070
13:38 pmichaud well, since I started a branch for Stringy, and since of of the blockers I'm having in that branch is the str2num functions, maybe I'll just redo those a bit
13:38 frettled masak: The orange and gray may be too close in luminance and saturation for people with red-green color blindness
13:38 masak frettled: 'gray'?
13:38 frettled masak: that was a slip, I meant green
13:39 masak frettled: anyway, the orange is going away in favour of the pink.
13:39 masak frettled: and the colors aren't vital, they're mostly for grouping.
13:40 [Coke] pmichaud is on fire this week.
13:40 frettled masak: yup, that was why I thought it merited mentioning :)
13:40 frettled masak: because it may look as if things belong to the same group when they don't
13:40 frettled [Coke]: pmichaud++ is smokin'
13:40 masak maybe the colour scheme will end up being completely different. it feels a bit too default right now.
13:41 frettled masak: but your PDF version inspired me into thinking about doing a CSS based version.
13:41 masak frettled: :)
13:42 masak hope you get around to it. would be nice to see.
13:42 * frettled hopes so, too!
13:43 frettled I'll start by pasting the text file into a HTML file and divide by <div> elements :)
13:47 timbunce_ joined #perl6
13:48 pmichaud TimToady: cheatsheet has "\w == <+alpha+digit+[_]>"   should that be just <+alpha+digit>, or is it described that way to emphasize the _ a bit?
13:48 dalek rakudo: e597953 | pmichaud++ | docs/spectest-progress.csv:
13:48 dalek rakudo: spectest-progress.csv update: 507 files, 33910 (84.4% of 40163) pass, 0 fail
13:48 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/e597953a8540b03a00c7192a24769b72c59bd10f
13:56 masak moritz_: ping
13:56 szabgab timbunce: nice story on the blog
13:57 pmichaud url?
13:57 timbunce szabgab: thanks. That's what I thought when Buzz emailed me, so I asked him if I could post it.
13:57 masak pmichaud: http://blog.timbunce.org/2010/07/08/reflections-on-perl-and-dbi-from-an-early-contributor
13:59 pmichaud agreed, nice story
14:08 gbacon joined #perl6
14:09 Kodi Should &time actually be named &now as per S02:1320, or is it intended to have both a function that returns seconds since January 1 1970 (&time) and a function that returns an Instant (&now)?
14:09 moritz_ szabgab: btw my talk will be rather light on Perl 6 content, the only thing I'll mention for sure is named placeholders
14:12 nadim joined #perl6
14:12 TimToady moritz_: the problem with a FatRat is it tends to turn everything else into FatRats, with performance implications
14:13 TimToady so it's probably better to stick to Rat precision
14:21 moritz_ TimToady: makes sense
14:26 masak rakudo: say -0.0
14:26 p6eval rakudo 894e79: OUTPUT«0␤»
14:27 masak I guess because we show integral floating-point numbers as Ints, there's no way to print the minus sign in -0.0.
14:30 pmichaud I think we should print -0.0 as "o_O"
14:31 pmichaud rakudo:  my $x = -0.0 but "o_O";  say $x
14:31 p6eval rakudo 894e79: OUTPUT«o_O␤»
14:34 [particle] make that a R* feature :)
14:34 pmichaud [particle]: we can also restore hcf as a dynop, if you wish.  :)
14:35 masak rakudo: my $x = 5 buf False; if $x { say "OH HAI!" }; say "alive"
14:35 p6eval rakudo 894e79: OUTPUT«===SORRY!===␤Confused at line 11, near "my $x = 5 "␤»
14:35 masak rakudo: my $x = 5 but False; if $x { say "OH HAI!" }; say "alive"
14:35 moritz_ s/buf/but/
14:35 moritz_ or bug :-)
14:35 p6eval rakudo 894e79: OUTPUT«OH HAI!␤alive␤»
14:35 masak too muhc buf work :)
14:36 masak s/hc/ch/
14:36 masak I tried to fix the above during the Lund hackathon, but my patch met with interesting consequences.
14:38 moritz_ like?
14:38 moritz_ rakudo:  my $x = 5 but False; if ?$x { say "OH HAI!" }; say "alive"
14:38 p6eval rakudo 894e79: OUTPUT«alive␤»
14:38 masak my fix boolified the expression. yes, like that.
14:38 masak it added an implicit prefix:<?>
14:39 moritz_ I guess you must be careful to do the coercion only for the conditional, not for the formal parameter
14:39 masak exactly.
14:39 moritz_ rakudo: if 5 -> $x { say $x }
14:39 masak that's what happened.
14:39 p6eval rakudo 894e79: OUTPUT«5␤»
14:39 masak I love that feature.
14:39 masak I wonder if any other programming language has something like that.
14:41 masak finished adding boxes to http://masak.org/carl/cheatsheet.pdf -- my main complaint now is that margins and padding aren't consistent.
14:43 kensanata joined #perl6
14:43 [particle] wow, that's um, ugly but useful
14:43 moritz_ I kinda see where you difficulties with patching 'if' came from
14:43 moritz_ the AST is built in <xblock>
14:44 moritz_ so if you change it there, you'd affect everything that uses xblock
14:44 moritz_ which is... quite a lot, I think
14:44 pmichaud it needs to be handled at the vtable level
14:44 moritz_ get_bool calling .Bool if available?
14:44 pmichaud or we have to plan to write our own 'if' constract that doesn't use the one in PAST
14:45 TimToady masak: you lost the titles on the bottom boxes
14:45 pmichaud get_bool already does that, I think.
14:45 moritz_ so why doesn't it work with mixed-in Bool?
14:45 pmichaud 13:18 <pmichaud> TimToady: could we perhaps put the file for the cheatsheet into the pugs repo?
14:45 masak TimToady: oh, forgot to add them. thanks.
14:45 pmichaud (apologies if I missed response)
14:45 moritz_ right, it does
14:45 moritz_ .sub '' :vtable('get_bool') :method $I0 = self.'Bool'() .return ($I0)
14:45 moritz_ .end
14:45 moritz_ + newlines :-)
14:46 pmichaud I'm guessing the problem is that the get_bool from Parrot's Integer/Float classes is suppressing the one from Mu
14:46 moritz_ ah
14:46 moritz_ right, otherwise it wouldn't work at all
14:47 ash_ joined #perl6
14:48 pmichaud so, one possibility is to write an explicit get_bool vtable for Int and Num
14:49 pmichaud don't know if that will work, but might be worth trying
14:49 pugssvn r31576 | lwall++ | [docs/Perl6/cheatsheet.txt] initial checkin
14:49 pmichaud \o/
14:50 pmichaud also, I had a note above about the definition for \w
14:52 pugssvn r31577 | lwall++ | [index] redirect to svn copy of cheatsheet
14:52 TimToady yes, well, I never can remember what my last decision about <alpha> was :)
14:53 TimToady it also gives a hint about the syntax of composite char classes
14:53 TimToady technically, there's one syntax error on the sheet
14:53 pmichaud agreed on the hint
14:54 TimToady there should be a ; between the when and the default
14:54 TimToady but it's really notional, so I think we can leave it out
14:54 masak new version uploaded, with titles on the bottom boxes. http://masak.org/carl/cheatsheet.pdf
14:54 pmichaud I'm curious as to how long it will be before someone says "underscore can't be in alpha, the cheatsheet shows it as being separate"  :-P
14:54 * pmichaud starts the timer.
14:55 TimToady underscore can't be in alpha, the cheatsheet shows it as being separate
14:55 pmichaud Doesn't count.  :-P
14:55 masak underscore can't be in alpha, the cheatsheet shows it as being separate
14:55 [particle] TimToady isn't someone?
14:55 TimToady no, I just Someone
14:55 TimToady *I'm
14:55 TimToady now my 'm key is starting to go...
14:56 [particle] ah, much less ugly with titles on the bottom boxes too
14:56 [particle] my 'e ' key often transposes itself to ' e'
14:57 TimToady masak: you have two blues touching.  I recommend 4 colors.  :)
14:58 masak :P
14:58 masak I'll just reverse the blue color with its red neighbour.
14:58 pmichaud okay, I've figured out that the "Types" bubble is Florida, but I'm not sure about some of the others. :-)
14:59 buu joined #perl6
14:59 TimToady Links is Iowa
15:00 masak updated -- no two same-coloured bubbles touching.
15:01 sftp_ joined #perl6
15:02 masak er. expept for "Types" and "Operator domains" :/
15:02 * masak leaves it as it is for now
15:04 lue joined #perl6
15:05 slavik how can I type the funny << and >> quotes on a reg 105 key keyboard
15:05 TimToady do you have a compose key defined?
15:05 moritz_ it's altgr + y and altgr+x on my keyboard
15:05 moritz_ might be z instead of y on a querty keyboard
15:05 TimToady if so, COMPOSE << and >> owrks
15:06 TimToady *wo
15:06 moritz_ or that, yes
15:06 slavik I don't think I do
15:06 moritz_ what OS are you using?
15:06 slavik Linux
15:06 slavik keyboard layout "USA"
15:06 TimToady under vim ^K-<< or >>
15:06 moritz_ then configure a compose key
15:06 slavik according to gnome
15:07 * moritz_ uses the Windows key as compose key
15:07 pmichaud I use the right-alt as a compose key
15:07 TimToady gnome you can also use CTRL-SHIFT-u ab to get «
15:07 moritz_ urks
15:07 TimToady I use the right menu key
15:07 moritz_ rakudo: say chr(:16<ab>)
15:07 pmichaud in my autostart, I have
15:07 slavik got it, thanks :)
15:07 p6eval rakudo e59795: OUTPUT«\xAB␤»
15:08 pmichaud xmodmap -e 'keysym Alt_R = Multi_key'
15:08 moritz_ rakudo: say :16<ab>
15:08 slavik I set the right winkey to compose
15:08 p6eval rakudo e59795: OUTPUT«171␤»
15:08 pmichaud right winkey works also
15:08 moritz_ rakudo: say chr :16<ab>
15:08 p6eval rakudo e59795: OUTPUT«\xAB␤»
15:08 moritz_ uhm, what's wront with that?
15:08 [particle] (; <-- right winkey?
15:08 moritz_ looks like it calls a .perl somwhere
15:09 TimToady and » is CTRL-SHIFT-u BB
15:09 pmichaud moritz_: it's a p6-eval something or other
15:09 pmichaud works fine locally
15:09 moritz_ produces latin-1 on -e and REPL
15:09 pmichaud rakudo:  say chr 171
15:09 p6eval rakudo e59795: OUTPUT«\xAB␤»
15:10 moritz_ diakopter: did you change p6eval recently?
15:10 pmichaud it's possible also that rakudo is forgetting (or no longer) setting utf8 mode on stdout
15:10 pmichaud since we've done a few refactors on *IN and the like lately
15:11 rjbs joined #perl6
15:11 pmichaud afk, errands
15:11 TimToady course, then there's ≪ and ≫
15:12 slavik I realized a downside to being a linguist ...
15:12 sftp joined #perl6
15:12 TimToady there's an upside?
15:13 slavik TimToady: there's never enough keys for you. :P
15:13 arnsholt There's a downside? =)
15:13 slavik TimToady: knowing diff languages and being actually qualified in creating new ones?
15:13 rjbs I just learned of the ~ twigil.
15:13 rjbs Is it basically for getting at variables related to the currently-in-effect syntax?
15:13 TimToady yes, it's for picking out one strand of the current language braid
15:14 rjbs Thanks!  I was looking at http://www.wall.org/~larry/cheatsheet
15:14 rjbs It would be awesome to hypertextify that... but probably also a big pain.
15:14 Kodi left #perl6
15:14 TimToady so $~Regex is your current regex language, for instance
15:15 [particle] rjbs: now in color! masak++ http://masak.org/carl/cheatsheet.pdf
15:15 Juerd :|
15:16 ashleydev_ joined #perl6
15:17 TimToady shouldn't it have a butterfly somewhere?
15:17 Juerd The plaintext version doesn't have one either :P
15:17 TimToady also doesn't have colors.  so?
15:17 Juerd Because it can't, but it could have a »ö« :)
15:18 clintongormley joined #perl6
15:19 rjbs I'm going to rebuild Rakudo so I can do more try-it-and-see again, but while I do that: my $x = 5 + *;  yields a closure?
15:19 Juerd { 5 + $_ }, yes.
15:19 rjbs Thanks.
15:19 moritz_ rakudo: say (5 + *).WHAT
15:19 Juerd Or was that $^a
15:19 p6eval rakudo e59795: OUTPUT«WhateverCode()␤»
15:19 moritz_ rakudo: say (5 + *).signature.perl
15:19 rjbs Juerd: I'd expect $^a
15:19 p6eval rakudo e59795: OUTPUT«:(;; Mu $y)␤»
15:19 Juerd I don't remember if $_ works in closures
15:20 Juerd s/works/works like that/
15:21 TimToady $_ and $^a are equivalent
15:21 TimToady but both require {}, while * requires the absence of {}
15:21 [particle] is $^a before $^A?
15:22 TimToady after
15:22 TimToady this is your brane on ASCII
15:22 masak $_ and $^a are equivalent, but using $_ makes the one parameter to the block optional.
15:22 rjbs [particle]: I think the correct answer is "don't do that"
15:23 [particle] so $_ is equivalent to the first l13lly-sorted param?
15:23 TimToady can't use $_ and $^x together
15:23 lue ohai o/
15:23 masak lue: \o
15:23 [particle] .oO(or should that be l11cally...)
15:24 [particle] sigh, my spelling gene is recessive today
15:24 masak rakudo: $_ = 42; { say $_; say $^a }.(5)
15:24 p6eval rakudo e59795: OUTPUT«42␤5␤»
15:24 TimToady though I see that std doesn't catch it
15:24 * masak submits rakudobug
15:24 masak neither does Rakudo.
15:24 diakopter moritz_: no
15:24 TimToady actually, the rakudo behavior makes some sense
15:24 masak I was just going to say that.
15:25 masak I think it's too harsh to forbit $_ in a block with $^a
15:25 masak s/forbit/forbid/
15:25 rjbs rakudo: $_ = 42; { say $_ }.(5)
15:25 p6eval rakudo e59795: OUTPUT«5␤»
15:25 [particle] rakudo: $_ = 42; { say $_; say $^A }.(5)
15:25 rjbs So if there are no ^params, $_ can get the optional param.  If there are, $_ is just $_.
15:25 p6eval rakudo e59795: OUTPUT«42␤5␤»
15:26 TimToady really means -> $_ is rw = OUTER::<$_> { }
15:26 rjbs That makes sense to me, I think.  Acts like 5's (_) proto being implicit, sorta.
15:28 diakopter moritz_: why
15:29 ajs joined #perl6
15:34 Maddingue joined #perl6
15:36 hercynium joined #perl6
15:36 masak rakudo: my $a = 42 but role { method times(&c) { c for ^self } }; $a.times: { say "LOL" } # almost, but not quite, Ruby :P
15:37 p6eval rakudo e59795: OUTPUT«LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤LOL␤»
15:38 lue ...
15:38 lue lol
15:43 Juerd That's very almost-but-not-quite-entirely-unlike Ruby.
15:43 Mowah joined #perl6
15:44 TimToady rakudo: my $a = 42 but role { method times(&c) { c for ^self } }; $a.times:{ say "LOL" }
15:44 p6eval rakudo e59795: OUTPUT«Method 'times:{ say "LOL" }' not found for invocant of class ''␤  in main program body at line 11:/tmp/v0cAK8X5wm␤»
15:45 diakopter feedb
15:46 TimToady rakudo needs to reject :{} as name extension like std does
15:47 masak "Perl 6: forcing in whitespace between terms since 2002."
15:50 moritz_ rakudo: say chr :16<ab>
15:50 p6eval rakudo e59795: OUTPUT«\xAB␤»
15:51 moritz_ diakopter: I'm pretty sure that worked before
15:51 lue rakudo: say chr(:16<ab>)
15:51 p6eval rakudo e59795: OUTPUT«\xAB␤»
15:51 lue rakudo: say (:16<ab>).WHAT
15:51 p6eval rakudo e59795: OUTPUT«Num()␤»
15:52 pugssvn r31578 | lwall++ | [cheatsheet] remove spurious comma noted by diakopter++
15:52 pugssvn r31578 | add missing camelia noted by Juerd++
15:53 dolmen joined #perl6
15:54 Guest72762 rekudo: my $x = "Red"; say $x ~~ "Red" | "Blue" | Yellow";
15:54 Guest72762 rakudo: my $x = "Red"; say $x ~~ "Red" | "Blue" | Yellow";
15:54 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "say $x ~~ "␤»
15:54 masak o.O
15:54 Guest72762 rakudo: my $x = "Red"; say $x ~~ ("Red" | "Blue" | Yellow");
15:54 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "say $x ~~ "␤»
15:55 masak the first one should work...
15:55 Juerd Second too :)
15:55 masak botched quotes?
15:55 macdaddy joined #perl6
15:55 masak rakudo: my $x = "Red"; say $x ~~ "Red" | "Blue" | "Yellow"
15:55 p6eval rakudo e59795: OUTPUT«1␤»
15:55 Juerd What did you do different?
15:55 masak Guest72762: where did you get those quotes?
15:55 masak they seem suspect.
15:56 masak Juerd: I typed it in.
15:56 TimToady std: my $x = "Red"; say $x ~~ "Red" | "Blue" | Yellow";
15:56 p6eval std 31577: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/WrMAX3lbrA line 1:␤------> [32m"Red"; say $x ~~ "Red" | "Blue" | Yellow[33m⏏[31m";[0m␤    expecting any of:␤       POST␤   argument list␤      bracketed infix␤  infix or meta-infix␤      postfix␤
15:56 p6eval ..postfix_prefix_meta_operator␤       statement modifier loop…
15:56 dolmen__ masak: on my keyboard: I'm using the Freenode webchat
15:56 TimToady std: my $x = "Red"; say $x ~~ "Red" | "Blue" | "Yellow";
15:57 p6eval std 31577: OUTPUT«ok 00:01 111m␤»
15:57 spinclad .u "
15:57 phenny U+0022 QUOTATION MARK (")
15:57 TimToady the quotes are fine if you use an even number of 'em
15:57 spinclad std: Yellow"
15:58 p6eval std 31577: OUTPUT«[31m===[0mSORRY![31m===[0m␤Confused at /tmp/06wz2bVPIb line 1:␤------> [32mYellow[33m⏏[31m"[0m␤    expecting any of:␤  POST␤   argument list␤      bracketed infix␤  infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤       statement modifier
15:58 p6eval ..loop␤Undeclared name:␤ 'Yellow' used at…
15:58 masak oh!
15:58 masak didn't see that. :)
15:58 dolmen__ There is a good opportunity for talking about Perl 6 on StackOverflow: http://stackoverflow.com/questions/3205065/why-do-most-all-programming-languages-only-have-binary-equality-comparison-ope
15:58 * spinclad was blind two
15:59 dolmen__ oh yes, I missed the left quote on yellow
15:59 TimToady std: Yellow"␤␤␤␤"MOAR $code"
15:59 p6eval std 31577: OUTPUT«[31m===[0mSORRY![31m===[0m␤Two terms in a row at /tmp/eWt5vhHw54 line 1:␤------> [32mYellow[33m⏏[31m"[0m␤    expecting any of:␤        POST␤   argument list␤      bracketed infix␤  infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤       statement
15:59 p6eval ..modifier loop␤Undeclared name:␤ 'Yello…
15:59 lue ooh, that makes a great puzzle. I missed that.
15:59 Juerd Wow, incredible how several people missed the same rather obvious mistake :)
16:00 TimToady hmm, I think my runaway detection might be borken
16:00 masak It's like missing the error in "I have to feed the the cat." :)
16:00 Juerd I see that one though
16:00 Juerd Even in the
16:00 Juerd the image that goes like this.
16:01 TimToady std: Yellow "␤␤␤␤"MOAR $code"
16:01 p6eval std 31577: OUTPUT«[31m===[0mSORRY![31m===[0m␤(Possible runaway string from line 1)␤Confused at /tmp/fM_JoEEQn0 line 5:␤------> [32m"[33m⏏[31mMOAR $code"[0m␤    expecting any of:␤ POST␤   bracketed infix␤    infix or meta-infix␤      postfix␤        postfix_prefix_meta_operator␤
16:01 p6eval ..statement modifier loop␤Undecl…
16:01 TimToady it was just failing immediately on line 1
16:01 Juerd http://thenextweb.com/shareables/2010/06/28/this-will-bend-your-mind/
16:03 lue afk
16:03 masak Juerd: I saw it, but might have missed it if you hadn't warned me :)
16:04 masak in unrelated news, I feel a headache coming on :)
16:05 dolmen__ rakudo: say 23 ~~ ( 1..23 | 1000..2000 )
16:05 p6eval rakudo e59795:  ( no output )
16:05 dolmen__ rakudo: say (23 ~~ ( 1..23 | 1000..2000 ))
16:05 p6eval rakudo e59795:  ( no output )
16:05 masak dolmen__: seems to hang locally.
16:05 TimToady the perl5-compatible code on stackoverflow is not perl6 compatible
16:06 TimToady perl6 does not auto-any lists
16:07 justatheory joined #perl6
16:08 dolmen__ perl6: say (23 ~~ ( 1..23 | 1000..2000 ))
16:08 p6eval pugs: OUTPUT«*** ␤    Unexpected ".."␤    expecting "_", exponent, term postfix, operator or ")"␤    ambiguous use of a non associative operator␤    at /tmp/p6JlWexHLG line 1, column 26␤»
16:08 p6eval ..elf 31578: OUTPUT«Parse error in: /tmp/SJeO8Ozzlj␤panic at line 1 column 27 (pos 27): "#<Match:0x0000000090e908>" is not associative␤WHERE: say (23 ~~ ( 1..23 | 1000..2000 ))␤WHERE:                           /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:2121:in `_EXPR_raw'␤
16:08 p6eval ..STD_red…
16:08 p6eval ..rakudo e59795:  ( no output )
16:08 masak Haskell type classes, just like Perl 6 roles, ignore class hierarchy restrictions. but it seems the former also allows "after the fact" tying of a class to a role (to use Perl 6 terminology), whereas the latter doesn't without MONKEY_TYPING.
16:08 TimToady oughta work
16:09 dolmen__ perl6: say (23 ~~  1..23 )
16:09 p6eval rakudo e59795: OUTPUT«1␤»
16:09 p6eval ..elf 31578:  ( no output )
16:09 p6eval ..pugs: OUTPUT«␤»
16:10 dolmen__ perl6: say (1..2 | 4..5)
16:10 TimToady precedence
16:10 p6eval elf 31578: OUTPUT«Parse error in: /tmp/yXucKUeIwJ␤panic at line 1 column 15 (pos 15): "#<Match:0x0000000094b060>" is not associative␤WHERE: say (1..2 | 4..5)␤WHERE:               /\<-- HERE␤  STD_red/prelude.rb:99:in `panic'␤  STD_red/std.rb:2121:in `_EXPR_raw'␤  STD_red/std.rb:1967:in `block in
16:10 p6eval .._EX…
16:10 p6eval ..rakudo e59795: OUTPUT«any(1, 2, 3, 4, 5)␤»
16:10 p6eval ..pugs: OUTPUT«*** ␤    Unexpected ".."␤    expecting "_", exponent, term postfix, operator or ")"␤    ambiguous use of a non associative operator␤    at /tmp/_Au55EhBo3 line 1, column 14␤»
16:10 TimToady rakudo: say 23 ~~ (1..23) | (1000..2000)
16:10 p6eval rakudo e59795:  ( no output )
16:10 dolmen__ rakudo should not give 3, isn't it?
16:11 TimToady precedence is wrong, | is tighter than ..
16:11 dolmen__ rakudo: say (1..2) | (4..5)
16:11 p6eval rakudo e59795: OUTPUT«any(1, 2, 4, 5)␤»
16:11 dolmen__ ok
16:12 TimToady rakudo: say 23 ~~ (1..23)
16:12 p6eval rakudo e59795: OUTPUT«1␤»
16:13 TimToady rakudo: say (1..23) | (1000..2000)
16:13 p6eval rakudo e59795:  ( no output )
16:13 TimToady those ranges shouldn't be flattening
16:13 TimToady item context isn't supposed to flatten
16:14 TimToady rakudo: say (1..23) | (100..105)
16:14 p6eval rakudo e59795: OUTPUT«any(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 100, 101, 102, 103, 104, 105)␤»
16:14 TimToady blech
16:15 TimToady pmichaud: ^^
16:15 masak rakudobug?
16:15 * masak submits one
16:17 masak rakudo: my $a = 1..4; say $a.perl
16:17 p6eval rakudo e59795: OUTPUT«1..4␤»
16:18 TimToady maybe it's a bug in junctions
16:20 TimToady or in the binding logic for list-associative operators that don't take lists as arguments
16:22 slavik I just realized something ... "if $number in 1.100 {}" is the same as "if $number == any(1..100) {}"
16:22 slavik :D
16:22 slavik actually, can lists be flattened that way?
16:22 dsherer joined #perl6
16:22 moritz_ or if $number ~~ 1..100
16:23 slavik moritz_: isn't that for regex type stuff?
16:23 slavik so it would be doing a regex match?
16:24 moritz_ no
16:24 TimToady any provides a list context to its args, so flattens 1..100 into a list of 100 integers
16:24 moritz_ ~~ is general "smart matching"
16:24 moritz_ rakudo: say 5 ~~ Int ; # type check
16:24 TimToady matching against the range object directly is preferred for efficiency
16:24 p6eval rakudo e59795: OUTPUT«1␤»
16:24 slavik TimToady: so it's the effect I was looking for.
16:24 TimToady especially if the range is 100..*  :)
16:25 slavik oh
16:25 slavik I see
16:25 TimToady rakudo: say 1000000 ~~ 100..*
16:25 p6eval rakudo e59795: OUTPUT«1␤»
16:25 slavik rakudo: say "yes" if 5 ~~ 1..*
16:25 p6eval rakudo e59795: OUTPUT«yes␤»
16:25 slavik rakudo: say "yes" if 5 == any(1..*)
16:25 TimToady we don't support lazy anys (yet)
16:25 slavik ahh
16:25 p6eval rakudo e59795:  ( no output )
16:26 slavik TimToady: what would be the actual diff between smart matching against a large list and a lazy any on a large list?
16:26 TimToady and even if we did, 1000000 ~~ any(100..*) would take a *long* time
16:26 slavik as in: which would be more efficient?
16:26 ash_ joined #perl6
16:26 agentzh joined #perl6
16:26 moritz_ comparing a number with a range just compares the end points
16:26 TimToady a lazy any would still have to generate all the values up to the test value
16:26 moritz_ in direct smart matching
16:27 moritz_ so it's always O(1)
16:27 slavik I see
16:27 TimToady lazy any would have to assume a monotonic function
16:27 slavik is there more docs on how smart matching works?
16:27 moritz_ S03
16:27 slavik ty
16:28 TimToady so in theory you could say sub is_fib { $^n ~~ any(0,1,*+*...*) }
16:28 moritz_ http://perlcabal.org/syn/S03.html#Smart_matching
16:28 justatheory TimToady: Ow.
16:28 TimToady and it would just generate fibs until it exceeded $^n
16:28 slavik any(0,1,*+*...*) - TimToady, please explain how that makes sense, I think I get it, but I am not sure.
16:29 TimToady as long as your list is monotonic, you can always tell if you need to generate more values, or have passed the test value
16:30 TimToady or for alternating signs, whether the abs is monotonic
16:31 TimToady otherwise you've "solved" the halting problem by running out of memory
16:31 slavik lol
16:31 slavik TimToady: can you explain that notation inside any though? I don't get it
16:31 slavik I get the first starting values, but is star a place holder in 0,1,*?
16:31 slavik and + is aware of the lists?
16:32 TimToady S03:1809
16:32 slavik k
16:32 TimToady parsed as 0, 1, *+* ... *
16:33 TimToady and ... is list infix precedence, so governs all of it
16:33 moritz_ slsl ll
16:33 moritz_ sorry :-)
16:34 TimToady cat?
16:34 moritz_ no, hanging screen or ssh or so
16:35 slavik TimToady: going to read about it and get more confused, because I am confused already ^^
16:35 moritz_ even Enter~. didn't work
16:35 moritz_ slavik: what TimToady last said about monotonic series isn't specced yet (afaict), but rather speculative
16:35 moritz_ so you won't find anything to read about it, save IRC logs :-)
16:36 slavik already am
16:37 slavik TimToady: 1809?
16:37 slavik List  infix precedence ?
16:37 TimToady which is why I'm sorely tempted to allow sub is_prime { $^n ~~ any(2,3,5...*) }
16:38 TimToady should read: C<< infix:<...> >>, the series operator.
16:39 moritz_ so how would any() determine that it's acting on an infinite, monotonic series as opposed to any(1, 2, 3, 4, 5, 6, -5) ?
16:39 TimToady or just follow the autolink in the IR Clog
16:40 TimToady it probably wouldn't.  It would just be erroneous if it didn't
16:40 * moritz_ doesn't quite follow
16:40 TimToady oh, how does it know it's finite?
16:40 TimToady well, it could be constructed lazily
16:41 TimToady or finite lists can advertise how many already-reified values they have somehow
16:41 ash_ o.0 would 2,3,5...* give you all primes? that's crazy...
16:42 * jnthn back
16:42 TimToady it has been proposed
16:42 ash_ oh lazy evaluation, how i <3 thee
16:42 TimToady presumably such a series would do an appropriate level of memoization for already sieved values
16:43 ash_ i'd love to see some way of caching lazy series to /tmp or what have you, so if you wanted to be really lazy, only eval it once.... maybe i can make a perl6 module to do that...
16:43 moritz_ if we rely on already-reified values, things as any(gather { take 1; take 2; take -3 }) would go wrong
16:46 TimToady we would probably have to indicate the desire for an infinite any explicitly somehow
16:47 TimToady any(monotonic 1..*) or some such
16:47 TimToady many(1..*)  :)
16:48 cdarroch joined #perl6
16:48 cdarroch joined #perl6
16:48 masak food &
16:48 tri1 joined #perl6
16:48 * [particle] wonders if there's a /dev/primes for linux...
16:49 TimToady or a /dev/pi
16:51 TimToady or allow only series operators to go infinite in any(), since ... is pretty near turing complete
16:51 Gothmog_ /dev/busybeaver would be great, too ;)
16:53 TimToady /dev/e, /dev/ϕ, /dev/√2, /dev/Ω
16:53 jnthn Wow, that cheat sheet is pretty information-dense.
16:53 jnthn TimToady++
16:53 TimToady no roleses, only nasty classeses
16:56 rjbs /dev/ℝ sounds more fun.
16:57 * TimToady looks forward to the day when you can MAKEDEV /dev/primes --p6 '2,3,5...*'
16:58 dsherer left #perl6
16:58 rjbs rakudo: (5 + *).signature.perl
16:58 p6eval rakudo e59795:  ( no output )
16:59 rjbs rakudo: (5 + *).signature.perl.say
16:59 p6eval rakudo e59795: OUTPUT«:(;; Mu $y)␤»
16:59 ashleydev joined #perl6
16:59 TimToady rjbs: that will take a bit longer than /dev/ﬡ₀
16:59 rjbs rakudo: (5 + * / *).signature.perl.say
16:59 p6eval rakudo e59795: OUTPUT«Method 'Num' not found for invocant of class 'WhateverCode'␤  in 'Cool::Numeric' at line 1670:CORE.setting␤  in 'Cool::Numeric' at line 1671:CORE.setting␤  in 'infix:<+>' at line 6109:CORE.setting␤  in main program body at line 11:/tmp/54EQTGYnIe␤»
16:59 moritz_ the leading ;; just say that the things after it don't participate in multi dispatch
16:59 moritz_ and that's NYI
16:59 moritz_ I think there was a partial patch in RT... did anybody review it?
16:59 rjbs but will 5+*/* eventually get me a /2 block?
16:59 moritz_ yes
17:00 rjbs Thanks.
17:00 mariano__ joined #perl6
17:01 TimToady but eventually multi dispatch will be hidden inside proto, so (Mu $y) will be adequate
17:24 jnthn moritz_: I reviewed it. Thing is that it was around the time pmichaud++ was doing all the block refactors.
17:24 jnthn moritz_: And I doubt it'll apply cleanly now.
17:24 jnthn (And it woulda got in pm's way to apply it before.)
17:25 jnthn I'm essentially OK with the approach it takes though
17:25 rgrau` joined #perl6
17:39 sorear good morning #perl6
17:41 sorear pmichaud: _ doesn't match <alpha> or <digit>
17:41 s1n left #perl6
17:41 sorear er, *backlogs more*
17:42 moritz_ rakudo: say '_' ~~ /<alpha>/
17:42 p6eval rakudo e59795: OUTPUT«_␤»
17:50 pmurias joined #perl6
17:50 pmurias sorear: why does STD use all those stages?
17:53 cinch joined #perl6
17:59 sorear eh?
18:08 pmurias ah, they check the new STD can build a working STD
18:09 pmurias sorear: why do some files in STD have a 'compiled' .pmc suffix? historical reasons?
18:11 sorear I think it's mostly to mark them as Perl 5
18:11 sorear they predate .pm6
18:12 pmurias it would make sense to rename them to .pm
18:12 pmurias as .pmc seems to imply they are generated
18:14 pmurias sorear: who should be mentioned as STD's authors (i'm creating a Dist::Zilla dist for STD)
18:17 dalek niecza: e2da99d | sorear++ |  (4 files):
18:17 dalek niecza: Implement code generator support for object slots
18:17 dalek niecza: review: http://github.com/sorear/niecza/commit/e2da99d0b75cf0b20fb857b9daa0eb5bcc72dbfa
18:23 sorear pmurias: ask TimToady
18:23 pmurias TimToady: ping
18:23 sorear so, this Dist::Zilla dist for STD
18:23 silug joined #perl6
18:24 sorear are you taking over the Great Renaming and packaging effort?
18:28 pmurias just packaging it up
18:28 pmurias sorear: are you interested in the 'Great Renaming and packaging effort'
18:29 pmurias i'm just doing because it's something that needs to be done not because i particularly want to
18:31 pmurias sorear: what amount of tests should be run when installing STD?
18:35 TimToady well, until sorear++ got into the act, I was pretty much the only author of STDeco
18:36 TimToady there might be a few other tweakers in the logs though
18:37 pmurias TimToady: do p5 files still need the .pmc
18:37 pmurias ?
18:38 pmurias TimToady: when installing STD how much tests should be run (wouldn't parsing the whole test suit take a bit long?)
18:39 pmurias TimToady: why is mangle.pl not a module?
18:39 sorear pmurias: standard functionality test is to parse STD.pm6
18:40 sorear I use the spectests as weekly regression testing, not while developing
18:40 sorear TimToady with his much faster computer seems to wind up running them much more often
18:40 solarion joined #perl6
18:41 ash_ ping moritz_
18:42 pmurias sorear: parsing STD.pm6 is done on every make?
18:47 moritz_ ash_: pong
18:50 ash_ i made a really simple working version of try.rakudo.org http://github.com/moritz/try.rakudo.org/blob/master/frontend/cgi/tmp.pl its that single file, it doesn't store sessions, or remember anything between executions (so variables are lost on each line executed) but it works, i am setting it up on my server for now as a test bed for writing tutorials, i just wanted to let you know
18:50 sorear pmurias: yes
18:50 moritz_ ash_: thanks
18:50 ash_ its also pretty unsafe, if someone tried to execute a system call, it lets them (i don't know how to restrict that)
18:51 ash_ but it does send the contents to the server, eval it in perl6, and send the results back, so that part is working in my example
18:52 pmurias sorear: i'm thinking if just parsing 01-sanity/01-tap.t wouldn't be enough
18:52 pmurias as waiting for modules to run the very long test suits is annoying
18:52 moritz_ ash_: I have to work out how to remove things from lexical scopes - then I can get a basic safe mode working
18:53 ash_ what does http://github.com/rakudo/rakudo/blob/master/lib/Safe.pm do?
18:53 moritz_ nothing effective, I fear
18:53 ash_ ah, got ya
18:53 moritz_ it worked when the setting wasn't lexical, but installed stuff into the package
18:54 ash_ I also timeout requests that take longer than 10 seconds, for now, so if you go putting sleeps in there you get errors
18:54 sorear pmurias: tryfile STD.pm6 only takes 2:30 here.  that's faster then Moose's testsuite
18:54 sorear I think it'll be fine
18:54 sorear it catches 99% of problems anyway
18:55 sorear ash_: chroot and rlimit are your friends.  alternatively, study Geordi
18:55 pmurias sorear: do you want to help with creating the STD dist?
18:56 ash_ yeah, i was planning on doing a chroot, i didn't know aobut rlimit but i will look into it
18:56 sorear actually you should use all three
18:56 ash_ grr, my server is a dreamhost server and i keep going over the allowed memory usage when building rakudo
18:57 sorear pmurias: I do not understand how that is possible
18:57 ash_ pbc's are portable right?
18:57 pmurias sorear: all three?
18:58 * pmurias is very very confused
18:58 sorear ash_: pbcs are portable but for best performance you should generate them on a machine of the same wordsize and endianness
18:59 ash_ pmichaud: i think sorear was talking to me
18:59 [Coke] ash_: you mean pmurias ? =-)
18:59 sorear pmurias: ash should use rlimit + chroot + geordi tricks
18:59 ash_ oops
18:59 ash_ sorry, mixed up names
18:59 * ash_ grubmles... stupid tab complete being all stupid
19:00 Tene You can use the selinux tool 'sandbox' to arbitrarily restrict the behavior of a program.
19:01 sorear Tene: can sandbox block resource consumption attacks?
19:01 tylercurtis ash_: what's your server's url? :P
19:03 ash_ greaterthaninfinity.com
19:04 baest joined #perl6
19:04 pugssvn r31579 | pmurias++ | [smop] LexicalScope.clone
19:04 pugssvn r31580 | pmurias++ | [mildew] fix a bug in trailing_return
19:05 pugssvn r31581 | pmurias++ | the STD dist i'm building
19:07 ash_ i am putting this at greaterthaninfinity.com/try but its broken for now
19:08 TimToady hmm, my machine parsed STD.pm6 in 32 seconds, and does a snaptest in 21 minutes
19:08 Su-Shee joined #perl6
19:09 Tene sorear: yes, through cgroups.
19:11 TimToady <pmurias> TimToady: do p5 files still need the .pmc
19:12 TimToady no, but .pm is ambiguous
19:12 TimToady <pmurias> TimToady: why is mangle.pl not a module?
19:12 TimToady because I couldn't be bothered to remember how to write a module
19:12 TimToady and it just wants to go in main anyway
19:14 TimToady so that p5 can just say ::mangle everywhere
19:16 pmurias TimToady: what is a bit confusing in both Cursor.pmc and Cursor.pm6 being handwritten
19:16 sorear allison++ bringing much needed sanity back to parrotland
19:16 sorear Cursor.pmc is not hand written
19:17 TimToady pmurias: in theory all of those P5 modules are going to be derived from P6 code
19:18 pmurias sorear: meant CursorBase.pmc and CursorBase.pm6
19:18 * [Coke] does wonder why he hangs out here. =-)
19:19 sahadev joined #perl6
19:21 slavik because we all do coke?
19:21 * slavik runs away
19:23 [Coke] ха!
19:31 sftp joined #perl6
19:38 moritz_ http://nopaste.snit.ch/21887 # attempt at a Safe mode
19:39 [Coke] moritz_: can you remove Q:PIR access also?
19:39 moritz_ [Coke]: don't think so... it's a compiler feature
19:39 moritz_ pmichaud: any ideas for switchting of Q:PIR and pir::stuff for a safe mode?
19:40 [Coke] hokay.
19:40 moritz_ at least not easily
19:40 rjbs left #perl6
19:47 jnthn Could recognize use Safe; like we do e.g. use MONKEY_TYPING; and set a contextual, then check it in the Q:PIR thingymmy
19:47 jnthn s/thingummy/action method/
19:48 Tene Better would be for Safe to modify the grammar itself.
19:48 Tene IMO
19:50 moritz_ how would I remove or substitute a token?
19:50 moritz_ substitute token term:sym<pir::op> { ... } with a new regex / <!> /
19:51 moritz_ rakudo: say ?('' ~~ /<!>/)
19:51 p6eval rakudo e59795: OUTPUT«0␤»
19:52 tri1 joined #perl6
19:53 _mpu joined #perl6
19:53 Tene It's just a method in the Perl6::Grammar class, right?  So can't you augment Perl6::Grammar?
19:53 Tene replace it with a panic?
19:54 moritz_ I know how to add methods by augmenting
19:54 moritz_ but I don't know how to override one
19:54 Tene Hmm.
19:54 moritz_ rakudo: class A { method f() { } }; use MONKEY_TYPING; augment class A { method f() { say "augmented" } }; A.new.f
19:55 p6eval rakudo e59795: OUTPUT«===SORRY!===␤A method named 'f' already exists in class 'A'. It may have been supplied by a role.␤»
19:55 eternaleye joined #perl6
20:00 tylercurtis rakudo: augment slang MAIN { token quote:sym<Q:PIR> { <.panic: "Q:PIR disabled in Safe mode."> } }; Q:PIR{ say "should not appear" }
20:00 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Malformed augment at line 11, near "slang MAIN"␤»
20:01 jnthn Rakudo dun known no slang, like.
20:01 * tylercurtis didn't expect so.
20:02 tylercurtis moritz_: Perhaps have a Safe::eval function for now that evals a string with a subclass of the normal grammar that gets rid of Q:PIR?
20:03 moritz_ tylercurtis: that doesn't help for the REPL (which we want to use for try.rakudo.org), because each Safe::eval would be in its own scope, losing outer lexicals
20:05 dalek rakudo: 1971474 | moritz++ | lib/Safe.pm:
20:05 dalek rakudo: [Safe.pm] remove non-functional code
20:05 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/197147422c0283d686a4ccfa2c6cc94d27fd3d43
20:05 moritz_ jnthn: if I set a contextual to forbid term:sym<pir::op>, can't the user reset it?
20:07 moritz_ rakudo: BEGIN { $*MONKEY_TYPING = 1 }; augment class Str { method foo { 34 } }; say "blubb".foo
20:07 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Cannot modify readonly value␤»
20:08 tylercurtis moritz_: how does the current REPL persist the lexical scope between lines? Could a similar trick be done for a Safe::eval-based REPL?
20:08 moritz_ it might, but it might be tricky
20:09 TimToady rakudo: BEGIN my $*MONKEY_TYPING = 1; augment class Str { method foo { 34 } }; say "blubb".foo
20:09 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Cannot modify readonly value␤»
20:10 TimToady o_O
20:10 moritz_ it's because $*MONKEY_TYPING is bound to 0
20:10 moritz_ once rakudo implements binding, $*MONKEY_TYPING := 1 will work
20:10 TimToady rakudo: BEGIN my $*MONKEY_TYPING := 1; augment class Str { method foo { 34 } }; say "blubb".foo
20:10 p6eval rakudo e59795: OUTPUT«===SORRY!===␤:= binding of variables not yet implemented␤»
20:10 TimToady fnork!
20:11 ash_ there is a dynamic variable for MONKEY_TYPING?
20:11 ash_ neat
20:11 TimToady but 'my $*MONKEY_TYPING' is supposed to create a *new* lexical
20:11 moritz_ I know
20:12 sorear just use geordi + chroot + rlimit already
20:12 sorear it's not like you'll *ever* manage to get all the loopholes out of the compiler
20:13 Tene sorear: link about geordi?
20:13 sorear language-based security isn't something you can retrofit after 10 years
20:13 Tene I'm having trouble asking google.
20:13 moritz_ sorear: I'd like to have two lines of defense, if possible
20:13 sorear http://www.xs4all.nl/~weegen/eelis/geordi/
20:13 moritz_ ./perl6 -e 'use FORBID_PIR; pir::printerr__vS("BLA\n")'
20:13 moritz_ ===SORRY!===
20:13 moritz_ pir::op forbidden in safe mode
20:18 ash_ moritz_: does that work? (or is that an example?)
20:18 rhr joined #perl6
20:18 moritz_ that works locally here
20:19 ash_ neat
20:20 tadzik joined #perl6
20:24 moritz_ sorear: I'm not sure how easy or hard it will be to adopt the ptrace trick to a dynamic language where compilation and run time aren't easily separated
20:25 ingy greetings
20:25 gongyiliao joined #perl6
20:26 ingy I just found a crazy error in rakudo
20:26 gongyiliao joined #perl6
20:26 moritz_ RT has ~600 of those :-)
20:26 moritz_ but do tell
20:28 dalek rakudo: c80319f | moritz++ | src/Perl6/ (2 files):
20:28 dalek rakudo: add FORBID_PIR pseudo package which disallows Q:PIR { } and pir::stuff
20:28 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/c80319f902ee84142a7338e31ba4a5b97265fb5d
20:29 ingy you can't name a subroutine "${keyword}_text"
20:29 ingy like get_foo
20:29 ingy or lt_foo
20:29 ingy knowing TimToady, this is probably a feature
20:29 moritz_ rakudo: sub get_foo() { say 3 }; get_foo()
20:30 p6eval rakudo e59795: OUTPUT«3␤»
20:30 ingy hmm
20:30 moritz_ rakudo: sub if_foo() { say 3 }; if_foo()
20:30 p6eval rakudo e59795: OUTPUT«3␤»
20:30 moritz_ rakudo: sub if_foo() { say 3 }; if_foo
20:30 p6eval rakudo e59795: OUTPUT«3␤»
20:30 ingy rakudo: sub get_fun() { say 3 }; get_fun()
20:30 p6eval rakudo e59795: OUTPUT«3␤»
20:30 * moritz_ doesn't see the problem
20:31 sbp rakudo: sub get_foo { say 3 }; get_foo
20:31 p6eval rakudo e59795: OUTPUT«3␤»
20:31 ingy you need newlines in there
20:31 ingy not a one liner
20:32 moritz_ rakudo: sub get_foo { say 3 }; ␤get_foo
20:32 p6eval rakudo e59795: OUTPUT«3␤»
20:32 ingy sub get_fun() { say 3
20:32 ingy }
20:32 ingy get_fun();
20:32 moritz_ rakudo: sub get_foo { say 3␤ }; ␤get_foo
20:32 p6eval rakudo e59795: OUTPUT«3␤»
20:32 ingy after the open curly too
20:32 ash_ rakudo: sub get_fun() { ␤ say 3␤ } ␤get_fun
20:32 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub get_fu"␤»
20:32 ingy :)
20:33 moritz_ now *that's* weird
20:33 moritz_ please submit!
20:33 ash_ rakudo: sub get_fun() { ␤ say 3␤ }; ␤get_fun
20:33 p6eval rakudo e59795: OUTPUT«3␤»
20:33 ash_ its the mixing ; ? sub's don't always need those though, right?
20:33 tri1 joined #perl6
20:33 frettled rakudo: sub get_fun() { ␤ say 3␤ }␤get_fun
20:34 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub get_fu"␤»
20:34 ingy rakudo: sub gxt_fun() { ␤ say 3␤ }; ␤gxt_fun
20:34 p6eval rakudo e59795: OUTPUT«3␤»
20:34 moritz_ after }\n the ; should be optional
20:34 ingy see?!
20:34 ingy rakudo: sub gxt_fun() { ␤ say 3␤ } ␤gxt_fun
20:34 frettled rakudo: sub gxt_fun() { ␤ say 3␤ }␤gxt_fun
20:34 p6eval rakudo e59795: OUTPUT«3␤»
20:34 p6eval rakudo e59795: OUTPUT«3␤»
20:34 ingy the name matters
20:34 frettled ingy: I agree, that's just crazy.
20:35 frettled ingy: quick, submit before masakbot beats you to it ;)
20:35 ingy gxt_fun works but not get_fun
20:35 TimToady std: sub get_fun() { ␤ say 3␤ }␤get_fun
20:35 silug joined #perl6
20:35 p6eval std 31581: OUTPUT«ok 00:01 113m␤»
20:36 ingy :)
20:36 TimToady std: sub if_fun() { ␤ say 3␤ }␤if_fun
20:36 p6eval std 31581: OUTPUT«ok 00:01 110m␤»
20:36 TimToady (std doesn't know anything about get really)
20:38 tylercurtis rakudo: sub ge_fun() { ␤ say 3␤ } ␤ge_fun
20:38 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub ge_fun"␤»
20:38 tylercurtis rakudo: sub fdiv_fun() { ␤ say 3␤ } ␤ge_fun
20:38 frettled tylercurtis: ooh, maybe we're on to something here...
20:38 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub fdiv_f"␤»
20:38 frettled rakudo: sub gt_gt() { ␤ say 3␤ }␤gt_gt
20:38 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub gt_gt("␤»
20:39 frettled rakudo: sub gt_gt_gt() { ␤ say 3␤ }␤gt_gt_gt
20:39 sbp rakudo: sub gt_() { ␤ say 3␤ }␤gt_
20:39 TimToady fdiv?!?
20:39 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub gt_gt_"␤»
20:39 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub gt_() "␤»
20:39 sbp rakudo: sub gt() { ␤ say 3␤ }␤gt
20:39 p6eval rakudo e59795: OUTPUT«3␤»
20:39 frettled rakudo: sub gtgtgt() { ␤ say 3␤ }␤gtgtgt
20:39 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub gtgtgt"␤»
20:39 tylercurtis TimToady: fdiv is a parrot op for floored division.
20:39 tylercurtis rakudo: sub isnull_fun() { ␤ say 3␤ } ␤isnull_fun
20:39 p6eval rakudo e59795: OUTPUT«3␤»
20:39 frettled rakudo: sub gteqlt() { ␤ say 3␤ }␤gteqlt
20:39 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub gteqlt"␤»
20:40 tylercurtis rakudo: sub fdiv_fun() { ␤ say 3␤ } ␤fdiv_fun
20:40 p6eval rakudo e59795: OUTPUT«3␤»
20:40 frettled tylercurtis: so we're getting rakudo to channel parrot.  We then have a parroty error.  pieces of nine.
20:40 ingy how do I pass an array into a sub and receive the elements as positional args?
20:40 tylercurtis frettled: that does not appear to be the case, actually. I accidentally left ge_fun at the end there.
20:40 moritz_ ingy: foo(|@array)
20:41 tylercurtis rakudo: sub ge_fun() { ␤ say 3␤ } ␤say 4
20:41 p6eval rakudo e59795: OUTPUT«4␤»
20:41 ingy moritz_: what does the foo sig look like?
20:41 tylercurtis rakudo: sub ge_fun() { ␤ say 3␤ } ␤ge_fun()
20:41 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Confused at line 11, near "sub ge_fun"␤»
20:42 tylercurtis Apparently, it's the usage of the function that's the problem.
20:42 moritz_ rakudo: sub f($x, $y) { say $x + $y }; my @a = 42, 23; say f(|@a)
20:42 p6eval rakudo e59795: OUTPUT«65␤1␤»
20:42 moritz_ rakudo: sub f($x, $y) { say $x + $y }; my @a = 42, 23; f(|@a)
20:42 p6eval rakudo e59795: OUTPUT«65␤»
20:45 ingy moritz_: say I have $function and @args, where $function can point to funcs that take different # of args.
20:46 moritz_ ingy: and you want to pass as many as it can take?
20:46 ewilhelm joined #perl6
20:46 ewilhelm joined #perl6
20:46 ingy moritz_: yeah, I don't want it to check up on me
20:47 moritz_ then you need to introspect the signature
20:47 TimToady or put a *@more on the end to slurp them up
20:47 moritz_ rakudo: say (-> $x, $y, $y { }).arity
20:47 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Redeclaration of symbol $y at line 11, near " { }).arit"␤»
20:48 moritz_ rakudo: say (-> $x, $y, $y { }).arity
20:48 * ingy gets interested!
20:48 p6eval rakudo e59795: OUTPUT«===SORRY!===␤Redeclaration of symbol $y at line 11, near " { }).arit"␤»
20:48 moritz_ rakudo: say (-> $x, $y, $z { }).arity
20:48 p6eval rakudo e59795: OUTPUT«3␤»
20:48 moritz_ rakudo: say (-> $x, $y, $z? { }).arity
20:48 p6eval rakudo e59795: OUTPUT«2␤»
20:48 moritz_ rakudo: say (-> $x, $y, $z? { }).count
20:48 p6eval rakudo e59795: OUTPUT«3␤»
20:48 TimToady at some point we will also support partial binding with cursors
20:48 moritz_ rakudo: say (-> $x, $y, $z? { }).signature.params».name
20:48 p6eval rakudo e59795: OUTPUT«$x$y$z␤»
20:48 moritz_ see S06/Signature Introspection/
20:49 TimToady introspection is usually the wrong way to do anything :)
20:49 moritz_ yes
20:49 moritz_ but the right way isn't implemented yet
20:49 moritz_ and not even specced yet
20:49 jnthn Indeed.
20:49 TimToady should be close to implemented though, now that pmichaud++ put in cursors
20:50 moritz_ we still need a way to actually call it
20:50 moritz_ and to get some information back how much was bound
20:50 ingy TimToady: /me loves to do _everything_ the wrong way.
20:50 frettled There's more than one wrong way to do it.
20:51 jnthn Introspection enables you to build some really neat things. It's a good thing. Just not on a critical path, which binding tends to be.
20:51 jnthn Or for things that need to be done a lot.
20:52 ingy jnthn: done a lot by people != Ingy
20:52 jnthn :-)
20:52 jnthn Well, my entire Perl 6 module history so far has been introspection heavy.
20:52 jnthn ...all 2 of them. :-)
20:53 moritz_ actually Math::Model uses signature introspection for good cause, too
20:53 jnthn :-)
20:53 ingy nod. I'm having fun beating up on Perl's little sister.
20:53 moritz_ to find out which block depends on which other variables
20:53 jnthn moritz_: That's a so neat idea. :-)
20:53 moritz_ so that you can write things like  acceleration => { $:force / $:mass }
20:54 masak joined #perl6
20:54 masak o/
20:54 masak ingy: crazy bug. pmichaud discovered something similar (but not identical) about a month ago.
20:54 diakopter o
20:55 jnthn /
20:55 ingy masak: can you file that for me? :)
20:55 masak jnthn, diakopter: exercising the right to lay down arms?
20:55 * masak submits rakudobug
20:55 jnthn .oO( I bet if we -v masakbot++ it'll *still* keep on submitting Rakudo bugs )
20:56 ingy masak: all I wanted to do was write a 'get_function' sub. I had no idea it would be that hard. ;)
20:56 moritz_ ingy: a ; after the } seems to help, no?
20:56 ingy perl6 makes simple things simple and trivial things maddening.
20:57 masak ingy: what moritz_ said. seem to be easy to work around in this case.
20:57 masak ingy: you should do what some of us do and lead '# RAKUDO' comments next to workarounds.
20:57 TimToady well, partial binding will look something like: ($newcursor,$retval) = $oldcursor.invoke-with-partial-bind(&block, $args);
20:57 masak that way, you can come back to them and make them better when Rakudo improves.
20:58 ingy masak: thanks
20:58 masak TimToady: did you see my comment about your 'lines' spec patch not working in practice?
20:58 TimToady or there will be a mutable cursor container that takes oldcursor in and returns newcursor out
20:59 TimToady you mean the \N*\n not chomping?
20:59 masak aye.
20:59 TimToady yes, just haven't got back to it
21:00 masak just checking. no rush.
21:00 masak it was one of these "heh, let's go from spec to implementation in less than half an hour... waitaminute" moments.
21:02 pugssvn r31582 | lwall++ | [Str] fix lines def to use .comb(/ ^^ \N* /) for masak++
21:02 masak \o/
21:03 masak and a much cuter definition, too :)
21:03 masak "*giggle* anything but newlines"
21:04 pugssvn r31583 | lwall++ | [S06] define a * statement to represent a call from a proto to its multis
21:04 Tene ubuntu doesn't seem to ship the selinux sandbox utility.
21:05 ash_ moritz_: is there anyway i could put my tmp work on your server (or wherever try.rakudo.org will be)? dreamhost is being annoying, i tried building it on my computer but its not linked the same
21:07 TimToady masak: the ^^ is necessary only to suppress matching between \n$
21:07 masak oh, right.
21:07 TimToady otherwise could just be \N*
21:08 jnthn my |$cap = (*);
21:08 jnthn So
21:08 jnthn my |$cap = *;
21:08 TimToady not a statement
21:08 jnthn Would be different otoh?
21:08 jnthn And I think it should be
21:08 jnthn my (|$cap) := *;
21:08 jnthn or
21:08 jnthn my (|$cap) := (*);
21:08 masak huh, a regex engine that produced things meant for .comb could do a much better job than just a general regex engine.
21:09 nimiezko joined #perl6
21:09 jnthn OTTH, returns are a Parcel so maybe we need a way not to capturize or something.
21:09 TimToady well, statement * is probably sugar for something else anyway
21:10 TimToady I wrote $cap but yeah, it's really a parcel
21:10 jnthn That's fine, but the something else could be perhaps less magical if we're binding.
21:10 ingy Could not find sub &say ???
21:10 masak rakudo: sub foo() { ␤ say 3␤ } ␤foo
21:10 p6eval rakudo c80319: OUTPUT«3␤»
21:11 TimToady "O See Can You Say"
21:11 jnthn TimToady: Anyway, I'll think it through a bit more.
21:12 jnthn TimToady: My gut reaction is that it feel along the right lines but not quite right yet.
21:12 TimToady generally I think people will use the ENTER/LEAVE trick and let * stand as its own return value
21:12 nimiezko How far goes the implementation of S16 in rakudo now ?
21:12 jnthn Yes, that one looks OK to me.
21:13 jnthn Though the * there vs (*) above irks me slightly.
21:13 TimToady well, statement is about the only place left where we haven't given * a meaning yet :)
21:13 jnthn :-)
21:14 [particle] if i could count the times i've seen questions of S16...
21:14 TimToady do *; would also work
21:14 ingy if I dynamically load a module with eval, does it not have 'say' available?
21:15 masak nimiezko: only simple things so far.
21:15 TimToady or do {*} to keep the same looking magic
21:15 jnthn rakudo: eval('use Test; ok 42')
21:15 p6eval rakudo c80319: OUTPUT«ok 1 - ␤»
21:15 masak nimiezko: I also think that S16 is a little too abstracty for its own good. but that is my personal opinion.
21:16 ingy rakudo: eval('use Test;'); ok 42
21:16 p6eval rakudo c80319: OUTPUT«Could not find sub &ok␤  in main program body at line 11:/tmp/WYSusYhumO␤»
21:16 jnthn That's correct.
21:16 nimiezko do not really know
21:16 jnthn (Import is lexical by default.)
21:16 Tene rakudo: eval('use Test;'); Test::ok 42
21:16 TimToady and eval is its own lexical scope
21:16 p6eval rakudo c80319: OUTPUT«Can not find sub Test::ok␤  in main program body at line 1␤»
21:16 nimiezko thinking about if there is any opening of files supported
21:17 jnthn Tene: The subs in Test.pm are lexical subs too ;-)
21:17 ingy well, this isn't really replicating my problem
21:17 jnthn Tene: But nice try. :-)
21:17 jnthn ingy: Oh... :-S
21:17 jnthn ingy: You've probably hit the roles + scope bug.
21:17 jnthn ingy: Is you're failing say inside a role?
21:17 ingy no
21:17 ingy I'll see if I can mimize it
21:17 ingy minimize
21:18 ingy TimToady pun to follow
21:18 TimToady I mized my pun down to nothing
21:18 ingy ^^
21:19 nimiezko masak : sorry, misinterpretation, I thought you talked about my question
21:19 masak nimiezko: I was. you asked how implemented S16 is.
21:19 nimiezko do not know enough of the synopses to have a real opinion on it
21:19 masak :)
21:20 jnthn nimiezko: Yes, open is implemented. Won't handle binary files...yet.
21:20 jnthn Somebody should implement that. ;-)
21:20 TimToady maybe we could get someone to pay for it too
21:20 jnthn Let me google for somebody who'd do that...
21:21 TimToady we'll also need a good (tor)mentor
21:21 masak :)
21:22 nimiezko and what about $*IN and others ?
21:22 jnthn Said tormentor and his tormentee should also submit mid-term reports next week.
21:22 jnthn nimiezko: $*IN works
21:22 jnthn rakudo: say $*IN.get
21:22 p6eval rakudo c80319: OUTPUT«Land der Berge, Land am Strome,␤»
21:22 masak those are in place.
21:22 masak you can even redirect them :)
21:22 jnthn rakudo: say +$*IN.lines
21:22 p6eval rakudo c80319: OUTPUT«23␤»
21:23 jnthn rakudo: say "OMG, the Austrian national anthem is {+$*IN.lines} lines long!"
21:23 p6eval rakudo c80319: OUTPUT«OMG, the Austrian national anthem is 23 lines long!␤»
21:23 ash_ seen cygx?
21:23 nimiezko ouch, that's just me, trying to run perl6 code forgetting to add the "6" after the perl in command line
21:24 jnthn Yes, 6 is good to have. :-)
21:24 ash_ purl: seen cygx
21:24 masak rakudo: say "OMG, the Austrian national anthem is $*IN.lines.Int() lines long!"
21:24 p6eval rakudo c80319: OUTPUT«OMG, the Austrian national anthem is 23 lines long!␤»
21:25 rhr joined #perl6
21:26 ash_ rakudo: say "OMG, the Austrian national anthem is {+$*IN.lines} lines long!"
21:26 p6eval rakudo c80319: OUTPUT«OMG, the Austrian national anthem is 23 lines long!␤»
21:26 jnthn rakudo: say "Ich will ein $*IN.get(), aber nur ich hab ist ein $*IN.get(). :-/"
21:26 p6eval rakudo c80319: OUTPUT«Ich will ein Land der Berge, Land am Strome,, aber nur ich hab ist ein Land der Äcker, Land der Dome,. :-/␤»
21:26 jnthn aw, comma fel
21:27 masak points for trying, though.
21:28 TimToady awek fel &
21:28 jnthn TimToady++ # speaks perfect Swedish too
21:28 jnthn ;-)
21:28 masak it looks so... fel.
21:29 * pmurias hates disappearing code, editing the dists generated by Dist::Zilla seems a likely culprit
21:30 tri1 left #perl6
21:34 lue rakudo: my $a = 2; my $b := $a; $b = 3; say $a;
21:34 p6eval rakudo c80319: OUTPUT«:= binding of variables not yet implemented␤  in 'infix:<:=>' at line 680:CORE.setting␤  in main program body at line 11:/tmp/DmVCvP3OpK␤»
21:35 ingy jnthn: I got it fairly minimal
21:35 pmichaud 17:41 <sorear> pmichaud: _ doesn't match <alpha> or <digit>
21:35 ingy say Foo.pm is: class Foo; method xyz($name) { say ">> $name" }
21:35 pmichaud sorear: _ matches <alpha>
21:35 ingy my $class = 'Foo'; eval "use $class"; "$class".new.xyz("hello");
21:36 pmichaud ingy: eval "use $class" is not likely to work, since such usage is lexically scoped (iirc)
21:36 ingy Could not find sub &say
21:36 ingy pmichaud: that works fine
21:36 pmichaud ingy: if it works now, it's because of a rakudo bug.
21:36 ingy Foo fails to compile
21:36 masak rakudo: say $*IN.lines>>.chars.perl
21:36 ingy Foo can't see say
21:36 p6eval rakudo c80319: OUTPUT«(31, 31, 32, 30, 32, 27, 27, 0, 31, 31, 28, 28, 28, 27, 27, 0, 26, 37, 31, 29, 31, 26, 26)␤»
21:38 ingy pmichaud: if I take out the 'say' it seems to all work fine.
21:38 pmichaud ingy: checking.  it has to do with scoping issues, I'm sure.
21:39 masak rakudo: say $*IN.lines>>.words>>.[*-1].perl
21:39 p6eval rakudo c80319: OUTPUT«("vielgeliebtes", "\x[c3]\x[96]sterreich!")␤»
21:39 colm joined #perl6
21:40 lue .oO(what is in $*IN in p6eval?)
21:40 masak lue: Austria.
21:40 lue rakudo: say "\x[C3,96]"
21:40 jnthn The whole Austria.
21:40 p6eval rakudo c80319: OUTPUT«Ã–␤»
21:40 jnthn masak: I'm having vacation in Austria at the end of August! \o/
21:41 lue .u 0096
21:41 phenny U+0096 (No name found)
21:41 masak jnthn: tell them I said 'hi'.
21:41 masak lue: http://german.about.com/library/blmus_anthemA.htm
21:42 pmichaud ingy: I don't get the same error you're seeing.
21:42 masak rakudo: for $*IN.lines() -> { say .words[*-1] }
21:42 am0c joined #perl6
21:42 p6eval rakudo c80319: OUTPUT«Too many positional parameters passed; got 1 but expected 0␤  in main program body at line 1:/tmp/Jk9jJMdh0i␤»
21:42 masak er.
21:42 masak rakudo: for $*IN.lines() { say .words[*-1] }
21:42 p6eval rakudo c80319: OUTPUT«Strome,␤Dome,␤zukunftsreich!␤Söhne,␤Schöne,␤Österreich,␤Österreich!␤umstritten␤inmitten,␤gleich.␤Ahnentagen␤getragen,␤Österreich,␤Österreich!␤Zeiten,␤schreiten,␤hoffnungsreich.␤Brüderchören,␤schwören,␤Österreich,␤Österreich!␤»
21:44 pmichaud http://gist.github.com/468690   # what in the world is going on here?!
21:45 jnthn masak: Strange how the anthem mentions ostriches so often.
21:45 jnthn pmichaud: looking...
21:45 masak jnthn: one gets the feeling there's something they're sticking their heads in the sand about.
21:45 pmichaud .new on a string treats the string like a class name?
21:45 jnthn pmichaud: OH
21:45 jnthn pmichaud: We already have that in RT
21:45 jnthn pmichaud: It's, erm.
21:45 ingy pmichaud: did you put those snippets in Foo.pm and foo.pl?
21:46 jnthn pmichaud: Well tbh I really don't want to know how it happens.
21:46 pmurias jnthn: they must have a serious shortage of them in Austria...
21:46 pmichaud ohhhhh, I know!
21:46 pmichaud it's a p6object thing.
21:46 jnthn lol
21:46 jnthn Can we fix it? ;-)
21:46 masak rakudo: my $str-or-int = <Str Int>.pick; say $str-or-int.new.WHAT
21:46 pmichaud p6object is converting the string to a class name
21:46 p6eval rakudo c80319: OUTPUT«Str()␤»
21:46 masak rakudo: my $str-or-int = <Str Int>.pick; say $str-or-int.new.WHAT
21:46 p6eval rakudo c80319: OUTPUT«Str()␤»
21:46 jnthn ETOODYNAMIC
21:46 masak rakudo: my $str-or-int = <Str Int>.pick; say $str-or-int.new.WHAT for ^10
21:47 p6eval rakudo c80319: OUTPUT«Str()␤Str()␤Str()␤Str()␤Str()␤Str()␤Str()␤Str()␤Str()␤Str()␤»
21:47 pmichaud jnthn: yes, I suspect we can.  easier is to fix in rakudo than to try to update p6object itself.
21:47 tedv joined #perl6
21:47 jnthn pmichaud: Aye, and p6object probably only has so long left to live in its current form :-)
21:48 pmichaud jnthn: well, don't forget that past and pct is currently p6object based
21:48 jnthn 65224 class name as string unexpectedly "works"
21:48 lue any other numbers?
21:48 jnthn pmichaud: We'll worry about that a little further down the line.
21:48 pmichaud lue: I know I keep losing this... but is there a url for your := patch again?
21:49 pmichaud (sorry for losing it.)
21:49 ingy pmichaud: I'm confused...
21:49 pmichaud ingy: "$class".new  should not be returning an instance of $class
21:49 pmichaud that's a bug in Rakudo.
21:49 ingy what should it return?
21:49 pmichaud a new string
21:50 pmichaud just like    123.new  would return a new Int
21:50 pmichaud or  [1,2,3].new would return a new Array
21:50 ingy how do I get an instance of $clas?
21:51 pmichaud ::$class might work, someday.
21:51 pmichaud eval($class)  probably works today.
21:51 pmichaud oh, that would give the type object
21:51 pmichaud so to get an instance, you'd want  ::$class.new   (or eval($class).new )
21:52 pmichaud might even need to be ::{$class} though.  I need to review the package syntax rules.
21:52 ingy eval("$class").new.xyz("hello"); # give same &say error
21:53 lue (it's coming..............)
21:53 pmichaud ingy: that looks like it must be a recent bug introduced today
21:54 lue http://gist.github.com/463775    original patch + Q:PIR block removal [more]
21:54 ingy pmichaud: my build is ove a week old
21:54 pmichaud ingy: oh, then all bets are off.
21:54 pmichaud a *lot* has changed in the past week.
21:54 ingy I see
21:54 pmichaud the closure model has been completely redone
21:54 ingy what build should I use?
21:54 masak "Perl 6: a *lot* has changed in the past week." :P
21:54 lue http://gist.github.com/465939    dealing with arrays and hashes [1 more]
21:55 pmichaud ingy: hard to say.
21:55 pmichaud apparently the version as of 0000 CDT doesn't have the &say problem, but current HEAD does
21:55 ingy :\
21:55 lue http://gist.github.com/465750    ::= binding [done]
21:55 ingy pmichaud: what's the git commit of 0000 CDT?
21:56 pmichaud 894e79 according to my log
21:56 lue there ye are, pmichaud.
21:56 pmichaud lue:  looking
21:57 diakopter masak: lol
21:57 lue .oO(Perl 6: Do *)
21:58 sjohnson is there an oop string method that searches inside a string for a string in P6?
21:58 sjohnson and not as a regular expression?
21:58 masak sjohnson: .index and .rindex
21:58 sjohnson nice, will try it
21:59 sjohnson rakudo: my $str = 'happy'; say $str.index('.');
21:59 p6eval rakudo c80319:  ( no output )
21:59 sjohnson rakudo: my $str = 'happy.moose'; say $str.index('.');
21:59 p6eval rakudo c80319: OUTPUT«5␤»
21:59 sjohnson rakudo: my $str = '.happymoose'; say $str.index('.');
21:59 p6eval rakudo c80319: OUTPUT«0␤»
21:59 sjohnson hmm.. is there a similar way that that would return more of a boolean result, to let me know it at least found it?
22:00 sjohnson .oO(i suppose defined( would also tell me that though..)
22:00 pmichaud defined, I think
22:00 masak aye.
22:00 pmichaud you can also do   $str.index('.') // $whatever
22:00 sjohnson :thumbsup:
22:00 lue rakudo: our sub a($a) { say $a + 1 }; our sub b($b) { say $b + 2 }; my @a = [a(), b()]; @a[1](5);
22:00 p6eval rakudo c80319: OUTPUT«Not enough positional parameters passed; got 0 but expected 1␤  in 'a' at line 11:/tmp/yZ6CNTGoHl␤  in main program body at line 11:/tmp/yZ6CNTGoHl␤»
22:00 sjohnson i cant really seem to find it in p5, hence i decided to see if p6 has that technology
22:01 sjohnson that is, without busting out cpan
22:01 lue Thought I could get away with that :)
22:01 masak when StrPos is implemented, one'll be able to drop the 'defined' part. but it's future-proof and will still work with StrPos, too.
22:01 sjohnson nevermind, index is in p5
22:01 ingy pmichaud: > git co 894e79
22:01 ingy Note: moving to '894e79' which isn't a local branch
22:01 masak *no* implementation has StrPos yet.
22:01 sjohnson thank you perl6 heros
22:03 sjohnson rakudo: my $str = '.happymoose'; say $str.index('z');
22:03 p6eval rakudo c80319:  ( no output )
22:04 sjohnson ahh, p5 would say -1
22:04 ash_ joined #perl6
22:04 sjohnson note to self: remind oneself that p6 is different than p5 in some cases
22:04 masak sjohnson: it shouldn't say 'no output'.
22:04 masak sjohnson: try locally.
22:04 masak sjohnson: but you won't ever get -1 from Perl 6 in that case; see S32/Str.
22:05 masak sjohnson: hence pmichaud's 'defined or //' advice and my addendum above.
22:05 sjohnson i got a lot of reading ahead of me :)
22:06 sjohnson hmm... has // come to mean "and" ?
22:06 sjohnson or the "and" version of defined?
22:06 masak sjohnson: no, it means "or, failing that".
22:06 ingy pmichaud: do you work on master?
22:06 sjohnson hmm... does it replace the || in p5?
22:06 pmichaud ingy: I always work with master, yes.
22:06 masak sjohnson: no, || replaces || :)
22:06 masak sjohnson: // is in Perl 5.10, too.
22:07 lue .oO( while masak seems to prefer alpha :) )
22:07 masak sjohnson: it's the 'defined-or' operator.
22:07 sjohnson time to learn about this // technology
22:07 sjohnson is there a defined-and ?
22:07 sjohnson \\
22:07 sjohnson :)
22:07 pmichaud sjohnson:    // returns its lhs if the lhs is defined, otherwise it returns the rhs
22:07 pmichaud defined-and would be &&  :-P
22:07 masak lue: yeah, but it feels increasingly wrong to develop for alpha.
22:07 pmichaud oh, maybe not.
22:08 pmichaud anyway.
22:08 sjohnson interesting operands
22:08 masak sjohnson: there's less of a use case for keeping only undefined values and throwing away defined ones :P
22:08 sjohnson you learn something (about perl6) every day
22:08 sjohnson and perl 5.10 too
22:09 stef__ joined #perl6
22:10 sorear TimToady: What was wrong with nextsame for MMD?
22:10 * lue is reminded, again, of the PTO
22:10 sorear I need to hurry up and implement StrPos I see
22:14 lue As I read more, I can see why StrPos doesn't exist in practice yet.
22:14 masak lue: why is that?
22:15 lue I guess it's just the talk about Unicode abstraction that got me.
22:17 lue (were !'s some sort of quoting construct in P5?)
22:17 masak lue: yeah, those Unicode levels still feel semi-underspec'd to me.
22:17 lue .oO(S33 Unicode)
22:17 masak rakudo: say q!OH HAI! # lue: like this? :)
22:17 p6eval rakudo c80319: OUTPUT«OH HAI␤»
22:18 ingy pmichaud: it's working with that build
22:18 lue that explains why my vim highlighting is acting up.
22:18 lue (probably not P6 then)
22:18 ingy $class.new.xyz("hello"); # works too
22:18 ingy $class.new   seems like it should work
22:18 ingy TimToady? ^^
22:19 ingy hmm
22:19 pmichaud $class.new will work if $class is a type object.
22:19 ingy right
22:19 pmichaud note that "Foo" (with the quotes) is not a type object :-)
22:20 ingy eval "$class_name" # should return a class object?
22:20 pmichaud sure, if the class object is defined in the current scope.
22:20 lue Strings look like a fun concept that needs some work. [ I should tell you about my plans to upset Unicode with Circular Gallifreyan sometime :) ]
22:23 ingy pmichaud: this works on the new build (and seems like it should) http://gist.github.com/468744
22:23 pmichaud ingy: it may run now, yes.  But it's not correct Perl 6.
22:23 ingy ?
22:24 ingy why not?
22:24 pmichaud $class is a string
22:24 pmichaud thus $class.new will eventually return a Str
22:24 ingy no
22:24 pmichaud oh, wait.
22:24 ingy it's a class
22:24 pmichaud okay, I see.
22:24 ingy object
22:24 pmichaud eventually it will fail because   eval("use $class")   will be lexically scoped to the eval, I think.
22:25 ingy so how do I dynamically load a module?
22:25 ingy the right way
22:25 ingy :)
22:25 pmichaud I believe that will be 'import'
22:26 ingy does import load from disk?
22:26 lue ? there's a use and an import?
22:26 pmichaud oops, wrong.  it's "need"
22:26 pmichaud wrong again, it's "require"
22:26 pmichaud See S11.
22:26 pmichaud head1 Runtime Importation
22:27 ingy does require scope things like use?
22:28 pmichaud it's all there in the spec, I think.
22:29 pmichaud there's a version that does scope and a version that doesn't.
22:29 ingy please don't "fix" use without implementing require. :)
22:29 pmichaud I have no idea how much of 'require' is currently implemented in rakudo.
22:29 pmichaud I'm sure we'll have require before we "fix" use, yes.
22:29 ingy pmichaud: I think it's not implemented
22:29 ingy doesn't work over here
22:30 ingy rakudo: require Test;
22:30 p6eval rakudo c80319: OUTPUT«Could not find sub &Test␤  in main program body at line 11:/tmp/tcuwCkuLpH␤»
22:30 pmichaud looks like nyi, yes.
22:30 ingy rakudo: require 'Test';
22:30 p6eval rakudo c80319: OUTPUT«Could not find sub &require␤  in main program body at line 11:/tmp/INxBQVQDp2␤»
22:30 pmichaud feel free to submit a ticket requesting it :)
22:30 ingy bleh
22:30 ingy I'm spending too much time on P6
22:30 ingy (for an Acmeist)
22:30 ingy ;)
22:31 pmichaud we all spend a bit too much time on p6.  But that's just because it's so -Ofun
22:31 ingy I'm just trying to get TestML working everywhere so I can get other, more interesting modules working everywhere
22:31 ingy but p6 has the nicest irc channel
22:31 ingy community++
22:32 ingy except for that masak jerk!
22:32 ingy ;D
22:41 ingy is there a way to ask a class/package/module for a named function?
22:41 ingy I'm using $class.can($name)
22:41 slavik package::function() ?
22:41 slavik wrong perl version :(
22:42 ingy but my functions are not really methods
22:42 ingy so it feels icky
22:42 ingy and will likely break later.
22:42 ingy when TimToady thinks it's icky
22:43 ingy what is 'package' in p6?
22:43 ingy a function container?
22:43 ingy that would be nice (if I can introspect it)
22:45 fozo joined #perl6
22:46 fozo Okay I installed git and then unistalled it and when I enter a folder or my start menu I get a werid error saying something like "cannot find git path"
22:47 Tene Package::{$foo}
22:47 Tene according to S10
22:47 ingy TimToady: 'Package' is in $pkg
22:48 ingy er
22:48 Tene rakudo: package Foo { sub blah { say "lolol" } }; my $x = Foo::{'blah'}; $x();
22:48 timbunce joined #perl6
22:48 p6eval rakudo c80319: OUTPUT«Could not find sub &Foo␤  in main program body at line 11:/tmp/OawxE9c33y␤»
22:48 ingy I meant Tene ^^
22:48 fozo I have no clue what that means!
22:48 Tene rakudo: package Foo { sub blah { say "lolol" } }; my $x = ::Foo::{'blah'}; $x();
22:48 p6eval rakudo c80319: OUTPUT«Null PMC access in invoke()␤  in main program body at line 1␤»
22:49 fozo again WHAAATT?!?!?
22:49 Tene fozo: Have you asked in the git irc channel?
22:49 fozo no
22:49 Tene Why are you asking #perl6, then?
22:49 fozo hey is there  a web devcolpment channel?
22:50 fozo because it was for rakudo
22:50 Tene Ah.
22:50 Tene I have no idea; never really used windows.  I recommend you ask #git.
22:51 fozo okay ty
22:51 Tene Good luck! :)
22:52 fozo "== Cannot send to channel: #git" what does this mean?
22:52 ingy Tene: so you were saying... :)
22:53 Tene fozo: I'm sorry, I don't know.  You should probably look at the channel topic, and check to see if your IRC client has received any other messages, perhaps in a status window?
22:53 Tene Maybe there was a join message.
22:53 fozo well ty
22:53 ingy rakudo: package Foo { sub blah { say "lolol" } }; say "OK" if Foo::{blah}
22:54 p6eval rakudo c80319: OUTPUT«Could not find sub &Foo␤  in main program body at line 11:/tmp/Yqb3lM_F_3␤»
22:54 ingy rakudo: class Foo { sub blah { say "lolol" } }; say "OK" if Foo::{blah}
22:54 p6eval rakudo c80319: OUTPUT«Could not find sub &Foo␤  in main program body at line 11:/tmp/hBVvjxARLu␤»
22:54 jnthn ingy: our sub...
22:55 ingy rakudo: class Foo { our sub blah { say "lolol" } }; say "OK" if Foo::{blah}
22:55 p6eval rakudo c80319: OUTPUT«Could not find sub &Foo␤  in main program body at line 11:/tmp/yhAXNy3TUm␤»
22:55 jnthn rakudo: module Foo { sub bar { say 42 } }; Foo::bar()
22:55 jnthn gah
22:55 p6eval rakudo c80319: OUTPUT«Can not find sub Foo::bar␤  in main program body at line 1␤»
22:55 jnthn rakudo: module Foo { our sub bar { say 42 } }; Foo::bar()
22:55 p6eval rakudo c80319: OUTPUT«42␤»
22:57 ingy module Foo { our sub bar { say 42 } }; my $pkg = "Foo"; my $name = "bar"; my $fun = eval "${pkg}::$name"; $fun()
22:58 ingy grr
22:58 ingy rakudo: module Foo { our sub bar { say 42 } }; my $pkg = "Foo"; my $name = "bar"; my $fun = eval "${pkg}::$name"; $fun()
22:58 p6eval rakudo c80319: OUTPUT«Could not find sub &pkg␤  in main program body at line 11:/tmp/5vgaCZC6KX␤»
22:59 ingy rakudo: module Foo { our sub bar { say 42 } }; my $pkg = "Foo"; my $name = "bar"; my $fun = eval "$pkg" ~ "::$name"; $fun()
22:59 p6eval rakudo c80319: OUTPUT«42␤invoke() not implemented in class 'Boolean'␤  in main program body at line 11:/tmp/XdT3O1YbPY␤»
22:59 ingy rakudo: module Foo { our sub bar { say 42 } }; my $pkg = "Foo"; my $name = "bar"; my $fun = eval "$pkg" ~ "::$name"; $fun.()
22:59 p6eval rakudo c80319: OUTPUT«42␤invoke() not implemented in class 'Boolean'␤  in main program body at line 11:/tmp/9kNLJOzF4R␤»
23:00 ingy ?
23:02 ingy rakudo: module Foo { our sub bar { say "PASS" } }; my $pkg = "Foo"; my $name = "bar"; my $fun = Foo::bar; $fun.()
23:02 p6eval rakudo c80319: OUTPUT«PASS␤invoke() not implemented in class 'Boolean'␤  in main program body at line 11:/tmp/qbWyUVuDi7␤»
23:02 ingy oh
23:02 ingy jnthn: I need a reference to Foo::bar
23:03 ingy jnthn: and I need it from "Foo" and "bar" variables
23:04 jnthn ingy: There's not a good way to do that at the moment besides eval('&' ~ $pkg' ~ '::' ~ $name) or similar
23:05 ingy that's fine
23:05 ingy rakudo: module Foo { our sub bar { say 42 } }; my $pkg = "Foo"; my $name = "bar"; my $fun = eval "&$pkg" ~ "::$name"; $fun.()
23:05 p6eval rakudo c80319: OUTPUT«42␤»
23:05 jnthn rakudo: module Foo { our sub bar { say "PASS" } }; my $pkg = 'Foo'; my $name = 'bar'; my $f = eval('&' ~ $pkg' ~ '::' ~ $name); $f();
23:05 ingy thanks
23:05 p6eval rakudo c80319: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 11␤»
23:05 jnthn heh, you beat me *and* got it correct. :-)
23:05 ingy jnthn: beat ya
23:05 ingy \o/
23:06 * lue feels we need a separate channel to discuss changes to Perl 6 sometimes.
23:06 ingy lue: what do you feel this channel is for?
23:07 ingy rakudo: package Foo { our sub bar { say 42 } }; my $pkg = "Foo"; my $name = "bar"; my $fun = eval "&$pkg" ~ "::$name"; $fun.()
23:07 p6eval rakudo c80319: OUTPUT«42␤»
23:07 ingy works for "package" too
23:07 jnthn Yes, it's just package Foo; that will get you in bother. :-)
23:07 jnthn rakudo: package Foo; say 42;
23:07 p6eval rakudo c80319: OUTPUT«===SORRY!===␤This appears to be Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6 style package block like "package Foo { ... }", or "module Foo; ...". at line 11, near "say 42;"␤»
23:08 lue I know this channel is the right place, but it almost seems like you need to start talking about it at the right moment, or it won't get the discussion it deserves...
23:08 ingy noted
23:08 jnthn lue: I don't think another channel for people not to be on at the right moment will increases the chances. ;-)
23:09 ingy XD
23:09 lue :)
23:09 ingy later p6 taters
23:09 jnthn o/
23:09 _sri will blizkost ship with rakudo/parrot at some point?
23:09 am0c joined #perl6
23:09 * lue can't wait for diaspora*
23:10 jnthn _sri: Expect it will be in the Rakudo * distribution release.
23:10 _sri \o/
23:10 _sri thats something you should make people aware of, makes me feel all warm and fuzzy inside
23:10 lue or, we could create a section on perl6.org for a — <.< — >.> — forum. [JOKE]
23:11 jnthn _sri: I writed it into slides I gave...and really should upload.
23:11 jnthn Will try and do that at the weekend.
23:11 mtve joined #perl6
23:12 lue in a class, is it safe to set initial values for variables outside of any methods?
23:14 masonkramer joined #perl6
23:15 kid51 joined #perl6
23:17 jnthn lue: Got a short example?
23:19 lue class cpu2A03; has @!memorymap; @!memorymap = 0 xx 0x2000;  # something like that
23:19 lue I guess I'm just being paranoid here :)
23:21 jnthn oh, that won't work but
23:21 jnthn has @!memorymap = 0 xx 0x2000;
23:21 jnthn Will be fine
23:21 jnthn (it will turn the RHS of the = into an anonymous method)
23:21 jnthn (and run it once per object you create)
23:22 takadonet joined #perl6
23:24 lue ah, so I have to set it within a method. Because the xx stuff will have to happen more than once, in addition to some binding :)
23:27 jnthn Right.
23:28 lue my next roadblock seems to be the need to open binary files (if it doesn't work already)
23:28 jnthn Well, in what I showed it makes the method for you.
23:28 jnthn Oh, masak++ is working on that
23:28 jnthn It's broken at the moment, but having somebody with a use case will surely help spur him on. ;-)
23:29 TimToady just run od on it and slurp it in as an array of integers.  :)
23:29 lue (well, I might as well avoid creating the memory map twice, and create it only once with the info from the ROM.)
23:30 jnthn Careful not to od on the workarounds! ;-)
23:31 lue (hrm, let's see, ROM runs from 0x8000 to 0xFFFF...)
23:31 TimToady you should write a song about it, so it would be an odditty
23:31 lue rakudo: say (0xFFFF - 0x8000 + 1).fmt('%x')
23:31 p6eval rakudo c80319: OUTPUT«8000␤»
23:31 lue or write a poem, call it an oddesey!
23:31 perigrin write the song in Python and it will be a whitespace oddity.
23:31 lue well, that was stupid on my part. I forgot bash hex math :)
23:32 lue s/bash/basic/
23:32 perigrin I did wonder what kind of mad sh skills you had for a second
23:33 TimToady <pmichaud> ::$class might work, someday.
23:33 lue write the song in Ruby and it'll be playable on the 時のオカリナ
23:33 TimToady unlikely, but ::($class) is specced
23:33 lue :)
23:34 ash_ TimToady: is ::($package) available too?
23:34 ash_ does it have to be a class in other words
23:35 TimToady ::() is any symbolic package-like interpolation
23:35 TimToady could even be the variable name in $foo::($bar)
23:36 ash_ $a.::(Foo).'$bar'() ?
23:36 TimToady but foo::{$bar} does a direct hash lookup of whatever is in $bar, which had better have the sigil
23:36 ingy rakudo: package Foo { our sub bar { say 42 } }; my $pkg = "Foo"; my $name = "bark"; my $fun = eval "&$pkg" ~ "::$name"; if not $fun { say "OK" }
23:36 p6eval rakudo c80319: OUTPUT«OK␤»
23:36 ingy rakudo: package Foo { our sub bar { say 42 } }; my $pkg = "Foo"; my $name = "bar"; my $fun = eval "&$pkg" ~ "::$name"; if not $fun { say "OK" }
23:36 p6eval rakudo c80319:  ( no output )
23:36 TimToady there is likely no method named '$bar'
23:36 ingy :)
23:36 TimToady "$bar" maybe
23:36 ash_ err
23:36 lue is a filename different than a string in P6? (in other words, is there a separate type for filenames?)
23:36 ash_ yeah, sorry
23:37 ingy this stuff is easy and consistent in Python :P
23:37 lue (masak talking earlier has me worried)
23:37 TimToady it's the same until it's different
23:37 ash_ i guess i should of said $a.::("$class")."method"();
23:37 ash_ grr
23:37 TimToady currently we spec a "path" type for filenames
23:37 ash_ $a.::("$class")."$method"();
23:37 TimToady and qp[/etc/passwd] is supposed to make one
23:38 TimToady first quotes are unneeded
23:38 ingy when is the * release target date?
23:38 TimToady 29th I believe
23:38 lue could I use a var of type Str and do qp[$var] ?
23:38 ingy post OSCON, good!
23:39 lue Yes. July 29th. 2010 BC.
23:39 lue erm, wait. That's not right....
23:39 TimToady Before Christmas
23:39 sorear TimToady: eval 'module Foo { our $x = 2; }'; say $::Foo::x; #what does this do
23:39 ingy OSCON-- # for screwing up too many Perl releases
23:40 TimToady should print 2, given that module defaults to "our"
23:40 lue TimToady: I believe it's Before Camel :)
23:40 sorear there's some stuff in the spec hinting at per-UNIT GLOBALs, so I suspect the eval's GLOBAL::Foo:: is invisible to the main unit
23:41 TimToady though, hmm, I can see where it could go astray
23:41 lue rakudo: my $a = "/dev/stdio.h"; my $b = qp[$a]; say $b
23:41 p6eval rakudo c80319: OUTPUT«===SORRY!===␤Confused at line 11, near "my $b = qp"␤»
23:41 lue TimToady: is the type path with an upper or lower case 'p' ?
23:42 TimToady upper
23:43 TimToady though as with most of IO.pod, it appears to be rather over-engineered
23:45 ruoso joined #perl6
23:45 lue Can we sprinkle some of that engineer on the under-engineered then?
23:46 sorear TimToady: What motivated the switch from callsame; to *;?
23:47 TimToady brevity
23:47 ingy rakudo: module Foo::Bleh { our sub bar { say 42 } }; my $pkg = "Foo::Bleh"; my $name = "bar"; my $fun = eval "&$pkg" ~ "::$name"; if not $fun { say "OK" }
23:47 sjohnson $bar!
23:47 p6eval rakudo c80319:  ( no output )
23:47 ingy rakudo: module Foo::Bleh { our sub bar { say 42 } }; my $pkg = "Foo::Bleh"; my $name = "bar"; my $fun = eval "&$pkg" ~ "::$name"; if $fun { say "OK" }
23:47 p6eval rakudo c80319: OUTPUT«OK␤»
23:47 ingy rakudo: module Foo::Bleh { our sub bar { say 42 } }; my $pkg = "Foo::Bleh"; my $name = "bar"; my $fun = eval "&$pkg" ~ "::$name"; $fun.()
23:47 p6eval rakudo c80319: OUTPUT«42␤»
23:48 * lue suddenly ponders easter eggs in rakudo, but it passes.
23:49 TimToady and trying to keep straight the role of proto as a dispatcher from its role as an "only"
23:50 TimToady in any case, if there were a word, it would be something more like "firstsame"
23:51 TimToady since the point is that it is setting up a dispatcher, not twiddling an existing one
23:52 TimToady but mostly, I just want to be able to write {*}
23:52 lue rakudo: my @a; @a[0..5] = 2; say @a
23:52 p6eval rakudo c80319: OUTPUT«2Any()Any()Any()Any()Any()␤»
23:52 lue rakudo: my @a; @a[0..5] «=« 2; say @a
23:52 p6eval rakudo c80319: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in 'hyper' at line 204:CORE.setting␤  in 'hyper' at line 211:CORE.setting␤  in main program body at line 1␤»
23:52 lue rakudo: my @a; @a[0..5] »=» 2; say @a
23:52 p6eval rakudo c80319: OUTPUT«Cannot modify readonly value␤  in '&infix:<=>' at line 1␤  in 'hyper' at line 204:CORE.setting␤  in 'hyper' at line 211:CORE.setting␤  in main program body at line 1␤»
23:53 lue *sob*
23:53 ash_ slices don't work yet
23:53 TimToady rakudo doesn't know how to turn a slice into an lvalue et
23:53 Tene rakudo: my @a; @a[0..5] = 2 xx *; say @a.perl;
23:53 ash_ NYI
23:53 p6eval rakudo c80319: OUTPUT«[2, 2, 2, 2, 2, 2]␤»
23:53 TimToady *yet
23:53 TimToady at least, not with a metaop...
23:54 lue every line of actual coding I type, I find more stuff that doesn't work. :D
23:55 Psyche^ joined #perl6
23:57 sorear TimToady: how do proto regexes work now?
23:59 [Coke] lue - if the channel isn't timed right,there's always perl6-lang

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

Perl 6 | Reference Documentation | Rakudo