»ö« 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.
lichtkind good night 00:17
spetrea hey 03:41
haven't been here for a while
how you guys doin ? 03:42
sorear spetrea: good 03:54
dalek ecza: fe88724 | sorear++ | / (4 files):
Hack BEGIN { @*INC.push: ... } to DTRT
sorear ping cooper 04:43
er
ping colomon
cooper k
masak sellamat prients! 06:25
masak backlogs 06:55
moritz good morning masak 06:56
masak morning. 07:02
I seem to have overestimated the amount of blogging time the journey home would give me.
partly because my laptop has a non-functional keyboard. :) 07:03
masak I did have time to draw a map, though: github.com/masak/crypt/blob/master...es/map.png 07:04
masak (touchpad still works) 07:04
moritz masak: you don't seem to have a lot of luck with your laptops 07:08
sorear MASAK ! 07:10
masak SOREAR ! 07:13
moritz: I guess I use them heavily. at home I only use a laptop. I use stationary computers at work. 07:14
CBro2007 had a qn about perl 6 OO, when you declare a public attrib like "has $.b;" - does it automatically generate an accessor method for it like "getB"? 08:01
or does one have to write these manually?
write both get and set?
tadzik CBro2007: it's called just .b then
hello #perl6
moritz and if you say 'has $.b is rw', it makes the .b accessor assignable
CBro2007 or to get around that problem do you just do you make it "is rw"?
moritz so you can write $obj.b = 3;
tadzik what problem? 08:02
CBro2007 tadzik: if you don't say "is rw" then $obj.b = 3 wouldn't work
thats right yeah moritz ?
moritz rakudo: class A { has $.x }; A.new(x => 3).x = 6 08:03
p6eval rakudo f63b82: OUTPUT«Cannot modify readonly value␤ in '&infix:<=>' at line 1:src/metamodel/RoleToInstanceApplier.nqp␤ in main program body at line 22:/tmp/JfWb_cJWBt␤»
moritz rakudo: class A { has $.x is rw }; A.new(x => 3).x = 6
p6eval rakudo f63b82: ( no output )
tadzik CBro2007: of course
that's the point :)
if it's not read-write, writing to it will not work
CBro2007 yeah just wanted to clarify that :)
tadzik ok :)
moritz nom: class A { has $.x }; A.new(x => 3).x = 6
p6eval nom: OUTPUT«Cannot assign to a readonly variable or a value␤current instr.: '_block1002' pc 113 ((file unknown):147) (/tmp/NAnHyAu_Un:1)␤»
CBro2007 because in java etc you would just declare it public and then there are get/set methods to access it 08:04
masak hello tadzik 08:04
CBro2007 ah I was actually gonna ask about how to write your own copy constructor
moritz there are no copy constructors in Perl 6
CBro2007 can I declare a method called "new"? 08:05
masak yes.
CBro2007 just the default constructor then?
moritz you can name your constructor however you want
masak yes, but "default constructor" doesn't mean the same as in C++.
a Mu.new method is provided out of the proverbial box.
moritz perlgeek.de/blog-en/perl-6/object-c...ation.html 08:06
CBro2007 moritz: right so it doesn't need to be called "new" ... what is "Someclass.new" doing then?
moritz so the box is Mu? :-)
CBro2007: it calls the method new on the type object Someclass
masak moritz: or the OO system as such :)
CBro2007 moritz: I am reading your perl 5 to 6 articles
masak CBro2007: setters are evil and getters aren't so good either. they're a vestige of people who think they're doing OO but still in a struct-y mindset. 08:07
CBro2007 oh and if I haven't defined new in my class as a method it goes further up the heirarchy?
moritz should check them for up-to-date ness sometimes son
masak CBro2007: yes.
CBro2007 ok
moritz like any method call, really
CBro2007 cheers... makes more sense now 08:07
yep true
masak rakudo: class Parent { method foo { say "OH HAI" } }; class Child is Parent {}; Child.new.foo 08:08
p6eval rakudo f63b82: OUTPUT«OH HAI␤»
tadzik masak: o/
moritz masak: I'm not convinced that getters are "not so good" per se
masak moritz: I'm not 100% convinced either, but I'm toying with the thought.
CBro2007 to be honest I really like perl 6 syntax, but I don't like this $. and $! stuff 08:09
masak CBro2007: it'll grow on you, just wait.
tadzik masak: that makes some sense
CBro2007 i mean return $!a + $!b + $!c;
moritz masak: consider Rat.pm in the setting - what would be the superior move that allows the same functioniality, but doesn't use accessors?
CBro2007 looks a bit ugly :)
tadzik CBro2007: it's just like PErl 5's sigils, but twice the fun :)
CBro2007 heh
masak moritz: Rat is essentially a struct-y type.
CBro2007 but man perl 6 is seriously wayyyy better to read than perl 5 08:10
masak well, an immutable one.
CBro2007 massive improvement in syntax
masak CBro2007: so is modern Perl 5 :)
tadzik oh, not always :)
CBro2007 is it?
CBro2007 I haven't seen modern perl 5.... have they cleaned it up like 6 has? 08:10
i don't know but was overloading possible in p5? 08:11
moritz it was, mostly
tadzik magic
CBro2007 with this multi stuff I mean
tadzik oh, no
moritz no multis though 08:11
CBro2007 yeah thats new
tadzik bbl
CBro2007 and I notice that you guys have the slurping of args... using "rest" for other args 08:12
reminds me of common lisp
moritz what they call "overloading" is just things like "providing custom string/integer/whatever views for an object
CBro2007 :)
maybe it would be good to think of writing some containers then
like c++ std library
CBro2007 Stack, Queue, Tree 08:12
would be super handy I reckon... esp with this new multi feature 08:13
masak CBro2007: I've been wanting that too. especially different Tree and Hash implementations.
CBro2007 yep
masak CBro2007: something like Java's library of such types.
CBro2007 If I continue to use p6 for my work at uni... then I will need to write them anyway 08:14
masak maybe some MooseX module provides multi methods, I dunno.
CBro2007 yeah haven't looked into it in detail
just thought I would make a small suggestion :)
masak we do need someone to flesh out those bits. 08:15
and nom should make it massively easier, too.
CBro2007 what is nom? sorry
moritz nom is a development branch of rakudo
that allows for much more memory-efficient objects
CBro2007 k 08:16
but do you think std lib like stuff would work well in p6?
oh is there a concept like java generics or c++ templates in p6?
or would you have to write a multi for each type? coz that might not be fun :) 08:17
moritz we have parameterized roles
though the duck typing means that you don't actually have to type the container
CBro2007 ok will finish reading the article first ... btw good work on the article moritz
moritz thanks CBro2007 - if you find anything that's not clear, please tell me, I'm always looking for ways to improve them 08:18
CBro2007 yeah no worries 08:18
so you saying that for say a stack implementation - you could define that as a role? 08:19
masak nom not only allows for more memory-efficient objects, but also gives a better "API" to the VM "metal".
CBro2007 and then people just say "does" blah and they can use the stack as say a stack of integers or numerics?
moritz though they could just use an array 08:20
which has push and pop
CBro2007 later down the track I will need you guys to help out with this nom stuff :)
yeah but I think it helps to have a class for different data types 08:21
much like glib provides
binary trees, maps, queues, etc etc
yath w 08:22
oops
masak CBro2007: agreed. in a library. 08:24
CBro2007 yep
masak there are many nice types of heap data structures out there.
ooh, and the disjoint-set data structure! I stumble over that on all the time. 08:25
the labyrinth-making algo would be very short and pretty if it could just use a library.
moritz well, it could
you just need to write the library first :-) 08:26
CBro2007 :)
masak in due time :) 08:26
CBro2007 I am thinking for my work I might have to make a p5 and p6 project and keep going that way
just in case something is missing in p6
is that too much work you guys think? 08:27
masak CBro2007: if you haven't found RosettaCode yet, be sure to check it out.
CBro2007 Someone here did pass it on to me yesterday
masak excellent. 08:27
moritz iirc that was our guru :-)
masak what, that guy who keeps floating cross-legged over the IRC channel? :P 08:28
how does he *do* that?
moritz he uses the new float-over-tcp protocoll 08:29
with special Rat protection against float errors
masak cunning.
CBro2007 moritz: cannot remember who that was?
was it TimToady?
moritz irclog.perlgeek.de/perl6/2011-07-17#i_4126530 08:30
aye
CBro2007 cool 08:31
ok gtg now 08:32
nice talking
sorear agh, missed CBro2007 08:35
sorear sleep
masak rakudo: (my %inv).push: { a => 1, b => 2 }.invert; say %inv.perl 08:49
p6eval rakudo f63b82: OUTPUT«{"1" => "a", "2" => "b"}␤»
masak \o/
but what if I wanted the inverse hash to hash on Int, not Str? 08:50
moritz you'd use an array? :-) 08:54
moritz no srsly, I think there's some room for parameterization mentioned in S09 08:54
masak right.
point well taken about the array :-) 08:55
but sometimes a sparse one in the form of a hash works better.
moritz well, I kinda hope somebody writes a sparse array implementation as a module 08:55
masak seen on Slashdot: "I called Wirth, once. but I think I called him by name and not by value. perhaps I made the wrong judgement call; my phone overflowed." 09:10
aloha Sorry, I haven't seen on Slashdot: "I called Wirth, once. but I think I called him by name and not by value. perhaps I made the wrong judgement call; my phone overflowed.".
masak aloha: I bet you're very popular at parties.
masak srsly though; a word from the English language that can begin sentences isn't a good bot activation mechanism. 09:12
mathw I like bots which need an initial punctuation command or something - like !seen 10:15
masak flies to Poland 10:19
tadzik \o/ 10:19
flussence pictures masak walking outside and suddenly zooming off into the sky 10:55
daxim JETPACK'D 11:33
takadonet morning all 12:12
Util Morning, takadonet 12:29
moritz rakudo: 'foo'.match(/o/); say $/ 13:02
p6eval rakudo f63b82: OUTPUT«Any()␤»
[Coke] yawns. 13:28
daxim 50mg caffeine IV 13:29
moritz nom: my $re = /./; say $re(Cursor.'!init_cursor'('foo', :c(0))).MATCH 13:32
p6eval nom: OUTPUT«Method '!init_cursor' not found for invocant of class 'Cursor'␤current instr.: '_block1002' pc 120 ((file unknown):693) (/tmp/9vtVYeG6l7:1)␤»
moritz nom: my $re = /./; say $re(Cursor.'!cursor_init'('foo', :c(0))).MATCH
p6eval nom: OUTPUT«f␤»
moritz nom: my $re = /./; say $re(Cursor.'!cursor_init'('foo', :c(1))).MATCH
p6eval nom: OUTPUT«o␤»
pmichaud good morning, #perl6 13:37
phenny pmichaud: 17 Jul 18:01Z <isBEKaml> tell pmichaud That patch does solve the build failure on my machine. Thanks! :)
moritz good am, pm
[Coke] daxim++ 13:38
pmichaud++
moritz nom: sub f() { 'a' ~~ /./; { say $/ }.() }; f() 13:42
p6eval nom: OUTPUT«a␤»
moritz \o/ so nom already has $/ tied to routine, not block
pmichaud not necessarily 13:43
it may just be that $/ is grabbing from the outer
moritz hm, right
nom: sub f() { 'a' ~~ /./; { say $/; 'b' ~~ /./; }.() say $?}; f()
p6eval nom: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3851 (src/Regex/Cursor.pir:239)␤»
moritz nom: sub f() { 'a' ~~ /./; { say $/; 'b' ~~ /./; }.() say $/}; f()
p6eval nom: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3851 (src/Regex/Cursor.pir:239)␤»
[Coke] pmichaud: did you happen to figure out that segfault I sent you?
pmichaud nom: sub f() { { 'a' ~~ /./ }; say $/;
p6eval nom: OUTPUT«Unable to parse blockoid, couldn't find final '}' at line 1␤current instr.: 'nqp;Regex;Cursor;FAILGOAL' pc 3851 (src/Regex/Cursor.pir:239)␤»
moritz nom: sub f() { 'a' ~~ /./; { say $/; 'b' ~~ /./; }.(); say $/}; f()
p6eval nom: OUTPUT«a␤b␤»
pmichaud nom: sub f() { { 'a' ~~ /./ }; say $/; }; f();
p6eval nom: OUTPUT«a␤»
moritz ok, I was wrong :/
no, I wasn't 13:44
pmichaud gee, it looks okay to me :)
moritz same $/ in both scopes
pmichaud [Coke]: segfault?
nom++
moritz works on Str.match
pmichaud is still waking up but doesn't recall a segfault 13:45
moritz nom: sub f() { say 'alive' }; my %h; f |%h 13:52
p6eval nom: OUTPUT«flattened parameters must be a hash or array␤current instr.: '_block1002' pc 82 ((file unknown):37744038) (/tmp/zgOKsbQdAd:1)␤»
moritz nom: my %h; say %h.defined
p6eval nom: OUTPUT«Bool::True␤»
pmichaud known bug.
[Coke] pmichaud: something like:
nom: say +"4/2".WHAT
p6eval nom: OUTPUT«Parameter '(null)' requires an instance, but a type object was passed␤current instr.: 'Numeric' pc 476222 (src/gen/CORE.setting.pir:128524) (src/gen/CORE.setting:1896)␤» 13:53
moritz pmichaud: how do I work around it? my %h := {} ?
nom: +Str
p6eval nom: OUTPUT«Parameter '(null)' requires an instance, but a type object was passed␤current instr.: 'Numeric' pc 476222 (src/gen/CORE.setting.pir:128524) (src/gen/CORE.setting:1896)␤»
pmichaud [Coke]: yes, we fixed it so that bug doesn't segfault. We still don't know what it's supposed to do.
moritz [Coke]: ah, I replaced that segfault by an unhelpful error message like above
pmichaud presuming, of course, that you didn't really mean 13:54
nom: say (+"4/2").WHAT
p6eval nom: OUTPUT«Rat()␤»
[Coke] I didn't mean anything. I just made it go boom. 13:55
pmichaud okay
[Coke] nom: say +"2/4".WHAT
p6eval nom: OUTPUT«Parameter '(null)' requires an instance, but a type object was passed␤current instr.: 'Numeric' pc 476222 (src/gen/CORE.setting.pir:128524) (src/gen/CORE.setting:1896)␤»
pmichaud it still goes boom, but it does so because we don't know what +TypeObject should do yet.
[Coke] that actual gave an answer on friday, I think. ah well.
[Coke] (no worries) 13:55
pmichaud or, more correctly, we don't know what TypeObject.Numeric should do yet. 13:56
I may just do the zero-and-warn bit for now.
moritz that's probably what wins us the most spectests
pmichaud oh, if there are spectests depending on that, I think they may be incorrect.
moritz agreed 13:57
but knowing the test suite as I do, it's pretty much certain that some tests do
s/it's/I'm/
dalek kudo/nom: f2fda00 | moritz++ | src/ (3 files):
add Str.match(Regex, :p, :c)
14:05
kudo/nom: 19e3ba8 | moritz++ | LHF.markdown:
add regex-related Str methods to LHF.

Also deduplicate an item which seems to have doubled during a merge conflict
pmichaud nom: sub f(*%_) { say 'alive'; }; my %h; f |%h; 14:15
p6eval nom: OUTPUT«flattened parameters must be a hash or array␤current instr.: '_block1002' pc 82 ((file unknown):29623934) (/tmp/2jjhftE8Ki:1)␤»
dalek kudo/nom: 62c49e2 | pmichaud++ | src/core/EnumMap.pm:
Fix hash flattening for empty hashes and enummaps. moritz++
14:57
eiro hello 15:00
moritz \o 15:01
eiro any paper about concurrency in perl6 ? any anyevent outsider in perl6 ? 15:03
JimmyZ I guess no? 15:04
eiro ok
JimmyZ suggestion welcome ;) 15:05
eiro haha
not skilled enought
JimmyZ me too 15:06
eiro it means there is no way to implement webapps with long polls in perl6
for example a server for a turn by turn 15:07
game
moritz why would you need long polling for a turn-by-turn game? 15:08
eiro moritz, to push events to the clients 15:11
say player1 moved, i want to push infos to player's 2 client for refresh 15:12
moritz it's ugly, but you can also let the clients poll
JimmyZ eiro: something like libevent or libev?
eiro moritz, i think client pull is ugly 15:13
JimmyZ, yep
moritz, if you want real time events, you're polling fast so you waste lot of bandwith
bandwidth
JimmyZ eiro: I think we can call libevent or libev from perl6 15:14
moritz that's why I started my sentence with "it's ugly" :-)
I know it's quite a sever limitation for some applications 15:15
didn't sorear add basic thread support to niecza? I can't remember...
eiro ok. i asked for something simple (just playing with perl6 for now) 15:18
thanks anyway moritz and JimmyZ
:)
pmichaud 15:06 <eiro> it means there is no way to implement webapps with long polls in perl6 15:20
We're just waiting for someone to give us an idea of how such a thing should be done in perl 6. :)
arnsholt I've a plan to try my hand at webapps (involving Zavolaj) 15:30
arnsholt Using Mongrel 2 all I need to do is the bindings to ZMQ 15:36
JimmyZ arnsholt: github.com/plobsing/parrot-zeromq/ 15:53
arnsholt JimmyZ: Even less for me to do. Yay! =) 15:59
Thanks!
JimmyZ arnsholt: :) 16:20
night
felher Hey folks. Hi do i slurp complete stdin into a string? Do i have to use lines() ? 16:29
colomon rakudo: my $a = slurp; say $a
p6eval rakudo f63b82: OUTPUT«Operation not permitted in safe mode␤ in 'Safe::forbidden' at line 2:/tmp/DNx14cp6_Z␤ in main program body at line 22:/tmp/DNx14cp6_Z␤»
felher colomon: thnx. Seems my rakudo is too old. 16:30
colomon ? slurp's been around for a while. 16:31
I might not have the exact syntax needed there, but something like that should work
felher colomon: My rakudo says slurp needs at least one argument. 16:32
colomon try $*IO.slurp
soory. $*IN.slurp
felher colomon: Yeah, works like a charm. thnx. colomon++ 16:33
sorear moritz: yes, some time ago 18:53
masak oh hai from tadzik++'s place! \o/ 19:15
tadzik \o/ 19:16
pmichaud oh hai masak++ at tadzik++'s place!
masak we're having a "laptop party".
mberends \o/ 19:17
masak updates rakudo master, rakudo nom, rakudo podparser, and nom
pmichaud masak: so, now that you (and jnthn++) have put together a conference, I'm thinking of doing the same here at DFW. Any advice or suggestions where to start?
masak s:2nd/nom/niecza/ 19:18
pmichaud: we asked for an Act instance, and everything basically fell out of that.
pmichaud masak: that's what I'm hoping to hear. Who do I ask for an Act instance? 19:23
masak pmichaud: IIRC on the Act mailing list. 19:25
be prepared with your public SSH key. 19:26
arnsholt masak: Semi-related, has anyone taken on NPW12 yet? 19:27
masak why, you interested?
arnsholt Just trying to plan my calendar a bit in advance, I'm afraid
(I'm not very involved with Oslo.pm, whp are the natural organizers for an Oslo NPW) 19:28
masak nodnod
no, I haven't heard anything.
masak wow, GNU Hurd is coming? first DNF, now this... :) 19:39
arnsholt Not to mention Perl 6! ;) 19:41
pmurias masak: GNU Hurd really is coming? 19:42
masak pmurias: I saw a Slashdot blurb flash by hinting that it is. hold on, I'll dig deeper. 19:46
here: news.slashdot.org/story/11/07/14/21...urd-Coming 19:47
jlaire see also www.archhurd.org/ 19:48
which isn't just a vague plan for 2013 :) 19:49
masak jlaire: hi!
jlaire masak: hihi!
masak jlaire: it's funny, you patched a Ctrl+D flaw that I had already pushed a fix for :) 19:50
(but thanks for making the effort)
jlaire yeah, I noticed :)
masak my plan for tonight is to get the first blog post out. after that, I might go through the TODO file and fix a few things. 19:51
jlaire the .= operator is really convenient, I often wish I had it in other languages 19:54
and pointy blocks with 'if'
masak yeah.
lately I've been missing infix:<.=> combined with chained method calls. 19:55
like '$string .= lc.trim.flip'
jlaire I was just thinking about the same
looking at that code 19:56
masak std: my $string; $string .= lc.trim.flip
p6eval std 516268a: OUTPUT«===SORRY!===␤Method call found where infix expected (omit whitespace?) at /tmp/qA6Bxt7RzP line 1:␤------> my $string; $string .= lc⏏.trim.flip␤ expecting any of:␤ infix or meta-infix␤ method arguments␤Parse failed␤FAILED 00:01 …
masak suspected that
[Coke] rakudo: my $foo = " abcDEF "; say $foo .= lc.trim.flip
p6eval rakudo f63b82: OUTPUT«===SORRY!===␤Confused at line 22, near "say $foo ."␤»
[Coke] . o O (too slow.)
jlaire masak: btw, what did you use to generate that .svg?
oh, inkscape 19:57
masak jlaire: Inkscape.
masak but every time I make a diagram like that, I keep thinking that I should spend some time making a high-level description language to produce such images, rather than draw them out by hand. 19:59
sorear o/ masak 20:07
masak \o sorear
pmurias masak: which .svg? 20:19
ingy \o_o/ 20:20
masak ingy: \oOo/ 20:21
pmurias: github.com/masak/crypt/tree/master/images 20:22
sorear: reading github.com/sorear/niecza/commit/20...aafa54d8b4 is a surprisingly pleasurable experience. niecza looks quite hackable, at least the Perl 6 part. 20:24
when I run the nom spectests, two files (t/spec/S02-builtin_data_types/assigning-refs.rakudo t/spec/S02-literals/numeric.rakudo) give non-0 exit status, resulting in a FAIL even though no tests failed. 20:27
masak on the bright side, running the spectests only takes 15 minutes! :) 20:36
[Coke] masak - are those the ones that end with an error about # of arguments? 20:37
masak dunno.
could be.
tadzik I get no fails on the podparser branch :) 20:39
moritz got those too, at least in one of the test files
tadzik after merging nom into it
masak tadzik: .5 yay + .5 wtf :)
tadzik :)
moritz Pod - it cures your unrelated problems too :-) 20:39
tadzik I'd check the bare nom
ask me again in half an hour or so 20:40
moritz nom spectest is clean here 20:43
[Coke] double checks.
masak tadzik haz beer \o/ 20:44
tadzik :) 20:45
masak tadzik++
tadzik I haz had one more, but I breaken it :(
masak some lossage is expected... but yeah, bit of a waste :/
tadzik nom spectest fully passed for me 21:00
masak odd. 21:00
[Coke] gist.github.com/1090692 21:21
[Coke] (for tadzik). 21:21
tadzik [Coke]: podparser? 21:22
[Coke] tadzik: nom 21:32
tadzik [Coke]: what system are you on?
[Coke] You said it was passing for you; that's the failure mode I see after a fairly recent update.
tadzik I see
[Coke] tadzik: that's on OS X
tadzik mhm. Intredasting 21:33
I'll run it once again just to be sure :)
[Coke] if I am trying to build rakudo/nom, which branch of nqp do I want?
tadzik the perl6/nqp repo 21:34
master branch
[Coke] k.
masak blog post! strangelyconsistent.org/blog/june-2...dventure-i
sorry 'bout the delay. ;) 21:35
tadzik \o/
[Coke] wonders why "make install" on nqp is building stuff. 21:39
pmurias masak: where in Poland are you now?
masak pmurias: northern Warsaw. 21:40
pmurias: where are you?
tadzik [Coke]: it probably needs to build them before instaling
as 'all' being a prerequisite of 'install'
pmurias masak: Zielona Góra, it's far away 21:41
masak oh, ok. 21:42
tadzik t/spec/S02-whitespace_and_comments/unicode-whitespace.t is non-deterministic on my machine: sometimes it segfaults, sometimes not 21:49
and in different places
masak fun for the whole family.
sorear colomon: hi 21:52
I'm looking for ways to avoid writing 24 copies of the sin() boilerplate 21:53
thinking maybe I'll have a single unary_trig function with a selector parameter
masak are those 24 copies 'sin', 'cos', 'tan', etc? 21:55
sounds like a selector function would incur a speed penalty with every trig function call. and because of the selector parameter, there isn't much hope of inlining it. 21:57
Tene bah, what do you need sin() for? isn't &infix:<**> enough? 22:05
masak spoken like a true minimalist. 22:06
rakudo: my @a = <foo bar baz>; say so "baz" ~~ /^ <@a> $/ 22:07
p6eval rakudo f63b82: OUTPUT«Bool::True␤»
masak \o/
TimToady bah, what do you need ** for? or * for that matter
masak right, .succ is enough.
TimToady perl6: say ∅.succ 22:09
p6eval niecza v7-39-gfe88724: OUTPUT«===SORRY!===␤␤Confused at /tmp/Tn4YUtW67j line 1:␤------> say ⏏∅.succ␤Other potential difficulties:␤ Unsupported use of bare 'say'; in Perl 6 please use .say if you meant $_, or use an explicit invocant or argument at /…
..pugs: OUTPUT«decodeUTF8': bad data: '\8709'␤*** ␤ Unexpected "\8709."␤ expecting bare or pointy block construct, ":", identifier or operator␤ at /tmp/MtF4IVT27t line 1, column 5␤»
..rakudo f63b82: OUTPUT«===SORRY!===␤Confused at line 22, near "say \u2205.succ"␤»
tadzik std: say ∅.succ 22:10
p6eval std 516268a: OUTPUT«===SORRY!===␤Confused at /tmp/mtneD93W6P line 1:␤------> say ⏏∅.succ␤ expecting any of:␤ bracketed infix␤ infix or meta-infix␤ statement modifier loop␤Other potential difficulties:␤ Unsupported use of bare 'say'; in Perl 6
..ple…
Tene perl6: say (e**(pi*i)).re
p6eval pugs: OUTPUT«*** No such subroutine: "&e"␤ at /tmp/8vqniSmcTf line 1, column 6-15␤»
..rakudo f63b82, niecza v7-39-gfe88724: OUTPUT«-1␤»
TimToady niecza: constant ∅ = Nil; say ∅.WHAT; # :) 22:11
p6eval niecza v7-39-gfe88724: OUTPUT«===SORRY!===␤␤Malformed constant at /tmp/gaqHS4lD55 line 1:␤------> constant ⏏∅ = Nil; say ∅.WHAT; # :)␤␤Parse failed␤␤»
Tene .u ∅
phenny U+2205 EMPTY SET (∅)
Tene What's the successor of the empty set?
TimToady dunno, ask Church
Tene Ahh, right.
masak {{}}, IIRC. 22:14
and then { {{}}, {} }. 22:15
TimToady as far as I'm concerned, he just found a different set of fingers to count on
but seriously, I wonder if we should allow declarations of non-alnum constant symbols
TimToady there're a lot of math symbols that aren't alphanums; is it worth forcing all of them through term:<∅>-ness 22:17
std: constant Set ∅ = set(); 22:18
p6eval std 516268a: OUTPUT«===SORRY!===␤Malformed constant at /tmp/ojqmW_gloS line 1:␤------> constant Set ⏏∅ = set();␤ expecting trait␤Parse failed␤FAILED 00:01 117m␤»
masak TimToady: why does that argument apply just to constants, and not to ordinary sigilled variables, though?
TimToady std: constant Set ø = set(); 22:19
p6eval std 516268a: OUTPUT«===SORRY!===␤Malformed constant at /tmp/docx0F5KsP line 1:␤------> constant Set ⏏ø = set();␤ expecting trait␤Parse failed␤FAILED 00:01 117m␤»
TimToady masak: it doesn't, is (perhaps) part of my point 22:20
p5 doesn't care what the next char is
which, of course, we/I heavily abused :/
std: constant Set o = set(); 22:21
p6eval std 516268a: OUTPUT«===SORRY!===␤Malformed constant at /tmp/o7F7TfllVc line 1:␤------> constant Set ⏏o = set();␤ expecting trait␤Parse failed␤FAILED 00:01 117m␤»
TimToady duh
std: constant ø of Set = set();
p6eval std 516268a: OUTPUT«ok 00:01 120m␤»
TimToady std: constant ∅ of Set = set(); 22:22
p6eval std 516268a: OUTPUT«===SORRY!===␤Malformed constant at /tmp/PnQ1yrkiXs line 1:␤------> constant ⏏∅ of Set = set();␤ expecting any of:␤ trait␤ type_declarator␤Parse failed␤FAILED 00:01 117m␤»
TimToady from those two examples, it can be argued that people who can't use the correct character (∅) will choose to use an incorrect character(ø) instead 22:23
masak ugh.
or they will use term:
benabik .u ø
phenny U+00F8 LATIN SMALL LETTER O WITH STROKE (ø)
TimToady I should fess up to also thinking a lot about SSA and sigilless "temporarily immutable" constants 22:24
sjohnson .u I
phenny U+0049 LATIN CAPITAL LETTER I (I)
masak TimToady: oh right, you mentioned at some point previously. 22:26
TimToady: sigilless feels fairly un-Perly in general, IMHO.
TimToady we could, for instance, allow new SSA symbols to be declared with 哈 ::= 42; 22:27
in this view the $ means "variable" more than it does now 22:28
sorear TimToady: I thought those were von Neumann numbers 22:29
ashleydev SSA symbols? 22:32
TimToady ah, yes, Church composed functions, not sets
TimToady en.wikipedia.org/wiki/Static_single...nment_form but more from a programming perspective than from a compiling perspective 22:33
basically you can do a single assignment to a new symbol without considering it a mutation 22:34
since it can be reanalyzed into nested binding
much like the rebinding of a function's arguments results in different values for the formals, but that's not mutation 22:35
SSA just treats the new symbol as a parameter to the rest of the block, more or less
benabik zero: λs.λz. z, one: λs.λz s z 22:36
TimToady obviously Perl should use ⻳ for lambda instead of -> 22:37
huf this could be the breakthrough moment! 22:38
TimToady or ⻲ or ⻱ depending on where you live
.u ⻳
phenny U+2EF3 CJK RADICAL C-SIMPLIFIED TURTLE (⻳)
TimToady no wait, then it would be turtles all the way up, not all the way down 22:40
nm
drbean .u ⻱
phenny U+2EF1 CJK RADICAL TURTLE (⻱)
masak .oO( negative natural numbers )
TimToady unnatural numbers
benabik I watched a show about radical turtles when I was a kid... 22:41
huf benabik: ever tried re-watching a few episodes as an adult? 22:42
benabik huf: No, no, no. Childhood memories need to stay that way.
huf benabik: well, if you liked it, make sure you dont watch any
tadzik I actually watched a few, those with Usagi Yojimbo, the rabbit samurai 22:44
I prefer the comic, definitely
masak has a sudden suspicion rabbit samurai will figure in his dreams tonight
TimToady UY is not a comic; he takes himself very seriously 22:45
tadzik yeah, he takes karma more seriously than we do 22:49
masak he doesn't even let his dogma ride in it? :P 23:00
masak 'night, #perl6. 23:08
tadzik leaves too 23:10
g'night
ashleydev TimToady: would creating SSA symbols then translate to all ro values, such that $ comes to mean rw? 23:48
TimToady probably wouldn't force it to mean that, since we still need $*FOO ::= bar(); to mean a readonly dynamic var 23:53
sorear seems to pose parsing problems
foo := 2; # after foo, what is the state of the op/term flipflop?
how does this allow postdeclared listops?
TimToady it would have to be a lookahead, just like => is 23:54
TimToady or it would have to be a backoff when it was seen that a term can't start with => or := but that doesn't help the case of ∅ and friends 23:56
TimToady but for ssa you probably want ::= rather than := 23:58