»ö« 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. |
|||
lucasb | REMINDER to *Advent of Code* players: Join the Perl6ers leaderboard! The code is 169430-b1c331b2 | 00:01 | |
Next task opens in 5 hours. I'll be asleep by then. Good luck! :) | 00:02 | ||
mornfall | marcoonroad: there's a profiler (--profile), so that could be a good start (it's not exactly cheap though) | ||
Kaiepi | travis-ci.org/Kaiepi/p6-Net-Telnet.../450655537 | 00:03 | |
why would the connection be closed before anything closes it? there aren't any race conditions in my code afaik | 00:04 | ||
i've only ever seen this happen on mac | 00:06 | ||
mornfall | it's the '18 not ok' what you mean? | ||
Kaiepi | yeah | 00:07 | |
buggable | New CPAN upload: Terminal-Spinners-1.3.0.tar.gz by RYNIX modules.perl6.org/dist/Terminal::Sp...cpan:RYNIX | ||
Kaiepi | waaait a minute | 00:08 | |
never mind there is a race condition lol | |||
good thing it's just in the test file | 00:10 | ||
mornfall | yeah, the $client.close can happen any time | 00:11 | |
(with respect to the checks) | |||
async is hard, even though the language support is pretty okay | 00:12 | ||
also that sleep :p | 00:14 | ||
Kaiepi | yeah, that sometimes fails on mac for whatever reason | 00:15 | |
mornfall | (makes you wonder whether 'closed' shouldn't rather be a supply...) | ||
(or perhaps a promise, that'd make more sense?) | 00:17 | ||
Kaiepi | i'll try that out once i fix the other issue with the test | ||
mornfall | which other issue? | 00:18 | |
Kaiepi | the race condition with .close | ||
mornfall | well, making .closed a promise is a fix for that? | 00:19 | |
SmokeMachine | marcoonroad: I don’t know about test coverage... but you told about fuzzy test... there is it: github.com/FCO/Test-Fuzz | ||
mornfall | the race is going to be really hard to fix otherwise? | ||
you'll have to make an auxilliary promise for the test, i guess | |||
(so instead of $client.close, you say fulfill a $can-close, and await that and then close?) | 00:20 | ||
00:21
MasterDuke joined,
p6bannerbot sets mode: +v MasterDuke,
MasterDuke left,
MasterDuke joined,
herbert.freenode.net sets mode: +v MasterDuke,
p6bannerbot sets mode: +v MasterDuke
|
|||
Kaiepi | ohh | 00:22 | |
MasterDuke | coverable6: HEAD say 123.is-prime | ||
coverable6 | MasterDuke, ¦HEAD(38bc682): «False» | ||
00:22
atweiden-air joined
00:23
p6bannerbot sets mode: +v atweiden-air
|
|||
Kaiepi | yeah i'm used to node, where i'd be able to get away with making .closed just a straight Boolean without any issues unless libuv interferes | 00:24 | |
MasterDuke | marcoonroad: hm, not sure what's up with the bot (it should link to a gist of the coverage log), but there are the MVM_COVERAGE_LOG and MVM_COVERAGE_CONTROL env vars you could play with | ||
mornfall | i know nothing about node... is it single-threaded with explicit coroutines? | ||
00:24
w_richard_w left
|
|||
Kaiepi | it's single threaded apart from io stuff, which is handled under the hood | 00:25 | |
the async stuff is handled in one thread on the event loop | |||
mornfall | io stuff is done in the typical async fashion, no? | ||
like python asyncio | |||
that's the whole point of libuv, anyway | |||
IO event loops | |||
and lots of trampolining around :) | 00:26 | ||
Kaiepi | i've never used asyncio in python | ||
you write the io stuff like you would anything else in node, but the async stuff is handled in the background | |||
00:26
w_richard_w joined
|
|||
mornfall | asyncio runs in a single thread too, and your code can only be interrupted at an 'await' | 00:26 | |
Kaiepi | ohh | ||
in node it's done through callbacks instead of promises | 00:27 | ||
mornfall | eww | ||
Kaiepi | yeah it's really easy to write spaghetti in node | ||
00:27
p6bannerbot sets mode: +v w_richard_w
|
|||
mornfall | the so-called 'native coroutines' in python (what you are supposed to use with asyncio) are kinda crippled, but they are a hell lot better than a callback hell | 00:29 | |
(they only thing they can do is 'await' another native coroutine... the only way to actually yield is to call one of the asyncio/event-loop provided methods, which jump down to the event loop trampoline and other 'threads' get to run) | 00:31 | ||
(the good thing about this is that you don't run into race conditions nearly as easily... the bad thing is that you can only use one core to run the program) | |||
marcoonroad | nodejs runs blocking io (io unable to be async) in another thread, but it is in far rare cases, i dunno. it means that node is not single threaded, but double-threaded depending on the sort of OS interaction which you perform | 00:33 | |
i work with nodejs on my daily job, and sometimes when dependencies break due updates, it makes me not much happy in such times | 00:35 | ||
mornfall | i wouldn't expect any modern system to mandate blocking io on anything... perhaps calls into C modules would be handled that way though? | ||
marcoonroad | the ideal place to call c modules is in another process. this is how they perform unit tests on c, and this is erlang/elixir work with c bindings while maintaining fault-tolerance. you know, segmentation faul$62272##@*? | 00:36 | |
thanks SmokeMachine and MasterDuke o/ | 00:38 | ||
SmokeMachine | I think test coverage could be done with `trace` | 00:41 | |
00:42
lichtkind left
|
|||
SmokeMachine | There are no documentation for trace?! Os it called trace? | 00:43 | |
00:43
sena_kun left
|
|||
MasterDuke | samcv++ i think has automated some coverage reports for the nqp tests | 00:43 | |
SmokeMachine | *is | ||
m: use trace; my $a = 1; $a++; say $a | 00:44 | ||
camelia | 2 (<tmp> line 1) my $a = 1 2 3 (<tmp> line 1) $a++ 4 (<tmp> line 1) say $a |
||
00:49
qiqi joined,
p6bannerbot sets mode: +v qiqi
00:55
atweiden-air left
|
|||
MasterDuke | SmokeMachine: some suggested edits here gist.github.com/MasterDuke17/919f3...85bbe4bb00 | 00:59 | |
01:03
qiqi left
01:15
sno left
|
|||
SmokeMachine | MasterDuke: Thanks! Fixing it! | 01:23 | |
01:25
sno joined,
p6bannerbot sets mode: +v sno
01:30
sno left
01:31
sno joined
01:32
p6bannerbot sets mode: +v sno
01:33
cpage_ joined
01:34
coet left,
p6bannerbot sets mode: +v cpage_
01:35
cpage left,
cpage_ is now known as cpage
01:37
leont left
01:56
kurahaupo_ joined
01:57
p6bannerbot sets mode: +v kurahaupo_
01:59
kurahaupo left
02:01
MasterDuke left,
kurahaupo_ left
02:03
isantop joined,
p6bannerbot sets mode: +v isantop
02:04
isantop left
02:10
qiqi joined
02:11
p6bannerbot sets mode: +v qiqi
|
|||
SmokeMachine | perl6advent.wordpress.com/?p=7148&...eview=true | 02:12 | |
.tell MasterDuke thank you very much! | |||
yoleaux | SmokeMachine: I'll pass your message to MasterDuke. | ||
02:23
tmtvl left
|
|||
timotimo | marcoonroad: if you're still interested in coverage, you can check the env var for moarvm MVM_COVERAGE_LOG | 02:25 | |
moar --help for the win | 02:26 | ||
marcoonroad | it would fit better as moar --sos :) | 02:28 | |
timotimo | it's often super annoying to get a commandline argument to moar and at the same time run a perl6 script | 02:32 | |
02:42
molaf left
02:55
molaf joined,
p6bannerbot sets mode: +v molaf
|
|||
SmokeMachine | pmurias and the guy from WebPerl are doing a wonderful job!!! Take a look what is possible to do now with perl6 and WebPerl: fco.github.io/MemoizedDOM/todo6.html | 03:01 | |
03:05
kurahaupo joined
03:06
p6bannerbot sets mode: +v kurahaupo
03:10
Khisanth left
|
|||
marcoonroad | i have 13 simple tests and such moar coverage log append file contains 377mb (i'm erasing before any coverage to avoid appending over existing data). is there any way to visualize such data, e.g, by charts? | 03:11 | |
03:13
mtj_ joined
|
|||
marcoonroad | after piping through uniq cmd, now it contains 128mb | 03:14 | |
03:14
p6bannerbot sets mode: +v mtj_
|
|||
SmokeMachine | .tell jmerelo very good post! Congratulations? | 03:14 | |
yoleaux | SmokeMachine: I'll pass your message to jmerelo. | ||
marcoonroad | hooray. after running grep cmd to filter my project directory, it only contains 228kb! | 03:17 | |
03:20
kurahaupo left
03:22
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
03:23
qiqi left,
Khisanth joined
03:24
p6bannerbot sets mode: +v Khisanth
03:26
marcoonroad left,
sacomo left
03:28
sacomo joined,
p6bannerbot sets mode: +v sacomo
03:33
kurahaupo left
03:37
sacomo left
|
|||
Geth | doc: 575733bc80 | (Joelle Maslak)++ | doc/Type/DateTime.pod6 Correct DateTime.posix argument type |
03:53 | |
synopsebot_ | Link: doc.perl6.org/type/DateTime | ||
03:55
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
03:56
kurahaupo_ joined
03:57
p6bannerbot sets mode: +v kurahaupo_
|
|||
Geth | doc: 709fb3946b | (Joelle Maslak)++ | doc/Type/DateTime.pod6 Document DateTime.posix $ignore-timezone argument |
03:57 | |
synopsebot_ | Link: doc.perl6.org/type/DateTime | ||
03:59
kurahaupo left
04:00
kurahaupo_ left
|
|||
Summertime | [1,2,3].combinations(2).map({two-arg-function(|$_)}); | 04:01 | |
is there a cleaner way of doing this? | |||
timotimo | yes | 04:03 | |
oh | 04:04 | ||
is it acceptable to redefine two-arg-function %) | |||
04:04
kurahaupo_ joined,
w_richard_w left
04:05
p6bannerbot sets mode: +v kurahaupo_
|
|||
Summertime | I'm gonna say noish | 04:05 | |
timotimo | i don't think i have a good idea for something better than what you have :o | ||
hm. | |||
04:05
sacomo joined
|
|||
timotimo | m: sub taf($a, $b) { say "$a and $b!" }; [1, 2, 3].combinations(2)>>.&taf | 04:05 | |
camelia | Too few positionals passed; expected 2 arguments but got 1 in sub taf at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
timotimo | nope. | ||
however | 04:06 | ||
m: sub taf($a, $b) { say "$a and $b!" }; [1, 2, 3].combinations(2).flat.map(&taf) | |||
camelia | 1 and 2! 1 and 3! 2 and 3! |
||
timotimo | that does work! | ||
04:06
p6bannerbot sets mode: +v sacomo,
kurahaupo joined
|
|||
Summertime | ah right, it pulls number of args at a time doesn't it | 04:06 | |
timotimo | that's the issue, yeah | ||
04:07
p6bannerbot sets mode: +v kurahaupo
|
|||
Summertime | I still wish I could just do something like, taf(|*) though, alas | 04:07 | |
timotimo | yeah, whatevercode doesn't autoclose across parameter lists | 04:08 | |
because otherwise you wouldn't be able to use it for much at all :D | |||
04:09
kurahaupo_ left,
kurahaupo left,
kurahaupo_ joined
04:10
p6bannerbot sets mode: +v kurahaupo_
|
|||
Summertime | >>.Slip.map(&taf), I was hoping the hyper.Slip issue would allow it to expand later in the call to taf, but didn't work, darn | 04:11 | |
04:11
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
04:13
kurahaupo_ left
04:14
kurahaupo_ joined
04:15
p6bannerbot sets mode: +v kurahaupo_,
kurahaupo left
04:16
hythm_ joined,
p6bannerbot sets mode: +v hythm_
04:21
Chocobozzz25 joined
04:22
p6bannerbot sets mode: +v Chocobozzz25
|
|||
hythm_ | Hi, I'm writing a package manager in perl 6, and I'm stuck in an issue for few weeks, it's package-dependencies data-structure issue. The details are in this question: stackoverflow.com/questions/535481...-traversal I would appreciate any suggestion that i can move forward and get passed the issue. Thank you | 04:24 | |
04:26
Chocobozzz25 left
04:42
avuserow joined
04:43
p6bannerbot sets mode: +v avuserow
04:46
hythm_ left
04:49
Cabanossi joined,
Cabanoss- left,
p6bannerbot sets mode: +v Cabanossi
05:02
holyghost joined
05:03
p6bannerbot sets mode: +v holyghost
|
|||
holyghost | hello | 05:03 | |
05:19
ryn1x left
05:39
kurahaupo joined
05:40
p6bannerbot sets mode: +v kurahaupo,
kurahaupo left
05:43
kurahaupo_ left
06:20
[particle]1 joined,
p6bannerbot sets mode: +v [particle]1
06:21
[particle] left
06:34
jmerelo joined
06:35
p6bannerbot sets mode: +v jmerelo
06:56
sno left
06:59
|oLa| joined,
|oLa| left
07:00
zopieux6 joined,
zopieux6 left
07:05
vike joined
07:06
p6bannerbot sets mode: +v vike
07:07
domidumont joined
07:08
AlexDani` joined,
p6bannerbot sets mode: +v domidumont
07:09
p6bannerbot sets mode: +v AlexDani`
07:12
AlexDaniel left
|
|||
Summertime | m: [1,2,3].keys[^5] | 07:31 | |
camelia | ( no output ) | ||
Summertime | m: [1,2,3] .keys[^5] | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in bracketed infix; couldn't find final ']' (corresponding starter was at line 1) at <tmp>:1 ------> 3[1,2,3] .keys[^7⏏055] |
||
Summertime | why is life so hard | 07:33 | |
07:36
jmerelo left
07:48
rindolf joined
07:49
p6bannerbot sets mode: +v rindolf
|
|||
Summertime | m: say bag $(1,2),$(1,2); | 07:50 | |
camelia | Bag((1 2), (1 2)) | ||
Summertime | what's the solution to having tupleish key values? | 07:51 | |
07:52
abraxxa joined,
p6bannerbot sets mode: +v abraxxa
07:55
robertle joined,
p6bannerbot sets mode: +v robertle
|
|||
lookatme_q | m: say bag :{ $(1,2), $(1,2) }; | 08:00 | |
camelia | Bag(-> ;; $_? is raw { #`(Block|76657376) ... }) | ||
lookatme_q | m: say bag(:{ $(1,2), $(1,2) }); | ||
camelia | Bag(-> ;; $_? is raw { #`(Block|70308968) ... }) | ||
08:00
graphene left
|
|||
lookatme_q | m: my $f = :{ $(1,2), $(1,2) }; say bag $f; | 08:00 | |
camelia | Bag(-> ;; $_? is raw { #`(Block|74067960) ... }) | ||
lookatme_q | m: my $f = :{ $(1,2) =? $(1,2) }; say bag $f; | 08:01 | |
camelia | Bag(-> ;; $_? is raw { #`(Block|55700024) ... }) | ||
lookatme_q | m: my $f = :{ $(1,2) => $(1,2) }; say bag $f; | ||
camelia | Bag({(1 2) => (1 2)}) | ||
lookatme_q | m: say bag(:{ $(1,2) => $(1,2) }); | ||
camelia | Bag((1 2) => (1 2)) | ||
lookatme_q | ^^ Summertime | ||
08:02
graphene joined,
kurahaupo joined,
p6bannerbot sets mode: +v graphene
08:03
p6bannerbot sets mode: +v kurahaupo
|
|||
Summertime | to clarify, I'm looking for the output of (1 2) => 2 | 08:04 | |
m: say bag 'a', 'a' # e.g. | 08:05 | ||
camelia | Bag(a(2)) | ||
Summertime | m: say (1,2) === (1,2) # I kinda feel like I brought this up last AoC, and it got added to the spec that lists with immutables would be the same list, maybe I'm imagining that though | 08:06 | |
camelia | False | ||
Summertime | I wish my dreams were true | ||
08:07
kurahaupo_ joined
08:08
p6bannerbot sets mode: +v kurahaupo_
08:10
kurahaupo left
|
|||
Summertime | maybe I'll just .perl the keys as they go in, and eval them as they come back out again :s | 08:11 | |
08:14
abraxxa left
08:15
abraxxa joined,
p6bannerbot sets mode: +v abraxxa
08:18
coet joined,
p6bannerbot sets mode: +v coet
08:19
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
08:20
zakharyas joined,
kurahaupo_ left
08:21
p6bannerbot sets mode: +v zakharyas
08:27
ufobat joined,
p6bannerbot sets mode: +v ufobat
08:31
kurahaupo left
08:32
kensanata joined,
p6bannerbot sets mode: +v kensanata
08:33
graphene left
08:35
graphene joined
|
|||
robertle | is there a way to make perl 6 do all maths as Nums to speed them up (accepting the loss of precision)? | 08:35 | |
08:35
p6bannerbot sets mode: +v graphene
08:44
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
08:49
dakkar joined,
p6bannerbot sets mode: +v dakkar
|
|||
moritz | you can/must coerce the involved numbers to Num | 08:51 | |
then the appropriate operation is picked automatically | 08:52 | ||
m: say 0.1.Num | |||
camelia | 0.1 | ||
08:55
graphene left
08:57
graphene joined,
p6bannerbot sets mode: +v graphene
09:06
lucasb_ joined,
p6bannerbot sets mode: +v lucasb_
09:07
andrewalker joined
09:08
p6bannerbot sets mode: +v andrewalker,
lucasb_ is now known as lucasb
|
|||
robertle | k, thanks! | 09:23 | |
09:25
dogbert17 left
09:29
scimon joined
09:30
ufobat left,
p6bannerbot sets mode: +v scimon
09:35
Praise left
09:36
Praise joined,
Praise left,
Praise joined,
p6bannerbot sets mode: +v Praise
09:37
p6bannerbot sets mode: +v Praise,
abraxxa left,
abraxxa joined
09:38
p6bannerbot sets mode: +v abraxxa
09:54
rindolf left,
rindolf joined
09:55
p6bannerbot sets mode: +v rindolf
10:01
graphene left
10:03
graphene joined,
p6bannerbot sets mode: +v graphene
10:31
Skarsnik joined,
leont joined
10:32
p6bannerbot sets mode: +v Skarsnik,
p6bannerbot sets mode: +v leont
|
|||
Skarsnik | hello | 10:32 | |
10:35
tobs` joined,
p6bannerbot sets mode: +v tobs`
10:36
kurahaupo left
|
|||
Geth | doc: 7aac939ed4 | (Richard Hainsworth)++ (committed using GitHub Web editor) | doc/Language/modules.pod6 Update modules.pod6 Accessing a resource file needs a definition in META6.json. |
10:36 | |
synopsebot_ | Link: doc.perl6.org/language/modules | ||
10:37
kurahaupo joined,
p6bannerbot sets mode: +v kurahaupo
10:48
k-man joined,
p6bannerbot sets mode: +v k-man
|
|||
holyghost | eco: Mathx::Chaos | 10:49 | |
buggable | holyghost, Mathx::Chaos 'Chaos mathematics package': modules.perl6.org/dist/Mathx::Chaos...:HOLYGHOST | ||
holyghost | I forgot about it | ||
I have to mainstream it | 10:50 | ||
lucasb | damn, today's problem is difficult :) | 11:16 | |
Summertime | I've managed part 1, for once it was easier in python | 11:17 | |
lucasb | is the square inches exact? like (16 = 4x4) | ||
Summertime | yeah | ||
lucasb | ah, ok. | ||
Summertime | pretty much a boolean grid | 11:18 | |
lucasb | Summertime: wanna join the leaderboard? | ||
Summertime | sure | ||
lucasb | code 169430-b1c331b2 | ||
jnthn | Is this Advent of Code? | 11:19 | |
jnthn just took a look and got kind of tempted to try it :) | |||
lucasb | yes, try it! | ||
Summertime | hel ya top of the leaderboard instantly :u | 11:20 | |
lucasb | haha | ||
11:20
ChoHag left
|
|||
jnthn | Already solved the first in a one-liner :P | 11:20 | |
Summertime | first today? or first as in day 1? | ||
jnthn | day 1 :) | ||
lucasb | yeah, day 1 is usually the easiest :) | 11:21 | |
Summertime | thank gosh because if you meant today's, aaaa | ||
lucasb | one year, task 1 was just to count parentheses "(()))(()()" :) | ||
*in a past year | |||
Summertime | part 2 of today seems like an easy extension to part 1 (find the one that doesn't overlap) | 11:28 | |
jnthn | I guess my one for day 3 is only a 1-liner if we allow quite long lines :P | 11:32 | |
Summertime | anything over 80ch is too long for a 1 liner | 11:33 | |
11:33
coet left,
ChoHag joined
|
|||
jnthn | 163 :P | 11:34 | |
11:34
coet joined,
p6bannerbot sets mode: +v coet,
coet left,
p6bannerbot sets mode: +v ChoHag
|
|||
jnthn | Maybe I should actually sign up for this :) | 11:34 | |
11:39
ryn1x joined
11:40
p6bannerbot sets mode: +v ryn1x
11:42
sftp left
11:43
sftp joined,
p6bannerbot sets mode: +v sftp,
Peter_R left
11:44
Peter_R joined,
p6bannerbot sets mode: +v Peter_R
11:45
domidumont left
|
|||
Summertime | fuk, answered too late | 11:46 | |
well, currently uncontestable second is fine I suppose | |||
11:57
lizmat left
12:08
Skarsnik left
12:11
zakharyas left
12:16
sftp left
12:19
lizmat joined,
p6bannerbot sets mode: +v lizmat
|
|||
lucasb | ah, my data set must be broken, I give up! | 12:38 | |
I'll try again later... I'm missing some detail right now | |||
Geth | ecosystem: b3b75fb00a | (Itsuki Toyota)++ (committed using GitHub Web editor) | META.list [IO-Capture-Simple] Use META6.json instead of META.info By this PR, IO-Capture-Simple uses META6.json at present: github.com/sergot/IO-Capture-Simple/pull/11 |
13:00 | |
13:03
domidumont joined,
p6bannerbot sets mode: +v domidumont
13:11
yqt joined
13:12
p6bannerbot sets mode: +v yqt
13:19
kurahaupo left,
kurahaupo joined
13:20
p6bannerbot sets mode: +v kurahaupo
13:22
ryn1x left
13:28
daxim left
|
|||
tbrowder | FYI, i have started a proposal for a new p6 advent system on the perl6/advent repo’s wiki. feel free to contribute to it! | 13:40 | |
buggable | New CPAN upload: Chart-Gnuplot-0.0.7.tar.gz by TITSUKI modules.perl6.org/dist/Chart::Gnupl...an:TITSUKI | 13:48 | |
SmokeMachine | lucasb: what's that golf you guys were playing? | 14:01 | |
lucasb | SmokeMachine: adventofcode.com/ | ||
mornfall | tbrowder: can it be a repo of markdown files? :) | 14:02 | |
a script could probably publish that even to wordpress, if need be | 14:03 | ||
14:10
yqt left
|
|||
tbrowder | mornfall: actually, i would prefer that since it would make it easier for web edits and seeing a rendered view by github (although it wouldn’t be the published view). i think md should provide enough formatting features to satisfy most of us (i hope). | 14:17 | |
as to second point, as possibly an interim solution looking at using Wordpress’s API to do that. | 14:18 | ||
tobs` | tbrowder: comments are also desirable | ||
lucasb | tbrowder: may I persuade you to "gem install jekyll" and play with it? :) jekyllrb.com/ | 14:19 | |
Kaiepi | what's the code for the perl 6 leaderboard on advent of code? | 14:20 | |
tbrowder | maybe, is that what worpress uses? | ||
mornfall | lucasb: what'd be the point of that? there's a very definite bound on number of articles, using jekyll for that sounds like substantial overkill? | ||
lucasb | Kaiepi: 169430-b1c331b2 | 14:21 | |
14:21
tmtvl joined
|
|||
Kaiepi | thanks | 14:21 | |
tbrowder | tobs: agreed. not so easy to do, maybe wp api is the way to go... | ||
tobs` | and as I've said before: drafting, reviewing, editing the advent posts completely in the open would sound odd to me, as it is supposed to be a surprise | ||
lucasb | tbrowder: sorry, wordpress uses... wordpress :-) jekyll is used by github pages :-) | ||
14:21
p6bannerbot sets mode: +v tmtvl
14:22
araujo joined,
p6bannerbot sets mode: +v araujo
|
|||
tobs` | I mean, yes, we're all adults and can spoil the advent calendar for us if we feel like it, but a little barrier would be nice, like a private repository. | 14:23 | |
AlexDani` | . | ||
14:23
AlexDani` is now known as AlexDaniel
|
|||
AlexDaniel | . | 14:23 | |
tbrowder | well, as i’ve seen in wp, it let’s one see other posts before publishing (or is that because moritz gave me editor role privs—hard to tell) | 14:24 | |
mornfall | tobs`: a private repository is also a substantial hurdle for contributors | ||
Kaiepi | first part of the first day of advent of code was pretty painless hastebin.com/hipejecine.pl | 14:25 | |
i wonder if there's a shorter way to do it | |||
14:25
zakharyas joined
14:26
daxim joined,
p6bannerbot sets mode: +v zakharyas,
p6bannerbot sets mode: +v daxim
|
|||
tbrowder | the p5 folks seem to have a process where you have to submit early and a committee approves it | 14:26 | |
lucasb | Kaiepi: say [+] lines>>.Int :-) | 14:27 | |
tobs` | mornfall: what kind of contributors do you mean? Article writers or casual proof readers? For the latter it's kind of my point to make it an obstacle, as bad as that sounds. | ||
Kaiepi | ah | ||
lucasb | Kaiepi: I like to feed the input file in the command line "prog < input" | ||
mornfall | tobs`: to be honest, the quality of text has not been very high so far -- discouraging proofreading further doesn't sound like the right direction to me | 14:28 | |
having a few semi-pro writers as copy-editors on the team would probably help a lot, but an entry barrier virtually ensures that it's not going to happen? | 14:30 | ||
dunno, just my impression (fwiw, i would contribute via copy-editing if it the process for that would be simple enough) | 14:32 | ||
if the process* | |||
14:33
andrew_ joined,
p6bannerbot sets mode: +v andrew_,
andrew_ left
|
|||
tobs` | mornfall: what I mean is, if we have an open repository and every day the next person announces their draft here looking for opinions, at least half the channel will have casually read some version of the article before it's even time to open that little door on the advent calendar. Only this effect is what I'd not like to encourage. | 14:36 | |
mornfall | tobs`: that will largely depend on whether there is or isn't a test audience other than #perl6, is that not so? | 14:37 | |
so perhaps a thing as simple as having #perl6advent would fix your concern? | 14:38 | ||
tobs` | having semi-pro writers in a semi-consistent team would solve that, as would just assuming that people don't spoil articles for themselves, or even that they might as well do that if they want to | ||
mornfall: yeah, I like that idea | |||
tbrowder | ++ on #perl6-advent | 14:45 | |
(in spirit of othe #perl-*) | |||
hahainternet | so i've got a very odd bug here where i have two identical range constructions that are mapped inside an existing map | 14:46 | |
the second one always fails unless it's assigned to a variable | |||
in which case it only works if it's assigned to a list(or array i forget the specifics) | |||
i'll try and work up a little test case | 14:47 | ||
14:49
Xliff left
|
|||
hahainternet | yeah it's being enclosed in an outer map | 14:50 | |
m: (^1).map: { (^1).map({say "Hello $_"}); (^1).map({say "Goodbye $_"}); }; | 14:51 | ||
camelia | Hello 0 | ||
hahainternet | i'm not quite sure why that would be, whether it's a bug or i'm misunderstanding | ||
14:54
ufobat joined
14:55
p6bannerbot sets mode: +v ufobat
|
|||
tobs` | commit: 2018.10 (^1).map: { (^1).map({say "Hello $_"}); (^1).map({say "Goodbye $_"}); } | 14:55 | |
committable6 | tobs`, ¦2018.10: «Hello 0» | ||
ufobat | is there a way to have one or another type in one method signature, like method foo(Str|Blob $data) { ... } | 14:56 | |
tobs` | hahainternet: it works here in my 2018.10 repl (usually it's the other way around) | ||
ufobat | do i need to write method foo(Any $data where * ~~ Str|Blob)? | 14:57 | |
hahainternet | tobs`: i don't really know how to use bisectable6 :) | 14:59 | |
bisectable6: help | |||
bisectable6 | hahainternet, 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 | ||
tobs` | m: use Test; subset Strob of Any where Str|Blob; sub f (Strob $x) { }; lives-ok { f("abc") }; dies-ok { f(12) }; lives-ok { f("abc".encode) } | ||
camelia | ok 1 - ok 2 - ok 3 - |
||
hahainternet | tobs`: can you tell me the commit id of a working commit? lets try some other commands the wiki recommends | ||
6c: (^1).map: { (^1).map({say "Hello $_"}); (^1).map({say "Goodbye $_"}); }; | |||
lol | 15:00 | ||
tobs` | ufobat: you can use a subset | ||
committable6 | hahainternet, ¦6c (35 commits): «Hello 0» | ||
tobs` | hahainternet: my $*PERL.compiler.version is exactly v2018.10 (and I'm otherwise pretty sure too that I only install the monthly releases) | 15:01 | |
ufobat | subset StrOrBlob of Cool where * ~~ Str|Blob | ||
like that? | |||
hahainternet | tobs`: and it prints both for you? cause none of these versions seem to want to | 15:02 | |
tobs` | ufobat: I made an example 3 minutes ago | ||
but yes :) | |||
ufobat | ah sorry didn't see it, thanks :-) | ||
oh you can leave out the `* ~~` part, thats fancy | 15:03 | ||
tobs` | hahainternet: it doesn't print under `perl6 -e`, but it does in the REPL | ||
15:04
daxim left
|
|||
tobs` | but IME, when they both disagree, the REPL is the one with buggy-looking behaviour | 15:05 | |
hahainternet | tobs`: how bizarre | ||
tobs` | hahainternet: is it at least the same on your system? | 15:09 | |
hahainternet | tobs`: just checking | ||
tobs`: it is, repl prints both and the result | 15:10 | ||
-e doesn't print both | |||
i notice if i assign the second one to an array, it tends to work | |||
m: (^1).map: { (^1).map({say "Hello $_"}); my @a=(^1).map({say "Goodbye $_"}); }; | |||
camelia | Hello 0 Goodbye 0 |
||
hahainternet | m: (^1).map: { (^1).map({say "Hello $_"}); my $a=(^1).map({say "Goodbye $_"}); }; | ||
camelia | Hello 0 | ||
hahainternet | so it's something to do with the context it's running in, it must be assuming it's void or something idk | ||
lucasb | m: 10.map: { 42.map(*.say); [1,2,3].map(*.say) } | 15:15 | |
camelia | 42 | ||
lucasb | m: 10.map: { 42.map(*.say); [1,2,3].map(*.say).sink } | ||
camelia | 42 1 2 3 |
||
SmokeMachine | m: say 10.map: { 42.map(*.say); [1,2,3].map(*.say) } | 15:20 | |
camelia | 42 1 2 3 ((True True True)) |
||
Geth | doc: 8440f87216 | Coke++ | doc/Language/modules.pod6 whitespace |
||
synopsebot_ | Link: doc.perl6.org/language/modules | ||
doc: 7b8a41fb17 | Coke++ | doc/Language/modules.pod6 fix pod errors |
|||
15:20
sena_kun joined
|
|||
SmokeMachine | m: my @a = 10.map: { 42.map(*.say); [1,2,3].map(*.say) } | 15:20 | |
camelia | 42 | ||
SmokeMachine | m: my @a = 10.map: { 42.map(*.say); [1,2,3].map(*.say) }; say @a | 15:21 | |
camelia | 42 1 2 3 [(True True True)] |
||
SmokeMachine | wtf? | ||
lazyness? | |||
lucasb | golfier: "10.map: { 20.map(*.say) }" :-) | ||
15:21
p6bannerbot sets mode: +v sena_kun
|
|||
lucasb | m: 10.map: { 20.map(*.say); 1 } | 15:22 | |
camelia | 20 | ||
tobs` | m: class A::B { }; class X::Y { method A::B { A::B.new } }.new.A::B.say | 15:23 | |
camelia | Cannot dispatch to method B on A because it is not inherited or done by X::Y in block <unit> at <tmp> line 1 |
||
tobs` | I get that this happens because .A::B is class-qualified method lookup, but I wanted to make that method a coercer to a class inside some other package. Is there a way? | 15:24 | |
lucasb | m: class A::B { }; class X::Y { method A::B { A::B.new } }.new.'A::B'().say | 15:25 | |
camelia | A::B.new | ||
tobs` | oh right! lucasb++ | ||
If only it was nicer-looking | |||
(but being a coercer method, I won't usually call it, I suppose, but have it called) | 15:26 | ||
lucasb | but I wouldn't use "method A::B { ... }" to me this is a syntax error waiting/wanting to be fixed :) | ||
15:26
MilkmanDan left
|
|||
tobs` | m: class A::B { }; class X::Y { method A::B { A::B.new } }; my X::Y $y .= new; say my A::B() $x = $y | 15:27 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Coercion A::B(Any) is insufficiently type-like to qualify a variable at <tmp>:1 ------> 3} }; my X::Y $y .= new; say my A::B() $x7⏏5 = $y expecting any of: constraint |
||
lucasb | my class is named Foo::Bar::Baz. how should I name the coercer method? well, I would say "Baz" or... idk :-) | ||
15:27
MilkmanDan joined,
p6bannerbot sets mode: +v MilkmanDan
|
|||
tobs` | m: class A::B { }; class X::Y { method A::B { A::B.new } }; my X::Y $y .= new; say my A::B $x = $y | 15:27 | |
camelia | Type check failed in assignment to $x; expected A::B but got X::Y (X::Y.new) in block <unit> at <tmp> line 1 |
||
SmokeMachine | m: class A::B { }; sub a(A::B() $a) { say $a }; a class X::Y { method A::B { A::B.new } }.new | 15:28 | |
camelia | A::B.new | ||
tobs` | m: class A::B { }; class X::Y { method A::B { A::B.new } }; sub f (A::B() $a) { $a.say}(X::Y.new) | ||
camelia | A::B.new | ||
15:29
ufobat left
|
|||
SmokeMachine | m: class A::B { }; my A::B() $a = class X::Y { method A::B { A::B.new } }.new # but this gives an error | 15:29 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Coercion A::B(Any) is insufficiently type-like to qualify a variable at <tmp>:1 ------> 3class A::B { }; my A::B() $a7⏏5 = class X::Y { method A::B { A::B.new } expecting any of: … |
||
lucasb | in my understanding, P6 doesn't restrict the variable names. just because "method A::B {...}" doesn't error, doesn't mean it should be used | ||
m: my $a::b::c = 42; say $a::b::c | 15:30 | ||
camelia | 42 | ||
lucasb | ^^ for example, it makes no sense qualified lexicals... but the syntax allows it | ||
SmokeMachine | m: $a::b::c = 42; say $a::b::c | 15:31 | |
camelia | 42 | ||
Kaiepi | m: my $é = 42; say $é | ||
camelia | 42 | ||
15:31
daxim joined
|
|||
Kaiepi | m: my $a::é = 42; say $a::é | 15:31 | |
camelia | 42 | ||
Kaiepi | m: my $a::🤔 = 42; say $a::🤔 | 15:32 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Bogus postfix at <tmp>:1 ------> 3my $a::7⏏5🤔 = 42; say $a::🤔 expecting any of: constraint infix infix stopper postfix statement e… |
||
15:32
p6bannerbot sets mode: +v daxim
|
|||
Kaiepi | damn | 15:32 | |
m: sub term:sym<a::🤔> { state $foo = 1 }; say a::🤔 | |||
camelia | 1 | ||
tobs` | lucasb: but my type is called A::B and it's (otherwise) not necessary to export it. If I want coercers in function signatures to work, it _has_ to be method A::B as far as I know. | 15:36 | |
lucasb | yeah, you are correct | 15:37 | |
hahainternet | SmokeMachine: yeah i'm really not sure what causes that, if you or lucasb can figure it out please lmk | ||
lucasb | tobs`: in a imaginary language, the coercer method would me Mu.to(Something) | 15:38 | |
obj.to(Array), obj.to(Foo::Bar), etc | |||
multi method to(Foo::Bar) {...}, etc. :-) | |||
I think this would give a clear idea of what the possible coercions are. just query the signatures of the .to(Something) method | 15:40 | ||
anyway... just design ideas :-) unrelated to P6 | |||
15:41
coet joined,
p6bannerbot sets mode: +v coet
|
|||
lucasb | m: gist.github.com/lucasbuchala/9e184...ac5fb5cfeb | 15:42 | |
camelia | 123 abc True |
||
scimon | So after reading an article on function compostion in Javascript I wrote code to allow this say (add(4)∘add(5)∘add(4))(1) (Where add is a curried function taking 2 elements). And ∘ composes to arity 1 functions into a single one. :) | 15:44 | |
lucasb | is the result 14? | 15:45 | |
scimon | It is. | 15:46 | |
lucasb | m: say &[+].assuming(4).assuming(5).assuming(4).(1) | ||
camelia | Too many positionals passed; expected 0 arguments but got 1 in sub trybind at EVAL_7 line 1 in block <unit> at EVAL_7 line 1 in block <unit> at <tmp> line 1 |
||
scimon | Yeah I know. | ||
lucasb | your way is prettier for sure :-) | 15:47 | |
scimon | (I'm casting around for ideas for my Advent post at the moment) | ||
[Coke] | looks like we just had a bad commit in the past day that failed the valid pod test in t/ (which caused 2 xt tests to just explode) | 15:48 | |
(in perl6/doc) | |||
SmokeMachine | scimon: I was studding stuff like that some time ago too: github.com/FCO/functional/blob/mas...-compose.t | 15:49 | |
scimon | My other thought was working out how to do a curry keyword so you could do curry ($a,$b,$c) {BLOCK} and it gave you -> $a { -> $b { -> $c { BLOCK } } } Hmmmm | ||
Shiny. | 15:50 | ||
lucasb | m: say &reduce.assuming(&[+]).assuming(4).assuming(5).assuming(4).(1) | ||
camelia | 14 | ||
lucasb | I want to get a reference to the add reduce function "[+] 1,2,3" | 15:51 | |
SmokeMachine | scimon: github.com/FCO/functional/blob/mas...-example.t | ||
lucasb | what's shorter than &reduce.assuming(&[+]) ? | ||
scimon | SmokeMachine: Now all you need is some docs and it's a module :D | 15:52 | |
SmokeMachine | scimon: :) | ||
scimon | lucasb: Of course the ∘ doesn't just work on + :) (assuming is cool though, don't get me wrong). | 15:53 | |
(I did ML back in Uni so bits of it stuck around) | |||
SmokeMachine | scimon: I like the fact of `add(add(1, 2), 4)` return the same function as `add(1, add(2, 4))`. Not a function that do the same... the SAME function... | 15:54 | |
lizmat | . | ||
SmokeMachine | scimon: here: github.com/FCO/functional/blob/mas...function.t | ||
lizmat | PSA: The Perl 6 Weekly may be delayed until tomorrow because of being very much under the weather | 15:55 | |
15:56
jargan joined
15:57
p6bannerbot sets mode: +v jargan
15:58
tobs` left,
jast left,
jargan is now known as jast
|
|||
sena_kun | lizmat, take care. | 15:59 | |
15:59
tobs` joined
|
|||
[Coke] | re fco.github.io/MemoizedDOM/todo6.html - does the corresponding perl6.js file need use strict in as many places as it has? or would it have the same effect with a single use strict at the top? | 16:00 | |
16:00
p6bannerbot sets mode: +v tobs`
|
|||
scimon | :( | 16:04 | |
I too am under the sweather but this is because the weather was created by my standing next to a free bar for much of Friday night so I deserve no sympathy. (And yes... Sigh... I've still got a headache). | 16:05 | ||
Geth | Pod-To-HTML/master: 7 commits pushed by finanalyst++, (Juan Julián Merelo Guervós)++ | 16:08 | |
16:15
Sgeo_ joined
16:16
p6bannerbot sets mode: +v Sgeo_,
pmurias joined,
p6bannerbot sets mode: +v pmurias
16:17
Sgeo left
|
|||
pmurias | [Coke]: potentially parcel could get rid of them | 16:18 | |
[Coke]: but I'm not sure they can be just moved to them top as some dependencies might not be using 'use strict' | 16:19 | ||
[Coke] | pmurias: in any case, very excited to be able to run perl6 in the browser. :) | 16:20 | |
lucasb | cool. I'm waiting bigint support in firefox to be able to play with it too | 16:23 | |
wow 6pad is working now | 16:26 |