»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend!
Set by sorear on 4 February 2011.
00:16 wamba left 00:18 cexsum left 00:33 buubot_backup joined 00:39 cexsum joined 00:40 uvtc joined 00:41 uvtc left 00:43 Alias joined 00:46 silug joined, cexsum left
ruz I've changed nqp's source, what's next step? 00:56
01:00 jevin left 01:03 jevin joined 01:36 drbean left 01:50 daniel-s joined 02:09 whiteknight left 02:14 Khisanth left 02:21 [Coke] joined 02:22 daniel-s left 02:23 daniel-s joined 02:30 Khisanth joined, frhodes joined 03:23 Su-Shee_ joined 03:36 Moukeddar joined 03:45 Moukeddar left 04:01 Khisanth left 04:05 [particle]1 joined 04:15 lateau_ joined 04:16 Khisanth joined 04:18 lateau_ left 04:27 lateau_ joined, kaare_ joined 04:28 drbean joined 04:36 woosley joined 04:47 Khisanth left 05:01 woosley left 05:02 Khisanth joined 05:07 birdwindupbird joined 05:12 Khisanth left
moritz recompile, install, test rakudo with the newly installed nqp 05:16
05:26 Khisanth joined 05:44 soh_cah_toa left 05:52 birdwindupbird left
dalek kudo/nom: 1848338 | moritz++ | / (4 files):
change names of backtrace classes to match spec
05:54
06:12 jdhore1 joined 06:58 JimmyZ joined 07:15 cotto joined 07:27 wamba joined 07:43 Khisanth left 07:54 pernatiy left 07:57 Khisanth joined 08:01 wamba left 08:04 [particle]1 left 08:05 [particle] joined 08:12 mj41 joined, bluescreen10 left 08:13 Khisanth left, wamba joined 08:25 Su-Shee_ is now known as Su-She, Su-She is now known as Su-Shee
sorear good * #perl6 08:25
TimToady: I do not know what is going on there. Some bug. I know I have/had is equiv working in at least some cases.
08:26 Khisanth joined
mberends hi sorear 08:27
I'm working with diakopter on sprintf() for Niecza
sorear cool. 08:28
mberends sorear: how do I create an instance of Variable (or SimpleVariable) from a C# string? 08:29
sorear Kernel.BoxAnyMO("string", Kernel.StrMO)
08:29 im2ee joined
mberends thanks :) 08:29
sorear is pretty busy now but will spend the next few mins recreational-hacking 08:30
I need words for different sizes of now
moritz you mean like "now" vs. "these days" vs. "contemporary"? 08:31
08:32 meth joined
meth will cpan be usable still ? 08:32
mberends meth: eventually, but no idea how soon
meth how is that even possible ? 08:33
sorear "still" implies a lack of understanding
meth the language is so different..
yes I have no understanding that's why i ask
sorear perl was forked. perl 6 competes with perl 5.14 08:34
mberends when the itch for p6 in cpan becomes intense enough, the cpan developers will probably scratch it.
JimmyZ www.cpan6.org/design-en.html
meth well what I'm getting at is will perl 5 repository be usable from perl6 or will it all have to be rewritten ? 08:35
sorear JimmyZ: cpan6 is considered a joke around here
mberends JimmyZ: that is vapourware
sorear meth: We think most of it will be usable.
meth how is that possible though ? like binary compatibility or something ? 08:36
sorear meth: Infrastructural things like Moose (especially, all things with XS) will probably want to be rewritten
meth some kind of binding ?
sorear our primary goal is compatibility for darkpan
however, the compatibility layer is still some years off. Early adopters are referred to Blizkost, which embeds a P5 interpreter into Parrot and allows for communication 08:37
08:37 masak joined
sorear it's not transparent, but it does allow bidirectional calling and data transfer 08:37
masak Sunday salutations, #perl6 08:38
JimmyZ \o masak
sorear o/ masak.
meth yea so it's like writing bindings or something
ffi for example
sorear Pretty much.
It does automate memory management 08:39
masak: hmm. ISTR you saying something about a STD::P5 hackathon at $VENUE some months ago. 08:40
masak sorear: yes. it's gained a few degrees more of reality since then.
Su-Shee sorear: why would you rewrite moose with perl6's MOP in place?
meth oo nasty hll compiler interface.. sounds weird
08:40 sayu joined
meth doesn't sound very native feeling 08:40
masak meth: well, that's VMs for ya, 08:41
meth am i correct to think that perl6 supports multidimensional structures now without so much perlreftut fuss ? 08:42
masak yes.
meth kind of seemed like all the references went away
masak in a way yes, in a way no.
std: my @matrix[ 10; 10 ]; say @matrix[ 4; 7 ] 08:43
p6eval std e3c970e: OUTPUT«ok 00:01 121m␤»
sayu Hello
masak sayu: hallo!
JimmyZ aloha
sorear Su-Shee: compatibility 08:44
Su-Shee sorear: uhm? who to what?
meth was perl 6 started by another group or something ?
maybe it should be renamed to another language
sorear meth: Perl 6 was started by Larry Wall. 08:45
meth Allot of it seems to moving towards other languages.. like Ruby and Lisp
sorear Perl 5.10 was an unauthorized (but entirely justified) creation of Jesse Vincent et al.
meth and python with it's lisp comprehensions 08:46
who what ?
Su-Shee meth: and before you dive into the naming discussion: how is the name relevant? do you like the language? can it do what you want? then use it no matter wether it's called klaus-dieter or perl 30948532. ;)
mberends Su-Shee: :)
sorear meth: the perl5-porters were impatient.
masak meth: Perl 6 needs a rename like it needs a hole in the head.
Su-Shee meth: "towards moving other languages"?
meth defer reminds me of amb in lisp 08:47
moritz meth: Perl 6 is a different language than Perl 5, but it's still Perl
meth @array[index] without need for different sigil or the derefs we talked about for multidimentional structures is more like other languages too
sorear Su-Shee: lots of darkpan code does 'use Moose;' and then expects Class::MOP::Class->create(...) to work.
Su-Shee: we need to emulate the API on top of Parrot/Niecza 08:48
meth many things are moving towards being objects now like Array and Hash
mberends meth: evolving languages often steal good ideas from each other, and that's a good thing
sorear Su-Shee: since both systems have native attributes and roles, Moose.pm6 will likely be *much* smaller than CMOP/Moose
meth heh yea
sorear Su-Shee: but it needs to exist.
meth i agree just pointing out that it's becoming more like others in that regard.. which yes i hope i wake up in a few years and never have to deal with more perl refs again :] 08:49
masak meth: the deref thing that you're talking about is mostly syntax, in my opinion. it makes things look nicer, but it's not that big a change.
you still have to "deal with perl refs" sometimes.
sorear meth: Perl 6 does not have a "reference" type at all. That is dead and buried. \o/
meth hm how so ? you're able to rewind state of the environment and undo changes and try another execution path.. did perl5 have that ?
08:49 drbean left
Su-Shee sorear: I'm so very much not going to wrap my moose projects into perl 6 I can't even tell you how much I'm not going to do that. either I rewrite in 6 or it stays moose. either new projects are going to be 6 or they will be moose. 08:50
sorear meth: um, what are you reading?
masak ;)
meth i read the perl6 spec
masak dangerous stuff.
meth: regexes behave the way you suggest, in both Perl 5 and Perl 6.
Su-Shee meth: you realize that perl 5.14 already released features to deal with less dereferencing? 08:51
meth su-shee yea some what
masak ok..
sorear Su-Shee: I never said you would use Perl 6 syntax.
Su-Shee: Moose.pm6 is necessary in order to achieve the goal of "Perl 6.0 can parse and execute a majority of existing Perl 5 code' 08:52
08:52 REPLeffect joined
Su-Shee sorear: but the majority of existing perl code doesn't even use moose? 08:52
sorear I give up.
meth perlcabal.org/syn/S17.html#Concurrency 08:53
that's what i read
Su-Shee sorear: as you wish.
sorear meth: S17 isn't ready for public consumption yet.
meth check out maybe/defer
so ?
masak meth: some synopses are less "solid" than others.
meth I'm not using perl6 just reading about it
masak meth: S17, by and large, isn't very solid yet. it will contain falsehoods. 08:54
sorear meth: S02-S14, S17, S29, and S32 are the ones that are useful in their current states.
meth what's the name of that stuff that lets you create an object that "could" be multiple objects and then randomly becomes one when you work with it ? something that acts like quantum physics or something
sorear meth: er, S19, not S17
masak meth: junctions. 08:55
sorear meth: a very old and broken metaphor for junctions
masak meth: but it never 'becomes one' randomly. it becomes all of them.
meth heh ok ..
sorear junctions are a linguistic thing
all($x,$y,$z) < 10 means $x < 10 && $y < 10 && $z < 10 08:56
meth yea
that could just be a map operation
sorear an early prototype of junctions was Quantum::Superpositions, but true superpositions follow entirely different laws
yes
it is *exactly* a map operation 08:57
08:57 Su-Shee left
meth are they all just maps ? 08:57
i have to read about them one sec
why the whole need for OUTER ? 08:58
i mean I'm sure you had good reason or something but just wondering
sorear metalinguistic. 08:59
niecza: my $x = 2; { my $x = 4; say $OUTER::x }
p6eval niecza v8-57-ga89a9a6: OUTPUT«Potential difficulties:␤ $x is declared but not used at /tmp/eMU4V96Lob line 1:␤------> my $x = 2; { my ⏏$x = 4; say $OUTER::x }␤␤2␤»
08:59 lue joined
sorear I wouldn't call it particularly useful in practice, but the fact that we have a name for it makes it much easier to talk about the language 09:00
phenny: tell diakopter *frown* you've checked in half a megabyte of versions of lib/Solution/Niecza/Niecza.pidb. Is it really necessary to have this file under version control? It looks like debug information to me. 09:01
phenny sorear: I'll pass that on when diakopter is around.
meth idk what's up with +< instead of << :[
sorear Perl 6 is TimToady's grand plan to change the norms of programming language design. 09:02
meth don't see the point in the one above though
they should relinquish "say" as a keyword I would think since any block can have CATCH 09:03
mberends meth: << was better employed as the "Texas" version of «
meth oops i mean "try"
idk but binary operators have been around since c... and the over use of + will lead to really confusing code i would think but that's just guessing 09:04
mberends meth: you should be a language designer! ;) 09:05
meth heh i like to read about it but as stands i can't compete :p
mberends :p
meth i mean for math, then you can overload them, binary operators, then context operators, then what else ? 09:06
pmichaud I think "try" is kept as a keyword so that a block isn't required. 09:07
i.e., one can write try xyz(); and not have to write { xyz(); CATCH { ... } } 09:08
(good morning, #perl6)
sorear hi pmichaud
mberends good *, pmichaud
meth hm you mean try xyz() CATCH ? 09:09
I'm going to miss the modulo operator :.[
masak hi pmichaud
sorear rakudo: say 5 % 2
p6eval rakudo a55346: OUTPUT«1␤»
sorear eh?
pmichaud meth: no, I don't think that's what I meant.
09:10 orafu joined
sorear hmm 09:10
niecza: sub a { die("foo") ; CATCH {return "foo"}}; say a()
p6eval niecza v8-57-ga89a9a6: OUTPUT«Nil␤»
meth is terrenary operator still around ?
sorear rakudo: say True ?? 5 !! 2;
pmichaud meth: it's now ?? !! instead of ? :
p6eval rakudo a55346: OUTPUT«5␤»
meth pmichaud you serious ???
mberends meth: you said you were reading the specs! 09:11
pmichaud meth: about ??!!, yes
?? !! makes much more sense than ? :
masak meth: I used ?? !! back when it was ?? ::
meth: I like ?? !! better.
pmichaud in Perl 6, "?" means "truth part" and "!" means "false part"
mberends ?? is the same size as && and ||, and !! means not (for the else case)
pmichaud in general, we use ? and ! for boolean things 09:12
meth how ?
masak also, both && and ??!! are short-circuiting, in a sense.
rakudo: say ?7; say !7
sorear what's happening here (mls' "bug") is that CATCH is being called from within the dynamic scope of &die, and so return causes die to return
p6eval rakudo a55346: OUTPUT«Bool::True␤Bool::False␤»
sorear effectively CATCH { return } becomes a resume operator.
masak sorear: hm, interesting.
sorear this will be fixed once niecza gets lexotic returns 09:13
09:13 REPLeffect left
meth some things also remind me of shell scripting now 09:13
for instance ~@array 09:14
<<foo $bar bat>>
sorear those are called "shell quotes".
meth who what ?
ah you mean i should of called it shell quoting 09:15
pmichaud off to try to get some sleep before the sun rises
bbl
sorear meth: we, as a community of linguists, need names for things like that. 09:16
meth: I don't care what you call them, but we call them "shell quotes".
meth heh cool
thanks
pmichaud
.oO( what do we call people who need names for things? :)
09:17
meth namists 09:18
sorear phenny: tell TimToady your problem was you used "multi" for the operators. Precedence needs to apply to the entire sub, not specific candidates 09:19
phenny sorear: I'll pass that on when TimToady is around.
sorear phenny: tell TimToady (that said, niecza doesn't know how to propagate traits from proto to dispatch either - precedence will only work on "only" subs) 09:20
phenny sorear: I'll pass that on when TimToady is around.
meth multi subs... feel like he was trying to talk about lips multi methods or generic functions ?
lisps*
sorear meth: more like CLOS' multi methods, although I doubt they originated there.
meth Being able to create an object that can act like a hash or array is cool but then again why even require the @ or % sigil's at all anymore ? They could of just made [] a method call and Array and Hash builtins.. 09:21
s/and/on/ 09:22
sorear [] *is* a method call. 09:25
masak: what amused me was after I had done nontrivial playing-with of automated testing and proof systems and realized that they were related. 09:26
meth if it is a method call then why require @ , % , $ ? could just require non of them .. 09:27
09:27 REPLeffect joined
meth i assume then that {} is a method call too ? 09:28
sorear yes 09:29
[], {}, and () are funny syntax that calls a method named "postcircumfix:<[ ]>" etc
niecza: my $name = 'postcircumfix:<[ ]>'; my @array = 2,4,6; say @array."$name"(2) 09:30
p6eval niecza v8-57-ga89a9a6: OUTPUT«6␤»
meth hm... where does () apply ? are you saying that a class can actually be called with () ?
like $o = Obj.new; $o() ?
sorear niecza: class Obj { method postcircumfix:<( )>($x, $y) { say "called($x, $y)" } }; my $o = Obj.new; $o(5, 12); 09:31
p6eval niecza v8-57-ga89a9a6: OUTPUT«called(5, 12)␤»
meth cool
can't do that in most other languages
sorear the builtin class Code (common ancestor of Sub, Method, Block, Regex, etc) has a postcircumfix:<( )> method 09:32
meth oh wow Sub is a class ? 09:33
sorear rakudo: sub foo() { }; say &foo.^methods(:local).map(*.name)
p6eval rakudo a55346: OUTPUT«␤»
sorear rakudo: sub foo() { }; say &foo.^parents; 09:34
p6eval rakudo a55346: OUTPUT«Routine()Block()Code()Cool()Any()Mu()␤»
sorear rakudo: sub foo() { }; say &foo.WHAT;
p6eval rakudo a55346: OUTPUT«Sub()␤»
sorear rakudo: sub foo() { }; say ~Code.^methods(:local);
meth who the what
p6eval rakudo a55346: OUTPUT«new assuming callwith multi name perl signature do Str of returns␤»
sorear hmm, actually I think Rakudo is cheating a bit here 09:35
09:35 wamba left
sorear there's an inherent circularity here - method calls work by looking up a Method object, then calling its postcircumfix:<( )> method 09:36
nom: sub foo() { }; say ~Code.^methods(:local);
p6eval nom 184833: OUTPUT«Method 'Stringy' not found for invocant of class 'Sub'␤ in method join at src/gen/CORE.setting:823␤ in method Str at src/gen/CORE.setting:3780␤ in method Str at src/gen/CORE.setting:3200␤ in method Stringy at src/gen/CORE.setting:530␤ in sub prefix:<~> at src/gen…
09:36 mkramer joined
sorear nom: sub foo() { }; say Code.^methods(:local); 09:36
p6eval nom 184833: OUTPUT«Method 'gist' not found for invocant of class 'Sub'␤ in method gist at src/gen/CORE.setting:3231␤ in sub say at src/gen/CORE.setting:4613␤ in <anon> at /tmp/62sYypGKMc:1␤ in <anon> at /tmp/62sYypGKMc:1␤␤»
sorear nom: sub foo() { }; say Code.^methods(:local).map(*.name)
p6eval nom 184833: OUTPUT«Method 'name' not found for invocant of class 'Whatever'␤ in <anon> at /tmp/xXZ9O6RuPD:1␤ in <anon> at /tmp/xXZ9O6RuPD:1␤␤»
sorear nom: sub foo() { }; say Code.^methods(:local).map(sub ($x) { $x.name })
p6eval nom 184833: OUTPUT«Unmarshallable foreign language value passed for parameter '$x'␤ in sub <anon> at /tmp/hMvieaR977:1␤ in method reify at src/gen/CORE.setting:3597␤ in method reify at src/gen/CORE.setting:3502␤ in method reify at src/gen/CORE.setting:3502␤ in method gimme at src/g…
sorear nom: sub foo() { }; say Code.^methods(:local).map(sub (\$x) { $x.name }) 09:37
p6eval nom 184833: OUTPUT«Unmarshallable foreign language value passed for parameter '$x'␤ in sub <anon> at /tmp/PvrLvTIDKa:1␤ in method reify at src/gen/CORE.setting:3597␤ in method reify at src/gen/CORE.setting:3502␤ in method reify at src/gen/CORE.setting:3502␤ in method gimme at src/g…
sorear *sigh*
flussence > Code.^methods(:local)».name 09:38
Segmentation fault
:/
sorear flussence: local nom? 09:39
meth: do you need niecza:, rakudo:, and nom: explained? 09:40
09:41 jaldhar joined
meth yea idk i can't think of why not to get rid of $, @, % 09:42
sorear phenny: tell TimToady In your last std commit, what's the comment about P5isms and P6isms about?
phenny sorear: I'll pass that on when TimToady is around.
sorear meth: that's a very good question and you should ask TimToady it. 09:44
flussence sorear: yep
sorear meth: he'll probably be up in a few hours.
meth well I'd be amazed if he wasn't aware of the idea 09:45
i mean that's how other languages already do it
flussence limiting your vocabulary for no good reason makes bad code - lwn.net/Articles/454716/
meth look at like ruby or javascript or lua
09:46 whiteknight joined
meth ooo looks like a good read 09:46
09:46 jdhoreOTG joined 09:47 jdhore1 left
meth yea i mean as far as junctions go.. any() ~ "a" couldn't that just be Array ~ "a" ? 09:48
09:48 frhodes left
flussence Arrays don't autothread. 09:49
meth ah but they should! i thought that was a big thing in perl6 loops anyway ?
and something like Array ~ "a" would be implemented as a loop..
flussence Explicitly sequential data structures can not safely be operated on in parallel due to potential side effects 09:50
masak sorear: [automated testing and proof systems related] interesting. is it easy to explain how? 09:51
meth why not ? ~ is just testing there is no side affect ?
masak meth: operative words being "potential" :)
sorear meth: a Junction is more than just an array, it also has a sense. 09:52
meth: any($x,$y) < 10 and all($x,$y) < 10 mean different things
meth yea but just cause i use a junction doesn't mean my list isn't just as potentially in trouble as if it was an array
sorear masak: they're both about saying what you mean twice in two very different ways and having the computer check for discrepencies. 09:53
meth what do you mean a sense ?
sorear meth: any, all, one, none.
meth so ? 09:54
@a=1,2; @a.any(<10) if perl6 has partials or @a.any{$_<10} etc..
09:57 wamba joined
TiMBuS yes, that works 09:57
meth it oes ? 09:58
does *
masak sorear: oh, fair enough.
TiMBuS not sure about the method form but, yeah
meth < is confused 09:59
you have an example ?
TiMBuS uh 10:00
my @a = 1,2,3; say(any(@a) < 2); # is this what you want?
nom: my @a = 1,2,3; say(any(@a) < 2); # is this what you want?
p6eval nom 184833: OUTPUT«any(True, False, False)␤»
meth does that work for hash's as well ? 10:01
TiMBuS lets find out!
meth anyway my point though was that all those things are basically folds that could be methods on Array
TiMBuS my @a = 1,2,3; say @a.any #don't think so.. 10:02
meth what ?
TiMBuS hm
nom: my @a = 1,2,3; say @a.any
p6eval nom 184833: OUTPUT«any(1, 2, 3)␤»
meth well i asked if it worked for hash's... say(any(%h)<2) 10:03
flussence why only as Array methods, and not also List, Parcel, Range ... * methods?
TiMBuS on the keys, or on the vales
meth don't they all share a common enumerable class or something ?
i guess something just has to act like an array and then you can pass it to say 10:04
i mean junctions 10:05
flussence How would you write any($a, $b, $c) as a method call without a wasteful temporary variable?
meth i guess if you overload your object
you mean $r = any($a,$b,$c) 10:06
?
probably like $r = [$a,$b,$c][rand(2)]
flussence as in requiring it to be a method on container objects, which you seem to be implying.
meth well the container is auto created anyway .. it's basically the list formed when calling any 10:07
TiMBuS okay, so i guess the question is: what do you want perl6 to do that it doesn't already do? 10:08
autothread, i assume?
meth me ? nothing.. just contemplating 10:09
10:09 Khisanth left
TiMBuS oh 10:09
meth i thought loops in perl6 will auto thread if the optimizer thinks it's safe and worth it ?
TiMBuS maybe, if we even had an optimizer
hyper operators are also supposed to autothread 10:10
meth idk that's one of the features i remember reading about years ago in perl 6
TiMBuS a long time ago for all(@array) { } was going to autothread
meth heh.. yea i mean i been reading about perl6 so long idk when it's going to happen 10:11
TiMBuS well to autothread, perl first needs to thread
and it doesnt ;/
flussence perl6: (1..5)».say
p6eval pugs: OUTPUT«decodeUTF8': bad data: '\187'␤2␤3␤4␤5␤1␤» 10:12
..rakudo a55346, niecza v8-57-ga89a9a6: OUTPUT«1␤2␤3␤4␤5␤»
TiMBuS cant tell if it was the bug, or if pugs autothreaded that
meth from what i read perl6 has allot of concurrency conscious ?
flussence nom: (1..5)».say 10:13
p6eval nom 184833: OUTPUT«1␤2␤5␤3␤4␤»
TiMBuS sorta. i guess it comes with needing to be lazy-aware as well
hoho flussence
for real?
flussence IIRC it just shuffles values around to stop people making assumptions about » 10:14
TiMBuS aw
flussence there is some sort of code there for autothreading though
TiMBuS i just want normal threads 10:15
not ithreads :/
10:18 sayu left
meth if Sub is an object then what does that mean for me ? can i like add methods to functions or something ? 10:26
10:26 Khisanth joined
meth was i also correct to read that perl6 will provide atomic variables ? 10:26
masak meth: yes, Perl 6 is constructed with concurrency in mind. 10:31
10:31 mj41 left
masak meth: atomic variables -- we'll see, that's S17 too ;) 10:31
10:31 mtk joined
masak meth: listening to jnthn++ talk, it seems that the concurrency primitive we'll end up with is CAS. 10:31
meth: Sub is an object, and that means that you can ask it various questions about itself and, yes, maybe even change it in different ways. 10:32
meth: have you seen .wrap ?
meth wraps it in a another function ?
will blocks return implicitly ? 10:33
i mean like no need for return keyword ?
to "return" a value
JimmyZ yes
meth was perl5 like that ?
can't remember
JimmyZ yeah
meth ah ok 10:34
anyway 6:30am I'm about to pass out
10:34 donri joined
mberends /o\ 10:36
10:37 JimmyZ left, jevin left, Grrrr left, jjore left, dukeleto left, zb left, \patch left, Patterner left, huf left, jlaire left, tylercurtis left 10:38 JimmyZ joined, jevin joined, Patterner joined, huf joined, jlaire joined, jedai_ joined, xinming joined, f00li5h joined, breinbaas joined, jnthn joined, sbp joined, cognominal joined, snarkyboojum joined, imarcusthis joined, eiro joined, aloha joined, gabiruh joined, broquaint joined, Grimnir_ joined, athomason joined, mikemol joined, Gothmog_ joined, bs338 joined, felipe joined, renormalist|work joined, phenny joined, nsh- joined, TimToady joined, Grrrr joined, jjore joined, dukeleto joined, tylercurtis joined, zb joined, \patch joined, donri left, cotto left, donri_ joined, cotto joined, nebuchadnezzar joined, Sarten-X joined, ponbiki joined, pyrimidine joined, hillu joined, pjcj joined, tomaw joined, ashleydev joined, jtpalmer joined, donri_ left, donri joined 10:39 miso2217 joined, pothos joined, y3llow joined, kthakore joined, plobsing_ joined, y3llow left, pothos left, rhr joined, Woodi joined, sjn joined, domm joined, literal joined, im2ee left, daemon left 10:40 scottp left, pothos_ joined, jdhoreOTG left, mkramer left, lue left, [particle] left, kaare_ left, sili left, djanatyn left, y3llow joined, pothos_ is now known as pothos, im2ee joined, daemon joined, s1n joined, Bucciarati joined, slavik joined, showi joined, sftp joined, shachaf joined, scottp joined, jdhoreOTG joined, mkramer joined, lue joined, [particle] joined, kaare_ joined, sili joined, djanatyn joined, eternaleye joined, donri left, whiteknight left, buubot_backup left, p6eval left, ascent_ left, dju left 10:41 orafu left, ZaphrodZenovka left, jasonmay left 10:42 orafu joined, ZaphrodZenovka joined, risou joined, tewk joined, fhelmberger joined, nine joined, lumi_ joined, LoRe_ joined, zamolxes joined, jasonmay joined, y3llow left, donri joined, whiteknight joined, buubot_backup joined, p6eval joined, skangas joined, DarthGandalf joined, yves joined, cotto_work joined, pmichaud joined, tadzik joined, BinGOs joined, beppu joined, jfried joined, ascent_ joined, dju joined, hubbard.freenode.net sets mode: +v p6eval, pothos left, y3llow_ joined 10:43 pothos_ joined, Khisanth left, y3llow_ is now known as y3llow, pothos_ is now known as pothos, Khisanth joined, sftp left, stepnem left 10:45 pochi joined, sunnavy_ joined, Trashlord joined, PacoLinux__ joined, yahooooo joined 10:48 sftp joined 11:05 jedai joined, jedai_ left 11:08 araujo joined
masak nom: sub foo { say "in the" }; &foo.wrap: sub { say "you're"; callsame; say "army now" }; foo 11:09
p6eval nom 184833: OUTPUT«Method 'wrap' not found for invocant of class 'Sub'␤ in <anon> at /tmp/QuHBfhHRkG:1␤ in <anon> at /tmp/QuHBfhHRkG:1␤␤»
masak perl6: sub foo { say "in the" }; &foo.wrap: sub { say "you're"; callsame; say "army now" }; foo
p6eval pugs: OUTPUT«*** No such method in class Sub: "&wrap"␤ at /tmp/Qpr_NUlQp3 line 1, column 27-84␤»
..rakudo a55346: OUTPUT«you're␤in the␤army now␤»
..niecza v8-57-ga89a9a6: OUTPUT«Unhandled exception: Unable to resolve method wrap in class Sub␤ at /tmp/ENYj3dPrih line 1 (MAIN mainline @ 1) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2049 (CORE C954_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2050 (CORE module-CORE …
masak master is still the master.
11:09 am0c left 11:20 MayDaniel joined 11:24 frhodes joined 11:31 kaare_ left 11:32 frhodes left, frhodes joined 11:39 sayu joined
masak relishes the Sunday-ness of it all 11:49
mberends :D
masak I'll do some $dayjob after lunch, and then I'll turn to the -n and -p post. 11:52
the macros post is next. maybe, just maybe, I'll get it out today too.
(macros are awesome, by the way) 11:53
mberends imagines an STL for Perl6 11:54
11:58 sayu left, frhodes left 11:59 sayu joined
JimmyZ hates STL for C++ 12:00
12:04 cotto left
dalek ast: 0124768 | (Martin Berends)++ | S32-str/sprintf.t:
niecza fudge sprintf("%C", ...)
12:07
masak mberends: I've sometimes been toying with the idea of building a library of several tree/heap/list/hash implementations, all with interfaces that map nicely to what Perl 6 already provides. sort of a Perl 6 version of Java Collections. 12:08
12:09 Khisanth left
mberends masak: do you mean a library in Java? 12:09
masak no, I mean a set of modules for Perl 6. 12:14
usually, we like to pretend that arryas and hashes can build anything in Perl. 12:15
and usually, they can. unless you care extra much about performance.
12:23 Khisanth joined 12:27 wamba left 12:29 cryptographrix joined 12:33 molaf joined, frhodes joined 12:38 yarp joined 12:58 frhodes_ joined 12:59 benabik_ joined 13:00 drbean joined, benabik left, benabik_ is now known as benabik 13:01 frhodes_ left 13:05 frhodes left 13:07 sayu left
masak so... when's the merge? 13:25
masak sits with the finger over "launch RT attack" button
13:29 abercrombie joined 13:30 cryptographrix left, envi left 13:38 jevin left 13:39 jevin joined 13:46 fission__ joined 13:47 fission__ left 13:49 drbean left 13:52 yarp left 13:54 cexsum joined 13:55 frhodes joined 14:01 isBEKaml joined, aber joined 14:02 abercrombie left 14:04 isBEKaml left 14:07 aber left, cryptographrix joined 14:10 cryptographrix left 14:26 mtk left 14:30 ccc_ joined
masak sorear: [re superpositions] have you read something by Scott Aaronson? he refers to the depiction of quantum mechanics as "light being both a wave and a particle" as "the Copenhagenists’ mind-numbing obfuscations". instead, he argues that QM can be seen from an information/probabilities/observables perspective. 14:35
cf. www.scottaaronson.com/blog/?p=277
he's quite possibly the most interesting (and funniest) scientist in the blogosphere. 14:36
arnsholt "The longer I blog, the more I despair of ever achieving my central goal in life, namely for everyone to like me." Life's eternal dilemma =) 14:38
14:39 frhodes left
masak his sedondary goal in life, given further down, is for everyone to understand him :P 14:40
rosettacode.org/wiki/Ternary_logic#Perl_6 is nice. TimToady++ 14:42
I laughed at <Foo Moo Too> :)
but from what I see of SQL, ternary logic is quite counterintuitive and has one fatal flaw:
in the heat of battle, you forget about the Moo case. 14:43
if val == answer { ... } elsif val != { ... } # great, I covered all the cases
er, s/val !=/val != answer/ 14:44
mberends Too be or not Too be, that is the question
masak right! even Hamlet was a dualist.
I believe Ovid has a blog post or Too on the topic. 14:45
arnsholt But in Perl you'll usually get a warning about undefined value in comparison, most of the time =)
masak arnsholt: right; I wasn't referring to that.
out-of band values like undef seem to work fine.
it's when you *assume* things like Excluded Middle and the code looks fine but isn't, that things go awry. 14:46
arnsholt Yeah, I regularly hit that in my adventures in SQL. I always forget IS NOT NULL when I need it
masak that's what I'm talking about.
cf. programmers.stackexchange.com/quest...ar-mistake which is more about NULL in programming languages than in DSLs like SQL, but still. 14:47
arnsholt Forgetting to use LEFT/RIGHT JOIN is even more insidious, since it'll result in data just disappearing
masak arnsholt: that's what tests are for ;) 14:48
arnsholt Tests? Preposterous! ;p 14:49
I've actually got a (very small) test suite for my statistical inference modules 14:50
But writing the tests to make sure you've implemented Viterbi's algorithm correctly is kinda tricky
Especially for things more complicated than HMMs 14:51
14:54 birdwindupbird joined 14:59 Trashlord left 15:03 Trashlord joined 15:04 newbe-ru joined
masak .oO( they make you go "HMM"... ) 15:04
arnsholt Indeed they do ^_^ 15:08
15:16 ccc_ left 15:17 mj41 joined 15:24 mkramer left 15:25 mkramer joined 15:26 mj41 left
dalek ecza: 6bc1637 | (Martin Berends)++ | / (2 files):
[lib/Printf.cs] now passes 40/44 sprintf tests with 1 skip
15:31
15:33 araujo left
mberends the sprintf spectests look very minimal - will look what p5 has 15:33
15:33 araujo joined
masak mberends++ 15:33
15:39 birdwindupbird left 15:40 birdwindupbird joined 15:42 mj41 joined 15:43 jevin left 15:46 jevin joined
flussence niecza: printf('%d %1$x', 45); 15:47
p6eval niecza v8-57-ga89a9a6: OUTPUT«===SORRY!===␤␤Undeclared routine:␤ 'printf' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 685 (CORE die @ 2) ␤ at /home/p6eval/niecza/src/STD.pm6 line 1136 (STD P6.comp_unit @ 36) ␤…
flussence whoops...
I'll wait until it updates :)
mberends niecza: say sprintf('%d %1$x', 45); # flussence: sprintf, not printf yet 15:49
p6eval niecza v8-57-ga89a9a6: OUTPUT«%d %1$x␤»
mberends hmm 15:50
yes, wait for the rebuild, it works locally 15:54
evalbot rebuild niecza 15:56
p6eval OK (started asynchronously)
mberends niecza: say sprintf('%d %1$x', 45) 15:58
p6eval niecza v8-58-g6bc1637: OUTPUT«45 2d␤»
15:58 JimmyZ left 15:59 sayu joined 16:00 sayu left, sayu joined
mberends p5 t_op_sprintf.t has 540 tests and t_op_sprintf2.t has 1368, p6 has 44 16:02
16:13 abercrombie joined
abercrombie Hi, my $a='f'; sub f {}; how to call f() from $a ? 16:21
16:24 ZaphrodZenovka left 16:25 ZaphrodZenovka joined, renormalist joined 16:28 mj41 left 16:31 mberends_ joined 16:33 mberends_ is now known as mberends
plobsing_ abercrombie: based on a skimming of synopses s06 and s10, I'd wager you'd use 'our sub f {}' and 'OUR::($a)();' 16:40
perl6: my $a='f'; our sub f {}; OUR::($a)() 16:41
p6eval rakudo a55346: OUTPUT«===SORRY!===␤Indirect name lookups not yet implemented at line 22, near "()"␤»
..pugs: OUTPUT«*** ␤ Unexpected "OUR"␤ expecting ";", Doc block, block declaration, declaration, construct or expression␤ at /tmp/WBevexr1CG line 1, column 26␤»
..niecza v8-58-g6bc1637: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in class Any␤ at /tmp/KtazdfHsEl line 1 (MAIN mainline @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2049 (CORE C954_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 2050 (CO…
gfldex nom: my $a='f'; our sub f {}; OUR::($a)() 16:42
p6eval nom 184833: OUTPUT«===SORRY!===␤Combination of indirect name lookup and call not (yet?) allowed at line 1, near ""␤»
plobsing_ unfortunately it appears none of the implementations implement it.
abercrombie: often there are better ways to accomplish tasks than using the symbol table like a hash. what are you trying to do? 16:43
16:57 plobsing_ left
masak one solution that readily suggests itself is... to use a hash ;) 16:59
17:16 jevin left 17:18 whiteknight left 17:19 whiteknight joined, jevin joined
abercrombie Oh, I just wonder whether there is a prefix for "function context" like &($a) 17:19
masak no. 17:21
if something isn't already a function, there isn't much hope of contexting it into one.
if it already is a function, you can already call it and have other functiony fun with it.
abercrombie I see. So the best way to do it is like what plobsing said 17:22
17:22 newbe-ru left 17:23 cexsum left
abercrombie or I can use eval to do it just like in perl5 17:23
nom: my $a='f'; sub f{say "here"}; eval($a) 17:24
p6eval nom 184833: OUTPUT«here␤»
masak rakudo: my %h = foo => { say "foo called" }, bar => { say "bar called" }; sub call($function) { die "$function doesn't exist" unless %h.exists($function); %h{$function}() }; call 'foo'; call 'bar'; call 'fnordookie' 17:25
p6eval rakudo a55346: OUTPUT«foo called␤bar called␤fnordookie doesn't exist␤ in 'call' at line 22:/tmp/pH8IdxhqeS␤ in main program body at line 22:/tmp/pH8IdxhqeS␤»
abercrombie gotcha 17:26
masak you *could* use &eval, yes. but it is slightly too big a gun when a simple hash of Callable will do.
abercrombie yes, I agree
Thanks guys. 17:27
masak curtsies
abercrombie It seems every perl guru likes to use "foo" and "bar" 17:28
masak yes. we need new magic words, those are getting worn ;) 17:29
abercrombie "the origin of both is the U.S. Army phrase FUBAR (an acronym which, in discreet language, represents Fouled Up Beyond All Recognition/Repair" 17:31
masak rakudo: my %h = kitty => { say "foo called" }, puppy => { say "bar called" }; sub call($function) { die "'$function' doesn't exist" unless %h.exists($function); %h{$function}() }; call 'kitty'; call 'puppy'; call 'big freakin DRAGON'
p6eval rakudo a55346: OUTPUT«foo called␤bar called␤'big freakin DRAGON' doesn't exist␤ in 'call' at line 22:/tmp/uHHw3eIM3u␤ in main program body at line 22:/tmp/uHHw3eIM3u␤»
masak oops :)
rakudo: my %h = kitty => { say "kitty called" }, puppy => { say "doggy called" }; sub call($function) { die "'$function' doesn't exist" unless %h.exists($function); %h{$function}() }; call 'kitty'; call 'puppy'; call 'big freakin DRAGON'
p6eval rakudo a55346: OUTPUT«kitty called␤doggy called␤'big freakin DRAGON' doesn't exist␤ in 'call' at line 22:/tmp/BuN99fIJxu␤ in main program body at line 22:/tmp/BuN99fIJxu␤»
masak er.
Tene masak: for a hash of callable, I prefer something more like %h.exists($function) ?? %h{$function}() !! %h<DEFAULT>()
masak rakudo: my %h = kitty => { say "kitty called" }, puppy => { say "puppy called" }; sub call($function) { die "'$function' doesn't exist" unless %h.exists($function); %h{$function}() }; call 'kitty'; call 'puppy'; call 'big freakin DRAGON' 17:32
p6eval rakudo a55346: OUTPUT«kitty called␤puppy called␤'big freakin DRAGON' doesn't exist␤ in 'call' at line 22:/tmp/mnAStZz7ye␤ in main program body at line 22:/tmp/mnAStZz7ye␤»
masak Tene: fair enuf.
Tene: why not %h{ %h.exists{$function} ?? $function !! 'DEFAULT' }, ooc?
17:32 cotto joined
masak er, %h{ %h.exists{$function} ?? $function !! 'DEFAULT' }(); 17:33
17:33 araujo left
masak .oO( Bikeshedders Anonymous ) 17:33
Tene masak: I think what I've actually used is more like (%h{$function} // %h<DEFAULT>)()
masak yes, nice. 17:34
Tene I didn't mean that specific syntax, though, just that I prefer putting a fallback action in the callback table
masak Tene: it would be nice to have hashes with settable defaults, too.
Tene: yes, I should remember that trick more often. it's nice to make things in-band when possible. 17:35
Tene I've always been skeptical of the utility of that, but maybe that's just because it's unfamiliar
masak well, the utility is offset by some action-at-adistance, I guess. 17:36
17:39 araujo joined 17:42 araujo left 17:46 jevin left, jevin joined 17:48 araujo joined, araujo left, araujo joined, araujo left 17:50 araujo joined 17:51 donri left
meth hey timtoady ? 17:55
17:57 wamba joined 17:58 jevin left, abercrombie left 18:03 jevin joined 18:04 kannah joined 18:09 sftp left 18:10 uvtc joined 18:11 sftp joined
uvtc masak: I liked your recent "why tests will change the way you code" blog post. I think a great followup would be a tutorial on writing tests for your Perl 6 code. 18:11
masak: also thought it was good that you included a summary at the end of your blog post. 18:12
masak thanks! 18:16
I'll have to think a bit on whether I have something to say about writing tests for one's Perl 6 code.
uvtc masak: I just mean something basic. As in, use $this module, structure your directories like $that, run your tests $like-so. 18:17
masak: or maybe there's an advent calendar article I'm missing... 18:19
meth some of the things look really nice in perl6 but then again it's becoming a lisp dialect lol
uvtc masak: ah, ok. Found this perl6advent.wordpress.com/2009/12/0...4-testing/ . 18:20
masak ah, yes. 18:23
you'll note that my post doesn't mention Perl 6, by the way. when I'm excited about tests, I'm language-agnostic ;)
I wrote tests in C a few weeks ago.
18:24 soh_cah_toa joined, donri joined
masak what might be specific to the way testing is done with Perl 6 are the ways all the DI/mocking/faking/stubbing stuff is set up. 18:25
jnthn++'s github.com/jnthn/test-mock/ comes to mind. 18:26
uvtc Perhaps users can just get up to speed with the basics by just looking at what some of the other modules at modules.perl6.org are doing... 18:27
masak this is where I have one of my blind spots, I guess. 18:28
I hadn't considered it something people might want to learn until now.
as I wrote, it's just a list of assertions :P 18:29
soh_cah_toa if it means anything, i'm currently writing a chapter on p6 testing for "Using Perl 6" 18:30
masak \o/ 18:32
soh_cah_toa i just haven't pushed my work so far b/c i can't get the build process to work for some reason :\
uvtc soh_cah_toa, You mean perl6/book? That sounds great. 18:33
soh_cah_toa yup
masak soh_cah_toa: that's sometimes been my main trouble with the book as well.
18:33 uvtc left
flussence I just wrote something horrible :( 18:33
masak soh_cah_toa: if you don't mention DI in that chapter, I'll add it.
flussence $text.flip.split('|', 2)».flip
masak flussence: looks good to me.
flussence yeah, but eww.
soh_cah_toa masak: di? 18:34
flussence (split's $limit should work like substr IMO - *-2)
moritz appears 18:35
PerlJam flussence: what would that mean exactly?
benabik nom: my $text='foo|bar|baz'; $text.flip.split('|', 2)».flip.perl.say 18:36
p6eval nom 184833: OUTPUT«("baz", "foo|bar")␤»
flussence I want to chop off something from the end separated by '|', while leaving the beginning of the string intact
18:37 donri left
PerlJam flussence: that doesn't sound like split's job. 18:38
masak moritz! \o/
soh_cah_toa: see my recent blog post. strangelyconsistent.org/blog/why-te...y-you-code
soh_cah_toa: and then ask if I didn't explain it clearly enough. 18:39
18:39 birdwindupbird left
flussence PerlJam: you're probably right, I could try a regex there. 18:39
soh_cah_toa masak: nice. i also added a small section like this explaining the benefits of testing and its relation to super awesome p6 18:43
masak: your post gives me some ideas to expand upon
moritz has a wifi driver that kernel-panics if X is running while the first connection is being made 18:45
18:45 abercrombie joined
moritz booting in "safe" mode, then bringing up the interface and then 'telinit 5' works though :-) 18:45
benabik moritz: Sounds LTA. 18:46
soh_cah_toa nopaste.snit.ch/75475
moritz benabik: it is
soh_cah_toa could anybody help explain why the perl6/book build fails in that nopaste?
moritz benabik: broadcom closed source fu
soh_cah_toa: seems that some components of your latex installation are too old (?) 18:48
benabik moritz: I don't see a reason why X should bother WiFi though.
moritz: Other than the fact that Broadcom is Doing It Wrong.
moritz benabik: it doesn't. But kernel-level C code doesn't have any kind of protection 18:49
soh_cah_toa moritz: yeah, it make no sense. i have no idea how to "update" it then
moritz yep, Doing It Wrong is a very accurate description
18:49 sayu left
moritz soh_cah_toa: the good news is that if you only want to hack the contents (and not the build system), 'make html' should work 18:50
soh_cah_toa ah, didn't notice that make target
soh_cah_toa tries it out
moritz I think it's underdocumented 18:51
18:51 meth left
soh_cah_toa yup. that works. although a pdf version would be better but at least i can check that it renders properly. moritz++ 18:52
dalek ok: f2043cb | moritz++ | README:
mention "make html"
soh_cah_toa :)
flussence moritz: which kernel ver? I think Broadcom recently caved in and went open source with their wifi driver 18:53
18:54 pernatiy joined
moritz flussence: first tried a 3.0-rc3 or so, then an old-but-good shipped with Debian 18:54
flussence: and it's only the firmware that is closed source, but that's what seems to cause the problems
flussence ah
18:55 jevin left
flussence vaguely remembers having to use ndiswrapper on an atheros once, not fun 18:56
18:56 plobsing joined, jevin joined
moritz the really annoying part is that this laptop was supposed to have an Intel wifi chip 18:56
and when I complained, the customer service told me "oh, they are technically equivalent. You can have a 10€ voucher to compensate for your inconvenience" 18:57
the difference is that intel has much better drivers
18:59 abercrombie left
flussence I think just about every wifi card I've used has required terrible drivers at some point. It'll probably get better in a few months :) 18:59
moritz right
flussence (I still have that atheros one, but I use it for my access point now) 19:00
19:01 kannah left 19:04 donri joined
moritz nom: sub f() { say "in f" }; my $name = 'f'; &::($name).() 19:07
p6eval nom 184833: OUTPUT«in f␤»
moritz phenny: tell abercrombie about irclog.perlgeek.de/perl6/2011-08-28#i_4337460 (calling functions by name) 19:08
phenny moritz: I'll pass that on when abercrombie is around.
19:09 lateau_ left
masak nom: sub f { "f" }; say &::(f)() 19:12
p6eval nom 184833: OUTPUT«f␤»
plobsing how is that not a barew... omg... mind blown 19:14
masak :D 19:16
yes, that's two calls to &f 19:17
benabik nom: sub f { 'g' }; sub g { say 'in g' }; say &::(f)()
p6eval nom 184833: OUTPUT«in g␤Bool::True␤»
19:18 abercrombie joined 19:19 uvtc joined
uvtc soh_cah_toa, masak : I also had problems building perl6/book, though I don't recall the specifics. IIRC, there were a number of font dependencies (one even involving installing "acrobat" I think). 19:21
I'd begun making some minor fixes, but then when I couldn't build it, got sidetracked and then didn't come back to it. 19:22
19:32 kaare_ joined 19:36 Reaganomicon joined
sorear good * #perl6 19:58
soh_cah_toa is anybody willing to add a new module to modules.perl6.org? i don't know how and i don't have commit access to panda anyway 20:00
github.com/soh-cah-toa/p6-irc-utils
sorear masak: I have read pretty much everything by Aaronson and Yudkowsky, iirc. 20:01
<3 intuititionistic logic 20:02
masak :) 20:04
masak looks up Yudkowsky
flussence soh_cah_toa: will do (unless someone else is already doing it)
masak oh, Less Wrong.
soh_cah_toa flussence: great, thanks
dalek osystem: 1f45c21 | flussence++ | META.list:
Add soh_cah_toa++'s p6-irc-utils to modules list
20:05
soh_cah_toa yay \o/ 20:06
flussence (it takes a while for the site to update, don't panic)
soh_cah_toa yeah
20:12 whiteknight left 20:13 [Coke] left, whiteknight joined
mberends hi sorear: your last help worked, initial sprintf() pushed. Next question: how can I cause a die() to happen from C# ? 20:14
20:14 [Coke] joined 20:16 y3llow left, pothos left 20:17 molaf left, y3llow joined 20:18 pothos_ joined, pothos_ is now known as pothos
sorear mberends: throw new NieczaException("Error message") 20:19
dalek ecza: c873f75 | sorear++ | src/STD.pm6:
Import TimToady's empty listop checks
mberends sorear: thanks again
20:20 tty234 joined 20:24 pernatiy left
soh_cah_toa nopaste.snit.ch/75492 20:26
i'm having some problems using regexes. i'd be really happy if somebody could look at that nopaste
diakopter . 20:27
phenny diakopter: 09:01Z <sorear> tell diakopter *frown* you've checked in half a megabyte of versions of lib/Solution/Niecza/Niecza.pidb. Is it really necessary to have this file under version control? It looks like debug information to me.
diakopter k
20:27 jedai left
masak soh_cah_toa: I'm not aware that you can do subrule calls inside charclasses like that. 20:28
20:28 im2ee_ joined
benabik soh_cah_toa: It looks like complex matches _`-^|\{}[] as a string, not any single element of that string. 20:28
soh_cah_toa damn
masak it's an interesting question whether an interpolated string would work. I don't know. 20:29
20:30 colomon joined
masak colomon! \o/ 20:31
colomon o/
colomon has barely survived two days of giving music workshops and "A Day Out With Thomas" (the Tank Engine)
20:32 im2ee left 20:34 im2ee_ is now known as im2ee
masak glad you survived. 20:34
20:35 pernatiy joined 20:40 pernatiy left, pernatiy joined
sorear colomon! 20:43
20:46 uvtc left 20:50 mj41 joined 20:53 Mowah joined, envi joined
sorear niecza: say "x" eq any<x y z> 20:54
p6eval niecza v8-59-gc873f75: OUTPUT«===SORRY!===␤␤The 'any' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/f2TGqt2E6E line 1:␤------> say "x" eq any⏏<x y z>␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/…
TimToady \o/
phenny TimToady: 09:19Z <sorear> tell TimToady your problem was you used "multi" for the operators. Precedence needs to apply to the entire sub, not specific candidates
TimToady: 09:20Z <sorear> tell TimToady (that said, niecza doesn't know how to propagate traits from proto to dispatch either - precedence will only work on "only" subs)
TimToady: 09:42Z <sorear> tell TimToady In your last std commit, what's the comment about P5isms and P6isms about?
20:54 PacoLinux__ left
sorear scratch the last one, I figured it out 20:54
TimToady nodnod
sorear however I'm still wondering about how to map it into traits
is error-no-args(1), is error-no-args(2) feels wrong 20:55
TimToady it's like <i> and <b> instead of <em> etc
is 'p5-defaulting' is more like 20:56
sorear nah, it's more like J's insanity of spelling sin cos and tan(of x) 1 o. x, 2 o. x, and 3 o. x respectively
masak o.O
I'd just like to point out that <i> and <b> are not deprecated. just scaled back. :)
TimToady no, I mean 1 would be "is defaulting-in-p5" and 2 is something else 20:57
is error-prone :)
is constructor-that-makes-little-sense-empty 20:58
something semantic
I'm agreeing that 1 and 2 is quite wrongish
20:59 kaare_ left
TimToady "Never put magic numbers into your program except 0 and 1--and we're not sure about 1." 20:59
std: any<foo bar> 21:00
p6eval std e3c970e: OUTPUT«ok 00:01 118m␤»
TimToady /o\
<i> stands for "intense" and <b> for <bombastic> :) 21:06
oops, failure of parallelism...
masak <:)> 21:07
diakopter std: <>
p6eval std e3c970e: OUTPUT«===SORRY!===␤Unsupported use of <>; in Perl 6 please use lines() to read input,␤ or ('') to represent the null string,␤ or () to represent Nil at /tmp/_Qx6weLjZw line 1:␤------> <⏏>␤Parse failed␤FAILED 00:01 117m␤»…
masak std: <STDIN>
p6eval std e3c970e: OUTPUT«===SORRY!===␤Unsupported use of <STDIN>; in Perl 6 please use $*IN.lines at /tmp/tzo8JKSYEc line 1:␤------> <⏏STDIN>␤Parse failed␤FAILED 00:01 117m␤»
mberends TimToady++ # :-) (magic numbers)-- 21:08
TimToady niecza: WHAT
p6eval niecza v8-59-gc873f75: OUTPUT«===SORRY!===␤␤The 'WHAT' listop may not be called without arguments (please use () or whitespace to clarify) at /tmp/1uRXmBm00D line 1 (EOF):␤------> WHAT⏏<EOL>␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecz…
TimToady I remember feeling guilty for lumping WHAT et al. in with the p5 ops at first
glad there's now a category of p6 listops that are suspicious of 0 args 21:09
I suppose it could be argued that all empty listops should require parens
masak well, it *could* be argued... :( 21:10
TimToady but then there's things like: constant ∅ = set;
(probably won't work though) 21:11
niecza: constant ∅ = set;
p6eval niecza v8-59-gc873f75: OUTPUT«===SORRY!===␤␤Malformed constant at /tmp/V9Hacl6paN line 1:␤------> constant ⏏∅ = set;␤␤Parse failed␤␤»
TimToady yeah, ∅ isn't alphanumeric
not sure whether we should make it a little easier to define terms that aren't alpha without resorting to term:<∅> 21:12
hmm
niecza: constant term:<∅> = set;
p6eval niecza v8-59-gc873f75: OUTPUT«===SORRY!===␤␤Colonpair traits NYI at /tmp/sbzjHPP69u line 1:␤------> constant term:<∅> ⏏= set;␤␤Undeclared routine:␤ 'set' used at line 1␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.settin…
21:12 wamba left
TimToady that might be allowed, I suppose 21:12
biab & 21:13
21:16 ponbiki left 21:23 natureboy left
dalek ecza: c7ebb88 | diakopter++ | lib/Solution/Niecza/Niecza.pidb:
delete Niecza.pidb
21:29
masak perl6: .= uc 21:30
p6eval rakudo a55346: OUTPUT«===SORRY!===␤Confused at line 22, near ".= uc"␤»
..niecza v8-59-gc873f75: OUTPUT«===SORRY!===␤␤Preceding context expects a term, but found infix .= instead at /tmp/52QNJfe_3L line 1:␤------> <BOL>⏏.= uc␤␤Parse failed␤␤»
..pugs: OUTPUT«*** ␤ Unexpected " uc"␤ expecting ".", "\187", ">>", "=", "^", operator name, qualified identifier, variable name, "...", "--", "++", "i", array subscript, hash subscript or code subscript␤ at /tmp/cWbICO4N71 line 1, column 3␤»
masak ok, fair enough :)
benabik nom: .=uc
p6eval nom 184833: OUTPUT«Method 'uc' not found for invocant of class 'Any'␤ in method dispatch:<.=> at src/gen/CORE.setting:619␤ in <anon> at /tmp/72oTo6YIOt:1␤ in <anon> at /tmp/72oTo6YIOt:1␤␤»
benabik Hm. perl6 doesn't run nom?
masak indeed not. 21:31
benabik nom: .= uc
p6eval nom 184833: OUTPUT«===SORRY!===␤Confused at line 1, near ".= uc"␤»
21:31 Mowah left
benabik Without a space it's a mutating method call on $_. With, it gets confused. 21:31
21:32 mj41 left
dalek ecza: 9e4b0e4 | (Martin Berends)++ | lib/Solution/Niecza/Niecza.pidb:
Merge branch 'master' of github.com:sorear/niecza
21:32
21:33 donri left
sorear mberends: reviewing your code for diakopter... I'm wondering why you chose to make an intermediate list of PrintfFormat objects instead of fusing the loops. 21:36
21:37 envi left
mberends sorear: it was for recent hysterical raisins, we divided the coding into two halves and the PrintFormat list was the interface between them 21:38
flussence is coming to a realisation that I'm implementing Pod::To::HTML in an insane way 21:39
(there's tree-walking stuff, and various types of stringification, and I'm trying to squish them all into the same place...)
mberends sorear: with hindsight, we can refactor it and merge the parts. It was a mainly to enable two developers to work relatively independently. 21:41
flussence seen tadzik 21:42
aloha tadzik was last seen in #perl6 11 hours ago joining the channel.
mberends sorear: that will happen, there are many features NYI, even though it now passes all the spectests. Adding more sprintf spectests would be nice LHF for someone. 21:43
lue hello planet o/
mberends o/ 21:44
flussence mberends: there's a grammar for sprintf in the specs. masak++ suggested to me a while ago that there's a way to make GGE generate all combinations of valid strings for it, I didn't really get anywhere with it though. 21:46
masak if there's any way I can help...
there's a gist shows how to do it.
flussence
.oO( the grammar's only about 5 lines, I probably could've done it using X~ )
21:47
.oO( wouldn't have been as cool though... )
21:48
lue [compiling rakudo/parrot locally, hoping it works...]
mberends flussence: thanks, I saw it in S32::Str. I'd like to see the generated combinations, or perhaps add the generator to the test script. Otoh, many possibly redundant tests will only slow down development. 21:49
21:51 mjreed joined
mberends
.oO( we need a 'make slowtest' for people with excess CPU capacity )
21:52
mjreed Is there a way yet to import a module/file in Rakudo 11.04? If so, what is it? Both 'use' and 'import' yield complaints about undefined subroutines. 21:53
masak mjreed: er. 21:55
'use' has been implemented since 2008, I think.
hence modules.perl.org 21:56
mberends mjreed: try it with 'use Test;' to determine whether the problem is with your built Rakudo or your module. Rakudo's 'use' definitely works.
masak er, modules.perl6.org
mjreed use Test; returns _block85, so I guess that works.
sorear mberends: make stresstest I think it's called 21:57
masak yes, that's just the REPL.
sorear mberends: several test files are blacklisted from 'spectest' for being too slow.
mjreed Ok, so it's not finding the module, I guess. In which case I shall simply note that "Could not find sub &use" is an LTA error message. :) 21:58
mberends sorear: thanks, I remember now
sorear masak: any comment about my comment about proof systems, testing, and designed-in redundany?
flussence rakudo: use nonexistent-module
p6eval rakudo a55346: OUTPUT«===SORRY!===␤Unable to find module 'nonexistent-module' in the @*INC directories.␤(@*INC contains:␤ lib␤ /home/p6eval/.perl6/lib␤ /home/p6eval//p2/lib/parrot/3.6.0-devel/languages/perl6/lib␤ .)␤»
sorear rakudo: use Test ();
p6eval rakudo a55346: ( no output )
mjreed rakudo: use 'nonexistent-module'; 21:59
p6eval rakudo a55346: OUTPUT«Could not find sub &use␤ in main program body at line 22:/tmp/h3EWFfEQaz␤»
mjreed so since I passed a string it was trying to call 'use' on that string.. 22:00
lue rakudo: require 'nonexistent-module'; # just curious
p6eval rakudo a55346: OUTPUT«Unable to find module 'nonexistent-module' in the @*INC directories.␤(@*INC contains:␤ lib␤ /home/p6eval/.perl6/lib␤ /home/p6eval//p2/lib/parrot/3.6.0-devel/languages/perl6/lib␤ .)␤ in main program body at line 26:src/Perl6/Module/Loader.pm␤»
mjreed Oddly, it's not failing for nonexistent modules for me, though.
rather, 'use' is, but 'import' isn't. sorry. 22:02
masak blog post! strangelyconsistent.org/blog/dash-n-and-dash-p
mjreed Yay! 22:03
Nitpick: "There's a -p flag that also does the loop thing, but it prints $_ at the end of the loop:" - "at the end of the loop" sounds like it doesn't print until it's done with the whole file.
masak it does indeed. fixing. 22:04
mjreed ""at the end of each time through the loop", maybe, if you want to avoid scaring people with the "iteration" word. :)
masak I don't want to avoid that ;)
TimToady mind you, the way rakudo does it isn't how it's specced either :) 22:05
masak indeed. 22:06
I just want -n and -p more than I want to wait for the correctest solution.
TimToady I though you was gonna talk about settings when I +1'd it
masak sorry :P
TimToady *thought
and you got my hopes up by talking about "elegance" 22:07
masak no, I just like that Rakudo deals with ASTs where Perl 5 deals with text.
to me, that *is* elegance! :)
TimToady is it elegant to muck with ASTs when you can have quasi?
that's what alternate settings really are
22:08 molaf joined
TimToady with the YOU_ARE_HERE being the quasi-unquote 22:08
flussence unfortunately knows enough about php to remember that it does the same sort of thing as p5 there, for double quote interpolation
lue marvels at the existence of an 'eskimo operator'
mberends masak++: those kissing Eskimos look *so* much like Bobby Tables :) 22:09
masak mberends: aye.
mberends they're cousins, I'll bet 22:10
masak or circles.
TimToady: maybe I'll have to write a followup post, then, where I talk about settings. ;)
TimToady hygienic macros are kinda like black holes, and our entire UNITverse is inside one 22:11
benabik --setting=-p ? 22:12
lue mberends: you mean little Robert'); DROP TABLE Students; ? 22:13
masak TimToady: when jnthn and I were strolling around Riga on the last day, we realized that quasiquotes will have to do funny things with all kinds of declarations.
oh, I wrote a gist about that, didn't I? 22:14
22:14 im2ee left
mberends lue++ # xkcd.com/327/ 22:14
masak gist.github.com/1156662
lue I actually had to check that to remember exactly what his name was.
masak well, they *call* him "little Bobby Tables" ;) 22:15
jlaire .u ◌
phenny U+25CC DOTTED CIRCLE (◌)
masak 'night, #perl6
TimToady but what is his name called?
lue TimToady: a hilarious prank 22:16
masak nice, humpty-dumpty.
flussence I feel guilty for ever posting this :( - stackoverflow.com/questions/538350/...467#538467
lue g'night masak o/
22:16 masak left
jlaire flussence: interesting... 22:17
mjreed flussence: wow, just when I thought I'd run out of new php "quirks" to discover...
22:19 drbean joined 22:22 kst left 22:30 mjreed left
TimToady sorear++, added precedence to operators in rosettacode.org/wiki/Ternary_logic#Perl_6 22:31
soh_cah_toa perl6: my @foo = "\x01".."\xff" 22:37
p6eval rakudo a55346: OUTPUT«(timeout)» 22:38
..pugs: ( no output )
..niecza v8-62-g9e4b0e4: OUTPUT«(timeout)Potential difficulties:␤ @foo is declared but not used at /tmp/BVXQGsdn_x line 1:␤------> my ⏏@foo = "\x01".."\xff"␤␤»
TimToady use ... for that, for now
not ..
soh_cah_toa perl6: my @foo = "\x01"..."\xff"
p6eval niecza v8-62-g9e4b0e4: OUTPUT«Potential difficulties:␤ @foo is declared but not used at /tmp/HpuDVXunnA line 1:␤------> my ⏏@foo = "\x01"..."\xff"␤␤Unhandled exception: Unable to resolve method ord in class Str␤ at /home/p6eval/niecza/lib/CORE.setting line 1760 (COR…
..pugs: OUTPUT«*** ␤ Unexpected "\"\\"␤ expecting operator, "," or term postfix␤ at /tmp/pwap9eEPoK line 1, column 20␤»
..rakudo a55346: ( no output )
TimToady perl6: my @foo = "\x01"..."\xff"; say @foo.elems; 22:39
p6eval niecza v8-62-g9e4b0e4: OUTPUT«Unhandled exception: Unable to resolve method ord in class Str␤ at /home/p6eval/niecza/lib/CORE.setting line 1760 (CORE C789_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1795 (CORE C822_ANON @ 2) ␤ at /home/p6eval/niecza/lib/CORE.setting line…
..rakudo a55346: OUTPUT«255␤»
..pugs: OUTPUT«*** ␤ Unexpected "\"\\"␤ expecting operator, "," or term postfix␤ at /tmp/cspXWRZJK4 line 1, column 20␤»
soh_cah_toa oh yeah, i think i brought that up before. '..' should be promoted to '...' but isn't 22:41
forgot that
i wouldn't have to worry about that at all if escape sequences worked in character classes :( 22:42
TimToady yeah
soh_cah_toa waiting for qregex
22:42 MayDaniel left
TimToady niecza: $_ = "foo\n"; say ~/<-[\0..\x1f]>*/ 22:44
p6eval niecza v8-62-g9e4b0e4: OUTPUT«Regex()<instance>␤»
TimToady niecza: $_ = "foo\n"; say ~ ($_ ~~ /<-[\0..\x1f]>*/)
p6eval niecza v8-62-g9e4b0e4: OUTPUT«foo␤»
TimToady looks like they work in niecza
soh_cah_toa yeah 22:45
oh that reminds me, what's the difference between <-alpha> and <!alpha>? not just alpha but any rule. S05 mentions it briefly but i don't really understand it 22:46
flussence I think !'s an assertion...
TimToady - has a width of . while ! has 0 width
soh_cah_toa oh right, it's not captured in the match object
TimToady it's just a lookahead 22:47
<-foo> is really <!foo>. <-- including the dot
soh_cah_toa ah, i didn't notice the '.' in /<!before <alpha>> ./ so i thought there was a typo ;) 22:48
22:49 kst joined
soh_cah_toa alright, got it 22:49
another p6 question: what's does ::T specify? i see it a lot in subroutine signatures 22:51
TimToady captures the type of the argument en passant
and gives it a name T
it's a bit of genericity writ small 22:52
soh_cah_toa is that just when it's ::T or ::anything? like ::Date
TimToady anything
:: is sort of a pseudo-sigil 22:53
soh_cah_toa would it be safe to say they're like c++ templates or java's generics?
TimToady or maybe the other way around :) 22:54
we've been working on roles for a long time...
soh_cah_toa so since you can specify anything after the ::, that means that ::Real $epsilon does not mean $epsilon is of type Real. is just happens to be the same name as the type Real? 22:57
TimToady you've just shadowed the name "Real", since the real Real is in an outer lexical scope
soh_cah_toa got it
TimToady and you could still get at it with OUTER::Real, presumably, or CORE::Real
soh_cah_toa rakudo: sub foo(::T $a) { say $a.WHAT.perl }; foo('foobar') 22:59
p6eval rakudo a55346: OUTPUT«Str␤»
soh_cah_toa rakudo: sub foo(::BlahBlahBlah $a) { say $a.WHAT.perl }; foo(42) 23:00
p6eval rakudo a55346: OUTPUT«Int␤»
soh_cah_toa cool
TimToady rakudo: sub foo(::T $a) { say T.perl }; foo(42)
p6eval rakudo a55346: OUTPUT«Int␤»
23:00 envi joined
soh_cah_toa yeah, that's the same thing then. i see 23:00
TimToady rakudo: sub foo(::T $a, T $b) { say T.perl }; foo(42,'oops') 23:01
p6eval rakudo a55346: OUTPUT«Constraint type check failed for parameter '$b'␤ in 'foo' at line 22:/tmp/x7D1RKu_nw␤ in main program body at line 22:/tmp/x7D1RKu_nw␤»
23:02 molaf_ joined
TimToady nap & 23:03
23:06 molaf left 23:34 Psyche^ joined 23:38 Patterner left, Psyche^ is now known as Patterner 23:47 rgrau joined 23:49 abercrombie left 23:59 wolfman2000 joined