»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'perl6: say 3;' or rakudo:, niecza:, std:, or /msg p6eval perl6: ... | irclog: irc.perl6.org/ | UTF-8 is our friend! Set by sorear on 4 February 2011. |
|||
00:00
lumi__ joined
00:05
plobsing left
00:07
plobsing joined
|
|||
jnthn | sleep & | 00:09 | |
00:10
lumi__ left
00:11
lumi__ joined
|
|||
sorear is back with some insight into the string problem | 00:11 | ||
00:11
patspam left
|
|||
sorear | I'm now imagining three "string" types, ByteStr, CodeStr, and Str, which are related to each other like Rat is to Num | 00:11 | |
a Str is just graphemes; it doesn't remember the order of its modifiers | 00:12 | ||
ByteStr is a lossless representation of a buf8 that is simultaneously stringish | |||
ByteStr->CodeStr->Str are allowable coercions that reduce precision, like Rat->Num, so $bytestr ~ $str is allowed and returns a Str | |||
"foo" would probably be a ByteStr because there is exactly one way to represent it using non-EBCDIC common encodings | 00:16 | ||
00:16
patspam joined
|
|||
sorear | likewise "上" would be a CodeStr and "á" would be a Str | 00:17 | |
coercions "down" the list, like coercion from Num to Rat, are never done implicitly except for output | 00:18 | ||
arnsholt | What's a CodeStr again? | 00:19 | |
TimToady | what you have right now, basically | ||
arnsholt | Ah, right. A string of character codes | 00:20 | |
sorear | observe the difference- ByteStr is an interpreted sequence of bytes, buf8 is an uninterpreted sequence | 00:21 | |
TimToady | however, I was thinking there were two CodeStr types, named NFC and NFD | ||
just as there's a utf8 ByteStr type (supposedly) | 00:22 | ||
sorear | TimToady: what do I do if I want to losslessly process an uninterpreted sequence of (uint where * <= 0x10FFFE) ? | ||
TimToady | there can certainly be a type that doesn't commit, just as buf8 doesn't commit to utf8 | 00:23 | |
but you'd better know which it is when you need to know :) | 00:24 | ||
sorear | I am thinking that domain-wise, NFD and NFD are the same as Str | ||
they just impose different views | |||
I am now considering how my model of 3 domains maps onto types. | 00:25 | ||
TimToady | NFD and NFC I view as "encodings" of Str at the codepoint level rather than the byte level | ||
sorear | I suspect that the type purely reflects the level of the *view* and can be mixed near-freely with the domain | ||
dalek | ast: dfc142d | (Pawel Pabian)++ | S12-methods/multi.t: [S12-methods/multi.t] test for #67024 rakudo should complain about re-definition of non-multi method |
||
TimToady | well, the early design of Perl 6 had multiple views on the same string, which is why we have StrPos | ||
sorear | hmm | 00:26 | |
TimToady | that's supposed to be the same regardless of your view | ||
but the multi-level approach has been de-emphasized lately | |||
00:27
lumi__ left
|
|||
sorear | If we encode views in types there will be some dispatch issues. NFD $x cannot be used interchangably with a Str | 00:27 | |
00:27
lumi__ joined
|
|||
TimToady | which is why parameters should not be declared Str, but Stringy | 00:28 | |
then Coolness can happen | |||
sorear | If I have Stringy $x declared somewhere, I might expect $x.substr(0,1) to do something consistent | 00:29 | |
not depend on the runtime type of $x | |||
TimToady | indeed, the feeling was that your 1 would be interpreted as the highest allowed abstraction level in scope | 00:32 | |
so grapheme in the absense of use codes or bytes | |||
but there are complexity issues, and I'd like us to at least achieve consistent NFG semantics before we overdesign the whole thing | 00:34 | ||
to me that's more important than round-tripping, which can be faked with lower-level types when needed | 00:35 | ||
00:38
lumi__ left
00:39
lumi__ joined
|
|||
TimToady | as for identity issues, you can't even say for sure in ASCII whether foo and Foo are the same item, unless you know the system. :) | 00:39 | |
sorear | axiom 1: say .chars for dir; should work | 00:40 | |
axiom 2: .unlink for dir; should work | |||
this is what I'm starting from | 00:41 | ||
TimToady | I don't see how your #1 can possible work given POSIX's head-in-the-sand attitude to characters | 00:42 | |
*possibly | |||
some filesystems *do* know whether filenames are in Unicode | 00:43 | ||
00:44
gbacon joined
|
|||
sorear | TimToady: it should at least try to work, which means somehow combining the Buf result with the locale encoding and making chars work on the combination when the Buf is parsable | 00:46 | |
TimToady | and the typical Unixoid answer to #1, look in an env var, is insane | ||
sorear | perhaps it returns a Buf with $!candidate-encoding set and Buf.chars implements DWIM | ||
TimToady | but yes, that's about as good as we can do, when forced to guess | 00:47 | |
sorear | perhaps it tries parsing internally, and returns Str if it can | ||
in the latter case Str needs to remember the byte sequence somehow, to make #2 work when there is a flexible encoding | |||
TimToady | perhaps dir looks for a consisten pattern :) | 00:48 | |
*tent | |||
sorear | I beleive Mac OS X/HFS+ requires NFC UTF8 for all filenames, meaning that every filename can be roundtripped to graphemes | ||
00:48
tokuhirom joined
|
|||
TimToady | I thought Mac tended to bias towards NFD | 00:49 | |
sorear | that was the least certain letter in the message anyway | ||
TimToady | :) | ||
00:49
wolfman2000 joined
|
|||
TimToady tends to bias towards (and beyond) NFC, in case you hadn't noticed :) | 00:50 | ||
00:50
lumi__ left
|
|||
TimToady | but there, comes of studying linguistics from the insides of people's heads, not the outsides... | 00:50 | |
00:50
lumi__ joined
|
|||
TimToady | s/not/not just/ | 00:50 | |
phonetics and phonemics are complementary | |||
00:51
clairvy_ joined
|
|||
TimToady | but I shy away from NFD not so much because it's an "inefficient" encode but because it's forcing the language user into an "etic" view instead of an "emic" view | 00:52 | |
*encoding | |||
and being emic is part of what makes Perl Perl | 00:53 | ||
en.wikipedia.org/wiki/Emic_and_etic | 00:54 | ||
00:54
clairvy left
|
|||
TimToady | anyway, the etic/emic distinction can happen on multiple levels, so codepoints are an emic view of the more etic byte encoding, but a more etic view of the more emic grapheme view; these distinctions also recur as you go up the human language stack from sounds to words to sentences to texts to cultural events | 01:03 | |
so I am not, in principle, against providing multiple views into an item depending on context | 01:04 | ||
but it has to be managed well | 01:05 | ||
and I tend to be prejudiced toward the emic since most other computer languages tend the other way, and force the programmer to think about bits and bytes | |||
or codepoints, these days... | 01:06 | ||
01:08
lumi__ left
01:09
lumi__ joined
01:11
uasi joined,
REPLeffect left
01:25
REPLeffect joined
01:27
Chillance left
|
|||
TimToady | y'all can come out from hiding now | 01:29 | |
01:30
lumi__ left,
lumi__ joined
01:48
uasi left
01:53
uasi joined
01:59
lumi__ left
|
|||
colomon is watching Ashes to Ashes season 2 (and the UofM / Notre Dame football game) | 01:59 | ||
01:59
lumi__ joined
|
|||
cognominal | bodil.github.com/coffeescript/#larry-wall-slide | 02:15 | |
I wonder what is the difference between the emic and the etic take on TimToady moustache :) | 02:17 | ||
02:20
lumi__ left
02:21
lumi__ joined
02:37
static_perl joined
02:39
soh_cah_toa left
02:42
lumi__ left
02:43
lumi__ joined
02:53
risou is now known as risou_awy
02:58
lumi__ left
02:59
lumi__ joined
03:02
abercrombie left
03:03
uasi left
03:12
[Coke] left
03:14
[Coke] joined
03:17
Trashlord left,
lumi__ left
03:18
lumi__ joined,
Trashlord joined
03:19
[Coke] left,
snikkers left
03:20
[Coke] joined
03:25
[Coke] left
03:26
[Coke] joined
03:31
gbacon left,
lumi__ left,
lumi__ joined
03:33
Reaganomicon left
03:46
risou_awy is now known as risou,
lumi__ left
03:47
lumi__ joined
03:53
tokuhirom left
03:58
[Coke] left,
lumi__ left
03:59
lumi__ joined,
[Coke] joined
|
|||
sorear | eh. ultimately I'm still worried by what "failure to roundtrip" will cause | 04:04 | |
maybe I'm overthinking this... | |||
04:09
lumi__ left
04:10
lumi__ joined
|
|||
sorear | now, I need to truly understand rope balancing | 04:18 | |
04:23
HarryS left,
lumi__ left,
lumi__ joined
04:24
[Coke] left
04:25
replore_ left
04:26
[Coke] joined
04:29
HarryS joined
04:39
kaare_ joined
|
|||
snarkyboojum | sorear: getting into some slacklining eh? :D | 04:39 | |
04:44
lumi__ left
04:45
lumi__ joined
|
|||
sorear | snarkyboojum: nah, just studying a data structure with woefully inadequate literature | 04:45 | |
05:03
lumi__ left
05:04
frhodes joined,
lumi__ joined,
molaf joined
05:07
REPLeffect left
05:09
packetknife joined
05:11
lumi__ left
05:12
lumi__ joined
05:13
frhodes left
05:16
cognominal left
05:18
cognominal joined
05:20
REPLeffect joined
05:21
lumi__ left
05:22
lumi__ joined,
patspam left
|
|||
sorear | looks like nobody else really understands ropes, either | 05:23 | |
did a survey of implementations linked from the Wikipedia page | |||
the C++, Java, and OCaml implementations all appear to use essentially the same algorithms as described in the ropes paper | 05:24 | ||
as opposed to the Haskell people, who use finger trees instead | |||
05:35
lumi__ left
05:36
lumi__ joined
05:43
frhodes joined,
frhodes left,
frhodes joined
|
|||
snarkyboojum | by ropes paper, are you referring to Ropes: an Alternative to Strings, by boehm, atkinson and plass? | 05:44 | |
05:46
replore joined
05:49
lumi__ left
|
|||
sorear | snarkyboojum: yes | 05:49 | |
everyone cargo culted their code | |||
despite some rather obvious pathological cases | |||
05:50
lumi__ joined
05:52
jevin left
|
|||
sorear thinks the STL source code is terrible | 05:55 | ||
05:56
jevin joined
|
|||
snarkyboojum | "It is not clear whether the implementation we suggested above is in any sense optimal." I enjoyed that. | 05:58 | |
along with "The machine had enough memory (64 MB) that paging was not an issue." | |||
:) | |||
sorear rereads the old Okasaki papers to try and understand them | 06:00 | ||
snarkyboojum | "Purely Functional Data Structures" ? | 06:02 | |
sorear | yes | ||
okasaki has done some insane things with amortized time bounds | |||
snarkyboojum | sounds juicy | ||
sorear | like mathematically modelling the state introduced by closure caching | ||
06:03
lumi__ left
|
|||
sorear | I mean thunk memoization | 06:03 | |
06:03
lumi__ joined
|
|||
sorear | like how after my @arr := map *.rand, ^100; rand will never be called more than 100 times because the reads keep state | 06:03 | |
I understood the correctness of finger trees years ago but never understood the amortized time proofs before ... hoping this time it'll sink in | 06:04 | ||
06:05
orafu left,
orafu joined
|
|||
snarkyboojum | ah, this is his PhD thesis - definitely juicy :) | 06:06 | |
06:13
REPLeffect left
06:18
lumi__ left
06:19
lumi__ joined,
packetknife left
06:27
REPLeffect joined
06:33
lumi__ left,
lumi__ joined
06:35
xinming_ is now known as xinming
06:41
Chat6118 joined,
Chat6118 left
06:46
lumi__ left
06:47
lumi__ joined
|
|||
sorear | I think I get the worst-case O(1) lazy persistant queues now. Ow. | 06:57 | |
snarkyboojum | snoc is probably my new favourite word | 07:01 | |
07:03
lumi__ left,
lumi__ joined
07:07
frhodes left,
frhodes joined
07:17
frhodes left
07:20
lumi__ left
07:21
lumi__ joined
07:22
frhodes joined
07:27
packetknife joined
07:29
packetknife left,
_twitch joined
07:30
betterworld left
07:31
_twitch left,
_twitch joined
07:32
lumi__ left,
lumi__ joined
07:33
_twitch left
07:36
betterworld joined
07:50
packetknife joined
07:54
sayu joined
07:56
lumi__ left,
lumi__ joined
08:01
packetknife left
|
|||
sorear out | 08:03 | ||
08:04
replore left
|
|||
cotto | snoc? | 08:05 | |
08:06
lumi__ left
08:07
lumi__ joined
|
|||
szabgab | meta question: how can I leave a message to masak? | 08:10 | |
cotto | aloha msg szabgab like this | ||
or not | |||
aloha, aloha? | |||
jlaire | msg jlaire ping | 08:11 | |
szabgab | @msg masak may I recommend you link between your related blog entries? (eg. from part 3 to part 1 and from part 1 to the other 2 parts) | ||
not even that :) | |||
tadzik | phenny: tell szabgab foobar | ||
phenny | tadzik: I'll pass that on when szabgab is around. | ||
tadzik | now say something | ||
szabgab | phenny: tell masak may I recommend you link between your related blog entries? (eg. from part 3 to part 1 and from part 1 to the other 2 parts) | 08:12 | |
phenny | szabgab: I'll pass that on when masak is around. | ||
szabgab: 08:11Z <tadzik> tell szabgab foobar | |||
szabgab | thanks tadzik , now if you could recommend a way to actually remember this :) | ||
tadzik | hmm | ||
cotto | phenny, help | 08:13 | |
phenny | cotto: Hi, I'm a bot. Say ".commands" to me in private for a list of my commands, or see inamidst.com/phenny/ for more general details. My owner is sbp. | ||
szabgab | that's a good second step | ||
jlaire | my favourite format is botname: recipient: message goes here | ||
i.e., just prepend 'botname: ' | |||
szabgab | first I need to remember the bot is called phenny :) | ||
but thanks anyway | 08:14 | ||
snarkyboojum | cotto: opposite of cons | 08:16 | |
cotto | snarkyboojum, cute | 08:17 | |
snarkyboojum | cotto: exactly my reaction, too :) | ||
08:17
lumi__ left
08:18
lumi__ joined
|
|||
snarkyboojum | actually, that's not strictly true - it's the reverse of cons.. sloppy engrish here :) | 08:19 | |
08:23
mj41 joined,
im2ee joined
|
|||
ranguard | hi, where should would be Perl 6 developers be pointed to dev.perl.org/perl6/ or www.perl6.org ? | 08:24 | |
im2ee | Hello! :) | ||
tadzik | ranguard: the latter | 08:25 | |
hello im2ee | |||
ranguard | tadzik: cheers | 08:29 | |
ranguard updates the perlfaq | |||
08:30
lumi__ left
08:31
lumi__ joined
08:40
donri joined
08:45
lumi__ left
08:46
lumi__ joined
08:52
MayDaniel joined
|
|||
moritz | ranguard++ # Perl 6 perlfaq updates | 08:52 | |
08:53
Sarten-X left
08:57
lumi__ left
08:58
lumi__ joined
08:59
MayDaniel left
09:04
risou is now known as risou_awy
09:12
lumi__ left
09:13
lumi__ joined
09:16
Sarten-X joined
09:19
sayu left
09:24
lumi__ left
09:25
lumi__ joined
09:32
masak joined
|
|||
masak | goedemorgen, #perl6 | 09:32 | |
phenny | masak: 08:12Z <szabgab> tell masak may I recommend you link between your related blog entries? (eg. from part 3 to part 1 and from part 1 to the other 2 parts) | ||
masak | a fine idea! | ||
masak does so | 09:33 | ||
09:37
lumi__ left
09:38
MayDaniel joined,
lumi__ joined
|
|||
mberends | goedemasak | 09:39 | |
bbkr | nom: grammar A { token a { a } }; A.a() # is this correct behavior? | 09:40 | |
p6eval | nom 00a115: OUTPUT«Cannot access attributes in a type object in !cursor_start at src/stage2/QRegex.nqp:519 in regex a at /tmp/I1ZgS1gn3v:1 in <anon> at /tmp/I1ZgS1gn3v:1 in <anon> at /tmp/I1ZgS1gn3v:1» | ||
tadzik | nom: clas A { method a { /a/ } }; A.a() | 09:41 | |
p6eval | nom 00a115: OUTPUT«Useless declaration of a has-scoped method in mainlineUse of uninitialized value in string contextUse of uninitialized value in string context===SORRY!===error:imcc:syntax error, unexpected '\n' in file '(file unknown)' line 27889775» | ||
tadzik | nom: class A { method a { /a/ } }; A.a() | ||
p6eval | nom 00a115: OUTPUT«Use of uninitialized value in string contextUse of uninitialized value in string context===SORRY!===error:imcc:syntax error, unexpected '\n' in file '(file unknown)' line 670» | ||
tadzik | eek | ||
mberends tries to write a Niecza GUI calculator from memory of ye olden days | 09:42 | ||
bbkr | A::a should be accessible, no doubt for that. but should A.a ? | ||
snarkyboojum | does the rakudo target run nom now? | 09:45 | |
tadzik | nom: class Foo { method bar { say "foo" } }; Foo.bar | 09:46 | |
p6eval | nom 00a115: OUTPUT«foo» | ||
09:46
f00li5h left
|
|||
snarkyboojum | apparently yes :) | 09:47 | |
tadzik | snarkyboojum: yes | 09:48 | |
snarkyboojum | tadzik: just saw your last commit :) | 09:49 | |
09:50
lumi__ left
|
|||
snarkyboojum | where can I find documentation on the main differences between nom and old master? has anyone blogged or documented it somewhere? | 09:50 | |
09:51
lumi__ joined
|
|||
snarkyboojum | other than myriad blog posts etc | 09:51 | |
would be a great candidate for rakudo.org - listing main changes/improvements etc | 09:52 | ||
I guess people have been too busy building an awesome nom/rakudo :) | |||
09:54
MayDaniel left
09:55
risou_awy is now known as risou
|
|||
masak | snarkyboojum! \o/ | 09:57 | |
09:57
Frida joined
|
|||
snarkyboojum | masak! -o_ \o- \o/ | 09:57 | |
lol | |||
masak: how's things? been a while! solved time travel yet? | 09:58 | ||
Frida | hej bror.. | ||
masak | Frida: klicka på fliken "masak" längst upp. :) | 09:59 | |
snarkyboojum: time travel remains an open problem for now... :) | |||
tadzik | snarkyboojum: it would probably be a big announcement once we get a nom-based release | 10:00 | |
10:00
risou is now known as risou_awy
|
|||
snarkyboojum | masak: but not intractable.. surely! :) | 10:00 | |
tadzik: makes good sense to me | |||
masak | snarkyboojum: surely not. just a bit of work. | ||
10:00
lumi__ left
10:01
risou_awy is now known as risou,
lumi__ joined
10:05
packetknife joined
10:06
packetknife left
|
|||
snarkyboojum | are there benchmarks pitting implementation against implementation? | 10:06 | |
I guess the test suite... | 10:07 | ||
10:08
packetknife joined
10:10
lumi__ left,
lumi__ joined
|
|||
snarkyboojum | wash. Niecza build fails on OS X using Mono 2.8.2 | 10:12 | |
waah even :) | |||
core dump | |||
10:12
Chillance joined
10:13
Trashlord left
|
|||
dalek | ast: a8847f2 | (Pawel Pabian)++ | S12-construction/new.t: [t/S12-construction/new.t] test for #68756: [BUG] defining extra .new methods with multi in an object results in loss of original .new |
10:13 | |
10:14
Trashlord joined,
mj41 left
|
|||
bbkr | what happened to Multi type in nom? NYI or removed from spec? | 10:19 | |
snarkyboojum | doesn't coredump with RUN_CLR=mono-sgen, but doesn't build either, just sits there doing nothing :| | ||
10:24
lumi__ left
10:25
lumi__ joined
|
|||
snarkyboojum | phenny: tell sorear having fun trying to build Niecza on OS X -> gist.github.com/1209432 | 10:25 | |
phenny | snarkyboojum: I'll pass that on when sorear is around. | ||
snarkyboojum | phenny: tell sorear using RUN_CLR=mono coredumps | 10:26 | |
phenny | snarkyboojum: I'll pass that on when sorear is around. | ||
10:28
risou is now known as risou_awy
10:31
packetknife left
10:38
masak left
10:42
Trashlord left
10:43
lumi__ left,
lumi__ joined
|
|||
jnthn | bbkr: Multi type makes no sense under current spec. | 10:44 | |
10:49
JimmyZ joined
10:54
masak joined
10:55
whiteknight joined
|
|||
bbkr | jnthn: so this can be closed: rt.perl.org/rt3/Ticket/Display.html?id=68774 ? | 10:58 | |
10:59
lumi__ left
|
|||
masak | bbkr: yes. | 10:59 | |
bbkr | thanks | 11:00 | |
11:00
lumi__ joined
|
|||
jnthn | +1 | 11:08 | |
11:12
lumi__ left
11:14
lumi__ joined
|
|||
masak | Frida: observe :) | 11:17 | |
rakudo: say "OH HAI Frida!" | |||
p6eval | rakudo 00a115: OUTPUT«OH HAI Frida!» | ||
Frida | hello.. | ||
masak | rakudo: say pi - 2; say 4 - pi | ||
p6eval | rakudo 00a115: OUTPUT«1.141592650.85840735» | ||
masak | rakudo: say sqrt 3 | 11:18 | |
p6eval | rakudo 00a115: OUTPUT«1.73205080756888» | ||
masak | rakudo: say 1 / 7 / 7; say 1 / 49 | ||
p6eval | rakudo 00a115: OUTPUT«0.02040816326530610.0204081632653061» | ||
masak | :) | ||
masak has been solving math problems with his kid sister Frida for the past hour or so... | |||
and now it's time to demo Perl 6 ;) | |||
Frida | yes... i've learnd that now :) long time i studied math.. but my brother is a great helper... | 11:19 | |
masak | \o/ | ||
masak blushes | |||
Frida | :) | ||
masak | rakudo: my $x = 1 / 49; say 7 * $x == 1 / 7 | ||
p6eval | rakudo 00a115: OUTPUT«Bool::True» | ||
masak | Frida: so, you see, 'say' prints stuff. | 11:20 | |
and then all math just works. | |||
rakudo: say sqrt(3); say 3 ** 0.5 | |||
p6eval | rakudo 00a115: OUTPUT«1.732050807568881.73205080756888» | ||
masak | rakudo: say sqrt(3) == 3 ** 0.5 | ||
p6eval | rakudo 00a115: OUTPUT«Bool::True» | ||
Frida | :) | 11:21 | |
11:21
risou_awy is now known as risou
|
|||
masak | rakudo: say <good fast cheap>.pick(2) | 11:22 | |
p6eval | rakudo 00a115: OUTPUT«good cheap» | ||
masak | that's us alright... :) | ||
(old joke, I know) | |||
Frida: also, we have object orientation. | 11:23 | ||
Frida | yes i see that.. to the right ?? | 11:24 | |
masak | hold on. | ||
rakudo: class Brother { has $.color; method compliment { $!color = 'red' } }; my $brother = Brother.new(:color<pale>); say $brother.color; $brother.compliment; say $brother.color | |||
p6eval | rakudo 00a115: OUTPUT«palered» | ||
masak | ;) | ||
maybe that was too complicated an example... | |||
rakudo: my $r = 1 / 7; say $r.WHAT | 11:25 | ||
p6eval | rakudo 00a115: OUTPUT«Rat()» | ||
masak | rakudo: my $r = 1 / 7; say $r.denominator | 11:26 | |
p6eval | rakudo 00a115: OUTPUT«7» | ||
masak | rakudo: my $r = 1 / 7; say ($r * $r).denominator | ||
p6eval | rakudo 00a115: OUTPUT«49» | ||
masak | rakudo: my $r = 1 / 7; say ($r * $r).nude.perl | ||
p6eval | rakudo 00a115: OUTPUT«(1, 49)» | ||
Frida | i'm not following at all.. am i supose to do that? | ||
masak | kinda ;) | ||
but I can explain. | |||
this last bit. | |||
Frida | tnx | ||
masak | when I go '1 / 7', I get an object called a Rat. | 11:27 | |
that's short for 'rational number'. | |||
Frida | i dont know if you are talking about youre work here or math.. | ||
masak | a bit of both ;) | ||
Frida | oki | ||
masak | ok, so a Rat. | ||
that's a number like x/y | |||
it has a numerator (x) and a denominator (y). | 11:28 | ||
Frida | mhmm. | ||
masak | and you can ask for them separately. | ||
11:28
lumi__ left
|
|||
masak | rakudo: say 1/3 + 1/4 | 11:28 | |
p6eval | rakudo 00a115: OUTPUT«0.583333333333333» | ||
masak | rakudo: say (1/3 + 1/4).perl | ||
p6eval | rakudo 00a115: OUTPUT«7/12» | ||
jnthn | rakudo: say (1/3 + 1/4).nude | 11:29 | |
p6eval | rakudo 00a115: OUTPUT«7 12» | ||
masak | Perl 6 is a bit special because it actually counts using Rats. | ||
most other languages count using floating point, which are just a bunch of decimals. | |||
and so precision often gets lost. | |||
11:29
lumi__ joined
|
|||
masak | this is actually a big problem! | 11:29 | |
think of people building bank systems and stuff, and precision gets lost. | |||
not enough people know about the "dangers" of floating point. | 11:30 | ||
Frida | ahh, so you are trying to show me how you buildt your language? and you buidt it using regular math? | ||
masak | yes! | ||
Perl 6 thinks more like people think. | |||
Frida | yay!! that's soo cool.. | ||
masak | you know how on your calculator you can do 1 / 9 * 9 | ||
and you get back .9999999 | |||
that can't happen in Perl 6. because precision is never lost in that way. | 11:31 | ||
Frida | okej.. | ||
masak | :) | ||
Frida | but what is perl buildt to do? | ||
masak | just solve people's problems in general. | ||
Frida | problems with what? | 11:32 | |
masak | it's "general-purpose" so it can really do anything. | ||
but it has a number of strengths, of course. | |||
Frida | and those are? | ||
masak | Frida: anything, basically. building a web site. making a budget. chatting with friends. | ||
anything a computer does. | |||
oh, the strengths? | 11:33 | ||
dalek | ast: c48ba58 | (Pawel Pabian)++ | S12-methods/multi.t: [t/S12-methods/multi.t] test for #68996: [BUG] $.foo attribute generates non-multi methods |
||
masak | Perl 6 is good at understanding text. | ||
jnthn | bbkr: That test doesn't pass for the reason you think it does. Also, I'm not sure I agree with the ticket. | 11:34 | |
Frida | okej.. | ||
masak | rakudo: "Frida does math" ~~ /$<subject>=[\w*] \s+ $<verb>=[\w*] \s+ $object=[\w*]/; say $<object> | ||
p6eval | rakudo 00a115: OUTPUT«===SORRY!===Method 'rxtype' not found for invocant of class 'PAST;Regex'» | ||
jnthn | bbkr: It passes because if there's already a method in the class with the appropriate name, the automatic accessor method is not generated. | ||
masak | dang :) | ||
b: "Frida does math" ~~ /$<subject>=[\w*] \s+ $<verb>=[\w*] \s+ $object=[\w*]/; say $<object> | |||
p6eval | b 1b7dd1: OUTPUT«===SORRY!===Confused at line 22, near "\"Frida doe"» | ||
jnthn | masak: $<object>=... | ||
masak | b: "Frida does math" ~~ /$<subject>=[\w*] \s+ $<verb>=[\w*] \s+ $<object>=[\w*]/; say $<object> | ||
p6eval | b 1b7dd1: OUTPUT«math» | 11:35 | |
masak | \o/ | ||
Frida: you see, it could pick out the object of that sentence. | |||
slightly silly example, I know. but it can do a lot of that, and it helps when parsing text. | |||
Frida | i see.. | ||
tadzik | it may look hard to get right :) | ||
Frida | den tolkat alltså? | ||
masak | japp. | ||
11:35
gbacon joined
|
|||
masak | Frida: oh, I'll show you a cool one. | 11:36 | |
Frida | do it.. | ||
masak | Frida: you know how there's all these operators: + - * / and so on. | ||
Frida | yes | ||
masak | but sometimes you'd want a new one, that isn't defined yet. | ||
like, say I want ! | |||
and I want N! to mean 1 * 2 * 3 * ... * N | 11:37 | ||
bbkr | jnthn: so if skipping accessor when method is present is desired behavior maybe I should add another line with dies_ok { $a.foo } to prove it? | ||
masak | rakudo: sub postfix:<!>($N) { [*] 1..$N }; say 5! | ||
p6eval | rakudo 00a115: OUTPUT«===SORRY!===Confused at line 1, near "say 5!"» | ||
masak | rakudo: our sub postfix:<!>($N) { [*] 1..$N }; say 5! | ||
p6eval | rakudo 00a115: OUTPUT«===SORRY!===Confused at line 1, near "say 5!"» | ||
masak | huh. | ||
b: our sub postfix:<!>($N) { [*] 1..$N }; say 5! | |||
p6eval | b 1b7dd1: OUTPUT«120» | ||
masak | \o/ | ||
b: say 5! | 11:38 | ||
bbkr | jnthn: I mean to proove that no multi method is generated from attribute | ||
p6eval | b 1b7dd1: OUTPUT«===SORRY!===Confused at line 22, near "say 5!"» | ||
masak | Frida: so, you see, I've actually changed the language to have '!' | ||
11:38
Patterner left
|
|||
masak | Frida: and I can add any operators I want. | 11:39 | |
Frida | eand just change the language? | ||
masak | aye. | ||
Frida | nice! | ||
11:40
Psyche^ joined,
Psyche^ is now known as Patterner
|
|||
jnthn | bbkr: Well, but the answer isn't that no multi method is generated. It's more that no method at all is generated. | 11:40 | |
bbkr: e.g. you could drop "multi" and get the same effect | |||
Frida | you can change it any way you like.. | 11:41 | |
11:41
lumi__ left
|
|||
masak | also, this is pretty nice: | 11:41 | |
rakudo: my $a = 3; if $a == 1 | 3 | 5 { say "it's one or three or five" } | |||
p6eval | rakudo 00a115: OUTPUT«it's one or three or five» | ||
bbkr | jnthn: correcting it now. thanks for pointing this out. | ||
masak | in other languages, you'd have to say 'if $a == 1 || $a == 3 || $a == 5'... | 11:42 | |
11:42
lumi__ joined
|
|||
masak | rakudo: my $a = 3; if $a == any(1, 3, 5) { say "it's one or three or five" } | 11:42 | |
p6eval | rakudo 00a115: OUTPUT«it's one or three or five» | ||
masak | rakudo: say (1..6).roll | 11:44 | |
p6eval | rakudo 00a115: OUTPUT«4» | ||
11:44
Trashlord joined
|
|||
masak | Frida: I wrote a bunch of games this summer, to teach people Perl 6. here's one of them: strangelyconsistent.org/blog/june-5...s-a-number | 11:44 | |
jnthn | bbkr: thanks :) | 11:45 | |
Frida | i'm not sure if i understand how to play? | 11:46 | |
masak | unfortunately, that's not possible on the site itself. | 11:47 | |
(though that's an *awesome( idea; thank you) :) | |||
masak wonders how hard it'd be to craft a Niecza backend that could translate all of his June games to JavaScript | 11:48 | ||
maybe minus the adventure game. | |||
tadzik | masak: try perlito maybe? | ||
I think it has a javascript backend | |||
masak | tadzik: yes! nice! | 11:49 | |
Frida: no, I mostly wanted you to look at the source code. that's how a small game looks. | |||
Frida: I also wrote a moon lander, a cookie-eating game, hangman, connect-4, and a biggish adventure game. | |||
srsly, being able to play the games right in the blog posts would be a really nice feature. | 11:50 | ||
Frida++ | |||
:) | |||
Frida | i remember when we buildt games when we were kids.. and those were so much bigger. | 11:51 | |
masak | yeah. | ||
though the adventure game got pretty big. | |||
Frida | i'm sry if my english is worseless.. | ||
masak hugs Frida | 11:52 | ||
it's not worseless :P | |||
Frida: anyway, it was cool to have you stop by and listen to me ramble about my hobby ;) | 11:53 | ||
Frida | have i told you that i'm maybe studying thins spring instead of working? | ||
masak | yes! great news! | ||
Frida | yes.. i lika it.. | ||
dalek | ast: 9300933 | (Pawel Pabian)++ | S12-methods/multi.t: [t/S12-methods/multi.t] test for #68996, corrected reason why test passes |
11:54 | |
masak | Frida: best of luck with Högskoleprovet | ||
Frida | but i am very in to bio medicin.. | ||
masak | you are? that's, like, my field! | ||
siblings are s'posed to diversify! :P | |||
Frida | i'm probobly not gonna do it.. i just thoutg it would be fun to study some math.. ^^ | ||
JimmyZ | 晚上好,#perl6 | ||
masak | JimmyZ: 你好! | 11:55 | |
tadzik | is that "ni hao"? | ||
masak | Frida: it's always fun to study some math. ^^ | ||
JimmyZ | masak: 下午好,麦高 | ||
masak | tadzik: 是 :) | ||
tadzik | that'd be "yes" I suppose | ||
masak | tadzik: 是 :P | ||
tadzik | oh, now it can mean "no" as well :) | 11:56 | |
masak | tadzik: 是! | ||
guess that disambiguated it. | |||
tadzik | phenny: "是"? | ||
phenny | tadzik: "Be" (zh-CN to en, translate.google.com) | ||
jnthn | tadzik: iiuc, there's no "yes"/"no" words in Mandarin. | ||
masak | correct. | ||
tadzik | Be | ||
jnthn | You can just use verbs and maybe negate them | ||
"is!" | |||
"not is!" | 11:57 | ||
masak | "to be", or "is". | ||
jnthn | er...is not :) | ||
tadzik | oh, ok | ||
masak | jnthn: or just "not". | ||
tadzik | masak: are you a human? | ||
masak | tadzik: 不是 | ||
tadzik | damnit | ||
masak | ;) | ||
jnthn | o.O | ||
masak floats | |||
tadzik | basing on the meaning of the latter, that could mean "wannaBe" | ||
masak | wannabe human... | 11:58 | |
JimmyZ | or woman | ||
masak | woman is 女人 | ||
Frida | carl: did you listen to the songs? | ||
masak | Frida: oh! I forgot. will do so now. | 11:59 | |
Frida | do it.. | ||
12:00
lumi__ left
|
|||
masak listens | 12:00 | ||
12:00
donri left
|
|||
masak | Frida: I'm sorry, that sounds completely bland to me... :/ | 12:00 | |
12:00
donri joined,
lumi__ joined
|
|||
Frida | okej.. | 12:01 | |
masak | I think we'll have to realize that we have almost completely non-overlapping tastes in music. | ||
;) | |||
tadzik | richard cheese is usually a common language :P | ||
Frida | yes i know.. | ||
masak | Frida: have you listened to Justin Bieber 800%? | ||
Frida: also, Richard Cheese is a good choice. tadzik++ | |||
Frida | nope? is that on spotify? | 12:02 | |
tadzik | I hope Frida is not young enough to be negatively impacted by Richard :) | ||
masak | Frida: I'll try to find it. | 12:03 | |
tadzik: I think you're about the same age, actually. | |||
tadzik | having an 18 year older sister I have a flawed view of "younger sibling" | ||
oh, ok | |||
masak | Frida: soundcloud.com/vorophobe/justin-bie...d-down-800 | 12:04 | |
Frida: and Richard Cheese is aplenty on Spotify. | |||
Frida | haha.. my brother has always taken good care of my.. our sister were worse.. she forced me to do things so that i wouldn't blabber to our parents.. pretty smart acctually.. | ||
*of me | 12:05 | ||
haha | |||
masak | this is news to me :P | 12:06 | |
Frida | really?? | 12:07 | |
bbkr | Can OpenSolaris tickets #69466, #69464 and #69480 be closed if OpenSolaris system has been discontinued on 2010-08-13? I doubt that someone wants to install abandoned OS to check if those bugs are fixed. | ||
tadzik | I remember asking that question some time ago :) | 12:08 | |
masak | bbkr: if you ask me, then yes. | ||
bbkr: but it might be one of those where pmichaud has a say. | |||
Frida | but she would never do any thing verry bad of her self so probably it was'nt to bad for me either.. but the differens in what you do of "bad things" when you are 12 och 17 years old is pretty big.. | 12:09 | |
masak | Frida: I'm kinda on the verge of asking you to stay on topic now... :P | 12:10 | |
Frida | huh? | ||
bbkr | masak: I agree, those are zombie tickets. but I'll wait for pmichaud opinion. | ||
masak | Frida: you might be a one-time visitor here, but I'm not. :) | ||
Frida | oekj.. | ||
sry | |||
masak | np | 12:11 | |
hugme: hug Frida | |||
hugme hugs Frida | |||
masak | (yes, we have a bot for giving out hugs) | ||
Frida | haha lovely.. | ||
tadzik | troll.me/images/forever-alone/-forever-alone.jpg :) | ||
masak | Frida: I think you would make a great Perl 6 coder. | ||
tadzik: I don't get it. | 12:12 | ||
bbkr | hugme: hug bugs | ||
hugme hugs bugs | |||
masak | hugme: hug Pugs | ||
hugme hugs Pugs | |||
tadzik | masak: that's a reddit meme | ||
Frida | i'm not so sure about that. | ||
masak | tadzik: "forever alone"? | ||
tadzik | yep | ||
that's what this face is called | |||
masak | hadn't heard about it. | ||
Frida: Perl 6 is on the rise. you could ride the wave! :) | 12:13 | ||
12:13
lumi__ left
|
|||
jnthn | masak: knowyourmeme.com/memes/forever-alone knows, of course... ;) | 12:13 | |
12:14
lumi__ joined
|
|||
tadzik | hugme: hugme | 12:15 | |
hugme | tadzik: | ||
jnthn | A...cruel prank. | ||
masak | oh course! | ||
tadzik | eek | ||
hugme: hug me | |||
hugme hugs tadzik | |||
tadzik | there we go :) | ||
it's like Like'ing your own posts on diaspora :P | |||
jnthn | tadzik: I try and fix the Pes bug today...want to get the roles stuff cleared up first, though. | 12:17 | |
tadzik | cute | ||
12:18
Trashlord left
|
|||
masak | jnthn: Pies! :P | 12:20 | |
(or is the bug a missing 'i'?) | |||
jnthn | masak: :P | 12:21 | |
masak: No, I was just spelling it correctly ;) | |||
masak | damn haughty Slovak snobbery. | ||
obviously the "correct" spelling would be Пес :P | 12:22 | ||
tadzik | oh, for the love of Dog... | 12:23 | |
masak | 狗狗 | ||
jnthn | masak: Apart from it'd be собака :P | ||
masak | jnthn: yeah, well. apart from that. | ||
jnthn | Oh, apparently пес works also... | 12:24 | |
masak | huh! | ||
JimmyZ | 藏獒 | ||
tadzik | sobaka? | ||
Frida | iäm leaving.. | ||
masak | Frida: o/ | ||
Frida: really nice to have you stop by! | |||
tadzik | Frida: see you soon :) | 12:25 | |
Frida | nice to see how you work.. | ||
we'll do.. | |||
masak | Frida: yeah, you come back soon! | ||
"work"... :P | |||
tadzik | yeah... | ||
Frida | haha.. | ||
12:25
Frida left
|
|||
masak relaxes a bit :) | 12:26 | ||
tadzik | (: | ||
so, is she cute? :P | |||
masak | hey! | ||
jnthn | *lol* | ||
tadzik | easy, just kidding :) | 12:27 | |
masak | well, I guess I could do worse for a brother-in-law... | ||
tadzik | hey! | ||
masak | :P | ||
12:28
[Coke] left,
MayDaniel joined
12:29
[Coke] joined
12:30
lumi__ left
12:31
lumi__ joined
|
|||
bbkr | masak: rt.perl.org/rt3/Ticket/Display.html?id=69518 - is this expected behavior? | 12:34 | |
jnthn | bbkr: Looks right to me, fwiw. | 12:35 | |
Could awesomize the error a little. | 12:36 | ||
(to include the name of the type) | |||
But that aside, it's refusing to instantiate a subtype. | |||
masak | aye. | 12:37 | |
bbkr | should I write test and close or rename to "LTA error message" issue | ||
jnthn | bbkr: Write a couple of tests. One that it works, another that the error contains the type name. | ||
masak | I say the ticket as it stands is closable (after tests) | ||
12:37
im2ee left
|
|||
masak | I'm not a fan of changing the identity of tickets mid-course. | 12:37 | |
jnthn | Aye | ||
But it'd be good to remember there's a task to do | 12:38 | ||
masak | aye. | ||
I'm all for leaving some trace of the LTA thing. | |||
jnthn | Though, if anybody knows a little little C they can diddle src/6model/reprs/uninstantiable.c's instance_of | ||
12:38
im2ee joined
|
|||
masak | also, bbkr++ for triaging tickets. | 12:38 | |
bbkr | page 4 of 18 :) | 12:39 | |
dalek | kudo/nom: a3d7c53 | jonathan++ | src/Perl6/ (2 files): Refactor to ensure we'll be able to tell which parametric role was picked once we get there from a multi-dispatch. |
12:42 | |
kudo/nom: 3c62969 | jonathan++ | src/Perl6/Metamodel/ParametricRoleGroupHOW.pm: Get ParametricRoleGroupHOW's specialize method in shape. |
|||
12:44
lumi__ left
12:45
lumi__ joined
12:51
wamba joined
13:03
gbacon left
13:12
Reaganomicon joined
|
|||
JimmyZ | looks like src/utils is very old in rakudo :) | 13:12 | |
jnthn | oh my :) | 13:13 | |
tadzik++ may have something to say about the way forward for what's in there :) | |||
JimmyZ | that's 2008, I never realized there was a src/utils dir, hehe | 13:14 | |
tadzik | hm? | 13:16 | |
oh my, perldoc in pir | |||
jnthn | :D | ||
tadzik | and it's PCT | 13:17 | |
jnthn | wow :) | ||
tadzik | the parser is actually pretty similar to mine | 13:18 | |
well, mine uses less backtracking | |||
13:19
bbkr left
|
|||
tadzik | chromatic and particle wrote that, it seems | 13:20 | |
JimmyZ | it may be historical legacy | ||
tadzik | in 2008 | ||
masak | "it is the year two THOUSAND" | 13:21 | |
tadzik | we are robots! | ||
masak | affirmative. | ||
13:22
lumi__ left
13:23
lumi__ joined,
Vlavv` joined
13:25
wamba left
|
|||
masak | quick poll: in perl6.org/compilers/features for nom and Niecza respectively, what is according to you the most glaring missing feature? | 13:30 | |
tadzik | working Pies :> | ||
oh, there is Swedish as a language on my university! | 13:31 | ||
13:31
MayDaniel left
|
|||
jnthn | masak: nom's lacking of good coverage of the regex/grammar stuff | 13:32 | |
masak | tadzik: don't learn Swedish. hardly anyone speaks it. | ||
tadzik | but I know english already | 13:33 | |
masak | tadzik: learn to read Shakespeare instead. much more worthwhile. | ||
gives depth to one's English knowledge. | |||
tadzik | mebbe | ||
colomon | Working Pies would definitely be a major lack from both of those compilers. | 13:34 | |
masak | "Oh Romeo, .WHEREFORE art thou Romeo?" | ||
colomon | Is "working Actions" not even on the feature list? It's a *huge* hole in nom as far as I'm concerned. | 13:35 | |
13:36
lumi__ left
|
|||
masak | doesn't seem to be on the list. | 13:36 | |
it should definitely be, in my opinion. | |||
jnthn | colomon: I'd lumped that in with the general grammar/regex stuff. | ||
13:36
lumi__ joined
|
|||
jnthn | But yeah, worth an entry. | 13:36 | |
jnthn hopes pmichaud finds his regex tuits soon ;) | 13:37 | ||
13:41
birdwindupbird joined
|
|||
JimmyZ does too | 13:44 | ||
jnthn | eh well, it took me long enough to find my parametric role ones... | ||
13:49
lumi__ left
|
|||
masak | rakudo: class InstanceMethod { has $.instance; has $.methodname; method postcircumfix:<( )>(\$c) { $.instance."$.methodname"(|$c) } }; my $m = InstanceMethod.new(:instance[2, 4, 6], :methodname<roll>); say $m(5) | 13:50 | |
p6eval | rakudo 3c6296: OUTPUT«4 4 2 2 6» | ||
13:50
lumi__ joined
|
|||
masak | \o/ | 13:50 | |
forgive me, but that is *so* *cool*. | 13:51 | ||
jnthn | masak: why \$c, not just $c? | 13:52 | |
But yes, it's cool :) | 13:53 | ||
JimmyZ | yes, it's so cool && magic, most people will be confused :) | ||
masak | jnthn: I don't know, I thought I'd need to mark it as a signature somehow. I probably don't. | 13:54 | |
JimmyZ: really? what's confusing about it? I'm just detatching naming what instance and method to call, from actually calling it :P | |||
JimmyZ | rakudo: class InstanceMethod { has $.instance; has $.methodname; method postcircumfix:<( )>(\$c) { $.instance."$.methodname"(|$) } }; my $m = InstanceMethod.new(:instance[2, 4, 6], :methodname<roll>); say $m(5) | ||
p6eval | rakudo 3c6296: OUTPUT«===SORRY!===Contextual $*GOAL not found» | ||
jnthn | masak: postcircumfix:<( )> always gets passed a capture. | 13:55 | |
JimmyZ wonders how to debug 'Contextual $*GOAL not found' :) | |||
masak | JimmyZ: I think you found a bug. | ||
rakudo: class A { method x { self.x(|$) } }; say "alive" | |||
p6eval | rakudo 3c6296: OUTPUT«===SORRY!===Contextual $*GOAL not found» | ||
masak | rakudo: sub f { f(|$) }; say "alive" | 13:56 | |
p6eval | rakudo 3c6296: OUTPUT«===SORRY!===Contextual $*GOAL not found» | ||
masak submits rakudobug | |||
jnthn: right. I was being superstitious. | |||
jnthn | b: sub f { f(|$) }; say "alive" | ||
JimmyZ | looks like I never like right way to use rakudo :) | 13:57 | |
p6eval | b 1b7dd1: OUTPUT«===SORRY!===Contextual $*GOAL not found» | ||
jnthn | hm, not a regression then... | ||
ruoso | perl6: my $a = Routine.new(); $a.push(sub ($x, Int $y) { say 1 }); $a.push(sub ($x, Str $z, Str $q) { say 2 }); (1,1,"a","b",2,"v","d").reduce($a); | ||
jnthn | (Which makes sense...) | ||
p6eval | rakudo 3c6296: OUTPUT«Method 'push' not found for invocant of class 'Routine' in <anon> at /tmp/MvL_1ao_Kn:1 in <anon> at /tmp/MvL_1ao_Kn:1» | ||
..pugs: OUTPUT«*** Can't modify constant item: VUndef at /tmp/VzkhJKT3bh line 1, column 24-59» | |||
..niecza v9-23-g1a8efca: OUTPUT«Potential difficulties: $x is declared but not used at /tmp/8BHJCIWlZq line 1:------> my $a = Routine.new(); $a.push(sub (⏏$x, Int $y) { say 1 }); $a.push(sub ($x, $y is declared but not used at /tmp/8BHJCIWlZq line 1:------> a… | |||
JimmyZ | perl6: sub f { f(|$) }; say "alive" | ||
p6eval | niecza v9-23-g1a8efca: OUTPUT«===SORRY!===Unsupported use of $) variable; in Perl 6 please use $*EGID at /tmp/ahGxc1cFd8 line 1:------> sub f { f(|$)⏏ }; say "alive"Parse failed» | ||
..pugs: OUTPUT«***  Unexpected ")" expecting "::" at /tmp/gxthySR7WO line 1, column 13» | |||
..rakudo 3c6296: OUTPUT«===SORRY!===Contextual $*GOAL not found» | |||
JimmyZ | std: sub f { f(|$) }; say "alive" | 13:58 | |
p6eval | std bb4f150: OUTPUT«===SORRY!===Unsupported use of $) variable; in Perl 6 please use $*EGID at /tmp/GVQwdrNgrz line 1:------> sub f { f(|$)⏏ }; say "alive"Parse failedFAILED 00:01 120m» | ||
ruoso | I guess #68774 needs a substitute :) | ||
jnthn | ruoso: Well, the entire way multi stuff works has changed. There's no way you're going to be able to just instantiate Routine and push stuff onto it. | 13:59 | |
masak | ruoso! \o/ | ||
14:00
birdwindupbird left
|
|||
jnthn | nom: sub proto_factory() { my proto foo(|$) { * } }; my $x = proto_factory(); $x.add_dispatchee(sub ($a) { say "1 arg" }); $x.add_dispatchee(sub ($a, $b) { say "2 args }); $x(1); $x(1,2) | 14:01 | |
p6eval | nom 3c6296: OUTPUT«===SORRY!===Unable to parse blockoid, couldn't find final '}' at line 1» | ||
14:01
kaare_ left
|
|||
jnthn | hm, where's the syntax error... :) | 14:01 | |
oh! | 14:02 | ||
nom: sub proto_factory() { my proto foo(|$) { * } }; my $x = proto_factory(); $x.add_dispatchee(sub ($a) { say "1 arg" }); $x.add_dispatchee(sub ($a, $b) { say "2 args" }); $x(1); $x(1,2) | |||
p6eval | nom 3c6296: OUTPUT«Use of uninitialized value in string contextUse of uninitialized value in string context===SORRY!===error:imcc:syntax error, unexpected '\n' in file '(file unknown)' line 15798857» | ||
jnthn | eek. | ||
nom: sub proto_factory() { my $x = proto foo(|$) { * }; $x }; my $x = proto_factory(); $x.add_dispatchee(sub ($a) { say "1 arg" }); $x.add_dispatchee(sub ($a, $b) { say "2 args" }); $x(1); $x(1,2) | |||
p6eval | nom 3c6296: OUTPUT«1 arg2 args» | ||
ruoso | hmm... but why wouldn't I bee able to just instantiate Routine? | 14:03 | |
jnthn | ruoso: Why *would* you be able to? | ||
You don't specify anything to go in $!do | |||
And the "this is a dispatcher" flag won't get set either | 14:04 | ||
ruoso | maybe there needs to be a mandatory parameter to the initialization, yes | ||
14:04
birdwindupbird joined
|
|||
jnthn | Well, but that mandatory parameter is kinda...weird. What lives in $!do is highly backend specific. | 14:04 | |
And implementation specific. | |||
14:05
lumi__ left
|
|||
jnthn | I'm not even sure what you'd pass. :) | 14:05 | |
14:05
lumi__ joined
|
|||
ruoso | Well, maybe the default should be to do the same thing as your code did.. | 14:05 | |
but with all the meta stuff, I would expect to be able to perform all this in the level of the objects and methods | 14:06 | ||
jnthn | Well, I kinda did, if you see that dummy proto as a constructor. ;) | 14:07 | |
ruoso | well, that's the Perl 6 syntax to initalize it | ||
jnthn | Maybe a Routine.new_onlystar_dispatcher() | ||
ruoso | I would think that whatever the compiler uses should be available to the user too | 14:08 | |
at least if I was to build a class from scratch, I would expect my new class to be no different than a class generated by the compiler | 14:09 | ||
jnthn | Yeah, that's much less of an issue. | 14:10 | |
The tricky bit with routines is the underlying, VM-level coderef. | |||
benabik | What's the problem with just using pointy blocks? | 14:11 | |
14:11
pmurias joined
|
|||
jnthn | benabik: That's a Perl 6 code object. | 14:11 | |
(if you're talking about, what does in $!do) | |||
ruoso | benabik: my question is actually how to get the pointy blocks and compose them into a single multi at run-time | ||
benabik | ruoso: Ahh... | 14:12 | |
14:12
JimmyZ left
|
|||
jnthn | I guess we could do a constructor for routine that takes a pointy block and just steals its body and signature. | 14:12 | |
A constructor that creates an onlystar style dispatcher is probably also worthwhile. | |||
ruoso | why can't it be an "empty" routine? | 14:13 | |
jnthn | ruoso: What's going to get run when you invoke it? | ||
ruoso | nothing | ||
jnthn | ruoso: How is that useful? | ||
ruoso | you could even raise an exception if you try to run an "empty" routine | ||
jnthn | :) | ||
14:13
JimmyZ joined
|
|||
ruoso | it's just the thing you get to add the candidates later | 14:13 | |
jnthn | I'm still confused. | 14:14 | |
ruoso | Ok, let me get the background on this again... | ||
jnthn | When you invoke a proto, it has a body that enters the multi-dispatcher. | ||
ruoso | this use case came from the catalyst-like web dispatching framework | ||
basically, it will take some specification of action-chains, based on a reduce of multi-dispatch | 14:15 | ||
so the framework takes the specification and build the multi | |||
and then invokes the multi with the URL split by / as arguments | 14:16 | ||
14:16
tty234_ is now known as tty234
|
|||
ruoso | (which will later bring the "reduce with variable-length-signature-multi" problem) | 14:16 | |
jnthn | Yeah, that one is still unresolved. | 14:17 | |
There was some handwaving about captures being cursor-ish, then no spec changes. | |||
ruoso | that was the reasoning for the first sketches on Iterators | ||
you would be able to iterate a capture | 14:18 | ||
masak | .WALK & | ||
14:18
lumi__ left
|
|||
jnthn | ruoso: Yeah. I never really liked any of that line of thougth. | 14:19 | |
14:19
lumi__ joined
|
|||
jnthn | It's like, "let's take this thing that needs to be fast because we do it a lot. Now let's make it even more complex!" | 14:19 | |
I agree that Routine (well, Code in general) probably needs some more useful constructors, though. | 14:20 | ||
But I'm reluctant on Routine.new() magically giving back something with an onlystar dispatcher in it. | 14:21 | ||
Maybe Routine.new(:dispatcher) can do that | 14:22 | ||
ruoso | that looks like a sane API | 14:23 | |
btw... about the reduce... maybe the complexity needs to be in the code for reduce, not on Capture | |||
jnthn | That'd be more comfortable. | 14:24 | |
ruoso | it would just take all signatures, try from the shorter to the longer | ||
benabik | I would assume you'd want to try longer sigs first so that ($a, $b) would match before (*@a) | 14:27 | |
Although if you have a slurpy as a candidate on variable length multi, you're probably asking to have problems. | |||
ruoso | *@a is the longest posible | 14:28 | |
jnthn | Well, it's longest but also least specific, in a sense. | 14:29 | |
A normal multi-dispatch would consider the absolute match a better one than the slurpy one. | |||
It's possible the answer really is "build a custom dispatcher" | |||
Since Perl 6 multi-dispatch isn't a longest-matching based thing. | 14:30 | ||
14:32
lumi__ left,
lumi__ joined
|
|||
masak | rakudo: my @strings = <foo bar>; subset Foo of Str where { $_ ~~ any(@strings) }; for <foo OH NOES> { when Foo { say "$_ is a Foo" } } | 14:48 | |
p6eval | rakudo 3c6296: OUTPUT«foo is a Foo» | ||
masak | \o/ | ||
masak marks rt.perl.org/rt3/Ticket/Display.html?id=95500 fixed | |||
will simplify the crypt game a bit ;) | |||
14:48
[Coke] left
14:50
[Coke] joined
|
|||
jnthn | masak: ah, a scoping bug | 14:50 | |
Glad to see that one fixed. :) | |||
masak | me too! | ||
everything is just getting so *nice*! | 14:51 | ||
I can see the potential, once nom can do all it can do now and then all Beijing can do... | |||
jnthn | Well, as you've discovered, we've regressed in some areas that still need fixing. But many bugs are gone too. | ||
masak | indeed. | ||
my job is to root out the regressions, and any newly introduced bugs :) | |||
I'll do this by running as much of my old scripts as possible on nom. | 14:52 | ||
as many* | |||
14:53
erez joined
|
|||
pmurias | sorear: what do you need ropes for? | 14:53 | |
14:53
lumi__ left
14:54
lumi__ joined
|
|||
erez | heya, t/02-embed/01-load.t fails with "Parse errors: No plan found in TAP output" error | 14:54 | |
jnthn | masak: The odd fix is welcome too. ;-) | ||
masak | jnthn: I even did a few, two days ago ;) | ||
erez | cloned about 20 mins ago | ||
jnthn | masak: I know, I know ;) | 14:55 | |
14:55
sayu joined
|
|||
jnthn | masak: And I was very happy to see them. :) | 14:55 | |
masak | but yeah, I will dig in more times like that. | ||
jnthn | erez: Fails here too. | ||
masak | Perl 6 days FTW! | ||
erez | jnthn: ah. | ||
masak dives into his macros branch | 14:56 | ||
jnthn | erez: Will look into it, though I'm deep in a bunch of other bits at the moment. | 14:57 | |
14:57
sayu left,
sayu joined
|
|||
erez | jnthn: no worries, just to make sure I didn't do anything wrong | 14:58 | |
masak | erez++ # pointing out test failures | ||
moritz | oh, I see at least one reason for the failure | 14:59 | |
will investigate when rakudo finishes compiling | |||
erez | masak: tx, I even ventured to look inside it, but that was a bit over my league. | 15:01 | |
15:03
[Coke] left
|
|||
masak .oO( it was a bit out of my head ) | 15:03 | ||
15:04
nebuchadnezzar left,
[Coke] joined
15:06
lumi__ left,
patspam joined
15:07
lumi__ joined
15:11
wamba joined,
[Coke] left,
lumi__ left
15:12
lumi__ joined
15:13
[Coke] joined
15:16
MayDaniel joined
15:25
birdwindupbird left
|
|||
erez | what's the state of the Using Perl 6 book? How "finished" compared to the current status of Rakudo is it? | 15:26 | |
masak | it's a bit neglected, and definitely not in a finished state at present. | 15:28 | |
we used to have regular meetings around it, but we don't anymore, for some reason. | |||
seems to be a feedback cycle thing going on between lack of tuits and lack of clear finish state. | |||
15:29
Sarten-X left
|
|||
felher | masak: may i ask you a question about the code of your animal farm game? | 15:29 | |
masak | felher: of course. | ||
15:31
lumi__ left
|
|||
felher | masak: this for sure is a matter of taste but: lines 52 to 76, is there a reason you prefer the if-elseif-else chain to when/default? | 15:31 | |
masak | of all the stylistic choices I made in that class, that's the question? :P | ||
15:31
lumi__ joined
|
|||
masak looks | 15:31 | ||
is github line numbering seriously broken for anyone else, by the way? | 15:32 | ||
erez | masak: where do you think is the biggest "hole" at the moment? | ||
masak | I have the numbers not lining up over here. (Chrome 13, Ubuntu) | ||
felher | masak: yeah, well, i just started to read your code and i won't ask any other than stylistic questions before i'm done :) | ||
masak | erez: been too long since I looked at it, to be honest. :/ | 15:33 | |
erez: I think there's a TODO list in the repository. | |||
jnthn | masak: It sometimes happens to me if I've got antying other than default text size. | ||
masak | oh! | ||
jnthn: that fixed it, thanks. | |||
felher: I tend to use given/when/default to test the various properties of one single thing. I tend to use if/elsif/else to test a cascade of conditions on different things. | 15:34 | ||
dalek | kudo/nom: b2e3176 | jonathan++ | src/ops/perl6.ops: Documentation fix. |
15:35 | |
kudo/nom: 056cf10 | jonathan++ | src/Perl6/Metamodel/ (2 files): Fix up handling of how protos are created for the role selection multi-dispatch. |
|||
kudo/nom: 8b57bb2 | jonathan++ | src/Perl6/Metamodel/ParametricRoleHOW.pm: Make parametric roles able to know about any shortname grouping they belong to (not set up yet, just the storage for it). |
|||
kudo/nom: da541a6 | jonathan++ | src/Perl6/ (2 files): Stub in code to add a role to its group at composition time, if needed. |
|||
kudo/nom: c0eae8c | jonathan++ | src/Perl6/Actions.pm: Correct method call. |
|||
kudo/nom: 9d3a2c8 | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.pm: Fix thinko in selector creation code. |
|||
kudo/nom: 6dbbf34 | jonathan++ | src/Perl6/SymbolTable.pm: Pass group parameter along when creating a meta-object. |
|||
jnthn | Getting closer. | ||
Fiddly thing is fiddly. | |||
tadzik | was it simplier in b? | ||
felher | masak: k, thnx :) | 15:36 | |
masak | felher: it was a good question. thank *you*. :) | ||
jnthn | tadzik: Not much, if at all. And if it was, only because b cheated badly in various places. | 15:37 | |
tadzik | I see | ||
masak | if (%!t{$!cp} // -> %, @ {;})({%!p}, @.e) -> $_ { # one of the advantages of Perl 6 is that it's so much more legible than Perl 5... | ||
jnthn | O.O | ||
tadzik | eew | ||
felher | masak: :D | ||
masak | complexity. it creeps up on you. | ||
tadzik | isn't that intentionally obfuscated? | 15:38 | |
masak | no... :/ | ||
tadzik | (%!t{$!cp} // -> %, @ {;}) | ||
why do you pass % and @ to an empty block? | |||
jnthn | It's a sig. | ||
masak | tadzik: because that's what I call it with right after that paren. | ||
tadzik | oh | ||
jnthn | There musta been a neater way to write that | 15:39 | |
It took me a while to parse :P | |||
masak | couldv'e factored the empty pblock out into a variable to make it clearer. | ||
tadzik | what is that supposed to be doing? | ||
flussence | .oO( things like that are the reason I never abbreviate names in code any more... ) |
||
jnthn | Why {%!p} and not just %!p? | ||
15:39
Sarten-X joined
|
|||
masak | tadzik: pull out the player's trading callback, or if there isn't any, an empty thing. call it. | 15:39 | |
benabik | masak: Why not just avoid the call if there is no callback? | 15:40 | |
tadzik | oh, so it's an empty block, but it has to take parameters | ||
masak | jnthn: because of the p6l thread. | ||
tadzik | couldn't they be slurpy then? If the block doesn't care anyway | ||
jnthn | masak: ah | ||
masak | jnthn: can't trust the clients. | ||
benabik: would've been better. at the time I was aiming for brevity. | |||
tadzik: it could indeed've. | 15:41 | ||
tadzik | I'd probably go for sub(%, @) {} instead of -> %, @ {;} | ||
looks more like... code :) | 15:42 | ||
I can see the reasons why you'd write it that way though | |||
masak | over time, I'll probably re-write farm.pl not to be so darn abbreviated. | 15:43 | |
I still think the brevity was worthwhile to pull out the "essence" of the code. | |||
but it's filled its purpose now. | 15:44 | ||
15:44
MayDaniel left
|
|||
JimmyZ wonders what's different in a class betwwen my $foo and has $!foo | 15:45 | ||
15:45
zostay left,
zostay joined
|
|||
JimmyZ | my $foo is a static attr ? | 15:46 | |
jnthn | JimmyZ: It's just a lexical. | ||
masak | JimmyZ: think of the scope and lifetime of the two. | ||
15:46
lumi__ left
|
|||
masak | JimmyZ: 'has' scopes the variable within an instance. 'my' scopes the variable within the 'class' block. | 15:47 | |
15:47
lumi__ joined
|
|||
JimmyZ | which looks like private static attr in Java? | 15:47 | |
jnthn | JimmyZ: Yes, it'll have the same lifetime and scope. | 15:48 | |
JimmyZ | thanks ;) | ||
masak | 'private static' is just a complicated way to say 'lexically scoped' in Java :P | 15:49 | |
jnthn | "We have to pretend we're doing OO even when we're not!!!1!!" | ||
masak | steve-yegge.blogspot.com/2006/03/ex...nouns.html | ||
JimmyZ | rakudo: class A { our $foo = 40; } ; say A::$foo; | 15:50 | |
p6eval | rakudo 3c6296: OUTPUT«===SORRY!===Confused at line 1, near "say A::$fo"» | ||
jnthn | $A::foo in Perl 6. | ||
JimmyZ | rakudo: class A { our $foo = 40; } ; say $A::foo; | ||
p6eval | rakudo 3c6296: OUTPUT«40» | ||
masak | jnthn: and Perl 5, for that matter. | ||
jnthn | masak: oh :) | ||
masak | nihil novus sub sole ;) | 15:51 | |
JimmyZ | rakudo: package B; class A { our $foo = 40; } ; say $B::A::foo; | ||
p6eval | rakudo 3c6296: OUTPUT«===SORRY!===This appears to be Perl 5 code. If you intended it to be Perl 6 code, please use a Perl 6 style package block like "package Foo { ... }", or "module Foo; ...". at line 1, near "class A { "» | ||
tadzik | rakudo: module B; class A { our $foo = 40; } ; say $B::A::foo; | 15:52 | |
p6eval | rakudo 3c6296: OUTPUT«40» | ||
JimmyZ | speaking of package and module, I never understatnd whtat's the difference | ||
tadzik | why do we even have 'package' | ||
JimmyZ | I tried to understand, but I was finally confused | 15:53 | |
rakudo: package B { class A { our $foo = 40; } ; }; say $B::A::foo; | 15:54 | ||
p6eval | rakudo 3c6296: OUTPUT«40» | ||
JimmyZ | rakudo: class B::A { our $foo = 40; } ; say $B::A::foo; | ||
p6eval | rakudo 3c6296: OUTPUT«40» | ||
masak | tadzik: a module is a package with a few extras. | ||
tadzik: things like auth and ver, IIRC. | |||
JimmyZ | that's why I was confused | ||
masak | tadzik: oh, and export semantics. | ||
tadzik | optional | ||
so it's a superset? | 15:55 | ||
masak | yes. | ||
JimmyZ | package is a superset ? | ||
masak | just like a class is a superset of a module, in a way. | ||
no, module is a superset. | |||
JimmyZ | class is a superset of module? I thought module is superset of class | 15:56 | |
jnthn | Package also fills the "we didn't define anything with this name yet, but need a stash here" role. | ||
JimmyZ | I thought package > module > class | ||
jnthn | class Foo::Bar { } # Foo is a package | 15:57 | |
masak | JimmyZ: what gave you the idea that a package is more powerful than a *class*? | ||
JimmyZ | package can have many class :) | 15:58 | |
masak | o.O | ||
15:58
lumi__ left
|
|||
jnthn | Well, only in the sense that a class can have many classes... :) | 15:58 | |
Here's how it works. Every type has a .WHO slot. Off this hangs a Stash. | |||
JimmyZ | class Foo::Bar { } # Foo is a package # I understand this one | ||
15:59
lumi__ joined
|
|||
jnthn | So Foo::Bar is really Foo.WHO.<Bar> | 15:59 | |
JimmyZ | and module? | ||
jnthn | If you had class Foo { }; class Foo::Bar { }, Foo.WHO.<Bar> still works just the same. The only difference is that Foo has a different meta-object. | 16:00 | |
Same story for module. Just a different meta-object. | |||
package is just a bit more special to the compiler | |||
because it knows not to while about redefinition. | |||
s/while/whine/ | |||
nom: module Foo { }; class Foo { } | 16:01 | ||
p6eval | nom 6dbbf3: OUTPUT«===SORRY!===Illegal redeclaration of class 'Foo' at line 1, near "{ }"» | ||
jnthn | nom: package Foo { }; class Foo { } | ||
p6eval | nom 6dbbf3: OUTPUT«Use of uninitialized value in string contextUse of uninitialized value in string context===SORRY!===error:imcc:Multiple declarations of lexical 'Foo' in file '(file unknown)' line 119» | ||
jnthn | f**k. | ||
JimmyZ | so class > module > package ? | ||
jnthn | JimmyZ: You could see it like that | ||
masak submits rakudobug | |||
jnthn | JimmyZ: But it's really not factored that way at all. | ||
JimmyZ | which is wrongly reverse by me :) | ||
jnthn | I think Moose does factor it more like that for real. | 16:02 | |
JimmyZ | there are few testcase about module and package | 16:03 | |
jnthn | Phew, I've got the setting build to work again... | 16:04 | |
dalek | kudo/nom: 6238f80 | jonathan++ | src/Perl6/Metamodel/ParametricRoleGroupHOW.pm: Various corrections to the role group meta-object. |
16:05 | |
kudo/nom: 02ee1c4 | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.pm: Be sure to configure stashing for parametric roles. |
|||
jnthn | Now I just have to fix everything else... | ||
JimmyZ | rakudo: module Foo; package bar { class hi { our $lo = 'hi' } }; say $Foo::bar::hi::lo; | 16:07 | |
p6eval | rakudo 6dbbf3: OUTPUT«hi» | ||
JimmyZ | rakudo: package bar { module Foo; class hi { our $lo = 'hi' } }; | ||
p6eval | rakudo 6dbbf3: OUTPUT«===SORRY!===Too late for semicolon form of $*PKGDECL definition at line 1, near "class hi {"» | ||
tadzik | TOO LATE FOR SEMICOLON! | ||
16:08
daniel-s left,
lumi__ left
|
|||
jnthn | That $*PKGDECL looks wrong. | 16:08 | |
JimmyZ | rakudo: package bar { class hi { our $lo = 'hi' } }; module Foo | ||
p6eval | rakudo 6dbbf3: OUTPUT«===SORRY!===Unable to parse $*PKGDECL definition at line 1, near ""» | ||
JimmyZ | rakudo: package bar { class hi { our $lo = 'hi' } }; module Foo; | ||
p6eval | rakudo 6dbbf3: OUTPUT«===SORRY!===Too late for semicolon form of $*PKGDECL definition at line 1, near ""» | ||
jnthn | wtf | 16:09 | |
<.panic: "Too late for semicolon form of $*PKGDECL definition"> | |||
...that's a double-quoted string! | |||
16:09
lumi__ joined
|
|||
JimmyZ | and "Unable to parse $*PKGDECL definition"? | 16:09 | |
jnthn | nqpbug maybe | ||
JimmyZ found it's easy to find a bug :) | 16:10 | ||
jnthn | If only we had more people who found it easy to fix a bug. :) | ||
JimmyZ | hehe | 16:11 | |
masak | we should have a training programme. | ||
16:11
daniel-s joined
|
|||
JimmyZ | because I'm still a newbie | 16:14 | |
snarkyboojum | me three | 16:15 | |
jnthn wonders how best to do that | |||
snarkyboojum | jnthn: fly us to sweden and buy lots of beer :) | 16:16 | |
16:20
lumi__ left
16:21
lumi__ joined
|
|||
snarkyboojum | or not… :P | 16:22 | |
jnthn | Norway aside, Sweden might just be about the most expensive place to get beer :) | 16:23 | |
snarkyboojum | jnthn: homebrew! :P | ||
jnthn | We should do it in Prague. It's beautiful and has cheap, good beer. ;) | ||
tadzik | there is a district in Warsaw called Prague | 16:24 | |
but it's famous more for crime than for cheap beer :) | 16:25 | ||
jnthn | tadzik: Aww. | 16:26 | |
16:38
packetknife joined,
wamba left
16:43
sayu left,
lumi__ left
16:44
packetknife left,
lumi__ joined
16:52
simcop2387 joined
16:54
frhodes left,
wolfman2000 left
16:57
frhodes joined
17:01
lumi__ left
17:02
lumi__ joined
17:04
JimmyZ left
|
|||
TimToady | perl6: package bar { module Foo; class hi { our $lo = 'hi' } }; | 17:07 | |
p6eval | rakudo 02ee1c: OUTPUT«===SORRY!===Too late for semicolon form of $*PKGDECL definition at line 1, near "class hi {"» | ||
..pugs: ( no output ) | |||
..niecza v9-23-g1a8efca: OUTPUT«===SORRY!===Too late for semicolon form of module definition at /tmp/F7Y6a_Ynjb line 1:------> package bar { module Foo⏏; class hi { our $lo = 'hi' } };Parse failed» | |||
jnthn | Phew. The "multiple roles with same shortname" thing looks like it's gonna make it through spectest... | 17:10 | |
TimToady | all classes can work like a module, and all modules can work like a package, whether or not it is implemented with inheritance | ||
yay | |||
jnthn | TimToady: Agree. In Rakudo, we just happen to implement it with role composition. | ||
17:10
birdwindupbird joined,
birdwindupbird left
|
|||
jnthn | TimToady: class composes all the roles module does, and some more. | 17:10 | |
TimToady | is fine by me | 17:11 | |
but we still have some massive re-education to for those who see inheritance as their hammer | 17:12 | ||
17:13
lumi__ left
|
|||
jnthn | Aye. But I think they'll encounter it in many places before they get to thinking about the meta-objects behind package/module. ) | 17:14 | |
:) | |||
Learning to use roles effectively certainly takes time though. | 17:15 | ||
I used to explain them in terms of things they were like. I've kinda moved on to explaining factoring problems and showing how roles help. | |||
dalek | kudo/nom: 3b6cd2b | jonathan++ | src/Perl6/ (3 files): Allow flagging of signatured roles. |
17:16 | |
kudo/nom: 7399cd6 | jonathan++ | src/Perl6/Metamodel/ (2 files): Fill out more missing bits in ParametricRoleGroupHOW. |
|||
kudo/nom: e259b60 | jonathan++ | src/Perl6/Grammar.pm: Switch role handling over to a model that allows multiple definitions of a role with the same short name, and using multiple dispatch over the role signatures to decide which to use. |
|||
kudo/nom: 2fd2d26 | jonathan++ | NOMMAP.markdown: Update nommap. |
|||
17:16
lumi__ joined
|
|||
jnthn | Phew. That was some work... | 17:17 | |
17:29
MayDaniel joined
17:30
whiteknight left
17:33
lumi__ left
17:34
wamba joined,
lumi__ joined
17:41
wamba left
17:50
patspam left,
patspam joined
|
|||
masak | commit coming up. | 17:52 | |
dalek | kudo/nom: 2b13fe4 | masak++ | src/core/IO.pm: [src/core/IO.pl] lazily open things before .get This is to make something like "README".IO.lines work. It worked in Beijing. |
||
masak | I did spectest it and it passed, but I wouldn't mind someone reviewing that commit anyway. | ||
I needed it to get June-blogging hangman to run. | |||
maybe a spectest for it would've been in order as well, I dunno. | |||
jnthn | +1 to spectest | 17:55 | |
17:55
lumi__ left
|
|||
jnthn | Best to have semantics tested. | 17:55 | |
17:55
lumi__ joined
|
|||
masak | if no-one beats me to it, I'll do it after supper. | 17:57 | |
the test would be basically lives_ok { my $line = "some_file".IO.get } | 17:58 | ||
17:58
frhodes left
18:01
packetknife joined
18:02
patspam_ joined,
patspam_ left
18:04
wamba joined
18:05
patspam left
18:06
packetknife left
18:09
packetknife joined,
lumi__ left
18:10
lumi__ joined
18:11
wamba left
18:14
daniel-s left
18:17
wolfman2000 joined,
packetknife left,
patspam joined
|
|||
moritz | rakudo: say 'README'.IO.lines.elems | 18:20 | |
p6eval | rakudo 2fd2d2: OUTPUT«Method 'readline' not found for invocant of class 'Mu' in method get at src/gen/CORE.setting:4714 in sub coro at src/gen/CORE.setting:3765 in method reify at src/gen/CORE.setting:3735 in method reify at src/gen/CORE.setting:3539 in method gimme at src/gen… | ||
moritz | rakudo: say 'rakudo/README'.IO.lines.elems | ||
p6eval | rakudo 2fd2d2: OUTPUT«Method 'readline' not found for invocant of class 'Mu' in method get at src/gen/CORE.setting:4714 in sub coro at src/gen/CORE.setting:3765 in method reify at src/gen/CORE.setting:3735 in method reify at src/gen/CORE.setting:3539 in method gimme at src/gen… | ||
moritz | rakudo: say 'rakudo/README'.IO.get | ||
p6eval | rakudo 2fd2d2: OUTPUT«Method 'readline' not found for invocant of class 'Mu' in method get at src/gen/CORE.setting:4714 in <anon> at /tmp/EFBX62j1Z7:1 in <anon> at /tmp/EFBX62j1Z7:1» | ||
dalek | kudo/nom: 6da1f55 | jonathan++ | src/Perl6/Metamodel/BOOTSTRAP.pm: If an attribute has a build closure, we should always consider it as needing generic instantiation, since it may reference role arguments. |
18:24 | |
kudo/nom: c994628 | jonathan++ | t/spectest.data: We now pass S14-roles/parameterized-basic.t. |
|||
kudo/nom: cb570dd | jonathan++ | src/Perl6/Actions.pm: Fix thinko. |
|||
18:25
lumi__ left
18:26
lumi__ joined
18:29
patspam left
18:34
whiteknight joined
18:35
whiteknight left,
whiteknight joined,
wamba joined
18:40
lumi__ left
18:41
lumi__ joined
18:56
kaare_ joined
18:57
MayDaniel left
18:59
soh_cah_toa joined
19:01
lumi__ left
19:02
lumi__ joined
19:06
bbkr joined
19:12
static_perl left
19:18
lumi__ left,
lumi__ joined
19:24
static_perl joined
|
|||
masak | static_perl: hi | 19:24 | |
static_perl | hi | ||
19:24
Sarten-X left,
wamba left
|
|||
masak | Perl 6 is static. and dynamic. :) | 19:25 | |
static_perl | hehe is my old nick .. don't mind it :D | ||
and I am very new to perl6, trying to figure out what it is still | 19:26 | ||
masak too :) | |||
dalek | kudo/nom: 3da8879 | jonathan++ | src/Perl6/Actions.pm: Fix R[R2[Foo]] style role parameterizations. |
19:27 | |
19:29
lumi__ left
|
|||
jnthn | nmake | 19:29 | |
grr | |||
ww | |||
masak | *** No such target: grr ww | 19:30 | |
19:30
lumi__ joined
|
|||
jnthn | nmake masak quiet :P | 19:30 | |
19:31
wamba joined
19:34
patspam joined
|
|||
masak | ... | 19:38 | |
jnthn | .oO( it worked for a while :) ) |
||
Hm. We ignored "Foo of Bar" style type names. Hope that hasn't led to some accidental OK-ness in places... | 19:39 | ||
sorear | good * #perl6 | 19:40 | |
phenny | sorear: 10:25Z <snarkyboojum> tell sorear having fun trying to build Niecza on OS X -> gist.github.com/1209432 | ||
sorear: 10:26Z <snarkyboojum> tell sorear using RUN_CLR=mono coredumps | |||
masak | *, #perl6 | ||
19:40
alvis joined
|
|||
sorear | masak: I'm very dubious of the potential for a Perl 6 Javascript translator. NQP-JS I could imagine, but Perl 6 has too many fiddly semantic bits, like containers and coroutines, to support a direct | 19:42 | |
jnthn would love a JS backend for NQP | 19:45 | ||
sorear | hey awesome, ruoso lives | ||
pmurias: ropes are for Str | |||
masak | sorear: I just want to run my June games in the browser. | 19:46 | |
sorear | snarkyboojum: your gist is insufficiently informative. I would like a dialog. | ||
jnthn | masak: It just involves writing a Perl 6 => JavaScript compiler good enough to run them ;) | 19:47 | |
19:48
lumi__ left,
Sarten-X joined,
lumi__ joined
19:49
alvis left
19:55
patspam left
19:56
molaf left
20:03
patspam joined
|
|||
dalek | kudo/nom: 119eef2 | jonathan++ | src/Perl6/ (2 files): Handle 'Glass of Beer' style type names. |
20:03 | |
kudo/nom: d617c32 | jonathan++ | t/spectest.data: We now pass S14-roles/parameterized-type.t. |
|||
20:04
wolfman2_ joined
20:06
wolfman2000 left
20:07
zby_home joined,
alvis joined
|
|||
dalek | ast: 5dd2557 | (Pawel Pabian)++ | S02-lexical-conventions/unicode.t: [t/S02-lexical-conventions/unicode.t] test for #69959 - unicode named params |
20:09 | |
pmurias | sorear: would using ropes for Str make sense from a performance point? | 20:10 | |
20:12
lumi__ left,
lalidama joined
20:13
lumi__ joined
20:14
wolfman2_ left
20:20
soh_cah_toa_ joined
|
|||
pmurias | masak: the problem with Perl6 on JS is that in order to support features like junctions, coroutines, containers etc. you have to sacrifice performance by adding an extra layer on top of the runtime | 20:20 | |
masak: or have a sofisticated analysis phase to strip such stuff | 20:21 | ||
20:21
soh_cah_toa left
20:22
patspam left
|
|||
masak | nod | 20:22 | |
dalek | kudo/nom: 025b5a6 | jonathan++ | src/core/traits.pm: Implement 'is default' trait for routines. |
||
kudo/nom: 90a619c | jonathan++ | t/spectest.data: We now pass S12-methods/default-trait.t. |
|||
masak | jnthn++ | ||
pmurias | masak: the more important problem with the js backend is that it would split effort | 20:24 | |
masak | I'm just going to see how far I get with perlito | ||
pmurias | it's better to have one decent backend then a dozen ones which are not good enough | ||
masak | agree. | 20:25 | |
pmurias | and niecza has quite a few opcodes so writing a backend for that is not a trivial thing (as opposed to Perlito which has a relatively simple AST) | 20:27 | |
20:29
donaldh joined
20:30
lumi__ left
20:31
lumi__ joined
20:32
lalidama left
20:33
g2` joined
|
|||
im2ee | masak, how do You do? :) | 20:37 | |
bbkr | nom: class A { method !private { say "p" } }; my $a = A.new; $a!private # known regression or fresh NOM bug? | ||
p6eval | nom 3da887: OUTPUT«Method 'find_private_method' not found for invocant of class 'Perl6::Metamodel::PackageHOW' in method dispatch:<!> at src/gen/CORE.setting:641 in <anon> at /tmp/DFDiWiwKth:1 in <anon> at /tmp/DFDiWiwKth:1» | ||
masak | im2ee: Dzień dobry, panie. Czuję się dobrze. Jak się masz? | 20:38 | |
im2ee | masak, great polish! :) | ||
masak, świetnie mówisz po polsku :) | 20:39 | ||
masak | :) | ||
bbkr | masak: doskonała polszczyzna | ||
masak | sirs, you are too kind. | 20:40 | |
but it's not *that* hard to use Google Translate... ;) | |||
mostly one has to have a feeling for what one can put in that doesn't come out jumbled or wrongly translated. | 20:41 | ||
im2ee | right :) | ||
20:41
patspam joined
|
|||
masak | Lubię język polski. Chciałbym mówić w tym języku. | 20:42 | |
im2ee | masak, where are You from? ;> | ||
bbkr | should $class_instance!private_method be accessible from outside class? I remember some discussion about it, however I cannot find the logs or exact spec section. | ||
masak | im2ee: .se | ||
im2ee | masak, skąd pochodzisz? :) | ||
masak | bbkr: no. | 20:43 | |
bbkr: unless trust has been established. | |||
im2ee | masak, sweden? No way.. :) I love Scandinavia. I dream about go there! :) | 20:44 | |
And i learn finnish :) | |||
Do You know finnish? | |||
pmurias | im2ee: which city are you from? | ||
masak | im2ee: ei. | ||
im2ee | pmurias, hmm, it's small city near Toruń. | ||
:) | |||
bbkr | im2ee: Lysomice? Papowo? | 20:45 | |
im2ee | bbkr, no. Why? :) | ||
masak | im2ee: he wants to drive over and knock on your door :P | 20:46 | |
bbkr | im2ee: trying to guess, I lived 10 years in Torun | ||
20:47
wamba left
|
|||
im2ee | masak, if You are in Poland, You can live with me. :) | 20:47 | |
Do you want to go to pl? :) | |||
20:47
kaare_ left
|
|||
im2ee | bbkr, near Papowo. :) | 20:47 | |
20:48
wamba joined
20:50
donaldh left,
wamba left
|
|||
bbkr | im2ee: from what I know those terrains merged into user-friendly-named "Papowo-torunskie Osieki" since Sharp built factories there. | 20:50 | |
20:51
lichtkind joined
|
|||
im2ee | bbkhmm, right. :) | 20:51 | |
bbkr, hmm, right. :) | |||
20:52
lumi__ left,
lumi__ joined
|
|||
im2ee | bbkr, where are You now? :) | 20:54 | |
Not in pl? :) | |||
masak | im2ee: thanks for the offer ;) | ||
bbkr | im2ee: Gdansk. | 20:55 | |
im2ee | bbkr, so... On this channel there are many poles as i see :) | 20:56 | |
masak | that's what you get if you cover the whole complex plane. :P | ||
bbkr | im2ee: this is because perl scripts ends with .pl :) | 20:59 | |
im2ee | hah, True. :) | ||
bbkr, are You studying in Gdansk? :) | 21:02 | ||
21:02
donaldh joined,
donaldh left
|
|||
bbkr | im2ee: I was, and that was the reason why i left Torun. | 21:06 | |
pmurias studies in Wrocław | |||
21:07
lumi__ left
21:08
lumi__ joined
|
|||
masak | meh, perlcabal.org/~fglock/perlito.html parsefails on strangelyconsistent.org/blog/june-5...s-a-number | 21:09 | |
should I tell fglock? | |||
it's so strange that he's working on a Perl 6 compiler, but he's never around! | |||
im2ee | pmurias, i want to to study in Wrocław .:) | ||
bbkr | im2ee: after graduating in Gdansk I went to PJWSTK (polish-japaneese school in warsaw), but the amount of Java there was too much to handle. Instead of performing simple tasks I was object-puking. | ||
im2ee: Gdansk (3City in general) has more to offer when it comes to work in IT. | 21:11 | ||
21:11
packetknife joined
|
|||
dalek | ast: ec2194c | masak++ | S16-filehandles/io.t: [S16-filehandles/io.t] test for 2b13fe in Rakudo |
21:11 | |
im2ee | bbkr, and what about Sląsk? :) | 21:13 | |
like Gliwice etc. | |||
I don't exactly know where i should go. :) | 21:14 | ||
masak | phenny: se en "slask"? | 21:15 | |
phenny | masak: "slask" (se to en, translate.google.com) | ||
masak | dang. | ||
in Swedish, "slask" means something like "semi-wet waste material". | |||
21:15
shinobicl_ joined
|
|||
masak | but the pronunciation in Polish is quite different due to the ą. | 21:15 | |
shinobicl_ | hi, how much ram do i need to comple the new rakudo (nom) ? | ||
compile* | 21:16 | ||
masak | shinobicl_: I don't know exact numbers, but the more the better. | ||
so as to avoid swapping. | |||
shinobicl_ | i tried to compile the new version with 466 mb with --gen-parrot, wasn't enough :( | 21:17 | |
bbkr | im2ee: Forget about Slask. there are two IT valleys - Krakow and 3City. So if you want to study in Wroclaw prepare to move to Krakow after you graduate, because Wroclaw has good university but pretty small jobs market. | ||
im2ee | bbkr, thanks. :) | 21:18 | |
masak | sounds like a sweet deal. Krakow is a beautiful town, with dragons and everything. | 21:19 | |
plus, from what I understand it's where all the culture happens. | |||
21:19
wolfman2000 joined
|
|||
masak | even Warsawians go to Krakow for some social life. | 21:19 | |
im2ee | masak, it's true i think.. I was in KrakxF3w only twice, but there is beautiful :) | 21:23 | |
bbkr | masak: Krakow was capital of the Poland in the past. | ||
21:23
lumi__ left,
lumi__ joined
|
|||
im2ee | masak, as i heard there is polish branch of google. bbkr right? | 21:24 | |
:) | |||
masak | sorear: ping | ||
bbkr: aye. that's why it has such a nice castle. | |||
and dragons. | 21:25 | ||
bbkr | im2ee: I wouldn't expect much form Google polish branch. That's mostly accountancy. | ||
shinobicl_ | just fyi: this is the part what needs lots of ram: ./perl6 --setting=NULL --target=pir --output=src/gen/CORE.setting.pir src/gen/CORE.setting | 21:26 | |
masak | shinobicl_: yes :) | 21:27 | |
we know... | |||
jnthn | shinobicl_: Depends if you're on 32 or 64 bit. | ||
shinobicl_: It almost doubles if you're on 64... | |||
bbkr | masak: This castle is called "Wawel". I did some impossible magic once and managed to get a pass to spent one night there. That was creepy, sleeping among ghosts of dead kings :) | ||
21:28
yahooooo left,
g2` left
|
|||
shinobicl_ | oh thanks.. i'll reinstall my os then :) i don't need 64bit anyway | 21:28 | |
(it's a vps so is not a big deal to reinstall anything) | |||
masak | bbkr: I've spent a couple of nights at Hotel Pod Wawelem :P | 21:29 | |
21:29
wolfman2_ joined,
fridim_ joined,
yahooooo joined
|
|||
im2ee | Uh, it's time for me. Will be tomorrow! See you. Good night. :) | 21:30 | |
bbkr | good night | 21:31 | |
jnthn | im2ee: dobranoc :) | ||
masak | im2ee: dobranoc | ||
phenny: tell sorear two questions. first: what options do I have for setting @*LIB before 'use'? BEGIN { push } didn't work for me, and there's no support for PERL6LIB. | 21:32 | ||
phenny | masak: I'll pass that on when sorear is around. | ||
21:32
wolfman2000 left
|
|||
jnthn | masak: @*INC | 21:32 | |
? | |||
masak | oh, meant that :/ | 21:33 | |
21:33
im2ee left
|
|||
masak | phenny: tell sorear erm, @*INC, I meant. | 21:33 | |
phenny | masak: I'll pass that on when sorear is around. | ||
masak | that's also what I tried. | ||
phenny: tell sorear -- second, why do I get an error message when I don't declare A::B in A/B.pm ? | 21:34 | ||
phenny | masak: I'll pass that on when sorear is around. | ||
21:38
lumi__ left
21:39
lumi__ joined
21:40
wolfman2000 joined
21:41
packetknife left
21:43
mj41 joined,
g2` joined,
wolfman2_ left
|
|||
masak | perl6: die | 21:46 | |
p6eval | pugs: OUTPUT«*** Died at /tmp/mjbdY7gs1l line 1, column 1 - line 2, column 1» | ||
..rakudo 90a619: OUTPUT« in <anon> at /tmp/V6x8TXzJ2t:1 in <anon> at /tmp/V6x8TXzJ2t:1» | |||
..niecza v9-23-g1a8efca: OUTPUT«Unhandled exception: No value for parameter $msg in CORE die at /home/p6eval/niecza/lib/CORE.setting line 0 (CORE die @ 0)  at /tmp/fnA6A2z9VV line 1 (MAIN mainline @ 1)  at /home/p6eval/niecza/lib/CORE.setting line 2046 (CORE C956_ANON @ 2)  at /ho… | |||
masak | I'm not sure the meta-error Niecza emits is motivated. | ||
it should be allowed to die without a $msg. | 21:47 | ||
21:55
wolfman2_ joined
|
|||
sorear | jnthn: well, we also need a big runtime library... :( | 21:56 | |
phenny | sorear: 21:32Z <masak> tell sorear two questions. first: what options do I have for setting @*LIB before 'use'? BEGIN { push } didn't work for me, and there's no support for PERL6LIB. | ||
sorear: 21:33Z <masak> tell sorear erm, @*INC, I meant. | |||
sorear: 21:34Z <masak> tell sorear -- second, why do I get an error message when I don't declare A::B in A/B.pm ? | |||
sorear | pmurias: from what TimToady has told me, ropey asymtotic performance is almost but not quite mandatory for Perl 6.0 Strs | ||
jnthn | sorear: Sure, I wasn't being especially serious :) | 21:57 | |
sorear | pmurias: To be fair most of the Niecza opcodes are really "runtime support functions". I found it simpler to have a single concept of "opcode" than to split out the concept of "function" | ||
masak: pong | 21:58 | ||
21:58
wolfman2000 left
|
|||
sorear | masak: the only sane way is -I | 21:58 | |
masak | ok. | 21:59 | |
then I'll use that. | |||
would love to have PERL6LIB. | |||
sorear | snarkyboojum: your gist was sadly uninformative | ||
22:00
[particle] joined,
zby_home left,
lumi__ left
|
|||
sorear | snarkyboojum: did you have to do something to get that dump or was it automatic? | 22:00 | |
snarkyboojum: I'd be interested in seeing details of the core dump you got. | 22:01 | ||
22:01
lumi__ joined
|
|||
sorear | snarkyboojum: As would #mono. Mono apps aren't really supposed to dump core ever :) | 22:01 | |
snarkyboojum | sorear: all I had to do to get the dump was run 'make | ||
:) | |||
sorear: cool :) will see if I can get the dump to you somehow | 22:02 | ||
22:04
wolfman2_ left
22:05
shinobicl_ left
|
|||
sorear | snarkyboojum: I don't have an osx system to use to interpret the dump | 22:06 | |
snarkyboojum | sorear: will at least share the system diagnostics that os x throws up on the screen - see if that's helpful or not :) | ||
sorear: but perhaps more a "mono on OS X" thing | 22:07 | ||
sorear | snarkyboojum: I've heard niecza worked on osx in the past. | ||
snarkyboojum | sorear: yeah.. used to use it | 22:08 | |
upgraded to Lion since then | |||
sorear: gist.github.com/1210188 # for fun and giggles | |||
sorear | what are the major difference between Lion and Lion.prev? | ||
snarkyboojum | sorear: nfi | ||
22:09
wamba joined
|
|||
sorear | snarkyboojum: that error dump is at least very clear | 22:10 | |
masak | sorear: in Niecza, how do I define a class with a custom postcircumfix:<[ ]> ? | ||
sorear | the C-stack overflowed | ||
22:11
bbkr left
|
|||
sorear | masak: defining a custom postcircumfix:<[ ]> method works. | 22:11 | |
masak: you can also use at-key exactly like Rakudo | |||
snarkyboojum: it looks like something stupid involving exception handling triggering additional exceptions | 22:12 | ||
22:13
g2` left,
bbkr joined,
lumi__ left
|
|||
masak | sorear: cool, thanks. | 22:14 | |
22:14
lumi__ joined,
patspam left
|
|||
sorear | snarkyboojum: you might try 1. running the offending command with 'mono --trace=none ..' 2. running the offending command with 'NIECZA_TRACE=all mono ...' | 22:15 | |
(don't do both on the same run; the tracers wind up trying to trace each other and performance tanks' | |||
) | |||
snarkyboojum | with mono --trace=none I get screenfuls of exception errors until I ctrl-c | 22:16 | |
22:16
PacoLinux_ left
|
|||
sorear | snarkyboojum: I'm only interested in the last few before the segfault | 22:17 | |
ExitRunloopExceptions and ContinueUnwindExceptions (generally) aren't interesting, they're used internally by the niecza coroutine engine | 22:18 | ||
snarkyboojum | sorear: I'm modifying Makefile to do RUN_CLR=mono --trace=none - is that appropriate? :) | 22:19 | |
sorear | snarkyboojum: I wouldn't | ||
there's only one failing command | |||
copy and paste | |||
if you put it in the Makefile you're liable to forget to remove it, and I don't see what benefit it brings | 22:20 | ||
masak | 'night, #perl6 | ||
snarkyboojum | sorear: oh - I assumed I needed to pass that switch to the mono invocation. Where do I pass --trace=none then? | ||
sorear | snarkyboojum: type "mono --trace=none boot/run/Niecza.exe -C CORE | 22:21 | |
" | |||
snarkyboojum | sorear: oops - ok | ||
sorear | snarkyboojum: > tempfile.txt | ||
22:22
lumi__ left,
masak left
|
|||
pmurias | sorear: yes, implementing most of the ops won't be hard, but there is still a bunch of them ;) | 22:22 | |
22:23
lumi__ joined
|
|||
pmurias | sorear: are strings builtin into mono? | 22:23 | |
sorear | yes, for moderate values of "builtin" | ||
semantically, they're just another class in the standard library | 22:24 | ||
pmurias | what i'm curious if they are treated extra fast? | 22:26 | |
snarkyboojum | sorear: FWIW - it's just a stream of "[0xac93a2c0:] EXCEPTION handling: System.NullReferenceException: Object reference not set to an instance of an object" errors - not very meaningful to me | 22:27 | |
sorear | snarkyboojum: nothing between the lines? that's what I thought | ||
snarkyboojum | sorear: nothing else - just that spewed out until mono dumps | 22:28 | |
sorear | snarkyboojum: would you nopaste the last ~50 lines of the --trace=all output? | ||
snarkyboojum | sorear: sure - gist.github.com/1210215 | 22:29 | |
sorear | snarkyboojum: that looks like --trace=none output | 22:30 | |
snarkyboojum | eek - that was with trace=none :D | ||
sorear: try again :) | 22:31 | ||
22:35
pmurias left
|
|||
snarkyboojum | sorear: I reckon it's something wonky with my mono install post upgrade - probably best that I not waste your time with this.. | 22:36 | |
sorear: like go-mono.com/forums/#nabble-td3562696 :| | 22:37 | ||
sorear: thanks for your help - I'm just going to try a later version of mono - definitely not a Niecza problem I'd say | 22:39 | ||
22:44
lumi__ left
|
|||
sorear | snarkyboojum: ...yes, your mono install is _wonky- | 22:44 | |
jnthn | sleep & | ||
sorear | I mean seriously, you have null pointers in your NullPointerException class structure | ||
22:44
lumi__ joined
|
|||
snarkyboojum | sorear: aye - craziness :D | 22:48 | |
pretty impressive breakage between OS releases | |||
22:50
lumi__ left
22:57
PacoLinux_ joined
|
|||
snarkyboojum | so in summary - don't try and run Mono 2.8.2 on OS X Lion - it appears horribly broken. | 23:00 | |
2.10.5 works nicely however, and I now have a working Niecza again :) | |||
23:00
PacoLinux left,
PacoLinux_ is now known as PacoLinux
|
|||
snarkyboojum | and next time I'll do my homework a little more thoroughly :| | 23:05 | |
sorear | snarkyboojum: wanna close the bug? | 23:07 | |
snarkyboojum | sorear: sure - and thanks again :) | 23:08 | |
23:10
mj41 left
23:15
patspam joined
23:20
donri left
23:28
Vlavv left,
Vlavv` left
23:37
bluescreen10 joined,
Vlavv joined
23:45
lichtkind left,
skangas left
|
|||
mberends | here is some Perl 6 GUI progress, a semi working Gtk Calc program for Niecza, patches welcome gist.github.com/1210303 | 23:47 | |
23:47
f00li5h joined
23:52
patspam left,
Chillance left
|