🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku Set by ChanServ on 14 October 2019. |
|||
00:26
zacts left
00:29
finsternis joined
00:46
cpan-raku joined,
cpan-raku left,
cpan-raku joined
01:06
AlexDani` joined
01:08
AlexDaniel left
01:11
_jrjsmrtn joined
01:12
Roamer` joined
01:14
__jrjsmrtn__ left
01:16
molaf__ left
01:22
maggotbrain777 joined
01:25
maggotbrain left
01:29
molaf__ joined
01:40
a3f left
01:49
sjaveed joined
01:51
sjaveed left
01:59
sjaveed joined
|
|||
sjaveed | hello folks! | 02:00 | |
[Coke] | hello | ||
02:02
a3f joined
|
|||
sjaveed | so I'm just getting started with Raku - former perl monger that went to ruby but am now interested in falling in love with raku | 02:04 | |
i'm running into an issue when attempting to use a regex that's stored in a string - i'm sure i'm doing something wrong | 02:05 | ||
i've got a gist with a testable script here: gist.github.com/sjaveed/061c743b70...46bcc5c000 | 02:06 | ||
wondering if experienced rakuist has thoughts on what i'm doing wrong | |||
[Coke] | if you want to "eval" a regex, I think it's /<$string>/ | 02:07 | |
m: my $regex-str = '"/greeting/" $<name> = (.+)'; my $path = "/greeting/bob"; say $path ~~ /<$regex-str>/ | |||
camelia | 「/greeting/bob」 | ||
[Coke] | which I only remember because I basically asked the same question this weekend. :) | ||
sjaveed | actually yeah my bad - that was an older version | ||
i switched to that | |||
but it's not picking up my capture groups with that syntax | 02:08 | ||
compare that to | |||
[Coke] | m: my $regex-str = '"/greeting/" $<name> = (.+)'; my $path = "/greeting/bob"; $path ~~ /<$regex-str>/ ; say $0 | ||
camelia | Nil | ||
[Coke] | m: my $regex-str = '"/greeting/" $<name> = <(.+)>'; my $path = "/greeting/bob"; $path ~~ /<$regex-str>/ ; say $/ | ||
camelia | 「/greeting/bob」 | ||
sjaveed | m: my $path = "/greeting/bob"; say $path ~~ /"/greeting/" $<name> = (.+)/; | 02:09 | |
camelia | 「/greeting/bob」 name => 「bob」 |
||
sjaveed | i'm certain it's something trivial and i'm not seeing it | ||
also it's been 20 years since i've been on irc | 02:10 | ||
i think i've missed the bots :-) | |||
oh lol just saw your comment [Coke] - about having asked the same question recently | 02:12 | ||
02:12
zacts joined
|
|||
sjaveed | do you have an example of where you've used string interpolation in your code? | 02:12 | |
wondering if seeing an example might help figure this out | |||
[Coke] | question: do you really need to store the regex as a string? | 02:13 | |
you could do my $regex = /..../ and then use the regex object. | |||
(assuming you just wanted to pull it out into a separate object, not necessarily as a string) | |||
sjaveed | the's a good question - i *think* i need to store it as a string | 02:14 | |
let me explain what i'm trying to do and maybe a better alternative will appear | |||
so this is essentially the toy functionality i figured i'd build - a simple routing engine for the web | |||
02:14
zacts left
|
|||
sjaveed | something like that rails has | 02:14 | |
so you could provide it a route that looks like e.g. /greeting/:name and it will match against /greeting/bob and give me name as the param | 02:15 | ||
my initial take on that was to take the route /greeting/:name and convert it into a regex | |||
similar to the one in the gist | |||
do that for all routes specified | |||
and see which one matches any given path | |||
i'm not sure i can do this with a static regex | 02:16 | ||
02:17
MilkmanDan left
|
|||
[Coke] | ... have you seen Cro? | 02:17 | |
sjaveed | what's that? | ||
02:18
MilkmanDan joined
|
|||
[Coke] | (someone already built something similar to the thing you're looking for) - but I know that building one is very attractive to the folks that like perl & raku | 02:18 | |
sjaveed | sorry really new to the ecosystem | ||
oh hmmm | |||
[Coke] | cro.services/ | ||
sjaveed | i'll take a look | ||
02:18
maggotbrain777 left
|
|||
sjaveed | yeah this is also a bit of a personal challenge really | 02:18 | |
nothing like a project to learn a language i think | |||
but maybe there are pointers to using regexes for this there | 02:19 | ||
thanks for the pointer! | |||
02:19
maggotbrain joined
|
|||
elcaro_ | sjaveed: maybe look at the source of HTTP::Server::Router and see how it does it | 02:19 | |
github.com/tony-o/perl6-http-server-router | |||
sjaveed | oooh | 02:20 | |
a pure router | |||
[Coke] | elcaro_++ | ||
sjaveed | ok this might be more interesting | ||
the Cro site's first example seemed to indicate they're solving the problem differently | |||
02:20
elcaro_ is now known as elcaro
|
|||
sjaveed | get "greet", $name -> sub {} | 02:20 | |
[Coke] | anyway, I don't know why your attempt doesn't preserve the captures. :( | ||
sjaveed | they're bypassing the problem it looks like | ||
thanks elcaro_! this is promising | 02:22 | ||
they're also using regexes but differently | 02:23 | ||
elcaro | No probs... you can search for modules at modules.raku.org | ||
even if you're trying to roll your own solution for learning, it's often helpful to look at how others tackled it | |||
sjaveed | agreed | ||
the thing i know i'll struggle with for a bit is finding the idiomatic way to raku | 02:24 | ||
if nothing else, existing modules should help point me in the right direction for that | |||
02:27
maggotbrain left
02:28
maggotbrain joined
02:36
stoned75 left
02:38
a3f left
02:39
a3f joined
02:42
maggotbrain left
02:43
maggotbrain joined
02:47
maggotbrain777 joined,
maggotbrain left
02:48
stoned75 joined
|
|||
sjaveed | fwiw elcaro and [Coke], this gist works using EVAL gist.github.com/sjaveed/061c743b70...46bcc5c000 | 02:51 | |
i'd rather not use EVAL of course | 02:52 | ||
only the first and last examples in there work - the middle example continues to fail | |||
03:11
MasterDuke left
03:13
maggotbrain777 left
03:14
maggotbrain joined
|
|||
sjaveed | hmmm so it looks like github.com/tony-o/perl6-http-server-router is bypassing a regex check as well | 03:15 | |
there's a regex check in there which caught my eye but it looks like that's used when the route is defined in terms of a regex | 03:16 | ||
looks like github.com/moznion/p6-Router-Boost solves it using the EVAL approach | 03:21 | ||
03:22
maggotbrain left
|
|||
[Coke] | maybe when moritz gets back in the morning (EU) he can figure it out. | 03:23 | |
sjaveed | nice - yeah this is just weird - i'm glad i have a workaround but a proper solution or a definitive "that's not possible" would be good! | 03:27 | |
03:28
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
sjaveed | oh nice - moritz as in Moritz Lenz? | 03:28 | |
i might come back in EU daylight hours then - thanks! | 03:30 | ||
03:34
maggotbrain joined
|
|||
elcaro | 03:38 | ||
[Coke] | aye, that one. | 03:39 | |
elcaro | sjaveed: EVAL might be the only option. another example is jnthn's ECMA262Regex module, which converts a ECMA262 regex to a Raku regex using EVAL | 03:40 | |
jnthn has stated that this is something that RakuAST should be able to solve when it lands | |||
sjaveed | nice | 03:45 | |
ok this is all good info - looks like i have something to look forward to | 03:46 | ||
i'll take a look at the ECMA262Regex module though - that might be the cleanest approach to this without using EVAL myself | |||
03:50
maggotbrain777 joined
03:52
maggotbrain left
03:55
[Coke]_ joined,
[Coke]_ left,
[Coke]_ joined
03:57
Geth left,
Geth joined
03:58
[Coke] left,
sjn left,
mendel left,
mendel_ joined,
sjn joined,
zacts joined
04:22
aborazmeh left
04:24
stoned75 left,
stoned75 joined
04:25
BenGoldberg left
04:26
[Coke]_ left
04:35
[Coke] joined,
[Coke] left,
[Coke] joined
04:37
ensamvarg3 joined
04:39
abraxxa left
04:40
abraxxa joined
04:43
abraxxa left
04:45
maettu joined,
abraxxa joined
05:07
zacts left
05:09
zacts joined
05:20
molaf__ left
05:27
bocaneri joined
05:28
squashable6 left
05:31
squashable6 joined
05:32
maettu left
05:34
andrzejku joined,
hungrydonkey joined
05:35
tejr left
05:45
aborazmeh joined,
aborazmeh left,
aborazmeh joined
05:48
zacts left,
zacts joined
05:51
jmcgnh left
05:54
aluaces joined
05:58
jmcgnh_ joined
06:07
zacts left
06:09
andrzejku left
06:21
skids left
06:24
aluaces left
06:31
andrzejku joined
06:44
domidumont joined
06:47
aluaces joined
06:49
Sgeo left
06:53
Altai-man joined
06:59
earenndil joined
07:01
earenndil left,
moon-child joined,
rindolf joined
07:06
maettu joined
|
|||
Geth | ecosystem: 09cba83206 | Julio++ | META.list Add BigRoot to ecosystem See github.com/juliodcs/BigRoot |
07:06 | |
ecosystem: 2966a5f591 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list Merge pull request #541 from juliodcs/juliodcs-BigRoot Add BigRoot to ecosystem Thanks! |
|||
07:09
dyske joined,
dyske left
07:10
dyske joined
07:15
aborazmeh left
07:16
BenGoldberg joined
07:19
sena_kun joined
07:21
Altai-man left
07:27
tejr joined
07:32
aluaces left
07:34
dakkar joined
07:35
maettu left
07:38
dyske left,
tejr left
07:49
maggotbrain777 left
07:50
BenGoldberg left
07:52
maggotbrain joined
07:53
tejr joined
08:01
ensamvarg joined
08:03
sno left
08:05
sno joined
08:12
domidumont left
08:16
domidumont joined
08:25
pecastro joined
08:47
Black_Ribbon left
08:48
Doc_Holliwould left
09:03
ensamvarg3 left
09:18
tejr left
09:25
maettu joined
09:28
stoned75 left
09:29
stoned75 joined
09:36
aluaces joined
09:42
natrys joined
09:48
maettu left
09:56
markoong joined
10:07
Kaiepi left
|
|||
timotimo | m: my $rexstr = "$<first>=<[a..z]> $<rest>=<[a..z]>+"; "hello world" ~~ / \s <blorp=$rexstr> /; say $<blorp> | 10:07 | |
camelia | Use of Nil in string context in block <unit> at <tmp> line 1 Use of Nil in string context in block <unit> at <tmp> line 1 5===SORRY!5=== Unrecognized regex metacharacter = (must be quoted to match literally) at /home/camelia/EVAL_0… |
||
timotimo | m: my $rexstr = "$<first>=<[a..z]> $<rest>=<[a..z]>+"; "hello world" ~~ / \s $<blorp>=<$rexstr> /; say $<blorp> | 10:08 | |
camelia | Use of Nil in string context in block <unit> at <tmp> line 1 Use of Nil in string context in block <unit> at <tmp> line 1 5===SORRY!5=== Unrecognized regex metacharacter = (must be quoted to match literally) at /home/camelia/EVAL_0… |
||
timotimo | m: my $rexstr = '$<first>=<[a..z]> $<rest>=<[a..z]>+'; "hello world" ~~ / \s $<blorp>=<$rexstr> /; say $<blorp> | ||
camelia | 「world」 first => 「w」 rest => 「orld」 |
||
timotimo | sjaveed: i'm not sure if this will help; subcaptures of a regex-as-string interpolated bit can be received like this, by giving the result a name explicitly in the interpolating regex | 10:09 | |
10:09
Kaiepi joined
|
|||
Xliff | timotimo++ -- I was looking for that! | 10:10 | |
It uses EVAL under the hood, yes? | |||
timotimo | that's right | 10:11 | |
Xliff | Thanks. | 10:15 | |
10:30
aluaces left
10:41
BenGoldberg joined
10:56
Doc_Holliwould joined
11:15
BenGoldberg left
11:18
Kaiepi left,
Altai-man joined
11:21
sena_kun left
11:25
ensamvarg3 joined
11:26
Kaiepi joined
11:28
molaf__ joined
11:33
Noisytoot left
11:34
Noisytoot joined,
molaf__ left
11:37
cpan-raku left,
Kaiepi left
11:38
cpan-raku joined,
cpan-raku left,
cpan-raku joined
11:39
leont joined
11:49
hungrydonkey left
11:55
tejr joined
12:05
aluaces joined
|
|||
lizmat | .seen lizmat | 12:06 | |
tellable6 | lizmat, I saw lizmat 2020-09-09T11:53:15Z in #raku-dev: <lizmat> ugexe: I tried | ||
12:13
tejr left
12:14
tejr joined
|
|||
Roamer` | ...were you trying to get the bot to do a double-take?... I don't think it worked... | 12:23 | |
12:31
Archenoth joined
12:48
dogbert17 left
12:55
El_Che left
|
|||
Xliff | Is there any way to programmatically invoke need statements? | 13:01 | |
I would like to run them from a loop. | |||
13:01
El_Che joined
|
|||
rypervenche | sjaveed: Any reason why you're not just using a named regex though? | 13:01 | |
m: my regex blah { '/greeting/' (.+) }; my $path = '/greeting/bob/'; $path ~~ &blah; | 13:02 | ||
camelia | ( no output ) | ||
rypervenche | m: my regex blah { '/greeting/' (.+) }; my $path = '/greeting/bob/'; say $path ~~ &blah; | ||
camelia | 「/greeting/bob/」 0 => 「bob/」 |
||
Xliff | m: my $a = 'NativeCall'; need $a; | 13:10 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: need used at line 1 (in Raku please use "v" prefix and "use" for pragma (e.g., "use v6;", "use v6.c;") instead) |
||
Xliff | m: use v6; my $a = 'NativeCall'; need $a; | ||
camelia | Don't know setting RESTRICTED at gen/moar/ModuleLoader.nqp:249 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/Perl6/ModuleLoader.moarvm:previous_setting_name) from gen/moar/ModuleLoader.nqp:254 (/home/camelia/rakudo-m-inst-2/share/perl6/lib/… |
||
Xliff | HUnh? | ||
That definitely looks LTA | |||
13:31
andrzejku left
13:33
tejr left
13:41
mst joined
13:45
aluaces left
13:57
tejr joined
14:04
cusion joined
14:07
mowotter left,
BenGoldberg joined,
hungrydonkey joined
|
|||
timotimo | c: HEAD my $a = 'NativeCall'; need $a | 14:08 | |
committable6 | timotimo, ¦HEAD(e65466f): «04===SORRY!04=== Error while compiling /tmp/hNU22Qt_gAUndeclared routine: need used at line 1 (in Raku please use "v" prefix and "use" for pragma (e.g., "use v6;", "use v6.c;") instead) «exit code = 1»» | ||
timotimo | yeah, odd. | 14:09 | |
14:17
Sgeo joined
|
|||
sjaveed | Thanks for the additional comments timotimo, rypervenche | 14:19 | |
I'll take a look as soon as i get a moment to breathe here :-) | |||
but tl;dr on why i can't use a named regex rypervenche: i'm generating these regexes from other strings | 14:20 | ||
rypervenche | Ahh ok | 14:23 | |
guifa | Xliff: yes | 14:29 | |
need ::($a); if I remember correctly | |||
14:29
orinthe left
|
|||
guifa | At least, it works with require | 14:29 | |
14:30
orinthe joined
|
|||
guifa | Xliff: actually, need says it runs at compile time, so it probably won’t work. I’d recommend going with require and then using the fully qualified name as a workaround (that’s what I’m using for Intl::X) | 14:32 | |
Altreus | > Private multi-methods are not supported | 14:34 | |
er | |||
why :) | |||
I was sort of relying on it working tbh | 14:36 | ||
guifa | Altres: that’s a good question. Though there’s quite a few workarounds | ||
Altreus | I'm using the multi nature of it to halt recursion - I only made it private just now | 14:37 | |
doesn't have to be, but erm etc | |||
timotimo | private methods something something optimization? | 14:39 | |
one important thing about multis is that new candidates can be brought in in different contexts | |||
like, with an inner scope that defines a multi candidate, that is only in there | 14:40 | ||
Altreus | can I define a method like that? | ||
Altreus TIAS | |||
timotimo | but private methods are per exact class, so a little more like a sub | ||
actually, with a multi sub you may be better served here? | |||
Altreus | shit it worked | 14:42 | |
14:42
BenGoldberg left,
rbt joined
|
|||
Altreus | actually maybe it did, maybe it didn't | 14:42 | |
I got excited, hang on | |||
guifa | Altreus take a look at this | 14:43 | |
rbt | Hello. Can anyone explain the difference between Buf derived from WHAT and Buf in the hash lookup? | ||
my %H{Mu:U}; | |||
%H{Buf} = method (Buf $val) {'some buf'}; | |||
sub lookup(Mu $datum) { | |||
my \type = $datum.WHAT; | |||
dd $datum.WHAT, %H{$datum.WHAT}; | |||
dd type, %H{type}; | |||
dd Buf, %H{Buf}; | |||
} | |||
my Buf $b = Buf.new(^256); | |||
lookup($b); | |||
##### Output | |||
# Buf | |||
# Any element of %H = Any | |||
# Buf | |||
# Any element of %H = Any | |||
# Buf | |||
# Method %H = method <anon> (Mu: Buf $val, *%_) { #`(Method|93826602735792) ... } | |||
moritz | rbt: please don't past more than single line of code here; use a pastebin for that | 14:44 | |
guifa | m: class A { multi sub b(\self,Int $) {‘int’}; multi sub b(\self,Str $) {‘int’}; method a (|c) { self.&bar(|c) } }; say A.new.test(1); say A.new.test(‘a’) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: bar used at line 1. Did you mean 'bag', 'VAR'? |
||
guifa | erp | 14:45 | |
rbt | moritz: Okay. Will do in the future. | ||
guifa | m: class A { multi sub b(\self,Int $) {‘int’}; multi sub b(\self,Str $) {‘int’}; method a (|c) { self.&b(|c) } }; say A.new.test(1); say A.new.test(‘a’) | ||
camelia | No such method 'test' for invocant of type 'A'. Did you mean any of these: 'gist', 'List', 'list', 'Set'? in block <unit> at <tmp> line 1 |
||
guifa | okay I really need to stop renaming variables for golfing in irc | ||
Altreus | ok so it looks like the methods aren't constrained to the scope so they're still public even though I defined them elsewhere | ||
so it looked like it worked but it was just the original with weird shapes :D | 14:46 | ||
moritz | rbt: I don't have time to dive into it right now, but maybe it's related to Buf being a (parametric) role; if you try to instantiate it, a class will be automatically created for you | ||
Altreus | but yeah I can use my multi sub | ||
moritz | so Buf could refer to eitehr of these | ||
Altreus | or similar | ||
guifa | Altreus: | 14:47 | |
m: class A { multi sub b(\self,Int) {‘int’}; multi sub b(\self,Str) {‘str’}; method a (|c) { self.&b(|c) } }; say A.new.a(1); say A.new.a('a') | |||
camelia | int str |
||
Altreus | ah right | ||
guifa | will only add one character when you use (basically .&foo instead of !foo) | ||
Altreus | but if it's so easy why not just make private multis do that :) | ||
guifa | Could just be a NYI thing | ||
Altreus | yeah, pesky | 14:48 | |
get to it, unpaid labourers! | |||
also thank you | |||
guifa | Also… grrr at whoever made the TWEAK method for X::Method::NotFound | ||
It and three other classes in Exceptions.pm6 require special code for localization =/ | 14:49 | ||
Speaking of weird things methods too btw | 14:50 | ||
m: my &why-no-work-grrrrr = method { $:placeholder } | 14:51 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Placeholder variables (eg. $:placeholder) cannot be used in a method. Please specify an explicit signature, like method <anon> (:$placeholder) { ... } at <tmp>:1 ------> 3my &why-no-work-grrrrr =… |
||
Altreus | what the heck is a placeholder | ||
:O | |||
guifa | whaaaaa? you don’t know the joys of placeholders??!?!?!??!! | 14:52 | |
guifa is only surprised because of how deep of a dive you’ve taken in Raku :-) | |||
Placeholders occupy the happy place between a full block with signature and a whatever code | |||
Altreus | deep but not wide | ||
I was going to say aren't they things like $^a, $^b | |||
guifa | yes they are :-) | ||
Altreus | but this does not match that pattern! | 14:53 | |
guifa | $^positional, $:named | ||
Altreus | oh right hmm | ||
I've not come across a block that uses named placeholders since I've not come across a procedure that's going to pass them | |||
guifa | (acutally in all honesty I had completely skimed over $:named until only a few monhs ago ) | ||
Altreus | is it $: or :$ | 14:54 | |
oh | |||
you did $: before and it said please do :$ in a signature and I got confused | |||
helpfully that's recognisably the "embarrased" emoji from before we had proper ones | 14:55 | ||
timotimo | $:blah is one way to declare that your block takes a named argument called "blah" | ||
:$blah is the way to declare it in the signature | |||
Altreus | TIL about named placeholders, yay! | ||
14:56
Maylay left
|
|||
guifa | It is weird that methods won’t allow them though. You’d think that they would, since self would be implied first positional, and all the rest would follow along from that | 14:57 | |
moritz | if you can be bothered to writes classes/roles and methods, you can also be bothered to write signatures :D | 14:59 | |
14:59
Maylay joined
|
|||
guifa | moritz: if only you could see the nastiness I’m dealing with trying to create a semi passable localization system for Raku hahaha | 14:59 | |
actually | |||
moritz | it's mostly meant for really short subs, often anonymous ones; for long ones, signatures help immensly with readabilty | ||
guifa | moritz (and timotimo for that matter), y’all are native German speakers yeah? | 15:00 | |
moritz | ja | ||
guifa | iche habe eine Bitte O:-) | 15:01 | |
ich* | |||
moritz | shoot :D | ||
guifa | I wrote a script that parses out the .message for all the exceptions | 15:02 | |
I figured out a way to hack them in so that exceptions print out in non-English languages, even for compile time stuff | |||
so…. naturlich, wanna translate ‘em to German? I’m doing Spanish/Asturian/Euro Portuguese, and rypervenche is going to help do Chinese | 15:04 | ||
moritz | I can translate some; probably don't have enough time/motivation to do all | 15:05 | |
guifa | yay. (and don’t need all of them, that’s the joy of github and pull requests) | ||
moritz | so, where do I do that? | ||
timotimo | have you considered using the mechanism that also powers getting exceptions as json? | 15:06 | |
moritz | SCOPE CREEP! :D | 15:07 | |
guifa | timotimo I hadn’t seen that. Does it return a JSON object like {type: “foo”, message: “really long message here”} ? | 15:09 | |
Altreus | je peux essayer de faire le français si tu veux | ||
timotimo | env RAKU_EXCEPTIONS_HANDLER=JSON perl6 -e 'die "oh no"' | 15:10 | |
Altreus | «les traduire dans francais», I suppose | ||
timotimo | {"X::AdHoc":{"payload":"oh no","message":"oh no"}}??? | ||
it's not "a mechanism to get it as json" it's "a mechanism to get the exception and print it however you want" | 15:11 | ||
guifa | timotimo: did not know that that existed. But the messages are unfortunately generated in code, and sometimes through TWEAK methods (looking at you X::Method::NotFound) | ||
Altreus | RAKU_EXCEPTIONS_HANDLER=de_DE | 15:12 | |
Dede! | |||
guifa: as tu une^W^W^WDo you have a list of error strings somewhere? | 15:14 | ||
codesections | points for using 3 ^Ws instead of 9 ^Hs :D | 15:15 | |
guifa | timotimo: I’m looking to actually adjust the message string, but it’s programmatically set — fairly simply in most cases, but quite complex in others (so localizers need some basic knowledge of Raku esp if their language does dual/paucal/etc numbers) | ||
Altreus: I should be tonight. The only thing tripping me up from being done this morning was the no placeholders in methods. Debating my best workaround to keep my updater scripts simple | 15:16 | ||
codesections | guifa: If I could submit one minor patch for English, I think it'd be adding dual/paucal numbers | 15:17 | |
guifa | I think I’ll probs just do __PLACEHOLDER__ and do a subst, since it’s just two of them and they have to have some special handling anyways | ||
Altreus | what are these numbers | ||
codesections | (a few years ago, I would have said "a gender neutral pronoun" but 'they' seems to have caught on well enough these days) | ||
guifa | English has singular and plural (the latter is technically “non-plural” because one has “zero things”) | ||
Arabic, for instance, has singular, DUAL and plural, so that the number 2 gets handled specially | 15:18 | ||
Altreus | aha | ||
I did wonder about that weird feature of Western languages | |||
why is 1 so special | |||
guifa | paucal is a weird one, normally for “a few” (with languages determining that definition specially) | 15:19 | |
15:19
sena_kun joined
|
|||
guifa | It’s a localizer’s nightmare come true. Determining the correct number is … complex :-) | 15:20 | |
codesections | imo, it infects thinking by inclining people towards binary divisions (1 vs not-1) in a way that would be less pronounced with a trinary division | ||
but that's total speculation | |||
15:21
Altai-man left
15:24
MilkmanDan left
15:28
MilkmanDan joined
|
|||
Altreus | we just group everything so it can be 1 again :D | 15:29 | |
guifa | So there’s still one or two bugs in the generation of this file but … | 15:31 | |
gist.github.com/alabamenhu/b2109f1...0125d0e3ab | |||
But it gives a decent enough overview of how an Intl::X::en file might look | 15:32 | ||
15:33
grumble joined
|
|||
guifa | Some of them have a “Note: “ (see X::Adhoc, line 133) which I’m creating bit by bit as I do my own localization | 15:34 | |
Altreus | 'SORRY!' | 15:35 | |
:D | 15:36 | ||
guifa | I gave serious thought to just leaving that one as is haha | ||
and then adding in a Canadian flag next to it ;-) | |||
Altreus | DÉSOLÉ! qqc a fait tort | ||
not enough exclamation marks | 15:37 | ||
The EVAL one has three, a sure sign of a diseased mind | |||
guifa | Oh but the Spanish and Asturian get six! | 15:38 | |
¡¡¡SIÉNTOLO!!! | |||
Altreus | oy! | ||
guifa | errr | ||
¡¡¡EVAL ye una función perpeligrosa!!! | |||
Altreus | I'm sort of surprised they still use those upside-downey ones | ||
do they even have special names? | 15:39 | ||
guifa | You have to have them.. “It’s easy” and “Is it easy” use the same words, in the same order, but different intonation | ||
Altreus | I'm mildly upset that they render differently | ||
Well that's true of French too, but the one at the end is enough | |||
C'est facile. C'est facile? | 15:40 | ||
guifa | For a long question, it might not be obvious that something is a question until you get to the end | ||
so it’s kinda nice | |||
Altreus | Well that's OK, the Germans put all their useful words at the end and cope perfectly well | ||
It's a language of suspense | |||
guifa | But they just call them opening and closing marks, same model they use for ( ) or « » | ||
Altreus | oya | ||
is fun | 15:41 | ||
I was just chatting on twitch today about the way we English use the exact same words for like 5 different meanings depending on how you say it | |||
But we completely refuse to use any sort of punctuation or accents to explain which one it is | |||
guifa | yeah | 15:42 | |
guifa . o O ( indeed | for real? | go English! | meh ) | |||
Altreus | we need punctuation that means this wasn't enough of a sentence to deserve a full stop | 15:46 | |
. | |||
sjaveed | how about elipses... | ||
Altreus | that's three! | 15:47 | |
How did we get to the point where repeating punctuation makes it less effective? :| | |||
[Coke] | … | 15:48 | |
Altreus | ‽ | ||
[Coke] | m: say 2÷6 | ||
camelia | 0.333333 | ||
15:50
skids joined
15:56
Kaiepi joined
16:04
Kaiepi left
16:09
andrzejku joined
|
|||
guifa` | oh, I also totally forgot | 16:14 | |
Altreus: lizmat had made a proposal a while back to make ¿? and ¡! valid syntax in Raku. IIRC she was thinking of them as quotation marks, but if they could be used as a substitue for ?( ... ) and !( ... ) that would be kinda cool :-) | 16:15 | ||
16:20
stoned75 left
16:22
stoned75 joined
|
|||
Altreus | ah and I can type them easily so bonus | 16:29 | |
does `my sub` close over `self` (not $self)? | 16:30 | ||
16:30
billN1VUX joined
|
|||
[Coke] | does my sub even have a self? | 16:30 | |
Altreus | as in method foo() { my sub bar { ... } } | 16:31 | |
I've used self.&bar for now | |||
plus the relevant signature | 16:32 | ||
16:34
xelxebar left
16:35
aluaces joined
16:36
xelxebar joined
|
|||
guifa` | subs explicitly reject the use of self | 16:38 | |
although maybe in a method block's lexical scope? | 16:39 | ||
m: class A { method B { self #`(works okay here); my &c = sub { self #`(here though?) } } } | 16:40 | ||
camelia | WARNINGS for <tmp>: Useless use of self symbol in sink context (line 1) |
||
guifa` | m: class A { method B { self.say #`(works okay here); my &c = sub { self.say #`(here though?) } } } | ||
camelia | ( no output ) | ||
guifa` | seems to allow it, if you've got it in method's scope | 16:41 | |
16:44
jmcgnh_ left
|
|||
Altreus | I finally got to the position where I can TIAS :) | 16:45 | |
now I can TIAS | |||
16:46
dakkar left
|
|||
Altreus | what function does try have over just using a block? | 16:52 | |
[Coke] | legibility? | 16:55 | |
it also turns on "use fatal" | 16:56 | ||
docs.raku.org/language/exceptions#...try_blocks | |||
Altreus | ah, implicit catch! of course | 16:57 | |
Is there a way to tell installations that a file has been deleted? That was a common issue with cpan | 16:58 | ||
And I've just done it again :D | |||
16:59
aluaces left
17:00
molaf joined
17:03
MasterDuke joined
17:10
rbt left
17:11
rbt joined
|
|||
[Coke] | Please consider casting a ballot for the RSC if you're eligible and haven't voted yet | 17:19 | |
17:23
markoong left
17:26
aluaces joined
17:32
zacts joined
17:33
BenGoldberg joined
17:37
Maylay left
17:42
jmcgnh joined
17:56
Maylay joined
18:01
vgrato_ left
18:07
BenGoldberg left
18:16
stoned75 left
18:17
stoned75 joined
18:22
Black_Ribbon joined
18:27
bocaneri left
18:30
Kaiepi joined
18:39
cgfbee left,
cgfbee joined
|
|||
El_Che | until when can one vote? | 18:47 | |
[Coke] | 20th | 18:53 | |
but please don't wait until the end to vote, as I have to click buttons to process each vote. | 18:54 | ||
(and would rather not get 100 votes at the end of the run) | |||
Juerd | [Coke]: Do people who vote get a confirmation that it was received? | ||
rypervenche | guifa`: Does the ?? in your script allow for variants? | 18:55 | |
18:57
zacts left,
zacts joined,
zacts left
|
|||
lizmat | Juerd: they don't, afaik, but you can ask [Coke] here whether they received it | 18:59 | |
Juerd | lizmat: It's fine, if the assumption is that email works then I'll assume the same :) | 19:01 | |
El_Che | and to think that voting by mail is somewhat controversial in some countries :) | ||
19:01
xelxebar left
|
|||
lizmat | well, we'll see whatever the RSC will come up with for the next election | 19:02 | |
19:02
xelxebar joined
19:03
wamba joined
|
|||
[Coke] | Juerd: I'm not replying to the emails, no. | 19:03 | |
Juerd | [Coke]: ok, thanks :) | 19:04 | |
[Coke] | I will post a list of email addressess that voted as part of the results. | ||
(but not who they voted for) | |||
Juerd | Please obfuscate those a little because of address harvesting bots | ||
[Coke] | Sure, but in general that ship has sailed. | 19:06 | |
Juerd: patches welcome to github.com/Raku/Raku-Steering-Coun...tally.raku | 19:07 | ||
Juerd | In case of my own address, certainly, and it might be true for most. But you don't want to be responsible for someone's first, I think :) | ||
[Coke] | or just tell me what you want done: how would you want "Will Coleda [email@hidden.address] (@coke)" to appear? | ||
mine's been out the mid 90s. :) | 19:08 | ||
*since | |||
just s/@/ -at-/ ? | 19:09 | ||
Juerd | Simple substitution of the '@' for something uncommon goes a long way, such as s/'@'/ nospam~at / | ||
guifa` | rypervenche: that's actually one fo the advantages of messages being methods | 19:10 | |
Juerd | Just the word 'at', with or without punctuation, will work for many but not most bots, while anything else will fool most (but still not all of course) | ||
El_Che | $whatbeforemail+domain@owndomain.com | ||
guifa` | rypervenche: oh, actually, you mean in terms of language codes. Yes, absolutely. Although it's not smart about it yet | ||
Juerd | [Coke]: Thanks :) | 19:11 | |
guifa` | My Portuguese translation wil be Intl::X::pt-PT for instances, so that SmokeMachine can do Intl::X::pt-BR ;-) | ||
Geth | Raku-Steering-Council/main: 7e6800a260 | Coke++ | scripts/tally.raku Add simplistic ranking output |
19:12 | |
Raku-Steering-Council/main: 0049ee5653 | Coke++ | scripts/tally.raku Obfuscated reported email address Juerd++ |
|||
[Coke] | Done. | 19:13 | |
SmokeMachine | guifa`: I'm in! How should I start?! :) | ||
[Coke] | btw, I am not doing a great job with mime encoding of non-ascii. "Christian =?utf-8?Q?Bartolom=C3=A4us?=" | 19:14 | |
Juerd | That's rfc2047 but I haven't done anything with in it Raku | 19:16 | |
It's in Perl's Encode.pm as MIME-Header | 19:17 | ||
guifa` | SmokeMachine: I should have the finalized template sometime tonight. Still have a small bug in one of my scripts to fix before it's usable | 19:18 | |
19:18
Altai-man joined
19:20
xinming left,
xinming joined
19:21
sena_kun left
19:25
Altai-man left
|
|||
bartolin | [Coke]: oops. sorry for causing trouble there | 19:28 | |
[Coke] | bartolin: :) | 19:32 | |
bartolin has (marginally) messed up the commit history in nfs-utils recently as well: git.linux-nfs.org/?p=steved/nfs-uti...09;hb=HEAD But then someone else managed to get an Umlaut in there ... | 19:37 | ||
maybe I should stop doing that ;) | 19:38 | ||
[Coke] wonders where he should report bartolin's email address as a bug. Email::MIME? | 19:42 | ||
19:45
Archenoth left
19:47
Archenoth joined
|
|||
lizmat remembers the day a new guy named Ævar started working at $work, and broke quite a few of the internal systems :-) | 19:55 | ||
19:56
andrzejku left,
Black_Ribbon left
|
|||
guifa` | Ævar was the first name or was he one of those mononymic types? | 19:56 | |
(or both, and if so, which broke the system?) | 19:57 | ||
19:58
Black_Ribbon joined,
andrzejku joined,
zacts joined
|
|||
lizmat | the fact that there was no extended ASCII representation for Æ (if I remember correctly :-) | 19:59 | |
codesections | Ah, good old #9 on the list: www.kalzumeus.com/2010/06/17/false...out-names/ | 20:00 | |
lizmat | yup | 20:01 | |
20:11
defaultxr left
20:12
defaultxr joined
20:19
Possum joined,
approaching236 joined
20:23
wamba left
|
|||
[Coke] | codesections: I would hope that #11 at least is getting closer to true. | 20:29 | |
20:30
approaching236 left
20:32
rindolf left,
domidumont left,
Black_Ribbon left
20:33
domidumont joined,
domidumont left
|
|||
guifa | [Coke]: the only real hold back now is no clear consensus on how to handle ideographic description sequences and any of the (now very few) writing systems not encoded | 20:37 | |
20:43
andrzejku left
20:47
AlexDani` left
20:51
approaching236 joined
20:53
Black_Ribbon joined
20:58
MasterDuke left
20:59
BenGoldberg joined
|
|||
codesections | I recently released 2 distributions, A and B. A relies on B and names B in its META6.json file. I discovered a bug in B that prevents A from working, and fixed the bug, but A is still not working, and I'm trying to figure out if A is using the new version of B or the old one. | 21:07 | |
I've installed the new version of B with `zef install . --force-install`. Is that all I need to do to get A to use the new B? | |||
21:08
approaching236 left
|
|||
codesections | (for those of you who are curious, A here is Pod::Weave and B is Pod::Literate, but that's not really relevant) | 21:08 | |
I have not incremented B's version in its META6 file. Do I need to do so in order to get A to use the new B? | 21:09 | ||
21:13
MasterDuke joined
21:17
markoong joined
|
|||
timotimo | zef will usually not fetch a "new version" unless the version number also changes | 21:17 | |
since it's "already installed" | |||
codesections | yeah, but I thought the --force-install overrides that | 21:18 | |
rypervenche | Did you also --force-install A? | 21:22 | |
codesections | yeah | 21:23 | |
hmm, yeah, no combination of --force-install'ing A and B worked. But bumping B's version did. Odd | 21:24 | ||
21:26
mst left
21:27
approaching236 joined
|
|||
Geth | doc/gc-dup: b8e1ad7a3e | (Stoned Elipot)++ | doc/Type/MixHash.pod6 Remove duplicated section |
21:29 | |
doc: stoned++ created pull request #3626: Remove duplicated section |
21:30 | ||
21:32
approaching236 left
21:37
zacts left,
zacts joined
|
|||
guifa | rypervenche: I think I finally worked out all of the kinks | 21:38 | |
weekly: github.com/alabamenhu/IntlX | 21:39 | ||
notable6 | guifa, Noted! (weekly) | ||
21:39
approaching236 joined
|
|||
guifa | ^^ rypervenche take a look there under resources/template.rakumod | 21:39 | |
rypervenche | guifa: Nice! I'll check it out. (also typo in README "dobule") | 21:43 | |
guifa | (also don’t look at my ugly processing code lol. But of course someone will come along now and tell me how I can get a Match result for parsing an entire raku file and my life would have been much easier :P | 21:45 | |
21:46
agentzh left
|
|||
rypervenche | My eyes are closed ~_^ | 21:53 | |
22:01
[Coke] left
22:04
[Coke] joined,
[Coke] left,
[Coke] joined
22:10
rbt left
22:11
rbt joined
22:12
BenGoldberg left
22:13
hungrydonkey left
22:14
approaching236 left
22:23
zacts left
22:24
approaching236 joined
22:35
Maylay left
22:39
skids left
22:41
wamba joined,
Maylay joined
22:44
BenGoldberg joined
22:47
natrys left
22:50
approaching236 left
|
|||
Xliff | guifa: Thanks. Unfortunately run-time is way too late for my purposes. | 22:52 | |
22:53
xinming left
|
|||
Xliff | m: sub weird-test ($scalar is rw) { say $scalar.VAR.nbame }; my $apapapa = 'WTF'; weird-test($apapapa) | 22:53 | |
camelia | No such method 'nbame' for invocant of type 'Str' in sub weird-test at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | m: sub weird-test ($scalar is rw) { say $scalar.VAR.name }; my $apapapa = 'WTF'; weird-test($apapapa) | 22:54 | |
camelia | $apapapa | ||
Xliff | m: sub weird-test (\scalar is rw) { say scalar.VAR.name }; my $apapapa = 'WTF'; weird-test($apapapa) | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Can only use 'is rw' on a scalar ('$' sigil) parameter, not 'scalar' at <tmp>:1 |
||
Xliff | m: sub weird-test (\scalar) { say scalar.VAR.name }; my $apapapa = 'WTF'; weird-test($apapapa) | ||
camelia | $apapapa | ||
23:00
Sgeo_ joined
23:02
Sgeo left
|
|||
Xliff | sub (*%o) { %o.gist.say }; my $a = 'key'; o( $a => 'a' ); | 23:08 | |
m: sub (*%o) { %o.gist.say }; my $a = 'key'; o( $a => 'a' ); | 23:09 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: o used at line 1 |
||
Xliff | m: sub o (*%o) { %o.gist.say }; my $a = 'key'; o( $a => 'a' ); | ||
camelia | Too many positionals passed; expected 0 arguments but got 1 in sub o at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
Xliff | m: sub o (*%o) { %o.gist.say }; my $a = 'key'; ($a => 'a').gist.say | ||
camelia | key => a | ||
Xliff | m: sub o (*%o) { %o.gist.say }; my $a = 'key'; o( |Pair.new($a, 'a') ); | 23:10 | |
camelia | {key => a} | ||
23:17
pecastro left
23:23
approaching236 joined
23:39
hungrydonkey joined
23:41
ensamvarg3 left
23:42
markoong left
23:43
colomon__ left
23:45
colomon joined
23:46
colomon left
23:55
guifa` left
23:57
mst joined
|