»ö« 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:26
Black_Ribbon joined
00:27
mowcat left
|
|||
timotimo | jaldhar: you can use both none($year) %% 100 ot say "year isn't evenly divisible by 100", or you can use !%% | 00:35 | |
yoleaux | 23 Jun 2019 21:10Z <MasterDuke> timotimo: bunch of relevant-to-you chat today. starting at colabti.org/irclogger/irclogger_lo...9-06-23#l6 | ||
timotimo | you'll probably want to use %% instead of %, because %% gives true/false, whereas % gives you the remainder, but if you're only caring about "evenly divisible yes/no", the number is just extra baggage | ||
or something :) | |||
and for symmetry reasons there's a negation metaop, so every operator is negatable :) | 00:39 | ||
00:40
cpan-p6 left
00:41
noisegul joined
00:43
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
00:50
Cabanossi left
00:51
pnu__ joined
00:53
mrsolo joined
00:54
niceplace joined
01:00
Cabanossi joined
|
|||
vrurg | timotimo: not every operator is negatable, to be honest... ;) | 01:03 | |
m: say 2000 !% 100 | 01:04 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Cannot negate % because multiplicative operators are not iffy enough at <tmp>:1 ------> 3say 2000 !7⏏5% 100 expecting any of: infix infix stopper |
||
vrurg | Every boolean though. | ||
moritz | m: say 2000 %% 100 | 01:08 | |
camelia | True | ||
moritz | m: say 2000 !%% 100 | ||
camelia | False | ||
timotimo | you're right! | 01:16 | |
there should be a ? metaop that makes any other operator iffy :P | |||
vrurg | timotimo: 200 !?% 100 ?? :D | 01:27 | |
01:34
noisegul_ joined
01:36
Cabanossi left
01:37
noisegul left
01:46
Cabanossi joined
|
|||
Kaiepi | we need to go deeper | 02:00 | |
[!?%] (1...1_000_000) | 02:01 | ||
R[!?%] (1...1_000_000) | |||
er | 02:02 | ||
[R[!?%]] (1...1_000_000) | |||
vrurg | Kaiepi: would you share your pot? ;) | 02:04 | |
Kaiepi | lmao | 02:05 | |
timotimo | vrurg: if you want to partake in the pot you will have to go to the end of the rainbow, just like everybody else | 02:09 | |
vrurg (looks around): where am I??? | 02:12 | ||
Seriously... Trying to add new stuff to CORE.e.setting but it is invisible to the userland code. I'm missing something. | 02:15 | ||
02:16
aindilis joined
|
|||
Kaiepi | m: [R[!%%]] (1...:36('Z')) | 02:16 | |
camelia | Potential difficulties: Useless use of [R[!%%]] in sink context at <tmp>:1 ------> 3<BOL>7⏏5[R[!%%]] (1...:36('Z')) |
||
Kaiepi | m: [R[!%%]] (1...36('Z')) | ||
camelia | Potential difficulties: Useless use of [R[!%%]] in sink context at <tmp>:1 ------> 3<BOL>7⏏5[R[!%%]] (1...36('Z')) No such method 'CALL-ME' for invocant of type 'Int' in block <unit> at <tmp> line 1 |
||
Kaiepi | m: [R[!%%]] (1...:36('Z')) | ||
camelia | Potential difficulties: Useless use of [R[!%%]] in sink context at <tmp>:1 ------> 3<BOL>7⏏5[R[!%%]] (1...:36('Z')) |
||
Kaiepi | m: [R[!%%]] (1...36('Z')) | 02:17 | |
camelia | Potential difficulties: Useless use of [R[!%%]] in sink context at <tmp>:1 ------> 3<BOL>7⏏5[R[!%%]] (1...36('Z')) No such method 'CALL-ME' for invocant of type 'Int' in block <unit> at <tmp> line 1 |
||
Kaiepi | fiiine | ||
m: [R[!%%]] (1...10) | |||
camelia | Potential difficulties: Useless use of [R[!%%]] in sink context at <tmp>:1 ------> 3<BOL>7⏏5[R[!%%]] (1...10) |
||
Kaiepi | oh i'm forgetting say | ||
m: say [R[!%%]] (1...:36('Z')) | |||
camelia | False | ||
Kaiepi | any obfuscated code competitions? | ||
02:17
epony left
|
|||
ugexe | the R serves no purpose here, why would you use it in an obfuscated code competition | 02:18 | |
m: say [RRRRRRRRRRRRRRRRRRR[!%%]] (1...:36("Z")) | 02:19 | ||
camelia | False | ||
Kaiepi | it doesn't serve any purpose, but it does make it a little more annoying to understand | 02:23 | |
Util | Kaiepi: I don't know of any active obfuscated code competitions, but CodeFights has a daily Challenge that is almost always Golf. | 02:26 | |
40+ languages allowed, but no Perl 6 yet. | |||
I have been putting my Perl 6 solutions in the comments of my Perl 5 solutions. | |||
Kaiepi | ah | 02:28 | |
cpan-p6 | New module released to CPAN! TCP::LowLevel (0.0.1) by 03JMASLAK | 02:33 | |
Kaiepi | ((1..12) X[*] (1..12)).rotor(12).map(*.map({ sprintf '%3s', $_ })).join("\n").say is a golf i came up with a while ago to print the times table | ||
ooo tcp::lowlevel, sounds interesting | 02:41 | ||
damn it's linux-only | 02:45 | ||
02:57
Cabanoss- joined
02:58
Cabanossi left,
Cabanoss- is now known as Cabanossi
03:03
sauvin left
|
|||
jaldhar | vrurg, timotimo: sorry for the belated response. I wasn't able to get ! % % to work but I just realized I haven't updated rakudo since early 2018 so that might be the problem. Anyway good that it exists. | 03:17 | |
03:20
cpan-p6 left,
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
04:02
epony joined
04:06
kaare__ joined,
kaare_ left
04:37
curan joined
|
|||
Kaiepi | m: sub commit-a-sin { my $lex := $*W.pop_lexpad; $*W.install_lexical_symbol: $*W.cur_lexpad, 'lmao', 'lmao'; $*W.push_lexpad: $lex; }; BEGIN commit-a-sin; say lmao | 04:38 | |
camelia | lmao | ||
Kaiepi | m: sub commit-a-sin { my $lex := $*W.pop_lexpad; $*W.install_lexical_symbol: $*W.cur_lexpad, 'lmao', 'lmao'; $*W.push_lexpad: $lex; CALLER::MY::<lmao> := 'lmao'; }; BEGIN commit-a-sin; say lmao | 04:48 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> An exception occurred while evaluating a BEGIN at <tmp>:1 Exception details: 5===SORRY!5=== Error while compiling Lexical with name 'lmao' does not exist in this frame at : |
||
Kaiepi | but it does exist...? | ||
m: sub commit-a-sin { my $lex := $*W.pop_lexpad; $*W.install_lexical_symbol: $*W.cur_lexpad, 'lmao', 'lmao'; dd $*W.cur_lexpad.symbol: 'lmao'; $*W.push_lexpad: $lex; }; BEGIN commit-a-sin | 04:49 | ||
camelia | Hash element = {:scope("lexical"), :value("lmao")} | ||
04:55
reach_satori left
05:10
antoniogamiz joined
05:16
Sgeo joined
05:18
Sgeo_ left
05:31
Sgeo_ joined
05:32
nadim_ joined
05:34
Sgeo left
|
|||
lizmat | weekly: perl6.eu/hofstadter-friday.html | 05:46 | |
notable6 | lizmat, Noted! | ||
05:53
nepugia joined
|
|||
antoniogamiz | what's the shorter way of checking if an elements is in one Array? | 05:55 | |
elements => element | 05:56 | ||
uoh there's a ∈ operator | 05:57 | ||
06:00
nadim_ left
06:07
xi- joined,
zostay_ joined
06:08
nadim_ joined,
peteretep_ joined,
caasih_ joined
06:09
timeless_ joined
06:10
afresh1_ joined
06:12
joy__ joined
|
|||
moritz | there's also (elem) as the ASCII version | 06:13 | |
m: say 'a' (elem) <a b c>; | |||
camelia | True | ||
El_Che | Xliff: there have been rakudo debs for the wsl for ages :) | 06:14 | |
06:15
caasih_ is now known as caasih,
joy__ is now known as joy_,
zostay_ is now known as zostay,
peteretep_ is now known as peteretep
06:16
timeless_ is now known as timeless
06:22
tailgate joined
06:24
antoniogamiz left
06:25
Demos[m] joined
06:28
sauvin joined
|
|||
Geth | doc: a0c8ad126b | (JJ Merelo)++ | 6 files Adds a few exceptions, refs #1268 |
06:31 | |
06:40
nepugia left
|
|||
masak | morning, #perl6 | 06:42 | |
moritz | it's masak! :D | 06:45 | |
Kaiepi | gm | 06:46 | |
06:46
Rayler joined
06:47
abraxxa joined,
abraxxa left,
abraxxa joined
06:55
antoniogamiz joined
06:56
Ray_ler joined,
jaldhar left
06:57
jaldhar joined,
Rayler left
06:59
Ralyer joined
07:02
Ray_ler left
07:04
domidumont joined
07:10
Sgeo__ joined,
ravenousmoose joined
07:13
Sgeo_ left
07:15
patrickb joined
07:16
kensanata joined
|
|||
Ralyer | Hello :) | 07:16 | |
07:17
sno joined
|
|||
antoniogamiz | Ralyer: o/ | 07:23 | |
Ralyer | Hi | ||
07:46
kensanata left
07:50
ravenousmoose_ joined
07:51
ravenousmoose left
07:55
Ralyer left
07:56
kensanata joined
07:57
dolmen joined
07:59
epony left
|
|||
noisegul_ | Good morning | 08:04 | |
08:04
noisegul_ is now known as noisegul
08:06
dakkar joined
|
|||
antoniogamiz | noisegul: morningª | 08:10 | |
08:10
dolmen left
|
|||
antoniogamiz | godd morning!* | 08:10 | |
08:15
rindolf joined
08:17
demanuel joined
08:18
dolmen joined
08:21
robertle_ joined
08:23
epony joined
08:26
[particle]2 joined
08:27
sena_kun joined
|
|||
Geth | doc: c5f83a86e4 | (JJ Merelo)++ | doc/Type/CX/Next.pod6 Fixes and adds example refs #1268 |
08:34 | |
doc: 888fa474b2 | (JJ Merelo)++ | 3 files Adds three more CXs refs #1268 |
|||
synopsebot_ | Link: doc.perl6.org/type/CX::Next | ||
Geth | doc: 67705e5413 | (JJ Merelo)++ | 4 files some fixes #1268 and #2302 |
||
08:43
squashable6 left
|
|||
antoniogamiz | If I'm calling a method with 2 arguments but it gives an error saying that I'm calling it with 3, what could be wrong? | 08:44 | |
robertle_ | perhaps it thinks it's a sub, and you think it's a method? | ||
do you have an example to look at? as in call site + signature? | 08:45 | ||
antoniogamiz | call site => say $registry.lookup("test1", "d"); | ||
signature => method lookup(Str $what, Str :$by!) { | |||
08:47
squashable6 joined
|
|||
robertle_ | ah! your second argument is a by-name argument, so the callsite would have to be .lookup("test1", by => "d") or the signature could drop the colon | 08:48 | |
docs.perl6.org/type/Signature#Posi..._arguments | |||
antoniogamiz | aaaaaaaaaaaahhhhhhhhh riiiiiiiiight | 08:49 | |
thanks a lot! I hadnt notice!! | |||
robertle_ | btw, what is the more "canonical" (if such a thing exists) way to use a named arg? by => "d" or :by("b")? | 08:50 | |
and are there any good reasons to use one over the other? | |||
antoniogamiz | mmmm I am not sure, sometimes I like => syntax because is quite clear | ||
you can even do this :234value | 08:51 | ||
that's the same as value => 234 | |||
08:51
nepugia joined
|
|||
robertle_ | oh wow, didn't know! | 08:52 | |
not sure I like it, looks 'cute' but confusing for anything but numbers as the value | |||
antoniogamiz | yep, I prefer => most of the time | 08:53 | |
sena_kun | it depends on the situation, => is usually enough, but sometimes :foo() looks nicer | ||
for example, in Cro we have: | 08:54 | ||
>parsers => @!body-parsers, next => $request.body-parser-selector | |||
but | |||
>emit Cro::HTTP::Response.new(:500status, :$request); | |||
antoniogamiz | sena_kun: uoh, good use for that last case :oo | 08:57 | |
robertle_ | hm, it kinda breaks the "symbolic" part of a name, right? If I change a variable name in one place it might have a consequence somewhere else. but I guess Perl 6 isn't that strictly symbolic anyway... | 09:01 | |
sena_kun | well, renaming may cause breakage like this, but it is true for every language with named parameters | 09:03 | |
I am not sure the syntax of named argument changes anything in this regard | |||
sena_kun .oO ( we need to support that smart refactorings in Comma, but firstly need to refactor a couple of things ) | 09:04 | ||
09:04
wadda joined
09:06
wadda left
|
|||
robertle_ | well, I didn't mean changing the name in the signature, that clearly breaks things. I meant at the call site: | 09:08 | |
the emit Cro::HTTP::Response.new(:500status, :$request); case for example. if I refactor my calling code and rename $request to $location-backend-request because I now have multiple requests flying around and get confused about them, then that breaks things | 09:10 | ||
and renaming a lexical everywhere in that lexical scope seems like something that should be safe... | |||
sena_kun | yes, in this code it goes from `:$request` to `request($location-backend-request)` | 09:11 | |
Geth | ¦ doc: antoniogamiz self-assigned Spin off Perl6::Documentable github.com/perl6/doc/issues/1937 | ||
sena_kun | I won't say some poor excuses like "I never encountered this issue", but yes, you are right in this regard. I know other places like this, but I guess this is where waterbed of complexity goes in. | 09:12 | |
09:16
Sgeo__ left
|
|||
robertle_ | yeah, and that "lexical purity" of course does not sit 100% in the perl world where it's more like a spoken language. so if you rename $sugar to $rat-poison, it perhaps ought to change something somewhere :) | 09:16 | |
09:17
Sgeo__ joined
|
|||
sena_kun | well, at the very least, I think, in future we can warn/mark as error it in Comma | 09:17 | |
so it becomes just yet another silly thing with a quickfix like "Expand the pair literal". :) | 09:18 | ||
nepugia | hmmm.... there is a jvm to llvm frontend, and rakudo can target jvm right, so can i make native executables with this i wonder :3 | 09:19 | |
sena_kun | you always can try. :) | 09:24 | |
nepugia | I might just do that later :) | ||
09:29
nepugia left
09:41
wadda joined
|
|||
wadda | hi | 09:41 | |
antoniogamiz | wadda: o/ | ||
wadda | i like to get started with perl6 | 09:45 | |
i have about a year of programming experience | 09:46 | ||
kawaii | wadda: do you have the Rakudo compiler installed already? | ||
wadda | but zero perl experience | ||
yes | |||
installed | |||
started with this perl6intro.com/ | 09:47 | ||
now | |||
kawaii | wadda: youtu.be/l0zPwhgWTgM this is also a very good video to speed-walk you through the basics | 09:48 | |
Kaiepi | what other languages do you know wadda? there may be a nutshell page in the docs for learning it coming from another language you're used to | 09:49 | |
wadda | not an expert in any languages | 09:50 | |
but know a bit of c,go, python | |||
antoniogamiz | that's enough :D | 09:55 | |
my recommendation is to start a project | |||
a mini command line game or something like that | 09:56 | ||
Geth | ecosystem: antoniogamiz++ created pull request #461: Update META.list |
09:58 | |
wadda | ok thank you guys | 09:59 | |
10:11
wadda left,
ravenousmoose_ left
10:12
ravenousmoose_ joined
10:16
ravenousmoose_ left
10:17
antoniogamiz left
10:18
Black_Ribbon left
|
|||
Geth | ecosystem: 513786cc34 | Antonio++ (committed using GitHub Web editor) | META.list Update META.list |
10:22 | |
ecosystem: a2cba912a2 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list Merge pull request #461 from antoniogamiz/antonio-new-module Update META.list Thanks! |
|||
10:23
wadda joined,
wadda left
10:28
domidumont left
|
|||
lizmat | weekly: 173.230.155.209/index.php/2019/06/2...in-perl-6/ | 10:36 | |
notable6 | lizmat, Noted! | ||
10:40
ponbiki joined
|
|||
lizmat | weekly: dev.to/antoniogamiz/first-work-rep...-gsoc-3gk4 | 10:44 | |
notable6 | lizmat, Noted! | ||
10:44
MikeyG joined
10:45
phogg joined,
phogg left,
phogg joined
10:46
domidumont joined
10:48
domidumont left
10:53
zakharyas joined
11:07
dolmen left
11:21
jaldhar left
11:26
ravenousmoose_ joined
11:27
jaldhar joined
11:36
mowcat joined
11:39
ravenousmoose joined
11:40
ravenousmoose_ left
11:46
kensanata left
|
|||
Kaiepi | so i'm implementing support for installing enums in MY packages in my Type::EnumHOW module but it's kind of complicated | 12:03 | |
is there a simple way to detect CALLER::MY, OUTER::MY, etc.? | |||
and differentiate it from the caller's MY | 12:04 | ||
i think i might just throw an exception if people attempt to use those because i'm not sure how i'd find the right lexpad for contexts other than the caller's | 12:07 | ||
12:07
domidumont joined
12:08
mahafyi joined
12:16
dolmen joined
12:29
curan left
12:30
lucasb joined
12:32
mowcat left
12:34
ravenousmoose left
12:35
ravenousmoose joined
|
|||
Xliff | Is there a way to get the old style version numbers from rakudo? | 12:36 | |
12:44
mowcat joined
12:51
dolmen_ joined
12:53
dolmen left
|
|||
moritz | Xliff: perl6 --version will give you the YYYY.MM version (if it's a release build) | 12:54 | |
ugexe | Xliff: are you using rakudobrew? are you sure its building the rakudo you think it is? | 12:57 | |
12:57
pamplemousse joined
13:02
natrys joined
13:03
domidumont1 joined
13:04
pamplemousse left
|
|||
ugexe | rakudobrew moar-blead builds moar-bleed not moar-blead hmmm | 13:05 | |
13:05
pamplemousse joined
13:06
antoniogamiz joined,
domidumont left
|
|||
Kaiepi | m: say MY.WHO.WHICH | 13:09 | |
camelia | PseudoStash|5F0A395AAEACC95DBA9B662F5702B2C13414954D | ||
Kaiepi | m: { say MY.WHO.WHICH } | ||
camelia | Cannot call method 'WHICH' on a null object in block <unit> at <tmp> line 1 |
||
Kaiepi | uh... | ||
m: { say MY.WHO } | |||
camelia | PseudoStash.new(($*DISPATCHER => (Mu), $_ => (Any))) | ||
Kaiepi | ??? | ||
evalable6 | Stub code executed in block <unit> at /tmp/g7SpOJKvfm line 1 |
||
Kaiepi | bisectable6, help | 13:10 | |
bisectable6 | Kaiepi, Like this: bisectable6: old=2015.12 new=HEAD exit 1 if (^∞).grep({ last })[5] // 0 == 4 # See wiki for more examples: github.com/perl6/whateverable/wiki/Bisectable | ||
lizmat | m: { my $a; say MY.WHO } | ||
camelia | PseudoStash.new(($*DISPATCHER => (Mu), $_ => (Any), $a => (Any))) | ||
lizmat | m: { my $a; say MY.WHO.WHICH } | ||
camelia | Cannot call method 'WHICH' on a null object in block <unit> at <tmp> line 1 |
||
lizmat | hmmm | ||
Kaiepi | bisectable6, { say MY.WHO.WHICH } | ||
bisectable6 | Kaiepi, Bisecting by exit code (old=2015.12 new=8652386). Old exit code: 0 | ||
lizmat | m: { my $a; say MY.WHO.^name } | ||
camelia | PseudoStash | ||
bisectable6 | Kaiepi, bisect log: gist.github.com/8f03cdec78d45bf8f7...a43f7c1f7a | ||
Kaiepi, (2018-12-28) github.com/rakudo/rakudo/commit/e5...4f63134fda | |||
13:12
ravenousmoose left
|
|||
lizmat | hmmm... that only added a return sig ? | 13:13 | |
multi method WHICH(PseudoStash:D --> ObjAt:D) { self.Mu::WHICH } | |||
Kaiepi | m: { say MY.WHO.Mu::WHICH } | 13:14 | |
camelia | PseudoStash|65630824 | ||
Kaiepi | m: { say MY.WHO.Mu::WHICH.WHAT } | ||
camelia | (ObjAt) | ||
Kaiepi | m: { say MY.WHO.Mu::WHICH.WHAT.defined } | ||
camelia | False | ||
Kaiepi | m: { say MY.WHO.Mu::WHICH.WHAT ~~ ObjAt:U } | ||
camelia | True | ||
Kaiepi | wonder if that's true of the other methods that call .Mu::WHICH | 13:15 | |
m: ('a' ~~ /a/).Mu::WHICH ~~ ObjAt:U | 13:16 | ||
camelia | ( no output ) | ||
Kaiepi | m: say ('a' ~~ /a/).Mu::WHICH ~~ ObjAt:U | ||
camelia | False | ||
lizmat | Kaiepi: please check and if so, file an issue :-)_ | ||
Kaiepi | odd | ||
lizmat | weekly: tenesianu.blogspot.com/2019/06/per...ollar.html | 13:17 | |
notable6 | lizmat, Noted! | ||
Kaiepi | m: { say MY.^name } | 13:18 | |
camelia | MY | ||
Kaiepi | this'll work in the meantime for what i'm doing | 13:19 | |
wait no it won't | |||
m: { say MY.WHO ~~ PseudoStash::U } | 13:20 | ||
camelia | Could not find symbol '&U' in block <unit> at <tmp> line 1 |
||
Kaiepi | m: { say MY.WHO ~~ PseudoStash:U } | ||
camelia | False | ||
Kaiepi | m: { say MY.WHO.Mu ~~ Mu:U } | ||
camelia | No such method 'Mu' for invocant of type 'PseudoStash' in block <unit> at <tmp> line 1 |
||
Kaiepi | wait i can't read | ||
Xliff | ugexe: I'm on the normal moar-master | 13:23 | |
So that defaults to the latest release version? | |||
patrickb | ugexe: I've renamed the option to `moar-bleed` as the other name was most likely a typo. It still understands `moar-blead` but forwards to `moar-bleed`. | 13:26 | |
ugexe: The problem with moar-bleed building a release version is fixed. | 13:27 | ||
Xliff | So I'd need to switch to moar-bleed to get the old style version numbering? | 13:30 | |
patrickb | Xliff: I think I don't understand the question. What's old-style, what's new-style? | 13:35 | |
Xliff | This is nqp version 2019.03-193-gb19216a8f <-- old style version | 13:37 | |
patrickb: This is Rakudo version 2019.03.1-477-ge35c61550 <- also old style version | 13:38 | ||
patrickb: This is Rakudo version 2019.03.1 <- Release (?) style version, which I am getting when I compile via WSL | 13:39 | ||
patrickb | Xliff: Yes, that's how a release looks. | ||
Xliff | OK. So the invocation has gone from... | ||
"rakudobrew build moar" | 13:40 | ||
to "rakudobrew build moar master" | |||
13:41
zakharyas left
|
|||
patrickb | Xliff: When using rakudobrew and not specifying a version it since lately builds the latest release not master anymore. | 13:42 | |
Xliff: So just as you said, to build master one now has to use "rakudobrew build moar master" | |||
Xliff | Right. That's a change of behavior. Just wanted to make sure that was the PROPER behavior | ||
Thanks for the confirmation! patrickb++ | 13:43 | ||
Kaiepi | ok, found a workaround for the PseudoStash.WHICH issue | 13:49 | |
m: { say MY.WHO.Mu::WHICH } | 13:50 | ||
camelia | PseudoStash|66381832 | ||
14:07
domidumont1 left,
antoniogamiz left
14:14
nadim_ left
14:17
antoniogamiz joined
|
|||
antoniogamiz | do you recommend the use of Promises for parallel work? | 14:18 | |
sena_kun | what do you mean with "parallel"? Promises are more related to async execution than to parallelism. | 14:22 | |
antoniogamiz | mmm I want to process a large number of files at the same time | 14:23 | |
sena_kun | you may be interested in reading jnthn.net/papers/2015-yapcasia-concurrency.pdf | ||
antoniogamiz | I read the part of the docs about this and it's says threads should not be used by the users | ||
I'm reading that right now :o! | |||
14:23
molaf joined
|
|||
sena_kun | I'd go with `race` blocks, but it depends. | 14:23 | |
antoniogamiz | mmmm | 14:24 | |
I will keep reading then! thanks sena | |||
El_Che | antoniogamiz: you need to do some testing, IO may make real parallellism slower than simple concurrency | ||
lizmat | and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2019/06/24/...-toolsets/ | ||
antoniogamiz | El_Che: mmmm. I will have that in mind! | 14:25 | |
14:26
nadim_ joined
|
|||
antoniogamiz | jnthn: good job with your paper about concurrency! | 14:27 | |
14:29
ravenousmoose joined
14:31
domidumont joined
14:35
meylor joined
14:36
meylor left
|
|||
antoniogamiz | Duration objects use atomic seconds? Is there a way to convert them to seconds by default? | 14:37 | |
timotimo | how do you mean? | 14:38 | |
cpan-p6 | New module released to CPAN! Net::BGP (0.1.2) by 03JMASLAK | 14:39 | |
New module released to CPAN! TCP::LowLevel (0.0.2) by 03JMASLAK | |||
antoniogamiz | I mean, in the docs it says Duration format is atomic seconds | ||
timotimo | i have no idea what that's supposed to mean, lol | 14:40 | |
antoniogamiz | google says this www.britannica.com/science/spectro...#ref620571 | ||
now I see it it looks like normal seconds, I don't know why in the docs says atomic seconds | 14:41 | ||
timotimo | me neither | ||
lizmat | this is opposed to epoch seconds, I guess | 14:42 | |
which sometimes take 2 seconds when there is a leap-second | 14:43 | ||
El_Che | good point | ||
timotimo | that should definitely be explained on that page, then :) :) | 14:44 | |
14:46
meylor joined,
Sgeo__ left
|
|||
El_Che | maybe absolute would be a better term | 14:52 | |
with the explanation about leap seconds | 14:53 | ||
timotimo | i think the normalw ay to say that is monotonic? | ||
El_Che | 1 sound? | 14:54 | |
14:54
Ralyer joined
|
|||
timotimo | no you're thinking of monophonic | 14:54 | |
14:54
domidumont left
|
|||
El_Che | tonos? | 14:55 | |
tension, tone | |||
teinein | |||
to stretch | |||
14:55
mowcat left
|
|||
El_Che | stretch once second :) | 14:56 | |
14:57
ufobat joined
14:58
aindilis left
14:59
nadim_ left
|
|||
antoniogamiz | sena_kun: somefunction(@array).race(batch => 4); | 15:01 | |
that's correct? | |||
sena_kun | m: my @a = 1,2,3,4,5; @a.race(batch => 4).map({sleep rand; $_.say}) | 15:03 | |
camelia | 1 5 2 3 4 |
||
sena_kun | m: my @a = 1,2,3,4,5; @a.race(batch => 4).map({sleep rand; $_.say}) | ||
camelia | 1 2 5 3 4 |
||
sena_kun | something like this, maybe | ||
antoniogamiz | ah ok, thanks :) | ||
sena_kun | so you want @array.race(batch).map(somefunction), well, depends on signature, of course | ||
antoniogamiz | aahh right, I have to fix a signature | 15:04 | |
15:05
aindilis joined
|
|||
antoniogamiz | ups, it looks like my code cannot be used concurrently | 15:10 | |
it gives me this error: Decoder may not be used concurrently | |||
sena_kun | antoniogamiz, can you show us a bit more of your code? | 15:11 | |
antoniogamiz | gist.github.com/antoniogamiz/c09b1...cbf6f1eb4d | 15:12 | |
I have set batch to 1 to see if that fixed the problem, but nop | |||
15:13
robertle_ left
|
|||
sena_kun | >No candidates found matching identity: Perl6::Utils | 15:15 | |
antoniogamiz | O.o | 15:16 | |
15:16
aindilis left
|
|||
antoniogamiz | that error does not appear in my terminal :o | 15:16 | |
sena_kun | well, I suspect you have Perl6::Utils module installed and I am not... | ||
antoniogamiz | ah, yep, he... | 15:17 | |
I will add the function needed one moment | |||
updated! though you need Pod::Load | |||
Pod::Load it's in the ecosystem | 15:18 | ||
15:18
patrickb left
|
|||
MasterDuke | antoniogamiz: zoffix has some module in the ecosystem for doing parallel work | 15:20 | |
modules.perl6.org/dist/Proc::Q:git...fix%20Znet is what i was thinking of | 15:21 | ||
antoniogamiz | uoh thanks MasterDuke! | 15:22 | |
though I still would like to know why my code is not working | 15:23 | ||
it's a weird error mm | |||
15:26
meylor left
|
|||
antoniogamiz | mm it has to be something related to Pod::Load because it works if I dont use it xd | 15:27 | |
15:28
meylor joined
|
|||
sena_kun | Pod::Load uses a Pod decoder which isn't mean to be used in multi-threaded environment, so it complains... | 15:28 | |
antoniogamiz | agh | 15:29 | |
sena_kun | I have a feeling it is worth a rakudo ticket. | ||
MasterDuke | antoniogamiz: maybe you could wrap where you use Pod::Load in a `protect`? | ||
antoniogamiz | mmm I dont know what a protect is, let me check it | ||
sena_kun | I was able to make it parallel with gist.github.com/Altai-man/bb7a5773...bbfc61af45 but it is ugly and the decoder exception still occurs sometimes, so it is my luck and not a real solution | 15:30 | |
antoniogamiz | MasterDuke: I'm seeing that protects are used with Async, but I'm using .race | ||
MasterDuke | docs.perl6.org/routine/protect | ||
well, you can `protect` anything (though with varying usefullness) | 15:31 | ||
sena_kun | github.com/MoarVM/MoarVM/blob/1049...der.c#L114 | 15:32 | |
I think you can ask e.g. samcv about this, and, well, #moarvm channel in general | |||
antoniogamiz | I will go there and try protect too! thanks a lot for your time, sena and masterduke! | 15:33 | |
15:36
cpan-p6 left,
cpan-p6 joined,
cpan-p6 left,
cpan-p6 joined
|
|||
Kaiepi | how can i check if a package is identical to CALLER::MY when the value of .WHO.WHICH on either of them changes each time it's called? | 15:37 | |
this is during compilation btw | |||
m: class Foo { method foo($p) { say CALLER::MY.WHO.Mu::WHICH === $p.WHO.Mu::WHICH } }; BEGIN Foo.foo MY | 15:38 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> An exception occurred while evaluating a BEGIN at <tmp>:1 Exception details: 5===SORRY!5=== Error while compiling Too few positionals passed; expected 2 arguments but got 1 at : |
||
Kaiepi | m: class Foo { method foo($p) { say CALLER::MY.WHO.Mu::WHICH === $p.WHO.Mu::WHICH } }; BEGIN Foo.foo: MY | ||
camelia | False | ||
Kaiepi | m: class Foo { method foo($p) { dd CALLER::MY.WHO.Mu::WHICH; dd CALLER::MY.WHO.Mu::WHICH; dd $p.WHO.Mu::WHICH; dd $p.WHO.Mu::WHICH; } }; BEGIN Foo.foo: MY | 15:39 | |
camelia | ObjAt.new("PseudoStash|31966296") ObjAt.new("PseudoStash|60649000") ObjAt.new("PseudoStash|60649056") ObjAt.new("PseudoStash|60649056") |
15:40 | |
Kaiepi | ok it only changes each time it's called on CALLER::My | ||
*MY | |||
antoniogamiz | MasterDuke: your solution works but it takes the same time :/ | 15:41 | |
MasterDuke | antoniogamiz: yeah, all the real work is being done in `load()`, but the `protect` is serializing it so the parallelization won't help much | 15:43 | |
15:46
mahafyi left,
pamplemousse left,
pamplemousse joined
15:50
nepugia joined
|
|||
Kaiepi | the frustrating thing is using === to compare CALLER::MY to the package passed works, but only when it doesn't happen to trigger the bug in .WHICH i just found | 15:51 | |
15:57
Ralyer left
15:58
meylor left
16:06
mowcat joined
16:09
zakharyas joined
|
|||
antoniogamiz | notable6: dev.to/antoniogamiz/first-work-rep...-gsoc-3gk4 | 16:13 | |
notable6 | antoniogamiz, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Notable | ||
antoniogamiz | notable6: weekly dev.to/antoniogamiz/first-work-rep...-gsoc-3gk4 | ||
notable6 | antoniogamiz, Noted! | ||
antoniogamiz | :D | ||
ugexe | .tell patrickb blead is not a typo. see dev.perl.org/perl5/source.html for instance | 16:14 | |
yoleaux | ugexe: I'll pass your message to patrickb. | ||
lizmat | antoniogamiz: it *is* already in this week's P6W :-) | 16:15 | |
antoniogamiz | oh I did not know! | ||
lizmat | p6weekly.wordpress.com/2019/06/24/...-toolsets/ :-) | 16:16 | |
16:17
vrurg left
16:30
dakkar left
16:40
antoniogamiz left
17:01
reach_satori joined
17:18
pamplemousse left
17:19
pamplemousse joined
17:22
empee0 joined
17:33
dolmen_ left
17:45
empee0 left
17:46
empee0 joined
17:56
pamplemousse left
18:03
nadim_ joined
18:08
guifa joined
18:21
Kaiepi left
18:22
Kaiepi joined,
eponym joined
18:23
eponym left
|
|||
AlexDaniel | .tell patrickb it wasn't really a typo, it was meant to be that way | 18:30 | |
yoleaux | AlexDaniel: I'll pass your message to patrickb. | ||
18:33
sauvin left
|
|||
tobs | lizmat: the P6W entries in pl6anet.org/atom.xml deliver base64-encoded data in their `<content type="html">`s since last week. Do you know why? | 18:44 | |
18:48
empee0 left,
empee0 joined
|
|||
tobs | my feed reader displays the same base64 directly from the weekly feed, although it's proper CDATA'd html when I wget it right now... | 18:50 | |
18:51
zakharyas left,
molaf left
|
|||
Xliff | How can I create a typed container at runtime? | 18:56 | |
m: my $t = Str; my $t $a = | |||
camelia | 5===SORRY!5=== Two terms in a row at <tmp>:1 ------> 3my $t = Str; my $t7⏏5 $a = expecting any of: constraint infix infix stopper postfix statement end statement modifie… |
||
Xliff | m: my $t = Str; my $t $a = 'Bleah'; | ||
camelia | 5===SORRY!5=== Two terms in a row at <tmp>:1 ------> 3my $t = Str; my $t7⏏5 $a = 'Bleah'; expecting any of: constraint infix infix stopper postfix statement end statemen… |
||
Xliff | ^ Doesn't work, so I assume there's another mechanism? | 18:57 | |
timotimo | has to be a constant | ||
Xliff | :( | ||
Well shit. | |||
timotimo | maybe a type capture in a sub argument list can work? | 18:58 | |
m: sub do-the-thing(::T $a) { my T $b = $a }; do-the-thing("foo"); do-the-thing(1) | 18:59 | ||
camelia | ( no output ) | ||
Xliff | m: sub do-the-thing(::T $a) { my T $b = $a say $b; say $b.^name; }; do-the-thing("foo"); do-the-thing(1) | 19:00 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> 3sub do-the-thing(::T $a) { my T $b = $a7⏏5 say $b; say $b.^name; }; do-the-thing(" expecting any of: infix infix stopper … |
||
Xliff | m: sub do-the-thing(::T $a) { my T $b = $a; say $b; say $b.^name; }; do-the-thing("foo"); do-the-thing(1) | ||
camelia | foo Str 1 Int |
||
Xliff | timotimo++ | ||
timotimo | m: my \blorp = Str; my blorp $b = "hi"; | 19:01 | |
camelia | ===SORRY!=== No compile-time value for blorp |
||
timotimo | ^- could probably be made less LTA | ||
19:02
antoniogamiz joined
|
|||
Kaiepi | the third perl weekly challenge is dead simple to do fpaste.scsys.co.uk/585130 | 19:10 | |
timotimo | antoniogamiz: hey, you asked about the decoder single user mode thing | ||
antoniogamiz: you'll just™ have to make one instance per thread (or task) of whatever is holding on to the decoder object; worst case, the module you're using has to allow you to supply your own decoder instances | 19:11 | ||
or do we actually allocate one decoder for every instance of wanting to decode something anyway ... | |||
antoniogamiz | timotimo: mmmmmm I will try it right now! | 19:12 | |
timotimo | i'd need more info to find out what exactly is going wrong (perhaps even with --ll-exception) | ||
antoniogamiz | I'm using Pod::Load, you can check it out here => github.com/JJ/p6-pod-load | 19:13 | |
and this is the code gist.github.com/antoniogamiz/c09b1...cbf6f1eb4d | |||
timotimo | hm. is it the .slurp in the last multi sub load that does it? | 19:14 | |
antoniogamiz | you need to have the doc folder in perl6/doc repository | ||
timotimo | i mean, it shouldn't be, i don't think | ||
antoniogamiz | timotimo: ?? | ||
I have used this @files.race(batch => 8).map({ use Pod::Load; load($_); }); | 19:15 | ||
but it looks like it does not create another instance | |||
timotimo | you'll have to try to get a stack trace | 19:17 | |
antoniogamiz | sena_kun told me that the error was defined here => github.com/MoarVM/MoarVM/blob/1049...der.c#L114 | 19:18 | |
I still have to learn how to make a stack trace in perl6 xd | |||
suggestions? | |||
lizmat | tobs: pl6anet.org is out of my control, so I have no idea what's going on there | 19:23 | |
tobs: Steve Mynott is in control of that server, afaik | |||
19:24
noisegul_ joined
|
|||
timotimo | m: die "oh no"; CATCH { .say } | 19:26 | |
19:26
noisegul left
|
|||
camelia | oh no in block <unit> at <tmp> line 1 oh no in block <unit> at <tmp> line 1 |
19:26 | |
timotimo | you get a stack trace like that | ||
antoniogamiz | aah that stack trace haha | ||
I liked the idea of multiple instances of the decoder | 19:27 | ||
but Pod::Load is using EVAL to parse the pod | 19:28 | ||
timotimo | BBLAFK | ||
the question is, is the decoding error happening before EVAL happens | |||
antoniogamiz | ah I have to check that | 19:29 | |
19:33
Cabanossi left
19:37
pecastro joined
|
|||
antoniogamiz | timotimo: it looks like the error is thrown after some iterations | 19:38 | |
sometimes it processes 43 pods before crashing, others 268 ans so on | 19:39 | ||
19:43
Cabanossi joined
19:48
noisegul_ is now known as noisegul
20:01
sena_kun left,
sena_kun joined
20:07
antoniogamiz left
20:51
Cabanossi left
20:55
Cabanossi joined
21:08
empee0 left
21:14
dolmen_ joined
21:17
Exodist joined
21:22
Black_Ribbon joined
21:24
dolmen_ left
|
|||
nepugia | hmm, compiling to a .jar file does not seem to work :/, but the error is reported already | 21:26 | |
lizmat | weekly: donaldh.wtf/2019/06/postal-words/ | 21:30 | |
notable6 | lizmat, Noted! | ||
21:46
dolmen_ joined
|
|||
guifa wonders if there’s a reason junctions are limited to all, any, some, none | 21:54 | ||
err all any none one | 21:55 | ||
Looking at rakudo core it shouldn’t be too hard to make junctions running on at least / no more than / exactly X (elements or percent) | 21:56 | ||
21:58
sena_kun left
22:01
nadim_ left
22:04
telex left
22:05
telex joined
22:15
empee0 joined,
imhtrg joined
22:16
imhtrg is now known as rialmi
22:17
dolmen_ left
22:22
dolmen_ joined
22:40
natrys left
22:42
rindolf left
22:45
Sgeo joined
22:52
rialmi left
22:57
jaldhar left
|
|||
kawaii | Is there any documentation for compiling Perl 6 scrips against the JVM backend into portable JAR files? | 23:02 | |
23:02
dolmen_ left
|
|||
nepugia | I didn't find any, but this is what i did: /usr/home/users/nep/.local/share/perl6/bin/perl6-j --target=jar --output=main.jar main.p6 | 23:05 | |
java couldn't execute that jar file though :/ | |||
Geth | doc: 7688624274 | (Ben Davies)++ | doc/Language/unicode_entry.pod6 Fix typos in the terminals section of doc/Language/unicode_entry.pod6 |
23:06 | |
synopsebot_ | Link: doc.perl6.org/language/unicode_entry | ||
kawaii | nepugia: thanks for the tip, I will check it out and see what I can do :) | 23:08 | |
timotimo | yeah, i think you can't run jar files that rakudo spits out directly | 23:10 | |
similar to .moarvm files you create with rakudo on moar | |||
nepugia | I hope that the .class file inside the .jar is usefull to me | ||
kawaii | timotimo: is that something we're working towards? | 23:11 | |
timotimo | though we have a GSoC project going that would make linked-together elf files out of moarvm byetcode | ||
kawaii | IIRC there was another project to make perl 6 binaries that were portable | ||
timotimo: ah yes | |||
that sounds familiar | |||
got any documentation on it? | |||
23:11
dolmen joined
|
|||
timotimo | there's a blog with progress reports | 23:11 | |
nepugia is cloning llvm to try to use the java frontend with the .class files to creat a compiled hello world | 23:12 | ||
timotimo | yakshavingcream.blogspot.com/2019/06/ | ||
kawaii | thank you! | ||
timotimo | the .class files definitely have some "java code" in them, i.e. rakudo-on-jvm spits out java bytecode | 23:13 | |
kawaii | I'm curious what the point of these jar files are then if they can't be executed _by Java_? | 23:16 | |
Apparently the performance is poor _according to Google_ | |||
nepugia | how do you measure the performance of what you cannot execute? | ||
timotimo | yeah, rakudo-on-jvm isn't very good, or do you mean llvm's java frontend? | ||
kawaii | nepugia: exactly, not sure how these people can claim it's 'not fast' when no one I know actually got java to run one of these jar files | 23:17 | |
timotimo: any documentation for getting the mbc backend up and running? :) | 23:18 | ||
timotimo | why do you need to run the jar files directly? | ||
kawaii | timotimo: I'm just curious about cross-platform within perl 6 :) | ||
timotimo | i mean .moarvm files are also cross-platform | 23:19 | |
nepugia | aslong as you can get moarvm onto the platform, i would assume that java has conquered more platforms yet | 23:20 | |
timotimo | and rakudo-jvm is also cross-platform, isn't it? | ||
probably | |||
kawaii | right but you _need_ Java or MoarVM installed on the target to make use of these | ||
timotimo | we depend on libuv, among other things | ||
kawaii | unlike a Go binary, which just runs anywhere | ||
timotimo | wait, you can build a go tool for linux and run it on a mac? | ||
kawaii | AFAIK | 23:21 | |
timotimo | i was about to say "and run it on windows" but windows is a linux nowadays anyway | ||
kawaii | Go and Rust are more or less entirely cross-platform native | ||
timotimo | how do they do it | ||
nepugia | that's not how ELF files work :) | ||
you can compile it for mac though i suppose | |||
timotimo: the wsl 2.0 will suprise you then, it beeing /literally/ linux... running under their hypervisor | 23:22 | ||
timotimo | there's FatELF, which i don't think took off at all, but that's theoretically compatible with both a 32bit and a 64bit linux with just a single file | ||
kawaii | I don't use either of those languages, I did a few hello world things in Rust and the compiler spat out executables for both Linux and Windows (an actual exe!) | ||
timotimo | it doesn't surprise me, i know about it :) | ||
oh | |||
i thought you were claiming the same file just runs on both windows and linux and mac or something | |||
kawaii | I _assume_ the Linux one would probably work on a Mac | 23:23 | |
nepugia | kawaii: how so? | ||
timotimo | i mean i guess if you build the .exe and the linux machine has the wine binfmt thing installed it'll also just work by ./-ing it | ||
nepugia | does macos have a linuxulator too? | ||
timotimo | i'm more than just a little annoyed there's no haiku port of libuv :( | 23:25 | |
nepugia | no perl6 on haiku? :( | ||
timotimo | but i haven't used haiku for more than half an hour in total so far, so it's not that bad | ||
i'm not aware of anybody trying moarvm on reactos, that could be fun | 23:26 | ||
23:41
dolmen left
23:42
dolmen joined
23:43
Cabanossi left
23:46
pecastro left
23:47
pecastro joined
23:50
Cabanossi joined
23:54
pecastro left
|