»ö« 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:01
thundergnat joined,
patrickz left
00:03
mowcat left,
epony left
|
|||
thundergnat | .tell daxim Regarding the pronunciation of 𫇵. Can't really help with that, but I will leave this without further comment. twitter.com/henryfhchan/status/111...0864907265 | 00:03 | |
yoleaux | thundergnat: I'll pass your message to daxim. | ||
00:05
random_yanek joined,
random_yanek left,
thundergnat left
00:11
Axeman joined
|
|||
Axeman | Just letting somebody know that the website download for Win64 is broken. Keeps getting a 500 error. Thanks | 00:11 | |
00:13
random_yanek joined
00:17
ijneb joined
00:21
holyghost left
00:24
ijneb left
00:29
epony joined
00:35
aborazmeh left
00:42
Manifest0 left
00:44
random_yanek left
00:46
kurahaupo left
00:47
kurahaupo joined
00:48
Manifest0 joined,
random_yanek joined,
random_yanek left
00:51
Sgeo_ left
00:57
random_yanek joined,
random_yanek left
00:58
Sgeo joined,
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
cpan-p6 left
00:59
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
01:00
afresh1_ joined
01:01
afresh1 left,
afresh1_ left,
afresh1 joined
01:02
buffet_ joined
01:03
buffet left
01:05
random_yanek joined,
random_yanek left
01:11
w_richard_w joined
01:14
random_yanek joined,
random_yanek left
01:17
Sgeo_ joined
01:20
Sgeo left
01:23
random_yanek joined
01:27
netrino left
01:35
zacts joined
01:44
zacts left
01:56
bakedb_ joined
01:58
bakedb left
02:03
Manifest0 left
02:05
bakedb joined
02:06
Manifest0 joined
02:07
nekomune left
02:08
bakedb_ left
02:15
zacts joined
02:16
nekomune joined
02:17
holyghost joined
02:29
random_yanek left
02:34
random_yanek joined,
random_yanek left
02:38
fake_space_whale left
02:43
random_yanek joined,
random_yanek left
02:51
random_yanek joined,
random_yanek left
03:00
random_yanek joined
|
|||
cpan-p6 | New module released to CPAN! LogP6 (1.5.2) by 03ATROXAPER | 03:03 | |
03:05
aborazmeh left
03:11
zacts left
03:12
random_yanek left
03:14
khisanth_ left,
kaare_ left
03:15
kaare_ joined
03:17
random_yanek joined,
random_yanek left
03:21
lucasb left
03:23
sftp left
03:25
xi- left,
random_yanek joined,
random_yanek left
03:26
khisanth_ joined
03:29
xi- joined
03:31
sftp joined
03:34
random_yanek joined,
random_yanek left
03:35
zacts joined
03:43
random_yanek joined,
random_yanek left
03:52
random_yanek joined
03:56
Cabanossi left
04:04
Cabanossi joined
04:09
Sgeo joined
04:11
Sgeo_ left
04:14
atroxaper left
04:16
aindilis left,
random_yanek left
04:17
sauvin joined
04:19
aindilis joined
04:21
zacts left,
random_yanek joined
04:32
Xliff left
04:34
Axeman left
04:44
Manifest0 left
04:55
Manifest0 joined
05:08
atroxaper joined
05:12
netrino joined
05:24
Cabanossi left
05:28
Xliff joined
|
|||
Xliff | m: ^30.sum | 05:28 | |
evalable6 | Potential difficulties: Precedence of ^ is looser than method call; please parenthesiz… |
||
Xliff, Full output: gist.github.com/48488d8879387fc8d4...da7ee185b4 | |||
Xliff | m: ^(30).sum | ||
evalable6 | WARNINGS for /tmp/cu6e7qlxPk: Useless use of "^" in expression "^(30).sum" in sink context (line 1) |
||
Xliff | m: (^30).sum | ||
evalable6 | |||
Xliff | m: (^30).sum.say | ||
evalable6 | 435 | ||
Xliff | m: (^45).sum.say | ||
evalable6 | 990 | ||
05:29
Sgeo_ joined
05:30
vrurg left
05:32
Sgeo left
05:33
random_yanek left
05:35
zacts joined
05:38
netrino left,
Cabanossi joined
|
|||
holyghost | . | 05:42 | |
yoleaux | 24 Apr 2019 16:18Z <Xliff> holyghost: Sure! You have my email. Please remember I do NOT have a lot of resources on this VM, so that will limit what can be done. | ||
05:49
rindolf joined
05:50
random_yanek joined,
random_yanek left
05:58
random_yanek joined,
random_yanek left
06:07
random_yanek joined
06:29
lgtaube left
06:48
domidumont joined,
domidumont left
06:49
domidumont joined
06:52
ufobat_ joined
06:54
w_richard_w left
06:55
ufobat left
06:57
netrino joined
07:08
robertle joined
07:23
random_yanek left
07:26
patrickb joined
07:27
random_yanek joined,
random_yanek left
07:30
dakkar joined
07:34
zakharyas joined
07:36
random_yanek joined,
random_yanek left
07:45
random_yanek joined,
kensanata joined
08:04
ravenousmoose_ joined,
kurahaupo left
08:05
kurahaupo joined
08:06
ravenousmoose left
08:08
lizmat joined
08:24
cpage left
08:25
cpage joined
|
|||
patrickb | .tell sena_kun I just added two PRs for croservices/openapi-model. | 08:31 | |
yoleaux | patrickb: I'll pass your message to sena_kun. | ||
08:31
random_yanek left
08:35
lizmat left
08:36
buffet_ is now known as buffet,
random_yanek joined,
random_yanek left,
lizmat joined
08:44
random_yanek joined,
random_yanek left
08:52
fake_space_whale joined
|
|||
skaji | I hope this would be fixed. github.com/perl6/rakudo.org/issues/26 | 08:53 | |
yoleaux | 18 Oct 2017 22:33Z <HoboWithAShotgun> skaji: I hacked on mi6, check out github.com/skaji/mi6/pull/28 | ||
08:53
random_yanek joined
|
|||
kawaii | hm, is there any shortcut in comma to highlight a bunch of text and change the case? | 08:56 | |
i.e. uppercase to lower? | |||
moritz | currently powercycling the p6c.org server with a monitor attached | 08:57 | |
it said "IPMI Initializing" for a minute, now it says "System Initializing ...." | |||
... but it said the same thing before the attempted powercycle | 08:58 | ||
I'm going to wait a minute or two | 08:59 | ||
lizmat | moritz++ | 09:04 | |
moritz | now with keyboard attached, doesn't seem to get any further :( | ||
nope, looks toasted to me | 09:06 | ||
nine | I guess the hardware is out of warranty? | 09:09 | |
jnthn | kawaii: iirc, Ctrl+Shift+U; it's Toggle Case on the Edit menu, and the shortcut should be displayed next to it | ||
kawaii | jnthn: much appreciated :) | 09:10 | |
moritz | nine: yes. entered the DC 2014-12-04 | ||
so it's 4+ years old | 09:11 | ||
nine | So I guess it's time to rip out components and see if it boots then | 09:13 | |
09:16
wahnberger joined
09:18
__jrjsmr- joined,
Sgeo_ left,
_jrjsmrtn left
09:19
Sgeo_ joined
|
|||
wahnberger | hi folks :) Is the are way to check whether a string has non-ascii chars or not? I am checking bunches of lists of domain names and sometimes there is a IDN domain name (eg with a cyrillic char or so)? | 09:22 | |
moritz | m: say "möp" ~~ /<:!ascii>/ # for wahnberger | 09:23 | |
evalable6 | 「ö」 | ||
wahnberger | due to performance issues i would like to do a conversion only if its non ascii | 09:24 | |
rba | moritz: Are you able to see the hard drives from IPMI or Bios? | ||
moritz | rba: I don't even get to a mgmt interface in bios | ||
and I have no idea how to use ipmi | |||
so I guess I'll have to take it home, remove the hard drives, and mount them to another machine | 09:25 | ||
wahnberger | moritz: thx! | ||
lizmat wonders if reseating things that haven't been soldered, might help | 09:27 | ||
nine | moritz: you can still try to remove components on location like memory modules. Maybe one is so faulty that it keeps the BIOS from initializing | 09:28 | |
moritz | yes, I can | 09:29 | |
09:30
ravenousmoose_ left
09:31
ravenousmoose joined
09:36
wahnberger left,
lizmat left
09:37
lizmat joined,
lizmat left
09:38
lizmat_ joined
09:40
woolfy joined
|
|||
patrickb | releasable6: status | 09:41 | |
releasable6 | patrickb, Next release will happen when it's ready. 4 blockers. 61 out of 236 commits logged (⚠ 51 warnings) | ||
patrickb, Details: gist.github.com/b3941a751d20d54b7f...753f355efc | |||
09:42
sena_kun joined
|
|||
El_Che | moritz: in that case ipmi is not configured (users and the like), so it won't be an option | 09:46 | |
moritz: nine's suggestion makes a lot of sense. Disks and RAM breaks regularly. I broken disk won't stop you from being the BIOS. Broken RAM will. | 09:48 | ||
(but you know all that, just to be sure) | |||
atroxaper | jnthn: sena_kun: I'm sorry, but I cannot download a plugin version of CommaIDE. commaide.com/subscriber/feedback/46 | 10:00 | |
yoleaux | 24 Apr 2019 17:00Z <lizmat> atroxaper: published link on /r/perl6, you could also consider posting it to Hacker News | ||
sena_kun | .oO ( everyone use Comma ) | 10:01 | |
yoleaux | 08:31Z <patrickb> sena_kun: I just added two PRs for croservices/openapi-model. | ||
sena_kun | atroxaper, thanks, I'll ping jnthn... | ||
atroxaper | everyone use Comma! I'm working in JetBrains. Of course, I should use Comma :) | 10:02 | |
sena_kun | atroxaper, we'll fix it in a moment... | 10:05 | |
10:08
kurahaupo left,
kurahaupo joined
|
|||
atroxaper | sena_kun: Thank you! | 10:08 | |
10:09
domidumont left
10:11
Black_Ribbon left
|
|||
sena_kun | atroxaper, done, thanks for report | 10:12 | |
atroxaper | sena_kun: confirm | ||
sena_kun: Now I'm going to test it and create the new bunch of tickets about macOS version :) | 10:14 | ||
sena_kun | atroxaper, thanks! Please do. | ||
10:15
atroxaper left
|
|||
kawaii | sena_kun: fwiw, I couldn't write perl 6 without comma now :) | 10:19 | |
10:20
xinming_ left
10:21
kurahaupo left,
kurahaupo joined
|
|||
sena_kun | it's the same for me... | 10:22 | |
10:25
lizmat_ is now known as lizmat
|
|||
kawaii | I use Comma for a lot of things now too, editing sql, json etc | 10:29 | |
trying to work out if Comma Complete is worth it for me | 10:30 | ||
currently an expense I can't afford, but might be getting a new job soon so we'll see :) | |||
sena_kun | kawaii, good luck with a new job, if you'll decide to change one. | 10:31 | |
ugexe | zef v0.7.3 one can use `zef install ...` with --/update (to disable all auto-updating if an existing ecosystem file exists), --/update=p6c to disable a specific ecosystem only, --update to force updating all ecosystems, and --update=p6c to update a specific ecosystem only | 10:34 | |
timotimo | oh no, i hope it wasn't me who broke p6c; i did run afl which would have maxed out one core | 10:37 | |
ugexe++ | |||
sena_kun | timotimo, the sites are responsive for me... | 10:38 | |
cpan-p6 | New module released to CPAN! HTTP::Tinyish (0.1.4) by 03SKAJI | ||
timotimo | sena_kun: well, they are no longer hosted on www.p6c.org, or did something happen in the mean time? | 10:40 | |
sena_kun | timotimo, a-ah, sorry, I thought you were referring to the backup droplet | 10:41 | |
10:42
bakedb left
|
|||
sena_kun | releasable6, status | 10:44 | |
releasable6 | sena_kun, Next release will happen when it's ready. 4 blockers. 61 out of 236 commits logged (⚠ 51 warnings) | ||
sena_kun, Details: gist.github.com/715be8df17a640fa29...6dac2e24f8 | |||
holyghost | 64;1;2;6;9;15;18;21;22c64;1;2;6;9;15;18;21;22c | 10:47 | |
sorry pressed enter with a terminal overflow | 10:49 | ||
10:56
Sgeo_ left,
kurahaupo_ joined
10:57
Sgeo_ joined,
kurahaupo left
10:58
kurahaupo_ left,
atroxaper joined,
kurahaupo joined
11:08
atroxaper left
11:14
zakharyas left
11:17
dakkar left
11:35
mowcat joined
|
|||
kawaii | is there a metaoperator I can use to add two hashes together when they share identical structure? | 11:38 | |
timotimo | yeah | 11:39 | |
just hyper + it | |||
if the structure is identical and you want to enforce it, use >>+<< | |||
if the structures are similar, but sometimes one has a hole, <<+>> is fine | |||
kawaii | `»+«` oooh this looks fun | ||
timotimo | m: say { :1a, :2b, :3d } <<+>> { :10a, :20c, :30d } | ||
evalable6 | {a => 11, d => 33} | ||
timotimo | m: say { :1a, :2b, :3d } >>+<< { :10a, :20c, :30d } | 11:40 | |
evalable6 | {a => 11, b => 2, c => 20, d => 33} | ||
timotimo | actually i was wrong | ||
but yeah, look at that there and you should be able to tell what's going on | |||
kawaii | timotimo: »+« works perfectly, thank you! | ||
timotimo | \o/ | ||
11:40
cpan-p6 left
|
|||
kawaii | and HYPER OPERATOR sounds really impressive so ++ | 11:41 | |
11:41
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
11:43
esh left,
casdr left
11:44
esh joined,
casdr joined
11:46
bakedb joined
11:53
tobs left
|
|||
kawaii | timotimo: can I loop until all values in a hash = X, even if I don't know what keys it has? | 11:53 | |
timotimo | is the hash nested? | 11:56 | |
11:56
domidumont joined
11:57
tobs joined
|
|||
kawaii | timotimo: nope! | 11:58 | |
timotimo | cool | 11:59 | |
in that case just .values will do it | |||
m: my %foo = { :1a, :2b, :3c, :5c }; while %foo.values.any != 2 { %foo.values.pick = 2; print "." }; say %foo | 12:00 | ||
evalable6 | Potential difficulties: Useless use of hash composer on right side of hash assignment;… |
||
timotimo, Full output: gist.github.com/ee2992946b84eca0f7...ffd950ea23 | |||
timotimo | m: my %foo = :1a, :2b, :3c, :5c; while %foo.values.any != 2 { %foo.values.pick = 2; print "." }; say %foo | ||
evalable6 | {a => 1, b => 2, c => 5} | ||
timotimo | not quite | ||
m: my %foo = :1a, :2b, :3c, :5c; say %foo.values.any | |||
evalable6 | any(2, 5, 1) | ||
timotimo | m: my %foo = :1a, :2b, :3c, :5c; say %foo.values.any != 2 | ||
evalable6 | False | ||
timotimo | oh, right, negations | 12:01 | |
m: my %foo = :1a, :2b, :3c, :5c; while not %foo.values.all == 2 { %foo.values.pick = 2; print "." }; say %foo | |||
evalable6 | (exit code 1) Cannot modify an immutable Int (5) in block <unit> at /tmp/wDG16UN0pu line 1 |
||
timotimo | m: my %foo = :1a, :2b, :3c, :5c; while not %foo.values.all == 2 { %foo{%foo.keys.pick} = 2; print "." }; say %foo | ||
evalable6 | ...{a => 2, b => 2, c => 2} | ||
timotimo | m: my %foo = :1a, :2b, :3c, :5c; while not %foo.values.all == 2 { %foo{%foo.keys.pick} = 2; say %foo }; say %foo | ||
evalable6 | {a => 1, b => 2, c => 2} {a => 1, b => 2, c => 2} {a => 2, b => 2, c => 2} {a => 2, b => 2, c => 2} |
||
kawaii | thank you timotimo :) | ||
timotimo | YW | ||
12:04
MidCheck joined,
MidCheck left
12:26
mowcat left
12:36
APic left
12:37
APic joined
12:40
raschipi joined
12:49
lichtkind joined
13:00
lichtkind left
13:02
zakharyas joined
|
|||
woolfy | Question: where can we read the backlog of this channel (and other Perl 6 related channels)? | 13:08 | |
13:08
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
lucs | woolfy: See topic for this channel, others, I don't know. | 13:09 | |
woolfy | lucs: thanks (of course I should have looked there first) | ||
lucs | :) | 13:10 | |
13:11
lizmat left,
lizmat_ joined
|
|||
cpan-p6 | New module released to CPAN! Acme::Cow6 (0.0.1) by 03ELIZABETH | 13:11 | |
El_Che | woolfy: hallo from the log | 13:13 | |
13:18
vrurg joined
13:19
lizmat_ is now known as lizmat
13:20
skids joined
|
|||
skaji | ugexe: gist.github.com/skaji/9b90b942bdfa...1d7e8660c7 | 13:24 | |
patrickb | Does `next` have any special meaning inside CATCH blocks? | 13:25 | |
13:38
kurahaupo_ joined
13:40
kurahaupo left
13:43
domidumont1 joined
|
|||
jnthn | patrickb: Not intentionally, at least :) | 13:45 | |
13:47
domidumont left
13:49
random_yanek left,
aborazmeh left
|
|||
patrickb | Ugh.. | 13:52 | |
I got a very ugly bug it seems. It's non golfable and expresses itself by `next` acting like it's a `.resume`. A quick search through rakudo issues yielded no results. | 13:53 | ||
jnthn | Well, next is in itself a control exception | 13:54 | |
Can probably stick a label on the loop in question and then `next LABEL` | |||
13:54
random_yanek joined,
random_yanek left,
patrickb left
13:55
patrickb joined
14:02
Sigyn left
14:13
random_yanek joined
14:14
Manifest0 left
14:15
molaf joined
14:19
Manifest0 joined
14:24
domidumont joined
14:26
domidumont1 left
|
|||
patrickb | jnthn: Using a label makes it work. Original behavior seems like a bug though. Not sure if it's worth a report, it's quite golf resistant... | 14:33 | |
14:34
tobs left
14:36
tobs joined
14:49
xinming joined
14:51
mowcat joined,
fake_space_whale left
14:58
robertle left
14:59
rindolf left
15:01
rindolf joined
15:14
ravenousmoose left
|
|||
Xliff | A class cannot have attributes, but you tried to declare '$!p' | 15:14 | |
^^ LTA? | |||
m: class A{ has $!p }; | |||
evalable6 | |||
Xliff | m: class A { }; class B has A{ has $!p }; | 15:15 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/CC2UriLtem Unable … |
||
Xliff, Full output: gist.github.com/f2536a7fb1db088e7c...b5146ab6ae | |||
Xliff | m: class A { }; class B is A{ has $!p }; | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/kuyx5u71jv A class… |
||
Xliff, Full output: gist.github.com/4e90ab694139c142e6...4c7b536618 | |||
Xliff | ^^ There we go. The error message hides the actual problem of the fact that a space needs to be between the A and { | 15:16 | |
15:16
rindolf left,
kensanata left
15:22
rindolf joined
15:25
Altai-man_ joined
15:26
sena_kun left
15:27
zacts left
15:32
sena_kun joined
15:33
Altai-man_ left
15:36
atroxaper joined,
Altai-man_ joined
15:37
Altai-man_ left
15:38
sena_kun left
15:44
kurahaupo_ left,
robertle joined
|
|||
kawaii | I'm trying to `.round` the `%stats{$inc}` and `%stats{$dec}` here so that I don't end up with floats (I need Ints), but keep being told they're immutable, any ideas why? www.irccloud.com/pastebin/TONa1gQ0/ | 15:48 | |
(the `if $inc` and `if $dec` are there purely because they can sometimes (rarely) be `(Any)`, which is valid but causes issues) | 15:49 | ||
m: say so (Any); | 15:50 | ||
evalable6 | False | ||
lizmat | m: my %h = a => pi; dd %h<a>.round | ||
evalable6 | 3 | ||
lizmat | kawaii: I guess I need more context? | ||
kawaii | lizmat: I'll provide a gist/example shortly | 15:52 | |
lizmat | okido | 15:53 | |
kawaii | `%stats` is a hash containing values that look like this: `{attack => 50, defence => 50, hp => 50, special-attack => 50, special-defence => 50, speed => 50}` | ||
`$nature` contains a hash too, with keys like `increased-stat` | |||
www.irccloud.com/pastebin/ch0D3nP4/ | 15:54 | ||
I'm just not sure why these keys in this hash are immutable | 15:55 | ||
If I remove the `.round` from `%stats{$inc}.round *= 1.1 if $inc;` it works but I get floats in the two keys we modified | 15:57 | ||
cpan-p6 | New module released to CPAN! Acme::Cow6 (0.0.2) by 03ELIZABETH | 15:58 | |
atroxaper | What 'Acme' means? | 16:03 | |
lizmat | kawaii: so how is that hash made ? | ||
16:04
sena_kun joined
|
|||
raschipi | ACME means 'a company that makes everything'. | 16:05 | |
lizmat | en.wikipedia.org/wiki/Acme_Corporation | ||
in Perl context: Acme:: modules are modules that generally shouldn't be taken too seriously | 16:06 | ||
atroxaper | Oh. Thanks for explanation. | ||
japhb | kawaii: Where's your repo? (I did github.com/japhb/RPG-Base and a few system-specific variations for e.g. PFRPG, so your question caught my eye) | ||
kawaii | japhb: it's github.com/kawaii/p6-pokeapi but I still need to push this code to it | 16:07 | |
one moment | |||
japhb: so if you use this example script - github.com/kawaii/p6-pokeapi/blob/...eration.p6 it uses my :Test datasource, so no need for a database | 16:09 | ||
usage: `perl6 -I lib/ examples/full-generation.p6` | |||
github.com/kawaii/p6-pokeapi/blob/...m6#L54-L73 | 16:10 | ||
^ the specific method | |||
16:12
aindilis left
|
|||
japhb | kawaii: The problem with that method is that you want .round on the right, not the left. (.round does not produce an 'lvalue', which is a value that can appear on the left side of an assignment.) | 16:12 | |
raschipi | You you'll need parens. | 16:13 | |
japhb | So you'll probably need to longhand it a bit -- %stats{$inc} = (%stats{$inc} * 1.1).round if $inc. | ||
raschipi | Or* | ||
japhb | s/\.$/;/ | 16:14 | |
kawaii | ah! I didn't know about that | ||
thank you! | |||
japhb | np | ||
16:16
patrickb left
|
|||
raschipi | %stats{$inc} = (%stats{$inc} * 1.1).round if $inc. # Should be if there? It's not supposed to run if it's False? Or it's about being undefined? | 16:16 | |
kawaii | raschipi: yes, the `if` is there because sometimes that value can be `(Any)` | 16:17 | |
in which case we just do nothing | |||
since you can't multiply by that :) | |||
m: say so (Any); | |||
evalable6 | False | ||
raschipi | m: my $a = Any; say $a * 1.1 with $a; say $a * 1.1 if $a; $a = 0; say $a * 1.1 if $a; say $a * 1.1 with $a | 16:23 | |
evalable6 | 0 | ||
raschipi | m: my $a = 0; say $a * 1.1 if $a | 16:24 | |
evalable6 | |||
raschipi | m: my $a = 0; say $a * 1.1 with $a | ||
evalable6 | 0 | ||
16:25
zacts joined
|
|||
raschipi | with tests for definedness instead of truth | 16:25 | |
16:29
Black_Ribbon joined
16:33
Sgeo_ left,
Sgeo_ joined
16:51
domidumont left
16:55
molaf left
|
|||
cpan-p6 | New module released to CPAN! FindBin (0.2.6) by 03LEMBARK | 16:59 | |
17:02
MilkmanDan left
17:03
MilkmanDan joined
17:05
lizmat left
17:08
woolfy left
17:24
domidumont joined
17:27
mowcat left
17:32
sauvin left
17:36
zakharyas left
17:37
atroxaper left
|
|||
xinming | What is the best way to control the number of processes to run in parallel? For example, There are 20 jobs to be done, But I want to run it with 5 max | 17:39 | |
17:40
aindilis joined
|
|||
sena_kun | xinming, how do you running those? .race? | 17:41 | |
xinming | ProcAsync IIRC | 17:43 | |
17:45
Manifest0 left
|
|||
raschipi | It would be easy if you run just normal normal processes but started multiple workers in Perl6 to wait for them. | 17:46 | |
xinming | raschipi: But there are over 20, running them all causes cpu to be bloated | 17:48 | |
sena_kun | m: react { my $batch-size = $*KERNEL.cpu-cores; my @queue = eager 0..10; sub do-one { with @queue.shift -> $el { sleep rand; say $el; do-one } }; do-one for ^$batch-size; } | ||
evalable6 | 0 1 2 3 4 5 6 7 8 9 10 |
||
xinming | So, I'm thinking wether it's possible to control the size. | ||
sena_kun | but in do-one you are running a Proc::Async, and inside of the same sub then you can do `whenever $proc.ready`, `whenever $proc.start { (call do-one here) }` | 17:49 | |
xinming | I need to think about how your example work | ||
sena_kun | this way your Proc::Async jobs will be done in parallel with a fixed batch size | ||
I wrote it with some working code, but if I add non-runnable pseudocode, it'll be like... | 17:50 | ||
sub do-one { with @queue.shift -> $el { my $proc = Proc::Async.new(...); whenever $proc.out {} do-one } }; do-one for ^$batch-size | 17:51 | ||
ugh | |||
17:51
Manifest0 joined
|
|||
sena_kun | sub do-one { with @queue.shift -> $el { my $proc = Proc::Async.new(...); whenever $proc.out { ...processing... }; whenever $proc.start { ...some post-processing... do-one() } } }; do-one for ^$batch-size | 17:51 | |
lucs | zef questions: 1. Can I tell it to use a directory different from $HOME/.zef? 2. What config file is --config-path about? ("Load a specific Zef config file") | 17:54 | |
xinming | I'm thinking, how can perl6 do so much magic. | 17:55 | |
I'll check doc about whenever and react | |||
raschipi | xinming: Alsdo check .race | ||
xinming | sena_kun: So, for whenever block without react is ok? | ||
I thought whenever should be only used in react or supply block. | 17:56 | ||
sena_kun | xinming, no, react is necessary | ||
xinming | raschipi: Ok, WIll check, Thanks. | ||
sena_kun: So, for second example, there should be a react block wrap all the code, right? | 17:57 | ||
17:57
zacts left
|
|||
sena_kun | xinming, ah, well, the second example is incomplete. I just shown how can `do-one` look like to be closer to your(probably) usecase, instead of dumb `sleep rand; say` thing. | 17:58 | |
to show that in your case you have to recurse not in the end of the block, but whenever the process ends | |||
xinming | sena_kun: For the second one, Where should I wrap the react? | 17:59 | |
all code? or only the after the Proc::Async.new(...); react { whenever $proc.out { ... }; whenever $proc.start { ...; do-one() } }; do-one for ^$batch-size | |||
sena_kun | xinming, you can just take the first one, then paste definition of do-one from the second one instead of the one from the first one. | 18:00 | |
give me a second... | |||
xinming, gist.github.com/Altai-man/ca5412b2...005a895ac1 | 18:01 | ||
xinming | Thanks. So, react block should be the top-level. | 18:03 | |
sena_kun | yes | ||
xinming | If I understand right, in perl6, We can have only one react block per program, right? | ||
So, We can't do something like this. if blabla { react { ... } } else { }; | 18:04 | ||
sena_kun | why not? | ||
no | |||
react block is just a thing that takes care of your `whenever` subscriptions | |||
give me a second... | 18:05 | ||
xinming | So, all whenever subscribed things, will be shared globally? | ||
hmm | |||
sena_kun | xinming, jnthn.net/papers/2019-gpw-react-sup...enever.pdf <- I recommend reading this | ||
it is an awesome reading and it just explains the thing I remembered out of this paper... :) | |||
xinming | Ok, THanks. I don't know that material. | 18:06 | |
18:07
_ramix_ joined
18:09
_ramix_ left
18:13
natrys joined
18:14
ddt_ joined
18:15
ddt_ left
|
|||
tony-o_ | lucs: you can use somewhere else with the env var XDG_CONFIG_HOME so long as there is a child zef/config.json | 18:17 | |
18:17
tobs left,
tobs joined
|
|||
tony-o_ | --config-path allows you to use a custom config file, for example, if you want to muck around with some modules or write your own for fetching/updating/testing/whatever you could copy zef's %?RESOURCES<config.json> somewhere, modify it, and then use that config path temporarily | 18:19 | |
lucs, see: github.com/ugexe/zef/blob/master/l...ig.pm6#L21 | 18:20 | ||
lucs | tony-o_: Gotcha. Thanks! | 18:21 | |
tony-o_ | if you have trouble feel free to .tell me, ugexe is at PTS and i'm in tel-aviv | 18:23 | |
18:25
epony left
18:27
raschipi left,
domm left
18:28
domm joined
18:41
abraxxa1 joined
18:44
epony joined,
kaare_ left,
kaare_ joined
|
|||
kawaii | Using DBI, when I select a single column from a table and then do `my @stuff = $query.allrows;` I get a nested array each time like `[[hello], [world]], is there some operator I can use to prevent that? | 18:46 | |
sena_kun | kawaii, just you `$stuff`? | 18:50 | |
oops | |||
m: sub foo { [1], [2] }; my $a = foo; say $a | |||
evalable6 | ([1] [2]) | ||
kawaii | well, I want to return a non-nested array | 18:51 | |
sena_kun | m: sub foo { [1], [2] }; my $a = |foo; say $a | ||
evalable6 | ([1] [2]) | ||
sena_kun | m: sub foo { [1], [2] }; my $a = foo.flat; say $a | ||
evalable6 | (1 2) | ||
sena_kun | kawaii, like a flatted one or? | ||
kawaii | eh I think, i.e. [hello, world, goodnight, world] instead of [[hello], [world], [goodnight], [world]] | 18:52 | |
sena_kun | kawaii, try `flat` | ||
either a method or a subroutine, as you see fitting... | 18:53 | ||
kawaii | sena_kun: perfect, thank you! | ||
18:59
Sgeo_ left,
Sgeo_ joined
19:06
bazzaar joined
19:07
domidumont left
19:08
bazzaar left
19:23
patrickb joined
19:26
lichtkind joined
19:37
fake_space_whale joined
19:50
lizmat joined
19:52
zacts joined
19:59
MilkmanDan left
20:00
MilkmanDan joined
20:10
zakharyas joined,
[particle] left
|
|||
skids | m: sub foo { [[1],[2]], [2] }; my $a = foo[*;*]; say $a # or that | 20:14 | |
evalable6 | ([1] [2] 2) | ||
skids | ...which lets you choose flattening level | ||
m: sub foo { [[1],[2]], [2] }; my $a = foo[*;*;*]; say $a | |||
evalable6 | (1 2 2) | ||
20:17
[particle] joined
20:26
lizmat left
20:35
patrickb left
20:36
lizmat joined
20:41
Manifest0 left
|
|||
Elronnd | is there a good way to get namespaced enums? So far I've been doing module A is export { enum <X Y Z> }, but it would be nice to say something like 'better enum A<X Y Z>' | 20:43 | |
(so I can refer to A::X or A.X or something like that, not just bare X) | |||
or, rather, so I'm forced to refer to it with the namespace | 20:47 | ||
20:48
Manifest0 joined
|
|||
sena_kun | m: enum Foos <F1 F2>; say Foos::F1; | 20:48 | |
evalable6 | F1 | ||
sena_kun | Elronnd, ^? | ||
Elronnd | m: enum Foos<F1 F2>; say F1 | 20:49 | |
evalable6 | F1 | ||
Elronnd | I want ^^ to be illegal | ||
20:50
netrino left
|
|||
sena_kun | oh, I see... I don't think you can do it without a really black magic... so a module is a solution, likely | 20:50 | |
Elronnd | ok | ||
20:53
zakharyas left
|
|||
skids | I remember fighting with this when trying an xcb module. something to do with package EXPORT::yada::yada { ... } | 20:55 | |
21:04
lichtkind left
21:05
lichtkind joined
|
|||
skids | m: our package CWEnum is export(:DEFAULT,) { our enum CW is export(:enums) «:CWBackPixmap(5)»; }; say CWEnum::CWBackPixmap + 4 | 21:05 | |
evalable6 | 9 | ||
skids | m: our package CWEnum is export(:DEFAULT,) { our enum CW is export(:enums) «:CWBackPixmap(5)»; }; say CWBackPixmap + 4 | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/lE5SBPNdZA Undeclared name: CWBackPixmap used at line 1 |
||
21:06
netrino joined
|
|||
skids | Elronnd: ^^^ | 21:06 | |
21:12
netrino left
21:13
netrino joined
21:14
xinming left
|
|||
timotimo | m: constant Foos = do { enum Foos <F1 F2 F3>; Foos }; say F1 | 21:17 | |
evalable6 | F1 | ||
timotimo | m: constant Foos = do { anon enum Foos <F1 F2 F3>; Foos }; | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/VkyXoL3RMu Undeclared name: Foos used at line 1 |
||
timotimo | no, wrong way around | ||
m: constant Foos = do { my enum Foos <F1 F2 F3>; Foos }; say F1 | 21:18 | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/pplbNfnsSU Undeclared name: F1 used at line 1 |
||
timotimo | m: constant Foos = do { my enum Foos <F1 F2 F3>; Foos }; say Foos::F1 | ||
evalable6 | F1 | ||
timotimo | Elronnd: i think this is the right way to do it | ||
21:18
zacts left
21:19
cpan-p6 left,
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
|
|||
skids | Well, with a package you can import into a local scope if needed. | 21:21 | |
m: our package A { our enum B is export «:F1(5)»; }; { import A; F1.say }; | 21:25 | ||
evalable6 | F1 | ||
skids | m: our package A { our enum B is export «:F1(5)»; }; { import A; F1.say }; F1.say; | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/M9iIHVHVH6 Undeclared name: F1 used at line 1 |
||
21:25
xinming joined
21:26
lizmat left
|
|||
timotimo | that's cool, but also rather a bit longer :) | 21:28 | |
m: constant Foos = do { my enum Foos <F1 F2 F3>; Foos }; { import Foos; say F1 } | |||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/fyDUhniav7 Undeclared name: F1 used at line 1 |
||
timotimo | m: constant Foos = do { my enum Foos <F1 F2 F3>; Foos }; { import Foos::; say F1 } | 21:29 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/VwherJW4fO Undeclared name: F1 used at line 1 |
||
timotimo | *shrug* :) | ||
skids | (Not that using a constant isn't clever :-) | 21:30 | |
Anyway, I'm free... free I say... so I'm driving home... | 21:31 | ||
21:32
lizmat joined
21:35
skids left
21:37
lizmat left
21:49
zacts joined
21:52
lichtkind left
|
|||
kawaii | I have issues with DBIish that are probably easy to fix but complicated to explain | 22:19 | |
So I wrote a gist trying to explain it the best I could | |||
gist.github.com/kawaii/66f2f21bc19...799ca5c8a2 | |||
sena_kun | kawaii, one question... | 22:43 | |
maybe I don't understand something, but in `get-natures` you have `$_<name> => $_` for every row. | 22:44 | ||
kawaii, but in your table select I don't see such a column. maybe you want `$_<nature> => $_`? | |||
kawaii | hmmmmmmmm! | ||
how did I miss that | |||
maybe because I'm really tired | 22:45 | ||
sena_kun | the error is saying that you are using Any in place of something that can be a Str. | ||
kawaii, no problem, it happens sometimes. Take care and take your time to rest! | |||
22:46
zacts left
|
|||
kawaii | sena_kun: thanks, that fixed it - I really appreciate the support given in this channel by you and many others :) | 22:46 | |
sena_kun | kawaii, you are welcome. :) | 22:47 | |
22:51
natrys left
23:07
lizmat joined,
sena_kun left
23:13
lizmat left
|
|||
MasterDuke | news.ycombinator.com/item?id=19750507 "Programming language ray tracing benchmarks project", me mentions wanting a perl sample. this seems like the sort of thing perl 6 would initially be very slow at, but judicious use of natives could make a large difference | 23:16 | |
*he mentions | 23:17 | ||
23:21
rindolf left
|
|||
MasterDuke | timotimo: haven't you done some ray-tracing something in perl6 already? | 23:23 | |
23:23
Cabanossi left
23:28
Cabanossi joined
23:34
aborazmeh joined,
aborazmeh left,
aborazmeh joined,
Manifest0 left
23:39
Sgeo__ joined,
Manifest0 joined
23:42
Sgeo_ left
|