»ö« 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:02 daxim_ joined, daxim left 00:03 Rotwang left 00:09 sftp left 00:12 sftp joined 00:18 sftp_ joined, sftp left 00:21 wallberg left, silent_h_ left 00:25 mikemol left 00:29 cdarroch left, tylercurtis left 00:32 leprevost joined 00:33 impious left 00:37 baest_ joined 00:40 risou joined 00:45 risou left 00:46 am0c left 00:57 mtk left 01:00 noganex_ joined 01:01 woosley joined 01:03 flatwhatson joined, noganex left 01:05 mtk joined 01:08 tylercurtis joined 01:11 JimmyZ__ left 01:16 orafu left 01:17 orafu joined 01:18 whiteknight left 01:35 _jaldhar left, hudnix left 01:36 _jaldhar joined 01:39 hudnix joined 01:45 jferrero left 02:00 DarthGandalf joined, orafu left 02:01 cosimo joined 02:04 orafu joined, s1n joined 02:10 donri left, hudnix left, leprevost_ joined 02:12 leprevost left 02:26 petdance joined 02:34 mikemol joined 02:53 leprevost_ left 02:59 petdance left 03:11 meswami joined 03:15 petdance joined 03:18 justatheory joined 03:23 Su-Shee_ joined 03:25 Su-Shee left 03:35 Alias joined
ggoebel perl6: 'hello'.flip.say 03:35
p6eval niecza v4-54-g2a67dcf: OUTPUT«Unhandled exception: Unable to resolve method flip in class Str␤ at /tmp/lp4F8tgjzB line 1 (MAIN mainline @ 1)␤ at /home/p6eval/niecza/lib/CORE.setting line 1307 (CORE C549_ANON @ 2)␤ at /home/p6eval/niecza/lib/CORE.setting line 1308 (CORE module-CORE @ 39)␤ at 03:36
../home/p6eval/nie…
..rakudo 4bf132: OUTPUT«olleh␤»
..pugs: OUTPUT«*** No such method in class Str: "&flip"␤ at /tmp/YEjJ5tnV6s line 1, column 1 - line 2, column 1␤»
ggoebel phenny: tell moritz let me know where to send a postcard for your nephew 'moc tod liamg ta lebeog tod tterrag'.flip.say 03:37
phenny ggoebel: I'll pass that on when moritz is around.
03:38 am0c joined 03:52 GinoMan joined 03:55 orafu left 03:56 orafu joined, satyavvd joined 04:07 GinoMan left 04:08 ggoebel left, ggoebel joined 04:15 am0c^ joined 04:18 arnsholt joined 04:19 nymacro joined 04:23 kaare_ joined 04:50 petdance left 04:52 satyavvd left 05:01 JimmyZ joined 05:10 birdwindupbird joined 05:15 sftp_ left 05:31 satyavvd joined 05:41 am0c^ left 05:48 wtw joined 05:55 JimmyZ left 05:57 ggoebel left 06:01 am0c left 06:02 justatheory left 06:03 justatheory joined, ggoebel joined, am0c joined 06:07 Tedd1^ left 06:14 ggoebel left 06:16 sjohnson left 06:17 sjohnson joined 06:19 Tedd1 joined 06:20 isBEKaml joined 06:21 ggoebel joined 06:28 baest_ is now known as baest, simcop2387 left
moritz ggoebel: thanks, mail sent 06:30
phenny moritz: 03:37Z <ggoebel> tell moritz let me know where to send a postcard for your nephew 'moc tod liamg ta lebeog tod tterrag'.flip.say
06:30 [sbp] left 06:31 meswami left 06:35 justatheory left 06:37 Su-Shee_ is now known as Su-Shee 06:38 simcop2387 joined 06:44 simcop2387 left 06:46 mberends left 06:48 Mowah joined 06:52 am0c left, am0c joined 06:53 kjeldahlw joined 06:56 simcop2387 joined 06:58 cosimo left 07:08 orafu left, donri joined, orafu joined 07:10 noganex_ left 07:11 noganex joined 07:22 Chat3466 joined
Chat3466 hi all 07:22
07:24 Su-Shee left 07:26 Chat3466 left 07:31 Mowah left 07:36 yegor left
woosley perl6: mutil sub foo(0, $){}; multi sub foo(Int $n, Str $a="A"){say $a; foo($n-1, $a)}; foo(2,"A") 07:51
p6eval rakudo 4bf132: OUTPUT«===SORRY!===␤Multiple declarations of lexical '&foo'␤␤»
..pugs: OUTPUT«*** ␤ Unexpected "foo"␤ expecting "=", subroutine parameters, trait or block␤ at /tmp/j32tdBtNuy line 1, column 11␤»
..niecza v4-54-g2a67dcf: OUTPUT«Unhandled exception: Unable to resolve method ast in class Any␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 198 (NieczaActions NieczaActions.mangle_longname @ 5)␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 193 (NieczaActions
..NieczaActions.simple_longname @ 2)␤ at /h…
woosley perl6: multi sub foo(0, $){}; multi sub foo(Int $n, Str $a="A"){say $a; foo($n-1, $a)}; foo(2,"A") 07:52
p6eval niecza v4-54-g2a67dcf: OUTPUT«Unhandled exception: Unable to resolve method ast in class Any␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 198 (NieczaActions NieczaActions.mangle_longname @ 5)␤ at /home/p6eval/niecza/src/NieczaActions.pm6 line 193 (NieczaActions NieczaActions.simple_longname
..@ 2)␤ at /h…
..pugs: OUTPUT«*** ␤ Unexpected "0"␤ expecting formal parameter or ")"␤ at /tmp/vsofer3OdT line 1, column 15␤»
..rakudo 4bf132: OUTPUT«No applicable candidates found to dispatch to for 'foo'. Available candidates are:␤:(Int where (0), Any )␤:(Int $n, Str $a = { ... })␤␤ in main program body at line 22:/tmp/2Q_l7rwDkX␤»
woosley rakudo: multi sub foo(0, $){}; multi sub foo(Int $n, $a="A"){say $a; foo($n-1, $a)}; foo(2,"A") 07:53
p6eval rakudo 4bf132: OUTPUT«A␤A␤»
woosley rakudo: multi sub foo(0, $){}; multi sub foo(Int $n, Str $a="A"){say $a; foo($n-1, $a)}; foo(2,"A")
p6eval rakudo 4bf132: OUTPUT«No applicable candidates found to dispatch to for 'foo'. Available candidates are:␤:(Int where (0), Any )␤:(Int $n, Str $a = { ... })␤␤ in main program body at line 22:/tmp/ujRNU78DSv␤»
woosley rakudo: multi sub foo(0, $){}; multi sub foo(Int $n, Str $a="A"){say $a}; foo(2,"A") 07:54
p6eval rakudo 4bf132: OUTPUT«No applicable candidates found to dispatch to for 'foo'. Available candidates are:␤:(Int where (0), Any )␤:(Int $n, Str $a = { ... })␤␤ in main program body at line 22:/tmp/bHQu4n3fq6␤»
woosley rakudo: multi sub foo(Int $n, Str $a="A"){say $a}; foo(2,"A") 07:56
p6eval rakudo 4bf132: OUTPUT«A␤»
woosley hmmm, this should be a rakudo bug
moritz it is, please submit it (rakudobug@perl.org) 08:00
08:00 Rotwang joined
isBEKaml multi sub foo(_0_,$) ? 08:01
can a literal simply be used there in a sub ? 08:02
moritz is short for multi sub foo(Int $ where 0, $)
08:02 miso2217 left
isBEKaml ah 08:02
moritz very handy if you declare separate cases for stopping recursion
woosley rakudo: multi sub foo(0, $){}; multi sub foo(Int $n, $a="A"){say $a}; foo(2,"A")
p6eval rakudo 4bf132: OUTPUT«A␤»
moritz rakudo: multi postfix:<!>(0) { 1 }; multi postfix:<!>(Int $n) { $n * ($n-1)! }; say 5! 08:03
p6eval rakudo 4bf132: OUTPUT«120␤»
isBEKaml moritz: nice!
moritz: it'd be even better if we didn't have to declare another sub for a terminating condition. Er, can we define/declare subs within another? 08:04
moritz isBEKaml: you can, but then you can't easily multi dispatch 08:05
isBEKaml: fwiw haskell does something very similar
fac 0 = 1
isBEKaml moritz: yes, that's what I was thinking of at first.
moritz fac x = x * fac (x-1)
isBEKaml moritz: and another language too, that I'm somewhat familiar with, works on the JVM. Provides TCO that way with inner functions. 08:06
moritz except tht haskell's pattern matching is top down, and compile time
isBEKaml haskell, once compiled is mostly correct.
moritz except that my first patch to pugs resulted in an infinite loop 08:07
mathw Haskell's type system is not robust enough to promise correctness just because your program compiles 08:08
I've done some work with dependently typed language, and that kind of thing is incredibly hard :)
isBEKaml mathw: agda? :)
mathw I had a lot of "oh dear, it looks like I need to solve the halting problem" moments
isBEKaml: Epigram
isBEKaml mathw: Oh, I have Coq and Agda on my list of things to-do-when-I-have-copious-time 08:09
Haskell also doesn't have subtype polymorphism, a feature in Java that I hate to admit. :) 08:10
mathw meh, Haskell has type classes 08:11
Gorgeous, lovely type classes
isBEKaml type classes are great and everything. How do you define something to say that this has to be of such and such type before I can actually pass this as an argument to this function?
GADTs can only do so much, but they have been pretty useful so far. 08:12
map :: (a -> b) -> [a] -> [b] can take a function that maps a value of type "a" to a value of type "b" and a list of values of type "a", returning back a list of values of type "b" 08:15
08:16 jfried joined
isBEKaml now I want map to work only on so and so types, say numeric, so I add a constraint. map :: (Num a) => (a -> b) -> [a] -> [b], but that doesn't cut it for composite data. 08:16
isBEKaml should just shut up and get back to reading.. 08:18
08:23 dakkar joined
moritz rakudo: multi foo(0, $a) {1 }; multi foo(Int $n, Str $a = 'A'} { 2}; say foo(2, 'A') 08:32
p6eval rakudo 4bf132: OUTPUT«===SORRY!===␤Malformed multi at line 22, near "foo(Int $n"␤»
moritz std: multi foo(0, $a) {1 }; multi foo(Int $n, Str $a = 'A'} { 2}; say foo(2, 'A') 08:33
p6eval std 4608239: OUTPUT«===SORRY!===␤Default expression must come last at /tmp/eUn678yCIb line 1:␤------> $a) {1 }; multi foo(Int $n, Str $a = 'A'⏏} { 2}; say foo(2, 'A')␤Unable to parse signature at /tmp/eUn678yCIb line 1:␤------> multi foo(0, $a) {1 }; multi
..foo…
dalek ast: 5b94e54 | moritz++ | S06-multi/value-based.t:
[value-based.t] test for RT #88562, multi dispatch with int literals, anonymous parameters and default values
08:35
08:38 domidumont left 08:43 mtk left, miso2217 joined 08:46 miso2217 left 08:51 domidumont joined 09:01 aindilis left 09:14 am0c left 09:16 miso2217 joined 09:18 snearch joined 09:31 SHODAN joined 09:40 starcoder2 joined 09:47 beppu joined 10:08 woosley left 10:09 snearch left 10:13 Rotwang left 10:22 tzhs joined 10:26 hanekomu joined 10:38 pernatiy left 10:42 icwiener joined 10:58 yegor joined 10:59 molaf_ left 11:13 risou joined 11:15 sftp joined 11:16 risou_ joined 11:19 risou left 11:20 hanekomu left, hanekomu joined 11:50 mux_ is now known as mux 11:54 satyavvd left, Patterner left, hudnix joined 11:55 SHODAN left 11:56 Psyche^ joined, Psyche^ is now known as Patterner 12:02 _jaldhar left 12:03 _jaldhar joined 12:09 shi joined, risou_ left, risou joined 12:17 ymasory left 12:33 shi left 12:38 icwiener left 12:43 bluescreen10 joined 12:49 Alias_ joined 12:54 noganex_ joined 12:55 noganex left, noganex_ is now known as noganex, pernatiy joined 13:11 hanekomu left 13:12 hanekomu joined 13:13 daxim_ left 13:18 pmurias joined 13:19 mtk joined 13:22 hanekomu left 13:23 awoodland joined, hanekomu joined 13:24 MayDaniel joined 13:25 Lorn left
pmurias is it possible to make ids in a mysql table be assigned sequentially without the gaps being filled in so if i have ids 1,300,301 the new id will be 302 not 2 13:27
?
sorry
meant to ask on #mysql
13:28 awoodland left
flussence well, there is, but you have to manually tell it the new number to start at :) 13:28
flussence hasn't used that bit of mysql in a while... 13:29
PerlJam pmurias: why are there gaps? and why do you want to skip over those numbers?
moritz that's #perl6, you ask "how?", and get a "why?" as reply :-) 13:30
PerlJam that's any #perl in general I think. context always matters :)
13:33 Lorn joined
isBEKaml perl6 in general is very nosey. 13:34
isBEKaml scurries for cover!
pmurias PerlJam: i want to be able to display the items from the table in order of addition 13:35
isBEKaml pmurias: not sure, there's initval in sql syntax. but in the case of mysql, last_insert_id ?
pmurias: dev.mysql.com/doc/refman/5.1/en/cre...table.html
search for sequence.
flussence pmurias: I'd always use a timestamp of some sort in that case 13:36
PerlJam pmurias: what flussence said
13:39 spq joined 13:41 Holy_Cow joined
flussence on a side note, I always thought Postgres' implementation of auto-incrementing numbers as pseudo-tables was a bit over-the-top, but it turns out things are cleaner-separated for it. 13:44
for instance here you'd change the start number using a select and some mutator function instead of an alter table, which means it needs less privileges 13:45
isBEKaml pmurias: you can create a table and later alter it to set auto_increment to your value
pmurias: dev.mysql.com/doc/refman/5.1/en/exa...ement.html
flussence (I can never remember the syntax for either, mind you :) 13:46
isBEKaml whoa, #perl6 doubles up as a get-all-channel. :)
13:48 wallberg joined
flussence we inline off-topic things sometimes for efficiency :) 13:48
PerlJam isBEKaml: It's one of the dangers of being a #perl 13:49
isBEKaml PerlJam: been on #perl, I was one of those that drove you nuts with philosphy discussions. :P
PerlJam: "you", I mean perl programmers. :) 13:50
13:54 kjeldahlw left, woosley joined
isBEKaml ofcourse, I didn't try that again. 13:54
14:00 coldhead left 14:17 risou left, risou joined 14:21 wtw left 14:22 risou left 14:26 ymasory joined 14:31 risou joined 14:37 risou_ joined 14:38 risou left 14:39 risou joined 14:40 risou__ joined 14:41 meswami joined 14:42 risou_ left 14:43 risou left 14:45 daxim joined
moritz for error objects, I'm currently trying to figure out if they should be more like hashes or capture 14:47
ie if they should support positional data
PerlJam my gut says Capture but it doesn't tell me why
moritz that was my first reaction too
isBEKaml I'm guessing by "positional data" you mean error lines/stack traces.. 14:48
moritz isBEKaml: no, those are encapsulated in other attributes
lemme give you a bit of background
the API for raising an error would be
die('Cannot frobnicate objects of type $<type>', type => "Int") 14:49
vs
die('Cannot frobnicate objects of type $0', "Int")
in the first case, the message is special-cased, and no more positional data would be allowed as payload 14:50
isBEKaml first is a named hash, second is a Capture, right?
moritz right
the second allows positional data (here "Int") as payload
it's more generic, but do we actually want/need it?
isBEKaml Capture makes sense, since you can basically add more attributes without any named params at runtime.
moritz you can also add more attributes at runtime in the hash model 14:51
it's not *really* attributes
isBEKaml is there something I'm missing that's the background picture? (performance/memory issues? ) 14:52
14:52 awoodland joined
moritz isBEKaml: capture will be need slightly more memory, but probably not significant 14:52
PerlJam: the real reason for our gut feeling might be that it's symmetric to invocations and regex captures 14:53
isBEKaml moritz: err, I'm like PerlJam here. Gut reaction goes with Capture without any rational/reasonably strong argument.
moritz ok, three gut feelings and no opposing votes -- that settles the matter for me :-) 14:54
PerlJam until you obtain more information :) 14:55
moritz right
isBEKaml or until after implementation to see if we're right.. :) 14:56
moritz I just noticed that in my grant application I wrote that I'll discuss the spec with "the Perl 6 design team" and the implementors
14:56 awoodland left
moritz which means that I don't have to take it up to p6l if I don't want to :-) 14:56
ok, next question 14:58
14:58 icwiener joined
moritz should the context information (backtrace) be available the same way as the payload, or as a separate attribute? 14:58
I'm leaning towards the latter 14:59
PerlJam separate attribute.
moritz otoh then creation might become ugly 15:00
there are two cases
15:01 shi joined
moritz have die('msg', a => b()) desugar to Exception.new(positional => ['msg'], named => { a => b() }, callcontext => callframe(1)) 15:01
then separate attribute is easy to do
isBEKaml moritz: are we still keeping backtrace display configurable in rakudo compilation? (ie., we can turn them on/off at will?)
15:02 cdarroch joined, cdarroch left, cdarroch joined
moritz or it desguars to Exception.new('msg', a => b(), callcontext => callframe(1)), then the distinction might blur 15:02
isBEKaml: might be easy to configure with a context variable 15:03
isBEKaml: the --ll-backtrace option from rakudo operates on a different level that probably won't interact with my work in any way
15:03 icwiener_ joined 15:04 icwiener left
moritz next question: should the exception has-a or is-a Capture? 15:05
15:05 sji joined
PerlJam why not both? :) 15:05
isBEKaml moritz: isn't that question same as the first? 15:06
isBEKaml has a vague feeling that moritz has undergone too many psychometric tests...
moritz should repharse
should the payload of the exception be kept in a separate object? or go directly into the Exception? 15:07
an Exception *has* a payload? or *is* it a container of payload?
s/of/for/
15:07 vuliev left
isBEKaml much better-o. 15:07
er, the =or= seem the same to me. 15:08
1 or 1 == 1
moritz it would be overkill to do both 15:09
15:09 shi left
isBEKaml anyway, Exception is best kept to be generic and it's exactly what it is. 15:09
moritz s/or/xor/ if you will
PerlJam moritz: has-a
isBEKaml I'd probably go with exceptions containing payloads. has-a relationship.
moritz PerlJam: why?
alester I'd be glad to help out Andrew Whitworth with his Rakudo bug sniffing if there was something I could sniff at.
15:10 MayDaniel left
isBEKaml moritz: do you find anything wrong in what I said? 15:11
pmurias moritz: re exceptions taking positionals, positional info in exceptions doesn't seem very usefull (as it seems something that will need looking up in the docs)
PerlJam moritz: because that fits my brain best at the moment. I don't see an advantage to "isa" and if an advantage were to come up in the future, if we already has-a, we can just delegate.
moritz pmurias: the same point could be made for subroutine signatures
isBEKaml moritz: if so, please point it out. I could really do with some realigning in thinking to perl6 way..
moritz nothing wrong. Design is just a bunch of compromises, and I'd like to make good ones :-) 15:12
one reason for is-a Capture would be the way we test for exceptions
isBEKaml good answer. :-) 15:13
pmurias why not has-a?
moritz pmurias: why not is-a? 15:14
PerlJam moritz: there's prickly feeling in the back of my mind that you're asking questions that are further in the future than we can see and that we need more experience to inform a decision. So ... pick one and go with it. Get some experience :)
isBEKaml moritz: If we want to avoid holding stacktrace and other information in the capture (not context specific), we can go with has-a, with the above information generically in the Exception.
pmurias moritz: will we have an OO hierarchy for exceptions?
moritz pmurias: I'd like to avoid that
the problem with hierarchies is that however you approach them, they'll feel wrong in some way 15:15
15:15 meswami left
moritz I'd rather have "labels" (or "tags" as they are called by mostly everyone) 15:16
so that you can check an exception for different properties
like "was this thrown from a PRE phaser?"
"is it a syntax error?"
"is it an error releated to a numeric operation?"
isBEKaml error messages are contained in captures(assuming that's context specific enough) and other secondary details that are irrelevant to the user can be hidden in Exception.
PerlJam moritz: As long as a heirarchy can be overlaid on your design in some way (i.e., you don't decide anything that precludes heirarchies) then I think your design will succeed. You like "tags" but heirarchies fit other people's brains better. (those coming from a Java background for instance)
isBEKaml that way, we can avoid gathering calltraces unless absolutely necessary. 15:17
flussence I've used OO exceptions in PHP, it's easy to make a hierarchy but in practice I only ended up writing catch blocks for one type at a time anyway. 15:18
moritz always has troubles coming up with hierarchies for orthogonal pieces of information
15:18 wallberg left
PerlJam flussence: yeah, IME with heirarchies, I only go 2 or so levels deep, or not at all 15:19
isBEKaml moritz: IOW, it boils down to this. You can use captures to generate error messages. Use Exceptions _only_ if you need calltraces and secondary information.
pmurias why do we need a hierarchy at all, don't we have roles?
moritz for example "does it come from phaser $x" and "is it related to a numeric operation"
PerlJam pmurias: you just read my mind!
moritz pmurias: the "tags" I mentioned are much closer to roles than to class inheritance
15:20 prammer joined
pmurias tags seem a bit like using a blessed hash 15:20
moritz I just don't know if we want to use actual role composition - I'd imagine it might become quite heavy very quickly
pmurias it's a implementation detail 15:21
moritz and it bears the danger of method classes in composition
isBEKaml tags, tags -- they look like we are classifying error detail here.
moritz pmurias: blessed hashes is what I thought of, yes. Except with s/hashes/captures/
pmurias tags seem usefull for logging unstructure info we need for debugging
isBEKaml log levels? 15:22
PerlJam Hmm.
isBEKaml coming from a Java background - DEBUG, ERROR, TRACE, INFO ?
PerlJam The pendulum seems to have swung too far to one side ... 15:23
pmurias but the Exception object seems likely to be heavy weight: content of nearby lexicals etc.
PerlJam moritz: do the simplest thing that could work *now*, you'll end up refactoring/redesigning several times before you're done :-)
isBEKaml pmurias: that's exactly what I mean. Exception carries a certain hit in performance. Use *only* when you need it.
pmurias what PerlJam suggests seems the most resonable thing
jasonmay is there a way to do parameterized traits for attributes? yet? 15:24
s/?//
moritz jasonmay: what do you mean by that?
has $.x is foo('bar')? 15:25
TimToady $.foo('bar') = 42; ?
jasonmay hmm
moritz PerlJam: you're probably correct
TimToady we need some behavior driven development :) 15:26
jasonmay something like:
moritz and "the simplest thing that could work" would mean s/Capture/Hash/ again
PerlJam aye
jasonmay has $.x is foo{'one' => 'jason', 'two' => 'may'}
PerlJam those curlies are syntactically odd. 15:27
jasonmay or is foo({...})
I don't know, just getting back into perl6 :)
isBEKaml moritz: yes and I was for pushing auxiliary info into Exception (I'm still under the impression that populating exceptions with calltraces is expensive)
moritz isBEKaml: that's totally unrelated to what I'm trying to decide now
TimToady std: has $.x :foo{'one' => 'jason', 'two' => 'may'}
jasonmay (ignore syntax, just asking about the concept)
p6eval std 4608239: OUTPUT«ok 00:01 122m␤»
isBEKaml moritz: I understood that you're going for captures for exceptions. 15:28
moritz jasonmay: how about just storing a hash in $.x ? :-)
jasonmay sugar
here's what I want to do eventually 15:29
maye I'm trying to shoehorn..
so I wrote something similar to p5's Bread::Board
(github.com/jasonmay/perl6-ioc)
and Bread::Board::Declare came out and it's awesome :) 15:30
isBEKaml moritz: Alright, the best thing about p6 development is, we'll quickly know when we are wrong. :-)
moritz: especially in design.
jasonmay it uses meta attr traits instead of a bunch of declarative syntax
PerlJam isBEKaml: I don't know ... some of TimToady's early design decisions lasted quite a while before we figured out they were "wrong" 15:31
jasonmay and I was thinking, if I wanted to put that in perl6-ioc, I'd have to use parameterized attr traits to get close
isBEKaml PerlJam: that was early, it's _now_ :-)
jasonmay sorry, I come from the moose world so I think very moosey :)
TimToady niecza: class Foo; has $.x :foo{'one' => 'jason', 'two' => 'may'}
p6eval niecza v4-54-g2a67dcf: OUTPUT«===SORRY!===␤␤Colonpair traits NYI at /tmp/CENqBFXe7Z line 1 (EOF):␤------> x :foo{'one' => 'jason', 'two' => 'may'}⏏<EOL>␤␤Traits, postconstraints, and shapes on variable declarators NYI at /tmp/CENqBFXe7Z line 1 (EOF):␤------>
..x :foo{'one…
moritz jasonmay: a synopsis example might help me understand better what you're doing, and what you're trying to achieve 15:32
isBEKaml PerlJam: more eyes, short shelf life for bad designs.
jasonmay moritz: nod. I might have time this evening to get into more detail
PerlJam looks at BBD
interesting. 15:33
15:33 envi joined
PerlJam I kind of miss the declarative container though. You don't see it in the code; it's implicit in using BBD 15:34
isBEKaml BBD?
or BDD?
:-)
PerlJam Bread::Board::Declare
isBEKaml ahh..
TimToady in p6, 'is' traits have the option to be as declarative or as lazy as they like, so you aren't forced into run-time "declarations" as p5 tends to do 15:35
isBEKaml sorry. didn't see it. 15:36
TimToady but you aren't forced to be completely declarative either
it's up to the trait itself
well, might need extra {} to be lazy in some cases though... 15:37
but that's what the other trait syntax is for: has $.x will foo { later() }
15:38 pmurias left
PerlJam jasonmay++ for bringin IOC to perl6 15:39
jasonmay :) 15:40
IOC rocks
TimToady
.oO(International Olympic Committee?)
moritz Inversion Of Olympic Committee 15:41
TimToady :) 15:43
jasonmay TimToady: so in other words, has $.x is (anything I want that returns a proper trait); ?
15:43 [Coke] left 15:44 isBEKaml left
TimToady 'is' is declarative, but the grammar slot is extensible, and there's already a 'will' specced that takes a closure 15:45
other subparsers in that slot are possible, including macros
I shouldn't use 'slot'; the're called categories currently 15:46
*they
15:47 justatheory joined
TimToady the cateogory in question is trait_mod 15:47
TimToady can't tpye this mronign 15:48
s/"can't"/cannot/ :P 15:49
moritz :-)
jasonmay reading the spec on it now 15:50
that is pretty neat 15:51
15:55 sji left
TimToady hopefully it's enough rope to shoot ourselves in the feet many times over someday 15:56
moritz is pretty sure there is :-)
sbp your :P adverb should have come before the substitution
TimToady but some bits of it still require time travel
PerlJam or our grandchildren
sbp otherwise you have to delay interpretation
TimToady std: s/"can't"/cannot/ :P 15:57
p6eval std 4608239: OUTPUT«ok 00:01 121m␤»
sbp aw... :-)
std is now my comic nemesis
TimToady arguably, it should be an error if there's no obvious operator 15:58
PerlJam obvioius to whom? :) 15:59
TimToady otoh, s/// is sort of an operator
PerlJam er, obvious even
TimToady std: "foo" :P
p6eval std 4608239: OUTPUT«ok 00:01 119m␤»
moritz that " is a quote operator, no? :-)
PerlJam heh
TimToady but currently std just puts the adverb on the top node and doesn't check what it is
std: 42 :P 16:00
p6eval std 4608239: OUTPUT«ok 00:01 119m␤»
TimToady std: Nil :P
p6eval std 4608239: OUTPUT«ok 00:01 119m␤»
moritz TimToady: speaking of adverbs... would you be terribly opposed to change %h{@keys}:p to :pairs? 16:01
and :k to :keys
give that the methods are %h.pairs and %h.keys 16:02
TimToady I'd be okay with that, I guess
moritz I'd even patch all compilers that implement it :-)
that is, niecza
TimToady right
moritz rakudo: my %h = a=> 2, b => 2; say %h<b>:p 16:03
p6eval rakudo 4bf132: OUTPUT«===SORRY!===␤Confused at line 22, near "say %h<b>:"␤»
moritz niecza: my %h = a=> 2, b => 2; say %h<b>:p
p6eval niecza v4-54-g2a67dcf: OUTPUT«b 2␤»
moritz muscle memory is quite strong :-)
flussence ooh, didn't know about that adverb thing. 16:04
TimToady niecza: my %h = a=> 2, b => 2; say %h<b>:p.perl # fails, I suspect
p6eval niecza v4-54-g2a67dcf: OUTPUT«===SORRY!===␤␤Any()Method call found where infix expected (omit whitespace?) at /tmp/eDWMQfPZIH line 1:␤------> my %h = a=> 2, b => 2; say %h<b>:p⏏.perl # fails, I suspect␤␤Parse failed␤␤» 16:05
16:05 birdwindupbird left
moritz niecza: my %h = a=> 2, b => 2; say (%h<b>:p).perl 16:05
p6eval niecza v4-54-g2a67dcf: OUTPUT«"b" => 2␤»
16:05 birdwindupbird joined
TimToady considers the merits of distinguishing postfix adverbs from "infix" adverbs 16:05
or of making %h<b>:p\.perl into a backwards precedence dropper to auto-paren what was before the \ 16:07
PerlJam uh .... wha? 16:08
TimToady these are both ideas I've rejected before :)
pmichaud good morning, perl6 16:09
PerlJam pmichaud!
TimToady o/!
PerlJam pmichaud: how's life?
moritz pmichaud, I hope your morning is good
sbp why did you reject distinguishing postfix adv. from infix?
sbp waves at and to pmichaud
pmichaud life is fine :-)
TimToady sbp: I don't remember...
PerlJam TimToady: as long as you keep them on the reject pile I'll hold questioning your sanity in reserve ;)
pyrimidine pmichaud: good to hear!
pmichaud frequently questions his sanity. (Note the ambiguous "his" :-) 16:10
TimToady :P
huf pmichaud: you're trans?
pmichaud huf: no. :-)
huf no, sorry, that was a forced misunderstanding-on-purpose
not a nice natural one 16:11
pyrimidine tr///?
PerlJam Though I suppose if the conceptual "temperature" gets hot enough, they might evaporate from the reject pile and condense upon the "ideas to seriously consider pile"
er, put the quote in the right place
16:13 yegor left 16:16 yegor joined
TimToady huh, I never removed the .:foo syntax from std 16:21
niecza: my %h = a=> 2, b => 2; say %h<b>.:p.perl 16:22
p6eval niecza v4-54-g2a67dcf: OUTPUT«===SORRY!===␤␤Colonpair dotties NYI at /tmp/5QraWAOp9g line 1:␤------> my %h = a=> 2, b => 2; say %h<b>.:p⏏.perl␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 388 (CORE die @ 2)␤ at
../home/p6eval/niecza/…
TimToady that was originally for ~~ :e 16:23
16:23 SHODAN joined
TimToady but we might repurpose it 16:23
as a postfix adverb
note to interested bystanders: the reason we use an adverb instead of a method is that the subscript would throw away the keys too soon in %h<b>.pairs 16:25
so we need some way to tell the subscript not to do that
16:25 mberends joined
TimToady and an adverb is sufficiently macro-y to do that 16:25
the proposal above is to treat .:pairs as macro-y in a similar way (it wasn't, in its original :e form) 16:26
16:27 hercynium joined
TimToady %h<b>.:pairs would have the identical semantic effect to %h<b>:pairs, but would leave the parser in a postfix state instead of switching to an infix state 16:28
moritz that sounds vaguely sane-ish
TimToady it's a little odd to add something to make it bind tighter though 16:29
alester About to make my first Rakudo changes in who knows how long.
Andy Lester: Code janitor.
moritz I think the CREDITS file was just taken verbatimly from parrot when the repos were split :-) 16:30
alester I didn't mean to say that that was in the CREDITS.
It's just how I see my job.
16:31 hercynium left, hercynium joined
alester Certainly not complaining. 16:32
moritz :-) 16:33
PerlJam alester: we certainly wouldn't complain about it either :) 16:34
alester What? Unused variables! I'M ON IT.
16:35 Alias__ joined 16:37 kjeldahl joined 16:38 Alias left, Alias_ left, Alias joined 16:39 JimmyZ_ joined 16:50 woosley left
alester ok, distracted, but now back on make spectest 16:50
16:52 Chillance joined
PerlJam moritz: have you read blogs.perl.org/users/jt_smith/2011/...-hurt.html ? 16:54
16:55 yegor left
PerlJam moritz: maybe you can glean some good design ideas from there and morph them into something Perl6ian 16:55
jasonmay
.oO( has $.x is service lifecycle Singleton depends-on <y z> )
16:56
alester moritz: what box are you on that is segfaulting? 16:57
What OS/compiler/etc
My spectest has yet to burp.
16:58 yegor joined 17:01 barika joined 17:04 nymacro left
pmichaud afk, lunch 17:05
17:07 dakkar left 17:09 pernatiy left
jnthn d'oh, missed pmichaud++ by 10 minutes 17:13
17:18 JodaZ joined
moritz alester: linux amd64, gcc 4.4.5 17:21
jnthn moritz: Where in the build? 17:22
17:23 Alias_ joined 17:25 Alias left
jnthn I'd guessing missing write-barrier, apart from it seems the issue happens in the non-gengc too... 17:25
17:25 Alias__ left 17:26 Alias joined, hudnix left 17:27 hudnix joined
jnthn nom & 17:31
17:33 JodaZ left 17:34 JodaZ joined, JodaZ left
moritz jnthn: irclog.perlgeek.de/parrot/2011-04-14#i_3503566 17:34
17:39 JodaZ_ joined
moritz img01.lachschon.de/images/101639_da...s_yeah.jpg reminded me of some of the smilies in here :-) 17:40
PerlJam heh! 17:41
moritz ~o~ 17:46
17:47 birdwindupbird left 17:48 Alias__ joined 17:50 Alias_ left, Alias left, Alias joined 17:54 Alias left, Alias joined 18:04 saaki left 18:06 saaki joined 18:10 pernatiy joined 18:16 larsen left, larsen joined 18:26 risou__ left 18:45 icwiener joined, icwiener_ left 18:46 colomon left 18:54 masak joined
masak hi, lolzebras. 18:54
moritz lol, hizebra 18:55
tadzik hi zebras 18:58
19:02 mtk left
TimToady it's not just constants: multi foo (::T $x, T $y) {...} also turns T into a constraint, $y where T, I think, since you can't do a nominal type check on something without a nom, er, name 19:03
masak someone is hungry... :)
TimToady can't make lunch yet; waiting for a contractor to show up 19:04
tadzik anything new in perl6land?
masak TimToady: you subcontract your lunches? :P
TimToady I do usually subcontract dinners
masak I wonder how static the parametric roles are. after having seen more .NET than usual in the past few days, I have some feature envy wrt static typechecking of generic types. 19:05
19:05 rgrau joined
masak maybe s/are/can be/ 19:05
rgrau! \o/
TimToady sure, but ::T can be known at instantiation time if it's in the role's sig 19:06
I was just thinking about normal multis
rgrau hey! loong time offline 19:07
dalek ecza: 8851938 | (Martin Berends)++ | / (3 files):
[now] refactor the underlying function names and tweak 'make aot'
19:08
19:09 mtk joined
TimToady rakudo: multi truncate (::T $x) { $x.Int.T }; say truncate(42.33) 19:09
p6eval rakudo 4bf132: OUTPUT«Method 'T' not found for invocant of class 'Integer'␤ in 'truncate' at line 22:/tmp/sHjQmsIJjs␤ in main program body at line 22:/tmp/sHjQmsIJjs␤»
TimToady rakudo: multi truncate (::T $x) { T($x.Int) }; say truncate(42.33)
p6eval rakudo 4bf132: OUTPUT«Could not find sub &T␤ in 'truncate' at line 22:/tmp/WKN7DlZoqd␤ in main program body at line 22:/tmp/WKN7DlZoqd␤»
TimToady aww 19:10
pugs: multi truncate (::T $x) { T($x.Int) }; say truncate(42.33)
p6eval pugs: OUTPUT«42␤»
TimToady pugs: multi truncate (::T $x) { T($x.Int) }; say truncate(42.33).WHAT 19:11
p6eval pugs: OUTPUT«Int␤»
TimToady er, oopsie
pugs: multi trunc (::T $x) { T($x.Int) }; say trunc(42.33).WHAT
p6eval pugs: OUTPUT«Int␤»
TimToady hmm
pugs: multi foo (::T $x) { T($x.Int) }; say foo(42.33).WHAT 19:12
p6eval pugs: OUTPUT«*** No such subroutine: "&T"␤ at /tmp/t6DojQbngB line 1, column 22-32␤»
TimToady pugs: multi foo (::T $x) { $x.Int.T }; say foo(42.33).WHAT
p6eval pugs: OUTPUT«*** No such method in class Rat: "&Int"␤ at /tmp/X0qOJPels9 line 1, column 22-31␤»
masak is this spec'd anywhere? 19:16
TimToady which, that Type() and .Type are both coercions? 19:17
masak no, that this works even for type captures.
19:17 pernatiy left
TimToady well, it's a type name--so what if it's known to be generic? 19:18
masak arguably one of those "it just falls out" things, but... right.
TimToady one could go as far as to argue that any construct using ::T is generic and automatically gets instantiated over T whenever a new type is seen 19:19
however, if that were a multi, it would work against knowing the candidate list at compile time 19:21
19:21 pernatiy joined
TimToady (if new candidates can be generated at run time) 19:21
masak I bet jnthn would have something to say on this. 19:22
I know he's been talking in these terms.
TimToady so while lazy instantiation is a possible optimization technique, I don't think we should mandate it
masak I'm more interested in how far we can statically trace call dependencies over class boundaries, if parametric roles are involved. 19:23
TimToady especially since we have type objects that are required to respond correctly (cross fingers) to .()
masak ouch :)
TimToady well, composition is normally at compile time, so that part's not a problem 19:25
dalek ecza: 4b205f2 | (Martin Berends)++ | lib/CORE.setting:
[CORE.setting] add a List.reverse() method to complement the reverse function
19:27 [Coke] joined 19:30 mberends left 19:34 mberends joined
dalek d: 3468e14 | larry++ | STD.pm6:
LTA "Default argument must come last"
19:34
19:41 SHODAN left
jnthn TimToady: I'm skeptical $x.Int.T would work, but that T($x.Int) doesn't is a bug afaik. 19:53
Since T there is parsed as a literal method name
And yes, plesae not lets break knowing lexical multi candidate lists at compile time :) 19:55
wtf, my english...
...please let's not break... :) 19:56
tadzik oh, a fellow beer drinker! :) 19:57
jnthn I only had one with a very large dinner :P
tadzik I had two with a kebab :)
but, whatever 19:58
jnthn :)
jnthn is still pondering whether to drop by the hotel bar before bed
tadzik do!
drink to the health of my wrist :(
jnthn They have my favorite Czech beer on tap here, and I don't know anywhere else on Sweden that does. 19:59
...in Sweden...
Dammit, how strong *was* that beer... :)
Your wrist? :(
tadzik yeah, I've gone with a friend to check how much skateboarding do I remembre (I don't remember much) 20:00
now I can barely code!
20:00 envi left
jnthn ouch! 20:00
Was this...after the kebab and two beers? ;) 20:01
tadzik no, before :)
jnthn Wow :)
tadzik getting hurt after getting drunk would have been embarasing :) 20:02
...as if it isn't now ;) 20:03
20:03 Rotwang joined 20:05 jferrero joined
tadzik jnthn: how is 6model doing? 20:08
jnthn not much the last couple of weeks
:(
tadzik hugme: hug jnthn 20:09
hugme hugs jnthn
jnthn I've started on some better docs for it though
tadzik someone was asking about the docs recently
jnthn And my schedule for the coming weeks looks a lot nicer than it's been of late.
tadzik not sure if that wasn't jaffa4
20:10 Mowah joined 20:34 MayDaniel joined, MayDaniel left, MayDaniel joined 20:48 silent_h_ joined 20:51 MayDaniel left 20:57 silent_h_ left, MayDaniel joined 21:02 Holy_Cow left 21:03 MayDaniel left 21:05 kjeldahl left 21:06 tzhs left 21:10 impious joined 21:11 hudnix left 21:19 hanekomu left 21:21 kaare_ left, hudnix joined 21:31 eternaleye left, eternaleye joined 21:39 donri left
masak 'night, #perl6 21:41
21:41 masak left 21:42 impious left 21:51 whiteknight joined 21:57 spq left 21:59 bacek left 22:02 ymasory left 22:05 daxim left 22:06 Mowah left 22:13 mux left, mux joined, aesop left, aesop joined 22:14 diakopter left, jfried left, sorear left 22:16 diakopter joined, mdxi left, mdxi joined, sorear joined, Tene joined 22:18 jfried joined 22:20 coldhead joined 22:29 ymasory joined 22:32 alester left 22:51 Rotwang left 22:59 DarthGandalf left 23:04 DarthGandalf joined 23:15 colomon joined 23:16 itz joined, colomon_ joined 23:17 risou joined 23:20 colomon left, colomon_ is now known as colomon 23:34 icwiener left 23:39 hercynium left 23:40 risou_ joined, risou left 23:41 rgrau left 23:44 Chillance left