Perl 6 - the future is here, just unevenly distributed

IRC log for #perl6, 2012-06-28

Perl 6 | Reference Documentation | Rakudo

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:04 adu joined #perl6
00:12 sjohnson joined #perl6
00:18 Timbus joined #perl6
00:20 sjohnson joined #perl6
00:20 tokuhirom joined #perl6
00:21 sivoais joined #perl6
00:33 sisar joined #perl6
01:12 xinming joined #perl6
01:15 scott_ joined #perl6
01:27 pmichaud TimToady: what about .[] in that case, though?  does it automatically flatten as well?
01:27 pmichaud I'm trying to aummarize some of the use cases and results to see if they're what we want.
01:28 pmichaud (on paper for now; will gist a summary a bit later)
01:30 pmichaud 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 pmichaud anyway, more a bit later, I'm being called to another $event
01:31 pmichaud bbiaw
01:48 mtk joined #perl6
02:14 sorear pmichaud++
02:40 dalek niecza: 40e422d | (Solomon Foster)++ | src/ (2 files):
02:40 dalek niecza: Implementation of [&func] 2-arity function to operator.
02:40 dalek niecza: review: https://github.com/sorear/niecza/commit/40e422da52
02:54 dalek roast: 76b1c8f | (Solomon Foster)++ | S03-operators/infixed-function.t:
02:54 dalek roast: A few simple tests for [&func]. More tests would be very welcome.
02:54 dalek roast: review: https://github.com/perl6/roast/commit/76b1c8fc5f
02:55 xinming joined #perl6
02:55 dalek niecza: 12b71c7 | (Solomon Foster)++ | t/spectest.data:
02:55 dalek niecza: Turn on S03-operators/infixed-function.t.
02:55 dalek niecza: review: https://github.com/sorear/niecza/commit/12b71c7360
03:07 BlueT_ joined #perl6
03:09 jaldhar joined #perl6
03:12 tyatpi_ joined #perl6
03:16 tyatpi joined #perl6
03:23 skids joined #perl6
04:01 tyatpi_ joined #perl6
04:09 bbkr joined #perl6
04:09 Timbus joined #perl6
04:09 Tene joined #perl6
04:18 adu joined #perl6
04:22 Timbus joined #perl6
04:23 Pleiades` joined #perl6
04:26 tyatpi joined #perl6
04:27 Tene joined #perl6
04:33 Pleiades` joined #perl6
04:40 tyatpi_ joined #perl6
04:42 aloha joined #perl6
04:50 moritz \o
04:57 jtpalmer joined #perl6
04:59 sorear o/
05:03 pmichaud \o/
05:03 * pmichaud just booked his flights for yapc::eu and mtmh
05:05 masak goo' mo' #p'6
05:05 pmichaud masak: o/
05:08 moritz mtmh?
05:08 pmichaud http://act.yapc.eu/mtmh2012/
05:11 adu \o/
05:32 kaleem joined #perl6
05:36 jnthn morning (for just a moment...train soon)
05:38 masak yeah, same.
05:38 jnthn pmichaud: yay...glad you're making both of those \o/
05:43 birdwindupbird joined #perl6
05:51 masak train &
05:51 * jnthn -> station
05:52 jnthn Probably offline most of the day
05:52 tadzik see you later :)
06:13 am0c joined #perl6
06:13 adu joined #perl6
06:18 ilogger2 joined #perl6
06:28 sergot joined #perl6
06:28 sergot hi o/
06:30 cognominal joined #perl6
06:31 tadzik hello sergot
06:37 fhelmberger joined #perl6
06:47 wtw joined #perl6
06:57 odoacre joined #perl6
06:59 brrt joined #perl6
07:05 dalek roast: 8437524 | moritz++ | S06-operator-overloading/sub.t:
07:05 dalek roast: longest operator wins, even for user-defined operators. RT #11418
07:05 dalek roast: review: https://github.com/perl6/roast/commit/8437524015
07:11 cognominal joined #perl6
07:14 dalek roast: 4e78667 | jimmy++ | S06-operator-overloading/sub.t:
07:14 dalek roast: fixed RT number
07:14 dalek roast: review: https://github.com/perl6/roast/commit/4e78667edb
07:15 moritz jimmyz++
07:24 dalek roast: 6447786 | moritz++ | S14-roles/conflicts.t:
07:24 dalek roast: private methods are carried in the role-to-role applier, RT #111664
07:24 dalek roast: review: https://github.com/perl6/roast/commit/6447786b54
07:25 kresike joined #perl6
07:25 kresike good morning all you happy perl6 people
07:25 fglock joined #perl6
07:26 moritz hello kresike
07:27 kresike hello moritz o/
07:30 frettled morning!
07:43 kresike morning frettled !
08:01 araujo joined #perl6
08:02 not_gerd joined #perl6
08:02 not_gerd hello, #perl6
08:02 not_gerd r: sub foo(:$bar = 42 --> Int) { ... }
08:02 p6eval rakudo 88a9d6: OUTPUT«===SORRY!===␤Missing block␤at /tmp/93kzZgVwDp:1␤»
08:02 not_gerd ^ known bug?
08:02 not_gerd n: sub foo(:$bar = 42 --> Int) { ... }
08:02 p6eval niecza v19-4-g12b71c7: OUTPUT«Potential difficulties:â�¤  $bar is declared but not used at /tmp/K9r8TL7LJF line 1:â�¤------> [32msub foo(:[33mâ��[31m$bar = 42 --> Int) { ... }[0mâ�¤  &foo is declared but not used at /tmp/K9r8TL7LJF line 1:â�¤------> [32msub foo[33mâ��[31m(:$bar = 42 --> Int)…
08:03 moritz r: sub ( --> Int) { }
08:03 p6eval rakudo 88a9d6:  ( no output )
08:03 moritz r: sub (42 --> Int) { }
08:03 p6eval rakudo 88a9d6:  ( no output )
08:03 moritz r: sub ($bar = 42 --> Int) { }
08:03 p6eval rakudo 88a9d6: OUTPUT«===SORRY!===␤Missing block␤at /tmp/VbnLbyYe2z:1␤»
08:03 moritz not_gerd: I don't remember it, so probably not known
08:03 moritz r: sub ($bar --> Int) { }
08:03 p6eval rakudo 88a9d6:  ( no output )
08:19 GlitchMr joined #perl6
08:19 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…
08:19 not_gerd bug?
08:20 moritz I don't think so
08:20 moritz smart-matching against a number is supposed to coerce the matchee to a number
08:20 moritz and that fails => BOOM
08:20 not_gerd this breaks given 'foo' { when 42 { ... } }, which should work, imo
08:22 moritz the old behavior gave a false positive for   when 0 { ... }
08:22 not_gerd n: given 'foo' { when 42 { ... } }
08:22 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 /…
08:23 moritz we *could* catch that failure, and simply return False
08:23 moritz but for that I'd want TimToady++'s thumbs-up first
08:46 dakkar joined #perl6
09:03 szabgab joined #perl6
09:28 not_gerd left #perl6
09:45 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 sisar s/foo/Foo
09:45 domidumont joined #perl6
09:46 moritz NYI
09:47 sisar :)
09:47 sisar what will "int4" give me ?
09:47 moritz I guess Array[uint1] would be it if it were implemented
09:47 moritz 4 bits
09:47 moritz and an integer-like interface, not a list-of-bits-like interface
09:48 sisar hmm, what about buf4 ?
09:50 moritz that would give you a list-like interface to int4s
09:50 moritz let's backtrack
09:50 moritz what do you want to achieve?
09:51 sisar oh, there is no buf4. We have only buf1, buf8, buf16, buf32 and buf64.
09:51 sisar moritz: i simply want a 10-bit binary number.
09:51 sisar *want to store a 10bit binary no.
09:52 sisar and then I *hope* to do binary operations on it.
09:54 moritz so, use an Int for now
09:54 moritz or an int, maybe
09:54 * sisar thinks more about it
10:00 sisar r: my int $x; say $x.bytes;
10:00 p6eval rakudo 88a9d6: OUTPUT«1␤»
10:00 sisar r: my int $x; say $x.bits;
10:00 p6eval rakudo 88a9d6: OUTPUT«No such method 'bits' for invocant of type 'Int'␤  in block <anon> at /tmp/mfjhk0zM4c:1␤␤»
10:03 sisar r: my Binary $x;
10:03 p6eval rakudo 88a9d6: OUTPUT«===SORRY!===␤Malformed my␤at /tmp/ZzELUvySOB:1␤»
10:06 alvis` joined #perl6
10:09 daxim joined #perl6
10:16 cognominal joined #perl6
10:48 cognominal joined #perl6
10:52 skids joined #perl6
11:01 mhasch sisar: why not Array[Bool] ?
11:05 colomon r: my int $x = 65531; say $x.bytes; say $x
11:05 p6eval rakudo 88a9d6: OUTPUT«5␤65531␤»
11:05 colomon I don't think .bytes does what you think....
11:06 colomon (i mean, sisar...)
11:12 JimmyZ joined #perl6
11:18 spider-mario joined #perl6
11:26 moritz .bytes is a Str method
11:26 phenny moritz: 'is a Str method'
11:26 moritz phenny: shut up
11:27 moritz 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:48 tyatpi joined #perl6
11:49 mtk joined #perl6
11:51 colomon I think it might prevent confusion if .bytes only worked on stringy things....
11:52 moritz it might prevent confusiion of .bytes only worked on Buf
11:52 moritz s/of/if/
11:53 moritz 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:54 moritz and given how we handle type DWIMmery in the setting so far, I kinda feel it's a lost cause
11:55 kresike I think .chars makes more sense on Str these days
12:00 colomon If Buf isn't stringy, then Bug and Stringy.
12:00 colomon *Buf
12:00 colomon sigh, made that typo twice when typing that line, only caught it once
12:01 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.
12:01 moritz colomon: I don't see the poing of having .bytes in Stringy
12:01 moritz *point
12:02 moritz it tells you how big something is after a hypothetical conversion to Buf
12:03 moritz 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.
12:03 moritz but other file handles can have other encoding settings
12:03 moritz so it's relly just a guess
12:04 * 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?
12:05 colomon well, the string part of it, anyway, not the p6 object part
12:05 tyatpi_ joined #perl6
12:05 moritz pnr: say 'a'.bytes
12:05 p6eval niecza v19-4-g12b71c7: OUTPUT«2␤»
12:05 p6eval ..rakudo 88a9d6, pugs: OUTPUT«1␤»
12:07 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:08 mucker joined #perl6
12:08 moritz yes, but the length in memory is pretty useless
12:08 moritz since all IO needs to go through a conversion process anyway (at least in the abstract)
12:10 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.
12:15 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 colomon rn: say 43.bytes
12:15 p6eval niecza v19-4-g12b71c7: OUTPUT«4␤»
12:15 p6eval ..rakudo 88a9d6: OUTPUT«2␤»
12:17 colomon rn: say 431.bytes
12:17 p6eval niecza v19-4-g12b71c7: OUTPUT«6␤»
12:17 p6eval ..rakudo 88a9d6: OUTPUT«3␤»
12:18 moritz nr: say chr(0xFFFF1).bytes
12:18 p6eval rakudo 88a9d6, niecza v19-4-g12b71c7: OUTPUT«4␤»
12:19 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␤»
12:19 p6eval ..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␤»
12:21 pmichaud good morning, #perl6
12:21 moritz good am, pm
12:32 Pleiades` joined #perl6
12:37 moritz .u á
12:37 phenny U+00E1 LATIN SMALL LETTER A WITH ACUTE (á)
12:50 Pleiades` joined #perl6
12:58 cognominal joined #perl6
13:00 PacoAir joined #perl6
13:05 Pleiades` joined #perl6
13:05 dakkar joined #perl6
13:07 atrodo joined #perl6
13:08 flussence maybe we'd be better off having reasonable .Buf methods on default types instead of trying to fix Str.bytes...
13:12 TimToady indeed
13:13 Pleiades` joined #perl6
13:15 Psyche^ joined #perl6
13:19 grondilu joined #perl6
13:24 grondilu any news about the compilation problem that occured lately?
13:28 adu joined #perl6
13:29 shinobicl joined #perl6
13:30 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.
13:31 pmichaud afaik, the only reason it exists in Rakudo is because the spec mentioned it :)
13:33 tadzik hello #perl6
13:33 pmichaud hello, tadzik.  Exams done?
13:34 sirrobert joined #perl6
13:34 kresike hello tadzik
13:34 tadzik pmichaud: well, yeah
13:35 tadzik that's like the worst luck I've had on this university
13:35 tadzik I needed 21 points to pass this one, and I've been given exactly 21
13:35 tadzik "Oh, looks like you have 50% points from this class, and you need over 50%. Bad luck, see you in september"
13:36 pmichaud Sorry to hear that.
13:36 TimToady that's when you hunt down the teacher and argue another point out of them
13:36 tadzik bah, at least it's over
13:36 rjbs timtoady++
13:36 sisar tadzik: subject ?
13:36 tadzik that's also when they say "How about no"
13:37 tadzik sisar: algorithm analysis
13:37 pmichaud I tried to argue a point out of a professor once; he threatened to lower my grade.  :-/
13:37 rjbs Yow
13:37 pmichaud Only 'B' I received my entire college career.  :-(
13:37 bluescreen10 joined #perl6
13:37 rjbs pmichaud: sympathy levels dropping! :)
13:37 pmichaud rjbs: :)
13:38 pmichaud rjbs: yeah, and it was in my last undergrad semester, too.  :)
13:38 tadzik heh, the only B
13:38 * rjbs graduated with an exactly 3.0 average. :/
13:38 cognominal joined #perl6
13:38 tadzik I got 4.2 last semester, this one is probably closer to 2.4 than 4.2
13:38 UncleFester6 joined #perl6
13:39 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.  :)
13:39 rjbs pmichaud: Wow.
13:39 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.
13:39 tadzik hah, at least a pass from Databases \o/
13:39 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.
13:40 pmichaud although perhaps I should've used TimToady++'s "hunt down the teacher" suggestion, albeit a bit more literally :-)
13:41 pmichaud I mean, this is Texas, after all.
13:42 pmichaud tadzik++ # pass from Databases
13:42 tadzik he he
13:42 HarryS joined #perl6
13:45 JimmyZ joined #perl6
13:47 PerlJam pmichaud: you got a B at CCSU?  I don't believe it.
13:47 pmichaud PerlJam: I did.
13:48 pmichaud One unfortunate midterm (misunderstood oral instructions from prof) and the aforementioned title dispute in a report.
13:48 pmichaud In a Texas History class, no less.
13:49 sirrobert heh
13:50 sirrobert 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 sirrobert Got the test back with a low C... took it home and checked it many times.
13:51 sirrobert Finally went back and said, "I don't understand how these are wrong... can you show me?"
13:51 sirrobert she said, "There were special instructions for that part of the test that superceded the written instructions."
13:51 sirrobert ...
13:51 sirrobert I said, "You didn't tell me any special instructions..."
13:51 sirrobert she said, "You didn't ask!"
13:51 sirrobert Wouldn't change the grade (french class)
13:52 erkan joined #perl6
13:52 erkan joined #perl6
13:53 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
13:53 pmichaud I did that a couple of times
13:53 sirrobert Just an occasional flakey faculty
13:54 * pmichaud <-- flakey faculty, definitely
13:54 sergot1 joined #perl6
13:54 PerlJam TimToady: you went to bizarro-university, clearly.
13:55 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
13:55 tadzik sirrobert: how about LWP::Simple?
13:55 sirrobert doh, searched for http so I missed lwp::simple =)
13:56 tadzik :)
13:56 tadzik note to self: we need tags :)
13:56 sirrobert note to tadzik:  I agree ;)
13:57 sirrobert Something I always thought the cpan could use.
13:57 pmichaud more directly.... why is it called "LWP::Simple" ?
13:58 pmichaud seems like a more descriptive name would be helpful there :)
13:58 PerlJam ETOOMUCHMIMIC
13:58 sirrobert lib www perl
13:58 sirrobert lwp
13:58 pmichaud if I'm a non-perl programmer looking at p6, ....
13:59 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
13:59 JimmyZ what does LWP mean?
13:59 sirrobert lib www perl
13:59 * JimmyZ doesn't know
14:00 PerlJam JimmyZ: see sirrobert
14:00 JimmyZ yes I see
14:00 JimmyZ aloha: see PerlJam
14:00 JimmyZ aloha: seen PerlJam
14:00 aloha JimmyZ: PerlJam was last seen in #perl6 39 seconds ago saying "JimmyZ: see sirrobert".
14:00 tadzik pmichaud: +1, but I'd rather just consider dropping the ::Simple part
14:01 tadzik half of our modules are called ::Simple, ::Tiny, ::Easy
14:01 sirrobert I strongly favor technology and protocol names
14:02 sirrobert (over cutesy names like, "bonabo", a module for generating big floats... because I like monkies")
14:02 tadzik :)
14:02 sirrobert I like the cutesy names fine for projects, though =)  for modules I like descriptive.
14:02 tadzik that gets boring after some time
14:02 hoelzro sirrobert++
14:02 pmichaud sirrobert: well, I agree; but I don't know "LWP" as a technology name.  I know "HTTP" and "WWW" and "Web"
14:02 tadzik when you see everything named Awesome::Async::Webscale::HHTP::Server::Simple::PSGI
14:03 sirrobert yeah, I'm saying LWP is a *bad* name, not a good one
14:03 sisar .oO ( there is Wikipedia page for LWP http://en.wikipedia.org/wiki/Library_for_WWW_in_Perl !)
14:03 tadzik then I'd prefer LaserCow or so
14:03 PerlJam sirrobert: so ... you don't like Mojolicioius or Catalyst or Dancer or ... (pick some other Perl 5 tech that has non-tech names)
14:03 sirrobert tadzik: heh
14:03 daxim LWP is just an abbreviation for libwww-perl
14:03 alvis joined #perl6
14:03 sirrobert PerlJam:  Like I said, I like fun names for *projects*, and descriptive for code
14:04 sirrobert Catalyst::Protocol:HTTP or something
14:05 PerlJam Then think of LWP as a "project" and you're good
14:05 PerlJam :)
14:05 sirrobert heh
14:06 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.
14:07 sirrobert daxim:  I'll take a look at it if I can.
14:07 sirrobert daxim:  But I'll probably clone and re-name it ;)
14:10 GlitchMr I made a test webpage in awk, but I'm almost sure it would be simpler in Perl 6
14:12 UncleFester6 left #perl6
14:15 alester joined #perl6
14:15 kaare_ joined #perl6
14:25 TimToady moritz: see http://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
14:26 moritz TimToady: sorry, I've probably mixed it up with other Buf/Str discussions
14:36 GlitchMr For question how many bytes string "abcd1345" takes you could answer 8, 16, 32, 3000, 183929 and anything else
14:42 kaleem joined #perl6
14:42 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.
14:43 TimToady colomon: I'm more than ok with that
14:43 colomon +1 +1
14:45 * 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)?
14:45 shinobicl hi....has the compiling process for rakudo changed in any way?
14:45 moritz shinobicl: compared to when?
14:46 moritz pmichaud: I've only patched the specs so far
14:46 pmichaud moritz: okay, good
14:46 dalek specs: 275caab | moritz++ | S (2 files):
14:46 dalek specs: get rid of Str.bytes
14:46 dalek specs: review: https://github.com/perl6/specs/commit/275caab5da
14:46 moritz pmichaud: so, how do we deprecate stuff now?
14:46 TimToady well, I've been deprecating it for years, but nobody ever listens to me  :)
14:46 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'"
14:47 shinobicl s/if/it/
14:47 * colomon is spectesting Niecza without .bytes right now...
14:47 moritz TimToady: we should simply rm -rf the specs, and replace it by a fold over the IRC logs :-)
14:47 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 #perl6
14:48 TimToady ±1 :)
14:49 pmichaud and probably a note in the source wouldn't hurt, either.
14:49 pmichaud also, I totally agree about .ACCEPTS should not be throwing things :-)
14:51 dalek roast: 7719875 | moritz++ | S (2 files):
14:51 dalek roast: throw out some Str.bytes tests
14:51 dalek roast:
14:51 dalek roast: most were commented out already
14:51 dalek roast: review: https://github.com/perl6/roast/commit/7719875c2e
14:52 * colomon restarts spectest to get moritz++'s changes
14:53 moritz colomon: that was probably not comprehensive
14:53 colomon my ack suggested there weren't very many tests...
14:53 colomon and most of them were commented out
14:54 moritz I guess somebody has to go through the socket tests at some point
14:56 pmichaud are we eliminating .bytes on Buf, also, ooc?
14:56 moritz no
14:56 moritz it makes a lot of sense there
14:57 moritz (especially since our Buf is really a Buf8)
14:58 TimToady what doesn't make much sense on Buf is .chars, unless maybe it's explicitly a utf8 buf
14:58 TimToady and even there is should probably only support .codes
14:58 pmichaud I don't need .chars on Buf
14:58 TimToady *t
14:59 TimToady of course, with our current Str implementations we should only support .codes and not .chars :)
14:59 TimToady or make a 'use codepoints;' declaration mandatory for now...
15:00 TimToady 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
15:01 moritz -1 to mandatory 'use codepoints';
15:01 moritz it breaks all of our old scripts
15:01 moritz and many of them don't care at all about the distinction
15:02 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
15:03 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
15:03 moritz speaking of which, I'd really love to see array-variable-interpolation in regexes
15:03 TimToady assuming our current semantics are consistent with NFC more than with NFD
15:04 pmichaud array-var-interpolation in regexes is really tricky.
15:04 moritz pmichaud: why?
15:04 pmichaud ltm
15:04 dalek niecza: 75130da | (Solomon Foster)++ | lib/CORE.setting:
15:04 dalek niecza: Remove Cool.bytes.
15:04 dalek niecza: review: https://github.com/sorear/niecza/commit/75130dab8b
15:04 grondilu left #perl6
15:04 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
15:04 pmichaud we don't have dynamic ltm
15:04 TimToady the hard part is the caching
15:05 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
15:05 pmichaud moritz: it might.  We could use some tests for it.  :)
15:05 TimToady but you don't want to do that every time
15:05 moritz r: my $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
15:05 p6eval rakudo 88a9d6: OUTPUT«a␤»
15:06 moritz masak! where's masak?
15:06 moritz :-)
15:06 moritz just to be sure, that's supposed to LTM, right?
15:06 pmichaud aiui, yes.
15:07 pmichaud I know that  @array is supposed to act like   @array[0] | @array[1] | @array[2] | ...
15:07 pmichaud (unless surrounded by ||, or some such)
15:07 TimToady well, unless compiled in a || context
15:07 moritz n: my $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
15:07 TimToady moritz: yes, $x should match since the literal prefix is only used as a tiebreaker
15:07 p6eval niecza v19-4-g12b71c7: OUTPUT«a␤»
15:08 * moritz submits rakudo and nieczabugs
15:08 bluescreen10 joined #perl6
15:10 TimToady oh, wait
15:10 TimToady Variable matches are considered declarative if and only if the variable
15:10 TimToady is known to represent a constant
15:11 moritz I know it's a constant in the example above
15:11 TimToady nr: constant $x = 'ab'; say ('ab' ~~ / a | b | $x /).Str
15:11 moritz so it's known
15:11 p6eval rakudo 88a9d6: OUTPUT«a␤»
15:11 p6eval ..niecza v19-4-g12b71c7: OUTPUT«ab␤»
15:11 TimToady er, known to the compiler without heroic efforts :)
15:12 moritz the dangers of passive speech in technical documents, part 1
15:12 TimToady so niecza is correct to make a distinction there
15:12 TimToady and a non-constant array should only do LTM internally; it does not participate in an external LTM even if first
15:13 pmichaud woo hoo!
15:13 pmichaud that makes @array a lot easier, and doable.
15:13 pmichaud I missed that clause, apparently.
15:13 TimToady hey, maybe we shouldn't delete the specs after all :)
15:13 moritz :-)
15:13 moritz and it also makes @array a lot less useful :(
15:13 pmichaud @array still does internal LTM, that's probably okay.
15:14 moritz ok, right
15:14 * moritz updates rakudobug
15:14 moritz https://rt.perl.org/rt3/Ticket/Display.html?id=113884 fwiw
15:15 TimToady bbl &
15:15 pmichaud that bit about constant and declarativeness needs repeating in the section on @array interpolation
15:15 pmichaud otherwise it's way too easy to assume (as we all did) that @array remains declarative.
15:18 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 moritz (and I expect future iterations to apply that role to more classes)
15:19 pmichaud moritz: as long as existing APIs are essentially preserved, I'm fine with it.
15:19 pmichaud I like having the file tests separate.
15:19 moritz pmichaud: they are; no spectest regressions either
15:19 pmichaud +1 then
15:19 moritz only difference is that if somebody queries IO.^roles or so...
15:20 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)
15:21 pmichaud I wonder if it's worth creating an "is deprecated" trait.  :-)
15:21 sisar what are "NFG", "NFC", "NFD" ?
15:21 moritz colomon: niecza doesn't run the socket tests, right?
15:21 colomon moritz: doubt it
15:21 moritz (that's the only location where Str.bytes might be left)
15:21 moritz sisar: normal forms for strings
15:21 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.
15:22 moritz sisar: see for example https://en.wikipedia.org/wiki/Unicode_equivalence
15:22 sisar moritz: ah, was just going to ask u for more info :)
15:22 * pmichaud thinks there might already be something to do this in the spec.
15:22 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 #perl6
15:23 sorear good * #perl6
15:23 sisar moritz: thanks.
15:24 adu good *
15:24 sisar I learn something new everyday, just hanging out in #perl6 and asking dumb questions :)
15:30 cognominal joined #perl6
15:35 atrodo joined #perl6
15:35 rsimoes are there any (unofficial, of course) 24-bit encodings of the unicode character set?
15:44 TimToady sure, just call it UTF-24
15:45 sjohnson :3
15:45 rjbs Not that I know of, but it seems like it would be pretty simple to produce one.
15:49 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?
15:50 flussence (well I know nothing *uses* them that high up, but just the limit in general)
15:51 rjbs It maxes out at 0x10_FFFF
15:51 rjbs (which lies between 2**20 and 2**21)
15:51 Juerd U+10ffff is 4 bytes in UTF-8
15:52 Juerd This means that the only benefit of UTF-32 is fixedwithness, which is hardly ever necessary anyway :)
15:52 Juerd And it's only fixed width in practice, in theory IIRC it coud be variable width.
15:52 rjbs Could it?
15:53 Juerd IIRC :)
15:53 flussence perl5 has those weird base-128 numbers in pack()...
15:53 rjbs I /think/ you are mistaken, but am not sure.
15:53 Juerd rjbs: Wikipedia seems to suggest that I am indeed mistaken.
15:54 rjbs My copy of the 6.1 spec just arrived yesterday.
15:54 Juerd So do many other sources, so I sit corrected :)
15:54 adu base-128?!?
15:54 rjbs It's very floppy.  Unlike the 3.1 spec, it does not include all the character tables. ☹
15:55 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
15:55 rjbs Juerd: Ever since the tree ate that kid in Poltergeist, I have hated trees.
15:55 Juerd adu: For now... :D
15:55 rjbs Juerd: Unicode have promised that 10_ffff is the limit forever. :-)
15:56 Juerd You know what they said about 640 K
15:56 rjbs Extraterrestrial contact may compliate things.
15:56 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 #perl6
15:56 adu Juerd: or do you think emoticons will be to blame?
15:56 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:57 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.
15:57 Juerd If we survive 2012, the world won't collapse.
15:57 adu Juerd: that's an odd belief
15:59 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?
15:59 Juerd adu: I try not to
15:59 Juerd But today, apparently Tau day, I did read the manifesto.
16:00 pmichaud D'oh!  I forgot today is Tau day!
16:00 Juerd On how pi is wrong and everything. I'm convinced.
16:00 adu all positive integer powers of 2 are even, not "most"
16:00 Juerd pmichaud: 6/28; duh! Don't you know Tau to at least 10 decimals? :D
16:00 Juerd adu: All positive ones, but 2**0 isn't.
16:00 Juerd 0 being non-positive doesn't make 2**0 a non-power of 2 :)
16:01 adu arguably, most power of 2 are complex irrationals
16:01 pmichaud Juerd: my wedding anniversary is Pi day :)
16:01 Juerd pmichaud: On purpose?
16:01 adu pmichaud: lucky you!
16:02 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.
16:02 Juerd That's fortunate, because if it were on purpose, you'd have to re-marry on 6/28 to correct the mistake :P
16:03 adu what is tau?
16:03 pmichaud tau = 2 * pi
16:04 Juerd No, pi = tau/2 ;)
16:04 pmichaud http://tauday.com/
16:10 kresike bye all
16:28 am0c joined #perl6
16:35 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 perl6-users@perl.org, hitting just "Reply" would mail back to perl6-users@perl.org.
16:36 sisar But hitting "reply" replies to the OP and not the list.
16:36 sisar (GMail)
16:37 sisar 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 #perl6
16:39 sporous joined #perl6
16:48 kaleem joined #perl6
16:53 * sisar creates RT #113888
16:58 pupoque joined #perl6
17:04 GlitchMr joined #perl6
17:08 majrmovies joined #perl6
17:08 pyrimidine joined #perl6
17:15 moritz weren't we at the 111XXX numbers just a short while ago?
17:30 tyatpi joined #perl6
17:48 dalek roast: f3372db | (Solomon Foster)++ | S03-metaops/zip.t:
17:48 dalek roast: Fudge for Niecza.
17:48 dalek roast: review: https://github.com/perl6/roast/commit/f3372db02e
17:54 birdwindupbird joined #perl6
17:59 immortal joined #perl6
17:59 immortal joined #perl6
18:05 rjbs joined #perl6
18:07 cognominal joined #perl6
18:13 dalek rakudo/nom: cc780c2 | moritz++ | src/core/IO.pm:
18:13 dalek rakudo/nom: move file tests to IO::FileTestable
18:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/cc780c2c39
18:13 dalek rakudo/nom: 39087ad | moritz++ | src/core/IO.pm:
18:13 dalek rakudo/nom: Merge branch 'io' into nom
18:13 dalek rakudo/nom: review: https://github.com/rakudo/rakudo/commit/39087ad81a
18:14 pmichaud moritz++
18:14 moritz that means people can experiment with https://gist.github.com/3003456 on latest nom
18:21 fridim__ joined #perl6
18:34 dalek roast: c1653e3 | (Solomon Foster)++ | S (2 files):
18:34 dalek roast: Unfudge for Niecza.
18:34 dalek roast: review: https://github.com/perl6/roast/commit/c1653e3e06
18:36 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␤␤␤»
18:36 p6eval ..niecza v19-5-g75130da: OUTPUT«Bool()␤»
18:36 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
18:37 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)
18:37 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
18:38 sirrobert What testing module do most of you use?
18:38 moritz sirrobert: Test.pm
18:38 moritz colomon: rn, not rm
18:38 sirrobert moritz: thanks
18:38 moritz colomon: and rakudo is right there
18:38 colomon rn: my $x = Bool; my $y = $x--; say $y.perl
18:38 p6eval niecza v19-5-g75130da: OUTPUT«0␤»
18:38 p6eval ..rakudo 88a9d6: OUTPUT«Bool::False␤»
18:39 colomon rn: my $x = Bool; my $y = $x; say $y.perl
18:39 p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«Bool␤»
18:39 colomon wth?
18:39 pmichaud what's the question?
18:40 pmichaud moritz: I suspect what we need to do is eliminate variable names from scalars that are intended to be bound/returned
18:40 pmichaud (in $rw contexts)
18:40 colomon why do $y = $x-- and $y = $x have different values for $y?
18:40 pmichaud colomon: it has to do with the meaning of --
18:40 pmichaud example coming up
18:40 colomon isn't the entire point of postdecrement that you return the value and then do the decrement?
18:41 pmichaud rn:  my $x = Any;  my $y = $x--;  say $y.perl
18:41 p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«0␤»
18:41 pmichaud rn:  my $x = Any;  my $y = $x;  say $y.perl
18:41 p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«Any␤»
18:42 pmichaud the spec is explicit about the Any case.  Rakudo treats Bool the same way as Any.
18:45 sirrobert What's perl6's version of "prove"?
18:45 colomon sirrobert: "prove"
18:45 pmichaud colomon: S03:545
18:45 PerlJam sirrobert: prove
18:45 flussence prove -e perl6
18:45 sirrobert heh
18:45 sirrobert flussence++ =)
18:46 colomon pmichaud: yeah.  huh.
18:46 moritz we just stole the testing protocol from p5
18:46 colomon rn: say Bool ~~ Numeric
18:46 p6eval rakudo 88a9d6: OUTPUT«False␤»
18:46 p6eval ..niecza v19-5-g75130da: OUTPUT«True␤»
18:46 moritz nr: enum A <b c>; say A ~~ Numeric
18:46 p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«True␤»
18:47 moritz Bool isn't a proper enum (yet?) in Rakudo
18:48 pmichaud we could still at least make Bool a subset of Int, though.
18:48 pmichaud so that Bool ~~ Numeric and Bool ~~ Int would be correct.
18:48 pmichaud s/subset/subclass/
18:48 colomon the language of the spec seems to say that my $x = Bool; my $y = $x--; say $y.perl should indeed be 0
18:49 * colomon certainly does not care one way or the other
18:49 colomon unless, I guess, the undefined Bool is a Bool, and is considered to be an obvious exception to the next paragraph.
18:49 Chillance joined #perl6
18:50 pmichaud nr: enum A <b c>;  say A.defined
18:50 p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«False␤»
18:50 moritz nr: say True.sqrt
18:50 p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«1␤»
18:51 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␤␤»
18:51 p6eval ..niecza v19-5-g75130da: OUTPUT«True␤»
18:51 pmichaud niecza++ rakudo--  # according to S12
18:51 moritz I'll see if it's easy to fix
18:51 pmichaud I suspect it's not easy to fix
18:51 pmichaud depending on how low-level bools are defined in NQP/Rakudo
18:51 moritz Could not build C3 linearization: ambiguous hierarchy
18:52 moritz pmichaud: I suspect you are right
18:52 pmichaud booleans are one of the key places where circularity sawing comes into effect
18:52 moritz it sure it
18:52 pmichaud I suspect it'll want jnthn++ to weigh in on it
18:54 pmichaud nr: say Bool ~~ Int
18:54 p6eval rakudo 88a9d6: OUTPUT«False␤»
18:54 p6eval ..niecza v19-5-g75130da: OUTPUT«True␤»
18:54 * pmichaud files rakudobug
18:54 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
18:54 pmichaud I suspect we really want our low-level bools to be ints
18:54 moritz but that might lead to nasty corner cases
18:55 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++
18:55 p6eval rakudo 88a9d6: OUTPUT«False␤»
18:55 p6eval ..niecza v19-5-g75130da: OUTPUT«0␤»
18:56 moritz it just feels odd to have it return a value that doesn't conform to the type constraint
18:56 moritz which is why I side with rakudo here
18:56 pmichaud converting a Bool to an Int seems very wrong.
18:56 colomon but that's exactly the way that Any and Cool work.
18:56 pmichaud Any and Cool aren't bools :)
18:56 colomon mind you, I'm inclined to agree that converting a Bool to an Int seems wrong
18:56 pmichaud more to the point, Int ~~ Any and Int ~~ Cool   but Int !~~ Bool
18:57 pmichaud rn:  say Int ~~ Bool
18:57 p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«False␤»
18:57 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 #perl6
18:58 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␤␤»
18:58 p6eval ..niecza v19-5-g75130da: OUTPUT«0␤»
18:58 pmichaud rn:  enum A <a b>;  my A $x; $x = 0;  say $x.WHAT
18:58 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:58 p6eval ..rakudo 88a9d6: OUTPUT«Type check failed in assignment to '$x'; expected 'A' but got 'Int'␤  in block <anon> at /tmp/ucgZ_xY0PB:1␤␤»
18:59 pmichaud rn: my Bool $x;  $x = 0;  say $x.WHAT
18:59 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 …
18:59 p6eval ..rakudo 88a9d6: OUTPUT«Type check failed in assignment to '$x'; expected 'Bool' but got 'Int'␤  in block <anon> at /tmp/tJ36WjPghd:1␤␤»
18:59 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
19:00 pmichaud rn: say "".succ;  # curious
19:00 p6eval niecza v19-5-g75130da: OUTPUT«WTF␤»
19:00 p6eval ..rakudo 88a9d6: OUTPUT«␤»
19:00 pmichaud heh
19:00 sisar lol #niecza
19:00 pmichaud n:  my $a = '';  $a++; $a++; $a++; $a++;  say $a;
19:00 p6eval niecza v19-5-g75130da: OUTPUT«WTI␤»
19:00 moritz it never ceases to amuse me
19:00 pmichaud n:  my $a = '';  $a++; say $a; $a++; $a++;  say $a;
19:00 p6eval niecza v19-5-g75130da: OUTPUT«WTF␤WTH␤»
19:01 sisar "WTI" ?
19:01 pmichaud I had an extra increment in there :-/
19:01 moritz world trade institute
19:01 colomon rn: my $s = Str; say $s++
19:01 p6eval rakudo 88a9d6, niecza v19-5-g75130da: OUTPUT«0␤»
19:01 * moritz just amkes stuff up
19:01 pmichaud I agree we should probably consider the Str case analogously to Bool
19:01 pmichaud zero is almost assuredly wrong there.
19:02 moritz I see four obvious choices
19:02 moritz '0', 'a', 'A', Failure
19:02 pmichaud also ''
19:02 moritz '0' is probably not good, because it's False
19:02 moritz in boolean context, that is
19:03 moritz pmichaud: also false in boolean context
19:03 moritz pmichaud: and then you'd still have to find a good value for ''.succ
19:03 * sisar wants to file a nieczabug for "using unknown abuse WTI in error" :p
19:03 pmichaud oh, I'm certain that ''.succ is ''
19:03 pmichaud rn: say '-'.succ
19:03 p6eval niecza v19-5-g75130da: OUTPUT«WTF␤»
19:03 p6eval ..rakudo 88a9d6: OUTPUT«-␤»
19:04 pmichaud I could argue that ''.succ is a Failure, though.
19:04 sisar Does Unicode define some kind of "comes after" and "comes before" for (some) characters ?
19:05 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
19:05 pmichaud of course, if ''.succ returns Failure, that's still false.  :-)
19:05 * sisar looks up collation charts
19:06 moritz or maybe s/charts/tables/
19:06 moritz thing is, that's a very language specific concept
19:06 moritz for example the Germans sort their Umlauts along with the base char, but the Norwegians sort the å after z
19:10 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 sisar Sorting makes compromises, in this context.
19:10 moritz string incrementing and decrementing also makes compromises and cultural assumptions
19:11 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
19:13 sisar moritz: i'm curious. Like a (English) child who is taught abc, is a Norwegian child, when taught alphabets, that 'å' comes after 'z'?
19:14 sisar arrgh, poor grammar, sisar--
19:14 moritz sisar: yes
19:15 sisar moritz: interesting. /me looks up Norwegian alphabet
19:15 moritz 'a'..'z', 'å', 'æ', 'ø' iirc
19:16 moritz and the Spanish learn 'm', 'n', 'ñ' (says my wife)
19:20 pmichaud http://en.wikipedia.org/wiki/Danish_and_Norwegian_alphabet  # maybe?
19:21 moritz ok, æ ø å :-)
19:21 sisar aye
19:21 sisar (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."
19:22 * sisar is surprised at the "official"-ness os deciding alphabets in languages.
19:22 sisar s/os/of
19:23 moritz sisar: have you ever heard of the Academie Francaise?
19:23 * moritz might have mispellt it
19:23 sisar moritz: no
19:24 * 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
19:25 sisar (Wikipedia) "The Académie 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.  :)
19:26 sisar (oops, sorry if this offends any of our French friends)
19:26 sisar sorry
19:29 dalek doc: 1a2dd21 | moritz++ | lib/Cool.pod:
19:29 dalek doc: be [Cool]
19:29 dalek doc: review: https://github.com/perl6/doc/commit/1a2dd21e37
19:29 * pmichaud looks to see if any new yapc::na videos have been posted.  *sadface*
19:30 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 diakopter ha
19:32 dalek doc: d64108c | moritz++ | lib/Mu.pod:
19:32 dalek doc: [Mu] method ACCEPTS
19:32 dalek doc: review: https://github.com/perl6/doc/commit/d64108cedd
19:33 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 sisar Our constitution mandates the govt to *create* new words in Hind !
19:33 sisar *Hindi
19:33 erkan joined #perl6
19:34 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".
19:34 * sisar never knew !
19:35 moritz phenny: en fr "computer"?
19:35 phenny moritz: "ordinateur" (en to fr, translate.google.com)
19:35 moritz phenny: en fr "hard disc"?
19:35 phenny moritz: "disque dur" (en to fr, translate.google.com)
19:35 sisar phenny: en hi "computer"?
19:35 phenny sisar: "कंप्यूटर" (en to hi, translate.google.com)
19:35 moritz ok, that's a word-for-word translation
19:35 moritz .u कंप्यूटर
19:35 phenny moritz: U+0915 U+0902 U+092A U+094D U+092F U+0942 U+091F U+0930
19:36 dalek doc: 88abdef | pmichaud++ | lib/Mu.pod:
19:36 dalek doc: Typo fix; note that :U also includes failure.
19:36 dalek doc: review: https://github.com/perl6/doc/commit/88abdefb3f
19:36 sisar moritz: "कंप्यूटर" is a literal transliteration.
19:38 sisar bah, anyways, trying to understand language can drive one insane easily. As programming languages can :)
19:45 moritz r: given 'foo' -> $x { .say }
19:45 p6eval rakudo 39087a: OUTPUT«Any()␤»
19:48 moritz r: CATCH -> $x { default { say "ex: $x" } }; die "foo"
19:48 p6eval rakudo 39087a: OUTPUT«===SORRY!===␤Missing block␤at /tmp/T3Gcuxs0ZG:1␤»
19:52 dalek nqp/sigspace: b49ec74 | pmichaud++ | src/ (2 files):
19:52 dalek nqp/sigspace: Leading whitespace at beginning of regex isn't significant.
19:52 dalek nqp/sigspace: review: https://github.com/perl6/nqp/commit/b49ec74707
19:52 dalek nqp/sigspace: 5249e92 | pmichaud++ | src/QRegex/P6Regex/Grammar.nqp:
19:52 dalek nqp/sigspace: Allow <.ws> at the beginning of an arglist.
19:52 dalek nqp/sigspace: review: https://github.com/perl6/nqp/commit/5249e92458
19:54 moritz n: CATCH -> $x { default { say "ex: $x" } }; die "foo"
19:54 p6eval niecza v19-5-g75130da: OUTPUT«[31m===[0mSORRY![31m===[0m��Missing block at /tmp/GBl0POQ_8y line 1:�------> [32mCATCH [33m�[31m-> $x { default { say "ex: $x" } }; die [0m��Parse failed��»
19:55 pmichaud I need to figure out the stability policy for handling  leading ws in regexes and the ?-quantifier switch.
19:56 pmichaud I suppose it could be merged just after the next release.
19:57 moritz did we promise stability to the users of 2012.06?
19:57 pmichaud I'm starting to make those sorts of promises, yes.
19:58 cj__ joined #perl6
19:58 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.
20:01 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 sisar "instr." is short for ?
20:01 diakopter instruction?
20:02 pmichaud certainly it's "instruction".  not sure why it's abbreviated; I suspect Parrot is doing that.
20:03 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 #perl6
20:04 not_gerd hello, #perl6
20:06 * not_gerd pings pmichaud with a friendly reminder about bug #113666
20:08 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 majrmovies joined #perl6
20:09 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:11 moritz r: CATCH { default { $! = $_ } }; die 'foo'; say "ex: $!"; # just curious
20:11 p6eval rakudo 39087a:  ( no output )
20:11 moritz r: do { CATCH { default { $! = $_ } }; die 'foo' }; say "ex: $!"; # just curious
20:11 p6eval rakudo 39087a: OUTPUT«ex: foo␤»
20:11 moritz cool
20:12 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:15 moritz n: grammar A { token TOP { .+ } }; A.parse('foo'); say ~$/
20:15 p6eval niecza v19-5-g75130da: OUTPUT«foo␤»
20:18 moritz is there anything besides 'try' that sets $!?
20:21 pmichaud not_gerd: well, it might reduce the memory required by about 25MB.  Not sure if that's "significant".
20:21 stephenl1 joined #perl6
20:21 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
20:22 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
20:22 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 :)
20:23 pmichaud given it's a shootout issue... that might spur me to bump it up a bit more.
20:23 pmichaud right now I'm suffering from a very rich supply of things to fix/work on
20:24 dalek doc: 7988a7c | moritz++ | lib/perlvar.pod:
20:24 dalek doc: [perlvar] $_, $/ and $!
20:24 dalek doc: review: https://github.com/perl6/doc/commit/7988a7cf81
20:24 vmspb joined #perl6
20:26 sirrobert There's something I'm not quite getting about enums... Why does this happen? (https://gist.github.com/3013692)
20:26 sirrobert I would expect to have to call something like Something::SOME to get output I'm getting.
20:28 sirrobert woops, fixed a typo in the gist...
20:28 sirrobert https://gist.github.com/3013692
20:29 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)␤»
20:29 moritz r: enum Something <SOME THING>; say Something('thing')
20:29 p6eval rakudo 39087a: OUTPUT«Something()␤»
20:29 moritz sirrobert: the lookup is case sensitive, and returns the type object when it fails
20:30 sirrobert I'm not doing:  say Something('thing');
20:30 sirrobert I'm doing:  say Example::SOME("thing");
20:31 sirrobert 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:32 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?
20:32 sirrobert Well, I use the enum elsewhere
20:32 sirrobert that's a super-simplified case
20:32 sisar PerlJam: aye.
20:33 moritz hm
20:33 sirrobert I just wanted to point out the issue without clutter.
20:33 moritz r: module A { enum B <C D>; our sub C() { 'sub' }; say A::C()
20:33 p6eval rakudo 39087a: OUTPUT«===SORRY!===␤Unable to parse blockoid, couldn't find final '}' at line 2, near ""␤»
20:33 PerlJam Are enums "our" by default?
20:33 moritz r: module A { enum B <C D>; our sub C() { 'sub' } }; say A::C()
20:33 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␤␤»…
20:33 sisar is there an extra space in "SOME (Str $str)" ? shouldn't there be no space between the subname and the signature ?
20:33 sirrobert when I do that in a single script, btw, the output is as expected.
20:33 moritz r: module A { enum B <C D>; our sub C() { 'sub' } }; say A::C
20:34 p6eval rakudo 39087a: OUTPUT«C␤»
20:34 moritz that also uses the enum value
20:34 PerlJam r: module A { my enum B <C D>; our sub C() { 'sub' } }; say A::C
20:34 p6eval rakudo 39087a: OUTPUT«sub␤»
20:35 sirrobert r: enum Something <SOME THING>; our sub SOME (Str $str) { return "str: $str" }; SOME("thing");
20:35 p6eval rakudo 39087a:  ( no output )
20:35 sirrobert (without the context of a module in that case)
20:36 sirrobert enum A <B C>; sub B (Str $str) { return "str: $str"; }; say B('thing');
20:37 sirrobert r: enum A <B C>; sub B (Str $str) { return "str: $str"; }; say B('thing');
20:37 p6eval rakudo 39087a: OUTPUT«str: thing␤»
20:37 sirrobert (no module context there)
20:41 sirrobert 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:42 pmichaud sirrobert: that may fall under the guideline that anything with parens is a function call.
20:42 pmichaud although I agree that enum syntactic sugar is specialish
20:42 sirrobert well... I want to call the function
20:42 pat_js joined #perl6
20:42 pmichaud it is calling the function, afaict
20:42 pmichaud oh!  I see.
20:42 sirrobert =)
20:43 pmichaud use a & to make it explicit :-)
20:43 pmichaud &Example::SOME('thing')
20:43 moritz r: enum A <b c>; sub b() { 'sub' }; say b; say b()
20:43 p6eval rakudo 39087a: OUTPUT«b␤sub␤»
20:43 moritz it works for lexical names
20:43 moritz just not for ::-joined names
20:43 moritz I guess it should
20:43 sirrobert surely that's not a feature ;)
20:44 pmichaud how about Example::SOME::('thing')
20:45 sirrobert pmichaud:  watch
20:45 sirrobert r: module X {enum A <B C>; sub B (Str $str) { return "str: $str"; };}; say &X::B('thing');
20:45 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␤␤»
20:45 sirrobert prefixing with & broke it
20:45 moritz pmichaud: should use the enum
20:45 pmichaud r: module X { sub B { ... } };   say &X::B;
20:45 p6eval rakudo 39087a: OUTPUT«Any()␤»
20:45 moritz sub vs. our sub
20:46 pmichaud X == bad module name
20:46 pmichaud r: module ABC { our sub B { ... } };   say &ABC::B;
20:46 p6eval rakudo 39087a: OUTPUT«sub B() { ... }␤»
20:46 moritz r: module X { our sub B { ... } }; say &X::B
20:46 p6eval rakudo 39087a: OUTPUT«sub B() { ... }␤»
20:46 moritz no problem here with X
20:46 sirrobert pmichaud:  ah, I see (the "our")
20:46 pmichaud r: module ABC { enum DEF < d e f >; our sub B { ... } };   say ABC::DEF
20:46 p6eval rakudo 39087a: OUTPUT«DEF()␤»
20:47 pmichaud r: module ABC { enum B < d e f >; our sub B { ... } };   say ABC::B
20:47 p6eval rakudo 39087a: OUTPUT«B()␤»
20:47 pmichaud r: module ABC { enum B < d e f >; our sub B { ... } };   say ABC::B()
20:47 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␤␤»…
20:47 pmichaud r: module ABC { enum B < d e f >; our sub B { 'sub B' } };   say ABC::B()
20:47 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␤␤»…
20:47 pmichaud r: module ABC { enum B < d e f >; our sub B { 'sub B' } };   say (&ABC::B)()
20:47 p6eval rakudo 39087a: OUTPUT«sub B␤»
20:48 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␤»
20:48 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«e␤»
20:48 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␤»
20:48 pmichaud yeah, the & can force the sub version.
20:48 sirrobert I feel like the priority should be reversed
20:48 sirrobert (for whatever *that's* worth =)
20:49 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 ""␤»
20:49 sirrobert or maybe enums are way more important than I grok
20:50 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
20:50 moritz the proper way is to export stuff
20:50 sirrobert ok, watch this.....
20:50 sirrobert r: module X { enum A <B C>; say A::B; say B; }; say X::B;
20:50 moritz dunno if enums can be exported so far
20:50 p6eval rakudo 39087a: OUTPUT«B␤B␤B␤»
20:50 pmichaud the problem of priority still manifests with exported stuff.
20:51 sirrobert inside the module, should A::B and B be the same?
20:51 Je joined #perl6
20:51 moritz pmichaud: for exported stuff the disambiguation works better in current rakudo
20:51 moritz sirrobert: yes
20:52 moritz that's why both Bool::True and True work
20:52 sirrobert Ah...
20:52 sirrobert I think I just don't get enums yet.
20:52 pmichaud moritz: if a module exports both a enum named 'Day' and a sub named '&Day', then what does  Day(1)  do?
20:52 sirrobert at least, I don't get them well enough to use them well ;)
20:53 moritz pmichaud: I hope it invokes the sub
20:53 sirrobert *I* would expect Day(1) to call the sub.
20:53 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);
20:53 p6eval rakudo 39087a: OUTPUT«Mon␤»
20:53 moritz eeks
20:54 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:55 * moritz thinks we should start to punish people for puns :-)
20:55 pmichaud does that place you at the front of the line, moritz?  ;-)
20:57 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␤»
20:57 moritz yes, I'm trying to demonstrate leadership qualities by... oh wait, we're not in a Dilbert cartoon, are we?
20:57 sirrobert Why does *that* happen?
20:57 sirrobert (the enum was not exported)
20:57 pmichaud that's why it happens.
20:57 sirrobert oh, heh
20:57 sirrobert I see
20:57 pmichaud only &Day was exported.
20:57 sirrobert the return value of Day threw me ;)
20:58 sirrobert Well, for now I am going to use &...::SubName to disambiguate.
20:58 sirrobert Should I file a ... something about it?
20:59 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
20:59 pmichaud and give moritz++'s "eeks" example from above
21:00 pmichaud sirrobert++
21:03 pmichaud afk, errands
21:03 sirrobert sent; going home.
21:05 not_gerd bye, #perl6
21:05 not_gerd left #perl6
21:24 tadzik masak: ping
21:24 tadzik eiro: ping
21:24 tadzik jnthn: ping
21:26 tadzik damnit. Anyone around?
21:26 sorear hi.  i exist.
21:27 flussence n: say [+] 1..500000
21:27 sorear tadzik?
21:27 p6eval niecza v19-5-g75130da: OUTPUT«(timeout)»
21:28 flussence n: https://gist.github.com/3007551
21:28 tadzik sorear: do you have a way to get eiro's phone number?
21:28 p6eval niecza v19-5-g75130da: OUTPUT«125000250000␤»
21:28 tadzik possible from the fpw wobsite
21:33 thou joined #perl6
21:47 bluescreen10 joined #perl6
21:51 bruges joined #perl6
21:52 fridim__ joined #perl6
21:55 MayDaniel joined #perl6
21:56 tadzik ffs, I have no idea what's going on here
21:56 arlinius joined #perl6
21:58 * flussence puts a mousetrap out with an unfiled bug inside
22:00 cognominal joined #perl6
22:05 moukeddar joined #perl6
22:15 diakopter hi from Google I/O
22:16 sergot1 hi diakopter! o/
22:24 jaldhar joined #perl6
22:39 cognominal joined #perl6
22:42 Celelibi joined #perl6
23:06 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.
23:07 pmichaud afk, soccer practice
23:07 nebu joined #perl6
23:08 nebu left #perl6
23:17 whiteknight joined #perl6
23:38 vlixes joined #perl6
23:55 skids joined #perl6

| Channels | #perl6 index | Today | | Search | Google Search | Plain-Text | summary

Perl 6 | Reference Documentation | Rakudo