Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-08-13

Perl 6 | Reference Documentation | Rakudo

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

All times shown according to UTC.

Time Nick Message
00:01 ChoHag Hmm.
00:01 ChoHag So ropes if written would likely be operated on pretty much as lists?
00:01 ChoHag Look like lists, but be magic in certain ways?
00:03 TimToady well, if you're interested in tail sharing, the important thing is immutability, which is orthogonal to rope-like implementations
00:03 ChoHag So I could have a type which was implemented as a list in which the final element could be a terminator or a pointer.
00:03 dalek tablets: 8631ed6 | (Herbert Breunung)++ | docs/report.pl (2 files):
00:03 dalek tablets: fiddeled with report.pl a bit
00:03 dalek tablets: review: https://github.com/perl6/tablets/commit/8631ed6305
00:03 dalek tablets: f9de7ba | (Herbert Breunung)++ | docs/ (4 files):
00:03 dalek tablets: Merge branch 'master' of github.com:perl6/tablets
00:03 dalek tablets: review: https://github.com/perl6/tablets/commit/f9de7baf16
00:03 dalek tablets: 3c80c38 | (Herbert Breunung)++ | docs/ (2 files):
00:03 dalek tablets: Merge branch 'master' of github.com:perl6/tablets
00:03 dalek tablets: review: https://github.com/perl6/tablets/commit/3c80c38337
00:03 ChoHag Then you get the compromise of a LL where it's useful, and the speed and magic of a list where it's not.
00:03 TimToady ChoHag: sure
00:04 ChoHag Well I'm not doing that at 1 in the morning.
00:07 baest joined #perl6
00:08 TimToady there are also batching characteristics that are nice with ropey implementations
00:09 benabik Ropes basically do that, but in a tree structure so that access is O(log N) instead of O(n)
00:10 TimToady ropes also degenerate to flat lists, each of which are O(1)
00:11 TimToady so if you have a single segment, it's essentailly the same as a Perl 5 list
00:14 TimToady so you probably want something that can mutate itself between flat list and tree, and I think of that as "ropey"
00:15 benabik Apparently mutable ropes could be done via CoW.
00:15 * benabik wonders how hard it would be to share _portions_ of a buffer.
00:16 TimToady the important thing is to know which your data type is presenting
00:16 TimToady part of Perl 5's problem is that you can't really know what's immutable very easily
00:21 TimToady and the mutable stuff tends to be too global, preventing safe threading
00:38 sporous joined #perl6
00:39 sorear ChoHag: what do you need from native lists that you don't think you can get from a user-defined class?
00:42 TimToady I suspect ChoHag is approximately GMT from the remark at 40 minutes ago
00:43 sorear TimToady: are you saying ey's probably asleep?
00:45 TimToady that's how I read it
00:45 TimToady ey're surely :)
00:47 TimToady if ey doesn't track they it'll never catch on
01:00 benabik joined #perl6
01:43 colomon sorear: ping?
01:44 scott_ joined #perl6
01:45 colomon any and all: my %hash = map { (state $counter)++ => $_ }, @foo;   -- niecza thinks that's a hash, not a block.  Isn't it right?  (This is from anon-hashes-vs-blocks.t)
01:46 colomon weirdly, if I change it to my %hash = map { (state $counter)++ => $_; }, @foo; it still doesn't work in niecza.
01:47 colomon but if I make it my %hash = map { ;(state $counter)++ => $_; }, @foo; it works beautifully.
01:48 TimToady nobody really does $_ as specced yet
01:49 TimToady any {} mentioning $_ is not supposed to be taken as a hash
01:49 colomon ah
01:50 colomon so in this case I should leave roast as is and fudge for niecza.
01:51 sorear colomon: pong
01:51 colomon sorear: never mind, TimToady++ just explained things to me.
01:54 colomon sorear++
02:15 sorear what did I do?
02:15 xinming joined #perl6
02:17 colomon sorear: you ponged.
02:21 colomon n: for 1..3 { 1 but last; };
02:21 p6eval niecza v19-20-g07dcc9e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Can only provide exactly one initial value to a mixin at /tmp/t9r5DQYIWU line 1:â�¤------> [32mfor 1..3 { 1 but last[33mâ��[31m; };[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1…
02:22 benabik but last?
02:25 colomon benabik: it's in S14-roles/mixin.t
02:25 benabik Return one but when you use it, it ends a loop?
02:29 colomon test says it should behave the same way as plain last.
02:29 dalek roast: d49c1dc | (Solomon Foster)++ | S (2 files):
02:29 dalek roast: Fudge for niecza.
02:29 dalek roast: review: https://github.com/perl6/roast/commit/d49c1dc46b
02:29 sorear that's a slightly odd interaction of features
02:29 sorear &last is a function, so it's processed as 1 but last()
02:30 sorear when using a funciton call after but, it's re-written into an initalizer frm
02:30 sorear the idea is to support stuff like 5 but Str("foo")
02:30 sorear n: (5 but Str("foo")).Str
02:30 p6eval niecza v19-20-g07dcc9e:  ( no output )
02:30 sorear n: (5 but Str("foo")).Str.say
02:30 p6eval niecza v19-20-g07dcc9e: OUTPUT«foo␤»
02:30 sorear n: (5 but Str("foo")).Num.say
02:30 p6eval niecza v19-20-g07dcc9e: OUTPUT«5␤»
02:31 sorear hey, it even works!
02:34 xinming_ joined #perl6
02:38 Psyche^ joined #perl6
02:38 colomon sorear: so what does the "Can only provide exactly one initial value to a mixin" error with 1 but last mean?
02:43 sorear colomon: 1 but last() passes 0 initial values to a mixin
02:43 sorear you're supposed to pass exactly one
02:43 sorear that's a special form of the mixin syntax, it is _not_ a function cal
02:44 orafu joined #perl6
02:50 tsigol joined #perl6
03:00 dayangkun joined #perl6
03:12 woosley joined #perl6
03:13 xinming joined #perl6
03:16 localhost joined #perl6
03:18 xinming joined #perl6
04:02 TheSoas joined #perl6
04:02 TheSoas left #perl6
04:06 am0c joined #perl6
04:11 dalek roast: 6793373 | (Solomon Foster)++ | S32-str/substr.t:
04:11 dalek roast: Refudge for niecza.
04:11 dalek roast: review: https://github.com/perl6/roast/commit/6793373b7b
04:37 topo joined #perl6
04:38 spaceships joined #perl6
04:47 cognominal joined #perl6
04:47 telex joined #perl6
04:57 diakopter beep
05:00 xinming joined #perl6
05:04 jeffreykegler joined #perl6
05:13 xinming_ joined #perl6
05:14 benabik joined #perl6
05:19 xinming joined #perl6
05:19 Tedd1^ joined #perl6
05:27 cognominal joined #perl6
05:30 birdwindupbird joined #perl6
06:00 wtw joined #perl6
06:16 cognominal joined #perl6
06:24 kaleem joined #perl6
06:57 dbr joined #perl6
06:59 cognominal joined #perl6
07:11 UncleFester6 joined #perl6
07:16 brrt joined #perl6
07:31 SamuraiJack joined #perl6
07:32 wtw joined #perl6
07:45 araujo joined #perl6
07:45 araujo joined #perl6
07:55 cosimo UncleFester6: pong
07:56 dalek nqp/dyncall-sized-num: 2800c6e | (Arne Skjærholt)++ | src/6model/ (13 files):
07:56 dalek nqp/dyncall-sized-num: Add align field to storage_spec.
07:56 dalek nqp/dyncall-sized-num:
07:56 dalek nqp/dyncall-sized-num: Also, adds initialisation of align field to all REPRs (and initialises a
07:56 dalek nqp/dyncall-sized-num: couple of bits fields that weren't).
07:56 dalek nqp/dyncall-sized-num: review: https://github.com/perl6/nqp/commit/2800c6ead3
07:58 UncleFester6_ joined #perl6
07:59 UncleFester6_ cosimo: I pinged many hours ago and have since sent an email on a new LWP::Simple
08:00 cosimo ok, that's you then
08:00 cosimo :)
08:01 cosimo ok, haven't looked at the repo yet, sorry
08:03 dayangkun_ joined #perl6
08:03 spider-mario joined #perl6
08:11 snearch joined #perl6
08:20 UncleFester6_ left #perl6
08:30 imarcusthis joined #perl6
08:49 masak antenoon, #perl6
08:50 jnthn o/ masak
08:50 tadzik afterfoon, masak o/
09:04 masak tadzik: it's afternoon in .cn, but neither here nor by UGT... :)
09:04 tadzik :)
09:04 tadzik .cn?
09:05 tadzik . o O ( Czech New Republic, I read too much Star Wars )
09:05 tadzik oh, ChiNa probably :)
09:09 masak most likely :)
09:15 felher tadzik: i'm not going to stay at your hotel, so i don't know if they reject my credit card. Sorry :/
09:15 tadzik ok, cool
09:18 daxim joined #perl6
09:19 masak r: sub cons($car, $cdr) { return sub ($_) { when 'car' { $car }; when 'cdr' { $cdr }; default { die (class :: is Exception { method message { "Unknown operation $_"} }).new } } }; say cons(1, cons(2, 3))('cdr')('cdr')
09:19 p6eval rakudo e20252: OUTPUT«3␤»
09:19 masak look! cons pairs, built entirely out of computation! \o/
09:19 moritz good morning
09:19 masak r: sub cons($car, $cdr) { return sub ($_) { when 'car' { $car }; when 'cdr' { $cdr }; default { die (class :: is Exception { method message { "Unknown operation $_"} }).new } } }; say cons(1, cons(2, 3))('floop')
09:19 p6eval rakudo e20252: OUTPUT«use of uninitialized value of type Any in string context  in method message at /tmp/7vUk9vrEEx:1␤␤use of uninitialized value of type Any in string context  in method message at /tmp/7vUk9vrEEx:1␤␤Unknown operation ␤  in sub  at /tmp/7vUk9vrEEx:1␤  in block  at /tmp…
09:19 masak oops, the $_ didn't survive that far in :) expected.
09:20 masak r: sub cons($car, $cdr) { return sub ($_) { when 'car' { $car }; when 'cdr' { $cdr }; default { my $op = $_; die (class :: is Exception { method message { "Unknown operation '$op'"} }).new } } }; say cons(1, cons(2, 3))('floop')
09:20 p6eval rakudo e20252: OUTPUT«Unknown operation 'floop'␤  in sub  at /tmp/DCOW2jeR1c:1␤  in block  at /tmp/DCOW2jeR1c:1␤␤»
09:20 masak \o/
09:22 masak "nobody's been more impatient than the people working on it" -- TimToady
09:22 fhelmberger joined #perl6
09:22 jnthn If your exception type is anonymous, why not just die with a string anyway? :)
09:22 masak heh!
09:23 masak r: sub cons($car, $cdr) { return sub ($_) { when 'car' { $car }; when 'cdr' { $cdr }; default { my $op = $_; die "Unknown operation '$op'" } } }; say cons(1, cons(2, 3))('floop')
09:23 p6eval rakudo e20252: OUTPUT«Unknown operation 'floop'␤  in sub  at /tmp/_aA8N_7isw:1␤  in block  at /tmp/_aA8N_7isw:1␤␤»
09:23 masak jnthn++
09:23 moritz but then it's not TYPED anymore :-)
09:24 jnthn I typed it with my keyboard!
09:24 moritz jnthn: re the check in Exception.pm
09:24 moritz jnthn: both X::Comp types and runtime errors are fine with just printing the .gist of the exception
09:25 moritz jnthn: but untyped compile time errors need to add the ===SORRY===\n themselves
09:25 moritz that's why it's X::Comp.ACCEPTS($e) || is_runtime($ex.backtrace)
09:25 masak r: sub cons($car, $cdr) { return sub ($_) { when 'car' { $car }; when 'cdr' { $cdr }; default { my $op = $_; die "Unknown operation '$op'" } } }; sub car(&c) { &c('car') }; sub cdr(&c) { &c('cdr') }; sub cdar(&l) { (car (cdr &l)) }; say (cdar (cons 1 (cons 2, 3)))
09:25 p6eval rakudo e20252: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2, near "(cons 2, 3"␤»
09:25 masak r: sub cons($car, $cdr) { return sub ($_) { when 'car' { $car }; when 'cdr' { $cdr }; default { my $op = $_; die "Unknown operation '$op'" } } }; sub car(&c) { &c('car') }; sub cdr(&c) { &c('cdr') }; sub cdar(&l) { (car (cdr &l)) }; say (cdar (cons 1, (cons 2, 3)))
09:25 p6eval rakudo e20252: OUTPUT«2␤»
09:26 masak \o/
09:26 masak almost, but not quite, Lisp.
09:26 jnthn moritz: Oh, I hadn't realized X::Comp did add the SORRY
09:26 jnthn OK, then it makes sense. Thanks :)
09:29 masak TimToady's quote above is what I've been looking for in terms of explaining to Perl 5 people about impatience and Perl 6. my formulations so far had been too active, like "if you're so eager to have Perl 6 be realized, come help!"
09:32 bbkr joined #perl6
09:39 topo I have a question about Pod. Rakudo gives an error on =begin with no typename, but niecza allows it. Is this intended behaviour? S26 seems to indicate that a typename should be required.
09:39 tadzik I don't think niecza has much of S26 implemented
09:40 sorear niecza doesn't try to parse pod, except as needed to skip over it.
09:40 topo Ah, that explains it. Thanks :)
09:40 sorear sleep&
09:40 sorear oh, hey, another niecza user.  *waves*
09:41 masak topo++
09:56 fgomez joined #perl6
09:58 mathw Morning
09:59 masak mathw! \o/
10:01 fgomez joined #perl6
10:02 mathw hi masak
10:04 masak always nice to see you, mathw.
10:06 mathw And you
10:36 * mhasch has aliased niecza as perl6n so he can spell it
10:37 masak I just go "nie<tab>" :)
10:37 jnthn meeting &
10:37 tadzik mhasch: where are you from?
10:38 tadzik if you'll be on the YAPC I can tell you a probably correct way to pronounce it :)
10:38 mhasch tadzik: I am from Blaubeuren, near Ulm, Germany
10:38 tadzik hm
10:38 tadzik nye-tscha is probably a close approximation
10:38 mhasch tadzik: looking forward to it.  Of course i'll be there.
10:39 JimmyZ joined #perl6
10:39 JimmyZ good evening
10:39 masak JimmyZ! \o/
10:39 JimmyZ 麦高,下午好!
10:40 masak 晚上好,荣幸卓明亮!
10:41 JimmyZ 荣幸卓明亮? 用英语如何说?
10:43 masak "honored JimmyZ".
10:44 masak 我不知道这是否是正确的汉语。
10:45 JimmyZ Does honored mean respectable?
10:46 mhasch masak: which TimToady quote did you refer to this morning (re perl6 and patience)?
10:46 JimmyZ or Respectful?
10:48 mhasch ah, found it in the backlog.
10:49 mhasch "nobody's been more impatient than the people working on it" -- TimToady
10:49 mhasch nice angle.
10:50 mathw reminds people that it's not just the users who want to use it
10:50 JimmyZ masak: 语法是正确的,但是基于通用的描述,没有人这么用
10:50 mathw or maybe that would be better phrased as that the developers are also users
10:52 JimmyZ masak: 应该 s/荣幸/[ 受 | 令] 人尊敬的/
11:00 JimmyZ happy birthday, pmichaud
11:04 colomon it's pmichaud++'s birthday?  \o/
11:05 tadzik Happy birthday pmichaud!
11:06 JimmyZ yep
11:11 masak happy birthday, pmichaud! \o/
11:12 Senthil joined #perl6
11:13 pmurias joined #perl6
11:13 masak JimmyZ: ah, so '晚上好,受人尊敬的卓明亮!', or '晚上好,令人尊敬的卓明亮!'
11:17 JimmyZ hmm, I never heard it too. natural language is perceptual \o/
11:19 Senthil left #perl6
11:34 moritz pmichaud++
11:39 felher yeah, happy birthday pmichaud++
11:44 eiro_ hello all
11:44 eiro_ tadzik, still wanting to share a room? what's the budget ?
11:45 eiro_ http://act.yapc.eu/ye2012/wiki?node=RoomShare
11:47 MayDaniel joined #perl6
12:00 * jnthn back
12:02 jnthn r: .say for 'happy birthday ' <<~<< ('to you' xx 2, 'pmichaud', 'to you')
12:02 p6eval rakudo e20252: OUTPUT«happy birthday to you␤happy birthday to you␤happy birthday pmichaud␤happy birthday to you␤»
12:08 mhasch jnthn++
12:10 mathw haha
12:11 mathw jnthn++
12:11 mathw happy birthday pmichaud++
12:12 tadzik eiro_: no, it's already settled
12:12 tadzik eiro_: we
12:13 tadzik 've found one with leont, Sophien Hotel
12:22 tadzik seen mberends?
12:22 aloha mberends was last seen in #perl6 7 days 15 hours ago saying "/o sorear, masak".
12:22 masak r: .say for 'happy birthday ' <<~<< (my (@a = 'to you' xx 3).=splice(2, 0, 'pmichaud'))
12:22 p6eval rakudo e20252: OUTPUT«===SORRY!===␤Cannot use .= initializer with a list of declarations at line 2, near ")"␤»
12:22 masak huh.
12:22 masak yeah, but it's a list of *one* declaration!
12:23 masak r: .say for 'happy birthday ' <<~<< (my (@a = 'to you' xx 3); @a.=splice(2, 0, 'pmichaud'))
12:23 p6eval rakudo e20252:  ( no output )
12:23 masak r: .say for 'happy birthday ' <<~<< (my (@a = 'to you' xx 3); @a.=splice(2, 0, 'pmichaud'); @a)
12:23 p6eval rakudo e20252:  ( no output )
12:23 * masak looks up splice
12:23 masak http://doc.perl6.org/routine/splice
12:23 masak hm, there's a comma missing there in the signatures.
12:24 masak maybe this is my chance to contribute to doc.perl6.org :)
12:27 dalek doc: 438dc78 | (Carl Mäsak)++ | lib/List.pod:
12:27 dalek doc: [List.pod] inserted missing commas
12:27 dalek doc:
12:27 dalek doc: For some reason, if 'comma' were pluralized 'commae', I wouldn't
12:27 dalek doc: be too surprised. It isn't, of course. But still.
12:27 dalek doc: review: https://github.com/perl6/doc/commit/438dc78f91
12:28 mhasch masak: is the final @a the same as the lexical @a to the left?
12:32 masak oh!
12:32 masak point.
12:32 masak r: .say for 'happy birthday ' <<~<< (my @a = 'to you' xx 3; @a.=splice(2, 0, 'pmichaud'); @a)
12:32 p6eval rakudo e20252:  ( no output )
12:32 masak grrml.
12:32 masak r: .say for 'happy birthday ' <<~<< (my @a = 'to you' xx 3; @a.splice(2, 0, 'pmichaud'); @a)
12:32 p6eval rakudo e20252: OUTPUT«happy birthday to you␤happy birthday to you␤happy birthday pmichaud␤happy birthday to you␤»
12:33 masak ah. splice is already rw by itself.
12:33 masak r: .say for 'happy birthday ' <<~<< ((my @a = 'to you' xx 3).splice(2, 0, 'pmichaud'); @a)
12:33 p6eval rakudo e20252: OUTPUT«happy birthday to you␤happy birthday to you␤happy birthday pmichaud␤happy birthday to you␤»
12:35 tadzik r: .say "happy birthday $_" for ('to you' xx 2, 'pmichaud')
12:35 p6eval rakudo e20252: OUTPUT«===SORRY!===␤Confused␤at /tmp/tV2qg1TT38:1␤»
12:35 tadzik r: .say "happy birthday $_" for 'to you' xx 2, 'pmichaud'
12:35 p6eval rakudo e20252: OUTPUT«===SORRY!===␤Confused␤at /tmp/RG0TrbuyaO:1␤»
12:36 moritz tadzik: remove the leading .
12:36 moritz .say is not a listop
12:36 moritz r: say "happy birthday $_" for 'to you' xx 2, 'pmichaud'
12:36 p6eval rakudo e20252: OUTPUT«happy birthday to you␤happy birthday to you␤happy birthday pmichaud␤»
12:36 tadzik right. It's still missing the last one, so splice's better
12:40 mhasch Is there a splice-like operator that returns the whole list rather than what has been deleted?
12:41 mhasch If not, we could invent it and call it squeeze.
12:54 PacoAir joined #perl6
12:55 masak I rather feel that .splice was insufficiently p6ized when it wasn't made non-mutating.
12:55 jaldhar joined #perl6
12:57 tadzik +1
12:57 jnthn I think splice is much more useful if it mutates
12:57 jnthn You can do the other stuff with slicing etc, no?
12:57 tadzik r: my @a = <a b c d>; @a.=[1..2]; say @a.perl
12:57 p6eval rakudo e20252: OUTPUT«Array.new("b", "c")␤»
12:58 masak how would I do the above happy birthday thing with slicing?
12:58 jnthn Well, splicing was a weird thing to do in that case anyway
12:58 * jnthn managed to do it immutably :)
12:58 mhasch It is an operator with many purposes.  To retain all of them, it needs to mutate.
12:59 tadzik my @a = 'happy birthday' xx 3; @a = @a[0..1], 'pmichaud', @a[2]; say @a.perl
12:59 tadzik r: my @a = 'happy birthday' xx 3; @a = @a[0..1], 'pmichaud', @a[2]; say @a.perl
12:59 p6eval rakudo e20252: OUTPUT«Array.new("happy birthday", "happy birthday", "pmichaud", "happy birthday")␤»
12:59 tadzik well, with 'to you'
12:59 jnthn :)
12:59 tadzik splice feels more in place though
12:59 jnthn Yeah
12:59 JimmyZ joined #perl6
12:59 masak I guess you're right.
13:00 masak push/pop/shift/unshift can be expressed in terms of splice.
13:00 tadzik I still agree with immutable splice
13:01 mhasch r: say "happy birthday $_" for <to_you pmichaud>[0, 0, 1, 0]
13:01 p6eval rakudo e20252: OUTPUT«happy birthday to_you␤happy birthday to_you␤happy birthday pmichaud␤happy birthday to_you␤»
13:01 tadzik nice!
13:02 mhasch no hyper op though
13:02 snearch joined #perl6
13:02 masak but it works, and it's short!
13:03 jnthn tmtowtwpmhb
13:03 masak :)
13:04 mhasch there is certainly a celebrative air in here :-)
13:04 PerlJam good ugt  :)
13:07 masak using polynomial interpolation:
13:08 masak r: say "happy birthday ", ("to you", "pmichaud")[-.5 * $_**3 + 2 * $_**2 - 1.5 * $_] for 0..3
13:08 p6eval rakudo e20252: OUTPUT«happy birthday to you␤happy birthday to you␤happy birthday pmichaud␤happy birthday to you␤»
13:08 Chillance joined #perl6
13:08 * masak grins
13:10 jlhg joined #perl6
13:10 masak jlhg: aloha.
13:10 masak and thank you for using IPv6 :)
13:10 hoelzro IPv6++
13:11 jlhg :)
13:11 jnthn r: my $ip = 'IPv6'; $ip++; say $ip
13:11 p6eval rakudo e20252: OUTPUT«IPv7␤»
13:12 timotimo wasn't ipv7 actually a thing?
13:12 masak jlhg: what brings you to #perl6? can we serve you something to drink while you look at the menu?
13:12 moritz nr: say 'IPv4'.succ.succ
13:12 p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«IPv6␤»
13:13 masak yes, IPv4 sucks.
13:14 masak twice.
13:16 skids joined #perl6
13:21 localhost joined #perl6
13:22 masak why not to use /* */ in JavaScript: the combination of characters '*/' can happen in regexes, like '/a*/'.
13:23 masak I just thought this was a nice example of how corner cases between features can make a feature a tad dangerous in a language design.
13:23 jnthn ugh
13:23 masak both regexes and /* */ are very "classical" bits of syntax at this point. but when put together, they produce this corner case.
13:24 masak so, use '//' for everything. if your editor is any good, it'll allow you to comment out a block of code with '//' as a single operation.
13:30 cognominal joined #perl6
13:37 bluescreen10 joined #perl6
13:39 moritz jnthn: ping
13:39 moritz jnthn: I might want to implement sigilless parameters in rakudo, depending on how easy/hard it seems :-)
13:40 jnthn moritz: I don't think there's anything terribly difficult about it.
13:40 moritz jnthn: I guess we need a container that doesn't mark the thing as a scalar
13:40 moritz or do we already have that?
13:41 moritz r: my $r := <a b c>; .say for $r
13:41 p6eval rakudo e20252: OUTPUT«a␤b␤c␤»
13:41 jnthn moritz: We already have the functionality
13:41 moritz it seems we already have it
13:41 jnthn moritz: \$a
13:41 * [Coke] can't imagine using // for multi-line comments just because he might occasionally have a compile time error or a syntax highlighting error.
13:41 jnthn moritz: Boils down to the is_parcel thing, iirc
13:46 masak [Coke]: that's a good point as well. though "compile time error" in JavaScript-on-the-client means "on the client", which makes it slightly worse than that.
13:48 [Coke] masak: when I do web dev, I'm always the first client, so that's not really an issue.
13:48 [Coke] It's no worse than "does this perl6 program do wh... oh, compile error."
13:49 masak then you probably have better tools than I do. my JavaScript compile errors are too soft; they just result in some part of the script not doing what it should.
13:50 moritz firebug shows JS compilation error
13:51 masak so does the Chrome console. but I still have to go looking for it.
13:56 moritz agreed
14:09 kaare_ joined #perl6
14:12 jeffreykegler joined #perl6
14:17 lichtkind joined #perl6
14:19 araujo joined #perl6
14:21 drbean joined #perl6
14:22 JimmyZ joined #perl6
14:23 SamuraiJack joined #perl6
14:32 sftp joined #perl6
14:39 sporous joined #perl6
14:40 ChoHag What's the difference between a List and an Array?
14:40 ChoHag And which inherits from which?
14:40 ChoHag (Assuming one does)
14:40 tadzik Array from List: http://doc.perl6.org/type/Array
14:41 ChoHag Ah. Details on types.
14:41 ChoHag Hadn't managed to find that.
14:41 tadzik then we need to put it in a better place :)
14:42 TimToady note that that's how it currently is, not necessarily how it should be
14:42 ChoHag With some cruft around it on the web page (headings, tocs, etc) google will manage.
14:42 tadzik it's on http://perl6.org/documentation/ maybe needs to be highlighted more
14:42 thou joined #perl6
14:43 ChoHag TimToady: I get that but I don't forsee enormous changes this late in the game.
14:44 ChoHag I guess then that an Array is exactly the same as a list except it restricts the contents of each element somewhat?
14:44 ChoHag Let me read the List page...
14:44 TimToady um, not really
14:44 bbkr joined #perl6
14:44 bruges_ joined #perl6
14:44 dalek joined #perl6
14:44 obra joined #perl6
14:44 _sri joined #perl6
14:44 pnu_ joined #perl6
14:44 shachaf joined #perl6
14:45 TimToady List is, from the user viewpoint, immutable
14:45 TimToady I see no reason to derive Array from it
14:45 am0c joined #perl6
14:45 * masak neither
14:45 TimToady (a list can contain mutable elements though)
14:46 ChoHag OK thanks.
14:46 ChoHag Now it's less clear than 5 minutes ago.
14:46 masak glad to help.
14:46 TimToady :D
14:46 * masak purs tea in ChoHag's cup until it flows over
14:46 masak pours*
14:47 ChoHag So the Array does inherit from List, but you say it doesn't need to, or I'm reading the diagram on the Array page incorrectly?
14:47 masak right. it does inherit from List.
14:47 masak we're saying that design detail might be wrong and should be changed.
14:48 masak well, TimToady is *saying* it, and I'm nodding.
14:48 ChoHag OK the mud is settling.
14:49 ChoHag This being perl, they'd look like one another when necessary regardless of inheritence, right?
14:50 TimToady and, in fact, List is treated as a role in S02, not a class
14:50 ChoHag Right, right.
14:50 TimToady ChoHag: yes
14:50 ChoHag That makes sense.
14:51 TimToady nr: say so Class ~~ List
14:51 p6eval rakudo e20252: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Class' called (line 1)␤»
14:51 p6eval ..niecza v19-20-g07dcc9e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Expecting a term, but found either infix ~~ or redundant prefix ~â�¤  (to suppress this message, please use space between ~ ~) at /tmp/eZDCdZsZwS line 1:â�¤------> [32msay so Class ~~[33mâ��[31m List[0mâ�¤â�¤Parse failedâ�¤â�¤Â»â€¦
14:51 TimToady nr: say so Array ~~ List
14:51 p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«True␤»
14:52 TimToady nr: say so Array.isa(List)
14:52 p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«True␤»
14:52 TimToady looks like niecza copied/reinvented that bit of rakudo
14:53 TimToady pugs: say Array.isa(List)
14:53 p6eval pugs: OUTPUT«1␤»
14:56 TimToady masak: actually, I'd say your cons cell there is a lexical scope, which seems kinda heavyweight...
14:58 masak I just think it's very beautiful.
14:59 masak I'm currently (re-)discovering lambda calculus.
14:59 masak and thinking a lot about how lexical scopes and function application are Turing complete.
15:00 brrt joined #perl6
15:01 TimToady we need a word for "Turing complete but makes parallelism almost impossible to think about"
15:01 masak furthermore, in some fuzzy sense, it seems that closures bring something *more* than Turing-based computation. which in the strictest sense is false, but... there's something about HOP and closures that feels like "more" than "just" ordinary imperative programming.
15:01 geekosaur TimToady, I thought we had one? "Lisp"
15:01 masak maybe it's just because ordinary imperative programming has traditionally been so starved of closures.
15:01 TimToady Lisp cheats whre it has to
15:01 TimToady *where
15:02 TimToady lamda calculus can't
15:02 geekosaur which lambda calculus?  although, generally parallelism goes to different calculi, yeh.  pi calculus?
15:02 jnthn Array makes its elements be scalar containers. List doesn't (they may be, but it doesn't make any effort to make it so). Thus Array does what List does *and* an extra thing, which is the kind of place inheritance is suitable.
15:03 masak geekosaur: I'm investigating pi calculus presently. it's quite a head trip.
15:03 masak geekosaur: where lambda calculus is about computation, pi calculus is about communication.
15:03 geekosaur I know it's out there and has been explored with respet to prallelism but have not had the chance to poke at it as yet
15:04 daxim tadzik, I object to the denigrating comment <http://ttjjss.wordpress.com/2012/08/09/looks-like-i-pissed-off-the-internet/#comment-194>, no one deserves that, not even fools. to deescalate, will you reply with words of moderation?
15:05 masak I object to it as well. :( it basically hijacks the post.
15:05 masak that is such an idiotic comment.
15:07 tadzik I don't like the comment either, but it'd be somewhat ironic to censor that comment in a post which mostly complains about my comment being censored
15:07 xinming joined #perl6
15:07 daxim then just reply
15:07 tadzik that's probably a good idea
15:10 masak make it an excellent reply. :)
15:10 tadzik not sure what I should write there
15:10 tadzik to not make it sound double-meaned, sort of
15:11 masak "That comment was unnecessary, chauvinist, and not the kind of language I like to see on my blog."
15:11 TimToady "Twee! Penalty for unnecessary roughness."
15:12 * masak is not sure he's seen the onomatopoetic spelling of a whistle sound in English before
15:13 TimToady a comment terminator of */ shouln't matter in a regex if you're parsing correctly
15:14 kaare__ joined #perl6
15:14 moritz well, if you're parsing a comment, you are not parsing the regex
15:14 masak TimToady: I fail to see how that can be so. the inside of /* */ is flat.
15:14 moritz so it terminates the comment
15:15 TimToady if you're parsing properly, you're either in comment, or in regex, not in some indeterminate state
15:16 masak TimToady: I think you're missing the point.
15:16 moritz well, it's about commented-out regexes
15:16 masak this is not comment-in-regex (like with Perl 5's /x regexes)
15:16 masak this is regex-in-comment :)
15:16 jnthn I think the issue is "if we comment out code that happens to contain */ in a regex, we're in trouble"
15:16 TimToady okay
15:16 TimToady yes, that's a problem
15:16 moritz /* the follow regex did not work: /^.*/, I don't know why */
15:17 jnthn The consequences will be a syntax error, almost certainly.
15:17 jnthn I guess "be mindful if commenting out code using /*...*/, otherwise go right ahead"
15:18 jnthn You already need to be careful anyway, since if you comment out code using /* ... */ for comments within it, same problem.
15:18 tadzik daxim, masak, replied
15:18 jnthn So I'd guess most editors with such a function with // it already
15:19 kst joined #perl6
15:19 tadzik maybe not definite enough as you'd see it
15:19 * moritz would have just deleted the comment
15:20 masak tadzik++ daxim++
15:20 TimToady deleting is the correct way to comment out code as well :)
15:20 jnthn :D
15:20 tadzik that's not what I put the comment field for. My comment on her blog apparently didn't fit the original content, so it got deleted – I don't think that was a good thing
15:21 tadzik that's his opinion, not mine, which I hope is clear enough now
15:21 * jnthn has soon too much commented out code
15:21 jnthn Usually left from years ago
15:21 moritz tadzik: there's a difference between differing opinions and using offensive language, IMHO. But your mileage clearly varies, and that's OK
15:22 jnthn s/soon/seen/
15:22 masak I'm less concerned with his language than with the brain paths that would prompt such a comment.
15:23 tadzik hometime &
15:38 dalek rakudo/sigilless: c0ad1c0 | moritz++ | src/Perl6/Grammar.pm:
15:38 dalek rakudo/sigilless: start to parse sub f(\sigilless), and warn about old usage
15:38 dalek rakudo/sigilless: review: https://github.com/rakudo/rakudo/commit/c0ad1c0c78
15:44 dalek rakudo/sigilless: 5740db1 | moritz++ | src/Perl6/Grammar.pm:
15:44 dalek rakudo/sigilless: parse type-constrained sigilless parameters
15:44 dalek rakudo/sigilless: review: https://github.com/rakudo/rakudo/commit/5740db1be9
15:53 rindolf joined #perl6
15:53 rindolf Hi all.
15:53 moritz hello rindolf.
15:53 rindolf moritz: what's shakin'?
15:58 masak hi rindolf.
15:58 rindolf masak: hi, what's up?
15:58 masak roof. sky. :)
15:58 moritz masak: rakudo's parser
15:59 masak \o/
15:59 moritz erm, meant to answer to rindolf. moritztabfail.
16:00 rindolf moritz: nice.
16:00 dalek rakudo/sigilless: 6f4df39 | moritz++ | src/Perl6/Actions.pm:
16:00 dalek rakudo/sigilless: add (preliminary?) action method for defterm
16:00 dalek rakudo/sigilless: review: https://github.com/rakudo/rakudo/commit/6f4df39f06
16:01 kcwu joined #perl6
16:02 orafu joined #perl6
16:09 moritz jnthn: now 'sub f(|b) { }; f 42'  says Lexical 'b' not found
16:10 moritz jnthn: and the generated PIR code indeed does not contain a .lex "b", $P\d+ line
16:10 moritz jnthn: any idea what could prevent the emission of non-sigil variables?
16:11 jnthn moritz: What parses the b?
16:11 moritz jnthn: a new token defterm
16:11 moritz which sets parts of %*PARAM_INFO
16:11 jnthn moritz: Does it install a lexical?
16:12 jnthn Yeah, that's not enough
16:12 jnthn param_var is what usually installs the lexical
16:12 moritz ah
16:12 jnthn But I guess we don't call param_var here
16:12 moritz i must have missed that part
16:12 jnthn You can probably steal/factor out code from param_var
16:13 moritz I'll steal first, and factor out later :-)
16:13 jnthn :)
16:18 cognominal joined #perl6
16:30 moritz r: Int = 3
16:30 p6eval rakudo e20252: OUTPUT«Cannot assign to a non-container␤  in block  at /tmp/VG1QG7vA_I:1␤␤»
16:32 dalek rakudo/sigilless: 5533f75 | moritz++ | src/Perl6/Actions.pm:
16:32 dalek rakudo/sigilless: declare sigilless variables in method defterm, jnthn++
16:32 dalek rakudo/sigilless: review: https://github.com/rakudo/rakudo/commit/5533f75c7f
16:36 dalek rakudo/sigilless: 70d8b2a | moritz++ | src/Perl6/Actions.pm:
16:37 dalek rakudo/sigilless: refactor common parameter declaration code from defterm and param_name into a common method
16:37 dalek rakudo/sigilless: review: https://github.com/rakudo/rakudo/commit/70d8b2aba7
16:39 moritz $ ./perl6 -e 'sub foo(\b) { say ::("b") }; foo 42'
16:39 moritz 42
16:39 moritz now that's progress
16:39 moritz $ ./perl6 -e 'sub foo(\b) { say b }; foo 42'
16:39 moritz ===SORRY!===
16:39 moritz CHECK FAILED:
16:39 moritz Undefined routine '&b' called (line 1)
16:39 UncleFester6 joined #perl6
16:39 moritz so I just need to twiddle the whatever to interpret b as a variable name, not a routine call
16:40 moritz question is, what and where is the "whatever"?
16:41 jnthn moritz: I can dig if you need me to, but constant makes things that work this way
16:41 mhasch out of curiousity, what are sigil-less parameters needed for?
16:41 jnthn oh...it's getting $*W.is_name to answer true I guess
16:43 moritz mhasch: sigils impose a context. Sometimes you just want to capture whatever comes in, without imposing a context. That's when you need sigil-less parameters
16:45 pmichaud t-shirt design preview at http://pmichaud.com/sandbox/yapceu-tshirt-1a.png
16:45 pmichaud and
16:45 pmichaud http://pmichaud.com/sandbox/yapceu-tshirt-1b.png
16:45 pmichaud comments welcomed.
16:45 tadzik 9nice one :)
16:46 moritz pmichaud++
16:46 jnthn WHY is the beer head being spilled, wasting previous beer?!
16:46 jnthn ;-)
16:46 jnthn pmichaud++
16:46 jnthn er, *precious
16:46 moritz jnthn: because we're so busy talking :-)
16:46 pmichaud you won't believe how hard it is to find a reasonable b/w beer icon :)
16:46 colomon makes me wish I was going just so I could get one.
16:46 [Coke] pmichaud++
16:46 pmichaud colomon: I'm very likely to cafepress/zazzle this
16:46 * [Coke] will gladly purchase one.
16:47 pmichaud indeed, I'm thinking of creating one w/o the YAPC::EU monikers
16:47 colomon pmichaud++: oooooo!
16:47 colomon +100
16:48 moritz jnthn: hm, World.is_name should already respond with 1 to sigilless params, since it uses find_symbol internally
16:49 moritz jnthn: but token term:sym<identifier> chekcs is_type, not is_name
16:49 jnthn moritz: Oh...but find_symbol wants it to have a known compile-time value.
16:50 jnthn moritz: Which we don't since it's a parameter.
16:50 moritz hm
16:50 moritz jnthn: so, what should I do? decouple is_name from find_symbol?
16:51 jnthn moritz: yeah
16:51 jnthn I think so
16:51 jnthn moment
16:51 jnthn moritz: find_symbol has quite a lot of logic
16:51 jnthn moritz: It may not be wise to duplicate that
16:52 jnthn moritz: Maybe we should give it a named argument
16:52 jnthn oh
16:52 jnthn Or keep calling find_symbol
16:52 jnthn and if it doesn't find anything, then try "is_lexical" also
16:53 jnthn Or try that first
16:53 jnthn We can also check it's not a multi-jointed name.
16:54 * moritz tries
16:55 kaleem joined #perl6
16:56 thelazydeveloper joined #perl6
17:04 benabik joined #perl6
17:05 mhasch pmichaud: very nice design. I like the not quite smoothed out camelia portrait
17:07 pmichaud mhasch: thanks!
17:07 * [Coke] wonders if there's a PM group near Orlando.
17:08 pmichaud [Coke]: you mean besides Orlando.pm?  ;-)
17:09 mhasch http://www.pm.org/groups/592.html
17:10 moritz r: constant a = 1; a 1
17:10 p6eval rakudo e20252: OUTPUT«===SORRY!===␤Confused␤at /tmp/hEY5vX4vbb:1␤»
17:10 * moritz finds he still doesn't understand how constants are parsed
17:11 masak as terms? :)
17:11 * masak is so helpful
17:11 moritz not by term:sym<identifier>, because that one expects an argument list afterwards
17:11 jnthn term:sym<name>
17:12 pmichaud term:sym<name>, likely.
17:12 moritz r: constant a::b = 3; say a::b
17:12 p6eval rakudo e20252: OUTPUT«===SORRY!===␤Missing initializer on constant declaration␤at /tmp/5hGkcJjFDB:1␤»
17:12 pmichaud okay, I'm off to see if the t-shirt place can indeed get me some shirts within 24 hours
17:12 pmichaud bbiaw
17:12 jnthn o/
17:13 masak good luck and happy birthday!
17:15 [Coke] looks like Orlando.pm is in a more organized hiatus than ALbany.pm, anyway.
17:15 moritz oh, it seems that with my changes to is_name, the sigilless params are parsed correctly
17:15 mhasch Frankfurt should have t-shirt shops...
17:16 cognominal joined #perl6
17:34 ChoHag So how do you inherit from the basic types?
17:34 ChoHag I tried class Foo is Array with nothing inside but I can't assign [0..5] to it (my Foo $x = [0..5])
17:36 jeffreykegler r: "foo123bar" ~~ / foo <( \d+ )> bar /; say $();
17:36 p6eval rakudo e20252: OUTPUT«␤»
17:37 TimToady r: my class Foo is Array { }; my @a := Foo.new; @a = 1..5; say @a[4]
17:37 p6eval rakudo e20252: OUTPUT«5␤»
17:37 jeffreykegler S05 says the previous snippet outputs '123'
17:37 TimToady np: "foo123bar" ~~ / foo <( \d+ )> bar /; say $();
17:38 TimToady p: "foo123bar" ~~ / foo <( \d+ )> bar /; say $();
17:38 p6eval pugs: OUTPUT«Error eval perl5: "if (!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤    unshift @INC, '/home/p6eval/.cabal/share/Pugs-6.2.13.20120717/blib6/pugs/perl5/lib';␤    eval q[require 'Pugs/Runtime/Match/HsBridge.pm'] or die $@;␤}␤'Pugs::Runtime::Match::HsBridge'␤"␤*** Can't locate P…
17:38 ChoHag Would I need to add much to the class to be able to use it in the same way?
17:38 TimToady n: "foo123bar" ~~ / foo <( \d+ )> bar /; say $();
17:38 p6eval niecza v19-20-g07dcc9e: OUTPUT«123␤»
17:38 TimToady niecza++
17:38 ChoHag I can do my Array $foo = [0..5];
17:38 jnthn We still have $()?
17:38 lichtkind i think so
17:38 lichtkind its in the tablets
17:38 jnthn ChoHag: Yes because [0..5] is an Array
17:39 jnthn But it's not a Foo
17:39 jnthn r: "foo123bar" ~~ / foo <( \d+ )> bar /; say $/;
17:39 p6eval rakudo e20252: OUTPUT«q[123]␤␤»
17:40 TimToady r: my class Foo is Array { }; my @a is Foo; @a = 1..5; say @a[4]; say @a.WHAT
17:40 p6eval rakudo e20252: OUTPUT«5␤Array()␤»
17:40 TimToady n: my class Foo is Array { }; my @a is Foo; @a = 1..5; say @a[4]; say @a.WHAT
17:40 p6eval niecza v19-20-g07dcc9e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Trait name not available on variables at /tmp/_yJQmcOOLr line 1:â�¤------> [32mmy class Foo is Array { }; my @a is Foo[33mâ��[31m; @a = 1..5; say @a[4]; say @a.WHAT[0mâ�¤â�¤Unhandled exception: Check failedâ�¤â�¤  at /home/p6eval/ni…
17:40 jnthn Variable traits NYI (still :/)
17:40 TimToady p: my class Foo is Array { }; my @a is Foo; @a = 1..5; say @a[4]; say @a.WHAT
17:40 p6eval pugs: OUTPUT«5␤Array()␤»
17:40 * jnthn needs to try and put his finger on the design issues that keep him from implemetning them.
17:41 jnthn dinner &
17:44 jeffreykegler r: ')))(()())'~~ /  <( '(' <~~>* ')' )>  /; say $/;
17:44 p6eval rakudo e20252: OUTPUT«q[(()())]␤␤»
17:44 jeffreykegler Previous works nicely.  Is there a better way to do the capture?
17:45 moritz n: sub f(\x) { x() }; f sub ($a) { say $a }
17:45 p6eval niecza v19-20-g07dcc9e: OUTPUT«Unhandled exception: No value for parameter '$a' in 'ANON'␤  at /tmp/wHltQbFLHn line 0 (ANON @ 1) ␤  at /tmp/wHltQbFLHn line 1 (f @ 4) ␤  at /tmp/wHltQbFLHn line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3) ␤  at /home/p…
17:45 moritz n: sub f(\x) { x(42) }; f sub ($a) { say $a }
17:45 p6eval niecza v19-20-g07dcc9e: OUTPUT«42␤»
17:49 japhb The early birds all beat me to it, but: "Happy birthday, pmichaud!"
17:50 jeffreykegler r:  my $x = ')))(()())'~~ /  '(' <~~>* ')'  /; say $x;
17:50 p6eval rakudo e20252: OUTPUT«q[(()())]␤␤»
17:51 TimToady yes, that works just as well
17:51 jeffreykegler OK.  Works perfectly and looks beautiful.
17:51 TimToady the implicit .*? of the scan is left out by default
17:54 dalek doc: 9ee37cf | (Tim Smith)++ | lib/variables.pod:
17:54 dalek doc: Fix a left-/right-hand-side mix-up re: assignment
17:54 dalek doc: review: https://github.com/perl6/doc/commit/9ee37cfc8f
17:54 jeffreykegler r:  my $x = '(((((()())(()'~~ /  '(' <~~>* ')'  /; say $x;
17:54 p6eval rakudo e20252: OUTPUT«q[(()())]␤␤»
17:54 jeffreykegler Again, perfect.
17:54 TimToady I would love to get rid of the q[] though
17:56 moritz then say ~$x
17:56 TimToady in fact, that's why we added the 「...」 notation
17:56 jeffreykegler r:  my $x = '(((((()())(()'~~ /  '(' <~~>* ')'  /; say ~$x;
17:56 p6eval rakudo e20252: OUTPUT«(()())␤»
17:56 moritz we did?
17:56 TimToady q[] is ugly, ugly, ugly
17:56 * moritz wasn't aware of it
17:57 moritz $ ./perl6  -e 'sub f(\b) {say b }; f 4'
17:57 moritz 4
17:57 moritz \o/
17:57 TimToady S02:3711
17:57 masak what's ugly about q[]?
17:58 TimToady asymmetry
17:58 TimToady also use of both letter and symbol
17:58 TimToady thirdly, doesn't look to see if there're [] inside
17:59 TimToady r: $_ = '['; /./; say $/
17:59 p6eval rakudo e20252: OUTPUT«Any()␤»
17:59 TimToady hmm
17:59 moritz but 「...」 looks for 」 inside?
17:59 moritz TimToady: rakudo doesn't do sink context
17:59 moritz r: $_ = '['; m/./; say $/
17:59 p6eval rakudo e20252: OUTPUT«q[[]␤␤»
17:59 TimToady it could, but the idea is that it won't have to hearly so often
17:59 TimToady *nearly
18:00 TimToady [ and ] occur far more often in things you want to print
18:01 moritz which of course changes once we use 「...」 more often :-)
18:01 TimToady life is tough sometimes
18:01 moritz do tell :-)
18:02 jeffreykegler Leave the  「...」  for Perl 7
18:02 TimToady why?  Perl 6 is all over Unicode
18:02 TimToady and in this case it's a trivial change
18:03 jeffreykegler Just joking. :-)
18:03 TimToady hmm, though it occurs to me that I haven't added 「...」 to STD yet...
18:04 * mhasch has HALFWIDTH LEFT CORNER BRACKET not on his keyboard
18:04 jeffreykegler I actually think  「...」  looks really elegant
18:06 moritz mhasch: no need to type it
18:08 TimToady well, unless you want the pretty version of Q[]
18:09 dalek std: 7b5e4fb | larry++ | STD.pm6:
18:09 dalek std: add 「...」 quotes
18:09 dalek std: review: https://github.com/perl6/std/commit/7b5e4fbbcc
18:10 moritz nr: constant a = sub ($x) { say $x }; say a(3)
18:10 p6eval rakudo e20252: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (line 1)␤»
18:10 p6eval ..niecza v19-20-g07dcc9e: OUTPUT«3␤True␤»
18:12 TimToady r: constant a = sub ($x) { say $x }; say a.(3)
18:12 p6eval rakudo e20252: OUTPUT«3␤True␤»
18:13 TimToady interesting difference of semiotics there...
18:14 moritz nr: constant x = &say; x(42); x 42;
18:14 p6eval rakudo e20252: OUTPUT«===SORRY!===␤Confused␤at /tmp/dipyiaLpim:1␤»
18:14 p6eval ..niecza v19-20-g07dcc9e: OUTPUT«[31m===[0mSORRY![31m===[0m��Two terms in a row (listop with args requires whitespace or parens) at /tmp/vwiy6cn42i line 1:�------> [32mconstant x = &say; x(42); x [33m�[31m42;[0m��Parse failed��»
18:14 moritz nr: constant x = &say; x(42);
18:14 p6eval rakudo e20252: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&x' called (line 1)␤»
18:14 p6eval ..niecza v19-20-g07dcc9e: OUTPUT«42␤»
18:15 pmurias joined #perl6
18:16 TimToady apparently rakudo is making some deep distinction that niecza is not
18:16 jnthn It is
18:16 moritz rakudo adhers to the principle that an identifier followed by a ( is a subroutine call
18:16 jnthn Should it be, though?
18:16 jnthn Right
18:16 jnthn It's quite strict about that.
18:17 jnthn Note that
18:17 TimToady n: sub pi { say "PI!" }; pi()
18:17 p6eval niecza v19-20-g07dcc9e: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Num␤  at /tmp/BTI_mPpRzD line 1 (mainline @ 4) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3) ␤  at /home/p6eval/niecza/lib/CORE.setting line 3930 (module-CORE @ 564…
18:17 moritz unless it's a type name, in which case it grudgingly accepts it as coercion syntax
18:17 jnthn nr: constant &x = &say; x(42);
18:17 p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«42␤»
18:17 mhasch Hm. Still poring over prettiness notions. Perl6tidy might standardize my fancy brackets then.
18:18 sorear good * #perl6
18:18 benabik I guess niecza always looks for "x" before "&x" when given "x()"
18:18 benabik (Judging by the pi above)
18:18 sorear yes.
18:18 sorear this is considered somewhat of a bug.
18:18 sorear mhasch: perl6tidy !?
18:19 TimToady ⸘perl6tidy‽
18:19 benabik I can see wanting type names to be less of a special case.
18:20 benabik If Str() always looks for Str before &Str..
18:20 dalek rakudo/nom: 94aa2b7 | moritz++ | src/core/Match.pm:
18:20 dalek rakudo/nom: switch Match.gist from q[...] to 「...」, TimToady++
18:20 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/94aa2b79d6
18:20 TimToady I think of constants as a funny kind of type
18:20 mhasch there ought to be a perl6 prettyprinting tool available some day.
18:20 moritz mhasch: then write one :-)
18:21 moritz TimToady: I still think that's a premature pessimization
18:21 moritz for example
18:21 moritz constant foo = 42; say 42 ~~ foo
18:21 sorear I'm with alias on this one
18:22 moritz if I think of a constant as a kind of type, I'd expect that to be false
18:22 moritz but that is add odds with my current view of constants
18:22 pmurias sorear: re targeting javascript, rakudo's js backend is passing the first 7 sanity tests
18:22 sorear moritz: when used as a type it is a subtype, Int where 42
18:23 TimToady sure, that's what makes it funny.  More accurately, I think of it as a type when used as a predicate of some sort
18:23 sorear perl6 needs to be restricted a lot before tools that are tolerant of parse errors can be written
18:24 * TimToady wonders what Steve Yegge's dynamic toolchain system will think of Perl 6... :)
18:25 TimToady Perl 6 is kinda way spread out on his conservative vs liberal spectrum
18:25 sirrobert joined #perl6
18:25 moritz sorear: which makes 42.0 ~~ foo   false
18:25 c1sung joined #perl6
18:25 moritz nr: constant foo = 42; say 42.0 ~~ foo
18:25 p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«True␤»
18:26 TimToady nr: constant foo of Int = 42; say 42.0 ~~ foo
18:26 p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«True␤»
18:26 daxim stealing a PPI slogan:  "perl6 is neither left nor right, but forward!"
18:26 sirrobert r: my $str = '"a":0'; say ($str ~~ m/"a":0/) ?? "match" !! "no match";
18:26 p6eval rakudo e20252: OUTPUT«no match␤»
18:26 sirrobert Why doesn't that match?
18:27 PerlJam sirrobert: the colon isn't literal
18:27 jnthn 'cus you need to quote the :
18:27 sirrobert r: my $str = '"a":0'; say ($str ~~ m/"a"\:0/) ?? "match" !! "no match";
18:27 p6eval rakudo e20252: OUTPUT«no match␤»
18:27 sirrobert Is there some other quoting mechanism...?
18:27 TimToady r: my $str = '"a":0'; say ($str ~~ m/ '"a":0' /) ?? "match" !! "no match";
18:27 p6eval rakudo e20252: OUTPUT«match␤»
18:27 sirrobert hrm
18:27 TimToady you mean like quotes? :)
18:28 TimToady p6 regexen are not p5 regexen...
18:28 PerlJam sirrobert: in general non-alphanumerics are special, so you need to do something to match them literally
18:28 TimToady all non-alphas are reserved
18:28 sirrobert ah
18:28 sirrobert that's a good tip =)
18:28 TimToady *non-alphanums
18:29 TimToady and it's an easy rule to remember, unlike p5's list of reserved chars
18:29 sirrobert Ok, thanks.  was writing some tests that I just couldn't get to pass =)
18:30 TimToady plus, there's no reason to stick with \ in those cases where '' is more readable, especially with whitespace around it
18:30 mhasch does it hurt if you escape any non-alphanum in p5?
18:30 moritz no
18:30 sirrobert hmmm just leave off the //?
18:30 moritz which is why quotemeta can do it
18:30 PerlJam sirrobert: uh .. no
18:30 TimToady well, in this case it'd work
18:30 TimToady but it won't scan
18:31 moritz sirrobert: you can also use quoted strings in a regex
18:31 TimToady mhasch: in regex, no, but extra \ are considered differently in '' vs "" in p5
18:32 mhasch TimToady: Good point.
18:32 TimToady (and in p6)
18:32 sirrobert ohhhhh heh, I misread "no reason to stick with \" as "no reason to stick with /"
18:32 TimToady nr: say '\d'; say "\d";
18:33 p6eval niecza v19-20-g07dcc9e: OUTPUT«[31m===[0mSORRY![31m===[0mâ�¤â�¤Unrecognized backslash sequence: '\d' at /tmp/SDPoeX2_Vx line 1:â�¤------> [32msay '\d'; say "\d[33mâ��[31m";[0mâ�¤â�¤Use of uninitialized value in string contextâ�¤  at /home/p6eval/niecza/boot/lib/CORE.setting line 1262 (warn @ …
18:33 p6eval ..rakudo e20252: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\d' at line 2, near "\";"␤»
18:33 TimToady eval: say '\d'; say "\d";
18:33 buubot_backup TimToady: ERROR: syntax error at (eval 20) line 1, near "say '\d'"
18:33 mhasch I try to avoid leaning toothpicks of any kind where I can.
18:33 TimToady eval: print '\d',"\n"; print "\d", "\n";
18:33 buubot_backup TimToady: \d d 1
18:33 moritz $ ./perl6 -e 'sub f(\x) { x = 42 }; f my $x; say $x'
18:33 moritz 42
18:33 moritz still works, great
18:34 TimToady I guess p6 carps on unrecognized backslashes rather than guessing
18:35 jeffreykegler joined #perl6
18:35 TimToady r: my $str = '"a":0'; say $str ~~ '"a":0' ?? "match" !! "no match";
18:35 p6eval rakudo e20252: OUTPUT«match␤»
18:36 TimToady r: my $str = '  "a":0  '; say $str ~~ '"a":0' ?? "match" !! "no match";
18:36 p6eval rakudo e20252: OUTPUT«no match␤»
18:36 TimToady r: my $str = '  "a":0  '; say $str ~~ /'"a":0'/ ?? "match" !! "no match";
18:36 p6eval rakudo e20252: OUTPUT«match␤»
18:36 TimToady that's what I thought you were asking about
18:42 Sally588 joined #perl6
18:42 dalek std: 235f71b | larry++ | STD.pm6:
18:42 dalek std: add 「...」 as valid quoting inside regex as well
18:42 dalek std: review: https://github.com/perl6/std/commit/235f71b76b
18:43 tadzik Sally588: no! I _have_ to see them!
18:43 Sally588 was kicked by moritz: Sally588
18:43 benabik Britney Spears codes Perl 6 naked?  Who knew?
18:43 benabik I mean, that's the only reason to bring that up here, right?
18:43 * masak .oO( because we're never off-topic here ) :P
18:43 echo__ joined #perl6
18:44 tadzik :D
18:44 mhasch Hm, maybe because we were discussing pretty and ugly a couple of minutes ago.
18:45 TimToady .oO(free naked Perl 6 pix...)
18:46 benabik Hot candids of Camelia.
18:49 HarryS joined #perl6
18:49 mhasch In German, 6 and sex sound similar...
18:49 dalek roast: 9e3bbb6 | moritz++ | S05-mass/rx.t:
18:49 dalek roast: rakudo-unfudge tests for interpolation in quoted strings in regexes
18:49 dalek roast: review: https://github.com/perl6/roast/commit/9e3bbb6399
18:49 snearch joined #perl6
18:49 benabik Not too dissimilar in english, depending on how well you enunciate.
18:52 moritz jnthn: do you remember if you resolved the ticket for  /"$x"/ that you recently fixed?
18:52 moritz jnthn: 'cause I just unfudged tests for it
18:53 jnthn I think I testneeded it
18:53 jnthn dinner &
18:53 moritz just found it, takk
18:58 rindolf Hi all. https://github.com/rakudo/rakudo - what happened to the "master" branch?
18:58 sorear mhasch: you must be new here.  there was quite a campaign to title the 6book 'The Joy of Six' but better judgement prevailed.
18:58 sorear rindolf: It was deleted because we decided it didn't fit our workflow
18:59 rindolf sorear: ah.
18:59 sorear The most active branch now is 'nom'
18:59 masak we have this weird hangup against calling our master branch 'master'.
18:59 sorear clearly, we should call it 'blead'
18:59 mhasch sorear: you caught me there, indeed
18:59 masak :)
19:02 * rindolf cries out loud so the whole world will hear him - "WHAT THE HELL DOES GIT WANT FROM MY LIFE???!!!"
19:03 sirrobert what do you all do when you want to re-use a bit of code (e.g. a sub) in multiple tests?  It seems like ufo doesn't include ./blib/lib in env when doing "make test"
19:04 sirrobert is there some best practice?
19:05 sirrobert hmm looking in the makefile, maybe it does... but running it it doesn't seem to =)  looking further...
19:08 mhasch nr: say q[\\]; say Q[\\];
19:08 p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«\␤\\␤»
19:08 sirrobert nevermind, it's something funny with prove, not ufo
19:11 lichtkind_ joined #perl6
19:18 sirrobert ok, figured something out... output to stdout interferes with prove.
19:18 sirrobert =)
19:18 pmichaud btw, thanks to everyone for birthday wishes :)
19:18 pmichaud afk
19:24 sirrobert How can I redirect $*OUT to a scalar (or similar)?
19:26 TimToady my $*OUT = some object that pretends to be a handle
19:26 sirrobert hmm... almost too easy... ;)
19:27 sirrobert you keep answering all my hard questions with simple answers.
19:27 sirrobert Thanks =)
19:28 geekosaur the hard part is likely to be "what pretends to be a handle"...
19:28 sirrobert working on that now =)
19:30 TimToady nr: my $*OUT = class Foo {}.new; print "hi";
19:30 p6eval rakudo 94aa2b: OUTPUT«===SORRY!===␤Confused␤at /tmp/UlQWxjmwtm:1␤»
19:30 p6eval ..niecza v19-20-g07dcc9e: OUTPUT«hi»
19:30 sirrobert ooh
19:30 TimToady nr: my $*OUT = (class Foo {}).new; print "hi";
19:30 p6eval niecza v19-20-g07dcc9e: OUTPUT«hi»
19:30 p6eval ..rakudo 94aa2b: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method print at src/gen/CORE.setting:732␤  in sub print at src/gen/CORE.setting:7080␤  in block  at /tmp/jBjO5nWfO1:1␤␤»
19:31 TimToady obviously niecza is not using $*OUT...
19:31 sirrobert heh nod
19:31 sirrobert I'm using Rakudo... trying to work it out there
19:31 jnthn Was gonna say, how'd it work without defining a print method....
19:31 sirrobert my project is using Rakudo, I mean
19:35 colomon nr: my $*OUT = (class Foo {}).new;  "hi".print;
19:35 p6eval niecza v19-20-g07dcc9e: OUTPUT«Unhandled exception: Excess arguments to Mu.print, used 1 of 2 positionals␤  at /home/p6eval/niecza/lib/CORE.setting line 0 (Mu.print @ 1) ␤  at /home/p6eval/niecza/lib/CORE.setting line 261 (Mu.print @ 4) ␤  at /tmp/RSlQ76fsfU line 1 (mainline @ 6) ␤  at …
19:35 p6eval ..rakudo 94aa2b: OUTPUT«Too many positional parameters passed; got 2 but expected 1␤  in method print at src/gen/CORE.setting:732␤  in sub print at src/gen/CORE.setting:7080␤  in method print at src/gen/CORE.setting:732␤  in block  at /tmp/LN9lKrq2JV:1␤␤»
19:36 sirrobert hmmm  is there a way I can redirect $*OUT to a $scalar?
19:36 sirrobert er string
19:37 colomon TimToady: looks like niecza is somewhat inconsistent in how $*OUT is used.
19:38 jnthn sirrobert: You just implement methods print and say in the object you assign to $*OUT
19:38 sirrobert ah
19:38 jnthn sirrobert: And make them concatenate what is passed to them into that string.
19:38 sirrobert ok, I'll work on that.
19:38 sirrobert thanks =)
19:39 jnthn sirrobert: See also https://github.com/sergot/IO-Capture-Simple/
19:39 sirrobert thanks
19:40 leprevost joined #perl6
19:41 sirrobert This worked for me:  $*OUT = class {method print (*@args) {}}; print "foo";
19:41 sirrobert (lets me supress stdout)
19:41 sirrobert thanks all (jnthn++)
19:42 birdwindupbird joined #perl6
19:56 fhelmberger joined #perl6
20:03 moritz jnthn: fwiw the sigilless branch seems to work, and passes all spectests except one
20:03 moritz and the one that fails is
20:03 moritz { constant foo = 42 }; eval_lives_ok '42 == foo', 'constants are our-scoped'
20:04 moritz I guess that $*W.is_name doesn't fall back to our scopes
20:05 masak wouldn't that make classes also not work there?
20:05 masak r: { class A {} }; say eval '42 == A'
20:05 p6eval rakudo 94aa2b: OUTPUT«use of uninitialized value of type A in numeric context  in block  at eval_0:1␤␤False␤»
20:05 jnthn Good point
20:05 masak r: { class A {} }; say eval '42 == A.new'
20:05 p6eval rakudo 94aa2b: OUTPUT«Cannot call 'Numeric'; none of these signatures match:␤:(Mu:U \$v, Mu *%_)␤␤  in method Numeric at src/gen/CORE.setting:697␤  in sub infix:<==> at src/gen/CORE.setting:2542␤  in block  at eval_0:1␤  in  at eval_0:1␤  in sub eval at src/gen/CORE.setting:497␤  in blo…
20:05 jnthn moritz: Does what masak just poasted also have an issue?
20:06 masak r: { class A { method Numeric { 42 } } }; say eval '42 == A.new'
20:06 p6eval rakudo 94aa2b: OUTPUT«True␤»
20:06 moritz jnthn: no
20:06 moritz $ ./perl6 -e '{ class A { } }; say A.new'
20:06 moritz A.new()
20:06 moritz that one goes through a different codepath, and checks $*W.is_type
20:07 jnthn { class A { } }; eval '42 == A'
20:07 jnthn moritz: What does ^ do?
20:08 jnthn moritz: I'm not quite sure I follow why they go through different code paths
20:09 moritz jnthn: afaict the class case goes through term:sym<identifier>
20:09 birdwindupbird joined #perl6
20:09 jnthn moritz: I doubt it, because that requires a (
20:10 moritz oh
20:11 japhb_ joined #perl6
20:11 moritz jnthn: then I don't understand it either
20:13 japhb_ moritz, what are your feelings on progressive enhancement of perl6.org?  I noticed over the weekend that you objected to having JavaScript and AJAX on the home page, but was that just that you felt it should not be *required*?  Can we serve something that works decently well with JS off, and gets extra shiny with JS on?
20:13 MayDaniel joined #perl6
20:13 cognominal joined #perl6
20:13 moritz japhb_: depends on what it's used for
20:13 moritz japhb_: I generally don't like JS dependencies for pages that could do without
20:14 jnthn .oO( "It's for adding an animation of camelia chasing nyan cat around the page!" )
20:14 masak that's what progressive enhancement seeks to address. design the page without JS, and provide JS for a better experience if available.
20:15 cognominal joined #perl6
20:15 japhb_ Well, for example, having it so that with JS off, the front page shows a single random Perl 6 snippet, perhaps with links to see prev/next.  With JS on, does a slide show with buttons that pause and go prev/next.
20:16 japhb_ Also, for search, hits a server page with JS off, and does a client-side search with autocomplete with JS on.
20:17 masak hm, Steele and Sussman use "closure" as a non-mass noun in their "Lambda the Ultimate" papers. that's good enuf for me :)
20:19 masak ooh, and they use "close" as a verb!
20:19 masak "it closes the lambda expression in the global environment..." \o/
20:19 * masak steals this usage, like, right now
20:26 moritz search autocompletion is a use case I appreciate
20:26 moritz slide show... dunno, I hate pages that change under my nose
20:27 moritz also I hate maintainting JS, so I don't want to be the one ending up maintaining it
20:28 sherwool joined #perl6
20:29 * moritz only uses "closes over" in the context of closures
20:30 masak there's something charming about "closes in", though :)
20:30 rindolf Hi all.
20:30 rindolf Unable to parse blockoid, couldn't find final '}' at line 48, near "N_LOOP:\n  " ==> what does that mean?
20:31 rindolf Where do I put the loop label?
20:31 masak rindolf: that Rakudo doesn't do labels yet.
20:31 rindolf masak: oh.
20:31 masak I wouldn't be surprised if labels are quite low-hanging fruit these days.
20:31 masak that won't mean Rakudo will understand 'next LABEL', though :)
20:34 sorear masak: 13:33 < augmented4th> Some people, when confronted with a problem, think: "I  know, I'll use caching." Now they have one problems.
20:34 sorear you are collecting these, yes?
20:34 masak \o/
20:34 masak irclog: autopun spotting! :D
20:35 masak sorear++
20:35 moritz augmented4th++ too :-)
20:35 masak yeah.
20:35 masak note that autopuns and the some-people-when-confronted-with-a-problem meme seem to like each other.
20:36 masak this has not been adequately explained.
20:36 masak especially since the first cases of the meme were not autopuns.
20:36 bonifatio joined #perl6
20:37 japhb_ moritz, hmmm, I can understand not wanting the page to change out from under you.  But allowing just the snippet to be replaced on a button press (perhaps with a non-jarring transition) seems nicer to me than the jarring way most user agents do a full-page refresh.  (Which is what you get with JS off anyway.)
20:37 japhb_ And I can understand not wanting to maintain the JS.  Perhaps there is an easy way to encapsulate that.
20:38 sorear japhb_: iframe with a refresh button? ^^
20:38 moritz japhb_: ok, I'd say go for it. And if I'm the one who ends up maintaining it, my maintenance will consist of removing the <script> line from index.html :-)
20:38 japhb_ *chuckle*
20:39 sirrobert use jQuery (for example) with a stable plugin.  then there's basically no maintenance.
20:39 * moritz would ask masak++ how the snippets integration in the front page is progressing, but doesn't want to distract him from YAPC::EU talk preparations eithers
20:39 moritz sirrobert: famous last words :-)
20:39 japhb_ sorear, that (iframe) usually ends up being as objectionable as JS, to those who object to such things.  ;-)
20:39 sirrobert heh
20:40 sirrobert I'd be happy to help as appropriate if you like.
20:41 japhb_ sirrobert, I usually use jQuery always, but whether I end up using a plugin usually ends up being how close the impedance match between my desired UI and the plugin's supported design turns out to be.
20:41 masak moritz: actually, I'm working on macros-d2 while harrassing jnthn++ about it on privmsg :)
20:41 sorear aww, why would anyone not like iframes, they're _cute_
20:41 moritz cute _today_ :-)
20:42 sirrobert japhb_:  me too... except I also factor in spare cycles =)
20:42 sirrobert heh
20:42 pmichaud http://pmichaud.com/sandbox/img_4213.jpg
20:42 japhb_ Holy cow, pmichaud, that was *fast*
20:42 sorear My main worry with javascript on perl6.org is that someone will be tempted to replace it with perl 6 :(
20:43 pmichaud japhb_: there's a local t-shirt shop; they were able to promise 24-hr turnaround, but did it in 2 hours :)
20:43 japhb_ pmichaud, that's impressive.
20:44 felher pmichaud++ :)
20:44 pmichaud yeah, I was marvelling at the strange world we live in today.  From concept to actual delivered product in under 24 hours.
20:44 * japhb_ definitely likes the idea of having those shirts without the YAPC::EU line
20:45 moritz r: grammar P6 { token label { \w+ ':' <.ws> }; token statement { <label> <statement> | \d+ }; token TOP { <statement> } }; say P6.parse('foo: 3')
20:45 p6eval rakudo 94aa2b: OUTPUT«「foo: 3」␤ statement => 「foo: 3」␤  label => 「foo: 」␤  statement => 「3」␤␤»
20:45 * masak wants at least one of those shirts :)
20:45 pmurias sorear: why would that be bad? ;)
20:45 moritz weird, that caused setting compilation to hang
20:45 pmichaud yes, I'll upload the cafepress/other images later tonight, time permitting.
20:46 moritz pmichaud: now imagine having a 3D printer at home that produced the t-shirts diretly in the correct colors :-)
20:47 pmurias sorear: depending on a bitrotted implementation seems the worst case scenario for that
20:47 japhb_ Home programmable loom
20:47 sorear pmurias: good to know my fears are well-founded.
20:48 sorear a 3kb web page does not need 5MB of Perl6 interpreter downloaded.
20:48 masak japhb_: have you read http://www.amazon.com/The-Difference-Engine-William-Gibson/dp/0440423627 ?
20:48 localhost joined #perl6
20:48 dalek rakudo/sigilless: b6bfd77 | moritz++ | src/Perl6/World.pm:
20:48 dalek rakudo/sigilless: World.is_name should not require the name to have a symbol knwon at compile time
20:48 dalek rakudo/sigilless: review: https://github.com/rakudo/rakudo/commit/b6bfd77a3e
20:48 dalek rakudo/sigilless: 53c7856 | moritz++ | src/core/ (26 files):
20:48 dalek rakudo/sigilless: switch protos to use | instead of |$
20:48 dalek rakudo/sigilless: review: https://github.com/rakudo/rakudo/commit/53c78568f7
20:48 dalek rakudo/sigilless: e6c08fa | moritz++ | src/Perl6/Actions.pm:
20:48 dalek rakudo/sigilless: start to wire up action methods for sigilless params
20:48 dalek rakudo/sigilless:
20:49 dalek rakudo/sigilless: sub f(\b) { say b }; f 42   now works
20:49 dalek rakudo/sigilless: review: https://github.com/rakudo/rakudo/commit/e6c08fa10d
20:49 japhb_ masak, no ... though I am aware of the importance of the loom in the history of computing.  :-)
20:50 moritz oh, I thought I pushed those patches earlier
20:50 moritz https://github.com/rakudo/rakudo/commit/e6c08fa10d2594b75d6f27846444671adf7fc70a that branch seems to have the problems with our-scoped constants
20:51 moritz I'm not quite sure what to do about that
20:51 sftp joined #perl6
20:51 jnthn moritz: I can look, but probably not until tomorrow.
20:52 moritz jnthn: no problem, I'm going to sleep very soon anyway
20:55 * [Coke] is happy to maintain JS.
20:57 * masak .oO( why do we have a branch 'rakudo/silliness'? isn't that taking silly a bit too far? ) :P
20:57 pmichaud no, that would be the taking_silly_a_bit_too_far branch.  Also known as  "silly" +< 1.
20:57 [Coke] a bit, a byte. whatever it takes.
20:57 masak pmichaud: :D
20:58 pmichaud or maybe "silly" ~< 1
20:58 pmichaud r:  say "silly" ~< 1
20:58 p6eval rakudo 94aa2b: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix < instead␤at /tmp/f39tIy984K:1␤»
20:58 moritz masak: because of the ministry of sigil walks
20:58 masak :P
20:59 pmurias sorear: I'm not planning to do that. Replacing a tiny script won't be impressive at all but could end up hugely annoying
21:00 pmurias sorear: and avoid including a whole bunch of unnessesary runtime seems nessesary for putting perl6 in the browser
21:00 dalek doc/htmlify-refactor: d3024f0 | moritz++ | / (2 files):
21:00 dalek doc/htmlify-refactor: more Registry usage/hackery
21:00 dalek doc/htmlify-refactor: review: https://github.com/perl6/doc/commit/d3024f0a96
21:41 tokuhiro_ joined #perl6
21:46 masak I think I finally understand CPS.
21:46 masak instead of having "return" built-in, you pass a function as an argument to be called in place of "return".
21:48 benabik masak: Exactly.  The same is true for any control flow statement.  Throw is a continuation/function that takes an exception, labels, next, continue...
21:48 masak makes sense.
21:57 japhb_ Oh, masak, oddly that reminds me:  I finally read through your adventure blog month over the weekend.  I find myself wondering how you would approach i18n in the engine and games.  A few design decisions felt rather monolingual in a way that it wasn't entirely obvious how you would approach the fix.
21:57 japhb_ In fact, if you get the urge to do another blog series related to the adventure, I'd love to see a series of blogs on internationalizing it.
21:57 masak japhb_: i18n is easier this year than last year, at least. all strings are in game-data/descriptions now.
21:58 masak not saying it's trivial, but it's lots easier. that was one of the things in the back of my mind that made this refactoring feel righter.
21:58 japhb_ masak, description strings, sure.  But not input grammar, or differentiation between the textual representation of a direction and the underlying "meaning" of a direction, etc.
21:58 japhb_ The identities of the disks and rods is another example.
21:59 masak ah, yes.
21:59 masak from that point of view, tying the method names to English is another drawback.
21:59 masak but one has to stop abstracting somewhere.
21:59 sorear how will you handle conjugation and declension?
22:00 japhb_ Well, that's where I was wondering how you would approach that.  Because I figured the method names would remain English, but you might need to abstract the identities of things, directions, rooms, etc.
22:00 japhb_ sorear, that's already not handled.
22:00 japhb_ Meaning, he's ignoring that in English right now.
22:00 japhb_ (Always 'a' rather than 'an', for example.)
22:02 japhb_ But yes, I can see where there'd be more work to parse inputs when you expect the user to decline the words in their input commands
22:03 benabik There are some nicely structured IF libraries out there.  Inform3 and the Platypus library for it come to mind.
22:04 japhb_ Partly I'm curious how well the current engine's design could handle being generalized in that way, because I am intrigued by the current design, but not entirely sold on it -- but also feel like that may be because of a failure of imagination on my part to see a nice clean way to handle it.
22:05 japhb_ benabik, I think one of the bug-finders referenced Inform7 ...?
22:06 masak aye.
22:06 masak lue likes Inform7, I know.
22:06 benabik japhb_: Oh, I had meant Inform 6.  7 went to a total natural language style and GUI.
22:06 japhb_ Oh!
22:06 japhb_ Gotcha
22:07 benabik Inform's parse engine is excellent, and the Inform6 manual talked about how it worked quite a bit.  Platypus was a better structured runtime for it.  (Better event handling at least, although I've forgotten all the details.)
22:08 japhb_ (As a side note, one of the things about #perl6 that I really like is that it always feels like a nice safe place to admit you don't know everything ....)
22:08 * benabik mostly doesn't know much about Inform 7 because he doesn't like programming in natural language.
22:09 masak TimToady: does Rosetta Code have a page for the samefringe problem? it totally should.
22:09 benabik But part of what I found interesting was that (IIRC) verbs were just objects in the system.  And I think there were non-English libraries.
22:11 Tedd1 joined #perl6
22:11 japhb_ benabik, how were adjectives and adverbs represented?  Did they also have first-class object status?
22:11 japhb_ Or were they attributes/roles/whatever applied to nouns and verbs?
22:11 japhb_ (Linguists: I am ignoring modification of adjectives on purpose.  :-)
22:12 benabik japhb_: (Please note this is from memory of several years ago) Adjectives were properties on objects (nouns) and adverbs were part of the parser and could inform the selection of verb.
22:12 japhb_ Ah, interesting
22:13 benabik e.g. "Throw hard" and "throw gently" could translate to "attack" and "give"
22:13 benabik (respectively)
22:13 japhb_ nice
22:15 japhb_ I remember thinking while playing old Infocom games that when that was done well, it seemed magical, and when a seemingly logical conversion was missing, it was artificial stupidity all the way.
22:15 benabik Parser section from Inform 6 manual: http://www.inform-fiction.org/manual/html/ch5.html
22:18 japhb_ benabik++ # Thank you, that looks quite interesting
22:19 benabik Wow.  Platypus is still online.  Woo.  http://homepage.ntlworld.com/elvwood/InteractiveFiction/Platypus/index.html
22:37 localhost joined #perl6
22:40 stepnem joined #perl6
22:48 benabik Apparently at least some of my memory of inform is centered around Platypus (it notes the adjectives property is not part of the stdlib), but it uses the same core parser.
22:50 [Coke] Inform was nifty, but I found the natural language /harder/ to program in, because I had to keep guessing at the subset of english to use, and guessed wrong 50% of the time.
22:53 benabik [Coke]: Try inform 6.  It's more more C-like.
22:53 benabik At least for programming.
22:56 nebuchadnezzar joined #perl6
23:00 stepnem joined #perl6
23:10 whiteknight joined #perl6
23:10 nebuchadnezzar joined #perl6
23:11 gongyiliao joined #perl6
23:26 nebuchadnezzar joined #perl6
23:28 masak more autopunnery: https://twitter.com/saucypickles/status/235102004966481920
23:40 cognominal joined #perl6
23:41 sjn joined #perl6
23:41 stepnem joined #perl6
23:43 * masak recommends http://thenicestplaceontheinter.net/
23:44 diakopter AAAAAAAA!!!!!!
23:44 masak wow. YMMV, apparently.
23:46 masak sorry if I traumatized you somehow, diakopter.
23:47 masak 'night, #perl6
23:47 BlueT_ joined #perl6
23:48 colomon masak: .... doh
23:48 colomon masak: if you're still there, do you know if there's a test for nieczue #144?
23:51 rafl joined #perl6
23:51 * colomon is going to assume there isn't -- there certainly wasn't one in S32-hash/push.t, at least.
23:53 diakopter you can't push hash around here..
23:53 dalek roast: 915e4be | (Solomon Foster)++ | S32-hash/push.t:
23:53 dalek roast: Test pushing non-Str-keyed things onto a Hash.
23:53 dalek roast: review: https://github.com/perl6/roast/commit/915e4be90a

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

Perl 6 | Reference Documentation | Rakudo