»ö« 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:04 adu joined 00:11 sjohnson left 00:12 sjohnson joined, Timbus left 00:14 sivoais left 00:18 Timbus joined 00:20 sjohnson left, sjohnson joined, tokuhirom joined 00:21 sivoais joined 00:28 simcop2387 is now known as SIMCOP2387 00:33 sisar joined 00:40 atrodo left 01:11 xinming left 01:12 xinming joined 01:15 scott_ joined 01:23 mucker left
pmichaud TimToady: what about .[] in that case, though? does it automatically flatten as well? 01:27
I'm trying to aummarize some of the use cases and results to see if they're what we want.
(on paper for now; will gist a summary a bit later) 01:28
I'm thinking that I prefer that .elems remain 2, with .[] also doing the same, and to get flattening you have to go into an explicit flattening context. This would be for Lists; Parcels would still flatten .elems and .[] by default. (Yes, that seems backwards; I'm not sure of a better way to resolve it with the semantics we've already defined.) 01:30
anyway, more a bit later, I'm being called to another $event 01:31
bbiaw
01:38 whiteknight left 01:39 adu left 01:45 mtk left 01:48 mtk joined 01:49 skids left
sorear pmichaud++ 02:14
02:36 xinming left 02:39 telex left 02:40 jtpalmer_ left
dalek ecza: 40e422d | (Solomon Foster)++ | src/ (2 files):
Implementation of [&func] 2-arity function to operator.
02:40
ast: 76b1c8f | (Solomon Foster)++ | S03-operators/infixed-function.t:
A few simple tests for [&func]. More tests would be very welcome.
02:54
02:55 xinming joined
dalek ecza: 12b71c7 | (Solomon Foster)++ | t/spectest.data:
Turn on S03-operators/infixed-function.t.
02:55
02:58 tokuhirom left 03:06 BlueT_ left 03:07 BlueT_ joined 03:09 jaldhar joined 03:11 tyatpi_ left 03:12 tyatpi_ joined 03:15 tyatpi left 03:16 tyatpi joined 03:23 skids joined 03:27 stephenlb left 03:58 tyatpi_ left 04:01 tyatpi_ joined 04:04 Timbus left, Tene left 04:06 arnsholt left 04:09 bbkr joined, Timbus joined, Tene joined 04:16 tyatpi_ left, tyatpi left 04:18 adu joined 04:21 Pleiades` left 04:22 Timbus left, Tene left, Timbus joined 04:23 bbkr left, Pleiades` joined 04:26 tyatpi joined 04:27 Tene joined 04:32 Pleiades` left 04:33 Pleiades` joined 04:39 aloha left 04:40 tyatpi_ joined 04:42 aloha joined
moritz \o 04:50
04:57 jtpalmer joined
sorear o/ 04:59
pmichaud \o/ 05:03
pmichaud just booked his flights for yapc::eu and mtmh
masak goo' mo' #p'6 05:05
pmichaud masak: o/
moritz mtmh? 05:08
pmichaud act.yapc.eu/mtmh2012/
adu \o/ 05:11
05:32 kaleem joined
jnthn morning (for just a moment...train soon) 05:36
masak yeah, same. 05:38
jnthn pmichaud: yay...glad you're making both of those \o/
05:43 birdwindupbird joined
masak train & 05:51
jnthn -> station
Probably offline most of the day 05:52
tadzik see you later :)
06:13 am0c joined, adu left, adu joined 06:18 ilogger2 joined 06:19 ChanServ sets mode: +v ilogger2 06:28 sergot joined
sergot hi o/ 06:28
06:30 cognominal joined
tadzik hello sergot 06:31
06:31 cognominal left 06:37 fhelmberger joined 06:47 wtw joined 06:57 odoacre joined 06:59 brrt joined
dalek ast: 8437524 | moritz++ | S06-operator-overloading/sub.t:
longest operator wins, even for user-defined operators. RT #11418
07:05
07:11 cognominal joined
dalek ast: 4e78667 | jimmy++ | S06-operator-overloading/sub.t:
fixed RT number
07:14
moritz jimmyz++ 07:15
dalek ast: 6447786 | moritz++ | S14-roles/conflicts.t:
private methods are carried in the role-to-role applier, RT #111664
07:24
07:25 kresike joined
kresike good morning all you happy perl6 people 07:25
07:25 fglock joined
moritz hello kresike 07:26
kresike hello moritz o/ 07:27
frettled morning! 07:30
kresike morning frettled ! 07:43
07:49 cognominal left 08:01 araujo joined 08:02 not_gerd joined
not_gerd hello, #perl6 08:02
r: sub foo(:$bar = 42 --> Int) { ... }
p6eval rakudo 88a9d6: OUTPUT«===SORRY!===␤Missing block␤at /tmp/93kzZgVwDp:1␤»
not_gerd ^ known bug?
n: sub foo(:$bar = 42 --> Int) { ... }
p6eval niecza v19-4-g12b71c7: OUTPUT«Potential difficulties:␤ $bar is declared but not used at /tmp/K9r8TL7LJF line 1:␤------> sub foo(:⏏$bar = 42 --> Int) { ... }␤ &foo is declared but not used at /tmp/K9r8TL7LJF line 1:␤------> sub foo⏏(:$bar = 42 --> Int)…
moritz r: sub ( --> Int) { } 08:03
p6eval rakudo 88a9d6: ( no output )
moritz r: sub (42 --> Int) { }
p6eval rakudo 88a9d6: ( no output )
moritz r: sub ($bar = 42 --> Int) { }
p6eval rakudo 88a9d6: OUTPUT«===SORRY!===␤Missing block␤at /tmp/VbnLbyYe2z:1␤»
moritz not_gerd: I don't remember it, so probably not known
r: sub ($bar --> Int) { }
p6eval rakudo 88a9d6: ( no output )
08:19 GlitchMr joined
not_gerd r: 42.ACCEPTS('foo') 08:19
p6eval rakudo 88a9d6: OUTPUT«Cannot convert string to number: base-10 number must begin with valid digits or '.' in '⏏foo' (indicated by ⏏)␤ in method Numeric at src/gen/CORE.setting:9475␤ in sub infix:<==> at src/gen/CORE.setting:2509␤ in sub infix:<==> at src/gen/CORE.setting:2509␤ in me…
not_gerd bug?
moritz I don't think so 08:20
smart-matching against a number is supposed to coerce the matchee to a number
and that fails => BOOM
not_gerd this breaks given 'foo' { when 42 { ... } }, which should work, imo
moritz the old behavior gave a false positive for when 0 { ... } 08:22
not_gerd n: given 'foo' { when 42 { ... } }
p6eval niecza v19-4-g12b71c7: OUTPUT«Unhandled exception: Cannot parse number: foo␤ at /home/p6eval/niecza/lib/CORE.setting line 1402 (die @ 5) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3480 (ANON @ 11) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3482 (NumSyntax.str2num @ 5) ␤ at /…
moritz we *could* catch that failure, and simply return False 08:23
but for that I'd want TimToady++'s thumbs-up first
08:46 dakkar joined 09:03 szabgab joined 09:06 szabgab left 09:28 not_gerd left
sisar "my foo $x;" --> I want foo to be a data type which is 10-bits long, occupy contiguous memory, and is bit addressable via the .[] accessor. Foo is ... ? 09:45
s/foo/Foo
09:45 domidumont joined
moritz NYI 09:46
sisar :) 09:47
what will "int4" give me ?
moritz I guess Array[uint1] would be it if it were implemented
4 bits
and an integer-like interface, not a list-of-bits-like interface
sisar hmm, what about buf4 ? 09:48
moritz that would give you a list-like interface to int4s 09:50
let's backtrack
what do you want to achieve?
sisar oh, there is no buf4. We have only buf1, buf8, buf16, buf32 and buf64. 09:51
moritz: i simply want a 10-bit binary number.
*want to store a 10bit binary no.
and then I *hope* to do binary operations on it. 09:52
moritz so, use an Int for now 09:54
or an int, maybe
sisar thinks more about it
r: my int $x; say $x.bytes; 10:00
p6eval rakudo 88a9d6: OUTPUT«1␤»
sisar r: my int $x; say $x.bits;
p6eval rakudo 88a9d6: OUTPUT«No such method 'bits' for invocant of type 'Int'␤ in block <anon> at /tmp/mfjhk0zM4c:1␤␤»
sisar r: my Binary $x; 10:03
p6eval rakudo 88a9d6: OUTPUT«===SORRY!===␤Malformed my␤at /tmp/ZzELUvySOB:1␤»
10:06 alvis` joined 10:09 daxim joined 10:16 cognominal joined 10:23 cognominal left 10:48 cognominal joined 10:52 skids joined, cognominal left
mhasch sisar: why not Array[Bool] ? 11:01
colomon r: my int $x = 65531; say $x.bytes; say $x 11:05
p6eval rakudo 88a9d6: OUTPUT«5␤65531␤»
colomon I don't think .bytes does what you think....
(i mean, sisar...) 11:06
11:12 JimmyZ joined 11:18 spider-mario joined
moritz .bytes is a Str method 11:26
phenny moritz: 'is a Str method'
moritz phenny: shut up
so it coerces the int to a string first, and then tells you how many bytes it would be in a certain encoding (UTF-8 in rakudo's case) 11:27
11:48 tyatpi joined 11:49 mtk joined
colomon I think it might prevent confusion if .bytes only worked on stringy things.... 11:51
moritz it might prevent confusiion of .bytes only worked on Buf 11:52
s/of/if/
but that's my constant disagreement with TimToady++ -- he wants the Str/Buf distinction to DWIM as much as possible, I want them to be as clearly separated as possible 11:53
and given how we handle type DWIMmery in the setting so far, I kinda feel it's a lost cause 11:54
kresike I think .chars makes more sense on Str these days 11:55
colomon If Buf isn't stringy, then Bug and Stringy. 12:00
*Buf
sigh, made that typo twice when typing that line, only caught it once
moritz Bug.name eq 'Camelia' 12:01
colomon anyway, naively speaking, .bytes sounds like it should be Perl 6's equivalent of sizeof. But it totally isn't.
moritz colomon: I don't see the poing of having .bytes in Stringy
*point
it tells you how big something is after a hypothetical conversion to Buf 12:02
and there's a default encoding for that conversation 12:03
colomon I certainly don't have a use case for it. I'm just trying to be conservative in my reduction of scope.
moritz but other file handles can have other encoding settings
so it's relly just a guess
colomon always thought Str.bytes was the actual size of the Str object in bytes.... 12:04
moritz then why would Str have it, and other types don't?
colomon well, the string part of it, anyway, not the p6 object part 12:05
12:05 tyatpi_ joined
moritz pnr: say 'a'.bytes 12:05
p6eval niecza v19-4-g12b71c7: OUTPUT«2␤»
..rakudo 88a9d6, pugs: OUTPUT«1␤»
12:05 alvis` left
colomon it was the old example (at least filtered thought my brain): Str.length was gone, replaced with Str.chars for the length in characters and Str.bytes for the length in bytes. 12:07
12:08 mucker joined
moritz yes, but the length in memory is pretty useless 12:08
since all IO needs to go through a conversion process anyway (at least in the abstract)
colomon I'm not saying you're wrong. 12:10
moritz anyway, I think I've repeated myself often enough, and doing it in more breadth won't help, so I'll shut up.
colomon moritz: we do absolutely agree that allowing Real.bytes to convert to a Str then report on how many bytes it would take if that Str were encoded to a Buf is pretty insane, right? 12:15
rn: say 43.bytes
p6eval niecza v19-4-g12b71c7: OUTPUT«4␤»
..rakudo 88a9d6: OUTPUT«2␤»
colomon rn: say 431.bytes 12:17
p6eval niecza v19-4-g12b71c7: OUTPUT«6␤»
..rakudo 88a9d6: OUTPUT«3␤»
moritz nr: say chr(0xFFFF1).bytes 12:18
p6eval rakudo 88a9d6, niecza v19-4-g12b71c7: OUTPUT«4␤»
moritz nr: for 1, 2, 4 ... 0x10000 { say "$_ ", .chr.bytes } 12:19
p6eval rakudo 88a9d6: OUTPUT«1 1␤2 1␤4 1␤8 1␤16 1␤32 1␤64 1␤128 1␤256 2␤512 2␤1024 2␤2048 3␤4096 3␤8192 3␤16384 3␤32768 3␤65536 4␤»
..niecza v19-4-g12b71c7: OUTPUT«1 2␤2 2␤4 2␤8 2␤16 2␤32 2␤64 2␤128 2␤256 2␤512 2␤1024 2␤2048 2␤4096 2␤8192 2␤16384 2␤32768 2␤65536 4␤»
pmichaud good morning, #perl6 12:21
moritz good am, pm
12:32 Pleiades` joined
moritz .u á 12:37
phenny U+00E1 LATIN SMALL LETTER A WITH ACUTE (á)
12:47 Pleiades` left 12:50 Pleiades` joined 12:58 cognominal joined 12:59 Pleiades` left 13:00 PacoAir joined 13:05 Pleiades` joined, dakkar left, dakkar joined 13:07 atrodo joined
flussence maybe we'd be better off having reasonable .Buf methods on default types instead of trying to fix Str.bytes... 13:08
13:11 Pleiades` left
TimToady indeed 13:13
13:13 Pleiades` joined, cognominal left 13:15 Psyche^ joined, Psyche^ is now known as Patterner 13:19 grondilu joined
grondilu any news about the compilation problem that occured lately? 13:24
13:24 JimmyZ left 13:28 adu joined 13:29 shinobicl joined
TimToady moritz: I have not wanted .bytes to work on Str for years, and then only if the Str has multiple levels, which is unlikely to ever happen 13:30
pmichaud We can certainly eliminate it.
afaik, the only reason it exists in Rakudo is because the spec mentioned it :) 13:31
tadzik hello #perl6 13:33
pmichaud hello, tadzik. Exams done?
13:34 sirrobert joined
kresike hello tadzik 13:34
tadzik pmichaud: well, yeah
that's like the worst luck I've had on this university 13:35
I needed 21 points to pass this one, and I've been given exactly 21
"Oh, looks like you have 50% points from this class, and you need over 50%. Bad luck, see you in september"
pmichaud Sorry to hear that. 13:36
TimToady that's when you hunt down the teacher and argue another point out of them
tadzik bah, at least it's over
rjbs timtoady++
sisar tadzik: subject ?
tadzik that's also when they say "How about no"
sisar: algorithm analysis 13:37
pmichaud I tried to argue a point out of a professor once; he threatened to lower my grade. :-/
rjbs Yow
pmichaud Only 'B' I received my entire college career. :-(
13:37 bluescreen10 joined
rjbs pmichaud: sympathy levels dropping! :) 13:37
pmichaud rjbs: :)
rjbs: yeah, and it was in my last undergrad semester, too. :) 13:38
13:38 atrodo left
tadzik heh, the only B 13:38
rjbs graduated with an exactly 3.0 average. :/
13:38 cognominal joined
tadzik I got 4.2 last semester, this one is probably closer to 2.4 than 4.2 13:38
13:38 UncleFester6 joined
tadzik ah, whatever, at least it's summer 13:39
pmichaud needed 90.00 points for an 'A', I had 89.60 points, and the difference came down to a difference of opinion about the subtitle of a book used in a report I wrote. :)
rjbs pmichaud: Wow.
sisar moritz: i did consider an array of bools, but two methods i really want to call on my 10bit number were .pred and .succ. And then I want to add and subtract two such nos too.
tadzik hah, at least a pass from Databases \o/
pmichaud I figure the professor just didn't like me. Anyway, it obviously didn't make a lot of difference, so I didn't push it that strongly.
although perhaps I should've used TimToady++'s "hunt down the teacher" suggestion, albeit a bit more literally :-) 13:40
I mean, this is Texas, after all. 13:41
tadzik++ # pass from Databases 13:42
tadzik he he
13:42 HarryS joined 13:45 JimmyZ joined 13:46 cognominal left
PerlJam pmichaud: you got a B at CCSU? I don't believe it. 13:47
pmichaud PerlJam: I did.
One unfortunate midterm (misunderstood oral instructions from prof) and the aforementioned title dispute in a report. 13:48
In a Texas History class, no less.
sirrobert heh 13:49
I missed a test once (for some good reason) and had to make it up. The written test had instructions on it, so I followed them. 13:50
Got the test back with a low C... took it home and checked it many times.
Finally went back and said, "I don't understand how these are wrong... can you show me?" 13:51
she said, "There were special instructions for that part of the test that superceded the written instructions."
...
I said, "You didn't tell me any special instructions..."
she said, "You didn't ask!"
Wouldn't change the grade (french class)
13:52 erkan joined, erkan left, erkan joined
sisar pmichaud: what is the "hunt down the teacher" suggestion ? 13:53
TimToady I musta gone to a nice college; one physics professor hunted me down and said he was raising my grade after reconsidering a policy
pmichaud I did that a couple of times
sirrobert Just an occasional flakey faculty 13:54
pmichaud <-- flakey faculty, definitely
13:54 sergot1 joined
PerlJam TimToady: you went to bizarro-university, clearly. 13:54
sirrobert HTTP::Client is failing tests... does anyone know of another http client library? 13:55
TimToady there are advantages to going to a school where the teachers actually like the students
tadzik sirrobert: how about LWP::Simple?
13:55 sergot left
sirrobert doh, searched for http so I missed lwp::simple =) 13:55
tadzik :) 13:56
note to self: we need tags :)
sirrobert note to tadzik: I agree ;)
Something I always thought the cpan could use. 13:57
pmichaud more directly.... why is it called "LWP::Simple" ?
seems like a more descriptive name would be helpful there :) 13:58
PerlJam ETOOMUCHMIMIC
sirrobert lib www perl
lwp
pmichaud if I'm a non-perl programmer looking at p6, ....
tadzik well, it's called LWP::Simple because it once look like LWP::Simple :) 13:59
pmichaud imho a name change might be in order
JimmyZ what does LWP mean?
sirrobert lib www perl
JimmyZ doesn't know
PerlJam JimmyZ: see sirrobert 14:00
JimmyZ yes I see
aloha: see PerlJam
aloha: seen PerlJam
aloha JimmyZ: PerlJam was last seen in #perl6 39 seconds ago saying "JimmyZ: see sirrobert".
14:00 wtw left
tadzik pmichaud: +1, but I'd rather just consider dropping the ::Simple part 14:00
half of our modules are called ::Simple, ::Tiny, ::Easy 14:01
14:01 tyatpi left
sirrobert I strongly favor technology and protocol names 14:01
(over cutesy names like, "bonabo", a module for generating big floats... because I like monkies") 14:02
tadzik :)
sirrobert I like the cutesy names fine for projects, though =) for modules I like descriptive.
tadzik that gets boring after some time
hoelzro sirrobert++
pmichaud sirrobert: well, I agree; but I don't know "LWP" as a technology name. I know "HTTP" and "WWW" and "Web"
tadzik when you see everything named Awesome::Async::Webscale::HHTP::Server::Simple::PSGI
sirrobert yeah, I'm saying LWP is a *bad* name, not a good one 14:03
sisar .oO ( there is Wikipedia page for LWP en.wikipedia.org/wiki/Library_for_WWW_in_Perl !)
tadzik then I'd prefer LaserCow or so
PerlJam sirrobert: so ... you don't like Mojolicioius or Catalyst or Dancer or ... (pick some other Perl 5 tech that has non-tech names)
sirrobert tadzik: heh
daxim LWP is just an abbreviation for libwww-perl
14:03 alvis joined
sirrobert PerlJam: Like I said, I like fun names for *projects*, and descriptive for code 14:03
Catalyst::Protocol:HTTP or something 14:04
PerlJam Then think of LWP as a "project" and you're good 14:05
:)
sirrobert heh
daxim did yall know that gisle doesn't do perl in his day job anymore? it anyone has the tuits to take over lwp and finally add ipv6 support, do it 14:06
PerlJam And that's what it is really (in Perl 5 land). LWP::protocol::http, LWP::UserAgent, LWP::Auten::Digest, etc.
sirrobert daxim: I'll take a look at it if I can. 14:07
daxim: But I'll probably clone and re-name it ;)
GlitchMr I made a test webpage in awk, but I'm almost sure it would be simpler in Perl 6 14:10
14:12 UncleFester6 left 14:13 bluescreen10 left 14:15 alester joined, kaare_ joined
TimToady moritz: see irclog.perlgeek.de/perl6/2009-05-27#i_1183338 for instance, which is more than three years ago. Please don't accuse me of being stupider than I already am. :) 14:25
tadzik departs
moritz TimToady: sorry, I've probably mixed it up with other Buf/Str discussions 14:26
GlitchMr For question how many bytes string "abcd1345" takes you could answer 8, 16, 32, 3000, 183929 and anything else 14:36
14:42 kaleem joined
colomon TimToady: does that mean you're okay with getting rid of Cool.bytes? 14:42
TimToady re 'when 42' I think that .ACCEPTS should simply not accept anything that returns failure. This is part of the OKness proposal. And failure to convert should return failure, not automatically throw.
colomon: I'm more than ok with that 14:43
colomon +1 +1
moritz takes out his katana 14:45
pmichaud do we want to use .bytes as an example of deprecation, or just kill it immediately (in Rakudo)?
shinobicl hi....has the compiling process for rakudo changed in any way?
moritz shinobicl: compared to when? 14:46
pmichaud: I've only patched the specs so far
pmichaud moritz: okay, good
dalek ecs: 275caab | moritz++ | S (2 files):
get rid of Str.bytes
moritz pmichaud: so, how do we deprecate stuff now?
TimToady well, I've been deprecating it for years, but nobody ever listens to me :)
shinobicl i had a script that updated rakudo on my machine once a week. i haven't checked it for like a month but when i tried to run rakudo if failed. now, in the compiling i have this error "invoke() not implemented in class 'OPER'"
s/if/it/ 14:47
colomon is spectesting Niecza without .bytes right now...
moritz TimToady: we should simply rm -rf the specs, and replace it by a fold over the IRC logs :-)
pmichaud moritz: that's a good question. Basically I think we put a note in the ChangeLog, in the announcement, and declare a date at which we expect it to be removed.
14:48 thou joined
TimToady ±1 :) 14:48
pmichaud and probably a note in the source wouldn't hurt, either. 14:49
14:49 thou left
pmichaud also, I totally agree about .ACCEPTS should not be throwing things :-) 14:49
dalek ast: 7719875 | moritz++ | S (2 files):
throw out some Str.bytes tests

most were commented out already
14:51
colomon restarts spectest to get moritz++'s changes 14:52
moritz colomon: that was probably not comprehensive 14:53
colomon my ack suggested there weren't very many tests...
and most of them were commented out
moritz I guess somebody has to go through the socket tests at some point 14:54
pmichaud are we eliminating .bytes on Buf, also, ooc? 14:56
moritz no
it makes a lot of sense there
(especially since our Buf is really a Buf8) 14:57
TimToady what doesn't make much sense on Buf is .chars, unless maybe it's explicitly a utf8 buf 14:58
and even there is should probably only support .codes
pmichaud I don't need .chars on Buf
TimToady *t
of course, with our current Str implementations we should only support .codes and not .chars :) 14:59
or make a 'use codepoints;' declaration mandatory for now...
since graphemes is supposed to be the default 15:00
pmichaud add some tests, make it so (at least in the spec); we'll get rakudo to catch up after the next release
moritz -1 to mandatory 'use codepoints'; 15:01
it breaks all of our old scripts
and many of them don't care at all about the distinction
pmichaud we'll need to update our older scripts, then. doesn't have to be immediately; but we should stop the .chars meme if it's going to be incorrect. 15:02
TimToady wasn't seriously suggesting it, but it will be a potential point of pain when we eventually switch to NFG
moritz I guess it's much less of a pain point than our switch to make | honor LTM 15:03
TimToady certainly it's a small issue for languages that are fully supported by NFC
moritz speaking of which, I'd really love to see array-variable-interpolation in regexes
TimToady assuming our current semantics are consistent with NFC more than with NFD
pmichaud array-var-interpolation in regexes is really tricky. 15:04
moritz pmichaud: why?
pmichaud ltm
dalek ecza: 75130da | (Solomon Foster)++ | lib/CORE.setting:
Remove Cool.bytes.
15:04 grondilu left
moritz pmichaud: "but we already have LTM" 15:04
pmichaud you have to dynamically construct a ltm based on the contents of the array at each execution
we don't have dynamic ltm
TimToady the hard part is the caching
moritz pmichaud: does that mean that / a | b | $x / also doesn't properly LTM at the moment? 15:05
TimToady you can always write a grammar and eval it
pmichaud moritz: it might. We could use some tests for it. :)
TimToady but you don't want to do that every time
moritz r: my $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
p6eval rakudo 88a9d6: OUTPUT«a␤»
moritz masak! where's masak? 15:06
:-)
just to be sure, that's supposed to LTM, right?
pmichaud aiui, yes.
I know that @array is supposed to act like @array[0] | @array[1] | @array[2] | ... 15:07
(unless surrounded by ||, or some such)
TimToady well, unless compiled in a || context
moritz n: my $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
TimToady moritz: yes, $x should match since the literal prefix is only used as a tiebreaker
p6eval niecza v19-4-g12b71c7: OUTPUT«a␤»
moritz submits rakudo and nieczabugs 15:08
15:08 bluescreen10 joined
TimToady oh, wait 15:10
Variable matches are considered declarative if and only if the variable
is known to represent a constant
moritz I know it's a constant in the example above 15:11
TimToady nr: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
moritz so it's known
p6eval rakudo 88a9d6: OUTPUT«a␤»
..niecza v19-4-g12b71c7: OUTPUT«ab␤»
TimToady er, known to the compiler without heroic efforts :)
moritz the dangers of passive speech in technical documents, part 1 15:12
TimToady so niecza is correct to make a distinction there
and a non-constant array should only do LTM internally; it does not participate in an external LTM even if first
pmichaud woo hoo! 15:13
that makes @array a lot easier, and doable.
I missed that clause, apparently.
TimToady hey, maybe we shouldn't delete the specs after all :)
moritz :-)
and it also makes @array a lot less useful :(
pmichaud @array still does internal LTM, that's probably okay.
moritz ok, right 15:14
moritz updates rakudobug
rt.perl.org/rt3/Ticket/Display.html?id=113884 fwiw
TimToady bbl & 15:15
pmichaud that bit about constant and declarativeness needs repeating in the section on @array interpolation
otherwise it's way too easy to assume (as we all did) that @array remains declarative.
moritz pmichaud: any objections to merging the 'io' branch into nom? all it does is factor out the file tests into a role, which makes experimenting with different IO stuff outside the setting much easier 15:18
(and I expect future iterations to apply that role to more classes)
pmichaud moritz: as long as existing APIs are essentially preserved, I'm fine with it. 15:19
I like having the file tests separate.
moritz pmichaud: they are; no spectest regressions either
pmichaud +1 then
moritz only difference is that if somebody queries IO.^roles or so...
pmichaud I'm not going to fight for that level of API compatibility just yet. 15:20
colomon moritz: btw, I don't notice any additional spectest failures from removing .bytes (in niecza)
pmichaud I wonder if it's worth creating an "is deprecated" trait. :-) 15:21
sisar what are "NFG", "NFC", "NFD" ?
moritz colomon: niecza doesn't run the socket tests, right?
colomon moritz: doubt it
moritz (that's the only location where Str.bytes might be left)
sisar: normal forms for strings
pmichaud then we can mark methods as "deprecated" in the source and perhaps have an option that causes invocation of deprecated methods to throw an exception.
moritz sisar: see for example en.wikipedia.org/wiki/Unicode_equivalence 15:22
sisar moritz: ah, was just going to ask u for more info :)
pmichaud thinks there might already be something to do this in the spec.
moritz sisar: and NFG is "our" own invention for locally creating a normal form that is more composed than NFC can
15:23 thou joined
sorear good * #perl6 15:23
sisar moritz: thanks.
adu good * 15:24
sisar I learn something new everyday, just hanging out in #perl6 and asking dumb questions :)
15:30 cognominal joined 15:31 fglock left 15:35 atrodo joined, JimmyZ left
rsimoes are there any (unofficial, of course) 24-bit encodings of the unicode character set? 15:35
15:44 tyatpi_ left
TimToady sure, just call it UTF-24 15:44
sjohnson :3 15:45
rjbs Not that I know of, but it seems like it would be pretty simple to produce one.
TimToady in fact, you can just truncate the upper 0 bits for anything down to UTF-21 :) 15:49
flussence is unicode even defined for up to 2**21 codepoints?
(well I know nothing *uses* them that high up, but just the limit in general) 15:50
rjbs It maxes out at 0x10_FFFF 15:51
(which lies between 2**20 and 2**21)
Juerd U+10ffff is 4 bytes in UTF-8
This means that the only benefit of UTF-32 is fixedwithness, which is hardly ever necessary anyway :) 15:52
And it's only fixed width in practice, in theory IIRC it coud be variable width.
rjbs Could it?
Juerd IIRC :) 15:53
flussence perl5 has those weird base-128 numbers in pack()...
rjbs I /think/ you are mistaken, but am not sure.
Juerd rjbs: Wikipedia seems to suggest that I am indeed mistaken.
rjbs My copy of the 6.1 spec just arrived yesterday. 15:54
Juerd So do many other sources, so I sit corrected :)
adu base-128?!?
rjbs It's very floppy. Unlike the 3.1 spec, it does not include all the character tables. ☹
Juerd Tree murderer!!!!11 15:55
adu Juerd: the gamut of code points is only 21 bits, I don't see how that would overflow 32 bits
rjbs Juerd: Ever since the tree ate that kid in Poltergeist, I have hated trees.
Juerd adu: For now... :D
rjbs Juerd: Unicode have promised that 10_ffff is the limit forever. :-)
Juerd You know what they said about 640 K 15:56
rjbs Extraterrestrial contact may compliate things.
adu Juerd: so you're saying after they encode every variant of every Chinese scribble anyone has ever scribbled, we might run out?
15:56 tyatpi_ joined
adu Juerd: or do you think emoticons will be to blame? 15:56
15:56 crazedpsyc is now known as CRAZEDPSYC
Juerd At one point we'll also have to move up from IPv6 to IPv>6, because the 128 bit address space is exhausted. 15:56
adu Juerd: that assumes the world doesn't collapse 15:57
Juerd adu: For starters, I believe that every IPv6 address will eventually get its own Unicode glyph.
If we survive 2012, the world won't collapse.
adu Juerd: that's an odd belief
Juerd adu: As most powers of 2 are even, I think the belief should also be even, rather than odd. 15:59
adu Juerd: you don't do math do you?
Juerd adu: I try not to
But today, apparently Tau day, I did read the manifesto.
pmichaud D'oh! I forgot today is Tau day! 16:00
Juerd On how pi is wrong and everything. I'm convinced.
adu all positive integer powers of 2 are even, not "most"
Juerd pmichaud: 6/28; duh! Don't you know Tau to at least 10 decimals? :D
adu: All positive ones, but 2**0 isn't.
0 being non-positive doesn't make 2**0 a non-power of 2 :)
adu arguably, most power of 2 are complex irrationals 16:01
pmichaud Juerd: my wedding anniversary is Pi day :)
16:01 brrt left
Juerd pmichaud: On purpose? 16:01
adu pmichaud: lucky you!
pmichaud Juerd: no, it just worked out that way. Funny thing is that I can always remember our anniversay, while my wife often forgets. :) 16:02
pmichaud adds Tau day to his calendar so he won't forget in the future.
Juerd That's fortunate, because if it were on purpose, you'd have to re-marry on 6/28 to correct the mistake :P
adu what is tau? 16:03
pmichaud tau = 2 * pi
Juerd No, pi = tau/2 ;) 16:04
pmichaud tauday.com/
kresike bye all 16:10
16:10 kresike left 16:25 fhelmberger left 16:28 GlitchMr left, tyatpi_ left, am0c joined 16:30 cognominal left 16:33 kaleem left
sisar arrgh, this is the second time i did the same mistake. When replying to mails in the mailing list, I should always use "Reply to all" ? I used to think that since the mail was sent by [email@hidden.address] hitting just "Reply" would mail back to [email@hidden.address] 16:35
But hitting "reply" replies to the OP and not the list. 16:36
(GMail)
any suggestions ? 16:37
timotimo depends on the setup of the mailing list software. i think there are several relevant headers that can be used to cause several different effects :(
16:38 cognominal joined 16:39 sporous joined 16:48 kaleem joined 16:52 daxim left
sisar creates RT #113888 16:53
16:58 pupoque joined 17:02 kaleem left 17:04 GlitchMr joined 17:05 dakkar left 17:08 majrmovies joined, pyrimidine joined
moritz weren't we at the 111XXX numbers just a short while ago? 17:15
17:30 tyatpi joined 17:46 cognominal left 17:47 skids left
dalek ast: f3372db | (Solomon Foster)++ | S03-metaops/zip.t:
Fudge for Niecza.
17:48
17:54 birdwindupbird joined 17:59 immortal joined, immortal left, immortal joined 18:01 erkan left 18:05 rjbs joined 18:07 thou left, cognominal joined
dalek kudo/nom: cc780c2 | moritz++ | src/core/IO.pm:
move file tests to IO::FileTestable
18:13
kudo/nom: 39087ad | moritz++ | src/core/IO.pm:
Merge branch 'io' into nom
pmichaud moritz++ 18:14
18:14 majrmovies left
moritz that means people can experiment with gist.github.com/3003456 on latest nom 18:14
18:21 fridim__ joined 18:25 cognominal left
dalek ast: c1653e3 | (Solomon Foster)++ | S (2 files):
Unfudge for Niecza.
18:34
colomon rn: my $x = Bool; say ~$x 18:36
p6eval rakudo 88a9d6: OUTPUT«use of uninitialized value of type Bool in string context in block <anon> at /tmp/HBu2If6O1R:1␤␤␤»
..niecza v19-5-g75130da: OUTPUT«Bool()␤»
moritz pmichaud, jnthn: the printing of variables in uninitialized warnings is rather brittle; even if we can make it to never print the variable name of the current sub (which happens right now), it still sometimes prints the name of other variables in the setting
colomon rm: my $x = Bool; my $y = $x; say $y 18:37
pmichaud I suspect that's because the names are tied to the container (at the point where it's declared)
moritz if you can think of a way to make it more robust, I'd love to do that. If not, I'd propose to remove that piece of code
sirrobert What testing module do most of you use? 18:38
moritz sirrobert: Test.pm
colomon: rn, not rm
sirrobert moritz: thanks
moritz colomon: and rakudo is right there
colomon rn: my $x = Bool; my $y = $x--; say $y.perl
p6eval niecza v19-5-g75130da: OUTPUT«0␤»
..rakudo 88a9d6: OUTPUT«Bool::False␤»
colomon rn: my $x = Bool; my $y = $x; say $y.perl 18:39
p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«Bool␤»
colomon wth?
pmichaud what's the question?
moritz: I suspect what we need to do is eliminate variable names from scalars that are intended to be bound/returned 18:40
(in $rw contexts)
colomon why do $y = $x-- and $y = $x have different values for $y?
pmichaud colomon: it has to do with the meaning of --
example coming up
colomon isn't the entire point of postdecrement that you return the value and then do the decrement?
pmichaud rn: my $x = Any; my $y = $x--; say $y.perl 18:41
p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«0␤»
pmichaud rn: my $x = Any; my $y = $x; say $y.perl
p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«Any␤»
pmichaud the spec is explicit about the Any case. Rakudo treats Bool the same way as Any. 18:42
sirrobert What's perl6's version of "prove"? 18:45
colomon sirrobert: "prove"
pmichaud colomon: S03:545
PerlJam sirrobert: prove
flussence prove -e perl6
sirrobert heh
flussence++ =)
colomon pmichaud: yeah. huh. 18:46
moritz we just stole the testing protocol from p5
colomon rn: say Bool ~~ Numeric
p6eval rakudo 88a9d6: OUTPUT«False␤»
..niecza v19-5-g75130da: OUTPUT«True␤»
moritz nr: enum A <b c>; say A ~~ Numeric
p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«True␤»
moritz Bool isn't a proper enum (yet?) in Rakudo 18:47
pmichaud we could still at least make Bool a subset of Int, though. 18:48
so that Bool ~~ Numeric and Bool ~~ Int would be correct.
s/subset/subclass/
colomon the language of the spec seems to say that my $x = Bool; my $y = $x--; say $y.perl should indeed be 0
colomon certainly does not care one way or the other 18:49
unless, I guess, the undefined Bool is a Bool, and is considered to be an obvious exception to the next paragraph.
18:50 Chillance joined
pmichaud nr: enum A <b c>; say A.defined 18:50
p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«False␤»
moritz nr: say True.sqrt
p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«1␤»
pmichaud nr: sub xyz(Int $x) { say $x; }; xyz(True); 18:51
p6eval rakudo 88a9d6: OUTPUT«Nominal type check failed for parameter '$x'; expected Int but got Bool instead␤ in sub xyz at /tmp/dtrws9lyA4:1␤ in block <anon> at /tmp/dtrws9lyA4:1␤␤»
..niecza v19-5-g75130da: OUTPUT«True␤»
pmichaud niecza++ rakudo-- # according to S12
moritz I'll see if it's easy to fix
pmichaud I suspect it's not easy to fix
depending on how low-level bools are defined in NQP/Rakudo
moritz Could not build C3 linearization: ambiguous hierarchy
pmichaud: I suspect you are right 18:52
pmichaud booleans are one of the key places where circularity sawing comes into effect
moritz it sure it
pmichaud I suspect it'll want jnthn++ to weigh in on it
nr: say Bool ~~ Int 18:54
p6eval rakudo 88a9d6: OUTPUT«False␤»
..niecza v19-5-g75130da: OUTPUT«True␤»
pmichaud files rakudobug
moritz I wonder if something "clever" could work, where we create a bootsrapping, cheating Bool as we do now, and then a proper enum Bool, and somehow fudge it so that they still typecheck the same
pmichaud I suspect we really want our low-level bools to be ints
moritz but that might lead to nasty corner cases
colomon back to the Bool thing: Niecza seems to follow the "Increment/decrement of an undefined Numeric, Cool, or Any variable sets the variable to 0 and then performs the increment/decrement." rule and Rakudo the "Decrement [of a Bool] turns it false" rule. 18:55
moritz nr: my Bool $b; say $b++
p6eval rakudo 88a9d6: OUTPUT«False␤»
..niecza v19-5-g75130da: OUTPUT«0␤»
moritz it just feels odd to have it return a value that doesn't conform to the type constraint 18:56
which is why I side with rakudo here
pmichaud converting a Bool to an Int seems very wrong.
colomon but that's exactly the way that Any and Cool work.
pmichaud Any and Cool aren't bools :)
colomon mind you, I'm inclined to agree that converting a Bool to an Int seems wrong
pmichaud more to the point, Int ~~ Any and Int ~~ Cool but Int !~~ Bool
rn: say Int ~~ Bool 18:57
p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«False␤»
pmichaud thus while it's okay to convert Any or Cool into a Int (subclass), it seems wrong to convert a Bool into an Int (superclass)
18:57 sftp joined
colomon rn: my Str $s; say $s++ 18:58
p6eval rakudo 88a9d6: OUTPUT«Type check failed in assignment to '$s'; expected 'Str' but got 'Int'␤ in sub postfix:<++> at src/gen/CORE.setting:1345␤ in block <anon> at /tmp/h4JCkN7NO6:1␤␤»
..niecza v19-5-g75130da: OUTPUT«0␤»
pmichaud rn: enum A <a b>; my A $x; $x = 0; say $x.WHAT
p6eval niecza v19-5-g75130da: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Int, needed A or subtype␤ at /tmp/y3Bei5nxVA line 1 (mainline @ 4) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3916 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3917 (mo… 18:59
..rakudo 88a9d6: OUTPUT«Type check failed in assignment to '$x'; expected 'A' but got 'Int'␤ in block <anon> at /tmp/ucgZ_xY0PB:1␤␤»
pmichaud rn: my Bool $x; $x = 0; say $x.WHAT
p6eval niecza v19-5-g75130da: OUTPUT«Unhandled exception: Nominal type check failed for scalar store; got Int, needed Bool or subtype␤ at /tmp/jrBQcjyE79 line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3916 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 3917 …
..rakudo 88a9d6: OUTPUT«Type check failed in assignment to '$x'; expected 'Bool' but got 'Int'␤ in block <anon> at /tmp/tJ36WjPghd:1␤␤»
pmichaud so, both niecza and rakudo agree on those; especially the notion that putting an integer zero into a Bool var is a type check fail
rn: say "".succ; # curious 19:00
p6eval niecza v19-5-g75130da: OUTPUT«WTF␤»
..rakudo 88a9d6: OUTPUT«␤»
pmichaud heh
sisar lol #niecza
pmichaud n: my $a = ''; $a++; $a++; $a++; $a++; say $a;
p6eval niecza v19-5-g75130da: OUTPUT«WTI␤»
moritz it never ceases to amuse me
pmichaud n: my $a = ''; $a++; say $a; $a++; $a++; say $a;
p6eval niecza v19-5-g75130da: OUTPUT«WTF␤WTH␤»
sisar "WTI" ? 19:01
pmichaud I had an extra increment in there :-/
moritz world trade institute
colomon rn: my $s = Str; say $s++
p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«0␤»
moritz just amkes stuff up
pmichaud I agree we should probably consider the Str case analogously to Bool
zero is almost assuredly wrong there.
moritz I see four obvious choices 19:02
'0', 'a', 'A', Failure
pmichaud also ''
moritz '0' is probably not good, because it's False
in boolean context, that is
pmichaud: also false in boolean context 19:03
pmichaud: and then you'd still have to find a good value for ''.succ
sisar wants to file a nieczabug for "using unknown abuse WTI in error" :p
pmichaud oh, I'm certain that ''.succ is ''
rn: say '-'.succ
p6eval niecza v19-5-g75130da: OUTPUT«WTF␤»
..rakudo 88a9d6: OUTPUT«-␤»
pmichaud I could argue that ''.succ is a Failure, though. 19:04
19:04 adu left
sisar Does Unicode define some kind of "comes after" and "comes before" for (some) characters ? 19:04
pmichaud as is incrementing any string that doesn't have valid portion to increment 19:05
moritz sisar: there are collation charts which you can use for sorting
pmichaud of course, if ''.succ returns Failure, that's still false. :-)
sisar looks up collation charts
moritz or maybe s/charts/tables/ 19:06
thing is, that's a very language specific concept
for example the Germans sort their Umlauts along with the base char, but the Norwegians sort the å after z
sisar um, I'm not looking for sorting as such, sorting makes compromises in that is says that 'a' comes after 'Z' and before 'b', but English inherently doe not have this order, i think. This order was created for dictionaries, etc. 19:10
Sorting makes compromises, in this context.
moritz string incrementing and decrementing also makes compromises and cultural assumptions
sisar um, i'm sorry if i'm being vague. I'm myself unfamiliar with language intricacies and Unicode. 19:11
moritz a Norwegian could expect 'z'.succ to return 'å', while many others would be quite surpised by that behavior
sisar moritz: i'm curious. Like a (English) child who is taught abc, is a Norwegian child, when taught alphabets, that '􏿽xE5' comes after 'z'? 19:13
arrgh, poor grammar, sisar-- 19:14
moritz sisar: yes
sisar moritz: interesting. /me looks up Norwegian alphabet 19:15
moritz 'a'..'z', 'å', 'æ', 'ø' iirc
and the Spanish learn 'm', 'n', 'ñ' (says my wife) 19:16
pmichaud en.wikipedia.org/wiki/Danish_and_No...n_alphabet # maybe? 19:20
moritz ok, æ ø å :-) 19:21
sisar aye
(Wikipedia) "The Danish and Norwegian alphabet is based upon the Latin alphabet and has consisted of the following 29 letters since 1917 (Norwegian) and 1955 (Danish), although Danish did not officially recognize the W as a separate letter until 1980."
sisar is surprised at the "official"-ness os deciding alphabets in languages. 19:22
s/os/of
moritz sisar: have you ever heard of the Academie Francaise? 19:23
moritz might have mispellt it
sisar moritz: no
sisar looks it up 19:24
moritz sisar: it's an official institution in France which regulates the language. They have laws that limit the use of foreign words in the media
sisar (Wikipedia) "The Acad􏿽xE9mie consists of forty members, known as immortels (immortals)." Immortals, really? lol 19:25
pmichaud just because you call something 'immortal' doesn't make it so. :)
sisar (oops, sorry if this offends any of our French friends) 19:26
sorry
dalek c: 1a2dd21 | moritz++ | lib/Cool.pod:
be [Cool]
19:29
pmichaud looks to see if any new yapc::na videos have been posted. *sadface*
moritz r: say Mu.new ~~ Mu.new 19:30
p6eval rakudo 39087a: OUTPUT«Cannot call 'ACCEPTS'; none of these signatures match:␤:(Mu:U , Mu \$topic, Mu *%_)␤␤ in method ACCEPTS at src/gen/CORE.setting:547␤ in block <anon> at /tmp/V9aqGfjCGM:1␤␤»
19:30 immortal left
diakopter ha 19:30
dalek c: d64108c | moritz++ | lib/Mu.pod:
[Mu] method ACCEPTS
19:32
sisar (Indian Constitution) ""It shall be the duty of the Union to promote the spread of the Hindi language, ... by drawing, wherever necessary or desirable, for its vocabulary, primarily on Sanskrit and secondarily on other languages." 19:33
Our constitution mandates the govt to *create* new words in Hind !
*Hindi
19:33 erkan joined
moritz well, the French do that too. When you're limited in how many foreign words you're allowed to used, you need non-foreign words for new stuff 19:34
sisar and hence we have the "Central Hindi Directorate".
sisar never knew !
moritz phenny: en fr "computer"? 19:35
phenny moritz: "ordinateur" (en to fr, translate.google.com)
moritz phenny: en fr "hard disc"?
phenny moritz: "disque dur" (en to fr, translate.google.com)
sisar phenny: en hi "computer"?
phenny sisar: "कंप्यूटर" (en to hi, translate.google.com)
moritz ok, that's a word-for-word translation
.u कंप्यूटर
phenny moritz: U+0915 U+0902 U+092A U+094D U+092F U+0942 U+091F U+0930
dalek c: 88abdef | pmichaud++ | lib/Mu.pod:
Typo fix; note that :U also includes failure.
19:36
sisar moritz: "कंप्यूटर" is a literal transliteration.
bah, anyways, trying to understand language can drive one insane easily. As programming languages can :) 19:38
moritz r: given 'foo' -> $x { .say } 19:45
p6eval rakudo 39087a: OUTPUT«Any()␤»
moritz r: CATCH -> $x { default { say "ex: $x" } }; die "foo" 19:48
p6eval rakudo 39087a: OUTPUT«===SORRY!===␤Missing block␤at /tmp/T3Gcuxs0ZG:1␤»
dalek p/sigspace: b49ec74 | pmichaud++ | src/ (2 files):
Leading whitespace at beginning of regex isn't significant.
19:52
p/sigspace: 5249e92 | pmichaud++ | src/QRegex/P6Regex/Grammar.nqp:
Allow <.ws> at the beginning of an arglist.
moritz n: CATCH -> $x { default { say "ex: $x" } }; die "foo" 19:54
p6eval niecza v19-5-g75130da: OUTPUT«===SORRY!===␤␤Missing block at /tmp/GBl0POQ_8y line 1:␤------> CATCH ⏏-> $x { default { say "ex: $x" } }; die ␤␤Parse failed␤␤»
pmichaud I need to figure out the stability policy for handling leading ws in regexes and the ?-quantifier switch. 19:55
I suppose it could be merged just after the next release. 19:57
moritz did we promise stability to the users of 2012.06?
pmichaud I'm starting to make those sorts of promises, yes.
19:58 cj__ joined
pmichaud I haven't identified a specific release. otoh, there will almost certainly be more such changes in the future, just because of the nature of p6 language development. 19:58
sisar the "Missing or wrong version of dependency.." error has changed. It now also says "current instr.: '' pc 496 (src/gen/perl6.pir:200) (src/main.nqp src/gen/main-version.nqp:0)" 20:01
"instr." is short for ?
diakopter instruction? 20:02
pmichaud certainly it's "instruction". not sure why it's abbreviated; I suspect Parrot is doing that.
sisar I did ack-grep "current instr:." and all five occurences were found in parrot source code. 20:03
pmichaud yes, looks like parrot in src/sub.c
20:04 not_gerd joined
not_gerd hello, #perl6 20:04
not_gerd pings pmichaud with a friendly reminder about bug #113666 20:06
20:07 GlitchMr left
pmichaud not_gerd: I've been working on that. Turns out it's a deep bug that requires fixing a lot of other things first. 20:08
20:08 majrmovies joined
pmichaud basically I have to rewrite most of Str.match... but I'm suspicious that the gather/take bugs identified yesterday also may come into play 20:09
moritz r: CATCH { default { $! = $_ } }; die 'foo'; say "ex: $!"; # just curious 20:11
p6eval rakudo 39087a: ( no output )
moritz r: do { CATCH { default { $! = $_ } }; die 'foo' }; say "ex: $!"; # just curious
p6eval rakudo 39087a: OUTPUT«ex: foo␤»
moritz cool
not_gerd pmichaud: do you expect fixing this will significantly reduce the amount of memory required to build rakudo? 20:12
pmichaud not_gerd: no.
20:12 mucker left
moritz n: grammar A { token TOP { .+ } }; A.parse('foo'); say ~$/ 20:15
p6eval niecza v19-5-g75130da: OUTPUT«foo␤»
20:15 shinobicl left
moritz is there anything besides 'try' that sets $!? 20:18
pmichaud not_gerd: well, it might reduce the memory required by about 25MB. Not sure if that's "significant". 20:21
20:21 stephenl1 joined
pmichaud but that's actually a separate (but analogous) fix to the one identified in the ticket. 20:21
not_gerd pmichaud: not as far as I'm concerned
pmichaud the problem in the ticket only occurs when running rakudo programs, not when compiling rakudo. 20:22
not_gerd my main interest is getting the shootout scripts to work again
pmichaud not_gerd: it's something I'm working on a little each day -- I even have hard copy printouts of the code in question in front of me on my desk :)
given it's a shootout issue... that might spur me to bump it up a bit more. 20:23
right now I'm suffering from a very rich supply of things to fix/work on
dalek c: 7988a7c | moritz++ | lib/perlvar.pod:
[perlvar] $_, $/ and $!
20:24
20:24 vmspb joined
sirrobert There's something I'm not quite getting about enums... Why does this happen? (gist.github.com/3013692) 20:26
I would expect to have to call something like Something::SOME to get output I'm getting.
woops, fixed a typo in the gist... 20:28
gist.github.com/3013692
moritz r: enume Something <SOME THING>; say Something('thing') 20:29
p6eval rakudo 39087a: OUTPUT«===SORRY!===␤CHECK FAILED:␤Undefined routine '&Something' called (lines 1, 1)␤Undefined routine '&enume' called (line 1)␤»
moritz r: enum Something <SOME THING>; say Something('thing')
p6eval rakudo 39087a: OUTPUT«Something()␤»
moritz sirrobert: the lookup is case sensitive, and returns the type object when it fails
sirrobert I'm not doing: say Something('thing'); 20:30
I'm doing: say Example::SOME("thing");
The enum value is getting priority over the sub name... but without needing the "Something::" prefix. It's getting loaded into the "Example::" namespace. 20:31
sisar sirrobert: right, actually you are not even using the enum at all. Commenting it out should work. 20:32
PerlJam aye, but the question remains ... why?
sirrobert Well, I use the enum elsewhere
that's a super-simplified case
sisar PerlJam: aye.
moritz hm 20:33
sirrobert I just wanted to point out the issue without clutter.
moritz r: module A { enum B <C D>; our sub C() { 'sub' }; say A::C()
p6eval rakudo 39087a: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2, near ""␤»
PerlJam Are enums "our" by default?
moritz r: module A { enum B <C D>; our sub C() { 'sub' } }; say A::C()
p6eval rakudo 39087a: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub-signature␤ in method postcircumfix:<( )> at src/gen/CORE.setting:2114␤ in <anon> at src/gen/BOOTSTRAP.pm:811␤ in any <anon> at src/gen/BOOTSTRAP.pm:807␤ in block <anon> at /tmp/ZSrl_Fouyd:1␤␤»…
sisar is there an extra space in "SOME (Str $str)" ? shouldn't there be no space between the subname and the signature ?
sirrobert when I do that in a single script, btw, the output is as expected.
moritz r: module A { enum B <C D>; our sub C() { 'sub' } }; say A::C 20:34
p6eval rakudo 39087a: OUTPUT«C␤»
moritz that also uses the enum value
PerlJam r: module A { my enum B <C D>; our sub C() { 'sub' } }; say A::C
p6eval rakudo 39087a: OUTPUT«sub␤»
sirrobert r: enum Something <SOME THING>; our sub SOME (Str $str) { return "str: $str" }; SOME("thing"); 20:35
p6eval rakudo 39087a: ( no output )
sirrobert (without the context of a module in that case)
20:36 birdwindupbird left
sirrobert enum A <B C>; sub B (Str $str) { return "str: $str"; }; say B('thing'); 20:36
r: enum A <B C>; sub B (Str $str) { return "str: $str"; }; say B('thing'); 20:37
p6eval rakudo 39087a: OUTPUT«str: thing␤»
sirrobert (no module context there)
For now I'm going to change the name of the sub from SOME to HACK_SOME (to motivate me to get a resolution =). It'll unblock my progress; but I'd still love to know what the issue is =) 20:41
pmichaud sirrobert: that may fall under the guideline that anything with parens is a function call. 20:42
although I agree that enum syntactic sugar is specialish
sirrobert well... I want to call the function
20:42 pat_js joined
pmichaud it is calling the function, afaict 20:42
oh! I see.
sirrobert =)
pmichaud use a & to make it explicit :-) 20:43
&Example::SOME('thing')
moritz r: enum A <b c>; sub b() { 'sub' }; say b; say b()
p6eval rakudo 39087a: OUTPUT«b␤sub␤»
moritz it works for lexical names
just not for ::-joined names
I guess it should
sirrobert surely that's not a feature ;)
pmichaud how about Example::SOME::('thing') 20:44
sirrobert pmichaud: watch 20:45
r: module X {enum A <B C>; sub B (Str $str) { return "str: $str"; };}; say &X::B('thing');
p6eval rakudo 39087a: OUTPUT«No such method 'Any' for invocant of type 'Str'␤ in <anon> at src/gen/BOOTSTRAP.pm:799␤ in any <anon> at src/gen/BOOTSTRAP.pm:796␤ in block <anon> at /tmp/FAhl4JmYSF:1␤␤»
sirrobert prefixing with & broke it
moritz pmichaud: should use the enum
pmichaud r: module X { sub B { ... } }; say &X::B;
p6eval rakudo 39087a: OUTPUT«Any()␤»
moritz sub vs. our sub
pmichaud X == bad module name 20:46
r: module ABC { our sub B { ... } }; say &ABC::B;
p6eval rakudo 39087a: OUTPUT«sub B() { ... }␤»
moritz r: module X { our sub B { ... } }; say &X::B
p6eval rakudo 39087a: OUTPUT«sub B() { ... }␤»
moritz no problem here with X
sirrobert pmichaud: ah, I see (the "our")
pmichaud r: module ABC { enum DEF < d e f >; our sub B { ... } }; say ABC::DEF
p6eval rakudo 39087a: OUTPUT«DEF()␤»
pmichaud r: module ABC { enum B < d e f >; our sub B { ... } }; say ABC::B 20:47
p6eval rakudo 39087a: OUTPUT«B()␤»
pmichaud r: module ABC { enum B < d e f >; our sub B { ... } }; say ABC::B()
p6eval rakudo 39087a: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub-signature␤ in method postcircumfix:<( )> at src/gen/CORE.setting:2114␤ in <anon> at src/gen/BOOTSTRAP.pm:811␤ in any <anon> at src/gen/BOOTSTRAP.pm:807␤ in block <anon> at /tmp/foVBii13wr:1␤␤»…
pmichaud r: module ABC { enum B < d e f >; our sub B { 'sub B' } }; say ABC::B()
p6eval rakudo 39087a: OUTPUT«Not enough positional parameters passed; got 0 but expected 1 in sub-signature␤ in method postcircumfix:<( )> at src/gen/CORE.setting:2114␤ in <anon> at src/gen/BOOTSTRAP.pm:811␤ in any <anon> at src/gen/BOOTSTRAP.pm:807␤ in block <anon> at /tmp/5frClaCgoY:1␤␤»…
pmichaud r: module ABC { enum B < d e f >; our sub B { 'sub B' } }; say (&ABC::B)()
p6eval rakudo 39087a: OUTPUT«sub B␤»
pmichaud r: module ABC { enum B < d e f >; our sub B(*@args) { 'sub B' } }; say (&ABC::B)(1) 20:48
p6eval rakudo 39087a: OUTPUT«sub B␤»
pmichaud r: module ABC { enum B < d e f >; our sub B(*@args) { 'sub B' } }; say ABC::B(1)
p6eval rakudo 39087a: OUTPUT«e␤»
pmichaud r: module ABC { enum B < d e f >; our sub B(*@args) { 'sub B' } }; say &ABC::B(1)
p6eval rakudo 39087a: OUTPUT«sub B␤»
pmichaud yeah, the & can force the sub version.
sirrobert I feel like the priority should be reversed
(for whatever *that's* worth =)
pmichaud r: module ABC { enum B < d e f >; our sub B(*@args) { 'sub B' } }; say ABC::B::(1) 20:49
p6eval rakudo 39087a: OUTPUT«===SORRY!===␤Combination of indirect name lookup and call not (yet?) allowed at line 2, near ""␤»
sirrobert or maybe enums are way more important than I grok
pmichaud we'd probably need a ruling from TimToady and/or jnthn++ on that. The spec seems ambiguous as to which would get priority here. 20:50
moritz I find the whole usage of our-subs very misguided
the proper way is to export stuff
sirrobert ok, watch this.....
r: module X { enum A <B C>; say A::B; say B; }; say X::B;
moritz dunno if enums can be exported so far
p6eval rakudo 39087a: OUTPUT«B␤B␤B␤»
pmichaud the problem of priority still manifests with exported stuff.
sirrobert inside the module, should A::B and B be the same? 20:51
20:51 Je joined
moritz pmichaud: for exported stuff the disambiguation works better in current rakudo 20:51
sirrobert: yes
that's why both Bool::True and True work 20:52
sirrobert Ah...
I think I just don't get enums yet.
pmichaud moritz: if a module exports both a enum named 'Day' and a sub named '&Day', then what does Day(1) do?
sirrobert at least, I don't get them well enough to use them well ;)
moritz pmichaud: I hope it invokes the sub 20:53
sirrobert *I* would expect Day(1) to call the sub.
20:53 pyrimidine left
pmichaud that's what I mean by "exporting doesn't resolve the ambiguity" :-) 20:53
moritz r: module A { enum Day is export <Mon Tue>; sub Day is export { 'sub Day' } }; import A; say Day(0);
p6eval rakudo 39087a: OUTPUT«Mon␤»
moritz eeks
pmichaud there's an inherent syntax pun here. One can argue that Day(0) should prefer the enum because it's a much closer name match. 20:54
moritz thinks we should start to punish people for puns :-) 20:55
pmichaud does that place you at the front of the line, moritz? ;-)
sirrobert r: module A { enum Day <Mon Tue>; sub Day (Int $a) is export { 'sub Day' } }; import A; say Day(0); 20:57
p6eval rakudo 39087a: OUTPUT«sub Day␤»
moritz yes, I'm trying to demonstrate leadership qualities by... oh wait, we're not in a Dilbert cartoon, are we?
sirrobert Why does *that* happen?
(the enum was not exported)
pmichaud that's why it happens.
sirrobert oh, heh
I see
pmichaud only &Day was exported.
sirrobert the return value of Day threw me ;)
Well, for now I am going to use &...::SubName to disambiguate. 20:58
Should I file a ... something about it?
pmichaud you can file it as rakudobug for now; just list it as "Day(1)" is ambiguous if both "enum Day" and "sub Day" are defined. 20:59
sirrobert deal
pmichaud and give moritz++'s "eeks" example from above
sirrobert++ 21:00
afk, errands 21:03
sirrobert sent; going home.
not_gerd bye, #perl6 21:05
21:05 not_gerd left 21:11 Je left 21:21 atrodo left
tadzik masak: ping 21:24
eiro: ping
jnthn: ping
damnit. Anyone around? 21:26
sorear hi. i exist.
flussence n: say [+] 1..500000 21:27
sorear tadzik?
p6eval niecza v19-5-g75130da: OUTPUT«(timeout)»
flussence n: gist.github.com/3007551 21:28
tadzik sorear: do you have a way to get eiro's phone number?
p6eval niecza v19-5-g75130da: OUTPUT«125000250000␤»
tadzik possible from the fpw wobsite
21:29 kaare_ left 21:33 thou joined 21:39 pupoque left 21:42 bluescreen10 left 21:47 fridim__ left, bluescreen10 joined 21:51 bruges joined 21:52 fridim__ joined 21:55 MayDaniel joined
tadzik ffs, I have no idea what's going on here 21:56
21:56 arlinius joined
flussence puts a mousetrap out with an unfiled bug inside 21:58
22:00 cognominal joined 22:05 moukeddar joined
diakopter hi from Google I/O 22:15
sergot1 hi diakopter! o/ 22:16
22:17 PacoAir left 22:18 moukeddar left, bluescreen10 left, fridim__ left 22:21 sergot1 left 22:24 jaldhar joined 22:29 vmspb left 22:33 Celelibi left 22:34 cognominal left 22:37 MayDaniel left 22:39 cognominal joined 22:42 Celelibi joined 22:43 majrmovies left 22:48 jaldhar left 22:53 cj__ is now known as cj
pmichaud phenny: tell TimToady I'm hoping you can answer the question on p6u about the rationale behind say vs print (gist versus string). I can write a response, but I'm fearfull I'll miss some of the nuances you ran into. 23:06
phenny pmichaud: I'll pass that on when TimToady is around.
pmichaud afk, soccer practice 23:07
23:07 nebu joined 23:08 nebu left 23:17 whiteknight joined, whiteknight is now known as Guest57355 23:38 vlixes joined 23:55 skids joined