»ö« 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. |
|||
sirrobert | r: class A {has $.a = 1}; my %cfg = {a => 2}; my $a = A.new(%cfg); say $a.a; | 00:02 | |
p6eval | rakudo 038a3c: OUTPUT«Default constructor only takes named arguments in method new at src/gen/CORE.setting:609 in block at /tmp/aObT_XotEW:1» | ||
sirrobert | how do you expand a hash to use this way? | ||
diakopter | r: class A {has $.a = 1}; my %cfg = {a => 2}; my $a = A.new(|%cfg); say $a.a; | 00:03 | |
p6eval | rakudo 038a3c: OUTPUT«2» | ||
sirrobert | ahhh | ||
I think I saw that before somewhere | |||
what is the | ... operator? | |||
diakopter | "flattening" | ||
sirrobert | makes sense =) | ||
thanks | |||
supernovus | Well, I'm out for now, sirrobert, if you like WWW::App, take a look at WWW::App::Easy -- github.com/supernovus/perl6-www-app-easy --- it's still a work in progress, but it'll be ready soon. | 00:09 | |
00:09
supernovus left
|
|||
sirrobert | will do | 00:19 | |
thanks =) | |||
I'm out too, all. | |||
00:39
benabik_ joined,
benabik left,
benabik_ is now known as benabik
|
|||
dalek | d: ff6eac2 | larry++ | Actions.pm: better(?) warning suppression |
00:40 | |
d: df68299 | larry++ | STD.pm6: 2nd whack at speccish sigspace parsing |
|||
d: 820200c | larry++ | STD.pm6: repeat requires while or until |
|||
d: 840c157 | larry++ | CORE.setting: fix casemap fossils |
|||
00:40
clkao joined
|
|||
TimToady | evalbot rebuild std | 00:40 | |
p6eval | OK (started asynchronously) | ||
00:50
alvis left
00:54
Guest39929 left
|
|||
diakopter | ... as if it could report it started synchronously | 00:55 | |
dalek | d: adada5f | larry++ | STD.pm6: modernize ** to +% |
00:56 | |
TimToady | I've taken to just writing it "foo +% bar" everywhere instead of "foo+ % bar", since the space is harmless under token, and what you usually want under rule anyway | 01:00 | |
seems to be healthier psychologically to keep the +% together most of the time | |||
std: repeat { ... }; | |||
p6eval | std f43a358: OUTPUT«===SORRY!===Undeclared routine: 'repeat' used at line 1Check failedFAILED 00:00 41m» | 01:01 | |
TimToady suspects std isn't really rebuilding | 01:02 | ||
benabik | f43a358 is from jul 30 | ||
sorear | I also doubt that rebuild works | 01:18 | |
for various painful reasons p6eval's rebuilder no longer runs on the same machine as p6eval and dalek | |||
diakopter | std: repeat { } while do do { }; | 01:45 | |
p6eval | std f43a358: OUTPUT«ok 00:00 41m» | ||
TimToady needs to manage a 'make reboot' for the ** to +% transtion | |||
and a 'make reboot' isn't actually successful currently... | 01:48 | ||
01:56
supernovus joined
|
|||
dalek | osystem: b080b79 | (Timothy Totten)++ | META.list: Added WWW::App::Easy, an MVC framework for Perl 6 Web Applications. |
01:58 | |
diakopter | n: say -0 | 02:04 | |
p6eval | niecza v19-15-g051783d: OUTPUT«0» | 02:05 | |
Timbus | oh wow. supernovus, this module is pretty great | 02:06 | |
02:06
Chillance joined
|
|||
dalek | osystem: f689bf9 | (Timothy Totten)++ | META.list: Removed Esquel, it is currently very broken, rewrite planned for later. |
02:08 | |
Timbus | im assuming content-type is text/html by default and you dont hactually have to set it per handler | ||
diakopter | n: say *&1&&**&1**1&**&&1&* | 02:11 | |
supernovus | Timbus: Glad you like it. Actually, the current WWW::App (the library WWW::App::Easy is based upon) doesn't set a default Content-Type header if none was found. I'll add that to the TODO list. | ||
p6eval | niecza v19-15-g051783d: OUTPUT«{ ... }» | ||
diakopter | TimToady: what would &&**& mean above | 02:12 | |
Timbus | oh, well yeah it definitely should | ||
TimToady | ** is HyperWhatever | 02:13 | |
sorear | n: ** | 02:14 | |
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any at /tmp/pfKJUi9mXx line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3930 (module-CORE @ 564… | ||
sorear | n: {**} | ||
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any at /tmp/hV_tZIkAIG line 1 (mainline @ 6)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3930 (module-CORE @ 564… | ||
sorear | n: -> { ** } | ||
p6eval | niecza v19-15-g051783d: ( no output ) | ||
sorear | whatever it is, it only dies at runtime | ||
diakopter | n: say (*&1&&**&1*****1&**&&1&*)({},{}) | 02:17 | |
p6eval | niecza v19-15-g051783d: OUTPUT«all({}, 1)» | ||
diakopter | n: say (*&1&&**&1*****1&**&&1&*)({2},{3}) | 02:18 | |
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any at /tmp/g4UDJ3GsSD line 1 (ANON @ 3)  at /tmp/g4UDJ3GsSD line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/C… | ||
diakopter | n: say (*&1&&**&1*****1&**&&1&*)({2},{}) | ||
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Any at /tmp/1S5DK0H61P line 1 (ANON @ 3)  at /tmp/1S5DK0H61P line 1 (mainline @ 8)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/C… | ||
diakopter | n: say (*&1&&**&1*****1&**&&1&*)({},{3}) | 02:19 | |
benabik | Has someone been using GA to generate P6? | ||
p6eval | niecza v19-15-g051783d: OUTPUT«all({}, 1)» | ||
diakopter | n: say (*&1&&**&1*****1&**&&1&*)({}) | ||
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: No value for parameter 'anon_2' in 'ANON' at /tmp/axPOJjuD1F line 0 (ANON @ 1)  at /tmp/axPOJjuD1F line 1 (mainline @ 8)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting lin… | ||
diakopter | n: say (*&1&&**&1*****1&**&&1&*)() | ||
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: No value for parameter 'anon_0' in 'ANON' at /tmp/90ic21pylj line 0 (ANON @ 1)  at /tmp/90ic21pylj line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting lin… | ||
diakopter | sorear: it counts from anon_0 to anon_2 ? | ||
sorear | those are gensyms | 02:20 | |
they increment in the order structures are parsedr | |||
n (* + *); (* + *)() | 02:21 | ||
n: (* + *); (* + *)() | |||
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: No value for parameter 'anon_3' in 'ANON' at /tmp/4iSfBtSTyU line 0 (ANON @ 1)  at /tmp/4iSfBtSTyU line 1 (mainline @ 4)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting lin… | ||
sorear | and they don't reset except with new files | ||
diakopter | oh | ||
why would it take {} but not {3} | |||
for the first argument | 02:22 | ||
sorear | in that last sample I think anon_2 is the * + * closure; niecza does not support truly anonymous closures | ||
{} is a Hash, {3} is a Block | |||
diakopter | why would it take a Hash but not a Block | ||
supernovus | Timbus: Okay, if no Content-Type or Location header is found prior to sending the PSGI response, it adds a Content-Type of text/html. | 02:26 | |
Timbus | rad | 02:27 | |
diakopter | n: do { } & while 1 { } # <blink> | 02:28 | |
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: Unable to resolve method from in type P6+{term:sym<∅>},{infix:sym<∈>},{infix:sym<(elem)>},{infix:sym<∉>},{infix:sym<∋>},{infix:sym<(cont)>},{infix:sym<∌>},{infix:sym<∪>},{infix:sym<(|)>},{infix:sym<∩>},{infix:sym<(&)>},{infix:sym<(-)>}… | ||
Timbus | now make it automatically pick if the url has .txt or .json at the end and you have yourself a feature | ||
supernovus | Well, that's a bit much for WWW::App itself, but for WWW::App::Easy, I'll make some magic dispatch rules that can easily be included in a web app to do just that. | 02:29 | |
Anyway, enough for tonight. Hope someone finds the library useful. I need to expand the documentation, as currently you need to read the WWW::App documentation in addition to the WWW::App::Easy to figure out all of the different features. | 02:31 | ||
diakopter | n: do { } , while 1 | 02:32 | |
std: do { } , while 1 | |||
p6eval | niecza v19-15-g051783d: OUTPUT«(timeout)» | ||
std f43a358: OUTPUT«ok 00:00 43m» | |||
diakopter | TimToady: what does the above comma do? | 02:33 | |
02:33
supernovus left
|
|||
diakopter | (or anyone, of course) | 02:34 | |
TimToady | treats do{} as a list of 1 element | ||
02:38
Psyche^ joined
02:42
Patterner left,
Psyche^ is now known as Patterner
|
|||
diakopter | n: say <-> { } >0 | 02:43 | |
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: Cannot use value like Block as a number at <unknown> line 0 (ExitRunloop @ 0)  at /home/p6eval/niecza/lib/CORE.setting line 295 (Any.Numeric @ 6)  at <unknown> line 0 (ExitRunloop @ 0)  at /tmp/bGx7tNqS1k line 1 (mainline @ 3) … | ||
diakopter | n: say <-> { }>0 | ||
p6eval | niecza v19-15-g051783d: OUTPUT«{ ... }» | ||
diakopter | @.@ | ||
what would that mean? | |||
(why would it not like the space in the first example but accept the 2nd example?) | 02:45 | ||
02:49
orafu left,
orafu joined
|
|||
TimToady | it has something to do with the endargs memo, so it determines whether say's args end there | 02:52 | |
02:53
fgomez left
|
|||
diakopter | :S | 02:54 | |
well, it parsed the first one, just interpreted the > as greater than I think. | 02:55 | ||
diakopter tries less hard to understand | 02:56 | ||
n: say { }<->{ }<->{ } | 02:59 | ||
p6eval | niecza v19-15-g051783d: OUTPUT«Any()» | ||
diakopter | o_O | 03:00 | |
why wouldn't it be a boolean | |||
(how else could it parse?) | |||
oh :) | 03:02 | ||
03:02
fgomez joined,
fgomez left
03:03
sivoais left,
sivoais joined
|
|||
benabik | What is <->? | 03:09 | |
diakopter | rn: say { '-' => 4 }<-> | 03:10 | |
p6eval | rakudo 038a3c, niecza v19-15-g051783d: OUTPUT«4» | ||
benabik | Ah. either a list or a subscript. right. | ||
03:14
localhost left
03:15
benabik left,
benabik joined
03:16
localhost joined
03:17
sftp left
03:32
Chillance left
03:47
gongyiliao left
03:49
benabik left
03:50
benabik joined
03:52
gongyiliao joined
|
|||
dalek | d: e20e129 | larry++ | STD.pm6: fix endargs wrt whitespace, diakopter++ |
04:03 | |
04:12
crab2313 joined
04:16
colomon left
04:18
fgomez joined
04:28
jeffreykegler left
04:36
skids left
04:37
huf joined
04:40
alvis joined
04:49
Entonian joined
04:50
Entonian left
05:09
Telgalizer joined
05:10
Telgalizer left
05:34
raiph left
05:37
birdwindupbird joined
05:44
adu joined
05:50
kaleem joined
06:02
benabik left
06:06
crab2313 left
|
|||
moritz | \o | 06:07 | |
adu | o/ | 06:08 | |
sorear | o/ | ||
06:14
wtw joined
06:21
Shozan is now known as SHODAN
|
|||
tadzik | '/ | 06:24 | |
06:26
DarthGandalf joined
06:28
zhutingting joined
|
|||
diakopter | moritz: I was considering replying to the "kill the spokesbug with fire" thread with something like this: | 06:36 | |
TimToady thinks replying with silence is one of the good options :) | 06:38 | ||
sorear | replying with silence only works if we can enforce it | 06:39 | |
moritz | "Camelia is fire-proof. Killing it is fire is just as effective a killing a fish with water" | 06:41 | |
TimToady: well, if somebody offers to contribute a different design, it's not nice to let him do all the work, and not merge it in the end. Which is why I broke my silence after a mockup was made | 06:42 | ||
diakopter | "...makes language with 10 years of development look less mature than..." - Perl 6 does not want to contrive an image of maturity. Instead, it intends to be cutesy and whimsical for the foreseeable future, and let a reputation of maturity grow organically in the long term. <Please correct me if/where my understanding is wrong> | 06:45 | |
cosimo | all this discussion makes me want to create a new design for perl6.org | ||
:-) | 06:46 | ||
diakopter | I too am not a fan of the current design, and I'm not afraid to admit it because I don't believe that only those willing/able to help out should offer critiques. | ||
that said, I am not able to design a better one because I suck at design. | 06:47 | ||
cosimo | me too, but would be nice to try anyway | ||
diakopter | the multicolored spokesbug would make for a nice splash of color on a page with far less color contrasts/busyness than the current one | 06:50 | |
making the color palette of the site the same as the logo makes the logo not stand out, and is way overkill | 06:51 | ||
(especially because the logo has so many colors) | 06:54 | ||
I recommend a palette for the rest of the page with some grays and perhaps one of the logo's colors, less neon and even more pastel than the current divs on the site | 06:57 | ||
dark pastel. | 07:01 | ||
07:03
GlitchMr joined
07:07
brrt joined
07:15
Saravanan joined
|
|||
Saravanan | Hi Everybody | 07:15 | |
i want to be a perl6 contributor | 07:16 | ||
can anyone guide me how to start | |||
diakopter | Saravanan: welcome! do you know how you would like to contribute? | ||
TimToady | what are your interests? | 07:17 | |
diakopter | (implementation, tests, documentation, evangelism, or others I'm sure I'm forgetting) | ||
Saravanan | i dono | ||
i am blank | |||
@diakopter .. can u please guide | 07:18 | ||
where to start | |||
moritz | Saravanan: do you know any programming languages already? if yes, which? | ||
Saravanan | perl | ||
moritz | Saravanan: then maybe pick your favorite Perl 5 module, and implement it in Perl 6 | ||
07:19
SamuraiJack joined
|
|||
TimToady | don't start with DBI :) | 07:19 | |
moritz | right :-) | ||
there's a (very loose) port of that already, called DBIish | |||
sorear | Saravanan: how long have you been using p5? programming in general? | ||
moritz | modules.perl6.org/ has the existing Perl 6 modules | 07:20 | |
diakopter | Saravanan: let's start by helping you obtain a working Perl 6 install | 07:23 | |
Saravanan | 4 years | ||
ok.. | 07:24 | ||
diakopter | Saravanan: do you use Linux? Windows? Mac? | ||
Saravanan | fedora and mac | 07:25 | |
but i prefer fedora | |||
diakopter | well, there are several implementations. Let's start with rakudo. Do you have experience building softare from source? | 07:26 | |
Saravanan | no.. | ||
diakopter | okay; we can help you with that | 07:27 | |
Saravanan | this is my first time | ||
diakopter | you might need a few things installed in your fedora. in a terminal type sudo yum groupinstall "Development Tools" | 07:28 | |
brrt | for the record, and not to be annoying, i do believe fedora comes with rakudo star | 07:29 | |
GlitchMr | Fedora? | ||
I think they have Rakudo Star 2011.07 | 07:30 | ||
yum install rakudo-star | |||
Saravanan | ok.. | ||
GlitchMr | If you want newer release, I guess you would have to compile | ||
TimToady | that's pretty old though | ||
tadzik | yeah | ||
07:31
zhutingting left
07:35
imarcusthis joined
|
|||
diakopter | Saravanan: did you decide whether you want the year-old version of rakudo or the most recent? Install git, gcc, and make to build the latest | 07:37 | |
Saravanan | ok.. | ||
which will be better | |||
old | |||
or new | |||
diakopter | let's try building the new one | 07:38 | |
there have been many changes | |||
Saravanan | ok.. | ||
i will back after lunch | |||
jnthn | mornin' | 07:45 | |
tadzik | hello jnthn | ||
diakopter | ahoy | ||
07:46
fhelmberger joined
|
|||
sorear | yo jnthn | 07:46 | |
07:55
fhelmberger left
07:59
zhutingting joined
|
|||
arnsholt | o/ | 07:59 | |
08:01
fhelmberger joined
|
|||
adu | Saravanan: or you can do what I do | 08:04 | |
GlitchMr | std: do { } for 1; | 08:07 | |
p6eval | std f43a358: OUTPUT«===SORRY!===Unsupported use of do...for; in Perl 6 please use repeat...for at /tmp/ocDd4DEbqD line 1:------> do { } for 1⏏;Parse failedFAILED 00:01 41m» | 08:08 | |
GlitchMr | std: repeat { } for 1; | ||
p6eval | std f43a358: OUTPUT«===SORRY!===Undeclared routine: 'repeat' used at line 1Check failedFAILED 00:00 41m» | ||
TimToady | the first message is bogus, and the second one is fixed (but not recompiled for the evalbot) | 08:19 | |
jnthn will pull that second one into Rakudo later today, if he's not beaten to it | 08:20 | ||
moritz | . ..--.ö..ö-8,, ,m.,m ,mlm mm | 08:21 | |
sorear | guten Morgen Ronja | 08:22 | |
moritz | danke :-) | 08:23 | |
08:27
adu left
08:29
awoodland joined
08:30
awoodland left
|
|||
jnthn -> meeting | 08:44 | ||
moritz -> 6h commute to $vacation | 08:46 | ||
sorear -> sleep | 09:00 | ||
masak | guten ugt morning, #perl6 | ||
hoelzro | morgen | ||
tadzik | masak! \o/ | ||
Saravanan | @diakopter as of now i will use mac | 09:13 | |
my fedora box is troubling | |||
how to install rakudo in mac | 09:14 | ||
hoelzro | Saravanan: I used to do with homebrew, but the latest formula doesn't work for me | 09:15 | |
Saravanan | oh.. | 09:16 | |
brrt | parrot works on a mac, that i know for sure | 09:26 | |
09:26
mucker joined
|
|||
brrt | Saravanan: whats troubling? | 09:26 | |
Saravanan | that's hardware problem | 09:27 | |
brrt | oh, then irc can't help you much :-) | ||
Saravanan | :-) | ||
brrt | you can certainly install parrot and rakudo on a mac, although i would not now know how | ||
Saravanan | ok.. | ||
i will try to add vmware in mac | 09:28 | ||
or virtualbox | |||
09:28
bbkr joined
|
|||
brrt | thats not necessary | 09:29 | |
bonsaikitten | prefix portage would be my lazy guess | 09:32 | |
09:33
daxim joined
|
|||
masak | Saravanan: welcome. | 09:48 | |
sorry to hear you're having trouble building Rakudo. | |||
we'll try to help. | 09:49 | ||
Saravanan | ok. | ||
masak | also, let us know if you need any more Perl 6 resources: documentation, tutorials, tips... | 09:54 | |
there's plenty at perl6.org, but sometimes it's still easier to ask here ;) | |||
Saravanan | :-) | 09:59 | |
daxim | can someone correct the spelling on <rakudo.org/how-to-get-rakudo/>? s/OpenSuSE/openSUSE/ | 10:14 | |
Saravanan | Successfully installed rakudo :-) | 10:16 | |
diakopter: i had installed rakudo | 10:17 | ||
next step? | |||
masak | next step: awesomeness. | 10:21 | |
r: say "OH HAI $_" for 1..5 | |||
p6eval | rakudo 038a3c: OUTPUT«OH HAI 1OH HAI 2OH HAI 3OH HAI 4OH HAI 5» | ||
Saravanan | its working | 10:28 | |
:-) | |||
great | |||
masak | \o/ | 10:30 | |
Saravanan: pro tip: the fastest way to Perl 6 mastery is to be curious and ask a lot of questions about things you're learning. we won't bite, and we're very helpful and responsive. | 10:31 | ||
Saravanan | ok.. | ||
how to install modules in perl6 | |||
is that same as perl5? | |||
daxim | similar | ||
Saravanan | ok.. | ||
in perl6 OO is inbuild? | 10:32 | ||
daxim | yes! | ||
Saravanan | i mean pure OO | ||
daxim | it's unpure OO, perl6 is like perl5 a multi-paradigm language | ||
Saravanan | ok.. | 10:33 | |
huf | what's a pure oo? | ||
Saravanan | as in java or c++ | ||
daxim | when you cannot do procedural programming | ||
Saravanan | hmm | 10:34 | |
tadzik | so not like C++ | ||
huf | hm. both java and c++ let you do procedural programming :) | ||
yeah | |||
Saravanan | so diff btw perl5 and perl6 | 10:35 | |
huf | perl6's builtin OO is like perl5+Moose except so much more | ||
i guess... | |||
daxim | too many to name here, there's a list in the online documentation somewhere | ||
tadzik | Saravanan: you may like the "Perl 5 to 6" series of articles | ||
it's linked on perl6.org/documentation I believe | 10:36 | ||
Saravanan | s | ||
daxim | I just updated the page <en.opensuse.org/Rakudo> (uuurgh, mediawiki), do you see the newest version with a table at the bottom or the previous one with section headings? | 10:38 | |
flussence | looks out of date here | 10:39 | |
tadzik | no table here | ||
daxim | then I really have to wait for someone to release | ||
Saravanan | ok | 10:40 | |
masak | Saravanan: Perl 6's OO is "pure" in the sense that even if you don't care about objects, things tend to be objects. | 10:42 | |
it's also "pure" in the sense that the OO system is implemented using the OO system itself. | |||
but really, maybe there isn't really any "pure" OO out there. even Smalltalk, the most obvious candidate, is opinionated in various ways. | 10:43 | ||
everything I've ever read purporting to explain what OO "really" is has turned out to be yet another opinion ;) | 10:44 | ||
Saravanan | :- | ||
:-) | |||
huf | :) | ||
masak | let me show you a few cool things about Perl 6's OO, though: | 10:45 | |
daxim | one can certainly form a majority report on the opinions | ||
GlitchMr | OOP is just syntactic sugar. Tell me difference between $something.do_something() and do_something($something) | ||
masak | daxim: yeah, and one would end up with... Java. | ||
GlitchMr: those used to be the same in Perl 6, but they're not any more. | 10:46 | ||
GlitchMr: you do have a point, though. even if you're not 100% right. | |||
huf | whoa, foo($bar) used to do method lookup? that'd be surprising.... | ||
masak | r: class A { has $.x; has $.y; }; say A.^attrs>>.name | ||
p6eval | rakudo 038a3c: OUTPUT«No such method 'attrs' for invocant of type 'Perl6::Metamodel::ClassHOW' in block at /tmp/eJjESD4QOV:1» | ||
masak | r: class A { has $.x; has $.y; }; say A.^attributes>>.name | ||
p6eval | rakudo 038a3c: OUTPUT«$!x $!y» | ||
masak | \o/ | ||
GlitchMr | Commonly in object oriented languages object is first. | ||
In procedural, method is first. | |||
masak | huf: no, more like methods marked with 'our' (or a star, I don't remember) got auto-exported as subroutines. | 10:47 | |
GlitchMr | It's just different order (and somewhat different syntax) | ||
masak | GlitchMr: no, there's a real distinction between non-method procedures and methods, IMO. | ||
GlitchMr: but you can simulate a method call by pretending that the first argument is an invocant. | 10:48 | ||
lumi_ | GlitchMr: $something.do_something() is like invoke(get_method(get_type($something),"do_something"),$something) | ||
masak | and it's correct that many languages/VMs actually implement it that way. | ||
lumi_++ # nice | |||
yes, that captures the mro thing, too. | |||
GlitchMr | print $_%2 for (0 ... *)[^100] | 10:49 | |
... | |||
oops | |||
wrong paste | |||
String.prototype.toUpperCase.call('hello, world') | |||
masak was just going to mention JavaScript :) | |||
yes, JavaScript is another language that emulates method invocation by folding the invocant as a first argument of some underlying invocation form (.call in this case) | 10:51 | ||
10:51
Saran joined
|
|||
masak | which means that you can take a method of object A and call it on an unrelated object B. | 10:51 | |
just like you can in Perl 5. | 10:52 | ||
in Perl 6, that's not possible unless B is a kind of A. | |||
r: class A { our method foo { say "OH HAI" } }; class B {}; &A::foo(B.new) | |||
p6eval | rakudo 038a3c: OUTPUT«Nominal type check failed for parameter ''; expected A but got B instead in method foo at /tmp/i7nzxuZqya:1 in block at /tmp/i7nzxuZqya:1» | ||
masak | r: class A { our method foo { say "OH HAI" } }; class B is A {}; &A::foo(B.new) | ||
p6eval | rakudo 038a3c: OUTPUT«OH HAI» | ||
masak | :) | ||
GlitchMr | I know. I use this trick to emulate super in JavaScript | ||
masak | if you emulate super in JavaScript, let me suggest that you're not going by the grain of the language ;) | 10:53 | |
it's a *prototypal* language, not a super language. | |||
the inheritance is differential, not classical. | |||
GlitchMr | B = new A(); B.prototype.method = function () { A.prototype.method.apply(this, arguments); alert('But this is B!'); } | 10:54 | |
masak | yeah, I've seen that pattern. | 10:55 | |
Saran | masak.. r u talking abt the difference between perl 5 and perl 6 | ||
masak | Saran: yes. | ||
and we also brought JavaScript into the discussion. | 10:57 | ||
JavaScript has the same looseness in pairing methods with objects. | |||
Perl 6 is a little more strict, as you can see in the above p6eval conversation. | 10:58 | ||
10:58
whiteknight joined,
whiteknight is now known as Guest1438
|
|||
GlitchMr | r: module Object { sub new { bless {}, 'Object' }; sub test($self) { $self.perl.print } }; Object.new.test | 10:59 | |
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===CHECK FAILED:Undefined routine '&bless' called (line 1)» | ||
GlitchMr | I guess I shouldn't attempt Perl 5 code in Perl 6 | ||
Saran | saravanan This link will guide with the differences and how to learn perl6 with the help of perl5 perlcabal.org/syn/Differences.html | 11:00 | |
hoelzro | GlitchMr: I believe in Perl 6 it's self.bless(*) | ||
GlitchMr | r: module Object { sub new { self.bless(*) }; sub test($self) { $self.perl.print } }; Object.new.test | ||
p6eval | rakudo 038a3c: OUTPUT«===SORRY!==='self' used where no object is availableat /tmp/Y0BG9Zq3gd:1» | ||
Saravanan | whether we have bless in perl6 | ||
if it has inbuilt OO then why we need bless in perl6? | 11:01 | ||
tadzik | bless is a part of this OO we have | 11:02 | |
masak | GlitchMr: you can only use 'self' inside methods. | ||
GlitchMr | r: module Object { sub method { self.bless(*) }; method test { self.perl.print } }; Object.new.test | ||
p6eval | rakudo 038a3c: OUTPUT«===SORRY!==='self' used where no object is availableat /tmp/BDe8BcnJ5X:1» | ||
GlitchMr | r: module Object { method new { self.bless(*) }; method test { self.perl.print } }; Object.new.test | 11:03 | |
p6eval | rakudo 038a3c: OUTPUT«Useless declaration of a has-scoped method in moduleUseless declaration of a has-scoped method in moduleYou cannot create an instance of this type in method bless at src/gen/CORE.setting:618 in method new at src/gen/CORE.setting:606 in block at /tmp/m4kNnL… | ||
masak | GlitchMr: and calling a sub 'method' doesn't make it a method :P | ||
r: my $m = method { self.bless(*) }; class A {}; say A."$m"() | |||
p6eval | rakudo 038a3c: OUTPUT«No such method '<anon>' for invocant of type 'A' in block at /tmp/mizHWATMNb:1» | ||
masak | hm :) | ||
r: my $m = method { self.bless(*) }; class A {}; say $m(A) | |||
p6eval | rakudo 038a3c: OUTPUT«A.new()» | ||
masak | \o/ | ||
r: my $m = method { self.bless(*, :x<42>) }; class A { has $.x }; say $m(A) | 11:04 | ||
p6eval | rakudo 038a3c: OUTPUT«A.new(x => "42")» | ||
GlitchMr | rosettacode.org/wiki/Non-decimal_ra...ert#Perl_6 | ||
Is it possible without eval (which he by accident called "val") | |||
masak | no, it's "val". | 11:05 | |
it's an eval for values. | |||
GlitchMr | I'm confused | ||
masak | and no, it's not possible to parameterize on the base. that's why "val" is used. | ||
n: say val ":2<1110>" | 11:06 | ||
p6eval | niecza v19-15-g051783d: OUTPUT«:2<1110>» | ||
masak | hrm. | ||
GlitchMr | But, can I do :16('FF') or something like this? | ||
masak | n: say val "0b1010" | ||
p6eval | niecza v19-15-g051783d: OUTPUT«0b1010» | ||
GlitchMr | It's good enough for me then | ||
masak | n: say val "0x55" | ||
p6eval | niecza v19-15-g051783d: OUTPUT«0x55» | ||
Saran | saravanan ..it is advised to go with few basics of perl6..then it will be easy to understand | ||
masak | sorear: I think all those should be parsed as ints. | ||
Saravanan | ok.. | 11:09 | |
11:11
MayDaniel joined
|
|||
masak | rn: say "ß" ~~ m:i/ß/; say "ß" ~~ m:i/SS/; say "SS" ~~ m:i/ß/; | 11:16 | |
11:16
MayDaniel left
|
|||
p6eval | rakudo 038a3c: OUTPUT«q[ß]#<failed match>#<failed match>» | 11:16 | |
..niecza v19-15-g051783d: OUTPUT«#<match from(0) to(1) text(ß) pos([].list) named({}.hash)>FalseFalse» | |||
masak | what's the rule for case insensitiveness in regexes? | 11:17 | |
rn: say "ß".uc | |||
p6eval | rakudo 038a3c, niecza v19-15-g051783d: OUTPUT«ß» | ||
masak | hm. | 11:18 | |
11:19
JimmyZ joined
|
|||
arnsholt | Pretty sure that's wrong | 11:25 | |
masak | aye. | 11:26 | |
GlitchMr | codegolf.stackexchange.com/a/6936/3103 | 11:33 | |
I'm almost sure I could golf this better :) | |||
Timbus | say [*] [xx] .words for get | 11:43 | |
masak | say [*] [xx] get>>.words | 11:44 | |
Timbus | i was trying to do that | ||
masak | one shorter if you use » :) | ||
Timbus | »:) | 11:46 | |
klingon smile | |||
GlitchMr | The problem is that both Timbus and masak solutions end after first line :P | 11:49 | |
But he hasn't specified that | |||
So it could work too | |||
Timbus | nput given as: x y (separated by a space) | ||
looks perfect to me | 11:50 | ||
GlitchMr | I'm already confused | ||
Perl 6 doesn't win with GolfScript, but it has chance in CodeGolf :) | 11:52 | ||
... | |||
Except I did it wrongly | |||
11:53
drbean left
|
|||
Timbus | you did! | 11:55 | |
say [**] [xx] get>>.words is the obvious one but incurs a penalty | 12:02 | ||
say [**] [xx] @*ARGS | 12:06 | ||
12:07
zhutingting left
12:08
MayDaniel joined
|
|||
Timbus | 30 pts including penalty. not bad | 12:09 | |
12:13
gongyiliao left
|
|||
flussence | I'm getting nowhere but this looks interesting - | 12:16 | |
given '2 4'.words { say [*] [xx] .[0], ^(.[1])»+»1 } | |||
r: given '2 4'.words { say [*] [xx] .[0], ^(.[1])»+»1 } | |||
p6eval | rakudo 038a3c: OUTPUT«16777216» | ||
flussence | only 8 bits off :) | ||
Timbus | lol. what's it meant to be | 12:19 | |
r: say [**] [xx] (2,4) | |||
p6eval | rakudo 038a3c: OUTPUT«65536» | ||
Timbus | close! | ||
12:21
xinming joined
12:25
xinming_ left
|
|||
masak | r: say [**] [xx] 2,4 | 12:30 | |
p6eval | rakudo 038a3c: OUTPUT«65536» | ||
masak | r: say [**][xx]2,4 | ||
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Confusedat /tmp/3U4zQfKKYR:1» | ||
masak | r: say [**] [xx]2,4 | 12:31 | |
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Confusedat /tmp/g0ag4TFkC7:1» | ||
masak | :) | ||
GlitchMr | Why reduce operators care so much about spaces? | 12:32 | |
JimmyZ | array | ||
r: say $a[xx][*] | 12:33 | ||
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Variable $a is not declaredat /tmp/g_I4Uhls57:1» | ||
JimmyZ | r: say $a [xx] [*] | 12:34 | |
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Variable $a is not declaredat /tmp/392OiiL3_2:1» | ||
12:41
sirrobert joined
|
|||
sirrobert | hi p6 | 12:42 | |
tadzik | hi | ||
12:46
MayDaniel left
|
|||
sirrobert | what is the : in this syntax doing: $foo.somemethod: $somesub; | 12:46 | |
tadzik | it's like $foo.method($sub) | 12:47 | |
sirrobert | ok | ||
does it have a particular name? | |||
tadzik | I don't know | 12:48 | |
sirrobert | huh, it's only for methods, not subs | 12:50 | |
JimmyZ | well, for subs is: sub args | ||
sirrobert | yeah | 12:51 | |
was just understanding the ... domain of the operator | |||
masak | I tend to think of it as the "rest of the statement is method args" colon :) | 12:52 | |
sirrobert | heh | ||
13:02
SamuraiJack left
13:03
jeffreykegler joined
13:04
SamuraiJack joined,
SamuraiJack left
13:06
SamuraiJack joined
13:08
Saravanan1 joined
|
|||
PerlJam | r: sub foo ($alpha: $beta) { } # just checkign | 13:08 | |
p6eval | rakudo 038a3c: ( no output ) | ||
PerlJam | std: sub foo ($alpha: $beta) { } | ||
p6eval | std f43a358: OUTPUT«Potential difficulties: $beta is declared but not used at /tmp/sPeLWXdUQR line 1:------> sub foo ($alpha: ⏏$beta) { } $alpha is declared but not used at /tmp/sPeLWXdUQR line 1:------> sub foo (⏏$alpha: $beta) { }ok 00:00 4… | ||
13:10
Saravanan left
13:11
wtw left
|
|||
Saravanan1 | hi | 13:12 | |
13:13
JimmyZ left
|
|||
tadzik | hello Saravanan1 | 13:13 | |
13:14
JimmyZ joined
|
|||
masak | Saravanan1: how's everything going? | 13:14 | |
13:15
atrodo joined
|
|||
masak | PerlJam: I believe we have an RT ticket for invocant colons in sub declarations. | 13:16 | |
hm, seems not. | 13:17 | ||
masak submits rakudobug | |||
PerlJam | std: sub foo ($alpha: $beta) { say "$alpha $beta" } | ||
p6eval | std f43a358: OUTPUT«ok 00:00 43m» | ||
PerlJam | It would be a stdbug too then | ||
13:18
Saravanan joined
|
|||
masak | rn: sub foo($alpha: $beta) { say "$alpha: $beta" }; foo 42, "OH HAI" | 13:19 | |
p6eval | niecza v19-15-g051783d: OUTPUT«42: OH HAI» | ||
..rakudo 038a3c: OUTPUT«Lexical 'self' not found in sub foo at /tmp/PCatPFMUMH:1 in block at /tmp/PCatPFMUMH:1» | |||
masak | actually, I'm not so sure supplying an invocant this way to a sub is an error. | ||
PerlJam | yeah, I was thinking that too :) | ||
masak | but Rakudo's behavior above surely is. | ||
masak submits rakudobug | |||
PerlJam | masak++ | ||
13:21
bluescreen10 joined
|
|||
sirrobert | What should that do? | 13:21 | |
sub foo ($alpha: $beta) | |||
13:22
Saravanan1 left
|
|||
masak | sirrobert: we don't know. | 13:22 | |
13:22
jeffreykegler left
|
|||
PerlJam | sirrobert: separate the args that participate in multi-dispatch from those that don't (maybe) | 13:22 | |
sirrobert | heh ok | ||
masak | either error or it should be fine. | 13:23 | |
sirrobert | fair enough =) | ||
hey, btw | |||
masak | PerlJam: no, both the invocant and the rest of the arguments before ;; participate in MMD to exactly the same amount. | ||
s/amount/extent/ | |||
sirrobert | as I've been using (learning) p6, I'm trying to be helpful by blogging about it. What kind of stuff is helpful to write about? | ||
PerlJam | It's too early for me to think clearly and I haven't had my caffiene yet. | 13:24 | |
masak | sittobert: to a first approximation, anything you feel is interesting. | ||
sirrobert | I'll try to find my "voice" about it =) | ||
PerlJam | sirrobert: Have you looked as "Using Perl 6"? Anything that fills the gaps from that book would be good to blog about. | ||
masak | r: class A {}; class B is A {}; class C { multi method foo(B) { say "C" } }; class D is C { multi method foo(A) { say "D" } }; D.new.foo(B.new) | ||
p6eval | rakudo 038a3c: OUTPUT«Ambiguous call to 'foo'; these signatures all match::(C , B , Mu *%_):(D , A , Mu *%_) in method foo at src/gen/CORE.setting:334 in block at /tmp/i2yosE1L2F:1» | ||
sirrobert | PerlJam: good idea =) | ||
masak | PerlJam: the above conflict demonstrates this. | 13:25 | |
here's a random suggestion for how .sort should sort by default: | 13:27 | ||
(a) if the values compared are equal by ===, sort them as equal | 13:28 | ||
(b) if the values are of the same type, sort them by cmp | 13:29 | ||
(c) if the values are of different types, sort the type name by leg | |||
or maybe this behavior should be folded into cmp itself. | |||
13:30
skids joined
|
|||
[Coke] | sort on type name seems odd, if you have a type hierarchy where you can still compare things (like in the numbers) | 13:35 | |
masak | yes, but (a) will catch that. | 13:36 | |
rn: say 4 === 4.0 | |||
p6eval | rakudo 038a3c, niecza v19-15-g051783d: OUTPUT«False» | ||
masak | hm :/ | ||
am I thinking of some other equivalence, like eqv, perhaps? | |||
rn: say 4 eqv 4.0 | 13:37 | ||
p6eval | rakudo 038a3c: OUTPUT«False» | ||
..niecza v19-15-g051783d: OUTPUT«True» | |||
masak | heh! | ||
masak wants to submit a bug, but doesn't know on what | |||
masak reads spec | |||
infix:<eqv>: S03:1303: "Compares two objects for canonical equivalence. For value types compares the values." | 13:38 | ||
well, it's the *same* value, no? | |||
masak submits rakudobug | |||
13:43
fhelmberger left
13:51
tokuhiro_ joined
13:54
thou joined
|
|||
masak | rn: say 4e1 eqv 4; say 4e1 eqv 4.0 | 13:55 | |
p6eval | rakudo 038a3c, niecza v19-15-g051783d: OUTPUT«FalseFalse» | ||
masak | sorear: why does Niecza go True for 4 eqv 4.0 but not for those two? | ||
at least Rakudo is being consistent. | 13:56 | ||
13:58
Chillance joined
14:06
crab2313 joined
14:08
atrodo left
14:10
SamuraiJack left
14:11
atrodo joined
14:14
SamuraiJack joined
|
|||
TimToady | it is a nieczabug, not a rakudobug, since === and eqv can only match if the types are the same | 14:20 | |
masak rejects the rakudobug | 14:21 | ||
masak submits nieczue | |||
TimToady: any thoughts on subs with an invocant parameter? | 14:22 | ||
14:22
Saravanan left
|
|||
TimToady | not before coffee | 14:23 | |
masak | ;) | ||
TimToady | esp since I only got 5 hours sleep | ||
masak | :/ | ||
tadzik | one does not cast spells without mana potions | ||
TimToady | because I was hacking on STD :) | ||
masak | heh :) | ||
14:23
kaare_ joined
|
|||
masak | TimToady: when I saw your "I can't commit this thing before I've committed these things", I wanted to tell you about git-stash | 14:24 | |
TimToady is close (cross fingers) to having the sigspace stuff working again | |||
14:24
hoelzro joined,
telex joined
|
|||
sirrobert | git stash is super nice =) | 14:25 | |
love that it's a stack | |||
TimToady | yes, that looks nice | 14:26 | |
masak | 'git stash [save]' and 'git stash apply' are complementary actions, and the two I use the most. | 14:32 | |
I love how it's using commits to save away my changes. | 14:33 | ||
(without hooking those commits onto any branch) | |||
PerlJam | how long do your stashes stay around? | ||
(I use stash quite a bit too but I find that sometimes I forget about them) | 14:34 | ||
masak | that's a really good quesion. | ||
sirrobert | I think they stay around indefinitely (until you clear them) | ||
PerlJam | whereas if I put my changes in a branch, they are less likely to be forgotten | ||
masak | somewhere between 10 seconds and 10 kiloseconds, most of the time. | ||
hoelzro | PerlJam: that's my issue | ||
masak | yeah, branches are nice, too. they're the "next step" after stashes. | 14:35 | |
hoelzro | I often forget about them =/ | ||
sirrobert | I use stash as something like a clipboard | ||
I only put stuff in there I'm ok to lose, or that I want to copy from one branch to another. | |||
masak | and I keep forgetting and re-remembering that branches are very throwaway, too, and can be created en masse for various experiments. | ||
yeah, stashing is like an anonymous mini-branch of sorts. | 14:36 | ||
PerlJam | sirrobert: If you're copying from one branch to another, then surely you don't need the stash? | ||
sirrobert | well, I don't mean literally copying, more like "sticking them in there to see if there are applicable bits" | ||
I often have a stash that's several layers deep and pop to the one I want | 14:37 | ||
PerlJam | ah | ||
sirrobert | kinda like an undo/redo =) | ||
lumi_ | r: say 4e1 | 14:38 | |
p6eval | rakudo 038a3c: OUTPUT«40» | ||
lumi_ | masak: That's why the first one fails | ||
PerlJam | lumi++ (math skills ;) | 14:39 | |
sirrobert | heh | ||
masak | I fail math today. | 14:40 | |
masak rises from the ashes and moves on ;) | |||
rn: say 4e0 eqv 4; say 4e0 eqv 4.0 | |||
p6eval | niecza v19-15-g051783d: OUTPUT«TrueTrue» | ||
..rakudo 038a3c: OUTPUT«FalseFalse» | |||
masak | yeah, niecza is consistently wrong on those. lumi_++ | 14:41 | |
TimToady | now if only git stash would save and restore all the vim sessions I have up in that directory, it might be useful to me | ||
timotimo | surely you could write a perl one-liner that does this ... :) | 14:44 | |
TimToady | debugging STD/viv when you have no valid CORE setting and compiling CORE.setting fails in the first whitespace is...not trivial | ||
timotimo | hm. there's python and ruby for vim, but is there also perl for vim? i wonder ... | ||
hoelzro | timotimo: sure there is | 14:45 | |
if by "perl for vim", you mean that Vim can be built with an embedded Perl | |||
TimToady | I went to bed last night when I managed to get CORE to parse up to line 8, so at least it's parsing some sigspace now | ||
14:51
fgomez left
|
|||
dalek | d: 66387b5 | larry++ | STD.pm6: restrict do {} obs message to while/until |
14:55 | |
TimToady | GlitchMr++ for that, btw | 14:57 | |
jnthn back | 15:01 | ||
JimmyZ | welcome back | 15:02 | |
masak | good ugt morning, jnthn! | 15:03 | |
jnthn | TimToady: Heh, sounds like the fun I had getting CORE.setting parsing again when putting QRegex in place... | ||
TimToady: I'd say "have fun", but it was more "argh why" :) | |||
masak | that's because you forgot to have fun | 15:04 | |
15:05
Chillance left
|
|||
jnthn | masak: It's kind of a yak-shavey task :) | 15:05 | |
masak | yeah. I was kidding ;) | ||
15:05
Chillance joined
|
|||
jnthn | re 114438 I suspect invocants should be forbidden on subs, but I didn't backlog to see if any other discussion happened with regard to it | 15:05 | |
masak | mad props to both jnthn and TimToady, of course. | 15:06 | |
jnthn | ah, I didn't sleep well enough to do humor :P | ||
Well, I can probably pun still... :) | |||
masak | jnthn: I started out supposing that it should forbid it too. it's certainly the conservative thing to do. | ||
if it works, then it should work like in Niecza. | |||
jnthn | I know STD has some invocant_ok thingy. I think I didn't steal it into Rakudo's grammar. | 15:07 | |
It may be related to taht. | |||
masak | n: sub foo($alpha: $beta) { say "$alpha: $beta" }; foo 42, "OH HAI" | ||
p6eval | niecza v19-15-g051783d: OUTPUT«42: OH HAI» | ||
15:07
obra left
|
|||
masak | jnthn: well, std allows it too! | 15:07 | |
std: sub foo($alpha: $beta) { say "$alpha: $beta" }; foo 42, "OH HAI" | |||
p6eval | std f43a358: OUTPUT«ok 00:00 44m» | ||
15:07
clkao left
|
|||
jnthn | bah :) | 15:08 | |
15:09
tokuhiro_ left
|
|||
tadzik | "We have an implementation of Perl 6 that's gonna start to be worth using in the next year or so" -- Damian on radar.oreilly.com/2012/08/damian-co...-perl.html | 15:14 | |
nice interview it is | |||
15:15
obra joined
|
|||
masak | tadzik: Damian Conway, is that the guy who said "the next year or so" back in 2001? :P | 15:15 | |
15:15
clkao joined
|
|||
masak | s/said/wrote/ | 15:15 | |
PerlJam | I'm not sure what to make of Damian anymore ... It's like he's disconnected from the community, but every once in a while pops up to say "I'm still here, look at this awesome thing" | 15:17 | |
(at least I don't quite see how he's connected like he used to be) | |||
masak | I've had that feeling too. but that seems to be his MO. | 15:18 | |
at least when he's involved, he is involved. | 15:19 | ||
I would prefer if he would pop up on the channel occasionally, but he doesn't seem to be a pop-up-on-the-channel kind of guy. | |||
GlitchMr | back | ||
TimToady: I was just testing if github.com/perl6/std/issues/1 was fixed | |||
I will do moritz++ instead | 15:20 | ||
15:21
birdwindupbird left,
Saran left
|
|||
TimToady | s/instead/in addition/ :) | 15:23 | |
this isn't a zero-sum game... | |||
diakopter | o_O TimToady before 9 a.m.? | 15:24 | |
diakopter apparently needs coffee too | 15:25 | ||
masak | diakopter: we're all on UGT now :P | 15:26 | |
I like blog.stackoverflow.com/2012/08/stac...a-qa-site/ not just because of the excellent geek troll picture. it makes good points. | |||
TimToady | * can mean UGT too | ||
15:28
MayDaniel joined,
MayDaniel left,
MayDaniel joined,
JimmyZ left
15:30
alester joined
15:35
thelazydeveloper joined
15:40
bbkr left
|
|||
diakopter | oh noes. no one show TimToady codegolf.stackexchange.com | 15:42 | |
TimToady | n: say +val '0x55' | ||
p6eval | niecza v19-15-g051783d: OUTPUT«85» | ||
TimToady | masak: when you use the string version of val, you just get the string back | ||
diakopter | it's like rosettacode except crazy | 15:43 | |
TimToady | n: say <0x55> | 15:44 | |
p6eval | niecza v19-15-g051783d: OUTPUT«85» | ||
TimToady | note that <> is specced to force numeric when there's just that one value | ||
but that's part of <>, not val | |||
masak | ah. | ||
TimToady | n: say +'0x55' | 15:45 | |
p6eval | niecza v19-15-g051783d: OUTPUT«85» | ||
TimToady | and you don't need the val if you're forcing numeric anyway | ||
so the RC entry is wrongish, I guess | 15:47 | ||
masak | aye. | ||
val | 15:48 | ||
diakopter | I forget - will P6 have unsanitary macros? | ||
masak | val, lightweight as it is, is too heavyweight there. | ||
diakopter: Pugs has them. | |||
pugs: macro foo { 'say $a' }; my $a = 42; foo | |||
p6eval | pugs: OUTPUT«42» | ||
diakopter | is that spec'd? | 15:49 | |
TimToady | and there's no reason to limit the RC entry to integers | ||
masak | diakopter: yes. | ||
TimToady | n: say 3.14159625.base(2) | ||
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: Unable to resolve method base in type Rat at /tmp/UQAKN6XJRW line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3929 (ANON @ 3)  at /home/p6eval/niecza/lib/CORE.setting line 3930 (module-CORE @ 564)  at /home/p… | ||
TimToady | r: say 3.14159625.base(2) | ||
p6eval | rakudo 038a3c: OUTPUT«11.001001000011111110101» | ||
15:49
jeffreykegler joined
|
|||
TimToady | nieczabug | 15:49 | |
masak submits | |||
diakopter | that oreilly link - "the fastest dynamic language out there"? | 15:53 | |
PerlJam | diakopter: yeah, I caught that too. I would have agreed with him a few years ago, but not today. | ||
15:54
hoelzro is now known as hoelzro|away
|
|||
masak | which language? Dart? :P | 15:56 | |
diakopter | Gabor Szabo needs an editor for his perl6maven posts; all of them have English errors | ||
masak | well volunteered. | ||
diakopter | :D | ||
TimToady | rosettacode.org/wiki/Non-decimal_ra...ert#Perl_6 fixed, GlitchMr++ masak++ | 15:58 | |
diakopter | rn: my $a =~ /a/; say $a | ||
p6eval | niecza v19-15-g051783d: OUTPUT«Regex()<instance>» | ||
..rakudo 038a3c: OUTPUT«» | |||
diakopter | std: my $a =~ /a/; say $a | 15:59 | |
p6eval | std f43a358: OUTPUT«Can't bless non-reference value at CursorBase.pm line 1163.FAILED 00:00 42m» | ||
diakopter | I don't know which one's righter | ||
niecza I guess, but isn't it supposed to warn on using =~ ? | |||
16:00
kaleem left
|
|||
masak | 'FAILED'? | 16:00 | |
16:00
brrt left
|
|||
diakopter | crashed I guess | 16:00 | |
TimToady | std: $_ =~ /a/ | ||
p6eval | std f43a358: OUTPUT«===SORRY!===Unsupported use of =~ to do pattern matching; in Perl 6 please use ~~ at /tmp/xbebQGchbK line 1:------> $_ =~⏏ /a/Parse failedFAILED 00:00 41m» | ||
TimToady | diakopter: the my is messing you up there | 16:01 | |
geekosaur | interesting parser fail in std with the my version | ||
TimToady | parsed as an initializer | ||
16:01
crab2313 left
|
|||
TimToady | my $a = (~ /a/) | 16:01 | |
diakopter | std: my $a = ~ /a/; say $a | ||
p6eval | std f43a358: OUTPUT«Can't bless non-reference value at CursorBase.pm line 1163.FAILED 00:00 42m» | ||
TimToady | but =~ on a my is non-sensical in any case, so I'm not concerned | ||
diakopter | did someone break p6eval's std? | 16:02 | |
TimToady | it's a month old | ||
and the current version certainly won't bootstrap | |||
gimme another few hours (cross fingers) to fix that | 16:03 | ||
diakopter | git wishlist: make a commit of only a portion of the diff of a file | ||
masak | diakopter: git-add -i | 16:04 | |
diakopter | oh! | 16:06 | |
seems TortoiseGit doesn't have that feature | |||
16:07
spider-mario joined
|
|||
diakopter | oh wait it does | 16:08 | |
TimToady | maybe it has git stash save --patch | ||
jnthn | diakopter: Also "git gui" brings up a GUI tool that can do that | 16:12 | |
[Coke] | masak: I had to walk away earlier, but how would you compare 4 and 4.1 then? as "Integer" vs "Number" ? | 16:16 | |
masak | yeah, that won't fly. | 16:17 | |
never mind. | |||
16:20
adu joined
16:38
[hds] joined,
[hds] left
|
|||
TimToady | I think subs with invocant parameters are benign, and : just means the same as comma there | 16:41 | |
16:41
am0c joined
|
|||
TimToady | in some sense, exported methods are the same thing | 16:42 | |
masak | let me play devil's advocate, then. | 16:43 | |
if we disallow them now but realize they're useful later, we will have an easier time than if we allow them now but realize they're harmful later. | |||
I see how they are "the same thing" as exported methods, but what are they chances they are *not* an indication of programmer confusion? | 16:44 | ||
i.e. what are the chances a programmer would be annoyed rather than helped by us flagging it? | |||
it might as well be a typo for 'method' as a typo for ',' | 16:45 | ||
TimToady | what are the chances that someone is attempting to communicate that this might end up as a method somehow as well? | ||
jnthn | Should it have a slef? | ||
*self? | |||
masak | definitely not. | ||
well, unless the sub is inside of a method :P | |||
jnthn | :P | 16:46 | |
TimToady | "sub with invocant better written as 'my method'" maybe | 16:48 | |
16:52
sftp joined
|
|||
masak rather likes that | 16:53 | ||
or 'our method'. | |||
TimToady | nr: my method foo ($foo: $bar) { say "$foo $bar" }; foo(1,2) | ||
p6eval | rakudo 038a3c: OUTPUT«1 2» | 16:54 | |
..niecza v19-15-g051783d: OUTPUT«===SORRY!===Methods must be used in some kind of package at /tmp/yi8quc9FUC line 1:------> my method foo ⏏($foo: $bar) { say "$foo $bar" }; foo(1,Unhandled exception: Check failed at /home/p6eval/niecza/boot/lib… | |||
TimToady | nieczanyi I guess | ||
masak | yeah. | ||
someone else is welcome to submit it. :) | |||
16:58
kaleem joined
|
|||
jnthn | r: class A { }; say A.new | 16:59 | |
p6eval | rakudo 038a3c: OUTPUT«A.new()» | ||
jnthn | r: class A { }; say ~A.new | ||
p6eval | rakudo 038a3c: OUTPUT«A<853331884>» | ||
TimToady | ô.ó | 17:00 | |
jnthn | Matches spec, afaik | 17:01 | |
I do now have the slight issue of what to do in NQP now that we have .gist and .Str doing different things in a bunch of cases. | |||
17:05
cognominal left,
cognominal joined
|
|||
diakopter | nr: my method foo ($foo: $bar) { say self~" $bar" }; foo(1,2) | 17:07 | |
p6eval | niecza v19-15-g051783d: OUTPUT«===SORRY!===Methods must be used in some kind of package at /tmp/Iksn61Nzeo line 1:------> my method foo ⏏($foo: $bar) { say self~" $bar" }; foo(1Potential difficulties: $foo is declared but not used at /tmp/Iksn… | ||
..rakudo 038a3c: OUTPUT«1 2» | |||
diakopter | r: my method foo ($foo:) { say self === $foo }; foo("b") | 17:08 | |
p6eval | rakudo 038a3c: OUTPUT«True» | ||
diakopter | r: class F { my method foo ($foo:) { say self === $foo }; }; F.foo() | 17:09 | |
p6eval | rakudo 038a3c: OUTPUT«True» | ||
17:10
raiph joined
|
|||
dalek | p/toqast: 319bb8d | jnthn++ | src/QAST/Compiler.nqp: Implement default parameter handling, winning the optional and named argument tests back. |
17:11 | |
p/toqast: 4b85a2e | jnthn++ | src/NQPQ/ (2 files): Get + and ~ prefixes workingish again. |
|||
p/toqast: 67a605c | jnthn++ | src/NQPQ/ (2 files): Compile =:= again. |
|||
17:14
kaleem left
|
|||
sorear | good * #perl6 | 17:17 | |
17:18
alvis left
|
|||
masak | sorear! \o/ | 17:19 | |
sorear: I discovered some bugs in Niecza's eqv in the backlog. | |||
also filed some other things and didn't file some other things. | |||
[Coke] files a bug on masak's bug filer. | 17:26 | ||
"seems spotty" | |||
masak | I wouldn't mind if someone took over all the nieczue filing, to be honest. | 17:27 | |
I still feel like my primary responsibility is to keep RT's perl6 queue up-to-date. | |||
diakopter | I think we can have a bot that takes this command: bugfiler: niecza 8 Title of Bug Report where 8 means number of prior irc lines to paste into the bug report | 17:31 | |
and it would only accept commands on #perl6 so people couldn't spam it in privmsg | |||
seems the nick isn't taken | 17:32 | ||
masak | well, there's usually some editing to filing a bug report. | 17:33 | |
17:35
alester left,
benabik joined
17:36
quietfanatic joined
|
|||
diakopter | quietfanatic: howdy | 17:37 | |
17:38
jeffreykegler left
|
|||
quietfanatic | hey diakopter | 17:40 | |
17:42
benabik_ joined
|
|||
dalek | p/toqast: 00c649e | jnthn++ | src/NQP/Actions.pm: Fix bug in v-table method installation. |
17:45 | |
p/toqast: 507d55c | jnthn++ | src/NQPQ/Actions.pm: Port previous fix to NQPQ. |
|||
p/toqast: 93a716f | jnthn++ | src/core/NQPMu.pm: Add some missing methods to NQPMu. |
|||
p/toqast: ce81241 | jnthn++ | src/QAST/Operations.nqp: Add a QAST op for throwing control exceptions. |
|||
p/toqast: 26b5b5b | jnthn++ | src/NQPQ/Actions.pm: Get next/last/redo working again. |
|||
17:46
benabik left,
benabik_ is now known as benabik
|
|||
jnthn | 50 out of 60 tests in t/nqp now passing in nqp/toqast :) | 17:49 | |
17:51
Targen joined
|
|||
quietfanatic | am I the only one who thinks arbitrary radix notation looks way too much like pair notation? | 17:58 | |
PerlJam | "too much"? | 17:59 | |
quietfanatic | :16<abcd> ought to make 16 => 'abcd' | ||
Tene also | |||
17:59
bluescreen10 left
|
|||
masak | quietfanatic: it *is* pair notation. | 18:00 | |
it's just been hijacked for radix conversion. | |||
18:01
bluescreen10 joined
|
|||
quietfanatic | right | 18:01 | |
18:02
jeffreykegler joined
|
|||
PerlJam | quietfanatic: so you think it should look different? | 18:02 | |
quietfanatic | I do think it should look different. | ||
mind you, I don't have any immediate suggestions s to how it should look :) | 18:03 | ||
PerlJam | If there were a more procedural interface, would that assuage your concerns? | 18:04 | |
quietfanatic | probably | ||
TimToady | normal colon pairs can only have identifiers on the left, so the numeric was completely unused | ||
and there's little use case for 16 => 'abcd' | 18:05 | ||
quietfanatic | Arbitrary bases are not something people use enough that they need a syntactic shortcut for it. | ||
TimToady | sez who? :) | ||
PerlJam | quietfanatic: ah, so you think they are incorrectly huffmanized? | ||
quietfanatic | Especially when that syntactic shortcut means they need to do an eval-like thing to parameterize the base | ||
sez me :) | 18:06 | ||
PerlJam: It's more that different things should look different | |||
TimToady | parameterizing the base is something that is used even less, so +":$base\<$str>" is fine | 18:07 | |
there's also something to be said for not inventing additional syntax | 18:10 | ||
PerlJam | All I know is that bases 2, 8, 10, and 16 come up quite a bit in computer programs :) | ||
TimToady | which is why those have special cases | ||
GlitchMr | Perl 6 is already more popular than certain languages at GitHub :). | 18:11 | |
github.com/languages/AppleScript | |||
18:11
SamuraiJack left,
SamuraiJack_ joined
|
|||
quietfanatic | reusing already existing syntax for something entirely unrelated is just as bad in my opinion as inventing new syntax | 18:11 | |
TimToady | using colon notation also gives you the () and [] variants for "free" | ||
GlitchMr | In PHP there is base_convert() function. The name is long, but you rarely want to do it anyways. | 18:12 | |
quietfanatic | Something like that but with a better name would be best, I think. | ||
PerlJam | quietfanatic: we do it all the time with contextual clues to help. Notice how many ways {} can be used. | ||
quietfanatic: :NUMBER seems like a really good contextual clue to me. | 18:13 | ||
TimToady | I have no trouble telling :foo apart from :16 | ||
GlitchMr | I wouldn't have problem with something like base-convert function to do it | ||
quietfanatic | At a close look, you have no trouble, of course | 18:14 | |
PerlJam | GlitchMr: That's kind of where I was going initially. If there were some subroutine to do base conversion (in addition to the current notation), maybe that would help | ||
quietfanatic | suppose you're skimming over code. You'll see what looks like a pair, but you'd have to examine the individul characters to see that it is in fact not a pair | ||
TimToady | you always have to look at individual characters | ||
quietfanatic | But : and < > are immediately distinctive. | 18:15 | |
GlitchMr | I mean, $num.base-convert($base => 10) looks better than +":$base\<$num>" | ||
quietfanatic | whereas 16 and IG are not immediately distinguishable. | ||
TimToady | so are 2 and x | ||
PerlJam | quietfanatic: sounds like you need a better font :) | ||
quietfanatic | .oO(The tyrrany of selective examples) |
18:16 | |
Oh, I can tell them apart if I actually look at them | |||
PerlJam boggles | |||
GlitchMr | If I would see +":$base\<$num>" I would think it's... hacky method of converting bases | 18:17 | |
quietfanatic | My thesis here is that you shouldn't have to read every single character to get a gist of the structure of a piece of code. | ||
And yes, { } used for both hashes and code bothers me that way too. | |||
TimToady | this seems to come down to almost the same argument as "I want to be able to read it without learning the language" | ||
GlitchMr | What's wrong with { } being used for both functions and hashes? | 18:18 | |
TimToady | and I'd submit that someone who doesn't know Perl 6 would immediately figure out what :16<deadbeef> means | ||
quietfanatic | That's because deadbeef is a culturally unambiguous hexadecimal number. | ||
GlitchMr | :16<deadbeef> could be written as 0xdeadbeef | ||
quietfanatic | GlitchMr: You have to use contextual cues to figure out which is which, just like the compiler | 18:19 | |
TimToady | the other thing is that if you're going to be using a weird base, you're likely to use it many times in teh same program, so the learning is amortized | ||
GlitchMr | Well, .map will definitely won't take hash as function :P. | ||
quietfanatic | TimToady: Oh that's a valid point | ||
PerlJam | quietfanatic: "contextual cues" is almost the basis of all things Perl. | ||
[Coke] | "GRAMMAR" | 18:20 | |
benabik | r: say <1 2 3>.map { a => 12 } | ||
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Confusedat /tmp/KGZaxPsRn6:1» | ||
GlitchMr | We have binary, octal, hexadecimal, decimal... what other weird base you would want to use? | ||
TimToady | GlitchMr: I certainly would not be opposed to a named function in place of the hack | ||
benabik | Base64? | ||
PerlJam | GlitchMr: base 64 seems to come up a lot | ||
quietfanatic | The thing is, I skim code almost as much as I carefully read it. Actually, more. | ||
and so I like easily-skimmable code quite a bit. | 18:21 | ||
GlitchMr | :64<1> doesn't work and shouldn't | ||
PerlJam | GlitchMr: base 36 is occasionally useful too | ||
TimToady | nr: say :64[1,1] | ||
p6eval | niecza v19-15-g051783d: OUTPUT«Unhandled exception: :16[...] syntax NYI at /home/p6eval/niecza/lib/CORE.setting line 1414 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3550 (unbase @ 8)  at /tmp/3VeZbgRWB8 line 1 (mainline @ 3)  at /home/p6eval/niecza/lib/CORE.setting … | ||
..rakudo 038a3c: OUTPUT«===SORRY!===Malformed radix numberat /tmp/5s5MwphmF6:1» | |||
benabik | Although there is a difference between Base64 and base 64. :-/ | ||
GlitchMr | I would like to see use for base 36... but I also would like to see use for octal numbers :) | ||
TimToady | octals make sense on a PDP11 :) | 18:22 | |
GlitchMr | Oh, I think I have one use for octals - chmod | ||
PerlJam | GlitchMr: when talking to other weird systems, it helps if you speak their language :) | ||
18:22
fhelmberger joined,
quietfanatic_ joined
|
|||
TimToady | base 4 makes some sense in biology :) | 18:22 | |
GlitchMr | But, I can see base 4 being useful | ||
TimToady said it before me :P | |||
cosimo | so... | 18:23 | |
if I had to propose a redesign of perl6.org, what concepts we want the site/design to convey? | |||
GlitchMr | I like current Perl 6 site :) | ||
PerlJam | base 6 might make lots of sense if you're dealing with molecules that have lots of carbon :) | ||
quietfanatic_ | Non-conformity. | 18:24 | |
18:24
raiph left
|
|||
quietfanatic_ | (cosimo:) | 18:24 | |
GlitchMr | It reminds me WHATWG website for some reason, but it's nice nevertheless | ||
TimToady | friendly to seven-year-olds | ||
fun | |||
PerlJam | cosimo: friendly, fun, capable, serious, powerful, awesome, cool, nice, happy, ... | ||
benabik | Wikipedia says base 15 is useful for telephony routing over IP | 18:25 | |
18:25
quietfanatic left
|
|||
TimToady | btw, the .org doesn't have to do everything; there are plenty of other tlds | 18:25 | |
18:25
jeffreykegler left
|
|||
GlitchMr | Could you modify grammar to add 0p if you need it? | 18:25 | |
TimToady | so the .org should be fun | ||
GlitchMr | p being for pentadecimal | ||
quietfanatic_ | I bet you could | 18:26 | |
benabik | postfix:<p> ? | ||
18:26
mucker left
|
|||
TimToady | GlitchMr: it's possible, but we don't go out of our way to make it easy | 18:26 | |
benabik | -Ofun | ||
And there do seem to be a good number of uses for base 36. | |||
quietfanatic_ | TimToady: I thought the Perl 6 grammar was supposed to be extensible at the drop of a hat | ||
GlitchMr | postfix:<p> wouldn't work when your numbers include characters between A and E | ||
quietfanatic_ | TimToady: Or have we decided to go the Apple route? :) | 18:27 | |
GlitchMr | 0t1201202201 | ||
PerlJam | base 60 has lots of uses too | ||
18:28
fhelmberger left
|
|||
GlitchMr | en.wikipedia.org/wiki/Ternary_computer | 18:28 | |
Tene | ternary would also be useful for malbolge interop | 18:29 | |
TimToady | r: say :60[12,34,56] | ||
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Malformed radix numberat /tmp/WdOzyP90D3:1» | ||
TimToady | nyi I guess | ||
PerlJam | rakudo doesn't grok bases above 36 for some reason | ||
18:29
quietfanatic_ is now known as quietfanatic
|
|||
TimToady | I thought it did | 18:29 | |
benabik | 36 is the highest unambiguous base. 0-9a-z. | 18:30 | |
18:30
jeffreykegler joined
|
|||
TimToady | see S02:3247 | 18:30 | |
GlitchMr | Bases above 36 aren't useful anyways until :X[] notation will be implemented | 18:31 | |
benabik | r: say :10[1,2,3,4] | ||
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Malformed radix numberat /tmp/vSiY9iJBSR:1» | ||
TimToady | b: :60[12,34,56] | ||
p6eval | b 922500: OUTPUT«===SORRY!===Malformed radix number at line 22, near "[12,34,56]"» | ||
TimToady | ng: :60[12,34,56] | 18:32 | |
alpha: :60[12,34,56] | |||
TimToady forgets the names | |||
benabik | p6eval: help | ||
p6eval | benabik: Usage: <(star|pugs|nqp|std|niecza|rakudo|b|toqast|nom|npr|n|r|perl6|prn|rn|p|rnp|nrp|pnr|rpn|t|p6|nr)(?^::\s) $perl6_program> | ||
TimToady | pugs: say :60[12,34,56] | ||
p6eval | pugs: OUTPUT«45296» | ||
PerlJam | pugs++ | ||
TimToady | maybe that's what I'm remembering | ||
benabik | perlcabal's spec appears to be out of date. | ||
GlitchMr | It's always out of date ;) | 18:33 | |
benabik | Well, that's what the irc logs point to, so it would be nice if it wasn't. | 18:34 | |
GlitchMr | Even when you think it isn't, something is out of date. | ||
cosimo | is it possible to run stuff server side for perl6.org, or it's a completely static site? | 18:36 | |
GlitchMr | It's static site | ||
PerlJam | std: say :60[12,34,56] | 18:37 | |
p6eval | std f43a358: OUTPUT«ok 00:00 42m» | ||
diakopter | how does one regex match for graphs that could have negative codepoints? | 18:39 | |
TimToady: ^^ re NFG | 18:40 | ||
18:41
haidarian joined
|
|||
quietfanatic | You can't know the codepoints of precomposed graphemes, can you? | 18:41 | |
diakopter | not under the proposed implementation | ||
[Coke] | r: my $a = "This is a string"; say $a.chars | 18:42 | |
p6eval | rakudo 038a3c: OUTPUT«16» | ||
diakopter | (and not under any implementation I can imagine) | ||
[Coke] | wow. I counted that wrong at least 3 times. ;) | ||
quietfanatic | I'd imagine that in the regex you have to assemble the equivalent grapheme out of its individual codepoints. | ||
18:43
haidarian left
|
|||
diakopter | quietfanatic: yeah, but is there a way to say "this base codepoint, with optionally whatever combining codepoints" | 18:43 | |
quietfanatic | [ :ii $base ], perhaps? | 18:44 | |
diakopter | (or optionally particular combining codepoints) | ||
quietfanatic | well,that's probably more difficult | ||
If you are matching on the grapheme level it's probably difficult to selectively pull the graphemes apart into codepoints when you please. | 18:45 | ||
diakopter | well, I'm just imagining it will be impossible to match against NFG strings that contain negative codepoints (except for . obviously), because the codepoints don't fall into any cclass and can't be matched directly | 18:46 | |
benabik | negative codepoints? | 18:47 | |
quietfanatic | The negative codepoints stand for a sequence of positive codepoints though. | ||
diakopter | are you suggesting the regex engine should decompose them while matching? | ||
quietfanatic | If it has to. | ||
Negative codepoints is just an implementation detail. An optimization. | 18:48 | ||
as far as I understand it, at least. | |||
diakopter | eh; I'm fairly certain TimToady says it's an essential element of NFG | ||
quietfanatic | Well, that's how you'd get a semantically variable-width encoding into an actually fixed-width encoding. | 18:49 | |
18:49
sftp left
|
|||
diakopter | right, but also how to store NFG strings at runtime | 18:49 | |
quietfanatic | right. | ||
diakopter | (all strings) | ||
quietfanatic | Somewhere hidden in the program is a table which maps negative indexes to strings representing one grapheme. | 18:50 | |
Like the symbol table in Lisp dialects. | |||
18:50
sftp joined
|
|||
diakopter | right... | 18:50 | |
jnthn | I would rather expect that the negative codepoints have a bunch of unicode properties calculated for them. | 18:51 | |
18:51
PerlJam left
|
|||
quietfanatic | jnthn: Oh, that's possible too | 18:51 | |
18:51
PerlJam joined
|
|||
diakopter | but what would determine whether they have those properties? | 18:52 | |
quietfanatic | whether the positive codepoints they stand for have those properties | ||
jnthn | Giving it the properties of the base character is probably a good start. | ||
diakopter | whether *all* the codepoints in the graph have the property or just one of them? | ||
ok | |||
quietfanatic | Or is unicode not set up to assign codepoints to composed graphemes? I don't know actually | 18:53 | |
ah | |||
jnthn | The answer may also vary with property. I suspect there must be a sane way to do this. | ||
quietfanatic | Excuse me | ||
to assign *properties* to composed grapheme | |||
s | |||
jnthn guessed that's what was meant | |||
quietfanatic made a wordo | |||
diakopter | I don't think that's a word | 18:54 | |
quietfanatic | It's like a typo | ||
diakopter | it was a joke.. | ||
masak | I don't think that's a joke :P | 18:55 | |
diakopter | :D | ||
TimToady | all NFG codepoints (both negative and precomposed NFC) should have easily accessible NFD for any kind of partial grapheme matching or property | 18:57 | |
so looking up property of the base char should generally not be difficult | 18:58 | ||
diakopter | ok, that answers the question of whether regex matches should match against just the base character | ||
jnthn | Well, in the context of properties anyway, I guess. | 18:59 | |
diakopter | including cclass? | ||
jnthn | yes | ||
Those boil down to unicode props | |||
diakopter | ok | ||
TimToady | we will need to invent ways of doing partial matches that involve marks | 19:01 | |
but I think that will become more obvious once we get NFG in place | |||
diakopter | ah, that was the other question, which I had forgotten I asked | ||
19:02
GlitchMr left
19:03
jeffreykegler left
|
|||
dalek | p/toqast: 476a500 | jnthn++ | src/guts/multi_dispatch.c: Don't look into freed memory. |
19:04 | |
p/toqast: 9341160 | jnthn++ | src/NQPQ/ (3 files): Partially fix multi-method dispatch. |
|||
p/toqast: 4e3159b | jnthn++ | src/QAST/Operations.nqp: Fix code-gen bug. |
|||
TimToady | or course, one can always call out to a method in a grammar, but it's not clear how that helps normal regexes, unless we do it with <:&mymatch(...)> or some such | 19:05 | |
19:09
jeffreykegler joined
19:11
MayDaniel left
|
|||
japhb | r: say +':60[12,34,56]' | 19:25 | |
p6eval | rakudo 038a3c: OUTPUT«45296» | ||
dalek | p/toqast: 9ccb91c | jnthn++ | src/QAST/Operations.nqp: Fix lexotic compilation bug. |
||
p/toqast: 4780b8e | jnthn++ | src/NQPQ/ (2 files): Fix return; this also brings it inline with the mechanism we use to do it in Rakudo. |
|||
japhb | TimToady, Str.Numeric handles :60[,,] format. The main compiler does not. | ||
masak | feels like that should be a single code path :) | 19:26 | |
japhb | masak, Str.Numeric would ideally be implemented by just using that piece of the full grammar. Unfortunately: | ||
A) When I started working on Str.Numeric, I don't think that was actually workable. Dunno if it is now. | 19:27 | ||
B) The general grammar is (was?) way slower than the hand-coded Str.Numeric parser. | |||
Hence, not one code path yet. :-) | |||
Str.Numeric can handle some pretty strange stuff these days. Unfortunately, not Complex numbers yet. I should probably just do that when I continue work on val(). | 19:29 | ||
masak | ++japhb | 19:32 | |
19:35
bluescreen10 left,
bluescreen10 joined
|
|||
[Coke] wonders if nieczue rhymes with "miscue" | 19:47 | ||
19:48
jeffreykegler left
19:49
brrt joined
19:53
[particle] left
19:55
[particle] joined
19:59
jeffreykegler joined
20:01
fhelmberger joined
20:02
fhelmberger left
20:06
birdwindupbird joined
|
|||
sirrobert | proving tests on JSON::Tiny seems to randomly skip/fail tests... | 20:06 | |
just ran "prove -re perl6 t/01-parse.t" three times in a row | 20:07 | ||
twice they all passed, the third time "No subtests run" | 20:08 | ||
sometimes a portion pass and a portion fail | |||
is that a known phenomenon others have encountered? | |||
20:10
fhelmberger joined
|
|||
masak | sirrobert: no, never heard anything like that before. | 20:11 | |
sirrobert | hm | ||
masak | [Coke]: no, it rhymes with "betcha" :) | ||
sorear | sirrobert: is it still random if you disable address space layout randomization? | 20:12 | |
20:12
daxim left
|
|||
sirrobert | tell me how to do that and I'll check =) | 20:12 | |
masak | [Coke]: or, hm, maybe not... :) | ||
sorear | sirrobert: are you on linux? | 20:13 | |
sirrobert | yep | ||
sorear | echo 0 | sudo tee /proc/sys/kernel/randomize_va_space | 20:14 | |
20:16
SamuraiJack_ left
|
|||
sirrobert | sorear: running prove several times now, will tell you in a sec | 20:16 | |
six consecutive runs of prove with no issue. | 20:17 | ||
(previously I got at most 2 in a row) | |||
you want me to report that somewhere? | 20:18 | ||
20:18
fhelmberger left
|
|||
sirrobert | woops, it happened again on the 11th run | 20:18 | |
but that's a lot MORE rare, at least =) | 20:19 | ||
20:20
fgomez joined
20:22
jeffreykegler left
|
|||
sirrobert | my vm is being silly-- rebooting it | 20:24 | |
20:24
sirrobert left
|
|||
benabik | karma silly | 20:26 | |
aloha | silly has karma of 0. | ||
masak | karma everybody | 20:30 | |
aloha | everybody has karma of 1. | ||
20:36
jeffreykegler joined,
kaare_ left
20:37
jeffreykegler left
20:50
francium joined,
francium left
20:58
sirrobert joined
|
|||
sirrobert | back | 20:58 | |
Tene | karma karma | 21:00 | |
aloha | karma has karma of 2. | ||
sirrobert | What does the syntax "Any:U", "Any:D", "Hash:D" etc. mean? | 21:01 | |
masak | sirrobert: definedness of an object. | 21:02 | |
r: sub foo(Int:U) { say "type object" }; sub foo(Int:D) { say "instance" | |||
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 2, near ""» | ||
masak | r: sub foo(Int:U) { say "type object" }; sub foo(Int:D) { say "instance" }; foo Int; foo 42 | ||
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Redeclaration of routine fooat /tmp/0CD1zHN2vD:1» | ||
sirrobert | so if a param is (Hash:D $d) it means "a defined hash" | ||
instead of say, Hash itself | |||
? | |||
masak | r: multi foo(Int:U) { say "type object" }; multi foo(Int:D) { say "instance" }; foo Int; foo 42 | ||
p6eval | rakudo 038a3c: OUTPUT«type objectinstance» | ||
masak | sirrobert: right. | ||
sirrobert | oh, or instead of a "my Hash %foo;" | 21:03 | |
ok, thanks | |||
masak | sirrobert: 'my Hash %foo' is a hash of hash objects. | ||
sirrobert | ohhh right | ||
masak | sirrobert: both the type annotation and the sigil add something there. | ||
sirrobert | righto | ||
are there others besides :U and :D? | |||
masak | I believe so. | 21:04 | |
masak checks | |||
yes. | |||
:_ and :T | |||
sirrobert | where did you look? =) | ||
masak | S12. | 21:05 | |
sirrobert | ok | ||
masak | "Abstract vs Concrete types" | ||
sirrobert | ah | ||
21:05
Chillance left
|
|||
masak | :_ allows anything, it seems. | 21:05 | |
:T allows only type objects, not just any undefined thing. | |||
:U allows undefined things. | |||
21:05
Chillance joined
|
|||
sirrobert | ok, makes sense | 21:06 | |
mostly ;) | |||
21:07
skids left,
birdwindupbird left
|
|||
masak | r: sub foo(Int:U) { say "undefined" }; sub foo(Int:D) { say "defined" }; foo 42; foo 42 but role { method defined { False } } | 21:08 | |
p6eval | rakudo 038a3c: OUTPUT«===SORRY!===Redeclaration of routine fooat /tmp/AT1bT0Rj52:1» | ||
masak | argh. | ||
r: multi foo(Int:U) { say "undefined" }; multi foo(Int:D) { say "defined" }; foo 42; foo 42 but role { method defined { False } } | |||
p6eval | rakudo 038a3c: OUTPUT«defineddefined» | ||
masak | apparently that wasn't undefined enough :) | 21:09 | |
sirrobert | heh | ||
quietfanatic | Rakudo might be cheating. | ||
Tene | r: multi foo(Int:U) { say "undefined" }; multi foo(Int:D) { say "defined" }; foo 42; foo Int | ||
sirrobert | the "but role" applied a "mixin" that returned False for the method "defined" ? | ||
p6eval | rakudo 038a3c: OUTPUT«definedundefined» | ||
Tene | sirrobert: yes | ||
sirrobert | cool | ||
masak | yes :) | 21:10 | |
jnthn | :U is currently taken to mean "type object" | ||
masak | huh. | ||
jnthn | Just after I implemented that lot, the spec got changed. :/ | ||
masak submits rakudobug | 21:11 | ||
sirrobert | is there a way to apply a mixin temporarily? (or to remove it after applying it?) | ||
jnthn | I'm hoping if I ignore the spec change enough it may change back :P | ||
masak | sirrobert: just keep the original object around ;) | ||
jnthn | If you use "but" and keep the original one around... :) | ||
sirrobert | does applying a mixin copy the object? | ||
jnthn | sirrobert: Yes if you use "but". No if you use "does" | 21:12 | |
quietfanatic | 'does' is a | ||
^ that | |||
sirrobert | meowf! that's great | ||
I'd been trying to figure that out for a while (off and on) | |||
everyone++ =) | |||
and now it's grammatically obvious. heh | 21:14 | ||
man that makes a couple of things a lot easier =) | 21:19 | ||
ok, gotta go-- thanks all =) | 21:22 | ||
21:22
sirrobert left
|
|||
masak | karma go | 21:22 | |
aloha | go has karma of 0. | ||
jnthn | using hyphens-- a curious way to play with the karma bot. | 21:24 | |
21:25
atrodo left
|
|||
masak | I took it to mean he was dissatisfied with having to go. | 21:27 | |
21:27
sftp left
21:34
brrt left
21:40
am0c left
|
|||
[Coke] | if :_ allows anything, why do we need to specify it? | 21:42 | |
sorear | because it overrides a 'use parameters :D' pragma in scope | 21:45 | |
21:47
brrt joined
|
|||
[Coke] | hokay | 21:50 | |
22:04
bluescreen10 left
|
|||
japhb | rn: '<1/2>'.Numeric.perl.say; | 22:19 | |
p6eval | rakudo 038a3c: OUTPUT«Failure.new(exception => X::Str::Numeric.new(source => "<1/2>", pos => 0, reason => "base-10 number must begin with valid digits or '.'"))» | ||
..niecza v19-15-g051783d: OUTPUT«Unhandled exception: Cannot parse number: <1/2> at /home/p6eval/niecza/lib/CORE.setting line 1414 (die @ 5)  at /home/p6eval/niecza/lib/CORE.setting line 3492 (ANON @ 11)  at /home/p6eval/niecza/lib/CORE.setting line 3494 (NumSyntax.str2num @ 5)  a… | |||
japhb | TimToady, was it your intent that the above DWIM? Or for .Numeric, does the user need to leave off the < >? | ||
er, Str.Numeric, I mean. | 22:20 | ||
masak | 'night, #perl6 | 22:25 | |
japhb | o/ | 22:26 | |
22:31
adu left
22:33
PacoAir joined
22:37
sftp joined
22:40
PacoAir left
22:43
PacoAir joined
22:46
brrt left
22:52
skids joined
23:06
cognominal_ joined
23:09
cognominal left
23:14
PacoAir left
23:18
Chat3630 joined
|
|||
Chat3630 | Hey:) | 23:18 | |
sorear | Hello Chat3630. | ||
Are you here for Perl 6? | |||
23:18
Chat3630 is now known as Wildthing,
Wildthing left
|
|||
sjn | tadzik: news.ycombinator.com/item?id=4363887 | 23:23 | |
23:32
am0c joined
|
|||
sjohnson | sorear: :) | 23:33 | |
if not, he may get perl6 fever | |||
23:33
gongyiliao joined
23:50
jeffreykegler joined
23:54
fgomez left
|