»ö« 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.
grondilu just fixed his Digest library which could not be compiled. 00:01
r: my \primes = grep &is-prime, 2 .. *; say primes[^100] 00:02
p6eval rakudo 8e6fa0: OUTPUT«2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 101 103 107 109 113 127 131 137 139 149 151 157 163 167 173 179 181 191 193 197 199 211 223 227 229 233 239 241 251 257 263 269 271 277 281 283 293 307 311 313 317 331 337 347 349 353 359 367 37…
rprajapa quit 00:34
diakopter mberends: howdy! 01:26
TimToady rosettacode.org/wiki/Problem_of_Apo...ius#Perl_6 06:06
timotimo oh, $.foo won't interpolate in strings? 06:07
(i suppose because it really is a method call) 06:08
sorear it will. 06:10
TimToady hmm, maybe it should
sorear also, method calls interpolate in strings
n: my $foo = "hello"; say "$foo.flip() world" 06:11
p6eval niecza v24-23-g0520c7c: OUTPUT«olleh world␤»
TimToady yeah, works fine without the brackets
fixed, timotimo++ 06:13
TimToady incidentally, it's almost a requirement to use the mathematical unicode chars for sigilless names, because v21 is parsed as a version number... 06:19
moritz \o 06:22
TimToady o/ 06:23
sorear o/ 06:24
lue Quick question: why were sigilless variables introduced? (I know it was possible before for constants, why extend to variables?) 06:27
moritz lue: to allow storing non-constant stuff without forcing a context on it 06:28
TimToady it only incidentally also made it really easy to introduce new terms to the grammar 06:29
(that won't be parsed as functions requiring arguments)
but since some people carp about all the sigils, it also kinda defuses that criticism 06:30
lue So, it's like leaving off the Int in C<my Int $a>, only instead of not caring about the value's type, you're not caring about the container type, correct?
TimToady it's the rawest form of binding we have 06:33
what used to be called "is ref", then "is parcel"
lue [ also, the Perl 6 solution for Apollonius looks the prettiest :) ] 06:34
TimToady well, that's mostly because of the the postfix:<²>
lue makes a world of difference though (** can get very noisy when it occurs many many times) 06:35
TimToady and the trick of defining a constructor sub outside of the class
it was originally translated from the python, which is full of x*x and such 06:36
FROGGS morning 06:36
TimToady o/ 06:37
the next goal is to pass Mathematica; 20 more will do it...
well, assuming a non-moving target... :) 06:38
japhb All you need is greater velocity, equal acceleration, and enough time ... 06:39
TimToady we've always gone for greater acceleration regardless of the current velocity, which will always win eventually 06:40
sorear o/ FROGGS 06:43
.oO( greater jerk is still better )
06:44
diakopter :) 06:44
FROGGS morning TimToady, japhb, sorear, diakopter 06:45
diakopter g'day
sorear o/ diakopter 06:47
FROGGS TimToady: have you seen the discussion about $/ and Str.subst? irclog.perlgeek.de/perl6/2013-02-19#i_6474949 06:48
TimToady yes, been thinking about it 06:50
FROGGS k, thanks
TimToady wondering whether there should be an optional argument to the method forms with an "out" parameter that defaults to $/
so /foo/ is equivalent to .match(/foo/, :set($/)) or some such 06:51
or :set would set $/ by default
name negotiable, of course 06:52
sorear doesn't match already set $/ ? 06:53
TimToady but have to consider how it might also work with future changes to binding ops to solve the ~~ s/// problem
FROGGS nr: "abc".match(/a/); say $/
p6eval rakudo 8e6fa0, niecza v24-23-g0520c7c: OUTPUT«「a」␤␤»
FROGGS nr: "abc".match("a"); say $/
p6eval rakudo 8e6fa0: OUTPUT«「a」␤␤»
..niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: Unable to resolve method postcircumfix:<( )> in type Str␤ at /home/p6eval/niecza/lib/CORE.setting line 537 (Cool.match @ 24) ␤ at /tmp/fVZrgy0prq line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤…
sorear what is the ~~ s/// problem?
TimToady sorear: currently, but we might simplify that
the argument of using the methods as hypers is rather strong 06:54
moritz nr: my $x = "abc"; say $x ~~ s/a/A/;
TimToady you really don't want 100 methods trying to set $/ in parallel
p6eval rakudo 8e6fa0, niecza v24-23-g0520c7c: OUTPUT«True␤»
moritz nr: my $x = "abc"; say $x ~~ s/x/A/;
TimToady so setting $/ is probably a bad default
p6eval rakudo 8e6fa0, niecza v24-23-g0520c7c: OUTPUT«False␤»
moritz huh, it even kinda works
sorear TimToady: might be relevant: niecza's .subst supports an undocumented flag :inplace 06:55
FROGGS moritz: I did that in january or so
sorear n: my $x = "abc"; $x.subst(/a/,'A',:inplace); say $x
p6eval niecza v24-23-g0520c7c: OUTPUT«Abc␤»
TimToady um, why wouldn't that just be a .= instead?
moritz because we want to return a different value than we assign to $x 06:56
TimToady not that it matters in sink context, but I getcha 06:57
sorear I suppose I could have spelled it :$p = True 06:58
TimToady it almost feels to me like :inplace should just be a different method name 07:01
TimToady it's an argument that does violence to the API 07:01
usually that's a smell that an option is doing too much work 07:02
rindolf Hi all. 07:03
TimToady: hi.
FROGGS are there other pieces in the spec that allow one to say that a method has side effects or not?
hi rindolf
sorear there are two reasons :inplace couldn't easily be a different method: 07:04
TimToady otoh, setting $/ is subst is how we were hoping to set $0 for the replacement
sorear 1. subst doesn't ordinarily return a boolean "did this match?" flag
2. it would capture the $/ set
rindolf FROGGS: hi. 07:05
TimToady 1 is what I'm complaining about, doing violence to the contract 07:06
2 can be worked around, methinks
FROGGS nr: my $x = "abc"; $x.subst(/(a)/,'A'); say $0 07:08
p6eval rakudo 8e6fa0: OUTPUT«「a」␤␤»
..niecza v24-23-g0520c7c: OUTPUT«Any()␤»
FROGGS hmmm, if $/ should not be set, then $0 isnt allowed too 07:09
TimToady right, not without a :set or whatever we call it 07:09
FROGGS n: my $x = "abc"; say $x.subst(/(a)/,{ "$0$0" }, :inplace); say $x
p6eval niecza v24-23-g0520c7c: OUTPUT«True␤aabc␤»
FROGGS interesting 07:10
TimToady but that is going to break down with ».subst as someone pointed out
TimToady it may be cleaner to go back to the -> $/ {} mileau 07:11
or something macro-y for the replacement 07:12
diakopter r: macro marco { /hi/ }; marco 07:16
p6eval rakudo 8e6fa0: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
diakopter phenny: ask masak known? r: macro marco { /hi/ }; marco 07:48
phenny diakopter: I'll pass that on when masak is around.
arnsholt Has masak presented a talk called Macro Polo yet? 07:56
dvj r: <a b c>.shift 08:21
p6eval rakudo 8e6fa0: OUTPUT«No such method 'shift' for invocant of type 'Parcel'␤ in block at /tmp/HQQqSlfPZm:1␤␤»
dvj r: shift <a b c>
p6eval rakudo 8e6fa0: OUTPUT«No such method 'shift' for invocant of type 'Parcel'␤ in sub shift at src/gen/CORE.setting:6186␤ in block at /tmp/m1GIvU3okv:1␤␤»
dvj how do I shift/pop from a list? 08:22
FROGGS r: say <a b c>.flat.shift
p6eval rakudo 8e6fa0: OUTPUT«a␤»
sorear r: my @list = <a b c>; say @list.shift
p6eval rakudo 8e6fa0: OUTPUT«a␤»
sorear r: my @list = <a b c>; say shift @list
p6eval rakudo 8e6fa0: OUTPUT«a␤»
sorear <a b c> is an immutable list literal (of type Parcel) 08:23
dvj r: say <a b c>.flat.perl 08:23
p6eval rakudo 8e6fa0: OUTPUT«("a", "b", "c").list␤»
dvj r: say <a b c>.perl 08:23
p6eval rakudo 8e6fa0: OUTPUT«("a", "b", "c")␤»
dvj ok 08:24
TimToady <a b c>.shift is kind of like 42-- 08:25
FROGGS nr: say 42-- 08:28
p6eval rakudo 8e6fa0: OUTPUT«Cannot assign to a non-container␤ in sub postfix:<--> at src/gen/CORE.setting:3161␤ in block at /tmp/VHMcVwVC9K:1␤␤»
..niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: Writing to readonly scalar␤ at /tmp/kpdqqXVX2A line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4234 (module-CORE @ 580) ␤ at /home/p6eval/niecza/li…
FROGGS rakudo's message could be better 08:29
TimToady agreed 08:30
Attempt to modify a readonly value 08:31
or so
and niecza should avoid the word "scalar" 08:32
TimToady especially if <a b c>.shift ever throws that error, since it's a value, but not a scalar 08:34
well, except in the sense that everything is a scalar when viewed as an object...
moritz why does a Parcel even have a .shift method? 08:35
nr: say so Any.^can('shift')
p6eval rakudo 8e6fa0, niecza v24-23-g0520c7c: OUTPUT«False␤»
moritz nr: say so Parcel.^can('shift')
p6eval rakudo 8e6fa0, niecza v24-23-g0520c7c: OUTPUT«False␤»
moritz rn: <a b c>.shift
p6eval niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: Unable to resolve method shift in type Parcel␤ at /tmp/hGcM0NJzFT line 1 (mainline @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4233 (ANON @ 3) ␤ at /home/p6eval/niecza/lib/CORE.setting line 4234 (module-CORE @ 580) ␤ at /ho…
..rakudo 8e6fa0: OUTPUT«No such method 'shift' for invocant of type 'Parcel'␤ in block at /tmp/sHfeBW41yH:1␤␤»
moritz ok, I think I mis-backlogged something 08:36
cotto If I've got an nqp fix, should push to a perl6/nqp branch and submit a pull request? 08:37
moritz cotto: depends on the fix. If you don't want/need extra review, simply push to master
(I can give you a commit bit if you don't have one)
if you want review, then yes, a pull request
cotto I'm half-asleep. I'll push to a branch. 08:38
dalek p/ops-fixes: f802b49 | cotto++ | src/ops/nqp (3 files):
clean up some ops definitions
moritz the missing semicolon are no-brainers 08:40
cotto so am I right now
;)
knight 08:41
moritz good knight, cotto 08:44
grondilu rn: my ($k, $m) = -3, 10; .say for $a % $m, %a mod %m; 08:51
p6eval niecza v24-23-g0520c7c: OUTPUT«===SORRY!===␤␤Variable $a is not predeclared at /tmp/m5ZizPlvom line 1:␤------> my ($k, $m) = -3, 10; .say for ⏏$a % $m, %a mod %m;␤␤Variable %a is not predeclared at /tmp/m5ZizPlvom line 1:␤------> my ($k, $m) = -…
..rakudo 8e6fa0: OUTPUT«===SORRY!===␤Variable '$a' is not declared␤at /tmp/l1di5QpUzz:1␤------> my ($k, $m) = -3, 10; .say for $a⏏ % $m, %a mod %m;␤ expecting any of:␤ postfix␤»
grondilu rn: my ($k, $m) = -3, 10; .say for $k % $m, %k mod %m;
p6eval niecza v24-23-g0520c7c: OUTPUT«===SORRY!===␤␤Variable %k is not predeclared at /tmp/F9BvbluWvh line 1:␤------> my ($k, $m) = -3, 10; .say for $k % $m, ⏏%k mod %m;␤␤Variable %m is not predeclared at /tmp/F9BvbluWvh line 1:␤------> $m) = -3, 10; …
..rakudo 8e6fa0: OUTPUT«===SORRY!===␤Variable '%k' is not declared. Did you mean '$k'?␤at /tmp/wXI0mkFIh9:1␤------> ($k, $m) = -3, 10; .say for $k % $m, %k⏏ mod %m;␤ expecting any of:␤ postfix␤»
grondilu rn: my ($k, $m) = -3, 10; .say for $k % $m, $k mod $m;
p6eval rakudo 8e6fa0: OUTPUT«7␤-3␤»
..niecza v24-23-g0520c7c: OUTPUT«7␤7␤»
grondilu ^here
grondilu rn: say -3 div 10; 09:07
p6eval niecza v24-23-g0520c7c: OUTPUT«-1␤»
..rakudo 8e6fa0: OUTPUT«0␤»
moritz known rakudobug, iirc 09:08
kresike hello all you happy perl6 people 10:22
uvtc .u 𝑁 14:32
phenny U+1D441 MATHEMATICAL ITALIC CAPITAL N (𝑁)
uvtc TimToady: in the recently-written/mentioned Apollonius RC example, why use sigilless variables instead of (what seems to me, the more customary) sigilled ones? Ex., $v11, $v12... 14:40
timotimo because the $ isn't mathematical? or something? 14:41
FROGGS it looks more like a formular without the $, but I'm fond of it, a variable is a variable is a variable 14:45
uvtc TimToady: also curious, why use the mathematical italic characters instead of ascii? 15:00
timotimo well, for one: 15:01
r: say v11.WHAT
Juerd Possibly, to change Perl from a write-only language to a read-only one?
p6eval rakudo 8e6fa0: OUTPUT«===SORRY!===␤Undeclared routine:␤ v11 used at line 1␤␤»
timotimo oh, huh?
Juerd r: my \v11 = 42; say v11.WHAT 15:02
p6eval rakudo 8e6fa0: OUTPUT«Int()␤»
timotimo TimToady mentioned version objects
moritz r: say v1.1.WHAT
p6eval rakudo 8e6fa0: OUTPUT«Version()␤»
timotimo oh, so it needs at least one .? 15:03
n: say v11.WHAT
p6eval niecza v24-23-g0520c7c: OUTPUT«===SORRY!===␤␤Action method value:version not yet implemented at /tmp/Fezzp_yB39 line 1:␤------> say v11⏏.WHAT␤␤Unhandled exception: invalid undef here␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1443 (die @ 5) …
timotimo n: my \v11 = 42; say v11.WHAT
p6eval niecza v24-23-g0520c7c: OUTPUT«===SORRY!===␤␤Action method value:version not yet implemented at /tmp/zaInOKFJwT line 1:␤------> my \v11 = 42; say v11⏏.WHAT␤␤Unhandled exception: invalid undef here␤ at /home/p6eval/niecza/boot/lib/CORE.setting line 1…
moritz timotimo: seems like
timotimo in that case, there's a bug in niecza :) 15:04
FROGGS uvtc: maybe to show that we can do awesome unicode stuff?
timotimo people will indeed look at it and say "oh, now it's read-only.", Juerd :) 15:05
uvtc FROGGS: Dunno. Maybe. TimToady: Whatever the reasons, I think the RC example would benefit from a short intro blurb explaining (A) why sigilless variables were used, and (B) why the mathematical unicode characters were used instead of just ascii. Just my ②¢. (I'd add the blurb myself, but don't know those answers.) 15:09
sjn Host * ServerAliveInterval 60
Host * ServerAliveInterval 60 15:10
timotimo arnsholt: what is "ZMQ_HAUSNUMERO" supposed to be? o_O 15:17
(also, it lacks one M it seems)
timotimo so, perl6 will by default turn default values for arguments in parameter lists into closures if they look like code. is there a way to make it behave like python (evaluate the code once at "define-time", whatever that may mean) and then re-use that object forever? 15:28
r: sub foo($a = BEGIN { [] }) { $a.push(1) }; say foo; say foo; say foo;
p6eval rakudo 8e6fa0: OUTPUT«1␤1 1␤1 1 1␤»
arnsholt timotimo: It's just a really high number
timotimo arnsholt: is that actually in/from zmq? 15:29
arnsholt Do you have zmq-dev (or whatever your system calls it) installed?
timotimo oh, indeed i do
arnsholt Yeah. If you grep for the name in zmq.h it's explained
timotimo let me check the headers or something
arnsholt It's just a high number to make sure they don't conflict with already defined errnos
timotimo i see. 15:30
i suppose what i really want to "emulate" that python behavior is to just use a state variable, which python doesn't really have 15:32
arnsholt You can use a state variable, or just a global lexical 15:40
timotimo nah, global lexicals don't seem very nice for this, but i suppose it depends verily on the context. 15:42
timotimo arnsholt: i'm stumped by my not-knowing-about-zavolaj. i need getsockopt to work (in order to query RCVMORE) ... can you give me a few pointers? 15:47
timotimo should i create a big given with the possible values and look at the manual what they should return? 15:49
and create appropriate buffers?
kresike bye folks 16:18
timotimo well, at least that's kind of what pyzmq does. it knows which options are int64 and such 16:23
arnsholt timotimo: I haven't really implemented getsockopt/setsockopt yet, actually 16:24
They way they work/their signatures are set up are a bit fiddly
timotimo if you give me a bit of help, i can do it. i've got the python code in front of me right now
hold on, i'll give you a direct link
arnsholt But we could probably make it work 16:25
timotimo github.com/zeromq/pyzmq/blob/maste...t.pyx#L361
arnsholt It's mostly a question of doing it (which I haven't done) and possibly a bit of hackery 16:26
I think the easiest solution is to make a couple of different getsockopt/setsockopt variants using is symbol(...) to handle the various kinds of arguments you can pass to the void *optval argument 16:29
Does that make sense to you? 16:30
timotimo i do know know what "is symbol" does.
moritz it allows you install the Perl 6 sub under a different name than the C function 16:31
timotimo personally i would have tried a somewhat direct port of the cython code.
er, i would have implemented it as a method for the Socket class to be honest
arnsholt Yeah, it'll be in the Socket class. It's a workaround for the various pointer types that can be passed as option values (since if we just make it OpaquePointer the type checking will complain) 16:34
And then only used from a method in Socket
arnsholt It's just the internal plumbing that needs a bit of fiddling 16:34
Can you wait an hour, hour and a half? It's just about time to make dinner here, and then I'll have some time to set this up with you after dinner 16:36
(Today is work after dinner day anyways, so it works out quite well in that respect =)
timotimo sure, why not. 16:37
timotimo i'll prepare a list of options that take strings, 64 bit ints and such, so that you won't have to 16:41
arnsholt timotimo: Awesome! Thanks =) 16:46
timotimo++
timotimo well, that was super simple. i could just copypaste and turn [ ... ] into set(...) 16:48
i guess i'll add more boilerplate
timotimo zavolaj has no int64 type? 16:54
timotimo i accidentally the whole thing. but i don't have a clue if it even works at all. 16:56
arnsholt: perpetuum-immobile.de/zmq_getsockopt.patch have a look if it makes sense to you 16:58
masak good evening, #perl6 17:28
phenny masak: 07:48Z <diakopter> ask masak known? r: macro marco { /hi/ }; marco 17:29
TimToady also irclog.perlgeek.de/perl6/2013-02-20#i_6476740 17:29
masak diakopter: for the love of Gauss, don't call macros 'marco'. ;)
diakopter okay :)
masak r: macro x { /hi/ }; x 17:30
p6eval rakudo 8e6fa0: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
diakopter r: macro mocra { /hi/ }; mocra
p6eval rakudo 8e6fa0: OUTPUT«===SORRY!===␤too few positional arguments: 2 passed, 3 (or more) expected␤»
TimToady there was also some discussion of LTAness after that
masak :P
masak back-clogs 17:31
japhb diakopter, How about calling your macros 'm'? The abbreviation would be way easier to read. 17:32
timotimo hello masak 17:33
diakopter don't take it personally.. I'm trying to convince myself to care about readability in the face of cuteness..
TimToady
.oO(You think that's readable today...)
diakopter (where trying implies failing) 17:35
PerlJam wonders about masak's wooden shoes that he wears on his back. 17:41
masak PerlJam: either that, or I was becoming retroactively congested. 17:42
now how's about I spend all this train time reviewing p6cc t1 solutions? how does that sound? :) 17:43
PerlJam masak++
masak I want to post the t1 thing before I leave for vacation on Saturday...
I'm about halfway through the reviewing. 17:44
diakopter masak+++
er
masak__
er
masak++
moritz ++masak
masak jnthn and I have had a fun $workday, by the way. we heckled each other on stage for 45 minutes :)
timotimo are there recordings? :) 17:45
diakopter "You're the best programmer in the world.." "no, you are.." "no, you are.."
masak :P
TimToady phenny: tell uvtc added the explanation to rosettacode.org/wiki/Problem_of_Apo...ius#Perl_6 that you requested; thanks for requesting it :) 17:52
phenny TimToady: I'll pass that on when uvtc is around.
tadzik hello #perl6 17:57
masak tadziku! \o/ 17:57
moritz \o tadzik
tadzik \o/ 18:01
ElDiabolo masak, Hi. Still thinking about LINQ vs SQL. 18:10
There are points for LINQ. It can do a non denormalizing join.
But only if you join on equals. 18:11
moritz TimToady: should only /.../ cause a match in sink context, or any regex object? 18:15
moritz I vote for the former 18:16
masak ElDiabolo: I don't know enough about LINQ, to be honest. I'd need to study it more if I were to implement it. 18:19
arnsholt timotimo: Thanks for the patch! 18:22
It's not quite what I had in mind, but it's well on its way 18:23
timotimo++ # Doing the hard work for me =)
moritz
.oO( every Perl 6 developer should have a minion who does the hard work for him)
tadzik certainly works for masak and his clones
moritz it's not really "masak and his clones" 18:24
it's more like masak is the entirety of his clones 18:25
tadzik what if The Masak is the minion of one of the clones?
like a circular linked list
moritz not one major personality and then some inferior clones
ElDiabolo masak, I found today that the other component that makes LINQ fun is already there. Its gather / take. 18:26
masak hm. 18:27
agree that you'd want laziness in there, yes.
ElDiabolo masak, Yes!
masak, LINQ to db is necessarily lazy. 18:28
timotimo arnsholt: i'd be interested to know what you had in mind 18:29
arnsholt timotimo: Writing it up for getsockopt now 18:31
masak ElDiabolo: except when you're doing Rx, then it's necessarily observant ;)
timotimo r: sub foo (Str(Any) $y) {...} 18:47
p6eval rakudo 8e6fa0: OUTPUT«===SORRY!===␤Missing block␤at /tmp/V_1LAWIzZP:1␤------> sub foo (Str(Any) ⏏$y) {...}␤ expecting any of:␤ statement list␤ prefix or term␤ prefix or meta-prefix␤ new name to be defined␤ formal…
timotimo didn't this work some time ago?
TimToady nope, NYI 18:51
timotimo that's probably a sizable chunk of work, too ...
std: sub foo (Str(Any) $a) { ... } 18:52
p6eval std 7551b8f: OUTPUT«Potential difficulties:␤ $a is declared but not used at /tmp/g834BzaX5c line 1:␤------> sub foo (Str(Any) ⏏$a) { ... }␤ok 00:00 44m␤»
timotimo maybe i could implement parsing that and throwing a NYI, though ...
FROGGS what exactly should Str(Any) $y do? 18:53
timotimo die with "coercive type constraints not yet in^Hmplemented" 18:54
PerlJam heh
FROGGS timotimo: I meant, what should it do when beeing implemented 18:55
what is a coercive type constraint?
timotimo the function would now take any type of argument, but will coerce it to a string before assigning it to $a
skids rakudo used to have (or may still) some prestandard form of that. Something like "Int $p as Str".
timotimo perlcabal.org/syn/S02.html#Coercive...clarations - this is the syn on it
PerlJam FROGGS: see S02:526
arnsholt jnthn: Does allowing NativeCall users to get the sizeof various types sound like a reasonable feature to you? 18:56
diakopter arnsholt: does to me :) 18:57
arnsholt I think it'd definitely be useful for things like int which could potentially vary in size
FROGGS arnsholt: yes, it does
sizeof a cstruct is also useful I guess
If you have to know its memsize for, say, SDL_RWops 18:58
PerlJam arnsholt: do we expect Perl 6 users to "size" things based on the available data type sizes of the underlying system? (I think the answer is "yes", so we should export that to the user)
FROGGS timotimo, PerlJam: thanks
dalek rl6-roast-data: f0c310f | coke++ | / (4 files):
today (automated commit)
rl6-roast-data: 2672fa3 | coke++ | / (3 files):
today (automated commit)
rl6-roast-data: 0d5d865 | coke++ | / (4 files):
today (automated commit)
arnsholt A C library could conceivably expect to get the size of something passed as an argument, certainly 18:59
diakopter arnsholt: definitely++
TimToady the question strikes me more as "do we make C int available, regardless of size, in addition to int32 and int64?" 19:08
arnsholt I think we should
grondilu TimToady: why not?
diakopter I think so, b/c if we want to pass a buf to a C library that expects int*, we need to know how wide to space them
TimToady (the intent of int in Perl 6 is to reflect the size of the C int, whatever it is
)
arnsholt Some libraries have machine words as part of their API (sadly) 19:09
TimToady -1 :)
arnsholt So if we want to have some chance of talking to those libs with some kind of portability, I think we need it 19:10
[Coke] I cannot find the article/post where chromatic talked about rakudo not passing its own test suite. bother.
timotimo agreed. we won't make apis better by forbidding machine words in zavolaj
arnsholt Yeah, definitely -1, but fixing it is on the same order of magnitude of correcting all the people who are wrong on the internet =)
timotimo we will only make it harder for perl6 to interface with apis
TimToady sure, which is why it's already specced that way 19:11
arnsholt [Coke]: I'm pretty sure there are tests that are "not ok" in Perl 5 as well =)
TimToady: Certainly, yeah
diakopter [Coke]: twitter.com/chromatic_x/status/299...4180018176 19:12
skids gist.github.com/skids/4998260 # Some thoughts I had a while back on native int ops that are annoyingly nonpresent in HLLs.
grondilu it's not just about portability. Some people might want a machine int for speed or something, but don't want to bother wondering whether they should use 32 or 64 bits.
[Coke] diakopter: danke. that explains why I couldn't find it, it's got a url shortener. :P 19:13
TimToady moritz: the purpose of rx// is primarily to be a choose-your-ow-nquotes form of //, not to be the opposite of m// 19:15
*own
TimToady so I think rx// and // should behave the same in sink context 19:16
masak so... why doesn't .uniq have a :by parameter? 19:18
TimToady and, in fact, it's specced that way at S05:2228 19:19
masak jnthn++ points out that in the method form (in analogy with .sort and .max), a &by argument should just be passed as a positional. 19:21
skids
.oO(perlgeek irclog seems to strip leading colons from searches so you can't search perl6 adverbs)
19:22
timotimo hum, me has to build a newer nqp to build rakudo 19:24
skids
.oO(yay github fixed "my gists")
arnsholt skids: Sure it doesn't just strip punctuation in general?
skids possibly 19:25
arnsholt That's pretty common for full-text search
timotimo everybody wants the colon!
skids the bitbucket gets the colon
[Coke] there, I can cross "replying to chromatic" off my mental todo list. 19:26
arnsholt [Coke]++ 19:28
Probably not productive to reply to chromatic, but nice paragraphs in the README
masak where? where? 19:29
arnsholt twitter.com/chromatic_x/status/299...4180018176 19:30
masak [Coke]++ 19:33
timotimo spectests his grammar change 19:34
arnsholt Oh. Rakudo doesn't have an int64 type 19:37
arnsholt goes to fix
rindolf Hi all. 19:39
arnsholt timotimo: Sorry for the delay. Took a bit longer than I expected =) 19:40
timotimo don't worry
i've found something else to hack on in the mean time
arnsholt Good, good =)
timotimo and whenever i get a little bored, i just look to my right where people are watching TPB:AFK on a beamer
TimToady rindolf: diakopter++ and I are having a mini-hackathon this morning
diakopter so far just thinkathon for me 19:41
arnsholt Oh, BTW. Is that pyx file you linked me to in a special format? It looks like Python, but has some bits of syntax I don't recognise
TimToady we're trying to figure out how one ought to integrate p5 and p6 threading in the least-insane way
timotimo it's cython
arnsholt cython?
arnsholt googles 19:42
timotimo yes, it adds type information and such so that python code can be compiled
more or less
rindolf TimToady: ah.
timotimo makes it pretty easy to write bindings, too
arnsholt Oh, neat
rindolf TimToady: you may enjoy this bit from my homepage as well - www.shlomifish.org/humour/bits/Im-T...Tim-Toady/
TimToady I guess it's more of a yackathon :) 19:43
timotimo shaveathon?
rindolf Nackathon. 19:44
[Coke] You could come over this way, we could have a Nyackathon. 19:44
TimToady too many dead-looking trees this time o' year... 19:45
timotimo > sub foo(Str() $foo) { ... } → coercive type declarations is not yet implemented. Sorry. - like?
TimToady prefers a place where trees are always confused about what season it is...
timotimo oh, should remove the s from there, i think
TimToady or s/is/are/
timotimo well, i just do .NYI, so i'd have to either make a :plural named arg or add a .NYIs or something 19:46
TimToady then singular is fine 19:47
timotimo nah, i'll add :plural. that's much prettier. 19:50
moritz TimToady: what about my $x = rx/a/; $x; 1; 19:51
TimToady: should that cause a regex match?
in other words, is regex match in void context syntactic?
timotimo oh my, i'll have to add a plural field to X::Comp::NYI
[Coke] TimToady: (\c) d'oh. I was just cutting and pasting his sample without thinking. Danke. 19:52
TimToady or you could just accidentally the "is"
PerlJam timotimo: don't shave the yak, just use the singular :)
timotimo well, i could also remove the "Sorry." from the end, because it will be thrown with a big ==Sorry!== at the top 19:53
TimToady: i could turn it into a verb, english supports that!
"declaring coercive types is not yet implemented", sound good?
TimToady "coercive types not yet implemented" is also fine 19:54
timotimo i can't accidentally the is, NYI .message is defined thusly: "$.feature is not yet implemented. sorry."
"coercive type declaring is not yet implemented" :) 19:55
TimToady that's not very Englishy
PerlJam timotimo: "Feature ``$.feature'' is not yet implemented" ?? Then you can .NYI: "coercive type declaration" 19:56
timotimo that sounds quite stilted, i find :( 19:56
PerlJam yeah, I agree
TimToady I'd just s/is\s//
timotimo you mean for every invocation of NYI?
TimToady yeah
masak whoa, en.wikipedia.org/wiki/Operator-pre...nce_parser mentions PGE. that's gotta be old news at this point.
timotimo hm, why not
arnsholt spectests 19:57
TimToady moritz: yes, it's syntactic 19:58
timotimo r: 1 + ** 19:58
p6eval rakudo 8e6fa0: OUTPUT«===SORRY!===␤HyperWhatever (**) is not yet implemented. Sorry. ␤at /tmp/tamBHOfCM_:1␤------> 1 + **⏏<EOL>␤»
PerlJam timotimo: looking at the existing uses of NYI, I think TimToady's s/is\s// would work fine. 19:59
timotimo r: my Str Int $a;
p6eval rakudo 8e6fa0: OUTPUT«===SORRY!===␤Multiple prefix constraints is not yet implemented. Sorry. ␤at /tmp/A_naCd7oCo:1␤------> my Str Int ⏏$a;␤ expecting any of:␤ scoped declarator␤»
timotimo yes, that's what i meant to say
moritz TimToady: ok, thanks
$ ./perl6 -e '$_ = "foo"; /./; say $/' 20:02
「f」
timotimo my local implementation doesn't handle this correctly yet: 20:05
r: my Str(Any) $a = 1000;
p6eval rakudo 8e6fa0: OUTPUT«===SORRY!===␤Two terms in a row␤at /tmp/_iZC79AoNK:1␤------> my Str(Any) ⏏$a = 1000;␤ expecting any of:␤ scoped declarator␤ constraint␤ postfix␤ infix or meta-infix␤ infix stopper␤ st…
moritz the coercion syntax isn't implemented yet 20:09
PerlJam moritz: timotimo is adding the NYI for it.
moritz ah
TimToady or the nya, nya
Not Yet Awesome, I guess
PerlJam said twice for emphasis? 20:10
TimToady the lack of awesomeness is also not yet awesome
PerlJam timotimo: though, I don't understand ... are there two places in the grammar that parse type names? 20:12
(I'm pretty sure I remember there being some contextual var that let you know if you were in a declaration or not) 20:13
timotimo PerlJam: yes, the one is type constraint, which can also have a constant value (as in multi MAIN("foo", $bar) { ... }) and when you have my, which won't allow type constraints 20:16
PerlJam Does Str(Any) ::T $thing make sense? Wouldn't it just make ::T be Str? or would ::T capture the type before coercion? 20:17
timotimo but i've made a mistake now and the core setting won't parse any more :(
PerlJam timotimo: you've won the "breaking core" achievement! :) 20:17
dalek p/ops-fixes: 031801c | cotto++ | src/ops/nqp_dyncall.ops:
use a non-empty default case
20:18
timotimo oh i've broken the core setting a bunch of times before
dalek kudo/nom: 6392d64 | (Arne Skjærholt)++ | src/core/natives.pm:
Add int64 type.
timotimo i unbroke it, fortunately 20:21
uvtc TimToady: thanks! ↓↓ 20:22
phenny uvtc: 17:52Z <TimToady> tell uvtc added the explanation to rosettacode.org/wiki/Problem_of_Apo...ius#Perl_6 that you requested; thanks for requesting it :)
timotimo okay, spectests and then pull request :D
uvtc But, what does "SSA style" mean? ("Finally, writing in an SSA style tends to help the optimizer.") 20:23
timotimo static single assignment
basically you turn a = 5; a = a + 10; a = a * 10; into a1 = 5; a2 = a1 + 10; a3 = a2 * 10;
so you'll have every name on the left side of an equals sign at most once
(plus some magic for loops and branches)
arnsholt derps 20:25
masak "some magic"? you left out all the good parts! :P 20:26
arnsholt star: use NativeCall; my CArray[int] $foo .= new; $foo[0]; say "alive";
p6eval star 2012.12: OUTPUT«alive␤»
timotimo i don't really know the good parts, sorry :(
arnsholt star: use NativeCall; when 1 { my CArray[int] $foo .= new; $foo[0]; say "alive"; }
p6eval star 2012.12: OUTPUT«use of uninitialized variable $a of type Any in numeric context in block at /tmp/4KD8FMDH0k:1␤␤»
arnsholt I'm going to assume this is a NativeCall bug, but does anyone have any clue what might be going on? 20:27
star: use NativeCall; when 1 { my CArray[int] $foo .= new; $foo[0] = 1; say "alive"; } # What I actually intended
p6eval star 2012.12: OUTPUT«use of uninitialized variable $a of type Any in numeric context in block at /tmp/Ma0tDchZWJ:1␤␤»
moritz star: use NativeCall; my CArray[int] $foo .= new; say $foo[0].perl 20:28
p6eval star 2012.12: OUTPUT«(signal SEGV)»
uvtc timotimo: Ah. Thanks. Added link in the RC page to the SSA wikipedia page.
arnsholt Oooh, fun. That's a bug as well
moritz++
TimToady why is that written that way rather than my int @foo[$size] as S09 specs?
timotimo All tests successful. - yay 20:29
dvj r: my $a = "adsf"; $a ~~ s/ds/{ substr($1, 0, 1) }/;
p6eval rakudo 8e6fa0: OUTPUT«Nominal type check failed for parameter '$s'; expected Cool but got Any instead␤ in sub substr at src/gen/CORE.setting:2407␤ in block at /tmp/yinhhItLMW:1␤␤»
arnsholt I don't really know. jnthn decided to =)
dvj what $s?
TimToady a leaky abstraction, apparently 20:30
arnsholt Yeah, I think the error I get up there is a bug in the void context code 20:31
benabik sub substr(Cool $s, $pos, $chars?) { $s.substr($pos, $chars) }
arnsholt star: use NativeCall; my $stuff = 1; given $stuff { when 1 { my CArray[int] $foo .= new; $foo[0] = 1; say "alive"; } } 20:32
p6eval star 2012.12: OUTPUT«alive␤»
arnsholt Hmmm.
Ooooh, never mind. Braino on my part
benabik dvj: The error happens because $1 never gets assigned in your code. 20:33
dvj: So you end up calling substr(Any, 0, 1)
moritz dvj: that of method subst, which s/// desugars to
dvj ok
I guess I'll use $/ instead :)
benabik moritz: No, in the substr that he calls in the RHS of s/// 20:34
moritz oh
benabik dvj: Perhaps you meant $0 ?
arnsholt dvj: There is no $1 since you don't have any capture parens 20:35
benabik r: my $a = "adsf"; $a ~~ s/(ds)/{ substr($0, 0, 1) }/; say $a 20:36
p6eval rakudo 8e6fa0: OUTPUT«adf␤»
dvj benabik: arnsholt: you're right. My example was bad. I'm porting some perl5 code where it's actually $1
I just simplified to trigger the $s error
benabik dvj: s/(ds)/{ substr($0, 0, 1) }/ works
dvj 16 $string ~~ s:g/<<(year|day|hour|minute|second)s?>>/{ $1.substr(0,1) }/; 20:37
benabik Error seems somewhat LTA. Perhaps it should say something like "in first argument to substr" instead. :-/
dvj does the second match (because of :g) go into $1?
nevermind, $0 is what I want :) 20:40
thanks
timotimo github.com/rakudo/rakudo/pull/104 - i made a contribution \o/ 20:41
moritz benabik: it says substr in the backtrace
benabik moritz: Right. But how does $s connect to that? Can't tell unless you open the setting. 20:42
Or maybe if it printed the signature. 20:43
donaldh_ seen jnthn
benabik donaldh: ENOALOHA 20:44
donaldh_ benabik: thx, thought I'd syntax errored there 20:45
uvtc scene jnthn
arnsholt timotimo: Take a look at my latest commit. See what I'm doing? 20:46
timotimo in net::zmq?
benabik donaldh_: bacek had to shut down aloha and nobody's set up a replacement host yet. :-/
benabik The code and database are all online though. 20:46
timotimo ah, i see what you're doing 20:47
do you think that already works?
grondilu About S14: if I have a parametric type such as 'role Foo[Int $bar] {}', there is no implicit accessor to $bar, is there? If I want one I need to write it myself 'method bar { $bar }'? 20:50
benabik role Foo[Int $.bar] ?
grondilu rn: role Foo[Int $.bar] {}; my $x = 13 but Foo[42]; say $x.bar; 20:51
p6eval niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: No 'self' available for attributive?␤ at /tmp/3DUzicIomd line 0 (role-Foo @ 1) ␤ at <unknown> line 0 (ExitRunloop @ 0) ␤ at /home/p6eval/niecza/lib/CORE.setting line 1388 (infix:<does> @ 23) ␤ at /home/p6eval/niecza/lib/CORE.settin…
..rakudo 8e6fa0: OUTPUT«None of the parametric role variants for 'Foo' matched the arguments supplied.␤Unable to bind attributive parameter 'bar' - could not find self␤ in any specialize at src/gen/Metamodel.pm:2044␤ in any specialize at src/gen/Metamodel.pm:1701␤ in at src/gen/Metamo…
benabik grondilu: I didn't think it actually existed. 20:52
grondilu rn: role Foo[Int $bar] {}; say my $x = 13 but Foo[42]; 20:53
p6eval rakudo 8e6fa0: OUTPUT«13␤»
..niecza v24-23-g0520c7c: OUTPUT«Potential difficulties:␤ $bar is declared but not used at /tmp/sYOMnufeux line 1:␤------> role Foo[Int ⏏$bar] {}; say my $x = 13 but Foo[42];␤ $x is declared but not used at /tmp/sYOMnufeux line 1:␤------> role Foo[Int $bar] {}; s…
arnsholt timotimo: Yeah. Requires Rakudo HEAD (for the int64 type) 20:54
benabik r: role Foo[Int $bar] {}; my $x = 13 but Foo[42]; say $x.bar
p6eval rakudo 8e6fa0: OUTPUT«No such method 'bar' for invocant of type 'Int+{Foo}'␤ in block at /tmp/oKWEu1i4Jx:1␤␤»
benabik rn: role Foo[Int $bar] { method bar { $bar } }; my $x = 13 but Foo[42]; say $x.bar
timotimo cool, thanks, alot! :)
p6eval rakudo 8e6fa0, niecza v24-23-g0520c7c: OUTPUT«42␤»
arnsholt I'm not 100% sure it'll work as intended (untested, after all) but I think it's in the right direction
Also, I'm not quite happy with the interface. If you have ideas for a better interface, feel free 20:55
timotimo er, does that return actually work? 20:56
donaldh_ benabik: is hosting aloha onerous?
arnsholt No it doesn't. This is why you always should test code =D 20:57
benabik donaldh_: I don't think so. There was talk of putting it on feather, but nobody's taken the time yet.
timotimo :D
donaldh_ A task for someone with permissions _and_ tuits then 20:58
benabik donaldh_: I don't know that anyone would complain if someone hosted aloha elsewhere. :-D 20:59
arnsholt timotimo++ # More cleverer than me 21:01
timotimo: Let's try again with the new HEAD =)
timotimo hah, not actually cleverer. i think my lesser skill helped me out here :) 21:02
arnsholt Just a bit more distance from the code, I think
I forgot the details =)
timotimo all right :)
arnsholt timotimo: Are there some tests in github.com/zeromq/pyzmq/ and I'm just not finding them, or are there none? 21:06
timotimo i don't know to be honest :( 21:07
arnsholt 'k 21:08
timotimo building rakudos as we speak 21:09
don't really have code to test it on, though, maybe i'll whip up a quick bit of test code
arnsholt Yeah, nothing to test on for me either =/ 21:10
Should probably get around to fixing that sometime soon =)
timotimo how hard would it be to copypaste-program setsockopt from the code we have now? 21:12
can i take the type from the hash and coerce a value to it or something?
arnsholt No need to coerce 21:13
Should be pretty straightforward to copy-paste code setopt 21:14
timotimo i'll still have to keep the given/when?
arnsholt Yeah, to dispatch to the correct variant of zmq_setsockopt
And create the appropriately typed CArray 21:15
timotimo well, there is only one variant of zmq_setsockopt :P
oh, what?
suddenly there's more
arnsholt You'll have to create the setsockopt variants, similar to what I did with getsockopt 21:16
Should still only be one setsockopt
timotimo yes, i thought so
jnthn is home :) 21:23
timotimo what's the current way to express return nothing? just return; at the end? 21:24
timotimo arnsholt: would you have a problem with turning the different zmq_getsockopts and setsockopts into a multi? then we could remove the last line of each of the when cases after the given 21:29
timotimo well, maybe that'd be a bit less efficient 21:31
arnsholt I'm not sure if multis would work 21:34
It'd be cool to try though! 21:35
But perhaps keep what we have until we know it works (or it gets hacked into something that does work), and then try the multi idea then?
I don't think anyone's tried to use multis with Zavolaj yet =)
Bedtime for me now. But feel free to commit code for setsockopt and I'll look at it tomorrow 21:37
timotimo good night! 21:38
i won't stay up very much longer, though
skids r: use NativeCall; multi sub f (CArray[int] $b) { "[int]".say }; multi sub f (CArray[int8] $b) { "[int8]".say; }; my CArray[int8] $a .= new(); f($a) 21:44
p6eval rakudo 6392d6: OUTPUT«===SORRY!===␤Could not find NativeCall in any of: /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/site/lib, /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/vendor/lib, /home/p6eval/nom-inst/lib/parrot/4.10.0-devel/languages/perl6/lib, /h…
skids ah
star: use NativeCall; multi sub f (CArray[int] $b) { "[int]".say }; multi sub f (CArray[int8] $b) { "[int8]".say; }; my CArray[int8] $a .= new(); f($a)
p6eval star 2012.12: OUTPUT«===SORRY!===␤CHECK FAILED:␤Calling 'f' will never work with argument types (CArray+{IntTypedCArray}) (line 1)␤ Expected any of:␤ :(CArray+{IntTypedCArray} $b)␤ :(CArray+{IntTypedCArray} $b)␤»
timotimo :( 21:45
skids Though multis with P6 arguments in an "is repr" class do still work fine. 21:46
timotimo does the dispatcher have problems with thet mixed in roles?
jnthn Not entirely sure what's going on there 21:47
skids r: role A[$i] { }; multi sub f (A[0] $b) { "0".say }; multi sub f (A[1] $b) { "1".say; }; my A[1] $a; $a = A[1].new(); f($a) # this works 21:49
p6eval rakudo 6392d6: OUTPUT«1␤»
timotimo what if there's two composed roles? 21:50
skids Those are punned roles, I would assume. 21:51
so in effect classes.
r: role A[$i] { }; my A[1] $a .= new(); #interestingly... 21:52
p6eval rakudo 6392d6: OUTPUT«Cannot assign to a non-container␤ in method dispatch:<.=> at src/gen/CORE.setting:1014␤ in at src/gen/Metamodel.pm:1338␤ in block at /tmp/dkKR9JuZBb:1␤␤»
timotimo well, /me decommutes & 21:54
dalek p: 7fc8127 | jnthn++ | src/ (2 files):
Move mark hash to ParseShared.

This should get rid of some bugs due to over-sharing of the hash, but also makes it easy to get rid of 2 more Q:PIR chunks.
22:06
grondilu rn: role Mod[$modulus] does Real { method Bridge { self % $modulus } }; say (13 but Mod[10]) 22:10
p6eval niecza v24-23-g0520c7c: OUTPUT«Unhandled exception: Method 'Bridge' must be resolved by class 'Int+Mod[curried]' because it exists in roles 'Mod[curried][...]' and 'Mod[curried][...]'␤ at /home/p6eval/niecza/lib/CORE.setting line 1388 (infix:<does> @ 23) ␤ at /home/p6eval/niecza/lib/C… 22:11
..rakudo 6392d6: OUTPUT«Ambiguous call to 'gist'; these signatures all match:␤:(Numeric:D : Mu *%_)␤:(Numeric:D : Mu *%_)␤␤ in method gist at src/gen/CORE.setting:902␤ in sub say at src/gen/CORE.setting:7602␤ in block at /tmp/W2a14FBppc:1␤␤»
grondilu :(
why couldn't it be that simple to define a modular integer? 22:12
donaldh jnthn: I sent you a pull request for nqp-jvm yesterday. findcclass and iscclass fixes 22:24
jnthn donaldh: Yes, saw that a few moments ago in my inbox :) 22:24
Thanks, will look soon :) 22:25
donaldh: oh, good catch on the PUNCT_TYPES 22:29
And...a few other things :) 22:30
dalek p-jvm-prep: f810b42 | (Donald Hunter)++ | / (3 files):
Added iscclass tests. Fixed iscclass to pass tests. Character.getType

Added findcclass, findnotcclass and tests.
p-jvm-prep: ad52981 | jonathan++ | / (3 files):
Merge pull request #17 from donaldh/findcclass

Added findcclass, findnotcclass, tests. Added iscclass tests. Fixed iscclass to pass tests.
jnthn donaldh++ 22:32
uvtc Would be interesting if something like perl6.org/compilers/features could be autogenerated using tests is roast. That is, if each line in the feature matrix corresponded with a test (or set of tests). 22:35
jnthn uvtc: It really isn't that much to maintain the JSON file; it only needs updates now and then. 22:36
donaldh jnthn: I'm looking at bcel and invokedynamic
jnthn ooh, yaya
*yay
donaldh jnthn: bcel-5.2 does not support it. We'd need bcel-6.0-SNAPSHOT
jnthn: i.e. svn trunk 22:37
jnthn Well, we check in the JAR, so if you can throw in an updated one, that works for me
uvtc jnthn: Is there currently a way to graphically see how much of (and which parts of) Roast a given impl passes?
jnthn donaldh: I'll give you a commit bit so you can do it more easily 22:38
(done) 22:39
uvtc: Not as far as I know. I guess the numbers [Coke]++ produces each day are an easy data source
uvtc Seems like it would be quite cool to see a color-coded icon for each top-level directory in roast. Red ---> reddish-green --> greenish-red ---> green.
donaldh jnthn++ 22:40
uvtc jnthn: Oh, coke/perl6-roast-data
jnthn: thanks.
masak 'night, #perl6 22:53
labster 'night masak, 'morning #perl6
tadzik hello hello 22:55
jnthn wonders where it's morning :)
uvtc I've heard that Perl 6 syntax is more regular than Perl 5. Made me think: 22:56
"It would take 5 bowls of Perl 5 to give you the same syntactic regularity as one bowl of Perl 6."
labster jnthn: japan probably
uvtc Oh man. I need to get a humor limiter for this keyboard. 22:57
labster uvtc: we'll put that on the perl 6 box when rakudo hits the shelves 22:58
I started playing around with lue's Lingua::EN::Number::Ordinal, and started thinking about a way to use a more language-independent algorithm... and ended up with this: 22:59
% perl6 number.p6 1284000126
1284000126 ->
en: one billion two hundred eighty-four million one hundred twenty-six
es: uno mil doscientos ochenta y cuatro milliones ciento veintiséis
jp: 十二億八千四百万百二十六
lue labster++ # can you put the source somewhere, e.g. gist ? I'd like to see it. 23:00
labster which are all of the languages I know anything about. And, for the first time ever, I'm going to say that Japanese is much easier to deal with. 23:01
lue I'd likely be able to scrounge up some French and German :) . 23:02
dalek p: bd369a5 | jnthn++ | src/HLL/Grammar.pm:
Turn EXPR_reduce from PIR to NQP.

Most of the work was done by kboga++. Added some native types and did some changes for the sake of performance.
23:03
lue
.oO(Good, I did remember to mention short scale all those years ago)
labster lue: I'm sure it doesn't look all that great yet... but let me start a repo 23:04
lue OK. I'm sure my module doesn't look that great either :P 23:05
.oO(Well, I did put "zeroth" twice because it didn't work in the first spot. Sigh.)
23:07
labster github.com/labster/p6-Lingua-Number 23:11
tadzik labster: did you see wiki.perl6.org/Create%20and%20Distr...%20Modules ? 23:12
labster yes and it's not even close to that
everything is inline at this point. I'm trying to decide if it makes more sense to have different languages modules inherit from it, or have language modules provide classes for lingua::number to use. 23:13
lue fwiw, looking at my Lingua::EN::Numbers::Ordinal module, I now would have preferred creating lightweight per-language text files for all the units, then allow one to choose the language through some mechanism. 23:15
(And then I'd be able to s:g/Lingua::EN::Numbers::Ordinal/Numbers::Ordinal/) 23:16
lue Does .WHICH give me something used in comparisons when it comes to "Name Equivalence of Types"? 23:19