»ö« 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.
ChoHag Hmm. 00:01
So ropes if written would likely be operated on pretty much as lists?
Look like lists, but be magic in certain ways?
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.
dalek blets: 8631ed6 | (Herbert Breunung)++ | docs/report.pl (2 files):
fiddeled with report.pl a bit
blets: f9de7ba | (Herbert Breunung)++ | docs/ (4 files):
Merge branch 'master' of github.com:perl6/tablets
blets: 3c80c38 | (Herbert Breunung)++ | docs/ (2 files):
Merge branch 'master' of github.com:perl6/tablets
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.
TimToady ChoHag: sure
ChoHag Well I'm not doing that at 1 in the morning. 00:04
00:07 baest joined
TimToady there are also batching characteristics that are nice with ropey implementations 00:08
benabik Ropes basically do that, but in a tree structure so that access is O(log N) instead of O(n) 00:09
TimToady ropes also degenerate to flat lists, each of which are O(1) 00:10
so if you have a single segment, it's essentailly the same as a Perl 5 list 00:11
so you probably want something that can mutate itself between flat list and tree, and I think of that as "ropey" 00:14
00:14 PacoAir left
benabik Apparently mutable ropes could be done via CoW. 00:15
benabik wonders how hard it would be to share _portions_ of a buffer.
TimToady the important thing is to know which your data type is presenting 00:16
part of Perl 5's problem is that you can't really know what's immutable very easily
and the mutable stuff tends to be too global, preventing safe threading 00:21
00:34 Guest46600 left 00:38 sporous joined
sorear ChoHag: what do you need from native lists that you don't think you can get from a user-defined class? 00:39
TimToady I suspect ChoHag is approximately GMT from the remark at 40 minutes ago 00:42
sorear TimToady: are you saying ey's probably asleep? 00:43
TimToady that's how I read it 00:45
ey're surely :)
if ey doesn't track they it'll never catch on 00:47
00:55 benabik left 00:57 kcwu left 01:00 benabik joined
colomon sorear: ping? 01:43
01:44 scott_ joined 01:45 scott_ is now known as Guest10518
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:45
weirdly, if I change it to my %hash = map { (state $counter)++ => $_; }, @foo; it still doesn't work in niecza. 01:47
but if I make it my %hash = map { ;(state $counter)++ => $_; }, @foo; it works beautifully.
TimToady nobody really does $_ as specced yet 01:48
any {} mentioning $_ is not supposed to be taken as a hash 01:49
colomon ah
so in this case I should leave roast as is and fudge for niecza. 01:50
sorear colomon: pong 01:51
colomon sorear: never mind, TimToady++ just explained things to me.
sorear++ 01:54
sorear what did I do? 02:15
02:15 xinming joined
colomon sorear: you ponged. 02:17
n: for 1..3 { 1 but last; }; 02:21
p6eval niecza v19-20-g07dcc9e: OUTPUT«===SORRY!===␤␤Can only provide exactly one initial value to a mixin at /tmp/t9r5DQYIWU line 1:␤------> for 1..3 { 1 but last⏏; };␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1…
benabik but last? 02:22
colomon benabik: it's in S14-roles/mixin.t 02:25
benabik Return one but when you use it, it ends a loop?
colomon test says it should behave the same way as plain last. 02:29
dalek ast: d49c1dc | (Solomon Foster)++ | S (2 files):
Fudge for niecza.
sorear that's a slightly odd interaction of features
&last is a function, so it's processed as 1 but last()
when using a funciton call after but, it's re-written into an initalizer frm 02:30
the idea is to support stuff like 5 but Str("foo")
n: (5 but Str("foo")).Str
p6eval niecza v19-20-g07dcc9e: ( no output )
sorear n: (5 but Str("foo")).Str.say
p6eval niecza v19-20-g07dcc9e: OUTPUT«foo␤»
sorear n: (5 but Str("foo")).Num.say
p6eval niecza v19-20-g07dcc9e: OUTPUT«5␤»
sorear hey, it even works! 02:31
02:34 xinming_ joined 02:37 xinming left 02:38 Psyche^ joined
colomon sorear: so what does the "Can only provide exactly one initial value to a mixin" error with 1 but last mean? 02:38
02:42 Patterner left, Psyche^ is now known as Patterner
sorear colomon: 1 but last() passes 0 initial values to a mixin 02:43
you're supposed to pass exactly one
that's a special form of the mixin syntax, it is _not_ a function cal
02:44 orafu left, orafu joined 02:50 tsigol joined 02:51 topo left 02:53 tsigol is now known as topo 02:59 thelazydeveloper left 03:00 dayangkun joined 03:06 xinming_ left 03:12 woosley joined 03:13 xinming joined 03:15 localhost left 03:16 localhost joined, sftp left 03:17 xinming left 03:18 xinming joined 04:00 jeffreykegler left 04:02 TheSoas joined, TheSoas left 04:04 skids left 04:06 am0c joined
dalek ast: 6793373 | (Solomon Foster)++ | S32-str/substr.t:
Refudge for niecza.
04:11
04:16 cognominal left 04:31 topo left 04:37 topo joined 04:38 spaceships joined 04:44 telex left 04:47 cognominal joined, telex joined
diakopter beep 04:57
04:58 araujo left 05:00 xinming left, xinming joined 05:04 benabik left, jeffreykegler joined 05:13 xinming_ joined 05:14 benabik joined 05:16 xinming left 05:17 xinming_ left 05:19 jeffreykegler left, xinming joined, Tedd1^ joined 05:22 Tedd1 left 05:25 thou left 05:27 cognominal left, cognominal joined 05:30 birdwindupbird joined 06:00 wtw joined 06:14 cognominal left 06:16 cognominal joined 06:24 kaleem joined 06:43 cognominal left 06:57 dbr joined 06:59 cognominal joined 07:01 cognominal left 07:11 UncleFester6 left, UncleFester6 joined 07:16 brrt joined 07:17 hoelzro|away is now known as hoelzro 07:30 wtw left 07:31 SamuraiJack joined 07:32 wtw joined 07:45 araujo joined, araujo left, araujo joined
cosimo UncleFester6: pong 07:55
dalek p/dyncall-sized-num: 2800c6e | (Arne Skjærholt)++ | src/6model/ (13 files):
Add align field to storage_spec.

Also, adds initialisation of align field to all REPRs (and initialises a couple of bits fields that weren't).
07:56
07:58 UncleFester6_ joined
UncleFester6_ cosimo: I pinged many hours ago and have since sent an email on a new LWP::Simple 07:59
cosimo ok, that's you then 08:00
:) 08:01
ok, haven't looked at the repo yet, sorry
08:03 dayangkun_ joined, spider-mario joined 08:06 dayangkun left 08:07 dayangkun_ is now known as dayangkun 08:11 snearch joined 08:20 UncleFester6_ left 08:28 imarcusthis left 08:30 imarcusthis joined, daniel-s_ is now known as daniel-s 08:36 UncleFester6 left 08:43 drbean left
masak antenoon, #perl6 08:49
jnthn o/ masak 08:50
tadzik afterfoon, masak o/
masak tadzik: it's afternoon in .cn, but neither here nor by UGT... :) 09:04
tadzik :)
.cn?
. o O ( Czech New Republic, I read too much Star Wars ) 09:05
oh, ChiNa probably :)
masak most likely :) 09:09
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
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␤»
masak look! cons pairs, built entirely out of computation! \o/
moritz good morning
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')
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…
masak oops, the $_ didn't survive that far in :) expected.
09:19 hoelzro is now known as hoelzro|away
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␤␤»
masak \o/
09:20 hoelzro|away is now known as hoelzro
masak "nobody's been more impatient than the people working on it" -- TimToady 09:22
09:22 fhelmberger joined
jnthn If your exception type is anonymous, why not just die with a string anyway? :) 09:22
masak heh!
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␤␤»
masak jnthn++
moritz but then it's not TYPED anymore :-)
jnthn I typed it with my keyboard! 09:24
moritz jnthn: re the check in Exception.pm
jnthn: both X::Comp types and runtime errors are fine with just printing the .gist of the exception
09:25 fhelmberger left
moritz jnthn: but untyped compile time errors need to add the ===SORRY===\n themselves 09:25
that's why it's X::Comp.ACCEPTS($e) || is_runtime($ex.backtrace)
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)))
p6eval rakudo e20252: OUTPUT«===SORRY!===␤Unable to parse postcircumfix:sym<( )>, couldn't find final ')' at line 2, near "(cons 2, 3"␤»
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)))
p6eval rakudo e20252: OUTPUT«2␤»
masak \o/ 09:26
almost, but not quite, Lisp.
jnthn moritz: Oh, I hadn't realized X::Comp did add the SORRY
OK, then it makes sense. Thanks :)
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:29
09:32 bbkr joined
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
sorear niecza doesn't try to parse pod, except as needed to skip over it. 09:40
topo Ah, that explains it. Thanks :)
sorear sleep&
oh, hey, another niecza user. *waves*
masak topo++ 09:41
09:42 snearch left 09:56 fgomez joined 09:57 dayangkun left
mathw Morning 09:58
masak mathw! \o/ 09:59
09:59 fgomez left 10:01 fgomez joined
mathw hi masak 10:02
masak always nice to see you, mathw. 10:04
10:05 Guest10518 left
mathw And you 10:06
mhasch has aliased niecza as perl6n so he can spell it 10:36
masak I just go "nie<tab>" :) 10:37
jnthn meeting &
tadzik mhasch: where are you from? 10:38
if you'll be on the YAPC I can tell you a probably correct way to pronounce it :)
mhasch tadzik: I am from Blaubeuren, near Ulm, Germany
tadzik hm
nye-tscha is probably a close approximation
mhasch tadzik: looking forward to it. Of course i'll be there. 10:39
10:39 JimmyZ joined
JimmyZ good evening 10:39
masak JimmyZ! \o/
JimmyZ 麦高,下午好!
masak 晚上好,荣幸卓明亮! 10:40
JimmyZ 荣幸卓明亮? 用英语如何说? 10:41
masak "honored JimmyZ". 10:43
我不知道这是否是正确的汉语。 10:45
JimmyZ Does honored mean respectable?
mhasch masak: which TimToady quote did you refer to this morning (re perl6 and patience)? 10:46
JimmyZ or Respectful?
mhasch ah, found it in the backlog. 10:48
"nobody's been more impatient than the people working on it" -- TimToady 10:49
nice angle.
mathw reminds people that it's not just the users who want to use it 10:50
JimmyZ masak: 语法是正确的,但是基于通用的描述,没有人这么用
mathw or maybe that would be better phrased as that the developers are also users
JimmyZ masak: 应该 s/荣幸/[ 受 | 令] 人尊敬的/ 10:52
happy birthday, pmichaud 11:00
colomon it's pmichaud++'s birthday? \o/ 11:04
tadzik Happy birthday pmichaud! 11:05
JimmyZ yep 11:06
masak happy birthday, pmichaud! \o/ 11:11
11:12 Senthil joined 11:13 pmurias joined
masak JimmyZ: ah, so '晚上好,受人尊敬的卓明亮!', or '晚上好,令人尊敬的卓明亮!' 11:14
11:14 orafu left
JimmyZ hmm, I never heard it too. natural language is perceptual \o/ 11:17
11:19 Senthil left
moritz pmichaud++ 11:34
felher yeah, happy birthday pmichaud++ 11:39
eiro_ hello all 11:44
tadzik, still wanting to share a room? what's the budget ?
act.yapc.eu/ye2012/wiki?node=RoomShare 11:45
11:47 MayDaniel joined
jnthn back 12:00
12:02 pmurias left
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:07 gongyiliao left
mhasch jnthn++ 12:08
mathw haha 12:10
jnthn++ 12:11
happy birthday pmichaud++
tadzik eiro_: no, it's already settled 12:12
eiro_: we
've found one with leont, Sophien Hotel 12:13
12:19 fgomez left
tadzik seen mberends? 12:22
aloha mberends was last seen in #perl6 7 days 15 hours ago saying "/o sorear, masak".
masak r: .say for 'happy birthday ' <<~<< (my (@a = 'to you' xx 3).=splice(2, 0, 'pmichaud'))
p6eval rakudo e20252: OUTPUT«===SORRY!===␤Cannot use .= initializer with a list of declarations at line 2, near ")"␤»
masak huh.
yeah, but it's a list of *one* declaration!
r: .say for 'happy birthday ' <<~<< (my (@a = 'to you' xx 3); @a.=splice(2, 0, 'pmichaud')) 12:23
p6eval rakudo e20252: ( no output )
masak r: .say for 'happy birthday ' <<~<< (my (@a = 'to you' xx 3); @a.=splice(2, 0, 'pmichaud'); @a)
p6eval rakudo e20252: ( no output )
masak looks up splice
doc.perl6.org/routine/splice
hm, there's a comma missing there in the signatures.
maybe this is my chance to contribute to doc.perl6.org :) 12:24
dalek c: 438dc78 | (Carl Mäsak)++ | lib/List.pod:
[List.pod] inserted missing commas

For some reason, if 'comma' were pluralized 'commae', I wouldn't be too surprised. It isn't, of course. But still.
12:27
mhasch masak: is the final @a the same as the lexical @a to the left? 12:28
masak oh! 12:32
point.
r: .say for 'happy birthday ' <<~<< (my @a = 'to you' xx 3; @a.=splice(2, 0, 'pmichaud'); @a)
p6eval rakudo e20252: ( no output )
masak grrml.
r: .say for 'happy birthday ' <<~<< (my @a = 'to you' xx 3; @a.splice(2, 0, 'pmichaud'); @a)
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.
r: .say for 'happy birthday ' <<~<< ((my @a = 'to you' xx 3).splice(2, 0, 'pmichaud'); @a)
p6eval rakudo e20252: OUTPUT«happy birthday to you␤happy birthday to you␤happy birthday pmichaud␤happy birthday to you␤»
tadzik r: .say "happy birthday $_" for ('to you' xx 2, 'pmichaud') 12:35
p6eval rakudo e20252: OUTPUT«===SORRY!===␤Confused␤at /tmp/tV2qg1TT38:1␤»
tadzik r: .say "happy birthday $_" for 'to you' xx 2, 'pmichaud'
p6eval rakudo e20252: OUTPUT«===SORRY!===␤Confused␤at /tmp/RG0TrbuyaO:1␤»
moritz tadzik: remove the leading . 12:36
.say is not a listop
r: say "happy birthday $_" for 'to you' xx 2, 'pmichaud'
p6eval rakudo e20252: OUTPUT«happy birthday to you␤happy birthday to you␤happy birthday pmichaud␤»
tadzik right. It's still missing the last one, so splice's better
mhasch Is there a splice-like operator that returns the whole list rather than what has been deleted? 12:40
If not, we could invent it and call it squeeze. 12:41
12:54 JimmyZ left, jaldhar left, PacoAir joined
masak I rather feel that .splice was insufficiently p6ized when it wasn't made non-mutating. 12:55
12:55 jaldhar joined
tadzik +1 12:57
jnthn I think splice is much more useful if it mutates
You can do the other stuff with slicing etc, no?
tadzik r: my @a = <a b c d>; @a.=[1..2]; say @a.perl
p6eval rakudo e20252: OUTPUT«Array.new("b", "c")␤»
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
jnthn managed to do it immutably :)
mhasch It is an operator with many purposes. To retain all of them, it needs to mutate.
tadzik my @a = 'happy birthday' xx 3; @a = @a[0..1], 'pmichaud', @a[2]; say @a.perl 12:59
r: my @a = 'happy birthday' xx 3; @a = @a[0..1], 'pmichaud', @a[2]; say @a.perl
p6eval rakudo e20252: OUTPUT«Array.new("happy birthday", "happy birthday", "pmichaud", "happy birthday")␤»
tadzik well, with 'to you'
jnthn :)
tadzik splice feels more in place though
jnthn Yeah
13:00 JimmyZ joined
masak I guess you're right. 13:00
push/pop/shift/unshift can be expressed in terms of splice.
tadzik I still agree with immutable splice
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␤»
tadzik nice!
mhasch no hyper op though 13:02
13:02 snearch joined
masak but it works, and it's short! 13:02
jnthn tmtowtwpmhb 13:03
masak :)
mhasch there is certainly a celebrative air in here :-) 13:04
PerlJam good ugt :)
masak using polynomial interpolation: 13:08
r: say "happy birthday ", ("to you", "pmichaud")[-.5 * $_**3 + 2 * $_**2 - 1.5 * $_] for 0..3
p6eval rakudo e20252: OUTPUT«happy birthday to you␤happy birthday to you␤happy birthday pmichaud␤happy birthday to you␤»
13:08 Chillance joined
masak grins 13:08
13:10 jlhg joined
masak jlhg: aloha. 13:10
and thank you for using IPv6 :)
hoelzro IPv6++
jlhg :) 13:11
jnthn r: my $ip = 'IPv6'; $ip++; say $ip
p6eval rakudo e20252: OUTPUT«IPv7␤»
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?
moritz nr: say 'IPv4'.succ.succ
p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«IPv6␤»
masak yes, IPv4 sucks. 13:13
twice. 13:14
13:14 localhost left 13:16 skids joined 13:21 localhost joined
masak why not to use /* */ in JavaScripdt: the combination of characters '*/' can happen in regexes, like '/a*/'. 13:22
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:24
masak both regexes and /* */ are very "classical" bits of syntax at this point. but when put together, they produce this corner case.
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 13:37 bluescreen10 joined
moritz jnthn: ping 13:39
jnthn: I might want to implement sigilless parameters in rakudo, depending on how easy/hard it seems :-)
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
or do we already have that?
r: my $r := <a b c>; .say for $r 13:41
p6eval rakudo e20252: OUTPUT«a␤b␤c␤»
jnthn moritz: We already have the functionality
moritz it seems we already have it
jnthn moritz: \$a
[Coke] can't imagine using // for multi-line comments just because he might occasionally have a compile time error or a syntax highlighting error.
jnthn moritz: Boils down to the is_parcel thing, iirc
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:46
[Coke] masak: when I do web dev, I'm always the first client, so that's not really an issue. 13:48
It's no worse than "does this perl6 program do wh... oh, compile error."
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:49
moritz firebug shows JS compilation error 13:50
masak so does the Chrome console. but I still have to go looking for it. 13:51
moritz agreed 13:56
14:09 kaare_ joined 14:12 jeffreykegler joined 14:16 SamuraiJack left 14:17 lichtkind joined 14:18 araujo left 14:19 araujo joined, Targen left 14:21 drbean joined 14:22 JimmyZ left, JimmyZ joined 14:23 SamuraiJack joined 14:32 sftp joined 14:39 bbkr left, sporous left, bruges_ left, dalek left, obra left, sporous joined
ChoHag What's the difference between a List and an Array? 14:40
And which inherits from which?
(Assuming one does)
tadzik Array from List: doc.perl6.org/type/Array
ChoHag Ah. Details on types. 14:41
Hadn't managed to find that.
tadzik then we need to put it in a better place :)
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.
tadzik it's on perl6.org/documentation/ maybe needs to be highlighted more
14:42 am0c left, thou joined
ChoHag TimToady: I get that but I don't forsee enormous changes this late in the game. 14:43
14:43 brrt left
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
TimToady um, not really
ChoHag Let me read the List page...
14:44 bbkr joined, bruges_ joined, dalek joined, obra joined, _sri joined, pnu_ joined, shachaf joined, morgan.freenode.net sets mode: +v dalek
TimToady List is, from the user viewpoint, immutable 14:45
I see no reason to derive Array from it
14:46 am0c joined
masak neither 14:46
TimToady (a list can contain mutable elements though)
14:46 wtw left
ChoHag OK thanks. 14:46
Now it's less clear than 5 minutes ago.
masak glad to help.
TimToady :D
masak purs tea in ChoHag's cup until it flows over
pours*
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.
we're saying that design detail might be wrong and should be changed.
well, TimToady is *saying* it, and I'm nodding. 14:48
ChoHag OK the mud is settling.
This being perl, they'd look like one another when necessary regardless of inheritence, right? 14:49
TimToady and, in fact, List is treated as a role in S02, not a class 14:50
ChoHag Right, right.
TimToady ChoHag: yes
ChoHag That makes sense.
TimToady nr: say so Class ~~ List 14:51
p6eval rakudo e20252: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Class' called (line 1)␤»
..niecza v19-20-g07dcc9e: OUTPUT«===SORRY!===␤␤Expecting a term, but found either infix ~~ or redundant prefix ~␤ (to suppress this message, please use space between ~ ~) at /tmp/eZDCdZsZwS line 1:␤------> say so Class ~~⏏ List␤␤Parse failed␤␤»…
TimToady nr: say so Array ~~ List
p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«True␤»
TimToady nr: say so Array.isa(List) 14:52
p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«True␤»
TimToady looks like niecza copied/reinvented that bit of rakudo
pugs: say Array.isa(List) 14:53
p6eval pugs: OUTPUT«1␤»
TimToady masak: actually, I'd say your cons cell there is a lexical scope, which seems kinda heavyweight... 14:56
masak I just think it's very beautiful. 14:58
I'm currently (re-)discovering lambda calculus. 14:59
and thinking a lot about how lexical scopes and function application are Turing complete.
15:00 brrt joined
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.
geekosaur TimToady, I thought we had one? "Lisp"
masak maybe it's just because ordinary imperative programming has traditionally been so starved of closures.
TimToady Lisp cheats whre it has to
*where
lamda calculus can't 15:02
geekosaur which lambda calculus? although, generally parallelism goes to different calculi, yeh. pi calculus? 15:03
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.
masak geekosaur: I'm investigating pi calculus presently. it's quite a head trip.
geekosaur: where lambda calculus is about computation, pi calculus is about communication.
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
daxim tadzik, I object to the denigrating comment <ttjjss.wordpress.com/2012/08/09/loo...t-194>, no one deserves that, not even fools. to deescalate, will you reply with words of moderation? 15:04
masak I object to it as well. :( it basically hijacks the post. 15:05
that is such an idiotic comment.
15:06 xinming left
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
15:07 xinming joined
daxim then just reply 15:07
tadzik that's probably a good idea
15:07 JimmyZ left
masak make it an excellent reply. :) 15:10
tadzik not sure what I should write there
to not make it sound double-meaned, sort of
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."
masak is not sure he's seen the onomatopoetic spelling of a whistle sound in English before 15:12
TimToady a comment terminator of */ shouln't matter in a regex if you're parsing correctly 15:13
15:13 snearch left 15:14 kaare__ joined
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:15
moritz so it terminates the comment
TimToady if you're parsing properly, you're either in comment, or in regex, not in some indeterminate state
masak TimToady: I think you're missing the point. 15:16
moritz well, it's about commented-out regexes
masak this is not comment-in-regex (like with Perl 5's /x regexes)
this is regex-in-comment :)
15:16 birdwindupbird left
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
yes, that's a problem
moritz /* the follow regex did not work: /^.*/, I don't know why */
jnthn The consequences will be a syntax error, almost certainly. 15:17
I guess "be mindful if commenting out code using /*...*/, otherwise go right ahead"
15:17 kaare_ left
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 kst left
jnthn So I'd guess most editors with such a function with // it already 15:18
15:19 kst joined
tadzik maybe not definite enough as you'd see it 15:19
moritz would have just deleted the comment
masak tadzik++ daxim++ 15:20
TimToady deleting is the correct way to comment out code as well :)
jnthn :D
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
that's his opinion, not mine, which I hope is clear enough now 15:21
jnthn has soon too much commented out code
Usually left from years ago
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/
masak I'm less concerned with his language than with the brain paths that would prompt such a comment.
tadzik hometime & 15:23
dalek kudo/sigilless: c0ad1c0 | moritz++ | src/Perl6/Grammar.pm:
start to parse sub f(\sigilless), and warn about old usage
15:38
15:39 kaleem left
dalek kudo/sigilless: 5740db1 | moritz++ | src/Perl6/Grammar.pm:
parse type-constrained sigilless parameters
15:44
15:53 rindolf joined
rindolf Hi all. 15:53
moritz hello rindolf.
rindolf moritz: what's shakin'?
masak hi rindolf. 15:58
rindolf masak: hi, what's up?
masak roof. sky. :)
moritz masak: rakudo's parser
masak \o/ 15:59
moritz erm, meant to answer to rindolf. moritztabfail.
15:59 cognominal left
rindolf moritz: nice. 16:01
dalek kudo/sigilless: 6f4df39 | moritz++ | src/Perl6/Actions.pm:
add (preliminary?) action method for defterm
16:01 kcwu joined 16:02 orafu joined, brrt left
moritz jnthn: now 'sub f(|b) { }; f 42' says Lexical 'b' not found 16:09
jnthn: and the generated PIR code indeed does not contain a .lex "b", $P\d+ line 16:10
jnthn: any idea what could prevent the emission of non-sigil variables? 16:11
jnthn moritz: What parses the b?
moritz jnthn: a new token defterm
jnthn moritz: Does it install a lexical?
moritz which sets parts of %*PARAM_INFO
jnthn Yeah, that's not enough 16:12
param_var is what usually installs the lexical
moritz ah
jnthn But I guess we don't call param_var here
moritz i must have missed that part
jnthn You can probably steal/factor out code from param_var
moritz I'll steal first, and factor out later :-) 16:13
jnthn :)
16:13 hoelzro is now known as hoelzro|away 16:18 cognominal joined 16:21 jlhg left
moritz r: Int = 3 16:30
p6eval rakudo e20252: OUTPUT«Cannot assign to a non-container␤ in block at /tmp/VG1QG7vA_I:1␤␤»
dalek kudo/sigilless: 5533f75 | moritz++ | src/Perl6/Actions.pm:
declare sigilless variables in method defterm, jnthn++
16:32
kudo/sigilless: 70d8b2a | moritz++ | src/Perl6/Actions.pm:
refactor common parameter declaration code from defterm and param_name into a common method
16:37
16:38 jaldhar left
moritz $ ./perl6 -e 'sub foo(\b) { say ::("b") }; foo 42' 16:39
42
now that's progress
$ ./perl6 -e 'sub foo(\b) { say b }; foo 42'
===SORRY!===
CHECK FAILED:
Undefined routine '&b' called (line 1)
16:39 UncleFester6 joined
moritz so I just need to twiddle the whatever to interpret b as a variable name, not a routine call 16:39
question is, what and where is the "whatever"? 16:40
16:40 UncleFester6 left
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?
jnthn oh...it's getting $*W.is_name to answer true I guess
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:43
pmichaud t-shirt design preview at pmichaud.com/sandbox/yapceu-tshirt-1a.png 16:45
and
pmichaud.com/sandbox/yapceu-tshirt-1b.png
comments welcomed.
tadzik 9nice one :)
moritz pmichaud++ 16:46
jnthn WHY is the beer head being spilled, wasting previous beer?!
;-)
pmichaud++
er, *precious
moritz jnthn: because we're so busy talking :-) 16:47
pmichaud you won't believe how hard it is to find a reasonable b/w beer icon :)
colomon makes me wish I was going just so I could get one.
[Coke] pmichaud++
pmichaud colomon: I'm very likely to cafepress/zazzle this
[Coke] will gladly purchase one.
pmichaud indeed, I'm thinking of creating one w/o the YAPC::EU monikers
colomon pmichaud++: oooooo!
+100
moritz jnthn: hm, World.is_name should already respond with 1 to sigilless params, since it uses find_symbol internally 16:48
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.
moritz: Which we don't since it's a parameter. 16:50
moritz hm
jnthn: so, what should I do? decouple is_name from find_symbol?
jnthn moritz: yeah 16:51
I think so
moment
16:51 cognominal left
jnthn moritz: find_symbol has quite a lot of logic 16:51
moritz: It may not be wise to duplicate that
moritz: Maybe we should give it a named argument 16:52
oh
Or keep calling find_symbol
and if it doesn't find anything, then try "is_lexical" also
Or try that first 16:53
We can also check it's not a multi-jointed name.
moritz tries 16:54
16:55 kaleem joined 16:56 thelazydeveloper joined 17:03 benabik left 17:04 benabik joined, bbkr left
mhasch pmichaud: very nice design. I like the not quite smoothed out camelia portrait 17:05
pmichaud mhasch: thanks! 17:07
[Coke] wonders if there's a PM group near Orlando.
pmichaud [Coke]: you mean besides Orlando.pm? ;-) 17:08
mhasch www.pm.org/groups/592.html 17:09
moritz r: constant a = 1; a 1 17:10
p6eval rakudo e20252: OUTPUT«===SORRY!===␤Confused␤at /tmp/hEY5vX4vbb:1␤» 17:11
moritz finds he still doesn't understand how constants are parsed
masak as terms? :)
masak is so helpful
moritz not by term:sym<identifier>, because that one expects an argument list afterwards
jnthn term:sym<name> 17:12
pmichaud term:sym<name>, likely.
moritz r: constant a::b = 3; say a::b
p6eval rakudo e20252: OUTPUT«===SORRY!===␤Missing initializer on constant declaration␤at /tmp/5hGkcJjFDB:1␤»
pmichaud okay, I'm off to see if the t-shirt place can indeed get me some shirts within 24 hours
bbiaw
jnthn o/
masak good luck and happy birthday! 17:13
[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
mhasch Frankfurt should have t-shirt shops...
17:16 cognominal joined 17:27 HarryS left
ChoHag So how do you inherit from the basic types? 17:34
I tried class Foo is Array with nothing inside but I can't assign [0..5] to it (my Foo $x = [0..5])
jeffreykegler r: "foo123bar" ~~ / foo <( \d+ )> bar /; say $(); 17:36
p6eval rakudo e20252: OUTPUT«␤»
TimToady r: my class Foo is Array { }; my @a := Foo.new; @a = 1..5; say @a[4] 17:37
p6eval rakudo e20252: OUTPUT«5␤»
jeffreykegler S05 says the previous snippet outputs '123'
TimToady np: "foo123bar" ~~ / foo <( \d+ )> bar /; say $();
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…
ChoHag Would I need to add much to the class to be able to use it in the same way?
TimToady n: "foo123bar" ~~ / foo <( \d+ )> bar /; say $();
p6eval niecza v19-20-g07dcc9e: OUTPUT«123␤»
TimToady niecza++
ChoHag I can do my Array $foo = [0..5];
jnthn We still have $()?
lichtkind i think so
its in the tablets
jnthn ChoHag: Yes because [0..5] is an Array
But it's not a Foo 17:39
r: "foo123bar" ~~ / foo <( \d+ )> bar /; say $/;
p6eval rakudo e20252: OUTPUT«q[123]␤␤»
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()␤»
TimToady n: my class Foo is Array { }; my @a is Foo; @a = 1..5; say @a[4]; say @a.WHAT
p6eval niecza v19-20-g07dcc9e: OUTPUT«===SORRY!===␤␤Trait name not available on variables at /tmp/_yJQmcOOLr line 1:␤------> my class Foo is Array { }; my @a is Foo⏏; @a = 1..5; say @a[4]; say @a.WHAT␤␤Unhandled exception: Check failed␤␤ at /home/p6eval/ni…
jnthn Variable traits NYI (still :/)
TimToady p: my class Foo is Array { }; my @a is Foo; @a = 1..5; say @a[4]; say @a.WHAT
p6eval pugs: OUTPUT«5␤Array()␤»
jnthn needs to try and put his finger on the design issues that keep him from implemetning them.
dinner & 17:42
jeffreykegler r: ')))(()())'~~ / <( '(' <~~>* ')' )> /; say $/; 17:44
p6eval rakudo e20252: OUTPUT«q[(()())]␤␤»
jeffreykegler Previous works nicely. Is there a better way to do the capture?
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…
moritz n: sub f(\x) { x(42) }; f sub ($a) { say $a }
p6eval niecza v19-20-g07dcc9e: OUTPUT«42␤»
japhb The early birds all beat me to it, but: "Happy birthday, pmichaud!" 17:49
jeffreykegler r: my $x = ')))(()())'~~ / '(' <~~>* ')' /; say $x; 17:50
p6eval rakudo e20252: OUTPUT«q[(()())]␤␤»
TimToady yes, that works just as well 17:51
jeffreykegler OK. Works perfectly and looks beautiful.
TimToady the implicit .*? of the scan is left out by default
dalek c: 9ee37cf | (Tim Smith)++ | lib/variables.pod:
Fix a left-/right-hand-side mix-up re: assignment
17:54
jeffreykegler r: my $x = '(((((()())(()'~~ / '(' <~~>* ')' /; say $x;
p6eval rakudo e20252: OUTPUT«q[(()())]␤␤»
jeffreykegler Again, perfect.
TimToady I would love to get rid of the q[] though
moritz then say ~$x 17:56
TimToady in fact, that's why we added the 「...」 notation
jeffreykegler r: my $x = '(((((()())(()'~~ / '(' <~~>* ')' /; say ~$x;
p6eval rakudo e20252: OUTPUT«(()())␤»
moritz we did?
TimToady q[] is ugly, ugly, ugly
moritz wasn't aware of it
$ ./perl6 -e 'sub f(\b) {say b }; f 4' 17:57
4
\o/
TimToady S02:3711
masak what's ugly about q[]?
TimToady asymmetry 17:58
also use of both letter and symbol
thirdly, doesn't look to see if there're [] inside
r: $_ = '['; /./; say $/ 17:59
p6eval rakudo e20252: OUTPUT«Any()␤»
TimToady hmm
moritz but 「...」 looks for 」 inside?
TimToady: rakudo doesn't do sink context
r: $_ = '['; m/./; say $/
p6eval rakudo e20252: OUTPUT«q[[]␤␤»
TimToady it could, but the idea is that it won't have to hearly so often
*nearly
[ and ] occur far more often in things you want to print 18:00
moritz which of course changes once we use 「...」 more often :-) 18:01
TimToady life is tough sometimes
moritz do tell :-)
jeffreykegler Leave the 「...」 for Perl 7 18:02
TimToady why? Perl 6 is all over Unicode
and in this case it's a trivial change
jeffreykegler Just joking. :-) 18:03
TimToady hmm, though it occurs to me that I haven't added 「...」 to STD yet...
mhasch has HALFWIDTH LEFT CORNER BRACKET not on his keyboard 18:04
jeffreykegler I actually think 「...」 looks really elegant
moritz mhasch: no need to type it 18:06
TimToady well, unless you want the pretty version of Q[] 18:08
dalek d: 7b5e4fb | larry++ | STD.pm6:
add 「...」 quotes
18:10
moritz nr: constant a = sub ($x) { say $x }; say a(3)
p6eval rakudo e20252: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&a' called (line 1)␤»
..niecza v19-20-g07dcc9e: OUTPUT«3␤True␤»
TimToady r: constant a = sub ($x) { say $x }; say a.(3) 18:12
p6eval rakudo e20252: OUTPUT«3␤True␤»
TimToady interesting difference of semiotics there... 18:13
18:13 kaleem left
moritz nr: constant x = &say; x(42); x 42; 18:14
p6eval rakudo e20252: OUTPUT«===SORRY!===␤Confused␤at /tmp/dipyiaLpim:1␤»
..niecza v19-20-g07dcc9e: OUTPUT«===SORRY!===␤␤Two terms in a row (listop with args requires whitespace or parens) at /tmp/vwiy6cn42i line 1:␤------> constant x = &say; x(42); x ⏏42;␤␤Parse failed␤␤»
moritz nr: constant x = &say; x(42);
p6eval rakudo e20252: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&x' called (line 1)␤»
..niecza v19-20-g07dcc9e: OUTPUT«42␤»
18:15 pmurias joined
TimToady apparently rakudo is making some deep distinction that niecza is not 18:16
jnthn It is
moritz rakudo adhers to the principle that an identifier followed by a ( is a subroutine call 18:17
jnthn Should it be, though?
Right
It's quite strict about that.
Note that
TimToady n: sub pi { say "PI!" }; pi()
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…
moritz unless it's a type name, in which case it grudgingly accepts it as coercion syntax
jnthn nr: constant &x = &say; x(42);
p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«42␤»
mhasch Hm. Still poring over prettiness notions. Perl6tidy might standardize my fancy brackets then.
sorear good * #perl6 18:18
benabik I guess niecza always looks for "x" before "&x" when given "x()"
(Judging by the pi above)
sorear yes.
this is considered somewhat of a bug.
mhasch: perl6tidy !?
TimToady ⸘perl6tidy‽ 18:19
benabik I can see wanting type names to be less of a special case.
If Str() always looks for Str before &Str.. 18:20
dalek kudo/nom: 94aa2b7 | moritz++ | src/core/Match.pm:
switch Match.gist from q[...] to 「...」, TimToady++
TimToady I think of constants as a funny kind of type
mhasch there ought to be a perl6 prettyprinting tool available some day.
moritz mhasch: then write one :-) 18:21
TimToady: I still think that's a premature pessimization
for example 18:22
constant foo = 42; say 42 ~~ foo
sorear I'm with alias on this one
moritz if I think of a constant as a kind of type, I'd expect that to be false
but that is add odds with my current view of constants
pmurias sorear: re targeting javascript, rakudo's js backend is passing the first 7 sanity tests
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
sorear perl6 needs to be restricted a lot before tools that are tolerant of parse errors can be written
18:24 jeffreykegler left
TimToady wonders what Steve Yegge's dynamic toolchain system will think of Perl 6... :) 18:24
Perl 6 is kinda way spread out on his conservative vs liberal spectrum 18:25
18:25 sirrobert joined
moritz sorear: which makes 42.0 ~~ foo false 18:25
18:25 c1sung joined
moritz nr: constant foo = 42; say 42.0 ~~ foo 18:25
p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«True␤»
TimToady nr: constant foo of Int = 42; say 42.0 ~~ foo 18:26
p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«True␤»
daxim stealing a PPI slogan: "perl6 is neither left nor right, but forward!"
sirrobert r: my $str = '"a":0'; say ($str ~~ m/"a":0/) ?? "match" !! "no match";
p6eval rakudo e20252: OUTPUT«no match␤»
sirrobert Why doesn't that match?
PerlJam sirrobert: the colon isn't literal 18:27
jnthn 'cus you need to quote the :
sirrobert r: my $str = '"a":0'; say ($str ~~ m/"a"\:0/) ?? "match" !! "no match";
p6eval rakudo e20252: OUTPUT«no match␤»
18:27 localhost left
TimToady r: my $str = '"a":0'; say ($str ~~ m/ '"a":0' /) ?? "match" !! "no match"; 18:27
sirrobert Is there some other quoting mechanism...?
p6eval rakudo e20252: OUTPUT«match␤»
sirrobert hrm
TimToady you mean like quotes? :)
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
TimToady all non-alphas are reserved
sirrobert ah
that's a good tip =)
TimToady *non-alphanums 18:29
and it's an easy rule to remember, unlike p5's list of reserved chars
sirrobert Ok, thanks. was writing some tests that I just couldn't get to pass =)
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?
moritz no
sirrobert hmmm just leave off the //?
moritz which is why quotemeta can do it
PerlJam sirrobert: uh .. no
TimToady well, in this case it'd work
but it won't scan
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
mhasch TimToady: Good point. 18:32
TimToady (and in p6)
sirrobert ohhhhh heh, I misread "no reason to stick with \" as "no reason to stick with /"
TimToady nr: say '\d'; say "\d"; 18:33
p6eval niecza v19-20-g07dcc9e: OUTPUT«===SORRY!===␤␤Unrecognized backslash sequence: '\d' at /tmp/SDPoeX2_Vx line 1:␤------> say '\d'; say "\d⏏";␤␤Use of uninitialized value in string context␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1262 (warn @ …
..rakudo e20252: OUTPUT«===SORRY!===␤Unrecognized backslash sequence: '\d' at line 2, near "\";"␤»
TimToady eval: say '\d'; say "\d";
buubot_backup TimToady: ERROR: syntax error at (eval 20) line 1, near "say '\d'" 18:34
mhasch I try to avoid leaning toothpicks of any kind where I can.
TimToady eval: print '\d',"\n"; print "\d", "\n";
buubot_backup TimToady: \d d 1
moritz $ ./perl6 -e 'sub f(\x) { x = 42 }; f my $x; say $x'
42
still works, great
TimToady I guess p6 carps on unrecognized backslashes rather than guessing
18:35 jeffreykegler joined
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";
p6eval rakudo e20252: OUTPUT«no match␤»
TimToady r: my $str = ' "a":0 '; say $str ~~ /'"a":0'/ ?? "match" !! "no match";
p6eval rakudo e20252: OUTPUT«match␤»
TimToady that's what I thought you were asking about
18:38 jeffreykegler left 18:39 cognominal left 18:42 Sally588 joined
Sally588 Free naked pictures of like, britney spears n shit, yo: tinyurl.com/9gwzvm9 18:42
dalek d: 235f71b | larry++ | STD.pm6:
add 「...」 as valid quoting inside regex as well
tadzik Sally588: no! I _have_ to see them! 18:43
18:43 ChanServ sets mode: +o moritz, moritz sets mode: +b *!*sexyb@*.dyn.optonline.net, Sally588 was kicked by moritz (Sally588))
benabik Britney Spears codes Perl 6 naked? Who knew? 18:43
I mean, that's the only reason to bring that up here, right?
18:43 moritz sets mode: -o moritz
masak .oO( because we're never off-topic here ) :P 18:43
18:43 echo__ joined
tadzik :D 18:44
mhasch Hm, maybe because we were discussing pretty and ugly a couple of minutes ago.
TimToady
.oO(free naked Perl 6 pix...)
18:45
benabik Hot candids of Camelia. 18:46
18:48 daxim left 18:49 HarryS joined
mhasch In German, 6 and sex sound similar... 18:49
dalek ast: 9e3bbb6 | moritz++ | S05-mass/rx.t:
rakudo-unfudge tests for interpolation in quoted strings in regexes
18:49 snearch joined
benabik Not too dissimilar in english, depending on how well you enunciate. 18:49
moritz jnthn: do you remember if you resolved the ticket for /"$x"/ that you recently fixed? 18:52
jnthn: 'cause I just unfudged tests for it
jnthn I think I testneeded it 18:53
dinner &
moritz just found it, takk
rindolf Hi all. 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.
rindolf: It was deleted because we decided it didn't fit our workflow
rindolf sorear: ah. 18:59
sorear The most active branch now is 'nom'
masak we have this weird hangup against calling our master branch 'master'.
sorear clearly, we should call it 'blead'
mhasch sorear: you caught me there, indeed
masak :)
rindolf cries out loud so the whole world will hear him - "WHAT THE HELL DOES GIT WANT FROM MY LIFE???!!!" 19:02
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:03
is there some best practice? 19:04
hmm looking in the makefile, maybe it does... but running it it doesn't seem to =) looking further... 19:05
mhasch nr: say q[\\]; say Q[\\]; 19:08
p6eval rakudo e20252, niecza v19-20-g07dcc9e: OUTPUT«\␤\\␤»
sirrobert nevermind, it's something funny with prove, not ufo
19:11 lichtkind_ joined 19:12 SamuraiJack left, lichtkind left, lichtkind_ is now known as lichtkind 19:15 snearch left 19:17 echo__ left
sirrobert ok, figured something out... output to stdout interferes with prove. 19:18
=)
pmichaud btw, thanks to everyone for birthday wishes :)
afk
sirrobert How can I redirect $*OUT to a scalar (or similar)? 19:24
TimToady my $*OUT = some object that pretends to be a handle 19:26
sirrobert hmm... almost too easy... ;)
you keep answering all my hard questions with simple answers. 19:27
Thanks =)
geekosaur the hard part is likely to be "what pretends to be a handle"... 19:28
sirrobert working on that now =)
19:29 Chillance left
TimToady nr: my $*OUT = class Foo {}.new; print "hi"; 19:30
p6eval rakudo 94aa2b: OUTPUT«===SORRY!===␤Confused␤at /tmp/UlQWxjmwtm:1␤»
..niecza v19-20-g07dcc9e: OUTPUT«hi»
sirrobert ooh
TimToady nr: my $*OUT = (class Foo {}).new; print "hi";
p6eval niecza v19-20-g07dcc9e: OUTPUT«hi»
..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␤␤»
TimToady obviously niecza is not using $*OUT... 19:31
sirrobert heh nod
I'm using Rakudo... trying to work it out there
jnthn Was gonna say, how'd it work without defining a print method....
sirrobert my project is using Rakudo, I mean
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 …
..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 spider-mario left
sirrobert hmmm is there a way I can redirect $*OUT to a $scalar? 19:36
er string
colomon TimToady: looks like niecza is somewhat inconsistent in how $*OUT is used. 19:37
jnthn sirrobert: You just implement methods print and say in the object you assign to $*OUT 19:38
sirrobert ah
jnthn sirrobert: And make them concatenate what is passed to them into that string.
sirrobert ok, I'll work on that.
thanks =)
jnthn sirrobert: See also github.com/sergot/IO-Capture-Simple/ 19:39
sirrobert thanks
19:40 leprevost joined
sirrobert This worked for me: $*OUT = class {method print (*@args) {}}; print "foo"; 19:41
(lets me supress stdout)
thanks all (jnthn++)
19:42 birdwindupbird joined 19:56 fhelmberger joined 19:58 fhelmberger left 19:59 am0c left
moritz jnthn: fwiw the sigilless branch seems to work, and passes all spectests except one 20:03
and the one that fails is
{ constant foo = 42 }; eval_lives_ok '42 == foo', 'constants are our-scoped'
I guess that $*W.is_name doesn't fall back to our scopes 20:04
masak wouldn't that make classes also not work there? 20:05
r: { class A {} }; say eval '42 == A'
p6eval rakudo 94aa2b: OUTPUT«use of uninitialized value of type A in numeric context in block at eval_0:1␤␤False␤»
jnthn Good point
masak r: { class A {} }; say eval '42 == A.new'
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…
jnthn moritz: Does what masak just poasted also have an issue?
masak r: { class A { method Numeric { 42 } } }; say eval '42 == A.new' 20:06
p6eval rakudo 94aa2b: OUTPUT«True␤»
moritz jnthn: no
$ ./perl6 -e '{ class A { } }; say A.new'
A.new()
that one goes through a different codepath, and checks $*W.is_type
20:07 birdwindupbird left
jnthn { class A { } }; eval '42 == A' 20:07
moritz: What does ^ do?
moritz: I'm not quite sure I follow why they go through different code paths 20:08
moritz jnthn: afaict the class case goes through term:sym<identifier> 20:09
20:09 birdwindupbird joined
jnthn moritz: I doubt it, because that requires a ( 20:09
moritz oh 20:10
20:11 japhb_ joined
moritz jnthn: then I don't understand it either 20:11
20:12 MayDaniel left
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
20:13 MayDaniel joined, cognominal joined
moritz japhb_: depends on what it's used for 20:13
japhb_: I generally don't like JS dependencies for pages that could do without
jnthn
.oO( "It's for adding an animation of camelia chasing nyan cat around the page!" )
20:14
20:14 cognominal left
masak that's what progressive enhancement seeks to address. design the page without JS, and provide JS for a better experience if available. 20:14
20:15 cognominal joined
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:15
Also, for search, hits a server page with JS off, and does a client-side search with autocomplete with JS on. 20:16
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:17
ooh, and they use "close" as a verb! 20:19
"it closes the lambda expression in the global environment..." \o/
masak steals this usage, like, right now 20:20
moritz search autocompletion is a use case I appreciate 20:26
slide show... dunno, I hate pages that change under my nose
also I hate maintainting JS, so I don't want to be the one ending up maintaining it 20:27
20:28 sherwool joined
moritz only uses "closes over" in the context of closures 20:30
masak there's something charming about "closes in", though :)
rindolf Hi all.
Unable to parse blockoid, couldn't find final '}' at line 48, near "N_LOOP:\n " ==> what does that mean?
Where do I put the loop label? 20:31
masak rindolf: that Rakudo doesn't do labels yet.
rindolf masak: oh.
masak I wouldn't be surprised if labels are quite low-hanging fruit these days.
that won't mean Rakudo will understand 'next LABEL', though :) 20:32
20:32 kaare__ left
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
you are collecting these, yes?
masak \o/ 20:35
irclog: autopun spotting! :D
20:35 sherwool left
masak sorear++ 20:35
moritz augmented4th++ too :-)
masak yeah.
note that autopuns and the some-people-when-confronted-with-a-problem meme seem to like each other.
this has not been adequately explained. 20:36
especially since the first cases of the meme were not autopuns.
20:36 bonifatio joined
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
And I can understand not wanting to maintain the JS. Perhaps there is an easy way to encapsulate that.
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 :-)
japhb_ *chuckle* 20:39
sirrobert use jQuery (for example) with a stable plugin. then there's basically no maintenance.
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
sirrobert: famous last words :-)
japhb_ sorear, that (iframe) usually ends up being as objectionable as JS, to those who object to such things. ;-) 20:40
sirrobert heh
I'd be happy to help as appropriate if you like.
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 :)
sorear aww, why would anyone not like iframes, they're _cute_
moritz cute _today_ :-)
sirrobert japhb_: me too... except I also factor in spare cycles =) 20:42
pmichaud pmichaud.com/sandbox/img_4213.jpg
sirrobert heh
japhb_ Holy cow, pmichaud, that was *fast*
sorear My main worry with javascript on perl6.org is that someone will be tempted to replace it with perl 6 :(
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.
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.
japhb_ definitely likes the idea of having those shirts without the YAPC::EU line
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」␤␤»
masak wants at least one of those shirts :)
pmurias sorear: why would that be bad? ;)
moritz weird, that caused setting compilation to hang
pmichaud yes, I'll upload the cafepress/other images later tonight, time permitting.
moritz pmichaud: now imagine having a 3D printer at home that produced the t-shirts diretly in the correct colors :-) 20:46
pmurias sorear: depending on a bitrotted implementation seems the worst case scenario for that 20:47
japhb_ Home programmable loom
sorear pmurias: good to know my fears are well-founded.
a 3kb web page does not need 5MB of Perl6 interpreter downloaded. 20:48
masak japhb_: have you read www.amazon.com/The-Difference-Engin...0440423627 ?
20:48 localhost joined
dalek kudo/sigilless: b6bfd77 | moritz++ | src/Perl6/World.pm:
World.is_name should not require the name to have a symbol knwon at compile time
20:48
kudo/sigilless: 53c7856 | moritz++ | src/core/ (26 files):
switch protos to use | instead of |$
kudo/sigilless: e6c08fa | moritz++ | src/Perl6/Actions.pm:
start to wire up action methods for sigilless params

sub f(\b) { say b }; f 42 now works
japhb_ masak, no ... though I am aware of the importance of the loom in the history of computing. :-)
20:49 birdwindupbird left, localhost left
moritz oh, I thought I pushed those patches earlier 20:50
20:50 sftp left
moritz github.com/rakudo/rakudo/commit/e6...1adf7fc70a that branch seems to have the problems with our-scoped constants 20:50
I'm not quite sure what to do about that 20:51
20:51 sftp joined
jnthn moritz: I can look, but probably not until tomorrow. 20:51
moritz jnthn: no problem, I'm going to sleep very soon anyway 20:52
[Coke] is happy to maintain JS. 20:55
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.
[Coke] a bit, a byte. whatever it takes.
masak pmichaud: :D
pmichaud or maybe "silly" ~< 1 20:58
r: say "silly" ~< 1
p6eval rakudo 94aa2b: OUTPUT«===SORRY!===␤Preceding context expects a term, but found infix < instead␤at /tmp/f39tIy984K:1␤»
moritz masak: because of the ministry of sigil walks
20:58 rindolf left
masak :P 20:58
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 20:59
20:59 skids left, hoelzro|away is now known as hoelzro
pmurias sorear: and avoid including a whole bunch of unnessesary runtime seems nessesary for putting perl6 in the browser 21:00
dalek c/htmlify-refactor: d3024f0 | moritz++ | / (2 files):
more Registry usage/hackery
21:02 hoelzro is now known as hoelzro|away 21:41 tokuhiro_ joined
masak I think I finally understand CPS. 21:46
instead of having "return" built-in, you pass a function as an argument to be called in place of "return".
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.
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
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:58
masak japhb_: i18n is easier this year than last year, at least. all strings are in game-data/descriptions now.
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.
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.
The identities of the disks and rods is another example.
masak ah, yes. 21:59
from that point of view, tying the method names to English is another drawback.
but one has to stop abstracting somewhere.
sorear how will you handle conjugation and declension?
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
sorear, that's already not handled.
Meaning, he's ignoring that in English right now.
(Always 'a' rather than 'an', for example.) 22:01
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:02
benabik There are some nicely structured IF libraries out there. Inform3 and the Platypus library for it come to mind. 22:03
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:04
benabik, I think one of the bug-finders referenced Inform7 ...? 22:05
masak aye. 22:06
lue likes Inform7, I know.
benabik japhb_: Oh, I had meant Inform 6. 7 went to a total natural language style and GUI.
japhb_ Oh!
Gotcha
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:07
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.
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:10 Tedd1^ left, Tedd1 joined
japhb_ benabik, how were adjectives and adverbs represented? Did they also have first-class object status? 22:11
Or were they attributes/roles/whatever applied to nouns and verbs?
(Linguists: I am ignoring modification of adjectives on purpose. :-)
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
benabik e.g. "Throw hard" and "throw gently" could translate to "attack" and "give" 22:13
(respectively)
japhb_ nice
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: www.inform-fiction.org/manual/html/ch5.html
22:16 pmurias left
japhb_ benabik++ # Thank you, that looks quite interesting 22:18
22:18 PacoAir left, thelazydeveloper left
benabik Wow. Platypus is still online. Woo. homepage.ntlworld.com/elvwood/Inter...index.html 22:19
22:25 bluescreen10 left 22:35 stepnem left 22:37 localhost joined 22:40 stepnem joined
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:48
22:49 nebuchadnezzar left 22:50 MayDaniel left
[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:50
benabik [Coke]: Try inform 6. It's more more C-like. 22:53
At least for programming.
22:56 nebuchadnezzar joined, stepnem left 23:00 stepnem joined 23:10 whiteknight joined, nebuchadnezzar left, whiteknight is now known as Guest62198, nebuchadnezzar joined 23:11 gongyiliao joined 23:12 cognominal left, stepnem left 23:26 nebuchadnezzar left, nebuchadnezzar joined
masak more autopunnery: twitter.com/saucypickles/status/23...4966481920 23:28
23:40 cognominal joined, sjn left 23:41 sjn joined, stepnem joined
masak recommends thenicestplaceontheinter.net/ 23:43
diakopter AAAAAAAA!!!!!! 23:44
masak wow. YMMV, apparently.
sorry if I traumatized you somehow, diakopter. 23:46
'night, #perl6 23:47
23:47 BlueT_ joined
colomon masak: .... doh 23:48
masak: if you're still there, do you know if there's a test for nieczue #144?
23:51 rafl joined
colomon is going to assume there isn't -- there certainly wasn't one in S32-hash/push.t, at least. 23:51
diakopter you can't push hash around here.. 23:53
dalek ast: 915e4be | (Solomon Foster)++ | S32-hash/push.t:
Test pushing non-Str-keyed things onto a Hash.