Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2010-03-16

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:01 * diakopter can't wait for the appearance of the first #perl6 groupie who was born *after* Perl 6 was announced
00:01 colomon jnthn: will be ready to bug you a bit for help with Xop and Zop in ten or so minutes.  will that work for you?
00:01 diakopter (referring to the punch card talk above)
00:02 jnthn colomon: I think I'll still be op then. :-)
00:02 colomon \o/
00:03 TimToady hey, Fortran was proposed before I was born (barely)
00:04 sorear I'm about 7 years older than P6
00:04 payload joined #perl6
00:05 TimToady std: 1,2 Z+ 2,3 Z* 3,4
00:05 p6eval std 30094: OUTPUT«[31m===[0mSORRY![31m===[0m␤"Z+" and "Z*" are non-associative and require parens at /tmp/DBhrMGvayU line 1:␤------> [32m1,2 Z+ 2,3 Z* [33m⏏[31m3,4[0m␤FAILED 00:01 108m␤»
00:05 TimToady that's probably adequate for now
00:05 rv2733 joined #perl6
00:05 jnthn Aye. It's conservative.
00:06 TimToady and parens don't hurt semantically, I think
00:08 TimToady std: 1,2 Z+ 2,3 Z+ 3,4
00:08 p6eval std 30094: OUTPUT«ok 00:01 106m␤»
00:08 TimToady and that still is list associative
00:10 eternaleye joined #perl6
00:13 colomon okay, officially on a break from $work.
00:15 pugssvn r30095 | lwall++ | [S03] take conservative approach to differing X or Z metaops for now
00:15 jnthn :-)
00:15 jnthn Officially appreciating Erdinger.
00:24 yinyin joined #perl6
00:25 colomon > zipwith(&infix:<~>, 'a'..'c', 2..4).eager.perl.say
00:25 colomon ("a2", "b3", "c4")
00:26 colomon Not quite the same syntax as TimToady suggested, but I think this will do for a first step.
00:26 colomon > crosswith(&infix:<~>, 'a'..'c', 2..4).eager.perl.say
00:26 colomon ("a2", "a3", "a4", "b2", "b3", "b4", "c2", "c3", "c4")
00:26 TimToady well, except for the need to () any comma lists in the absense of ; lists
00:27 sorear &sub is a self-evaluating form?
00:27 colomon but that's only an issue if you're calling it as a sub, yes?
00:28 jnthn sorear: It means "give me the sub oeject" rather than calling it.
00:28 sorear yes
00:28 sorear that's what I meant
00:28 TimToady it's a noun marker
00:28 jnthn noun my verb!
00:28 * colomon is going to have to understand how ; works in argument lists sometime... is it implemented in rakudo yet?
00:29 jnthn No
00:29 jnthn We do ne have slicels.
00:29 jnthn It's a bit...complicated.
00:29 colomon Then I think my keep-it-simple instincts are on track here.  :)
00:29 jnthn Maybe.
00:29 jnthn :-)
00:29 jnthn Yes, keep it simple is good.
00:30 sorear what does ; do anyway
00:30 TimToady allows you to send in multiple parcel lists without lots of extra parens
00:31 TimToady primarily for multi-dimensional subscripting
00:31 yinyin joined #perl6
00:31 TimToady so @a[1,2; 3,4; 5,6] is equiv to @a[(1,2),(3,4),(5,6)]
00:32 TimToady except not
00:32 TimToady you'd have to write @a[ slice (1,2),(3,4),(5,6) ] or some such
00:33 TimToady since by default [] supplies a flattening context
00:35 TimToady also used for things like zip(1,2; 3,4; 5,6)
00:43 colomon oh blast, parsing issues.
00:43 colomon > say (1, 3 X- 4, 1).eager.perl
00:43 colomon ((1, -4), (1, 1), (3, -4), (3, 1))
00:46 TimToady STD currently forces that with a lookahead to \S, making it a longer token than X, but even if we didn't, infix:<X> is later, which should break the tie in favor of the metaop
00:48 colomon huh.  we've definitely got infix:<X> later.
00:48 TimToady rakudo doesn't really do LTM right yet
00:48 colomon I thought STD didn't have infix:<X>?  Or has that changed since this morning?
00:48 TimToady yes :)
00:48 TimToady because I want &infix:<X> to be meaningful
00:49 TimToady well, it might work anyway, but doesn't hurt to have it there for now
00:50 TimToady assuming one could write &infix:<RRRRRleg> and get something
00:50 jnthn Does that need to work? :-/
00:50 jnthn colomon: Maybe try to do the same \S lookahead forcing-it trick that STD does.
00:51 colomon rakudo: 1 RRRRRRRRleg 2; say &infix<RRRRRleg>(3, 4)
00:51 p6eval rakudo 1c75cf: OUTPUT«Could not find non-existent sub &infix␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
00:51 TimToady not sure rakudo pays attention to non-literals for its current LTM
00:51 colomon rakudo: 1 RRRRRRRRleg 2; say &infix:<RRRRRleg>(3, 4)
00:51 p6eval rakudo 1c75cf: OUTPUT«1␤»
00:52 colomon I removed infix:<X> altogether, now I get
00:52 colomon >  say (1, 3 X- 4, 1).eager.perl
00:52 colomon Could not find non-existent sub crosswith
00:52 colomon I'm trying to call it with
00:52 colomon make PAST::Op.new( :name("crosswith"), :pasttype('call'), $base_opsub );
00:52 jnthn colomon: &crosswith
00:52 jnthn If you defined it in Perl 6
00:52 colomon I realize $base_opsub probably needs magic to convert...
00:52 colomon ooo.
00:53 jnthn wtfiblogged! http://use.perl.org/~JonathanWorthington/journal/40247
00:55 colomon so, as long as that's re-compiling, how do I go from the string "&infix:<+>" (say) to a reference to the actual function, in Actions.pm?
00:56 jnthn For now
00:56 jnthn PAST::Var.new( :name("&infix:<+>"), :scope('package') )
00:56 jnthn (in the future they should probably be lexical and imported...but the above is what works now).
00:57 colomon jnthn++
00:57 cotto joined #perl6
01:00 colomon come on, compile faster!
01:02 jnthn Yeah, it suddenly feels slower of late. :-/
01:02 colomon crazy people keep on adding routines for it to compile!
01:03 colomon > say (1, 3 X- 4, 1).eager.perl
01:03 colomon (-3, 0, -1, 2)
01:03 colomon > say (1, 3 X~ 4, 1).eager.perl
01:03 lue hello!
01:03 colomon ("14", "11", "34", "31")
01:03 colomon o/
01:04 lue If it compiles on my system in decent time, then it's optimized. :)
01:04 jnthn colomon: \o/
01:04 colomon lue: I hate to say it, but there's a decent chance that if it compiles on your system in decent time, then it's lobotimized.  :)
01:05 dual joined #perl6
01:06 colomon jnthn: now compiling with Zop enabled.
01:06 TimToady .oO(Zop! Pow! Bang!)
01:07 jnthn :-D
01:07 lue .oO(It's SpecificationMan!)
01:09 TimToady if we really want to confuse everyone, we should define an op named infix:<op>
01:10 lue rakudo: say 3 op 4
01:10 p6eval rakudo 1c75cf: OUTPUT«Confused at line 11, near "say 3 op 4"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
01:10 TimToady which curries the arguments while leaving the actual base function unspecified
01:11 TimToady (3 op 4)(&[+])  :)
01:11 colomon > say (1, 3 Z, 4, 1).eager.perl
01:11 colomon ((1, 4), (3, 1))
01:11 snarkyboojum joined #perl6
01:11 lue rakudo: say oop 34 # should turn 34 into the name of an empty class
01:11 p6eval rakudo 1c75cf: OUTPUT«Could not find non-existent sub &oop␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
01:11 colomon > say (1, 3 Z* 4, 1).eager.perl
01:11 colomon (4, 3)
01:12 lue rakudo: say ((3 op 4)(&[+]))
01:12 p6eval rakudo 1c75cf: OUTPUT«Confused at line 11, near "say ((3 op"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
01:12 snarkyboojum colomon: total w00tness
01:12 lue rakudo: say "I work"
01:12 p6eval rakudo 1c75cf: OUTPUT«I work␤»
01:12 colomon > say (1..* Z, 'a'..*).batch(10).perl
01:12 colomon ((1, "a"), (2, "b"), (3, "c"), (4, "d"), (5, "e"), (6, "f"), (7, "g"), (8, "h"), (9, "i"), (10, "j"))
01:13 TimToady \o/
01:13 colomon > say (1..* Z~ 'a'..*).batch(10).perl
01:13 colomon ("1a", "2b", "3c", "4d", "5e", "6f", "7g", "8h", "9i", "10j")
01:13 snarkyboojum colomon: o/
01:13 colomon There are still parser issues to work out, but the basic functionality is there.  :)
01:14 lue ō\ we salute you, colomon \o/ \o/ \o/
01:14 TimToady HOP HOP HOP
01:14 jnthn :-)
01:14 * jnthn is going to HOP off to bed in a moment
01:14 colomon It was actually kind of disturbingly easy.  (I know I said that this morning, but still try.)  jnthn++ and TimToady++ for a lot a solid ideas in there...
01:14 jnthn colomon: Any more questions before I go?
01:14 colomon I think the magic incantation you gave me back there was all I need.
01:15 colomon thank you!
01:15 mikehh joined #perl6
01:15 kcwu joined #perl6
01:15 jnthn \o/
01:16 TimToady |o|   # touchdown
01:17 lue \o\ \o\ \o/ hooray! \o/ /o/ /o/
01:17 lue rakudo: say 3++
01:17 p6eval rakudo 1c75cf: OUTPUT«Cannot assign to readonly value␤current instr.: '&die' pc 16934 (src/builtins/Junction.pir:399)␤»
01:20 snarkyboojum imagine what it'd be like if everyone really started raising their hands when someone built/commited something cool (think of a room in a hackathon) - would be quite amusing I'd say
01:20 jnthn The Perl 6 wave!
01:20 * jnthn slurps a tiny bit of slivovica for his cold
01:21 lue The Perl 6 cold & flu medicine!
01:24 jnthn OK, sleepies. Night all o/
01:24 colomon > say (1, 3 ZR- 10, 20).eager.perl
01:24 colomon (9, 17)
01:24 colomon just in case anyone was wondering....
01:24 colomon jnthn: night.
01:24 TimToady I was :)
01:25 jnthn oh my, that's awesome
01:25 colomon the converse is less than awesome:
01:25 colomon > say (1, 3 RZ- 10, 20).eager.perl
01:25 colomon Null PMC access in invoke()
01:25 jnthn aww
01:25 jnthn ok, really sleeping!
01:25 jnthn o/
01:25 colomon \o
01:25 TimToady o/
01:26 lue \o
01:28 lichtkind o/
01:28 lichtkind good night
01:29 * lue is trying to prove the probability of winning $1M in Deal or No Deal (when you don't ever take the deal) is 1/26
01:33 diakopter o|
01:34 lue hello!
01:34 diakopter o|o
01:35 diakopter oo|
01:35 diakopter o/_o
01:35 lue oop
01:37 * colomon feels kind of silly that he only just now worked out what the S in question was.
01:38 cotto joined #perl6
01:39 lue it's the fourth letter :P
01:40 colomon It's the first letter, actually.  ;)
01:41 lue Q-U-E-*S*-T-I-O-N pretty sure it's number 4.
01:42 colomon \S is the regex for "non-space", so if you ran it against question, it would be q, number 1.
01:42 colomon That's what I was missing -- I thought \S was some fancy code, but it's just basic old-fashioned Perl.
01:44 justatheory joined #perl6
01:46 colomon TimToady: tell me you didn't already add tests for X and Z...
01:46 colomon :)
01:46 TimToady I just work here.
01:47 sjohnson he also knows a thing or two about perl!
01:48 lue And he has the power to cause the equivalent of Noah's Ark's flood!
01:48 * colomon is crossing his fingers that the <?before S> thing works in Rakudo...
01:50 lue what does \S mean?
01:50 TimToady not \s
01:52 sjohnson translation:  means matches anything \s DOESN'T match
01:52 sjohnson ie, matches non-space
01:53 lue speaking of matching, have any other file-test operators been added/improved?
01:55 colomon lue: a few.
01:55 lue \o/
01:55 colomon still plenty of them to do.
01:57 lue had the file size file-test been improved upon for ~~ ?
01:57 lue I remember it doing funny things...
01:57 colomon The spec changed.  It returns true or false for ~~.
01:58 colomon you have to call it directly to get the size.
01:58 colomon and it's named .s again.
01:58 lue easier for us then :)
01:58 lue what use would boolean be for size?
01:59 colomon it's now considered "non-empty".
01:59 colomon :z got axed as a result.
02:00 colomon Really, it was a spec bloodbath.
02:00 colomon all triggered by your implementation.
02:00 lue YES!!!! I CAUSED A BLOODBATH! (oh wait, that's not good...)
02:01 colomon no, it's good.  that's how we make progress.
02:01 lue So 0=empty, 1=not-empty [?]
02:01 lue (the blood better not be literal)
02:02 * lue --mode="tv" --target="mystery_diagnosis" &
02:02 colomon rakudo: say "/etc/passwd" ~~ :s
02:02 p6eval rakudo 1c75cf: OUTPUT«1␤»
02:02 colomon rakudo: say "/etc/pasdsdafa" ~~ :s
02:02 p6eval rakudo 1c75cf: OUTPUT«0␤»
02:02 colomon rakudo: say "/etc/passwd".s
02:02 p6eval rakudo 1c75cf: OUTPUT«813␤»
02:03 colomon This still isn't quite to spec.  The spec talks about something called IO in there.  But I've no idea how to make that work...
02:03 colomon (ie it should be "/etc/passwd".IO.s)
02:16 pugssvn r30096 | colomon++ | [t/spec] Refudge for Rakudo without infix:<Z>.
02:28 fda314925 joined #perl6
02:28 rv2733 joined #perl6
02:33 colomon S32-str/uc.rakudo..................................perl6(10389) malloc: *** error for object 0x4500200: non-page-aligned, non-allocated pointer being freed
02:33 colomon *** set a breakpoint in malloc_error_break to debug
02:33 colomon perl6(10389) malloc: *** error for object 0x33cfb20: Non-aligned pointer being freed (2)
02:33 colomon *** set a breakpoint in malloc_error_break to debug
02:34 colomon ugh
02:35 colomon works fine when I run it alone.  indeed, with TODO passes.   :\
02:40 dalek rakudo: 2f19219 | (Solomon Foster)++ | src/ (3 files):
02:40 dalek rakudo: Rough but working implementations of Xop and Zop.  (Had to disable X and Z to make this work, alas, but I'm sure we'll work around that shortly.)
02:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/2f19219e06a3d22a8a2939cac3ee7230ae798f27
02:40 dalek rakudo: 366b529 | (Solomon Foster)++ | build/Makefile.in:
02:40 dalek rakudo: Add metaops.pm to the build.
02:40 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/366b529dbbb9c25020f801fba4b91a01081d09fd
02:46 pugssvn r30097 | colomon++ | [t/spec] Fudge heavily to get some of the cross-metaop tests running in Rakudo.
02:49 ShaneC joined #perl6
02:50 snarkyboojum joined #perl6
03:02 colomon rakudo: say (2, 2 ... *).batch(10).perl
03:02 p6eval rakudo 1c75cf: OUTPUT«(2, 2, 2, 2, 2, 2, 2, 2, 2, 2)␤»
03:05 pugssvn r30098 | colomon++ | [t/spec] Create zip-metaop.t to test the new Zop.
03:08 dalek rakudo: f676705 | (Solomon Foster)++ | t/spectest.data:
03:08 dalek rakudo: Turn on S03-operators/cross-metaop.t, add new S03-operators/zip-metaop.t.
03:08 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/f6767053e34aed09734a39e549d61dd9831a72b5
03:08 * lue --return
03:12 astrojp left #perl6
03:18 quietfanatic alpha: sub infix:<op> ($a, $b) {return {$_.($a, $b)}}; say (3 op 4).(&infix:<+>)
03:18 p6eval alpha 30e0ed: OUTPUT«7␤»
03:26 TimToady ^_^
03:28 lue are you happy timtoady?
03:44 lue afk
03:45 Tene sorry guys, today fell apart.  I'm sleeping shortly.  I'll try again tomorrow.
03:47 quietfanatic joined #perl6
03:50 sorear what?
03:50 Tene sorear: I was going to work on HLL interop, and then life got in the way again.
03:53 sorear define 'work on HLL interop'
03:53 sorear have you by any chance seen my proposed changes to PDD-31/S21
03:54 sorear (I haven't really been talking about them because I'm not certain they'll work; I want to get blizkost closer to working before I do a formal specification change request)
03:55 Tene sorear: I haven't.
03:56 maerlinian joined #perl6
04:02 sorear Tene: what part of HLL stuff are you doing?
04:03 Tene sorear: I need to get the API for HLL library loading etc. worked out and implemented.
04:03 Tene I did the majority of it months back, and got stuff like defining a class in Perl 6 and subclassing it in Ruby and instantiating it in scheme working.
04:03 sorear ooh
04:03 Tene It's kinda bitrotted since then, there was a new API proposal, etc.
04:04 sorear new API proposal?
04:04 sorear I've got a rather simple proposed API addition which I'm using in the blizkost plan
04:05 Tene I would love to look at it.
04:10 sorear I'm adding two optional named parameters to get_exports which control PMC munging for languages that need it
04:10 sorear munge => Hash, munge_default => Any
04:10 sorear will be strings in most cases
04:11 sorear there's an example in context in http://github.com/jnthn/blizkost/raw/9fb04584c860658791365a645348a7de4d7cd100/docs/SEMANTICS
04:11 Tene I'll read that tomorrow.
04:11 Tene Any other documents I should queue up?
04:11 sorear no
04:12 sorear I've been not working very efficently
04:12 Tene OK, thanks. :)
04:12 Tene I'll let you know.
04:12 sorear too many shiny things, I keep distracting myself
04:12 Tene I know the feeling.
04:12 sorear it's hard being a magpie in #perl6
04:33 mantovani joined #perl6
04:47 justatheory joined #perl6
05:15 pugssvn r30099 | lwall++ | [viv] unbitrot the --p6 option, can now reproduce STD.pm exactly
05:28 pugssvn r30100 | lwall++ | [zip-metaop.t] Z+ and ... are non-associative, so use parens to avoid parsefail
05:30 TimToady std: 1..* Z+ 3, 2 ... *
05:31 TimToady er, hello, evalbot?
05:31 p6eval std 30098: OUTPUT«[31m===[0mSORRY![31m===[0m␤"Z+" and "..." are non-associative and require parens at /tmp/QvAVH8xnbs line 1:␤------> [32m1..* Z+ 3, 2 ... [33m⏏[31m*[0m␤FAILED 00:01 108m␤»
05:32 TimToady colomon: ^^
05:36 sorear I'm not sure whether to love or hate zavolaj's export mechanism
05:37 sorear it uses block scope for the module, then declares the stuff it wants to export as 'our' in the default package
05:39 ShaneC joined #perl6
05:46 TimToady that's more or less how it's supposed to work, though the default package itself might be a lexical package, not under GLOBAL::
05:48 TimToady I believe STD puts EXPORT::DEFAULT:: as lexically scoped packages, actually
05:50 sorear TimToady: but doesn't that make module Other;  use NativeCall;  fail?
05:50 TimToady the importer has to be aware of the structure, of course
05:51 sorear it seems to me like the most correct way would be to inject symbols into the caller's lexical scope
05:51 TimToady STD pulls in a module's symbol table from a .syml file, and knows to look down into EXPORT::
05:51 sorear not GLOBAL
05:52 TimToady that's what it does
05:52 TimToady our has nothing to do with GLOBAL, really
05:52 TimToady unless the current package happens to be stored under GLOBAL
05:52 TimToady and imports all default to lexial
05:52 TimToady *ical
05:53 sorear Zavolaj's NativeCall.pm looks like: #( no file-scoped module declaration here! ) class PrivateThingy1 { ... } class Thing2 {... } sub exported {...}
05:53 sorear what happens if I say 'use NativeCall;', if it is not "inject symbols into GLOBAL"?
05:54 TimToady import is supposed to be lexical.  rakudo still cheat all over the place in a p5-ish way
05:54 TimToady *cheats
05:55 TimToady it keeps lots of things in packages that are supposed to be lexical
05:55 sorear moreover, if I say: "module User; use NativeCall;" - do the symbols go into GLOBAL or User/
05:55 TimToady neither
05:55 TimToady !!!
05:55 sorear given that NativeCall doesn't actually export anything, it just declares package-scope subs outside a package
05:55 TimToady they go into the the current lexical scope by default
05:56 TimToady according to spec
05:56 TimToady not according to rakudo
05:56 lue goodnight
05:57 TimToady o/
05:57 TimToady rakudo still looks for functions in packages, which hasn't been in the spec for years.
05:57 sorear the spec also says that you need to use traits to export
05:58 TimToady it's just sugar for putting a link into EXPORT::
05:58 TimToady this is specced
05:58 TimToady S11:87
05:59 TimToady and note that EXPORT is a lexical package, as if you'd said 'my module EXPORT'
06:00 TimToady that's how STD does it; I doubt rakudo does
06:00 TimToady (yet)
06:00 sorear it doesn't use EXPORT:: either; it just happens to monkey symbols into GLOBAL:: where the main program happens to find them
06:00 sorear this is either disgusting code, or code I don't understand at all
06:00 TimToady the design is to avoid GLOBAL, but rakudo is designed around parrot, which was designed around P5-Think
06:01 TimToady with the way STD does it, almost nothing ends up in GLOBAL unless it is explicitly put there
06:02 TimToady I doubt they'll fix this before Rakudo *, but you never know
06:02 sorear S11:46: At the start of any file, the current namespace is GLOBAL
06:03 TimToady sure, so 'our' in that spot is how you put stuff into GLOBAL:: if you want
06:03 TimToady but mostly we don't want
06:04 sorear I was looking for examples of trait exportation and the one I found worked that way
06:04 sorear putting them in GLOBAL
06:05 TimToady well, if you look in src/perl6/syml/*.syml after making STD, you'll find almost no references to GLOBAL except for the top level package names
06:06 TimToady almost everything is done lexically, including exports
06:06 TimToady and imports
06:07 am0c joined #perl6
06:08 TimToady rakudo is still in the P5 age here; they've borrowed a lot of the parser, but haven't actually managed to borrow much of the symbol table structure yet, mostly due to parrot limitations
06:09 TimToady they also haven't really done settings right yet either as outer lexical scopes
06:13 TimToady std: CORE::pi
06:13 p6eval std 30100: OUTPUT«ok 00:01 107m␤»
06:13 TimToady std: SETTING::pi
06:13 p6eval std 30100: OUTPUT«ok 00:01 105m␤»
06:13 TimToady std: UNIT::OUTER::pi
06:13 p6eval std 30100: OUTPUT«ok 00:01 105m␤»
06:13 sorear I get the impression you're not terribly happy with the direction things are going
06:14 TimToady they're going the right direction in most ways, but some things are (of necessity) on the back burner
06:15 TimToady I just hope people won't rely too heavily on the ways rakudo * will do it wrong.
06:15 TimToady std: UNIT::OUTER::nonesuch
06:15 p6eval std 30100: OUTPUT«Undeclared name:␤      'UNIT::OUTER::nonesuch' used at line 1␤ok 00:02 105m␤»
06:16 TimToady rakudo: say CORE::pi
06:16 p6eval rakudo f67670: OUTPUT«Null PMC access in invoke()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
06:16 TimToady rakudo: say pi
06:16 p6eval rakudo f67670: OUTPUT«3.14159265358979␤»
06:17 TimToady rakudo: say Num::pi
06:17 p6eval rakudo f67670: OUTPUT«Null PMC access in invoke()␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
06:17 TimToady rakudo: say SETTING === CORE
06:17 p6eval rakudo f67670: OUTPUT«Could not find non-existent sub &SETTING␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
06:19 sorear rakudo: say CORE
06:19 p6eval rakudo f67670: OUTPUT«Could not find non-existent sub &CORE␤current instr.: '_block14' pc 29 (EVAL_1:0)␤»
06:19 TimToady rakudo is still basically stuck in prelude semantics rather than setting semantics
06:22 UjinT34 joined #perl6
06:24 pugssvn r30101 | colomon++ | [t/spec] Improve descriptions for zip-metaop tests a bit.
06:24 colomon TimToady: thanks for the fix.
06:25 TimToady np
06:35 TimToady std: say UNIT::OUTER::Num::pi
06:35 p6eval std 30101: OUTPUT«ok 00:01 107m␤»
06:37 TimToady sleep &
06:38 doublec joined #perl6
06:56 kaare joined #perl6
07:03 Su-Shee joined #perl6
07:09 ShaneC joined #perl6
07:22 jhuni I have been wondering what happened to reduction ops (eg [+]) in rakudo?
07:22 jhuni rakudo: say [+] ^5;
07:22 p6eval rakudo f67670: OUTPUT«Confused at line 11, near "say [+] ^5"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
07:23 brushie__ joined #perl6
07:23 sorear rakudo: say ^5
07:23 p6eval rakudo f67670: OUTPUT«01234␤»
07:23 sorear rakudo: say [+] (^5)
07:23 p6eval rakudo f67670: OUTPUT«Confused at line 11, near "say [+] (^"␤current instr.: 'perl6;HLL;Grammar;panic' pc 500 (ext/nqp-rx/src/stage0/HLL-s0.pir:328)␤»
07:24 colomon jhuni: There was a major rewrite of Rakudo a few months back.  Some of the metaoperators like [+] have not been added back in yet.
07:24 colomon I'm actually kind of hoping to get to that today.  :)
07:24 colomon rakudo: say (^5).reduce(&infix:<+>)
07:24 p6eval rakudo f67670: OUTPUT«Method 'count' not found for invocant of class 'Perl6MultiSub'␤current instr.: 'perl6;Any;reduce' pc 296719 (src/gen/core.pir:21673)␤»
07:25 colomon hmmm....
07:26 colomon jnthn: help? (when you wake up...)
07:26 colomon rakudo: say (^5).reduce(*+*)
07:26 p6eval rakudo f67670: OUTPUT«10␤»
07:26 Bzek joined #perl6
07:26 jhuni colomon: I look forward to using reduction ops in the future
07:26 jhuni =/
07:26 colomon jhuni: me too.  :)
07:46 vamped joined #perl6
08:00 barney joined #perl6
08:00 jferrero joined #perl6
08:03 dakkar joined #perl6
08:13 iblechbot joined #perl6
08:26 meppl joined #perl6
08:27 cls_bsd joined #perl6
08:33 sorear R* is basically just the normal Apr10 monthly, yes?
08:33 IllvilJa jnthn: Welcome to Sweden!  Good luck refactoring your life!
08:33 nsh joined #perl6
08:35 sorear jnthn: Is there any particular reason why Blizkost inherits from PCT::HLLCompiler?  As far as I can tell, we aren't actually using any of its features, and it's just one more piece of software for me to understand
08:39 rv2733 joined #perl6
08:47 stepnem joined #perl6
08:48 M_o_C joined #perl6
08:54 mssm joined #perl6
08:54 quester joined #perl6
09:00 cosimo joined #perl6
09:08 iblechbot joined #perl6
09:11 vamped sorear still there?
09:13 sorear yes
09:13 sorear ?
09:15 vamped last I heard, Rakudo * is NOT the regular April montly release. Also April's release is 4/23 (see rakudo/docs/release_guide.pod). pmichaud stated goal of releasing R* a week following the monthly release: ~29th
09:20 agentzh joined #perl6
09:20 quester Good evening, or the local time of your choice...
09:21 vamped sorear: disclaimer: that news is a couple of weeks old, and I have not read every line of backlog.
09:21 vamped o/ quester
09:21 quester \0 vamped
09:23 jnthn morning
09:24 jnthn No, Rakudo * will not just be regular April release.
09:24 jnthn IllvilJa: Thanks! :-)
09:24 vamped oh - i must'v missed a discussion. good thing I disclaimered :p
09:25 jnthn vamped: Huh? I was agreeing with you.
09:25 jnthn I think...
09:25 * jnthn needs coffee
09:25 vamped lol - misread. i, perhaps, need bed.
09:26 jnthn sorear: We inherit from that in order to implement the standard HLL compiler interface, so language interop works. But that may be a little out of date now.
09:27 sorear Well, except for the minor nit that we override every single method
09:28 * sorear is currently trying to figure out if he can safely rm -ffff src/pmc/p5invocation.pmc
09:28 jnthn erm
09:28 jnthn Given that's the thing that handles arg marshalling
09:29 jnthn Then probably not unless you replaced that.
09:29 sorear I want to do arg marshalling at the PIR level
09:29 sorear I still mostly don't understand what I'm doing here, though
09:30 sorear currently figuring out how p5invocation is even used
09:30 jnthn oh
09:30 jnthn OK, you've missed something important.
09:30 sorear missed?  or never saw?
09:31 jnthn It handles marshalling in terms of, going from Parrot's call sig to Perl 5's stack based model
09:31 jnthn In Parrot, method invocation is a two step process
09:31 jnthn 1) find_method gives back something invokable
09:31 jnthn 2) You invoke it with arguments
09:31 jnthn Those two can be as far apart as you like.
09:31 sorear Oh.
09:31 sorear And p5invocation is the Callable that you return from #1?
09:32 jnthn Right.
09:32 sorear Is the return value of find_method bound to the invocant, or does it take $self as an argument?
09:32 jnthn And on invoke it takes the args from the Parrot data structure that contains them and sticks 'em on the Perl 5 stack.
09:32 jnthn The latter, iirc.
09:33 sorear I'd like to share as much code as possible between method invocation and sub calls
09:34 sorear since in p5 $foo->meth() is just UNIVERSAL::can($foo, 'meth')->($foo)
09:34 jnthn *nod*
09:34 jnthn Makes sense to do that.
09:34 jnthn I don't think Blizkost as I had it ever got so far as sub calls.
09:34 jnthn Only method calls.
09:35 jnthn Either way, I expect you'll need *something* to do the C-level work of taking args from the Parrot call_sig - even if they have been nicely wrapped - and putting them on the Perl 5 stack.
09:35 sorear yes
09:36 sorear not sure exactly what or where yet
09:36 jnthn So even if you rename it / do it different, the code in P5Invocation is probably kinda useful in that sense. :-)
09:40 jnthn TimToady, sorear: Rakudo got supprot for lexical import recently, fwiw. It's the default now. use Test lexically imports plan, etc.
09:41 jnthn Just haven't worked out all the kinks yet.
09:41 jnthn Nor have we really got the notion of "lexical packages" laid down.
09:41 jnthn (Got a good idea of how to do those though.)
09:43 sorear jnthn: Is it sensical for an invocation object to be a closure?
09:43 sorear as opposed to a custom PMC
09:43 jnthn It can be
09:43 jnthn As long as it supports the invoke vtable method, it should work.
09:43 sorear so what I'm thinking I'll do for the immediate term is
09:44 sorear 1. merge p5{scalar,hash,array,sub} into p5sv and implement methods for the basic interesting operations, including call (which takes only p5sv arguments)
09:45 sorear 2. write a get_exports method which wraps svs into Parrot objects; invocations are simply closures that wrap and forward to call
09:45 sorear ->tomorrow
09:46 sorear unrelatedly: Zavolaj's export mechanism is ... weird.  Is it really supposed to be exporting traits into GLOBAL instead of CALLER?
09:50 vamped i'm suggesting that it would be clearer to have types named: Int32, Int64, etc rather than bigint, verybigint.
09:51 sorear vamped: who are you talking to?
09:51 vamped what happens down the road when int's need to get bigger, and the names "big" and "verybig" are already used up?
09:51 * sorear pokes jnthn
09:51 jnthn The intermediate term plan sounds pretty good. :-)
09:51 vamped anyone who wan't to listen
09:51 jnthn vamped: See S09 - it specs a whole bunch of types named like that
09:52 vamped k. i'll look. maybe it's addressed there.
09:52 jnthn sorear: And yes, Zavolaj is written the way it is because of the way various things are in Rakudo at the moment.
09:52 jnthn It pre-dates *any* lexical import support, which only landed last week.
09:52 sorear exporting traits in a non-head-explodey way isn't implemented?
09:52 jnthn *sigh*
09:52 sorear wasn't
09:52 sorear sorry
09:53 Trashlord joined #perl6
09:53 sorear (maybe I should sleep, if I'm making others *sigh*)
09:53 jnthn Yeah, welcome to live as a Perl 6 implementor
09:53 Trashlord just execute sleep(8hours) and you'll be fine
09:54 jnthn Doesn't matter how much your haul ass to deal with stuff one bunch of people think matters, you've still got another bunch whining about their pet thing.
09:54 sorear I think this is what "patches welcome" was invented for
09:54 * sorear off
09:55 jnthn Aye
09:55 jnthn sorear: Anyway, see you...sleep well :-)
09:57 * vamped thinks he's read S09 before, and then tried to come up with a good idea that already existed
09:58 jnthn :-)
10:02 masak joined #perl6
10:02 masak oh hai, #perl6
10:03 jnthn morning, masak
10:05 masak god morgon, jnthn. how's the cold developing?
10:06 jnthn For the first time, it actually feels like it might be in the early stages of going away.
10:06 jnthn If I'd been able to sleep well the last couple of nights, it may be doing better.
10:06 jnthn And yours?
10:06 masak it sounds like my cold is one or two days ahead of yours.
10:06 masak you have some nice improvements to look forward to :)
10:07 masak (and yes, sleep definitely helps)
10:07 jnthn :-)
10:07 jnthn Yeah, I think partly being blocked up doesn't help.
10:08 jnthn (with sleeping)
10:08 masak right.
10:08 jnthn Though think partly I'm just still getting used to my new surroundings too.
10:08 masak nod.
10:09 jnthn ooh, excitingly I now officialy exist in Sweden. :-)
10:09 * jnthn has a personnummer :-)
10:09 masak congratulations :)
10:09 masak that's a big step in the life as a Swede. :)
10:10 jnthn Yes, I was rather taken aback when attempting to order a couple of books online at the weekend...and failing because the site wanted my personnummer!
10:10 * masak .oO( well, obviousl... oh wait )
10:11 jnthn :-)
10:11 jnthn Not obvious compared to anywhere else I've been. :-)
10:16 mathw that sounds unexpected
10:19 jnthn mathw: Well, in the UK you don't need any kind of ID to do most things. :-)
10:19 jnthn Or at least, most day-to-day things.
10:19 masak The social codes around this number are interesting. You're expected to leave it to bookstores, hospitals, the police etc without thinking about it. It's a public datum. But asking another person for theirs is a slight faux pas.
10:20 vamped sounds similar to the american social security number
10:20 jnthn That doesn't sound so surprising, in a sense.
10:21 masak I know the SSNs of my whole family, I think. but no-one else.
10:24 * jnthn gets the impression he's meant to memorize his personnummer
10:24 arnsholt I think it's slightly harder to hijack someone's life with a Nordic person number, compared to the SSN
10:24 masak jnthn: well, duh! :)
10:24 arnsholt jnthn: It'll happen naturally, by force of repetition =)
10:24 jnthn hehe
10:25 arnsholt At least that's what happened once I turned 18 and had to use it for all kinds of stuff =)
10:25 jnthn Yeah...in the UK, I think I used my SSN a couple of times a year...
10:25 masak arnsholt: do Norwegian personnummer look like Swedish ones?
10:25 arnsholt masak: 11 digits. Birth date and five random ones
10:26 mathw jnthn: for some reason, I know my NI number despite almost never needing it
10:26 arnsholt Middle digit of the five indicates gender. Even for f, odd for m
10:26 mathw jnthn: it's possibly because it just happens to be very easy to remember in pattern
10:26 masak arnsholt: huh. we only have 10 digits. :)
10:26 mj41 joined #perl6
10:26 jnthn Oh wow, it never occured to me that the structure of the number could imply something about me too. :-)
10:26 arnsholt masak: Huh. Any discernible data in it?
10:27 masak arnsholt: YYMMDD, for one thing.
10:27 arnsholt It's DDMMYY here ^^
10:27 jnthn oh, wow...yes.
10:27 * jnthn hadn't noticed that at all
10:27 masak arnsholt: then there's a dash or, if you're >100 years old, a plus.
10:27 jnthn Er, that makes it rather easier to remember.
10:28 arnsholt jnthn: I believe that's part of the point =D
10:28 masak arnsholt: then four digits, two of which give region of birth, one which gives the sex, and the last which is a checksum digit.
10:28 masak jnthn: *lol*
10:28 arnsholt Funky. Good idea with the dash/plus thing
10:28 jnthn .oO( From your personnummer, I can see that we have compatible star signs, you're female, and you're from a nice bit of Sweden. Let's get married! )
10:29 * jnthn had expected it was just a random sequence.
10:29 jnthn I'm impressed how much they've crammed in there. :-)
10:30 jnthn This does mean that if you know how the checksum works, and where somebody is from, and their date of birth, you can derive their personnummer though?
10:30 jnthn Or get down to a small number of possibilities?
10:31 * vamped is finally nodding of. good night (/localtime)
10:31 jnthn vamped: o/
10:31 masak probably still dozens of possibilities, I think.
10:32 vamped left #perl6
10:32 jnthn masak: ah, ok
10:32 masak jnthn: but it's a cool question: which personnummer could I have ended up with, given who I am and where I"m from?
10:32 jnthn A nice simple Perl 6 example code. :-)
10:33 masak ah! for once, the Swedish Wikipedia article is more detailed than the English-language one! :) http://sv.wikipedia.org/wiki/Personnummer_i_Sverige
10:34 masak jnthn: I could have gotten anything between 48 and 54 as the first two of my last four digits, it seems.
10:38 * jnthn tries to work out if one of those region codes means "not born in Sweden"
10:39 masak jnthn: one does. you'll find it. :)
10:40 masak but the article also says that the region system is not in use anymore. I don't know why.
10:41 jnthn Ah, OK.
10:41 masak oh! it's because there were region number overflows, people got falsely assigned the Foreigner region, and there was public dissent! cool!
10:41 jnthn Hmm. I guess if more than 10,000 people are born on the same day, they has a fail. :-)
10:42 masak also, the easy-to-guess reason was a factor.
10:42 jnthn Yeah, was gonna say...
10:43 jnthn hehe...I can see there's a high opinion of foreigners. ;-)
10:43 jnthn "Oh noes! I don't want a personnummer like one of those foreign people!"
10:43 jnthn :-)
10:43 fridim joined #perl6
10:43 masak how should I put this? :)
10:43 masak it's not xenophobia as such.
10:43 jnthn You don't have to. :-)_
10:44 masak but people probably felt at a disadvantage in job interviews and the like.
10:44 jnthn Yeah
10:44 masak treating people unfairly is one of the worst sins ever in Sweden. :P
10:45 * jnthn has been reading the "how to understand Sweden" style books he's been given
10:46 masak :)
10:46 nadim joined #perl6
10:47 mathw my Country $sweden .= new(); $sweden.^methods(:local)>>.say;
10:47 mathw what more do you need
10:47 masak mathw++
10:48 mathw do countries come with full introspection?
10:48 masak (but don't parallelize .say)
10:48 mathw but figuring out which character came from which entry is part of the fun...
10:48 jnthn I dunno, with the amount of Swedish I know at the moment, the parallelism may not make a difference to me yet. ;-)
10:48 masak :)
10:48 * jnthn may well have found himself some Swedish teacher though o/
10:49 mathw the only thing I know how to say in Swedish is rude
10:49 jnthn Teach me!
10:49 jnthn Then I'll know *not* to say it. :-)
10:49 arnsholt jnthn: So, what's your impression of Sweden, from the books? =)
10:49 mathw I don't think it's the kind of thing you can say by accident
10:54 masak as opposed to when I wanted to say CAO3 草 ("grass") to my language partner, and it came out as CAO4 肏 instead. she innocently told me she didn't know the English term, though I could tell she did.
10:54 jnthn arnsholt: Pretty positive. IIUC, avoiding conflict and valuing consensus are both important things, and I like the sound of those, so... :-)
10:54 jnthn masak: Did you ever find out what it meant?
10:54 masak jnthn: I knew it even before that.
10:54 masak jnthn: still quite embarassing. need to learn tones better. :/
10:55 arnsholt I think foreigners are allowed to struggle with the tones, but yeah it's hard
10:57 arnsholt jnthn: That sounds about right for Norway, and Sweden too I think. It fits my temperament pretty well
10:57 arnsholt masak: What does the other word mean though? O=)
10:58 masak arnsholt: I'm afraid I never learnt the English term for it... :>
10:58 jnthn arnsholt: If you put it into Google langauge... :-)
10:58 arnsholt Oh, I see ^^
10:58 jnthn ...like I did... :-)
10:58 arnsholt Good idea, and now I see
10:59 masak it's an interesting character.
10:59 arnsholt I did something similar in French once. Meant to say "baissé", said "baisé". Ooops
10:59 masak the upper part means "to enter", and the lower part means "meat".
10:59 jnthn lol!
11:00 arnsholt Heh. Nice one
11:00 masak it's not found in many dictionaries.
11:00 jnthn masak: ...so the whole meaning is to cook or something? ;-)
11:00 masak jnthn: "or something" :)
11:01 Su-Shee arnsholt: thanks to german bakery, we still think "baiser" means kissing in a friendship-like way - imagine saying innocently "baise-moi" (which I would have done twice if I didn't knew the movie..)
11:05 masak jnthn: I'm enjoying re-reading http://use.perl.org/~JonathanWorthington/journal/39772
11:06 masak jnthn: the @chips>>.dip for 1..10; line. is it guaranteed to be thread safe?
11:07 jnthn masak: Depends if your dip supports concurrent chip dipping, I guess.
11:07 masak it's an ordinary scalar dip.
11:07 masak what do we expect to happen?
11:07 hejki concurrent chip dipping sounds like eating with two hands
11:07 masak more like three hands in this example.
11:08 masak or at least three chips.
11:08 jnthn .oO( the sound of 3 hands dipping )
11:08 masak *lol*
11:09 jnthn masak: I suspect things need to be threadsafe by default to the degree that we don't crash and burn.
11:09 masak hm.
11:09 jnthn masak: But how much the built-in data types give you thread safety, I don't know.
11:09 jnthn masak: It's kinda not spec'd yet, though mostly because it's kinda not been implemented yet.
11:09 hejki masak: well like a chip between every finger
11:10 masak hejki: exactly.
11:10 cosimo joined #perl6
11:10 masak hejki: that also shows the problem that might occur.
11:10 hejki ye.. some of the chips might fall off or get uneven amount of dip compared to others
11:10 jnthn Or maybe you have a bunch of phillosiphers all having a chips and dips party.
11:10 hejki :)
11:10 masak hejki: which chip increases the dip count first? they all go down basically simultaneously.
11:10 hejki that too
11:11 jnthn ...erm, I think I spelt something rong.
11:11 masak quick, hit the undo button!
11:11 hejki feel-o cyphers
11:12 jnthn yes, but it leaves zombies
11:12 jnthn oops, wrong window
11:13 masak ETOOBIZARRE
11:14 jnthn masak: Worse, the context was Excel.
11:14 jnthn :-)
11:14 Chillance joined #perl6
11:14 * masak shudders
11:14 jnthn The VBScript code that generated the Excel was...terrifying and unmaintainable.
11:15 jnthn (yes, this is all a pile of hate :-))
11:15 jnthn One of those cases of "nobody else could figure out how to deal with the thing so it came to me"
11:24 * mathw embarks on a battle with Excel himself
11:25 jnthn mathw: Fun, ain't it.
11:25 jnthn :-/
11:30 mathw no
11:30 mathw we have this crazy template I have to use
11:30 mathw really misusing excel, actually
11:30 mathw and somebody's broken it
11:30 mathw so it's even crazier
11:33 jnthn In this case, it's "just" an excel exporter.
11:34 mathw well
11:34 jnthn Which has to be re-written because the old one did - no joke - order of magnitude 100,000 SQL queries to produce one of the data sets!
11:34 mathw that sounds pretty nasty to me
11:34 mathw ow!
11:34 mathw and you can't even blame excel for that
11:35 mathw I'm not sure there are many things at all for which it's appropriate to do 100,000 SQL queries
11:35 jnthn no, just idiotic previous developers who thought that they'd do multiple SQL queries in a tight loop...and were long gone by the time the loop hit 80,000 iterations.
11:36 jnthn (yes, that's a few * 80,000 round trips to the database!)
11:36 m6locks haha
11:40 mathw well at least by being gone, they avoid a terrible fate at your hands
11:41 jnthn Yes...lucky them.
11:41 mathw but they may be inflicting similar ills on other people
11:42 jnthn I'm not quite sure I'd know what to say aside "epic fail"
11:42 mathw how about "go back to school"?
11:42 jnthn Yeah, that too.
11:52 MAK_ joined #perl6
11:55 m6locks i was "unable" to excute tools/test_summary.pl cos it nearly killed all activity on this laptop
11:56 m6locks rx.rakudo got stuck
11:56 m6locks and this monstah perl6-process was eating 2g of memory ;P
11:56 m6locks now running spectest, it's more comfy
11:58 mathw jnthn: NativeCall looks very neat
11:58 jnthn mathw: Using it is quite neat. On the inside it needs some TLC yet.
11:59 mathw it's... remarkably short
12:00 jnthn :-)
12:00 mathw thanks to the pir:: namespace, it seems
12:00 jnthn Yes, that helps.
12:01 mathw I keep wondering when we'll be in a position where it's sensible to start looking at a GObject binding project
12:01 mathw but I think I should make masak happy by doing more on Form.pm before Rakudo *
12:01 mathw (it's also a lot easier)
12:03 envi^home joined #perl6
12:10 mathw I still love the stuff you can do with trait_mod:<is> though
12:11 mathw just replace the routine with a different one, yeah, sure...
12:15 avar left #perl6
12:16 quester left #perl6
12:20 borup mathw: a GObject binding based GObject introspection would be neat
12:20 mathw borup: that's what I thought :)
12:20 mathw best way to go about binding GTK these days I think
12:20 mathw no point trying to do it by hand
12:21 mathw okay so we only support GIR-supported versions, but I think for Perl 6 we could cope with that
12:21 borup yes no point in supporting really old versions
12:22 mathw especially not when it's hard work
12:22 jnthn I guess if you can write custom meta-classes you can make the GObject introspection just work out a lot like Perl 6 introspection too :-)
12:22 mathw plus then it extends fairly easily to anything else that has GIR
12:22 mathw yes
12:22 mathw that's the kind of way I was thinking
12:23 mathw but I must polish up Form.pm before I embark on anything
12:23 jnthn :-)
12:23 mathw because I need to actually finish something
12:23 borup I did a bit of the old Gtk2 bindings, not hard as such but work
12:23 mathw I did some stuff on the c++ bindings years ago
12:23 mathw that was fairly heavy
12:23 mathw although not as bad as it could've been
12:23 mathw anyway, time for band practice
12:25 borup gtk2-perl has some nice helper tools
12:26 cosimo joined #perl6
12:29 takadonet joined #perl6
12:29 takadonet morning everyone
12:30 colomon morning!
12:33 jnthn morning, colomon!
12:34 colomon so, are you brave enough to try to sort out how to parse infix:<X> and infix:<Z> now?  :)
12:36 colomon <?before \S> didn't help.  :(
12:41 ruoso joined #perl6
12:43 payload joined #perl6
12:43 jnthn aww :(
12:44 jnthn colomon: Just doing lunch now, then gotta do a couple of chores, but can look later :-)
12:45 colomon \o/
12:50 colomon rakudo: say ((1, 1, *+* ... *) Z~ 'a'..*).batch(20).perl
12:50 p6eval rakudo f67670: OUTPUT«("1a", "1b", "2c", "3d", "5e", "8f", "13g", "21h", "34i", "55j", "89k", "144l", "233m", "377n", "610o", "987p", "1597q", "2584r", "4181s", "6765t")␤»
12:51 colomon rakudo: say ((1, 1, *+* ... *) Z- 1..*).batch(20).perl
12:51 p6eval rakudo f67670: OUTPUT«(0, -1, -1, -1, 0, 2, 6, 13, 25, 45, 78, 132, 220, 363, 595, 971, 1580, 2566, 4162, 6745)␤»
12:51 colomon rakudo: say ((1, 1, *+* ... *) ZR- 1..*).batch(20).perl
12:51 p6eval rakudo f67670: OUTPUT«(0, 1, 1, 1, 0, -2, -6, -13, -25, -45, -78, -132, -220, -363, -595, -971, -1580, -2566, -4162, -6745)␤»
12:53 colomon rakudo: say ((1, 1, *+* ... *) ZR/ 1..*).batch(20).perl
12:53 p6eval rakudo f67670: OUTPUT«(1/1, 2/1, 3/2, 4/3, 1/1, 3/4, 7/13, 8/21, 9/34, 2/11, 11/89, 1/12, 13/233, 14/377, 3/122, 16/987, 17/1597, 9/1292, 19/4181, 4/1353)␤»
12:53 m6locks hmm t/spec/S02-builtin_data_types/sigils-and-types.rakudo fails test no. 16
13:00 colomon m6locks: test no 16 is marked TODO, no?
13:00 ignacio_ joined #perl6
13:00 colomon not ok 16 - Bag does Associative # TODO Associative role
13:07 masak rakudo: Associative
13:07 p6eval rakudo f67670:  ( no output )
13:09 m6locks colomon: i'm not sure
13:09 m6locks if it is, then its ok
13:10 colomon Hmmm... what does your system think test 16 is?
13:11 colomon make t/spec/S02-builtin_data_types/sigils-and-types.t
13:16 jnthn I think Bag is actually the one that's todo...
13:17 masak aye.
13:18 ignacio_ joined #perl6
13:18 arnsholt "Prolog is after all a simple and logical language" Badum-tish ^^
13:20 masak so is Lisp. and Smalltalk.
13:21 masak any remaining complexity stems completely from the problems you're trying to solve. solve easier problems! :P
13:30 [particle] joined #perl6
13:30 Exodist joined #perl6
13:30 jaldhar joined #perl6
13:31 * jnthn bbs - chores, stroll, systemka
13:31 iblechbot joined #perl6
13:32 colomon joined #perl6
13:32 yahooooo joined #perl6
13:35 hercynium joined #perl6
13:37 arthur-_ joined #perl6
13:48 payload joined #perl6
13:49 skeptical_p joined #perl6
13:51 dakkar joined #perl6
13:55 colomon rakudo: say (5/4, 6 Z- 4, pi)>>.round.perl
13:55 p6eval rakudo f67670: OUTPUT«(-3, 3)␤»
13:55 colomon word.
13:59 nihiliad joined #perl6
14:01 sECuRE what exactly does Z- do?
14:01 masak sECuRE: pairwise subtraction.
14:02 sECuRE ah, i see
14:02 * colomon just used [@p2 Z+ (@p1 Z- @p2)>>.round] in code and had it work properly.
14:03 arnsholt Nice!
14:03 arnsholt If a bit hard to read for the uninitiated =)
14:05 * jnthn back
14:05 jnthn Wow...scary!
14:07 masak I'm glad TimToady took the conservative road on subprecendence.
14:08 colomon masak: I'm not 100% sure I'm glad; but then, I've got most of the meta-op precedence all messed up at the moment anyway, so I'm perhaps not the best person to ask...
14:09 masak I think overall, subprecedence would have been harder to implement.
14:09 colomon hmmmm, I think tests are needed, actually.
14:09 masak being conservative in the spec basically means not having to implement an extra layer of complexity.
14:12 jnthn Well, it also makes it an error for now, meaning if we do want it later, it means making something that would have failed to compile work, rather than changing semantics.
14:13 colomon which is a good, sensible policy.
14:14 masak 'reserved for future use'.
14:14 * colomon wants to work on [op] so bad it almost hurts, but has oodles of $work and no freaking idea how to make the grammar handle [op]...
14:15 masak work on [$work], then! :P
14:16 colomon though just for reference...  [@p2 Z+ (@p1 Z- @p2)>>.round]  was for $work.  ;)
14:20 masak \o/
14:21 payload joined #perl6
14:27 arthur-_ joined #perl6
14:29 TimToady colomon: I hope you only wanted to round what was in the parens
14:29 colomon TimToady: yes!
14:30 TimToady oh, yes, I see you used @p2 twice
14:30 TimToady ENOCAFFEINE
14:31 colomon hyper-ops might have been more appropriate for that code, but we don't have them yet in Rakudo, and zip-ops did the job quite nicely.
14:33 daemon joined #perl6
14:37 TimToady masak: actually, subprecedence would be trivial to implement; there is a hard design issue in deciding how Xop relates to X though
14:38 TimToady are they all looser? tighter?  do they match at X, or some other Xop?
14:38 masak TimToady: ok.
14:39 TimToady but generating the new precedence is just taking list infix precedence, f=, and gluing it together with the subprecedence to get f=t= or some such
14:39 TimToady string comparison takes care of the rest
14:39 masak one thing I've long wanted to ask...
14:40 masak there are two 'types' if string comparison around.
14:40 masak they differ in what happens when the two strings match up to the length of the shortest one.
14:40 masak seems Parrot/PIR does one thing, and Perl 6 does the other.
14:40 masak I encountered that when I ported PGE to GGE.
14:41 TimToady in Perl, if the shorter one is the exact prefix of the longer, the shorter one always comes first
14:41 TimToady does parrot do the old stupid space-padding trick?
14:41 TimToady like BASIC?
14:41 masak I'm not sure, but maybe.
14:42 masak I'll do some empirical tests when time permits.
14:42 masak it does some kind of padding, because I had to do it manually in Perl 6 to make things work.
14:42 TimToady in other words, we pad with chr(0)
14:42 masak nod.
14:43 TimToady except we don't pad, we just give up if we run out of shorter string. :)
14:44 masak aye.
14:44 TimToady in fact, cmp always gives up on the first non-matching char
14:45 TimToady on precedence, I do worry from time to time that people will expect hyper-infixes to be list infix precedence
14:46 TimToady currently they track their base op's precedence, unlike Z and X
14:47 masak consider it a live experiment :)
14:47 TimToady consider that people may have to live with the consequences for 100 years
14:48 masak :-/
14:49 TimToady we still have C's botched precedence table
14:51 * masak wasn't aware it was so botched
14:52 TimToady in the neighborhood of bitwise ops, particularly
14:53 masak is that why Kernighan says never to combine those and arithmetical ops?
14:53 justatheory joined #perl6
14:53 TimToady I remember complaints about it when I started learning C  :)
14:54 masak in this video, I believe: http://video.ias.edu/stream&amp;ref=270
14:54 masak the only precedence I *know*, deep down, to be wrong is the precedence of 'instanceof' in Java...
14:57 TimToady and little things like logical not being treated very tightly as a symbolic unary
14:57 TimToady and splitting the relative comparisons from the equality
14:57 masak o.O
14:57 TimToady we had to combine those to get chaining operators in p6
14:58 masak probably for the best...
14:59 TimToady allowing = inside of ?: is also a mistake; C really parses it like ?():
14:59 TimToady it should just fail
14:59 TimToady std: 1 ?? $_ = 2 !! $_ = 3
14:59 p6eval std 30101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Assignment not allowed within ??!! at /tmp/HZsgXHRai3 line 1:␤------> [32m1 ?? $_ [33m⏏[31m= 2 !! $_ = 3[0m␤    expecting an infix operator with precedence tighter than item assignment␤FAILED 00:02 108m␤»
14:59 masak std: 1 ?? $_ := 2 !! $_ := 3
15:00 p6eval std 30101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Precedence too loose within ??!!; use ??()!! instead  at /tmp/s4pEsJOcrv line 1:␤------> [32m1 ?? $_ [33m⏏[31m:= 2 !! $_ := 3[0m␤    expecting an infix operator with precedence tighter than item assignment␤FAILED 00:01 106m␤»
15:00 masak std: 1 ?? 2 !! $_ := 3
15:00 p6eval std 30101: OUTPUT«ok 00:01 106m␤»
15:00 TimToady but that's treating the whole thing as the lhs of :=
15:00 masak std: 1 ?? 2
15:00 p6eval std 30101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Found ?? but no !!; possible precedence problem at /tmp/3bj3EWMnoS line 1 (EOF):␤------> [32m1 ?? 2[33m⏏[31m<EOL>[0m␤    expecting any of:␤ POST␤   postfix␤  postfix_prefix_meta_operator␤FAILED 00:01 106m␤»
15:00 TimToady which is a semantic error
15:00 masak nod.
15:01 TimToady 'course, the ?: problem may have more to do with yacc than with precedence
15:02 justatheory joined #perl6
15:02 masak ??!! is not technically a trinary in Perl 6, is it?
15:02 masak it's more like two binary ops which can't occur on their own.
15:03 masak well, !! can, I guess, but then it means ! !
15:03 masak hm, ?? can too, in term position...
15:03 masak std: my $a; ??$a
15:03 p6eval std 30101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Preceding context expects a term, but found infix ?? instead at /tmp/TXpMsfGs8w line 1:␤------> [32mmy $a; ??[33m⏏[31m$a[0m␤FAILED 00:01 106m␤»
15:03 masak guess not :)
15:04 masak std: my $a; !!$a
15:04 TimToady I suspect it disallows !! too
15:04 p6eval std 30101: OUTPUT«ok 00:01 106m␤»
15:04 TimToady or...not...
15:04 masak it shouldn't.
15:04 masak because it actually makes sense sometimes.
15:04 TimToady well, arguably, you can always replace that with ?
15:04 masak hm, I guess ?? makes as much sense...
15:04 masak but !! is the common idiom.
15:05 TimToady ah, it's only as an infix that it complains
15:05 TimToady std: 1 !! 2
15:05 p6eval std 30101: OUTPUT«[31m===[0mSORRY![31m===[0m␤Ternary !! seems to be missing its ?? at /tmp/N9UrQ3gAdu line 1:␤------> [32m1 !![33m⏏[31m 2[0m␤FAILED 00:01 106m␤»
15:06 TimToady std: sub prefix:<??> {...}; ??$_
15:06 p6eval std 30101: OUTPUT«ok 00:01 108m␤»
15:06 masak \o/
15:07 TimToady the generic error is last in STD with an LTM of '' to make all the other rules take precedence
15:07 nihiliad joined #perl6
15:08 TimToady though the ?? is a special case
15:08 TimToady iirc
15:09 TimToady but the user's grammar is derived from the standard, so the user's method overrides
15:17 ash_ joined #perl6
15:20 cognominal joined #perl6
15:26 payload joined #perl6
15:33 TimToady so, actually, in string comparison, we consider the first non-existent character to be -1, not 0
15:33 TimToady if the longer string is all chr(0) in the remainder, it still comes after.
15:36 Psyche^ joined #perl6
15:37 TimToady and maybe parrot is 0-padding instead
15:37 TimToady or maybe parrot is using strncmp :)
15:38 TimToady which can't compare strings containing nulls!
15:38 ash_ joined #perl6
15:38 jnthn I *really* hope not!
15:38 TimToady rakudo: say "a\0b" cmp "a\0c"
15:39 p6eval rakudo f67670: OUTPUT«-1␤»
15:39 TimToady whew :)
15:39 jnthn phew
15:39 jnthn :)
15:39 TimToady rakudo: say "a\0" cmp "a"
15:39 p6eval rakudo f67670: OUTPUT«1␤»
15:40 TimToady good
15:40 jnthn Got an example handy like that where it gets it wrong?
15:40 TimToady I wasn't the one who thougt it might be wrong
15:40 jnthn Ah, ok
15:41 TimToady rakudo: say "a " cmp "a"
15:41 p6eval rakudo f67670: OUTPUT«1␤»
15:41 TimToady seems okay to me
15:43 ash_ rakudo: say "a " eqv "a";
15:43 p6eval rakudo f67670: OUTPUT«0␤»
15:43 TimToady there don't appear to be any tests though
15:43 ash_ eqv seems to take white space into consideration, if its a must
15:43 TimToady that would be LHF for someone to knock off
15:43 TimToady ooh, that's wrong
15:44 TimToady no wait
15:44 TimToady 0 is false
15:44 TimToady so that's right
15:44 ash_ rakudo: say "a " eqv "a"; say "a" eqv "a";
15:44 k23z__ joined #perl6
15:44 p6eval rakudo f67670: OUTPUT«0␤1␤»
15:44 TimToady seems right
15:46 TimToady other than bitwise tests, the only comparison test involving \0 is ok("\0" eq "\0",   "eq on strings with null chars");
15:47 TimToady long term, this seems...inadequate...
15:47 TimToady only looking in t/spec/S03-operators though
15:49 ignacio_ joined #perl6
15:56 colomon I wish there were some way to convince newcomers that writing tests is important.
15:56 colomon I suspect that good spectests are likely to outlast any of the current implementations of Perl 6...
15:58 pugssvn r30102 | lwall++ | [comparison.t] add some tests involving \0
16:05 pugssvn r30103 | lwall++ | [S03/equality] make sure eq and ne don't do padding semantics
16:05 ash_ joined #perl6
16:06 SmokeMachine joined #perl6
16:06 rgrau joined #perl6
16:11 pugssvn r30104 | lwall++ | [S03/relational.t] more tests to detect bad comparison semantics involving padding
16:11 TimToady there, I wrote my tests for the year :)
16:12 [particle] thank you for your contribution; you will be punished.
16:24 cdarroch joined #perl6
16:24 cdarroch joined #perl6
16:34 ash__ joined #perl6
16:41 justatheory joined #perl6
16:52 araujo joined #perl6
17:13 pmichaud good afternoon, #perl6
17:14 jnthn hello, pmichaud
17:14 uniejo joined #perl6
17:17 TimToady hi
17:24 colomon pmichaud: \o
17:24 colomon pmichaud: I don't know how much you've backlogged, but we might have gotten carried away yesterday.  :)
17:32 pmichaud colomon: I haven't backlogged at all.
17:32 pmichaud colomon: carried away with...?
17:32 jnthn Meta-operators... :-) :-)
17:32 pmichaud oh, did you all start on the implementation for those?
17:33 jnthn colomon++ most certainly did :-)
17:33 colomon rakudo: say (1..* Z~ 'a'..*).batch(10).perl
17:33 p6eval rakudo f67670: OUTPUT«("1a", "2b", "3c", "4d", "5e", "6f", "7g", "8h", "9i", "10j")␤»
17:33 jnthn rakudo: say (1..* ZR~ 'a'..*).batch(10).perl
17:33 p6eval rakudo f67670: OUTPUT«("a1", "b2", "c3", "d4", "e5", "f6", "g7", "h8", "i9", "j10")␤»
17:33 riffraff joined #perl6
17:33 TimToady we add Z because people kept asking for zipwith
17:33 TimToady *added
17:34 colomon I thought we added it because it was more consistent, not to mention cool.
17:34 colomon were there actual user requests for it?  ;)
17:34 jnthn There can be more than one reason. :-)
17:34 TimToady we never add anything for only one reason
17:34 TimToady of course, anything we add is cool by definition.  :)
17:35 TimToady but yes, it is more consistent
17:35 colomon anyway, we have rough versions of !op, Rop, Xop, and Zop working now.
17:35 colomon there is still some finesse required to make things completely kosher.
17:35 [particle] can we add a reset op that gets us back to STD?
17:35 TimToady o.o
17:36 [particle] :P
17:36 TimToady you make it sound like rakudo is out ahead of STD here...
17:37 TimToady std: say (1..* ZR~ 'a'..*).batch(10).perl
17:37 p6eval std 30104: OUTPUT«ok 00:01 108m␤»
17:37 pmichaud I'm disappointed that I haven't been able to play too, but keep up the great work.
17:37 pmichaud I'll try to write up a public message explaining my situation a bit later today.
17:38 colomon pmichaud: if there's anything we can do to help...
17:38 TimToady I think delaying R* can also be on the table.
17:39 colomon nod
17:39 pmichaud yes, I was just discussing that in /msg with jnthn
17:40 pmichaud I'll write up a summary of my situation a bit later today, and then let folks here brainstorm how this might/will affect R*
17:40 pmichaud and then I'll likely go along with consensus opinion
17:41 pmichaud I also hope to know in the next 6-8 hours where things stand here.
17:42 pmichaud in the meantime, if there needs to be a "final arbiter" ("pumpking") to make decisions in my absence, I delegate that to jnthn++
17:42 jnthn Uh-oh. :-)
17:42 pmichaud (I don't plan to be absent, but my schedule is not my own at the moment.)
17:42 jnthn pmichaud: I'll do my best. :-)
17:42 [particle] jnthn: as pumpking, you also have the stick of delegation.
17:42 * jnthn prods [particle]++ :-)
17:43 pmichaud jnthn: if you're doing your best, then we have absolutely nothing to worry about :-) :-)
17:43 TimToady you can hurt someone with a carrot too, if it's big enough
17:43 jnthn It was a *gentle* prod. :-)
17:43 TimToady well, nobody ever even does their best, so it's not worth guilt tripping over in any case
17:45 TimToady at some point we must all rely on Providence to supply what we lack personally...
17:46 jnthn :-)
17:46 [particle] is that another word for lazyweb?
17:47 TimToady I was thinking of it in the Quaker sense.
17:47 [particle] ah, the capital of rhode island.
17:48 TimToady yes, as in H.P. Lovecraft.
17:48 TimToady whose grave I have visited :)
17:48 [particle] :)
17:56 pmichaud okay, I have to disappear again for a while.  bbl.
17:57 jnthn o/
18:00 colomon \o
18:09 * jnthn -> finding food
18:09 jnthn back in an hour or so
18:16 hercynium joined #perl6
18:25 alester joined #perl6
18:30 payload joined #perl6
18:36 synth joined #perl6
18:39 * k23z__ enjoys tea+pfefferminz schokolade
18:40 * Su-Shee just managed to get a volume discount in a chocolate online shop. ;)
18:41 * k23z__ is wondering what chocolate Su-Shee bought :)
18:41 Su-Shee www.zotter.at :)
18:43 supernovus joined #perl6
18:44 k23z__ Su-Shee, wow that looks nice , which ?
18:44 supernovus So, I am working on a new version of Temporal. I do have one question. Does something like Temporal belong in the "minimal" core, or should it be an external library?
18:44 Su-Shee k23z__: well all with nuts in it for starters ;)
18:44 mberends joined #perl6
18:46 k23z__ Walnüsse
18:47 Su-Shee and pistaches and almonds and hazelnuts and everything with sheep's milk..
18:48 k23z__ I never ate chocolate with sheep's milk in it to be honest :)
18:48 k23z__ is it different from chocolate with cow milk ?
18:49 Su-Shee I can recommend sheep's and goat's milk actually. I use them like regular cow's milk in coffee or for cooking and all and they all taste slightly "sweeter" and less hmm.. cantdescribeit. buffalo milk is also _very_ nice.
18:50 TimToady supernovus: as it stands, Temporal is too overengineered to go into the core.
18:51 TimToady however, civil Date and Time types that handle gregorian time might be fine there as a default
18:51 justatheory joined #perl6
18:51 supernovus So far, my Temporal implementation is based on masak's "Temporal Flux" specification (parser and formatter for ISO8601), but also includes a parser and formatter for RFC2822, and a custom formatter based on the Date::Format library from Perl 5. I personally think that the functionality is useful, but may be overkill for the core.
18:52 TimToady for both Temporal and IO, we need to figure out the "easy things should be easy" part, and put that part into core
18:52 TimToady both of those have historically been more in the 'hard things should be possible'
18:53 TimToady "Beware the Turing Tarpit, where everything is possible, and nothing is easy."
18:53 k23z__ need to try these milks some tme ...
18:53 supernovus It should let you do things like: my $event = DateTime.new("2010-06-22"); my $now = DateTime.new; my $howlong = $event - $now; say "Yay, I'll be 31 in $howlong";
18:53 TimToady --Alan Perlis
18:54 TimToady s/nothing/nothing of interest/
18:54 TimToady actually, I'm not sure either of those are Turing tar-pits from that definition.
18:55 TimToady they just kinda turned into normal tarpits...
18:55 TimToady anyway, they both tend to suffer from too much orthogonality
18:55 lichtkind joined #perl6
18:58 uniejo joined #perl6
19:03 supernovus As long as IO::Socket::INET sticks around in some form... I use that one a lot.
19:05 supernovus Even if it gets separated out as a non-core/setting library. I think that may be the best thing for Temporal too.
19:09 TimToady seems to me INET should imply socket already
19:11 TimToady and in general, IO should be concentrating on naming external objects by their identity, and let the system figure out how to get them.
19:11 rv2733 joined #perl6
19:14 supernovus I don't know about the client side. I use the daemon functionality of the IO::Socket::INET, It was the foundation of my SCGI library.
19:15 payload joined #perl6
19:16 TimToady not saying that you shouldn't be able to get at the socket abstraction (or is it non-abstraction) layer, but I just consider that 90% of occurrences of the word Socket in a user's program is a design failure
19:27 TimToady I also consider having to prefix Date or Time with Temporal:: all the time is also a design failure
19:32 ShaneC joined #perl6
19:36 iblechbot joined #perl6
19:36 * jnthn back
19:39 takadonet welcome back jnthn
19:39 lichtkind is rule statement_control:sym<default> {    <sym> <block> } same as rule statement_control {    'default' <block> } ?
19:40 jnthn sorta :-)
19:40 jnthn <sym> matches default
19:41 jnthn So in that sense, yes.
19:41 TimToady but there are multiple statement_control rules, so not in that sense
19:54 jnthn std: multi regex foo($x) { a }; multi regex foo($x, $y) { b };
19:54 p6eval std 30104: OUTPUT«ok 00:01 109m␤»
19:54 jnthn Ooh. :-)
19:55 jnthn .oO( there's fun to be had there... )
19:57 TimToady indeed, but the primary criterion is still LTM, and ordinary multi is inside that
19:57 jnthn The way those interact makes my head hurt. :-)
19:58 TimToady I'd ignore multi inside regex for now; I don't think STD uses it anyway
19:58 jnthn I wasn't entirely sure STD would even allow it at the point I tried it. :-)
19:58 TimToady that's just semantics, so STD doesn't care
19:58 lichtkind jnthn TimToady thanks
19:58 lichtkind is default a special word?
19:59 TimToady only as meaning the same as 'when *'
19:59 TimToady i.e. in a switch statement
19:59 lichtkind but not in <default> ?
20:00 TimToady that's just a string that <sym> knows how to match, and perhaps also ends up the name of the eventual operator
20:01 TimToady other than that, just a name to uniquely identify the rule; there's no requirement that you use <sym>
20:01 justatheory joined #perl6
20:17 lichtkind TimToady: thanks
20:18 elmex joined #perl6
20:27 M_o_C joined #perl6
20:40 ignacio_ joined #perl6
20:48 cbk joined #perl6
20:49 cbk HI everyone.
20:49 mberends HI!
20:51 cbk If you all don't mind, I was looking at some old perl 6 code that I have and tried to run it and got this error message: Too many positional parameters passed; got 1 but expected 0 in Main (file src/gen_setting.pm, line 324)
20:51 cbk This code worked before...?
20:51 cbk did something change in my absence?
20:51 spinclad how old?
20:52 mberends plenty changed
20:52 cbk back around rakudo #16
20:53 cbk any tips on what to look for in my code so I can fix it?
20:53 cbk I
20:53 spinclad yes, a lot has changed.  i don't recall that error message existing back then.
20:53 jnthn #16 is...certainly old. :-)
20:53 jnthn I wonder if that was before the new binder.
20:53 mberends cbk: how about pasting your code and output on http://paste.lisp.org/new/perl6
20:53 cbk No i didn't have that problem back then. Only now that I try to run it
20:53 elmex joined #perl6
20:53 jnthn The old one didn't care about if you had an empty signature and passed parameters...due to a bug. That got fixed.
20:54 jnthn Alternatively, it could be a Rakudo problem too.
20:54 mberends that's why it's interesting to reproduce the error on a few more systems
20:55 cbk mberends, I will post the code...
20:58 [particle] jnthn: i need to talk to you about rakudo's needs from parrot in preparing for R*. i'll be around tomorrow, shall we chat then?
21:00 jnthn [particle]: That sounds good.
21:01 jnthn [particle]: As far as I know, my schedule is pretty flexible tomorrow.
21:01 jnthn I've things to do, but they needn't happen at any particular time in general.
21:01 [particle] excellent. i'm out the door for the next 7 hours or so, but i'll be around tomorrow
21:02 jnthn kk
21:03 cbk mberends, sorry paste.lisp.org does not look like it's working.
21:04 jnthn oh, hmm, the bot is missing here I think
21:05 jnthn cbk: If you managed to post it somewhere and have a url, just paste the url in here.
21:05 cbk ok
21:06 mberends or try another paste server eg http://nopaste.snit.ch/
21:09 cbk I put the code up here on my site: http://independentcomputing.biz/?q=node/31
21:10 mberends cbk: got it, will try locally right now
21:10 cbk the only output I get is the error I had listed: Too many positional parameters passed; got 1 but expected 0 in Main (file src/gen_setting.pm, line 324)
21:12 rgrau joined #perl6
21:16 mberends cbk: over here on very latest Rakudo it says: "You can not add a regex to a module; use a class, role or grammar".  Have you had that message.
21:18 cbk no, just the one that I had listed before.
21:18 cbk Too many positional parameters passed; got 1 but expected 0 in Main (file src/gen_setting.pm, line 324)
21:18 mberends cbk: I'll play around with it in the next couple of hours
21:19 cbk I don't think I'm not using the latest. I'm using the perl6 thats on fedora 12
21:19 cbk so you think it's the regex
21:20 mberends cbk: things have changed quite a lot in Rakudo in the past 3 months
21:20 cbk at the top
21:20 cbk ya I see.
21:20 mberends they seem fine, but may need to be enclosed in a grammar
21:20 cbk ok
21:21 cbk time to download that perl 6 book :)
21:22 mberends :)
21:22 huf joined #perl6
21:23 daemon joined #perl6
21:33 bkeeler joined #perl6
21:45 ignacio_ joined #perl6
21:49 mberends joined #perl6
21:49 TiMBuS joined #perl6
21:52 eternaleye joined #perl6
21:54 bkeeler joined #perl6
21:57 payload1 joined #perl6
22:03 jmarti joined #perl6
22:09 eternaleye joined #perl6
22:12 wknight8111 joined #perl6
22:19 Chillance joined #perl6
22:26 ShaneC1 joined #perl6
22:26 brushie__ joined #perl6
22:32 daemon joined #perl6
22:33 fda314925 joined #perl6
22:35 supernovus Well, be back tomorrow. Hopefully, I'll have a Temporal that can do DateTime objects (with ISO8601 parsing and formatting), and will supply a 'now' sub that will return a DateTime object representing 'right now'. Time zone adjustments and Duration objects coming next (with conversions, like say Duration.new("2.5H").in(:minutes) ). Then Temporal Math... A DateTime +/- DateTime will return a Duration. A DateTime +/- Duration will
22:35 TimToady um, please don't use Duration for civil times
22:36 TimToady Durations are defined only as the difference between two Instants
22:37 ascent_ supernovus: you overflowed irc buffer at "A DateTime +/- Duration will"
22:38 TimToady S02:1213
22:38 jnthn TimToady: When you have an s/a/b/ what kind of thingy does it produce?
22:39 supernovus TimToady: I should say Gregorian::Duration.
22:39 TimToady that's an awful name
22:39 TimToady not your fault I know :)
22:39 jnthn TimToady: (s/a/b/).WHAT.say # say what?
22:40 supernovus ascent_: A DateTime +/- DateTime will return a Duration. A DateTime +/- Duration will return a DateTime.  (and all of this is referring to the Gregorian:: Civil time implementations.)
22:40 TimToady well, in p5 terms it'd return a Match object
22:40 TimToady we can't use Duration for that, or we'll confuse people
22:41 TimToady we were talking earlier about calling them Durances, as in "durance vile"
22:41 TimToady which is usually measured in civil units
22:42 TimToady "2 hours" is not a well formed concept with respect to Durations
22:42 daemon joined #perl6
22:43 TimToady Durations don't know anything about the snap-to-grid semantics that civil times need
22:43 supernovus I'm using the names from S32/Temporal. I haven't deviated the names from what masak had started on. As per S32/Temporal, initializing a raw DateTime or Duration object with any attributes other than 'tai' will delegate to the Gregorian:: versions.
22:44 TimToady we will certainly be renaming Duration
22:44 TimToady one way or another...
22:44 ShaneC joined #perl6
22:45 TimToady Period maybe
22:45 mberends don't journeys and film shows have durations that are imprecise?
22:46 TimToady point is, S02 has already claimed it as a technical term
22:46 xomas joined #perl6
22:46 xomas joined #perl6
22:47 TimToady if S32 wants it, we'll have to come up with a different technical term for the difference between to Instant values
22:47 TimToady *two
22:48 TimToady Period is also use both precisely and imprecisely
22:48 TimToady I suspect most such time words will be
22:49 eiro joined #perl6
22:49 szbalint joined #perl6
22:51 ascent_ joined #perl6
22:51 mberends right. S02:1210 "Duration    The difference between two Instants" (TAI points)
22:52 TimToady thinking of renaming that to Period, maybe
22:53 TimToady if S32 wants to keep on with it
22:54 TimToady or maybe Interval?  I suppose that would upset some mathematicians...
22:54 TimToady we already call intervals Ranges
22:54 mberends hmm, that suggests repetition.
22:54 supernovus joined #perl6
22:54 jnthn Span?
22:54 jnthn TimeSpan?
22:55 supernovus Gah, something went wrong, and I lost my connection.
22:55 drake1 joined #perl6
22:55 mberends but Duration suggests continuity.
22:55 supernovus I hadn't noticed that Instant and Duration were now in S02. I'm assuming the versions shown in S32 should be exiled. In which case, Period or TimeSpan would be a suitable replacement.
22:56 TimToady well, I'm willing to give Duration to S32 if we can come up with a better term for an absolute timespan
22:56 * mberends doesn't like timespan, but technically it wins
22:56 drake1 just had a look at the parrot system seems pretty easy. do you think perl6 would be able to run on http://www.gangsterfreak.com/file:doc/component/api.html too?
22:56 jnthn I've always found it very clear in terms of what it means.
22:57 jnthn Even if it feels slightly...something.
22:57 bkeeler rakudo: if "foo.bar.baz" ~~ /(.*) \. (.*)/ { say "$0 $1" }
22:57 p6eval rakudo f67670:  ( no output )
22:57 bkeeler alpha: if "foo.bar.baz" ~~ /(.*) \. (.*)/ { say "$0 $1" }
22:58 p6eval alpha 30e0ed: OUTPUT«foo.bar baz␤»
22:58 bkeeler no backtracking?
22:58 jnthn Odd.
22:59 jnthn rakudo: say "aaaab" ~~ /a*b/
22:59 p6eval rakudo f67670: OUTPUT«aaaab␤»
22:59 jnthn rakudo: say "aaaab" ~~ /(a*)b/
22:59 p6eval rakudo f67670: OUTPUT«aaaab␤»
22:59 jnthn oh gah
22:59 jnthn rakudo: say "aaaab" ~~ /(.*)b/
22:59 p6eval rakudo f67670: OUTPUT«␤»
23:00 jnthn rakudo: say "aaaab" ~~ /.*b/
23:00 p6eval rakudo f67670: OUTPUT«aaaab␤»
23:00 jnthn oh hmm
23:00 jnthn fajl.
23:00 bkeeler Is that Swedish for 'fail'? ;)
23:00 jnthn bkeeler: Maybe. ;-)
23:01 mberends drake1: it's unlikely, to be honest
23:01 TimToady hmm, Interim maybe
23:01 * jnthn preferred Duration and Interval to that one, fwiw.
23:02 bkeeler rakudo: say "aaaab" ~~ /[.*]b/
23:02 p6eval rakudo f67670: OUTPUT«aaaab␤»
23:02 jnthn oh
23:02 jnthn it won't backtrack over a capture? :-/
23:02 jnthn That's...not fun.
23:03 bkeeler rakudo: say "aaaab" ~~ /$<foo>=[.*]b/
23:03 p6eval rakudo f67670: OUTPUT«aaaab␤»
23:03 jnthn Oh
23:03 jnthn So just parens. Hm.
23:04 bkeeler Most odd
23:04 drake1 mberends: it works a bit like the PIR
23:05 drake1 only alot more open for extensions
23:05 bkeeler Where do nqp-rx bug reports go?
23:05 supernovus I'll finish implementing the TimeDate/Gregorian::TimeDate stuff for tomorrow. Until naming conventions can be decided up, I'll use TimeSpan in Temporal to represent, well, time spans/durations.
23:06 drake1 the shell nature of it makes it completely strong
23:07 jnthn bkeeler: Maybe to the github tracker
23:08 TimToady could just be Span for all of me.
23:08 jnthn TimToady: I don't mind Span
23:08 TimToady I don't much like CamelCase
23:09 jnthn TimToady: Yeah, maybe that's why TimeSpan feels odd.
23:09 TimToady not to mention DateTime
23:09 jnthn (I like CamelCase quite a bit, but I recognize we don't use it so much in Perl 6.
23:09 jnthn )
23:09 TimToady it's one of those things I prefer to leave for others to use :)
23:09 jnthn Sure
23:09 jnthn Well, consistency++
23:10 mberends joined #perl6
23:10 hicx174 joined #perl6
23:10 snarkyboojum joined #perl6
23:11 jnthn oh lol
23:11 jnthn > my $x = "peer"; $x ~~ s/p/b/; say $x;
23:11 jnthn beer
23:11 mberends \o/
23:11 TimToady yahoo
23:12 * jnthn thinks he'll have a beer to celebrate
23:12 jnthn ...hmm, maybe I should run the spectests first. ;-)
23:12 TimToady jntn has no peers :)
23:12 supernovus Anyway, I'm out. I'll put out the library with DateTime and TimeSpan intact, but such that a quick s/DateTime/Newname/g will be easy. :)
23:12 mberends :)
23:12 TimToady supernovus++
23:13 jnthn supernovus++ # nice work :-)
23:13 supernovus I will also make an updated version of the S32/temporal.pod to go along with the changes.
23:13 jnthn std: $x ~~ s[rolf] = 'rofl'
23:13 p6eval std 30104: OUTPUT«[31m===[0mSORRY![31m===[0m␤Variable $x is not predeclared at /tmp/QtSwzfYzQc line 1:␤------> [32m$x[33m⏏[31m ~~ s[rolf] = 'rofl'[0m␤    expecting any of:␤     POST␤   postfix␤  postfix_prefix_meta_operator␤FAILED 00:01 107m␤»
23:14 jnthn ...that looks...curious.
23:14 supernovus Anyway, be back tomorrow.
23:14 TimToady o/
23:15 bkeeler jnthn: \o/ for beer!
23:15 jnthn TimToady: Where does STD parse the s[...] form?
23:15 TimToady probably sibble
23:15 jnthn Or is sibble content with finding just one thingy?
23:15 constant joined #perl6
23:15 TimToady if you use brackets, it only wants one thing, followed by some kind of assignop
23:16 jnthn oh!
23:16 jnthn OK
23:16 jnthn I had somehow thought sibble was more general that just for s/// style thingies.
23:16 jnthn OK, that makes life rather easier.
23:17 jnthn I don't think I can quite get the same factoring as STD has right now with the starters/stoppers and all that fun, though. :-(
23:17 payload2 joined #perl6
23:17 TimToady I'm all in favor of making life easier, considering it usually finds some way to make itself harder some other way...
23:17 jnthn I'd leave it for now in STD.
23:18 jnthn As far as I can follow it, we don't quite have the whole arbitary quotes stuff in place just yet.
23:18 jnthn And that's quite a bite to chew.
23:19 TimToady yes, you really need real LTM and derived grammars for all that
23:19 jnthn rakudo: "a" eq "a\0"
23:19 p6eval rakudo f67670:  ( no output )
23:20 TimToady you don't say
23:20 jnthn TimToady: Did you patch equality.t? :-)
23:20 lisppaste3 joined #perl6
23:20 TimToady I believe I did.
23:20 jnthn I think you missed some statement seperators. :-)
23:21 jnthn ok(!("a" eq "a\0"),   "eq doesn't have null-padding semantics")
23:21 jnthn ok(!("a" eq "a "),   "eq doesn't have space-padding semantics")
23:21 jnthn aye, that was in
23:21 jnthn *it
23:21 TimToady of course, that's the one I *didn't* run tryfile on...
23:22 jnthn phew, I thought I was going to have to work out why on earth a patch to add s/// support would break equality.t!
23:22 TimToady even gives me a nice error:
23:22 TimToady Two terms in a row (previous line missing its semicolon?) at t/spec/S03-operators/equality.t line 23
23:22 jnthn We need to steal that. :-)
23:22 jnthn TimToady: You patching, or I can?
23:23 pugssvn r30105 | lwall++ | [S03/equality.t] missing semis
23:23 drake1 how stable is the Parrot?
23:23 diakopter *crickets*
23:23 TimToady "This Parrot is stable!"
23:24 drake1 nice
23:24 jnthn I hope that isn't biological definition of...
23:24 jnthn </montypython>
23:24 TimToady I dunno, hoses pine for the stables...
23:24 TimToady *horses
23:24 TimToady I don't know what hoses pine for
23:24 diakopter someone had better leave the barn door open
23:25 japhb fjords, of course -- where all their water comes from
23:25 drake1 with a UID it shouldn't matter much, atm
23:26 * diakopter spent all day fighting "enterprise" software from various billion-dollar companies.
23:26 TimToady a billion doesn't go as far as it used to...
23:27 diakopter ... a billion there, pretty soon we're talking about real money
23:27 drake1 shell pipes in Perl6 are open("|printer") as usual?
23:27 TimToady Yeah, well, it's always a billion there, and never a billion here.
23:28 TimToady drake1: not specced, I think
23:28 drake1 not in IO draft
23:30 drake1 would like to try the new regex actually
23:30 drake1 with perl5 modifier it seems
23:31 drake1 for the old ones
23:32 mberends drake1: the perl5 modifier was implemented only in Pugs, but that has bitrot
23:32 TimToady I don't know if rakudo supports the :P5 option
23:32 drake1 ok
23:33 TimToady std: m:p5/ ! /, / ! /
23:33 p6eval std 30105: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unrecognized adverb :p5(1) at /tmp/FdTFLBKDLQ line 1:␤------> [32mm:p5[33m⏏[31m/ ! /, / ! /[0m␤    expecting colon pair (restricted)␤FAILED 00:01 107m␤»
23:33 TimToady std: m:P5/ ! /, / ! /
23:33 p6eval std 30105: OUTPUT«[31m===[0mSORRY![31m===[0m␤Unrecognized regex metacharacter (must be quoted to match literally) at /tmp/gkKb4EbNdd line 1:␤------> [32mm:P5/ ! /, / [33m⏏[31m! /[0m␤    expecting regex atom␤FAILED 00:01 130m␤»
23:33 japhb At one point I would swear one of the implementations implemented :P5 perversely by using PCRE.
23:33 TimToady STD parses P5 regexen though
23:34 drake1 beware of the grammar force hehe
23:35 drake1 interesting concept with the <pattern meta> or how it's called
23:35 dalek rakudo: 8b09f69 | jonathan++ |  (5 files):
23:35 dalek rakudo: Implement first cut of s/// syntax. Uses .subst under the hood, so it's as capable/incapable as .subst.
23:35 dalek rakudo: review: http://github.com/rakudo/rakudo/commit/8b09f698164aa2546ce4de4ca907e60375b26e7f
23:35 TimToady assertions?
23:35 colomon \o/ patch!
23:37 TimToady drake1: yes, the new pattern syntax is quite nice in many ways.  STD.pm uses it heavily to parse Perl .  http://svn.pugscode.org/pugs/src/perl6/STD.pm
23:38 drake1 all the modifiers I always had to put are now implicitly switched on
23:38 jnthn colomon: Figured I should do something useful today. :-)
23:38 TimToady drake1: one of the major (re)design principles was picking the right defaults
23:39 jnthn colomon: ...well, I guess the Excel stuff was useful in terms of getting me paid. :)
23:39 mberends TimToady: (quite nice) you're so modest!
23:39 TimToady I wasn't the only participant in that redesign.
23:40 drake1 TimToady: with simple patterns I use sed, so the x was a must. and the {}e's seems nice :)
23:41 drake1 s,seems,seem, sry. tired reflex cats
23:42 jnthn .oO( i can haz reflex? )
23:42 drake1 at the ..'s probably
23:43 mssm joined #perl6
23:44 jnthn > my $x = "peer"; $x ~~ s[p] = 'b'; say $x;
23:44 jnthn beer
23:44 jnthn \o/
23:45 mberends yay!
23:45 jnthn If anyone wants the op= form, they can do it 'emselves. :-)
23:45 bkeeler But then you might need to "$x = "peer"; $x ~~ s[r] = ''; say $x;"
23:45 jnthn (it's probably not so had akshually...)
23:46 jnthn > my $x = "peer"; $x ~~ s[r] = ''; say $x
23:46 jnthn pee
23:46 jnthn :-D
23:46 mberends it may be LHF for someone...
23:46 TimToady buncha juvies...
23:46 jnthn mberends: It's not so hard, I'm just feeling lazy. :-)
23:47 TimToady pugs: my $x = "a1b"; $x ~~ s[\d] += 41; say $x
23:47 p6eval pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.14/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** '<HANDLE>' trapped by operat…
23:48 jnthn TimToady: hey, that's just teasing me. :-P
23:48 TimToady Can I interest you in a HsBridge I have for sale?
23:49 drake1 how would perl6 cope with a fifo-setup in comparison to older version?
23:49 jnthn Transactions between Americans and Brits involving bridges don't have the best history. ;-)
23:49 payload joined #perl6
23:50 TimToady hey, that's just teasing me.  :P
23:50 * jnthn even dropped by Lake Havasu City once to see it. :-)
23:50 TimToady drake1: I have no idea what you mean.
23:50 mberends drake1: push pop shift and unshift are still the same
23:51 drake1 sweet
23:51 TimToady or are you talking about SysV fifos?
23:51 drake1 yes
23:51 drake1 and other open file-descriptors
23:52 TimToady well, we do have object pipes, which map rather well to such things
23:52 drake1 great
23:52 TimToady but nobody has bothered with the SysV primitives yet
23:53 TimToady and, of course, nobody has actually implmented the object pipes yet either
23:53 drake1 light stuff
23:53 TimToady but we have lazy iterators, which comes out to much the same thing
23:53 drake1 something like http://www.gangsterfreak.com/file:gp/fir_experiment.png in perl5 with the STDIN <> iterator, how is that in perl6?
23:55 TimToady I have no idea how your picture relates to your words.
23:56 drake1 to iterate over the STDIN
23:56 drake1 and set the record separators
23:57 TimToady I still have no idea how your picture relates to your words.
23:57 drake1 just a one-liner example
23:57 jnthn colomon: So...X and Z non-meta just got commented out?
23:57 jnthn colomon: oh, search fail...I just found them.
23:58 eternaleye joined #perl6
23:58 TimToady you can get all the lines from $*IN.lines
23:58 TimToady rakudo: say $*IN.lines
23:58 p6eval rakudo f67670: OUTPUT«Land der Berge, Land am Strome,Land der Äcker, Land der Dome,Land der Hämmer, zukunftsreich!Heimat bist du großer Söhne,Volk, begnadet für das Schöne,vielgerühmtes Österreich,vielgerühmtes Österreich!Heiß umfehdet, wild umstrittenliegst dem Erdteil du inmitten,einem starken
23:58 p6eval ..Herzen …
23:59 jnthn colomon: Is the actual problem that it hits X and then fails to parse X~ for example?
23:59 TimToady hmm, looks like they're autochopped even
23:59 drake1 TimToady: like while($*IN.lines) ?
23:59 jnthn for

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

Perl 6 | Reference Documentation | Rakudo