»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
00:00
Manifest0 left
00:04
Manifest0 joined
|
|||
dominix | m: say "☺".NFKD.Str | 00:05 | |
yoleaux | 11 Jul 2019 07:28Z <robertle> dominix: Dominique Dumont or I (robertle@semistable.com) would be good fols to talk to regarding debian packaging, there is some stuff to be found starting wiki.debian.org/Teams/DebianRakudoGroup and salsa.debian.org/perl6-team | ||
camelia | ☺ | ||
00:14
pecastro left
|
|||
uzl | Another somewhat related I forgot to ask: How to convert a Unicode string to ASCII? In the docs, there's an example using the .encode method but one must provide a replacement in order to get something meaningful. | 00:15 | |
m: say "Þor is mighty".encode("ascii", :replacement( 'Th') ).decode("ascii") | |||
camelia | Thor is mighty | ||
uzl | But what if have a string like "Nín hǎo." and wish to get its ASCII version "Nin hao."? | 00:16 | |
AlexDaniel | m: say ‘Nín hǎo’.samemark(‘a’) | 00:20 | |
camelia | Nin hao | ||
AlexDaniel | m: say ‘Nín hǎo’.samemark(‘ä’) | 00:21 | |
camelia | N̈ïn̈ ̈ḧäö | ||
00:24
patrickz left
00:25
eseyman left
|
|||
uzl | Got it. Thanks! 🖒 | 00:26 | |
00:31
Manifest0 left
00:34
dustinm`_ left
00:37
Manifest0 joined
00:38
dustinm` joined
00:39
Sgeo_ joined
00:42
Sgeo__ left
00:58
Manifest0 left,
Kaiepi left
01:00
go|dfish left
01:01
Kaiepi joined
01:03
Manifest0 joined
01:06
wildtrees left
01:10
noisegul_ joined
01:11
Manifest0 left
01:12
noisegul_ left
01:13
noisegul left
01:15
go|dfish joined
01:16
Manifest0 joined
01:21
Manifest0 left,
go|dfish left
01:26
Manifest0 joined
01:35
go|dfish joined
01:43
Manifest0 left
01:46
Xliff left
01:49
Manifest0 joined
01:50
Kaiepi left,
Kaiepi joined
02:01
Manifest0 left
02:07
Manifest0 joined
02:11
Manifest0 left
02:16
Manifest0 joined
02:29
Manifest0 left
02:34
Manifest0 joined
02:37
Cabanossi left
02:39
Manifest0 left
02:44
Manifest0 joined
02:47
uzl left
02:49
Cabanossi joined
02:55
Manifest0 left
03:01
Manifest0 joined
03:09
Manifest0 left
03:16
Manifest0 joined
03:20
Manifest0 left
03:26
Manifest0 joined
03:33
Manifest0 left
03:39
Manifest0 joined
03:47
Manifest0 left
|
|||
Kaiepi | www.codewars.com/kata/baby-shark-l...generator/ | 03:51 | |
this is fun to golf | |||
the solution i came up with was `sub baby-shark-lyrics(--> Nil) { say join "\n", ((|(('Baby', 'Mommy', 'Daddy', 'Grandma', 'Grandpa') »~» ' shark'), "Let's go hunt") XZ[~] (|((',' ~ ' doo' x 6) xx 3), '!')), 'Run away...'; }` | 03:52 | ||
03:53
Manifest0 joined
|
|||
Kaiepi | er | 03:53 | |
sub baby-shark-lyrics(--> Str) { join "\n", ((|(('Baby', 'Mommy', 'Daddy', 'Grandma', 'Grandpa') »~» ' shark'), "Let's go hunt") XZ[~] (|((',' ~ ' doo' x 6) xx 3), '!')), 'Run away...' } | |||
too bad the site doesn't support perl 6 as a language you can write solutions in | 03:54 | ||
04:04
Sgeo__ joined
04:05
dominix_ joined
04:08
Sgeo_ left,
dominix left
04:09
Manifest0 left
04:14
mowcat joined,
Manifest0 joined
04:19
Manifest0 left
04:27
Manifest0 joined
|
|||
xinming | releasable6: status | 04:28 | |
releasable6 | xinming, No! It wasn't me! It was the one-armed man! Backtrace: gist.github.com/da21daa1b691cb708a...e562caacae | 04:29 | |
04:33
Manifest0 left
04:40
MilkmanDan left
04:42
MilkmanDan joined
04:43
Manifest0 joined
04:46
mowcat left
04:51
Manifest0 left
04:56
Manifest0 joined
05:01
Manifest0 left
05:06
Manifest0 joined
05:10
Manifest0 left
05:17
Manifest0 joined
05:22
Manifest0 left
05:27
Manifest0 joined
05:28
giraffe left
05:31
Sgeo_ joined
05:33
Manifest0 left
05:35
Sgeo__ left
05:37
sauvin joined
05:39
Manifest0 joined
05:48
Manifest0 left
05:50
protium joined
05:53
Manifest0 joined
06:09
Manifest0 left
06:16
Manifest0 joined
06:26
Manifest0 left
06:30
Manifest0 joined
06:43
Manifest0 left
06:48
Manifest0 joined
06:58
Manifest0 left
07:02
spacedbat joined
07:03
Manifest0 joined
07:25
eseyman joined,
Manifest0 left
07:30
Manifest0 joined
07:44
Manifest0 left
07:49
Manifest0 joined
|
|||
lizmat | weekly: news.perlfoundation.org/2019/07/gra...omp-5.html | 07:50 | |
notable6 | lizmat, Noted! | ||
07:56
Manifest0 left
08:01
Manifest0 joined
08:05
Manifest0 left
08:10
Manifest0 joined
08:17
Manifest0 left
08:20
sena_kun joined
08:22
Manifest0 joined
08:23
Black_Ribbon left
08:35
antoniogamiz joined
|
|||
antoniogamiz | morning o/ | 08:35 | |
sena_kun | o/ | 08:37 | |
08:50
Manifest0 left
08:55
Manifest0 joined
|
|||
Kaiepi | \o | 08:59 | |
09:00
Manifest0 left
09:04
patrickb joined
|
|||
Kaiepi | releasable6, status | 09:04 | |
releasable6 | Kaiepi, No! It wasn't me! It was the one-armed man! Backtrace: gist.github.com/1e3ac3f7d39945d02f...ad26c09e43 | ||
09:04
Manifest0 joined
09:09
Manifest0 left
|
|||
timotimo | ha | 09:13 | |
confused by the location of the VERSION file | 09:14 | ||
09:14
Manifest0 joined
|
|||
sena_kun | does rakudobrew not provide a symlink to currently set Perl 6 binary? I can't find it. | 09:18 | |
never mind, fixed it with `rakudobrew switch moar-blead` | 09:21 | ||
patrickb | sena_kun, `rakudobrew shell moar-myversion` does it only in the current shell | ||
yoleaux | 12 Jul 2019 17:18Z <AlexDaniel> patrickb: btw there's this document too: github.com/rakudo/rakudo/blob/mast...windows.md | ||
antoniogamiz | why with this signature => gist.github.com/antoniogamiz/88e23...236fab0c16 | 09:23 | |
it gives me this usage message? => documentable [--topdir=<Str>] [-v|--verbose] [-c|--cache] [-p|--pods] [-k|--kind] [-s|--search-index] [-i|--indexes] [-t|--type-images] [-f|--force] [--highlight] [-a|--all] start | |||
start should appear at the beginning | |||
timotimo | that's a thing perl6 does | 09:25 | |
antoniogamiz | but how do I fix it? | 09:26 | |
because the command => documentable start -v, for instance, gives me that message | |||
and it should work with that signature | 09:27 | ||
timotimo | there's the "allow named arguments everywhere" switch for the MAIN sub handler | 09:28 | |
antoniogamiz | ? | 09:31 | |
sorry I dont get it D: | |||
09:32
rindolf joined
|
|||
timotimo | you want my %*SUB-MAIN-OPTS = :named-anywhere; | 09:34 | |
antoniogamiz | so the first one should be a named argument too? | 09:38 | |
aahh I should declare that variable => docs.perl6.org/language/create-cli...-MAIN-OPTS | 09:40 | ||
mm though in zef it's not used mmmm | 09:41 | ||
lizmat | zef predates that feature | 09:43 | |
I guess it could use a PR to have it use that :-) | |||
antoniogamiz | :DD | 09:45 | |
09:47
claes-ma1nus joined
|
|||
antoniogamiz | mm I have added that variable and it's the same | 09:47 | |
should I initialize it in a specific way? | |||
claes-ma1nus | (ignore this. just testing if I'm muted.) | 09:52 | |
09:52
nepugia joined
|
|||
lizmat | claes-ma1nus: say what ? :-) | 09:54 | |
claes-ma1nus | I am new to irssi. :) | ||
nepugia | :o | 09:56 | |
antoniogamiz | claes-ma1nus: welcomed :D | ||
mmm maybe I do not know how to use %*SUB-MAIN-OPTS but this should work and it does not | |||
I have found this slides and they are quite good => es.slideshare.net/SimonProctor8/pe...-multicall | 09:58 | ||
10:00
claes-ma1nus left
|
|||
timotimo | where did you put the line with that variable? | 10:00 | |
10:01
claes-magnus joined
|
|||
antoniogamiz | at the beginning => gist.github.com/antoniogamiz/e6510...d8d3ae9b44 | 10:02 | |
timotimo | it'd have to be exported, too | 10:04 | |
at least i think that ought to help | |||
10:06
antoniogamiz left
10:08
claes-magnus left
10:10
claes-magnus joined
10:13
antoniogamiz joined
10:14
jeromelanteri joined
|
|||
antoniogamiz | timotimo: something like this? | 10:16 | |
sub EXPORT { "%*SUB-MAIN-OPTS" => :named-everywhere; } | |||
lizmat | sadly, I don't think you can export dynamic variables just yet ? | 10:17 | |
antoniogamiz | mmm | 10:18 | |
then how I should resolve it? D: | |||
lizmat | hmmm... | 10:21 | |
10:22
Manifest0 left
|
|||
lizmat | perhaps this could work: | 10:23 | |
BEGIN my &old-RUN-MAIN := &RUN_MAIN; | |||
sub RUN-MAIN(|c) is export { my %*SUB-MAIN-OPTS = :named-everywhere; old-run-MAIN(|c) } | 10:24 | ||
antoniogamiz: ^^ | |||
timotimo | it's not enough to have "my %*SUB-MAIN-OPTS is export = :named-everywhere"? :( | 10:25 | |
ah | |||
liz said that | |||
antoniogamiz | mmm it looks like it is not | 10:26 | |
mmm RUN_MAIN is not declared? | |||
though I do not know why I must do all these hacks if I only want to have a couple of options when executing my module :( | 10:27 | ||
10:28
Manifest0 joined
|
|||
antoniogamiz | timotimo: is export cannot be applied to scoped variables | 10:29 | |
lizmat | This appears to work: | 10:31 | |
sub RUN-MAIN(|c) is export { | |||
my %*SUB-MAIN-OPTS = :named-everywhere; | |||
CORE::<&RUN-MAIN>(|c) | |||
} | |||
antoniogamiz | mm I have added that and it's the same :/ | 10:34 | |
lizmat | works for me: | 10:35 | |
$ perl6 -Ilib -MA -e 'sub MAIN() { dd %*SUB-MAIN-OPTS }' | |||
Hash %*SUB-MAIN-OPTS = {:named-everywhere} | |||
where lib/A.pm6 is the file containing the 4 lines above | |||
10:36
Manifest0 left
|
|||
lizmat | hmmm.. it seems to get the dynamic var... but maybe too late :-( | 10:37 | |
sena_kun | anyone here who knows/writes Go? | 10:40 | |
antoniogamiz | lizmat: maybe I have not written it correctly but it does not work for my => gist.github.com/antoniogamiz/74c60...495ba8e64a | 10:41 | |
sena_kun | out of curiosity(and procrastination of my ldap work, of course): is gist.github.com/Altai-man/971f31ef...0096fc7580 a correct translation or did I miss something? | 10:42 | |
antoniogamiz | I have asked in stackoverflow too => stackoverflow.com/questions/570182...signatures | ||
10:43
Manifest0 joined,
wamiks joined
|
|||
antoniogamiz | sena_kun: one liner's power | 10:43 | |
lizmat | antoniogamiz: working on an answer :-) | 10:44 | |
antoniogamiz | lizmat: I'm very grateful :,) | 10:48 | |
lizmat | yeah, was a typo... | ||
antoniogamiz | a typo? | 10:49 | |
lizmat | :named-anywhere vs :named-everywhere | 10:50 | |
antoniogamiz | mmm I have used both and "start" continues appearing at the end | 10:52 | |
lizmat | antoniogamiz: answer posted on SO | ||
antoniogamiz | lizmat: oh that works, thanks a lot lizmat! :DDDDD | 10:53 | |
I am a bit curious why this changed, the way is done by zef is quite good | 10:54 | ||
lizmat | what's different is that you want to export an interface, zef doesn't have to do that | 10:55 | |
antoniogamiz | mmm I only wanted to do the same as zef, create some options for my module | 10:56 | |
10:56
molaf joined
|
|||
lizmat | well, you can still do that... but if you want named parameters to be allowed after positional ones | 10:56 | |
you need :named-anywhere | |||
otherwise it defaults to some standard (forget which one), that only allows named parameters *before* positional ones | 10:57 | ||
personally, I feel :named-anywhere makes more sense in the modern world | |||
and perhaps we can make it the default for 6.e :-) | |||
antoniogamiz | ah good then, I will leave that code :D | ||
I would really like so, because use RUN-MAIN is a difficult hack I think haha | 10:58 | ||
lizmat | well, one could turn it into a module, I guess... | 10:59 | |
so you would just need to do a "use named-anywhere" | |||
hmmm... | |||
scratch that | |||
:-( | |||
that's one other thing that's still unimplemented / undecided how to handle | 11:00 | ||
exporting something that gets exported | |||
antoniogamiz | well, step by step :D | 11:01 | |
11:04
Kaiepi left,
Kaiepi joined
11:05
Manifest0 left
11:09
abraxxa joined
11:10
Manifest0 joined
11:13
abraxxa left
11:15
Manifest0 left
11:20
Manifest0 joined
11:23
aborazmeh joined,
aborazmeh left,
aborazmeh joined
11:28
Manifest0 left
11:29
abraxxa joined
11:34
Manifest0 joined
11:39
aindilis left
11:45
Manifest0 left
11:47
antoniogamiz left
11:50
Manifest0 joined
11:51
aindilis joined
11:57
aborazmeh left
12:05
patrickb left
12:13
Manifest0 left
12:17
Manifest0 joined
12:20
abraxxa left
12:30
Manifest0 left
12:33
bartolin joined
12:35
Manifest0 joined
12:37
xinming_ joined
12:41
xinming left
12:45
abraxxa joined
12:54
rfold joined,
abraxxa left
12:56
abraxxa joined
13:04
Manifest0 left
13:09
Manifest0 joined
13:15
Manifest0 left
13:20
Manifest0 joined
13:21
lucasb joined
13:22
molaf left
13:30
antoniogamiz joined
13:35
Manifest0 left
13:42
Manifest0 joined,
pamplemousse joined
13:47
ale4L3 joined
13:49
releasable6 left
13:50
ale4L3 left
13:51
releasable6 joined
|
|||
AlexDaniel | releasable6: status | 13:51 | |
releasable6 | AlexDaniel, Next release will happen when it's ready. R6 is down. At least 0 blockers. 666 out of 687 commits logged | ||
AlexDaniel, Details: gist.github.com/7894b7d1214447f76f...30e3070d40 | 13:52 | ||
13:52
ale4L3 joined
|
|||
antoniogamiz | almost there :D | 13:52 | |
El_Che | weekly: twitter.com/jjatria/status/1150037326506143744 | 13:54 | |
notable6 | El_Che, Noted! | ||
El_Che | (I think he means MOARMV by MOAR? | ||
rfold | Has anyone tried integrating Zef/META.list with Nix? | 13:56 | |
If Zef can be given a mapping from module names to tarball file paths this should be straightforward. | 13:57 | ||
MasterDuke | hasn't timotimo done some game stuff? | 13:58 | |
tadzik | he has indeed | 14:00 | |
El_Che | timotimo: twitter.com/jjatria/status/1150037326506143744 | 14:01 | |
It's an other JJ, but he's also a nice guy :) | 14:02 | ||
14:02
pamplemousse left
14:03
SCHAPiE left
14:05
ale4L3 left
14:09
SCHAPiE joined
14:11
mowcat joined
14:17
Manifest0 left
14:22
wamiks left
14:23
Manifest0 joined
|
|||
lizmat | weekly: github.com/ohmycloud/perl6doc-zh # amazing | 14:23 | |
notable6 | lizmat, Noted! | ||
14:26
pamplemousse joined
14:28
Manifest0 left
|
|||
timotimo | haven't done anything in far too long, and the tiny bit i recently made is barely show-off-able even as a demo/POC/example/whatever | 14:30 | |
lizmat | weekly: perl6.eu/pythagoras-bitcoin.html | 14:31 | |
notable6 | lizmat, Noted! | ||
14:32
MilkmanDan left,
Manifest0 joined
14:33
MilkmanDan joined
|
|||
El_Che | lizmat: he should have used chinese variable names :) (jk) | 14:35 | |
14:41
Manifest0 left
14:42
ChoHag left
|
|||
rfold | p6: 'foo:bar:baz:qux'.split(':', limit => 2).perl.say | 14:45 | |
camelia | ("foo", "bar", "baz", "qux").Seq | ||
rfold | Why does this not return ("foo", "bar:baz:qux").Seq? | ||
p6: 'foo:bar:baz:qux'.split(':', 2).perl.say | |||
camelia | ("foo", "bar:baz:qux").Seq | ||
14:46
Manifest0 joined
|
|||
rfold | So it doesn't croak on stray named arguments. | 14:49 | |
Geth | doc: 1b4ecc2d91 | Antonio++ (committed using GitHub Web editor) | doc/Type/List.pod6 adds Defined as section, close #2900 |
||
synopsebot | Link: doc.perl6.org/type/List | ||
antoniogamiz | Well, after a lot of bug fixes, it actually installs => github.com/antoniogamiz/Perl6-Documentable | 14:54 | |
now you can generate the documentation from a easy to use command :D | 14:55 | ||
s/a/an | |||
timotimo | twitter.com/nxadm/status/1150043431743447043 - i added a video of the gtk-cairo-shooter | 15:02 | |
it's flashy and pretty | |||
antoniogamiz | timotimo: it's cute | 15:03 | |
15:04
antoniogamiz left
|
|||
timotimo | the game-over screen was bugged, it's supposed to show the enemies you had destroyed, but it doesn't reset the animation, so you just see the last piece of the explosion | 15:05 | |
15:21
uzl joined,
dmaestro joined
|
|||
uzl | Hi, everyone... So I came across some Python module (link in the documentation) | 15:22 | |
to slugify strings and decided to port(?) it to P6. I got almost all | |||
the tests passing except these two: | |||
gitlab.com/uzluisf/raku-text-slugi....t6#L39-44 and | |||
gitlab.com/uzluisf/raku-text-slugi....t6#L62-67 | |||
I'm wondering if somebody can lend me a hand ;-)! | |||
Not necessarily right now though. | 15:23 | ||
sena_kun | uzl, how can I clone it? | 15:27 | |
uzl | sena_kun: git clone [email@hidden.address] | 15:29 | |
sena_kun | [email@hidden.address] Permission denied (publickey). | ||
uzl | Probably git clone gitlab.com/uzluisf/raku-text-slugify.git? | 15:31 | |
sena_kun | this one is better... | ||
m: say 'компьютер' ~~ rx« <-[ \- a..z 0..9 ]>+ » | 15:38 | ||
camelia | 「компьютер」 | ||
sena_kun | uzl, ^ is it intended? | ||
the regex is $ALLOWED-CHARS, what should it match and what shouldn't? | 15:39 | ||
uzl | Ideaally, it should only match the ASCII lowercase character set, digits and '-' | 15:40 | |
sena_kun | then you don't need to invert it, do you? | 15:41 | |
because it is inverted | |||
uzl | No, I take that back. It's using a negative character class because it's meant to substitute matching characters with blank space. | 15:42 | |
sena_kun | so it should or shouldn't match? because that's why you get empty lines in tests. | 15:43 | |
apparently, you need to adjust your regex so it doesn't match(?) or change the code. | |||
that's why I see. | |||
s/why/what/ | 15:44 | ||
uzl | I guess it's the not best variable name. But I guess it makes sense. Allowed characters are those that don't match that regex, meaning all characters except a..z, 0..9 and '-'. | ||
sena_kun | ah, I see | 15:45 | |
well, "компьютер" matches that, there are no characters from a-z0-9-, you match the whole string and replace it with $DEFAULT-SEPARATOR, what is '-'. | 15:46 | ||
uzl | Oh, I see. That makes sense. | ||
'-' is a dash. | 15:47 | ||
sena_kun | I have no idea what the code should do, but I can try to help if you explain to me. :) | ||
uzl | sena_kun: The idea is to turn a given string, possibly containing Unicode characters, into a dash-separated ASCII string. Hopefully that helps. | 15:49 | |
sena_kun | uzl, can you give an example, please? | ||
also, it does exactly that, I think, it results into a single `-`, because there are no ASCII. | 15:50 | ||
uzl | From the tests, slugify 'Nín hǎo. Wǒ shì zhōng guó rén' returns 'nin-hao-wo-shi-zhong-guo-ren'. | 15:51 | |
sena_kun | if you replace unicode characters with `-`, it'll be `--n h-o. W-...`, so probably not what you want. | 15:52 | |
robertle | I have done some slugifying as well, and you could do some form of stemming first, so e.g. ö -> oe. in many languages that makes the slug readable but still free of unicode characters. in some languages if you just leave of the accents you already get quite far... | ||
sena_kun | also, ooc, don't you need a really complex dictionary for that? | 15:53 | |
uzl | sena_kun: If I was able to convert the cyrillic characters into ASCII right before the substitution it's applied then the string wouldn't match the pattern. | ||
sena_kun | I mean, 女子 is "joshi", but 女の子 is "onnanoko". | 15:54 | |
uzl | robertle: What I'm naively doing now is using the samemark routine. | ||
to get rid off the accents and other marks | 15:55 | ||
m: 'Nín hǎo. Wǒ shì zhōng guó rén'.samemark('a').put | |||
camelia | Nin hao. Wo shi zhong guo ren | ||
uzl | sena_kun: According to the original tests (from the Python module), '影師嗎' should return 'ying-shi-ma'. | 15:56 | |
robertle | uzl: sounds cool, I was doing it in java, so no samemark :) | 15:58 | |
15:59
MasterDuke left
|
|||
sena_kun | uzl, no, I mean, where from does this algorithm take substitutions? | 15:59 | |
AlexDaniel | unidump: 影師嗎 | ||
unicodable6 | AlexDaniel, gist.github.com/2a29cc503518a1d82a...e634a65e24 | ||
AlexDaniel | hm | 16:01 | |
m: say ‘👋🏽’.samemark(‘a’) | |||
camelia | 👋 | ||
AlexDaniel | interesting, it removes skin tones too | 16:02 | |
m: say ‘🇦🇬’.samemark(‘a’) | |||
camelia | 🇦 | ||
AlexDaniel | hahahahah | ||
uzl | sena_kun: I'll come back later. If you've some insight, just .tell me. Don't stress too much about it though ;-)! | 16:04 | |
16:04
uzl left
|
|||
sena_kun has no idea how it should work internally at all | 16:05 | ||
16:05
dominix__ joined
|
|||
Geth | ¦ problem-solving: AlexDaniel assigned to samcv Issue Samemark breaks regional indicator symbols, should it be this way? github.com/perl6/problem-solving/issues/61 | 16:06 | |
¦ problem-solving: AlexDaniel self-unassigned X::MyModule::Foo or MyModule::X::Foo ? github.com/perl6/problem-solving/issues/57 | |||
¦ problem-solving: AlexDaniel assigned to JJ Issue X::MyModule::Foo or MyModule::X::Foo ? github.com/perl6/problem-solving/issues/57 | |||
16:07
epony left,
claes-magnus left
16:08
dominix_ left
16:13
Manifest0 left
16:20
Manifest0 joined
16:22
sjm_uk joined
16:27
epony joined
16:28
Manifest0 left
16:33
Manifest0 joined
|
|||
timotimo | greppable6: MVM_nativecall_unmarshal | 16:44 | |
greppable6 | timotimo, Found nothing! | ||
16:49
yacou joined
16:57
nepugia left,
jeromelanteri left
16:58
Manifest0 left,
yacou left,
feds joined,
pamplemousse left
17:04
Manifest0 joined
17:33
Manifest0 left
17:34
sjm_uk left
17:38
Manifest0 joined
17:45
Manifest0 left
17:50
sjm_uk joined,
Manifest0 joined
18:07
Manifest0 left
18:12
Manifest0 joined
18:25
abraxxa left
18:37
wildtrees joined
18:39
abraxxa joined
18:40
feds left
18:54
wamiks joined
18:57
sjm_uk left
18:59
sena_kun left
19:08
Manifest0 left
19:14
Manifest0 joined
19:26
sena_kun joined,
Manifest0 left
19:30
Manifest0 joined
|
|||
TreyHarris | I'm having trouble finding out how to query for all signatures of a multi... &routine.signature gives you the proto signature if defined, the exact signature of the defined multi if only one is defined, or what seems to be some superset of all defined multi's signatures if there's no proto- | 19:34 | |
So how to get a list of signatures? | |||
hmm, I can look at the source for no-match dispatch since it prints them out... | |||
19:35
mowcat left,
grumble left
19:38
mowcat joined
|
|||
nine | TreyHarris: &routine.candidates | 19:39 | |
TreyHarris | nine: so (&foo.signature, |&foo.candidates>>.signature) will give me everything, proto first? | 19:41 | |
19:42
redhands joined,
[particle] joined
|
|||
TreyHarris | (that's the behavior I'm seeing with a couple tests anyway) | 19:42 | |
nine | I'd guess so yes | 19:44 | |
19:44
abraxxa left,
[particle]1 left
|
|||
TreyHarris | hm, at the REPL if I redefine a multi without touching the signature, the old one sticks around... how can I undefine it? | 19:44 | |
19:45
grumble joined
|
|||
TreyHarris | ("sticks around" in .candidates I mean, it's not called) | 19:45 | |
timotimo | can't, except putting a new proto in there | ||
redhands | hi all, just noticed that the last release was 2019-03-01, is this date correct? | ||
TreyHarris | timotimo: ah, cool, I wasn't aware that a proto declaration cleared the slate... I don't think that's documented AFAICT | 19:48 | |
is that Perl 6, or Rakudo? | |||
timotimo | Perl 6; REPL just gives you scopes more deeply nested for each line | 19:49 | |
so it's just like putting new curlies and then the proto definition | |||
it doesn't clear the slate so much as shadow the old | |||
19:49
[particle]1 joined
|
|||
El_Che | redhands: yes, a new release should be out very soon | 19:50 | |
19:51
[particle] left
|
|||
redhands | El_Che: that's great to hear, thanks! | 19:53 | |
Kaiepi | m: say "ௌ" ~~ /./ | ||
camelia | 5===SORRY!5=== Argument to "say" seems to be malformed at <tmp>:1 ------> 3say7⏏5 "ௌ" ~~ /./ Bogus postfix at <tmp>:1 ------> 3say 7⏏5"ௌ" ~~ /./ expecting any of: infix infix stopper … |
||
Kaiepi | m: say "ௌ".samemark(' ') ~~ /./ | ||
camelia | 5===SORRY!5=== Argument to "say" seems to be malformed at <tmp>:1 ------> 3say7⏏5 "ௌ".samemark(' ') ~~ /./ Bogus postfix at <tmp>:1 ------> 3say 7⏏5"ௌ".samemark(' ') ~~ /./ expecting any of: infix … |
||
Kaiepi | m: say "ௌ".NFC ~~ /./ | 19:55 | |
camelia | 5===SORRY!5=== Argument to "say" seems to be malformed at <tmp>:1 ------> 3say7⏏5 "ௌ".NFC ~~ /./ Bogus postfix at <tmp>:1 ------> 3say 7⏏5"ௌ".NFC ~~ /./ expecting any of: infix infix stopper … |
||
19:55
[particle] joined
|
|||
Kaiepi | what is going on here? | 19:56 | |
El_Che | redhands: in case you're using the rakudo-pkg repo's, pkgs will be updated inmediately as well | ||
19:57
[particle]1 left
|
|||
timotimo | Kaiepi: i'd expect it's merging the " with the combiner that's following it | 20:01 | |
and it won't parse that as a quoted string literal | |||
TreyHarris | timotimo: thanks, got it. So I was looking at &exit and I'm interested in why (in Rakudo at least) it has a defined `proto sub exit($?, *%) {*}` when its definitions are `multi sub exit() { &*EXIT(0) }` and `multi sub exit(Int(Any) $status) { &*EXIT($status) }` | 20:05 | |
Kaiepi | is the character badly formatted or something? | ||
TreyHarris | Is that just for flexibility if others want to supply another candidate? | 20:06 | |
(If so, that's great, because that's exactly what I'm doing...) | |||
20:06
Kaiepi left
20:07
Kaiepi joined
|
|||
TreyHarris | but also, how does a defined proto ($? *%) differ from not defining a proto at all? | 20:07 | |
(er, comma there) | |||
20:08
Kaiepi left,
Kaiepi joined
20:09
Kaypie joined,
Kaypie left
20:10
lucasb left
20:14
khisanth_ left
20:16
veesh joined,
Manifest0 left
20:21
MasterDuke joined
20:22
Manifest0 joined
20:31
zakharyas joined
20:32
khisanth_ joined
20:35
lgtaube left,
abraxxa joined
20:52
abraxxa left
20:54
khisanth_ left
20:58
Kaiepi left,
khisanth_ joined,
Kaiepi joined
21:04
Manifest0 left
21:09
khisanth_ left,
Manifest0 joined
21:14
khisanth_ joined,
Manifest0 left
21:20
Manifest0 joined
21:26
Manifest0 left
21:30
zakharyas left
21:33
Manifest0 joined
21:41
rindolf left
21:49
rfold left
|
|||
sena_kun | m: class A { has $.x; }; CATCH { default { say $_.x; } }; await Promise.broken(A.new(x => 42)); | 21:54 | |
camelia | No such method 'x' for invocant of type 'X::AdHoc+{X::Await::Died}' in block at <tmp> line 1 in any at <tmp> line 1 in any at /home/camelia/rakudo-m-inst-2/share/perl6/runtime/CORE.d.setting.moarvm line 1 in block <unit> at <tmp> li… |
||
sena_kun | m: class A { has $.x; }; CATCH { default { say $_.x; } }; Promise.broken(A.new(x => 42)).result; | ||
camelia | No such method 'x' for invocant of type 'X::AdHoc+{X::Promise::Broken}' in block at <tmp> line 1 in any at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
sena_kun | can someone explain to me how we say "Please, await till promise is kept or broken, and if broken, I want to catch the exception instead of something odd happening". | 21:55 | |
22:17
Manifest0 left
22:18
lord| left,
veesh left
|
|||
ugexe | m: class A { has $.x; }; CATCH { default { say $_.payload.x; } }; Promise.broken(A.new(x => 42)).result | 22:21 | |
camelia | 42 | ||
22:23
Manifest0 joined
22:25
wamiks left
|
|||
sena_kun | d'oh... my custom exception class didn't have an `is Exception`, so when I did `die X::Cro::Foo` I always got X::AdHoc and was confused as hell. | 22:29 | |
ugexe++ for a hint | |||
22:39
Itaipu left
22:42
Itaipu joined
22:48
Manifest0 left
22:50
TreyHarris left
22:52
Manifest0 joined
22:56
TreyHarris joined
22:57
TreyHarris is now known as Trey,
Trey is now known as TreyHarris
|
|||
lizmat | weekly: richardsmith.me/celebrate-programm...verbosity/ | 23:07 | |
notable6 | lizmat, Noted! | ||
23:09
Manifest0 left
23:15
Manifest0 joined
|
|||
sena_kun | >I'll have more lines, I'll also have less bugs | 23:16 | |
[Citation needed] | 23:18 | ||
timotimo | i don't buy the "unpack to 10 lines again" argument; look at how a supply or react block can handle all kinds of stuff all at once | ||
and not in a way that you'd pick apart into individual lines | 23:19 | ||
sena_kun | I wonder where is the border for this. | ||
timotimo | yeah, me too | 23:20 | |
sena_kun | I mean, would people argue that using jmp and assembler cmp is clearly better than a for-loop? | ||
timotimo | or that a "list = []; for things in collection: list.append(do-thing-with(things))" is better than a collection.map(&do-thing-with)? | 23:21 | |
list = collection.map(&do-thing-with)* | |||
sena_kun | there is a line between a line noise people do for "fun" and stuff like sigils or metaops, but it is so useful to blur it and pretend it's the same thing. | ||
timotimo | do people pick apart promise/async/await code into the equivalent callback hell to understand it? | 23:22 | |
23:22
TreyHarris left
|
|||
sena_kun | you can write in assembler instead of C. You will have more lines of code, but less bugs, of course, because using low-level abstractions is what humans are good at. I have never saw in my life an off-by-one error. I mean, who would do that? This would be just ridiculous. | 23:23 | |
right now I am very embarrased of myself for those witty retorts, though. :| | 23:24 | ||
timotimo | yeah, that's obviously a bit too far; finding the line is the real tricky part | 23:26 | |
like, the claim is almost trivial, but where to place the line is where there's going to be disagreements | |||
.hyper.map is also a place where you probably wouldn't pick it apart to a splitter, a few workers, and a merger thread | 23:27 | ||
sena_kun | today I wrote gist.github.com/Altai-man/66317a11...6402b6937b <- a naive rewrite of workers example in Go, and then a more idiomatic one. | 23:28 | |
timotimo | try to give the filenames a number or letter prefix so they get ordered on the page | ||
sena_kun | a more idiomatic one is declarative, you don't need to think about how it'll work, you just say "Do it in parallel, dammit!" and it just works. I am not sure where I can stick in a bug there. | 23:29 | |
timotimo | oh, is "race" the right one there? does the original go code not preserve order? | ||
sena_kun | OTOH, you can always forget to close a channel or something stupid like this. | ||
timotimo, it is not | |||
timotimo | ah, OK | ||
sena_kun | *it does not preserve | ||
and you can always s/map/hyper/, not the issue here | 23:30 | ||
timotimo | i think using .eager.map(*.say) would also do the right thing, no need for the Supply? | ||
or perhaps .list.map | |||
or, of course, a regular "for" | |||
sena_kun | timotimo, I am just too used to supplies. ;) | ||
timotimo | ha, i can imagine | ||
and react blocks with a single "whenever" are optimized a fair bit IIRC | 23:31 | ||
sena_kun | the point I wanted to make when showing this example is that you can leave no place for bugs. but in response I received "Code is bad because it has sigils!". Woah. | ||
I am sometimes sad when seeing attemps to golf something that is golfed enough | 23:32 | ||
timotimo | sure | 23:33 | |
sena_kun | like, when $folk-a asks here something like "I have a thing I can do in two lines of code, maybe I can do it in a single one". It feels like "Isn't it good enuogh already?", maybe it is my personal point of view, I guess, or something. | ||
timotimo | i kind of enjoy it, though, and sometimes the two-lines piece of code is less clear than the "golfed" one-line one | ||
btw, "for n := range jobs" reads so odd in that go code | 23:34 | ||
like, you're not iterating over a range there, you grab more and more items from a channel | 23:35 | ||
or is the code, gasp, wrong? | |||
sena_kun | so I kind of understand the point against golfing "to death". but there is a separation between line-noise and cutting out various abstractions out of the language on purpose, because people won't get them. Then you get Java with AbstractFactoryPatternMethodClassStrategy, because you need to dance around explicitly re-inventing wheels. | ||
timotimo | mhhh | ||
java is so super simple! everything is a class with methods, and that's it! | |||
23:36
wildtrees left
|
|||
timotimo | wait, hold up | 23:37 | |
for ^100 { jobs <- i } | |||
that can'- be go code :D | |||
sena_kun .oO ( I probably should finish this Senko episode instead of writing my lame ranting here ) | |||
m: sub use($a) { say 'heh $a' }; use 'OH NO'; | 23:38 | ||
camelia | heh $a | ||
timotimo | i hear it's wholesome. surely more wholesome than ranting about programming opinions | ||
sena_kun | damn | ||
m: sub use($a) { say "heh $a" }; use 'OH NO'; | |||
camelia | heh OH NO | ||
sena_kun | I suspected that, but huh. | 23:39 | |
is there anything in Perl 6 that is actually a keyword and not a sub? | |||
timotimo | m: sub if($a) { say "heh $a" }; if(99) | ||
camelia | heh 99 | ||
sena_kun | or kind of sub. | ||
yes, I know about if, also returnd and friends. | |||
timotimo | use does get parsed as syntax, just not if there's a sub that's defined | ||
sena_kun | ah, I see. that's reassuring. | ||
timotimo | haha, i can't --target=parse 'use hello' because "can't find hello" | 23:40 | |
but anyway, "use Test" would otherwise be difficult, because Test isn't declared before; in fact, that is actually a declaration | |||
and this is also the reason why speculatively compiling code further beyond one "use" has to be able to undo what it did when it finds out an earlier "use" changed the language; by introducing a "use" sub, or by augmenting the grammar, or whatever else | 23:41 | ||
sena_kun | I am not so many years in this community, but already want to know some place where people actually try to think about pros and cons of various options. | ||
timotimo | you mean options in language design? like "why do we allow a sub named 'use' at all"? | ||
sena_kun | no, I mean, something besides "I heard once that feature X is cool||uncool, so I'll think so till death no matter what the arguments would be. I am defending this point of view, so I won't listen to anything else. That'd be a betrayal. Who betrays their soldiers on war? Not me". | 23:43 | |
timotimo | i haven't looked at it much, but raiph is active on some "programminglanguages" or similar subreddit | 23:44 | |
actually, i don't think raiph is quick to abandon communities that are or turn toxic | 23:45 | ||
sena_kun | sounds like God's work here. :) | ||
timotimo | they stuck around rather long on perlmonks if i remember correctly | ||
anyway, i ought to go sleep | 23:46 | ||
sena_kun | this amount of nerve is hard to not respect, I guess. maybe that's just me. | ||
timotimo, good night. o/ | |||
timotimo | do you regularly see raiph's answers on stackoverflow? | ||
they look like a whole load of work goes into each of the big ones | 23:47 | ||
i don't think i give enough praise so far | |||
sena_kun | timotimo, I did, this is truly impressive deed. | 23:48 | |
timotimo | okay, i'm off o/ | 23:49 | |
sena_kun | o/ | 23:55 | |
SmokeMachine | Hi all! I was studying gulp and wrote this clone (github.com/FCO/pulp/blob/master/pulp.p6)... does anyone it could be useful for something? If someone think it worths, I'll write some tests for it and maybe publish it... | 23:56 | |
23:57
Manifest0 left
|