»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend! Set by moritz on 22 December 2015. |
|||
00:00
bisectable6 left,
committable6 left,
bisectable6 joined,
ChanServ sets mode: +v bisectable6,
committable6 joined
00:03
niceperl left
00:06
huf joined
00:07
Herby_ joined
|
|||
Herby_ | o/ | 00:07 | |
question. If I have two strings "12/31/2015 0400" and "12/31/2015 0700", how do I convert those to datetime objects to see if greater there is greater than 4 hour difference between the two? | 00:08 | ||
I have a tenuous grasp on datetime in general, and I can't figure it out in the docs | 00:09 | ||
00:12
konsolebox left
|
|||
jnthn | I don't think anything built-in will parse that format (it'll only do ISO 8601, and that sure ain't what you have) | 00:12 | |
00:13
konsolebox joined
|
|||
Herby_ | hmm. any recommended modules to use? | 00:14 | |
jnthn | m: given "12/31/2015 0400" ~~ /(\d+)'/'(\d+)'/'(\d+) ' ' (\d\d)(\d\d)/ { dd DateTime.new(day => $0, month => $1, year => $2, hour => $3, minute => $4) } | ||
camelia | Month out of range. Is: 31, should be in 1..12 in block <unit> at <tmp> line 1 |
||
jnthn | Middle endian be dammed! | ||
Herby_ | :) | 00:15 | |
jnthn | m: given "12/31/2015 0400" ~~ /(\d+)'/'(\d+)'/'(\d+) ' ' (\d\d)(\d\d)/ { dd DateTime.new(month => $0, day => $1, year => $2, hour => $3, minute => $4) } | ||
camelia | DateTime.new(2015,12,31,4,0,0) | ||
jnthn | That's one way to parse it | ||
Then I think you can just use - with the two to get an Instance | |||
uh, Instant | |||
Herby_ | great, i'll give that a go. Thanks! | ||
00:29
evalable6 left,
evalable6 joined,
ChanServ sets mode: +v evalable6,
cdg_ joined
00:30
bisectable6 left,
committable6 left,
bisectable6 joined,
ChanServ sets mode: +v bisectable6,
committable6 joined,
ChanServ sets mode: +v committable6
|
|||
lookatme | o/ | 00:30 | |
Herby_, o/ | 00:31 | ||
Herby_ | lookatme: \o/ | ||
lookatme | morning here | 00:32 | |
00:32
cdg left
|
|||
Herby_ | australia? | 00:33 | |
00:33
mson joined
|
|||
lookatme | No, china | 00:34 | |
Here is 8:30 am | |||
00:34
cdg_ left
|
|||
Herby_ | 5:30 PM in cold Colorado | 00:34 | |
lookatme | yeah, It's winter now | 00:35 | |
so cold | |||
AlexDaniel | squashable6: next | 00:37 | |
squashable6 | AlexDaniel, ⚠🍕 Next SQUASHathon in 1 day and ≈9 hours (2017-12-02 UTC-12⌁UTC+14). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day | ||
jnthn | Cold is fine, I can just wrap up warmer. Beats hot, when there's not much to do about it. :) | 00:38 | |
Herby_ | ^ | ||
jnthn is still waiting for some snow | |||
lookatme | yeah, the summer is so hot, we have nothing to beat it | 00:40 | |
Is this page perl6.org/compilers/features still update ? | 00:42 | ||
I am keep watch out the macro feature. | 00:44 | ||
And the macro will be redesign ? | |||
00:45
konsolebox left
00:46
konsolebox joined
00:48
aborazmeh joined,
aborazmeh left,
aborazmeh joined
00:51
cdg joined,
jeromelanteri left,
BenGoldberg joined
00:56
cdg left
|
|||
jnthn | lookatme: Yeah, masak is exploring/prototyping a bunch of that; it'll be a while yet, though, it's difficult and a lot of work to do well | 00:57 | |
lookatme | oh thanks | ||
jnthn | github.com/masak/007/ may be interesting to you | 00:58 | |
00:59
evalable6 left,
evalable6 joined
|
|||
lookatme | oh, great | 00:59 | |
jnthn | Sleep time for me; 'night | 01:00 | |
lookatme | night | ||
01:00
bisectable6 left,
committable6 left,
bisectable6 joined,
ChanServ sets mode: +v bisectable6,
committable6 joined,
ChanServ sets mode: +v committable6
|
|||
Herby_ | night! | 01:01 | |
01:09
vike left
|
|||
SmokeMachine | m: <abc xyz>.classify( *.contains: any 'a'..'f' ) | 01:10 | |
camelia | ( no output ) | ||
SmokeMachine | m: say <abc xyz>.classify( *.contains: any 'a'..'f' ) | ||
camelia | {False => [abc xyz xyz xyz xyz xyz xyz], True => [abc]} | ||
SmokeMachine | can anyone explain me why? | ||
01:13
committable6 left,
committable6 joined,
ChanServ sets mode: +v committable6
|
|||
Herby_ | Zoffix: I'm following along your Weatherapp tutorial. Did you ever write any code for part 4? | 01:13 | |
SmokeMachine | the way I think, abc contains the letter (True) in 3 possibilities of 'a'..'f' (a, b and c) and doesn't contains in another 3 (False) (d, e and f)... so, in my mind, the answer should be: {False => [abc abc abc xyz xyz xyz xyz xyz xyz], True => [abc abc abc]} | ||
could, please, someone explain me that? | 01:14 | ||
01:14
raschipi joined,
margeas left
|
|||
SmokeMachine | Os this really expected? | 01:17 | |
01:17
espadrine left
01:19
troys is now known as troys_
01:21
vike joined
|
|||
raschipi | m: <abcz xyzj>.classify( *.contains: any 'a'..'f') | 01:21 | |
camelia | ( no output ) | ||
lookatme | Interesting output | ||
raschipi | m: say <abcz xyzj>.classify( *.contains: any 'a'..'f') | 01:22 | |
camelia | {False => [abcz xyzj xyzj xyzj xyzj xyzj xyzj], True => [abcz]} | ||
lookatme | m: say <abc>.classify( *.contains: any 'a'..'f' ) | ||
camelia | {False => [abc], True => [abc]} | ||
lookatme | m: say <xyz>.classify( *.contains: any 'a'..'f' ) | ||
camelia | {False => [xyz]} | ||
lookatme | m: say <xyz abc>.classify( *.contains: any 'a'..'f' ) | ||
camelia | {False => [xyz abc abc abc], True => [abc]} | ||
raschipi | m: say 'abc'.contains: any 'a'..'f' | ||
camelia | any(True, True, True, False, False, False) | ||
01:23
astronavt joined
|
|||
lookatme | Hmm, seems like some problem about junction and classify | 01:23 | |
01:24
mcmillhj joined
|
|||
SmokeMachine | This code was gotten from a roast test... | 01:25 | |
raschipi | what does the test say the result should be? | 01:27 | |
and are you sure the test isn't fudged for rakudo? | |||
SmokeMachine | github.com/perl6/roast/blob/ac5295...ify.t#L126 | ||
timotimo | it occurs to me that .classify({ $_ }) is equivalent to .Bag | 01:28 | |
well, you might have to put an xx in there as well | 01:29 | ||
raschipi | RT #126032 | ||
synopsebot | RT#126032 [resolved]: rt.perl.org/Ticket/Display.html?id=126032 The .classify method is calling the closure twice on the first element | ||
raschipi | Right, it's expected. Not supposed to be used in that form, it's just for the test. | 01:30 | |
m: say so <abc>.contains: any 'a'..'f' | 01:31 | ||
camelia | True | ||
raschipi | m: say so <xyz>.contains: any 'a'..'f' | ||
camelia | False | ||
raschipi | m: say so <abc>.contains: all 'a'..'f' | 01:32 | |
camelia | False | ||
raschipi | m: say so <abc>.contains: all 'a'..'c' | ||
camelia | True | ||
SmokeMachine | But, shouldn’t it return {False => [abc abc abc xyz xyz xyz xyz xyz xyz], True => [abc abc abc]}? | 01:33 | |
I still don’t get it... | 01:35 | ||
01:35
troys_ is now known as troys
|
|||
Zoffix | Herby_: no, I got bad response to those series and got discouraged from finishing them. There won't ever be Part 4 | 01:35 | |
Herby_ | Sorry to hear that. For what its worth, I really enjoy your blogs and postings | 01:36 | |
raschipi | Me too, really like them. | ||
01:37
Todd joined
|
|||
SmokeMachine | raschipi: what’s the value of a test that uses a form that shouldn’t be used? | 01:38 | |
Todd | Hi All. I am about to write a Perl6 program for a customer on Windows 7, sp1, 32 bit (not 64) | ||
01:39
xi- left
|
|||
Todd | Is this the best place to download Perl 6 for Windows 32 bit? rakudo.org/how-to-get-rakudo/ | 01:39 | |
01:40
BrianOn99 joined
|
|||
Zoffix | Todd: in a way; you'll notice the 32-bit version is nearly 2 years old | 01:40 | |
Todd | nuts, any better download? | ||
raschipi | SmokeMachine: It's not that it shouldn't be used, it's just that it doesn't collapse a junction before using it and junctionsare more useful when they collapse. | ||
Zoffix | Todd: you could try building from source: github.com/zoffixznet/r#windows | 01:41 | |
Todd: note that JIT is not available on 32-bits, so your rakudo will be noticably slower | 01:42 | ||
Todd: may want to run `git checkout 2017.11` before the `perl Configure.pl` step to get a much more well-tested the release commit, rather than bleeding edge | |||
01:43
xi- joined
|
|||
Todd | If I build, it look like I will need Perl 5. Was hoping not to have to do that. Also, speed is not an issue. Works properly is. | 01:43 | |
Zoffix | Todd: yeah, Configure.pl is a Perl 5 script; also you'll need a C compiler, which comes with Strawberry Perl 5 | ||
Todd | rats. I was hoping for a lot easier | 01:44 | |
01:44
BrianOn99 left
|
|||
Zoffix | Sorry. No volunteer stepped up with the resources to build 32-bit Windows | 01:44 | |
Todd | looking at the link, I do not see a switch for 32 bit. My Windows VM is 64 bit. I would like to compile it locally | 01:45 | |
Zoffix | It figures it out automatically. No idea if there's a switch to force it into 32 bit | 01:46 | |
Todd | poop | ||
if I originally write it in Linux, do I need to be careful to use an editor that saves in cr/lf | 01:48 | ||
? | |||
Zoffix | Todd: write what? | 01:49 | |
lookatme | No, if you execute it with `perl6 xxx.p6` | ||
Todd | my perl6 program. get a head start on it in Linux (my base system). then remote into the customer's w7 machine and copy it over and finish it off | 01:50 | |
lookatme | The newline only effect shebang, I think | ||
Zoffix | Todd: it'll work, but depending on what you open it with on Windows, it might end up all on one line (e.g. in notepad.exe). Just run `unix2dos foo.p6` before sending it | ||
Todd | forgot about that one. thank y for hte reminder | 01:51 | |
I think I will try to old versionof rakudo. If it doesn't work, then I will try compiling up a new one. Thank you guys! | 01:52 | ||
Zoffix | Any time | ||
Todd | bye bye | 01:53 | |
lookatme | 88 | ||
01:53
Todd left
01:55
dj_goku left
02:02
xi- left
02:03
Cabanossi left
|
|||
Geth | mu: ef13dd7847 | (Zoffix Znet)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule Put "Perl 6: Sigils, Variables, and Containers" to 2nd It's been scheduled now |
02:03 | |
02:03
xi- joined
02:04
Cabanossi joined
02:08
konsolebox left
02:14
konsolebox joined,
llfourn joined
02:18
zakharyas joined
02:19
kerframil left
02:20
kerframil joined
02:22
Zoffix left
02:31
troys is now known as troys_
02:46
ilbot3 left,
pilne left
02:48
raschipi left
02:56
kitsunenokenja left
02:57
cdg joined
02:58
ilbot3 joined,
ChanServ sets mode: +v ilbot3
03:01
konsolebox left
03:02
cdg left
03:03
ufobat___ joined
03:04
cdg joined
03:07
ufobat_ left,
konsolebox joined
03:17
Herby__ joined,
Cabanossi left
03:19
Cabanossi joined
03:21
konsolebox left
03:22
konsolebox joined
03:28
Khisanth left
03:30
mcmillhj left
03:48
konsolebox left
03:50
konsolebox joined,
Khisanth joined
03:53
eliasr left
03:55
konsolebox left
03:58
konsolebox joined
04:06
jeromelanteri joined
04:14
lookatme left,
lookatme joined
04:17
Cabanossi left,
llfourn left
04:18
Cabanossi joined
04:23
wamba joined
04:33
mson left
04:38
dj_goku joined
04:50
wander joined
04:52
xtt joined
04:53
konsolebox left
04:55
konsolebox joined
04:58
astj joined
05:03
cdg left,
cdg joined
05:08
cdg left
05:16
Cabanossi left
05:18
Cabanossi joined
05:19
mson joined
|
|||
wander | jnthn: | 05:30 | |
m: multi sub g(Int \a, Int \b) { say 0; nextsame };multi sub g(Any \a, Int \b) { say 1; nextsame };multi sub g(Int \a, Any \b) { say 2; nextsame };multi sub g(Any \a, Any \b) { say 3; nextsame };g(1, 2); | |||
camelia | 0 1 2 3 |
||
05:30
astronavt left
|
|||
wander | m: multi sub g(Any \a, Int \b) { say 1; nextsame };multi sub g(Int \a, Any \b) { say 2; nextsame };multi sub g(Any \a, Any \b) { say 3; nextsame };g(1, 2); | 05:30 | |
camelia | Ambiguous call to 'g'; these signatures all match: :(\a, Int \b) :(Int \a, \b) in block <unit> at <tmp> line 1 |
||
wander | could i infer that 'Ambiguous' judge is only applied for the first dispatch? | 05:31 | |
05:32
Xliff left
|
|||
wander | m: multi sub g(Int \a, Int \b) { say 0; nextsame };multi sub g(Int \a, Any \b) { say 2; nextsame };multi sub g(Any \a, Int \b) { say 1; nextsame };multi sub g(Any \a, Any \b) { say 3; nextsame };g(1, 2); | 05:32 | |
camelia | 0 2 1 3 |
||
05:34
wamba left
|
|||
wander | it's weird that textual ordering tie-breaker works in re-dispatch, where the signature doesn't have `where` clauses, named parameters or something. | 05:35 | |
05:36
Xliff joined
|
|||
Xliff | \o | 05:36 | |
Is there a blog post or tutorial on how to write basic networking apps in P6? | 05:37 | ||
05:38
troys_ is now known as troys
|
|||
Xliff | There's a basic skeleton, here but is there something else with more details? | 05:40 | |
docs.perl6.org/type/IO::Socket::INET | |||
05:43
Herby__ left
05:49
Herby_ left
|
|||
lookatme | Xliff, there are a lot of blog post in rakudo.party/post/Perl-6-Hands-On-...pp--Part-1 | 05:54 | |
maybe help | |||
05:54
aborazmeh left
|
|||
Xliff | Thanks | 05:56 | |
lookatme | Xliff, And if you don't know Perl6 weekly, I recommend you check out this: p6weekly.wordpress.com/ | 05:57 | |
05:59
BenGoldberg left
|
|||
Xliff | Hah. Good start, but never got to Part 4 | 05:59 | |
06:13
wander left
06:16
Cabanossi left
06:17
cpage_ left
06:18
Cabanossi joined
06:20
cdg joined
06:23
troys left
06:25
cdg left
06:28
darutoko joined
06:30
cdg joined
06:35
cdg left
06:40
astj left
|
|||
tony-o | Xliff: there's also IO::Socket::Async if you're into that sort of thing | 06:40 | |
06:45
Cabanossi left
06:48
Cabanossi joined
06:53
domidumont joined
06:55
khw left
06:58
domidumont left
06:59
domidumont joined
07:03
Guest72929 joined
07:08
Guest72929 left,
geospeck joined
07:09
domidumont left
07:10
domidumont joined
07:11
someuser_ joined
07:17
rindolf joined
07:23
someuser_ left
07:24
someuser joined,
lowbro joined,
lowbro left,
lowbro joined
07:26
MasterDuke left
07:34
anop joined
|
|||
anop | i have file of 100 lines ....... .race(batch => 32, degree => 4) how it work ..... | 07:34 | |
what is batch ? | |||
what is degree ? | |||
07:35
astj joined
07:39
astj left
07:56
abraxxa joined
07:59
mson left
|
|||
AlexDaniel | anop: hello :) What you wrote should work. Like “@smth.race(batch => 32, degree => 4).map({ your code here })” or “race for @smth.race(batch => 32, degree => 4) { your code here }” | 07:59 | |
anop: degree is basically the number of threads | |||
anop: and batch is how meach each thread “takes” each time | 08:00 | ||
perhaps my explanation is not clear enough :) | |||
much* | 08:01 | ||
08:01
kerframil left
|
|||
AlexDaniel | anop: with 100 lines perhaps a batch size of 5 will work ok | 08:02 | |
degree => 4 is probably reasonable for the average computer :) | 08:03 | ||
08:09
geospeck left
08:25
wamba joined
08:27
wander joined
08:31
cpage_ joined
08:34
dakkar joined
08:47
xtt left
08:48
wamba left
|
|||
Geth | ecosystem: JJ++ created pull request #381: Adds Wikidata::API |
08:53 | |
08:54
scimon joined
08:58
konsolebox left
08:59
wamba joined
09:00
konsolebox joined
09:05
wamba left
|
|||
anop | hello AlexDaniel | 09:07 | |
that means, at a time for four thread will run and every thread has 32 lines for processing | 09:08 | ||
that means, at a time four thread will run and every thread has 32 lines for processing | 09:09 | ||
lookatme | Not sure, it's no document about it. Only batch is clear | ||
AlexDaniel | well, each thread will take 32 items, process them, then take the next 32 and so on | ||
anop | that means, at a time 128 lines will process | 09:11 | |
that means, at a time 128 lines will be process | |||
09:11
wander left
|
|||
lookatme | I don't think degree is thread number | 09:12 | |
AlexDaniel | why not | ||
anop | hello AlexDaniel, that means, at a time 128 lines will be process | ||
is right ? | |||
is it right ? | |||
lookatme | According the mean of `degree` :) | 09:13 | |
AlexDaniel | anop: well. If you have 4 threads, then three of them will be processing 32 items, and the fourth thread will be processing just 4 items… | ||
lookatme | :) byebye | ||
09:13
lookatme left
|
|||
AlexDaniel | so ideally you should set the batch size to 25 if you have 100 items exactly | 09:14 | |
but I'd go lower than that assuming that the processing may different time… | 09:15 | ||
it really depends | |||
09:18
Voldenet joined,
Voldenet left,
Voldenet joined
09:21
konsolebox left,
wander joined
09:22
konsolebox joined
|
|||
Geth | ecosystem: cb3f2869a5 | (JJ Merelo)++ | META.list Adds Wikidata::API |
09:25 | |
ecosystem: 3fd867a4f8 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | META.list Merge pull request #381 from JJ/master Adds Wikidata::API |
|||
09:27
konsolebox left
09:28
konsolebox joined
09:32
konsolebox left
09:33
geospeck joined,
konsolebox joined
09:35
poohman joined,
poohman left
|
|||
anop | thank you so much AlexDaniel | 09:36 | |
09:36
poohman joined
|
|||
DrForr | Last year I had a problem with network connectivity and the Advent calendar - I can do one if I can write and post it before I leave, should I reserve the 16th for me? | 09:36 | |
09:36
poohman left
09:37
sena_kun joined,
poohman joined,
poohman left
|
|||
AlexDaniel | DrForr: sure | 09:37 | |
huggable: advent | |||
huggable | AlexDaniel, Sign up to write an Advent blog post: github.com/perl6/mu/blob/master/mi...7/schedule | ||
09:37
ecocode_ joined,
poohman joined
09:38
poohman left,
sena_kun left,
poohman joined
|
|||
DrForr | Excellent. I had to cancel at the last minute, ISTR Zoffix moving one of his up to cover. | 09:38 | |
09:38
poohman left,
poohman joined,
Juerd_ joined
09:39
poohman left,
wictory[m] left,
Juerd left,
CIAvash[m] left,
BinGOs left,
zakharyas left,
sftp left,
Juerd_ is now known as Juerd,
sftp joined
09:40
zakharyas joined,
BinGOs joined,
BooK joined,
poohman joined,
poohman left,
sjn left,
poohman joined,
domidumont left,
poohman left
09:41
sjn joined,
poohman joined,
poohman left,
poohman joined,
poohman left,
john51 left,
poohman joined,
yoleaux left
09:42
poohman left,
john51 joined,
unicodable6 left,
greppable6 left,
poohman joined,
poohman left,
poohman joined,
domidumont joined,
poohman left,
reportable6 left
09:43
poohman joined
|
|||
Geth | mu: e356e71cc2 | (Jeff Goff)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule Expanding and expounding on my latest blog post Tips and tricks to help with writing Perl 6 tests |
09:43 | |
09:43
zakharyas left,
poohman left
|
|||
DrForr | 7th reserved as... we can all see now. | 09:43 | |
09:43
notbenh left,
poohman joined,
poohman left
09:44
poohman joined,
poohman left,
poohman joined
09:45
poohman left,
poohman joined,
poohman left
|
|||
anop | what is diff between Promise.anyof and Promise.allof | 09:45 | |
09:45
notbenh joined
|
|||
anop | what is diff between Promise.anyof() and Promise.allof() | 09:45 | |
09:46
poohman joined,
wictory[m] joined,
CIAvash[m] joined
|
|||
moritz | anop: .anyof is fulfilled when at least one of the promise is fulfilled | 09:46 | |
09:47
poohman left
|
|||
DrForr | Blocking on all of the Promises completing vs. just one of the list... | 09:47 | |
moritz | and alloff waits for all of them to be finished (kept or broken) | ||
DrForr | ("blocking" is probably the wrong term tere.) | ||
*there | |||
09:47
poohman joined,
poohman left
|
|||
anop | thanks moritz, that means .anyof for at least one promise should kepp | 09:48 | |
thanks moritz, that means .anyof for at least one promise should keep | |||
thanks moritz, that means .anyof for at least one promise should be keep | |||
09:48
poohman joined,
poohman left,
poohman joined,
poohman left
09:49
poohman joined,
poohman left,
poohman joined,
poohman left
|
|||
Geth | mu: 994989602f | ven++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule add myself on the 20th |
09:50 | |
09:50
poohman joined,
poohman left
09:51
poohman joined,
poohman left
09:52
poohman joined,
poohman left,
poohman joined,
poohman left
09:53
poohman joined,
poohman left,
poohman joined,
poohman left
09:54
poohman joined,
poohman left
09:55
khisanth_ joined,
poohman joined,
TEttinger left,
poohman left
09:56
domidumont left,
poohman joined,
poohman left,
poohman joined
09:57
poohman left,
poohman joined,
domidumont joined,
poohman left,
poohman joined,
poohman left
09:58
poohman joined,
poohman left,
poohman joined,
Khisanth left,
poohman left
09:59
poohman joined,
poohman left,
poohman joined,
poohman left
10:00
konsolebox left
10:01
konsolebox joined,
Cabanossi left
10:03
poohman joined,
Cabanossi joined,
poohman left,
poohman joined,
poohman left
10:04
poohman joined,
poohman left,
poohman joined,
nightfro` joined
10:05
poohman left,
poohman joined,
poohman left,
eythian_ joined,
eythian_ left,
eythian_ joined
10:06
poohman joined,
poohman left,
poohman joined,
poohman left
10:07
poohman joined,
poohman left
10:08
konsolebox left,
poohman joined,
poohman left,
dakkar left
10:09
tyil[m]1 joined,
poohman joined,
poohman left,
rgrau left,
Geth left,
SourceBaby left,
synopsebot left,
dalek left,
jhill left,
nightfrog left,
pi2 left,
cpage left,
xui_nya[m] left,
tyil[m] left
10:10
nightfro` is now known as nightfrog,
poohman joined,
poohman left,
dakkar joined
10:11
poohman joined,
lizmat left,
jhill joined,
poohman left
10:12
albongo joined,
evalable6 left,
mtj_ joined
10:13
poohman joined,
poohman left
10:14
xui_nya[m] joined,
poohman joined,
poohman left,
eythian_ is now known as eythian,
poohman joined,
poohman left
10:15
konsolebox joined,
rgrau joined,
Geth joined,
SourceBaby joined,
synopsebot joined,
dalek joined,
tolkien.freenode.net sets mode: +vvvv Geth SourceBaby synopsebot dalek,
pi2 joined,
cpage joined,
salva joined,
poohman joined,
poohman left
10:16
poohman joined
10:17
poohman left,
poohman joined,
poohman left,
poohman joined
10:18
poohman left
10:20
poohman joined,
poohman left
10:23
poohman joined,
poohman left
10:24
konsolebox left
10:25
poohman joined,
poohman left,
poohman joined,
poohman left
10:26
poohman joined,
konsolebox joined,
poohman left
10:27
lowbro left,
poohman joined,
poohman left,
poohman joined
10:28
poohman left
10:29
poohman joined,
poohman left
10:30
poohman joined,
poohman left,
wamba joined
10:31
margeas joined
|
|||
jnthn | wander: The should always be an unambiguous first thing to dispatch to. Re-dispatch works by calculating all of the possible targets, then excluding the first one, and then iterating through those. | 10:37 | |
wander | aha, that's it. | 10:38 | |
thank you. | |||
El_Che | hey jnthn, coming to next fosdem? | 10:39 | |
DrForr | I would ask the same of you :) | ||
(if I haven't already.) | |||
El_Che | hehe | 10:40 | |
jnthn | wander: I mean, conceptually nextsame works by iterating a candidate list calculated at the point of the original dispatchy | ||
wander: But if we implemented it like that then performance would be pretty terrible | 10:41 | ||
So we cheat and hope to not get caught. ;) | |||
I think the refusal to dispatch to an unambiguous first candidate makes that safe. | |||
Since we know that calculating the list upon first use of nextsame using the original arguments, then dropping the first result, means that the result we drop matches the one we'd originally hit | 10:42 | ||
wander | then we have cached it? | 10:46 | |
DrForr | Now I just have to remember to write the bloody Advent post... | 10:47 | |
jnthn | wander: We use a cache to resolve initial dispatches, yes (of course, the first time we call them the cache has no entry) | ||
10:48
konsolebox left
10:49
konsolebox joined
|
|||
El_Che | DrForr: that's the price you pay for fame | 10:51 | |
DrForr | H*ll, I'm starting to get people cold-emailing me about doing presentations... | 10:53 | |
It's almost like they think I know what I'm doing. | 10:54 | ||
El_Che | DrForr: really? Nice to hear that | ||
10:54
konsolebox left
|
|||
DrForr | Yeah. CloudFoundry was the latest. | 10:55 | |
10:55
konsolebox joined
|
|||
DrForr | Grabbing lunch, back in a bit. | 10:55 | |
El_Che | Talk about what mostly? P6? p5? origami? | ||
10:58
Ven`` left
|
|||
jnthn | El_Che: Most likely won't make fosdem this time around | 10:59 | |
11:00
konsolebox left
|
|||
El_Che | with all the improvements of the last few years, that was a good PR opportunity. | 11:00 | |
jnthn: I understand, though | |||
11:01
konsolebox joined
|
|||
El_Che | DrForr: are you coming? | 11:03 | |
DrForr | FOSDEM? If I can, definitely. | 11:04 | |
El_Che | I asked because you moved recently and stuff | 11:05 | |
DrForr | I'd end up totally rethinking my machine learning stuff, which is probably a good thing. | ||
11:05
xui_nya[m] left,
donaldh left
|
|||
DrForr | I'm now in a vastly more convenient place to be able to get in and out of. | 11:05 | |
(checking on Brussels flights, come to think of it.) | 11:06 | ||
11:06
dakkar left,
wamba[m] left,
M-Illandan left,
cdg joined
|
|||
DrForr | I took flybe ... holy f*ck, $67 roundtrip Prague-Brussels Friday-Monday of FOSDEM. | 11:08 | |
11:09
donaldh joined
11:10
itaipu joined
|
|||
jnthn | El_Che: Well, there'll be *even more* improvements by the year after ;) | 11:10 | |
11:11
cdg left
11:12
dakkar joined
11:13
AlexDaniel` left
11:14
Matthew[m] left,
Garland_g[m] left,
wictory[m] left,
mack[m] left,
mienaikage left,
tadzik left,
unclechu left,
tyil[m]1 left,
CIAvash[m] left,
ilmari[m] left
11:16
DickClarke joined
11:17
cdg joined,
ribasushi left
11:18
xinming_ joined,
konsolebox left
|
|||
Geth | mu: 94e497bc85 | (Zoffix Znet)++ (committed using GitHub Web editor) | misc/perl6advent-2017/schedule Emptify schedule |
11:18 | |
11:18
konsolebox joined
11:20
ribasushi joined
11:21
xinming left,
cdg left
11:26
konsolebox left
|
|||
perlawhirl | Can I clone/copy a sequence so I can iterate over it again. ie, not cache all the values, but copy the Seq and re-generate it | 11:27 | |
m: my $x = (1...3); .say for gather for ^3 { for $x[] { .take } } | |||
camelia | 1 This Seq has already been iterated, and its values consumed (you might solve this by adding .cache on usages of the Seq, or by assigning the Seq into an array) in code at <tmp> line 1 in block <unit> at <tmp> line 1 2 3 |
||
11:28
konsolebox joined
11:34
scimon left
|
|||
Geth | doc: 82bec53180 | (Tom Browder)++ (committed using GitHub Web editor) | doc/Language/tables.pod6 update to current state of table handling |
11:36 | |
synopsebot | Link: doc.perl6.org/language/tables | ||
11:41
yoleaux joined,
ChanServ sets mode: +v yoleaux,
astj joined
|
|||
SmokeMachine | m: use Test; sub roundtrip ( $name ) {|sprintf( "%s", $name ) eq $name, "'$name' round trips.”}; ok roundtrip “a” | 11:42 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse expression in double quotes; couldn't find final '"' (corresponding starter was at line 1) at <tmp>:1 ------> 3'$name' round trips.”}; ok roundtrip “a”7⏏5<EOL> expe… |
||
SmokeMachine | m: use Test; sub roundtrip ( $name ) {|sprintf( “%s”, $name ) eq $name, “'$name' round trips.”}; ok roundtrip “a” | 11:43 | |
camelia | ok 1 - | ||
11:44
gregf_ left
|
|||
SmokeMachine | m: use Test; sub roundtrip ( $name ) {slip sprintf( “%s”, $name ) eq $name, “'$name' round trips.”}; ok roundtrip “a” | 11:44 | |
camelia | ok 1 - | ||
SmokeMachine | m: use Test; sub roundtrip ( $name ) {sprintf( “%s”, $name ) eq $name, “'$name' round trips.”}; ok |roundtrip “a” | ||
camelia | ok 1 - 'a' round trips. | ||
DrForr | That code looks suspiciously familiar :) | ||
SmokeMachine | :) | ||
DrForr | I was wondering if slip() would work. | 11:45 | |
11:45
astj left
|
|||
SmokeMachine | DrForr: yes... it didn’t... :( | 11:45 | |
11:45
lowbro joined,
lowbro left,
lowbro joined
|
|||
DrForr | Yeah, slip() just returns the list in this context which still returns as a List. I suspect there's a way to jigger around with the signature to get the effect I wanted, but I was already at nearly midnight. | 11:47 | |
And it's really gratifying to see that someone's actually reading this stuff :) | |||
SmokeMachine | m: use Test; sub roundtrip ( $name ) {|[sprintf( “%s”, $name ) eq $name, “'$name' round trips.”]}; ok roundtrip “a” | ||
camelia | ok 1 - | ||
SmokeMachine | :( | ||
DrForr | 453 reads in the last ~3 days... | 11:48 | |
SmokeMachine | :) was that was a very good post! | ||
DrForr | Thanks. | 11:49 | |
Practically all of the views from the US, which should come as no surprise. Australia and Canada being almost even counts as a surprise though. | 11:53 | ||
Next one will probably be my blogspot poster I'm writing. | 11:54 | ||
12:02
yoleaux left,
yoleaux joined,
ChanServ sets mode: +v yoleaux
12:06
wander left
12:07
sena_kun joined
12:08
scimon joined
12:12
silug left
|
|||
SmokeMachine | You had at least 1 read from Brazil... :) | 12:13 | |
DrForr | It's only showing the top 10... :/ | 12:15 | |
12:22
cdg joined
12:25
konsolebox left,
mienaikage joined
12:26
konsolebox joined
12:27
cdg left
12:34
konsolebox left
12:35
konsolebox joined
12:43
rgrau left
12:44
dustinm` left,
cdg joined
12:47
konsolebox left
12:49
konsolebox joined,
cdg left
12:50
zakharyas joined
12:53
dustinm` joined
12:59
wamba left
13:02
lizmat joined,
go|dfish joined,
Cabanossi left
13:03
Cabanossi joined
13:04
pmurias joined
|
|||
pmurias | hmm, how can I emulate a signed to unsigned integer conversion in js? | 13:05 | |
for signed to smaller signed I do something like: value << 24 >> 24 (to emulate a 8 bit integer) | 13:06 | ||
13:08
jeromelanteri left
13:11
tyil[m] joined,
mack[m] joined,
tadzik joined,
unclechu joined,
CIAvash[m] joined,
AlexDaniel` joined,
wictory[m] joined,
wamba[m] joined,
M-Illandan joined,
ilmari[m] joined,
xui_nya[m] joined,
Matthew[m] joined,
Garland_g[m] joined
|
|||
DrForr | Uh, what's with the [m] markers? | 13:11 | |
13:12
konsolebox left
13:13
lizmat left
13:14
lizmat joined,
konsolebox joined
13:17
lizmat left
13:19
konsolebox left
13:21
konsolebox joined
13:26
HoboWithAShotgun joined
13:28
bdmatatu joined
|
|||
HoboWithAShotgun | ok, so i got my hands on this R500 thinkpad with win10 on it and thought it'd be fun to benchmarck the windows rakudo vs a linux subsystem rakudo | 13:28 | |
easy fun for an evening right? wrong. the thing has been off for a year and it is still updating. for like 16 hours now. | 13:29 | ||
El_Che | HoboWithAShotgun: :) | ||
I bet it didn't ask you when to update? | |||
HoboWithAShotgun | well it has to. the linux subsystem is new and requires the creators update | 13:30 | |
*has to update | |||
13:30
cdg joined
|
|||
HoboWithAShotgun | it`s a neat little thing that thinkpad. i think i gonna put an ssd in it | 13:32 | |
the 60gig ones now get sold as doorstoppers so i think i gonna pick one up | 13:33 | ||
13:35
cdg left,
konsolebox left
13:37
wander joined
|
|||
wander | jnthn: I still find it weird that we don't apply textual ordering in this case ↓ | 13:37 | |
13:37
wamba joined
|
|||
timotimo | HoboWithAShotgun: updating a windows machine is much faster when you use wsusofflineupdater | 13:37 | |
wander | m: multi sub f(Int \a, Any \b) { } ;multi sub f(Any \a, Int \b) { } f(42, 42); | 13:38 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Strange text after block (missing semicolon or comma?) at <tmp>:1 ------> 3\b) { } ;multi sub f(Any \a, Int \b) { }7⏏5 f(42, 42); expecting any of: infix infix stoppe… |
||
wander | m: multi sub f(Int \a, Any \b) { } ;multi sub f(Any \a, Int \b) { }; f(42, 42); | ||
camelia | Ambiguous call to 'f'; these signatures all match: :(Int \a, \b) :(\a, Int \b) in block <unit> at <tmp> line 1 |
||
jnthn | wander: That only applies to tie-breakers | ||
wander | and we really use it when re-dispatch | ||
jnthn | This is a type match | ||
wander | m: multi sub f(Int \a, Int \b) { say '0'; nextsame }; multi sub f(Int \a, Any \b) {say '1'; nextsame } ;multi sub f(Any \a, Int \b) {say '2'; nextsame }; f(42, 42); | 13:39 | |
camelia | 0 1 2 |
||
jnthn | I guess in that case we build the DAG in such a way that it happens to toposort (in this case at least) such that the nextsame visits the things in source order. | 13:40 | |
HoboWithAShotgun | timotimo: interesting | 13:41 | |
jnthn | But nextsame is about iterating all possible candidates | ||
wander | as to multi dispatch, we choose *one* candidate, so there is no DAG built? | 13:42 | |
jnthn | There's always a DAG built | ||
That's how we decide the order to consider candidates in the first place | |||
13:42
konsolebox joined
|
|||
jnthn | Just saying that it's pure luck that you get 012 and not 021 | 13:42 | |
wander | there should be, all that confuse me is the inconsistent | ||
jnthn | Oh, actually...maybe not | ||
I guess it has to preserve that order for tie-breaking where clauses | 13:43 | ||
Well, I guess we could change it so nextsame and friends also blow up with ambiguity errors | 13:44 | ||
But I'm not sure if that's helpful :) | |||
13:44
mson joined
|
|||
jnthn | But overall, I'm not sure one should expect two different things to be consistent | 13:48 | |
When you want to call one thing, there must be an unambiguous result. When you are iterating things, as next* does, then it's not an issue if there's multiple things that could be visited. | |||
13:50
philomath joined
13:52
cdg joined
|
|||
wander | even if in which order we iterate thing is unclear? it looks like we iterate these candidates by the order same as how we choose the first one. and now it tells me for some candidates, the order is random | 13:53 | |
we define some tie-breaker and then define textual ordering as tie-breaker's tie-breaker | 13:54 | ||
why not textual ordering itself be a tie-breaker | 13:55 | ||
HoboWithAShotgun | an explicit call and one via nextsame may be different things, but i'd expect this to blow | 13:58 | |
jnthn | Because ambiguous dispatches on type are very rarely what anyone intended | ||
[Coke] | japhb++ | ||
HoboWithAShotgun | that's the point, it's rarely intended and ambigious and it should at least produce a warning | 13:59 | |
jnthn | Then write a patch to make nextcall explode in that case, and we can see what the impact is. | 14:00 | |
HoboWithAShotgun | i'll keep my feet onto the userland, you guys do the kernel shit tyvm :) | 14:01 | |
14:01
itaipu left
|
|||
wander | yes, it's rare | 14:02 | |
HoboWithAShotgun | i mean it's not that i wouldn't do it. i'm just not qualified. | ||
jnthn | An alternative is to try and detect all of these cases at compile time | ||
14:03
itaipu joined
14:04
sena_kun left,
sena_kun joined
|
|||
wander | anyway, always i like perl6. these stuff become problem at the situation where i recommend perl6 to friends, when we talk about some details. | 14:06 | |
DrForr | You don't have to tell them about *all* the gory details :) | 14:13 | |
14:14
drigglearray joined
|
|||
drigglearray | Hello | 14:14 | |
I'm having trouble getting concatenation inside loops to work | |||
DrForr | Put your code up in a gist and we can take a look :) | 14:15 | |
drigglearray | Okay, one sec | 14:16 | |
:D | |||
14:16
philomath left,
philomath joined
|
|||
drigglearray | pastebin.com/mwmz3Hfu | 14:17 | |
DrForr | You're declaring $espace_r each time through the loop. Try declaring it before the loop. | 14:19 | |
Alternatively you could use 'state $espace_r = 0;' and it'll get initialized once, then used every subsequent time. | 14:20 | ||
And you're initializing it to a number, and concatenating a string. | |||
14:23
philomath_ joined
|
|||
wander | as our tie-breakers of PEGs, textual ordering always works. it looks like we believe when users deal with PEGs, they know what happens(textual ordering matters). | 14:23 | |
then for the very case of multi dispatch, we assume when users define 'ambiguous' candidates, that is a mistake. | |||
and when they use tie-breaker explicitly, we trust them again, saying they know textual ordering matters. | 14:24 | ||
DrForr | Also, you want ~= in order to concatenate *to* something, just using '~' will return the concatenated string, not store it. | ||
14:24
philomath left
|
|||
drigglearray | Thanks DrForr, will try all your advice and report back with the results | 14:24 | |
DrForr | for reverse(100..2) -> $m { state $espace_r; $espace_r ~= $m } | 14:25 | |
14:25
silug joined
14:31
zakharyas left
|
|||
drigglearray | Many thanks DrForr, it looks like the main issue was solved by using ~= instead of ~ | 14:31 | |
DrForr | No worries. | 14:33 | |
14:44
philomath_ left,
koto joined
14:46
sena_kun left
14:48
mcmillhj joined
|
|||
[Coke] writes a few paragraphs for the advent article so that when he forgets about it for 3 weeks, he's doesn't have to start on an empty page. | 14:53 | ||
s/he's/he/ | |||
14:53
drigglearray left
14:54
HoboWithAShotgun left
14:56
wander left,
philomath joined
14:59
koto left
|
|||
dpk | how is the regexp :ignoremark semantic actually defined? | 14:59 | |
accent normalization was removed from Unicode | |||
(actually it was never formally in, it was withdrawn while still at draft stage) | |||
15:00
comborico1611 joined
|
|||
dpk | uh, and by 'accent normalization' i of course mean diacritic folding | 15:00 | |
NFK?[CD] are of course still there | |||
does it just NFD the input string and ignore characters in the mark category (Mn etc)? | 15:01 | ||
15:01
Cabanossi left
15:02
pmurias left
15:03
Cabanossi joined
|
|||
timotimo | it only compares against the base character of each nfg grapheme | 15:04 | |
jnthn | Hm, I think if NFDs the grapheme and looks at the first decomposed codepoint | ||
15:04
philomath_ joined
|
|||
dpk | how do you define the base character then? | 15:04 | |
jnthn | Well, only has to NFD the first codepoint, of course | ||
15:05
philomath left,
philomath_ left
|
|||
timotimo | i believe that's based on append and prepend properties? | 15:05 | |
dpk | base characters are obvious for characters like é but less obvious for Hangul | ||
15:05
philomath_ joined
|
|||
dpk | (for Hangul you probably want ignoremark to do nothing …) | 15:05 | |
15:07
philomath_ is now known as philomah,
philomah left
15:14
Slayerk joined
|
|||
dpk | okay, it does seem to dtrt for Hangul at least, based on messing around with Rakudo a bit | 15:15 | |
15:15
philomath joined
|
|||
Slayerk | Is there any way to turn integers into strings so they give a valid .elems value? | 15:16 | |
timotimo | what is a valid .elems value for an integer that's turned into a string? | 15:17 | |
dpk | Slayerk: (sprintf "%d", 123) | ||
(probably a quite heterodox way to do it …) | 15:18 | ||
timotimo | i'd literally just 123.Str, but what would you expect from .elems rather than just 1? | 15:19 | |
dpk | oh, that's how you do it | ||
Slayerk | Well, I'd want it to give me the length of the integer | ||
timotimo | oh | ||
that's not elems, that's chars | |||
Slayerk | For instance, the .elems value of 123 would be 3? | ||
timotimo | m: say 12345.chars | ||
camelia | 5 | ||
timotimo | no need to convert to string first, because it's one of the "Cool" methods that automatically coerce for you | ||
Slayerk | Nice! | 15:20 | |
comborico1611 | That's pretty cool, for sure. | ||
15:20
geospeck left
15:21
geospeck joined
15:23
xinming_ left
15:24
xinming joined
15:25
geospeck left
|
|||
Slayerk | Hmm, is there any way to loop through an integer? | 15:29 | |
masak | m: for 5179 { .say } | ||
camelia | 5179 | ||
masak | Slayerk: ^ | ||
jnthn | Do you mean the digits of it? :) | ||
masak .oO( From the department of Creative Misunderstandings ) |