»ö« 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 Zoffix on 25 May 2018.
00:15 markoong left 00:18 MasterDuke joined 00:23 |oLa| left 00:24 rindolf left 00:40 [particle] left 00:42 [particle] joined 00:48 [particle] left 00:53 kjk joined 01:09 [particle] joined 01:12 [particle] left 01:14 [particle] joined 01:17 comborico1611 left 01:22 klapperl joined 01:25 Khisanth left 01:39 Khisanth joined 01:41 Xliff left 02:23 Sgeo__ joined 02:27 Sgeo_ left
lookatme :) 02:45
03:02 eliasr left 03:30 Xliff joined
Xliff \op 03:30
Oops. \o
04:02 psychoslave joined 04:16 n1ge joined 04:17 kurahaupo left 04:18 kurahaupo joined 04:31 kjk left 04:35 mahafyi joined 04:52 kurahaupo left, curan joined 05:05 jmerelo joined, kurahaupo joined 05:13 kurahaupo left, kurahaupo joined 05:16 kurahaupo left 05:17 espadrine left 05:18 psychoslave left 05:19 xtreak joined 05:22 psychoslave joined 05:34 domidumont joined
Geth doc: 65c9c4f58a | (JJ Merelo)++ | doc/Type/List.pod6
List :as docs added closes #1162
synopsebot_ Link: doc.perl6.org/type/List
05:39 domidumont left, domidumont joined 05:41 kurahaupo joined 05:48 xtreak left 05:50 xtreak joined 05:52 wamba joined 06:05 Schepeers_ joined 06:06 Schepeers left 06:10 jmerelo left 06:12 Schepeers_ left 06:14 Schepeers joined 06:15 HaraldJoerg joined 06:17 skids left, Praise- joined, Praise- left, Praise- joined 06:19 Schepeers_ joined, Schepeers left 06:21 HaraldJoerg1 joined 06:22 HaraldJoerg left 06:24 Schepeers_ left 06:25 Schepeers joined 06:30 Schepeers left 06:33 Schepeers joined 06:39 robertle_ joined 06:40 domidumont left 06:43 psychoslave left 06:48 psychoslave joined 06:57 jmerelo joined 07:00 darutoko joined 07:03 cgfbee joined 07:07 domidumont joined 07:19 domidumont left 07:22 domidumont joined, psychoslave left 07:28 markoong joined, markoong left 07:29 markoong joined 07:41 zakharyas joined 07:45 dakkar joined 07:47 xtreak left 07:49 zakharyas left, zakharyas joined 07:53 sena_kun joined, psychoslave joined, HaraldJoerg1 is now known as HaraldJoerg 07:54 psychoslave left 08:11 epony joined, xtreak joined 08:15 mahafyi left 08:18 Xliff left 08:23 xtreak left, xtreak joined 08:25 xtreak left, jmerelo left, mahafyi joined 08:28 xtreak joined 08:39 ChoHag left 08:42 wbn joined 08:44 xtreak left 08:49 xtreak joined 09:12 kurahaupo left, kurahaupo joined 09:13 ChoHag joined 09:17 eliasr joined, w_richard_w left 09:18 kurahaupo_ joined, kurahaupo_ left, kurahaupo_ joined 09:21 kurahaupo left 09:25 zakharyas left 09:28 zakharyas joined 09:38 sena_kun left 09:42 rindolf joined
jkramer m: use HTTP::UserAgent; class Foo { has HTTP::UserAgent:D $.ua is rw .= new; } 09:42
camelia ===SORRY!===
Could not find HTTP::UserAgent at line 1 in:
jkramer Hmm
With HTTP::UserAgent installed this gives me the error message "You cannot create an instance of this type (HTTP::UserAgent:D)" 09:43
Without :D it works.
Oh guess it wants to call .new on HTTP::UserAgent:D, including the :D part? 09:44
Ulti jkramer :D on the end of a class name is a special type object for saying a *defined* one of these 09:48
you use it for saying in a function parameter you want only defined things like this
09:48 wamba left
Ulti just drop the :D for doing a .new() 09:49
unless I'm radically missing what you're upto?
jkramer Ulti: I want to ensure $.ua is always defined :)
This works though: has HTTP::UserAgent:D $.ua is rw = HTTP::UserAgent.new; 09:50
Ulti ahh intersting
jkramer It's just not as nice as .= new :)
Ulti yeah I guess the .new there is trying to call it on the :D
yeah I guess you want the :D declaration in the attribute if you're doing is rw 09:51
personally I wouldn't do it this way though since more likely you want a constructor that lets someone pass in optionally a user agent or not 09:52
one time rather than changing it all the time, at the moment you'd create a new user agent then throw it away if they put something else in 09:53
09:53 xtreak left
Ulti through the attribute rather than constructor that is 09:53
09:54 jmerelo joined
jkramer Well you can still set the agent via the constructor 09:56
There's little to no reason for the user to replace the user-agent actually but why limit them if they really want to :) 09:57
09:57 xtreak joined 10:11 kurahaupo_ is now known as kurahaupo, damnlie left 10:12 damnlie joined 10:14 jmerelo left 10:42 mahafyi left 10:44 psychoslave joined 10:47 psychoslave left 10:48 psychoslave joined 10:53 mahafyi joined 10:58 mahafyi left 11:01 mahafyi joined 11:11 mahafyi_ joined, mahafyi left, Schepeers left, mahafyi_ is now known as mahafyi 11:15 Schepeers joined 11:17 Schepeers left 11:19 Schepeers joined 11:21 mscha left, Schepeers left 11:23 Schepeers joined 11:29 raschipi joined 11:33 raschipi_ joined 11:36 raschipi left 11:39 raschipi_ is now known as raschipi
Ulti for the reason you create a class ;P 11:42
rather than have a global variable 11:43
11:55 noganex joined 12:09 lizmat left 12:10 lizmat joined 12:15 Actualeyes left, mahafyi_ joined, Actualeyes joined 12:16 mahafyi left, mahafyi_ is now known as mahafyi 12:42 xtreak left 12:43 zakharyas left 12:44 xtreak joined, xtreak left 12:50 mcmillhj joined 12:54 wamba joined 12:55 bdmatatu joined 12:57 jmerelo joined 13:00 curan left 13:02 jmerelo left 13:07 Tison joined 13:13 raynold left 13:16 Xliff joined 13:17 HaraldJoerg1 joined, HaraldJoerg left 13:21 ExtraCrispy left 13:22 ExtraCrispy joined 13:26 psychoslave left 13:42 psychoslave joined 13:44 sergot joined 13:48 Kaiepi left 13:49 Kaypie joined, Kaypie left
Geth doc: 9ca8115dd3 | (Will "Coke" Coleda)++ | doc/Language/system.pod6
fix type typo that broke compilation
synopsebot_ Link: doc.perl6.org/language/system
13:49 Kaypie joined
mahafyi Somewhat offtopic item: i used an example from jnthn to connect to postgresql with DB::Pg, the credentials are set as environment variables. There seems to be a ton of differing opinions whether to do that, or how else to store them. Whats the usual practice? 13:58
13:59 speedChicken left
jnthn mahafyi: fwiw, I do it that way because I deploy everything in containers, and it's a pretty standard (and convenient) approach there 14:00
mahafyi jnthn : oh ok thanks.
jnthn I guess how you deploy will guide your decision there 14:01
14:03 Xliff left 14:04 mcmillhj left 14:15 mcmillhj joined 14:20 mcmillhj left 14:28 zakharyas joined 14:31 mcmillhj joined 14:32 Schepeers left 14:36 mcmillhj left
moritz right, for a traditionally packaged app, a config file would be more typical 14:42
14:43 Schepeers joined, Schepeers left 14:46 robertle_ left
Ulti dunno even for traditionally packaged if you're in the cloud you often want to load balance on some env variables which read slave you hit etc. 14:47
usually I have a heirarchy of preferences for that stuff
where ENV variables always win out on configs
14:47 mcmillhj joined
jnthn Another option is that your config is actually a shell script that sets env vars and invokes :) 14:47
14:48 Schepeers joined 14:49 Schepeers left
moritz like the /etc/defaults/* mechanism in debian, for example 14:49
Ulti depends if you want the optional extra of local windows dev without effort 14:50
actually does Cro currently do any conf for you?
guess its not so much about the app layer of things 14:51
14:52 mcmillhj left
mahafyi no , i am not using Cro, but will learn soon i trust 14:53
14:53 Schepeers joined 14:54 Schepeers left
raschipi /etc/default is hideous, have the application itself detect what it should do instead of offloading it to the init system. 14:57
14:58 troys joined
Ulti yeah no worries I meant more generally, as Im starting to use it for my vanity site 14:58
14:58 mcmillhj joined
timotimo cro has "cro run" which sets env vars for you and such 14:58
14:59 mcmillhj left
timotimo cro.services/docs/cro-yml - it reads from this file 14:59
15:00 Schepeers joined, Schepeers left
timotimo it also watches your source dir for changes and restarts your app in that case 15:03
15:04 Schepeers joined
raschipi yuck 15:15
Ulti sounds good to me 15:16
raschipi can that be turned off?
config changes should be applied as a whole transaction
jnthn The `cro` command line tool is (and is clearly documented as) a development time only tool 15:17
Not something to run the system under when deployed
Ulti yeah you're talking about ensuring roll out to a forking server there surely raschipi ? 15:18
raschipi It's a recipe to have the server unavailable because it picked up changes before other necessary ones are in effect, like updating the firewall.
But it's fine in a development aid, sure.
jnthn Right, you're talking about deployment, which it isn't for. :-)
Ulti yeah for dev the magical just hack whats there right this second to the state Im trying to debug is invaluable 15:19
15:19 mcmillhj joined
El_Che jnthn: I like it in development, but you can be sure that once cro takes off people will use the cro command in production 15:20
(I would be myself tempted when wrapped in a container)
timotimo just force "cro run" and "cro trace" to make every 100_000th request take 10s to complete, that'll keep people from using it in production, but not hinder them in development 15:21
raschipi They will use the development tool in production, I guarantee it. But there's nothing a dev can do about that, people love to shoot themselves on the foot.
Ulti timotimo: lol maybe for sites that get a lot of traffic
timotimo ok, 1_000 would also be enough 15:22
15:22 domidumont left
jnthn El_Che: Yeah, it'll be like with docker compose, which was also not intended as a production tool. :) 15:22
Ulti I heard if you wrap things in enough abstractions it becomes production quality 15:23
El_Che yeah, we all collectively decided to throw the demo away :)
raschipi Qeue devs trying to debug cro, because sometimes it get's a long time to answer.
15:24 mcmillhj left
raschipi Besides, the only possible answer to that is to patch it away. 15:24
jkramer Or restart the service every 999 requests 15:28
El_Che breaking devtools in purpose is a bad thing 15:29
2 wrongs won't make it right
15:29 jmerelo joined
El_Che the cro command could be production ready, e.g. if the feature could be enabled/disabled with a cmd line switch 15:30
15:30 mahafyi left
El_Che the hashicorp tools like vault have a -dev switch, that gives you a simplified dev server (on localhost, etc) 15:31
it's a good approach
15:33 mcmillhj joined 15:34 kurahaupo left, kurahaupo joined, sena_kun joined, kurahaupo_ joined 15:36 maha_ joined, maha_ is now known as mahafyi 15:37 mahafyi left, mcmillhj left 15:38 mcmillhj joined 15:39 kurahaupo left 15:40 mahafyi joined 15:43 mcmillhj left, skids joined 15:46 mcmillhj joined, Matthias__ joined
Matthias__ hi all, seems like someone (I suspect moritz) changed the IRC logs so irclog.perlgeek.de/perl6/today leads to 404 while it should redirect to colabti.org/irclogger/irclogger_log...2018-06-11 (at least today). sorry for not fixing it directly, but at least wanted to let you know. 15:49
15:49 Matthias__ left 15:51 mcmillhj left, wamba left
jmerelo Matthias__ : they were closed due to the GDPR 15:51
lizmat that's something Zoffix would need to fix on his irc.perl6.party site
jmerelo I think you have to set up the redirecion locally... 15:52
lizmat jmerelo: moritz's sote redirects to Zoffix's site, but that one doesn't know how to handle /todat
jmerelo lizmat: ah, OK. I didn't know that...
15:53 zakharyas left, kurahaupo_ is now known as kurahaupo
lizmat it's going to be in the P6W :-) 15:53
15:55 kurahaupo left, kurahaupo joined 15:56 Zoffix joined, wamba joined
Zoffix I'm not gonna fix it. The 404 page tells what the right link is. I don't want people hitting my app all the time instead of just using the right link from the start. 15:57
15:58 mcmillhj joined 16:00 reportable6 joined
Zoffix .tell AlexDaniel since you're in contact with the colabti person maybe you could mention to them: I noticed the "today's log" URL (e.g. colabti.org/irclogger/irclogger_log/perl6 ) has an LTA behaviour. When a new day just starts, that page says "No data for the day" or whatever and there's no way to view log previous day. Would be nice to at least have that link there. 16:01
yoleaux Zoffix: I'll pass your message to AlexDaniel.
AlexDaniel also wanted to mention /today 16:03
btw I also asked for https some time ago :) 16:04
Zoffix: k, thanks
Zoffix: btw if you're touching the thing, you can probably already add a redirect for #perl6-dev #moarvm and #p6dev 16:05
Zoffix How? There's no data in the db
and perlgeek URLs for those channels don't redirect to irc.perl6.party either 16:06
AlexDaniel well, the logs will be populated shortly, I have the files ready 16:07
16:07 mcmillhj left
AlexDaniel the redirect should be added, but I guess we have to ping moritz about that? 16:07
Zoffix mhm 16:08
16:08 domidumont joined
AlexDaniel Zoffix: and the message id → hash lookup file is here: files.progarm.org/lookup 16:08
Zoffix: btw I think links like this are not working: irclog.perlgeek.de/perl6/2018-05-30 16:14
16:15 mcmillhj joined
moritz there should be no old links to pages that irclog.perlgeek.de never had 16:15
and if anybody creates new links, it's their own fault
HaraldJoerg1 m: my atomicint $a = 1; $a⚛️++; say $a 16:16
camelia 5===SORRY!5=== Error while compiling <tmp>
Bogus postfix
at <tmp>:1
------> 3my atomicint $a = 1; $a7⏏5⚛️++; say $a
expecting any of:
infix stopper
statement end
statement modifie…
HaraldJoerg1 m: my atomicint $a = 1; $a⚛++; say $a
camelia 2
AlexDaniel moritz: sure? 16:17
16:17 HaraldJoerg1 is now known as HaraldJoerg
AlexDaniel moritz: btw can you set up a redirect for #moarvm #perl6-dev and #p6dev ? That would be awesome 16:17
moritz AlexDaniel: redirect to where? 16:18
AlexDaniel moritz: to irc.perl6.party, much like #perl6 currently redirects
16:19 mcmillhj left
moritz AlexDaniel: done, please check if they work to your satisfaction 16:20
Zoffix I took the app down for a sec while I'm loading new hashes
oh wait, I didn't misspelt the stop command. Oh well 16:21
AlexDaniel the logs are not there just yet, but I'm waiting for colabti folks to come up online, so that's the last missing piece I think 16:22
Zoffix++ moritz++
16:22 psychoslave left, mcmillhj joined
lizmat and another Perl 6 Weekly hits the Net: p6weekly.wordpress.com/2018/06/11/...-redirect/ 16:26
Zoffix wooo \o/ 16:27
AlexDaniel: OK, hashes loaded 16:28
16:28 kubrat_ joined, kubrat_ left
AlexDaniel Zoffix: thank you! 16:29
lizmat fwiw, if we think chat logs are that important to Perl 6, we should house them ourselves under irclog.perl6.org, I would think 16:31
Zoffix +1 16:32
Though, perl6.org infrastructure is moritz's so we're back at the GDPR issue :) 16:33
moritz I'm happy to delegate the subdomain to another IP address
lizmat not sure, as moritz is sysadmin on that, not responsible for the site itself
as that would be the Perl Foundation, afaik 16:34
moritz well, if you host PII with a 3rd party, you need a contract with them
and I'm not providing such a contract for the Perl 6 infrastructure
AlexDaniel lizmat: “is worked” in the first paragraph :) 16:36
Zoffix AlexDaniel: and this works now: irclog.perlgeek.de/perl6/2018-06-11
AlexDaniel Zoffix: o that's awesome, thank you!
lizmat AlexDaniel++ # was fixo, first read "is working" :-) 16:37
Zoffix "So far, the Perl 6 presentations are in a majority" woooooo \o/ 16:44
jmerelo So, who's going? 16:45
El_Che that's a first
lizmat is going :)
El_Che that's a first 16:46
jmerelo has plane tickets already
lizmat is going to do www.perlworkshop.nl/nlpw2018/talk/7388
aka "The Future Of Perl Is Here"
moritz ... it's just not evenly distributed 16:47
lizmat :) 16:48
El_Che lizmat: I suggest you wear this: bit.ly/2JuQVyP
Zoffix lizmat++ # good weekly 16:49
El_Che is looking at rurban's comment on speed
.oO( some people are equal opportunity offenders )
jnthn wonders whether the reader or the author are on speed... 16:51
El_Che lol
Zoffix :)
16:51 dakkar left
El_Che it's not because you're paranoid that they aren't after you 16:51
16:51 dataangel left 16:52 dataangel joined
lizmat El_Che: not so worried about the NLPW 16:52
[Coke] reads rurban's comment linked to from the weekly and is not sure if that is pro 6 or anti 6.
jmerelo thanks lizmat for her kind words in the weekly
El_Che I find it weird he mentions p2, pony and parrot as arguments
[Coke]: it could be pro perl6 as a language, but against its implementation 16:53
lizmat fwiw, I always thought it was PONIE
jmerelo adds there was also a cake and I got a prize for it :-) jj.github.io/manzanachos-con-natamole/
El_Che "I think I'm the only one in the Perl community working on a VM which is actually that fast, pony. It's also properly designed and has a proper and safe concurrency model. The only other VM besides parrot."
jmerelo El_Che: sorry, I'm lost here... What are we talking aout?
El_Che www.reddit.com/r/perl6/comments/8p...n_average/
from the weekly 16:54
lizmat El_Che: I may need the flame retardant more at perlconference.us/tpc-2018-slc/ses...ly-plan-2/
raschipi I think [Coke] meant this one: news.ycombinator.com/item?id=17244677
El_Che yeah, the backslash was mostly from the USA, I remember 16:55
16:55 Zoffix left
[Coke] as far as I know, parrot has been the bad stable for some kind, and I thought pony was long dead. 16:55
"for some *time*"
El_Che if you kick a dead ponie and it moves, ...
raschipi Oh, he's in both.
16:56 gregf_ joined
[Coke] ah. ok, that is very clearly anti p6. 16:56
El_Che it would make his argument stronger if there were no personal attacks
[Coke] (the reddit link)
El_Che it reads as a rant
.oO( stream of subconsciousness )
[Coke] I unfortunately have to basically discount everything Reini says because he cannot separate the tech discussion from anything else.
raschipi In the reddit thread he is against the implementation. In the hackernews thread, he is against the language.
16:58 nnunley left 16:59 nnunley joined
jmerelo I can see a meme with the words "It's tainted its name, and it's doomed" With many more o's, probably. 17:00
gregf_ p6: say "test " x 10 17:02
camelia test test test test test test test test test test
17:07 molaf joined 17:12 telex joined 17:14 Guest75834 left, jmerelo left 17:18 hythm_ joined 17:19 wamba left
hythm_ P6: my @a = <1 2>; sub(:@a) { say @a }; s(:@a); 17:20
p6: my @a = <1 2>; sub(:@a) { say @a }; s(:@a);
camelia 5===SORRY!5===
Word 'sub' interpreted as 'sub()' function call; please use whitespace around the parens
at <tmp>:1
------> 3my @a = <1 2>; sub7⏏5(:@a) { say @a }; s(:@a);
Unexpected block in infix position (two terms in a row)
at …
hythm_ p6: my @a = <1 2>; sub s(:@a) { say @a }; s(:@a); 17:21
camelia [1 2]
hythm_ p6: my @a = <1 2>; sub s(Int :@a) { say @a }; s(:@a);
camelia Type check failed in binding to parameter '@a'; expected Positional[Int] but got Array ($[IntStr.new(1, "1"),...)
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
hythm_ How can i have Int constrain on @a? 17:22
jnthn Declare the array as my Int @a
hythm_ Makes sense, Thanks jnthn 17:24
raschipi hythm_: Array[Int] is different from an Array with Ints on it. For performance reasons. 17:25
17:26 wamba joined
hythm_ rashcipi: noted. 17:27
lizmat m: dd my Int @a # raschipi: not sure that's true 17:28
camelia Array[Int] @a = Array[Int].new()
jnthn I think the point was that it's a different *type*
Which is true, and the thing that matters here
raschipi And signatures won't accept one for the other. 17:29
There's a way to ask for an array with Ints using where, but I don't remember the idiom.
hythm_ p6: my Int @a = <1 2>; sub s(:@a) { say @a }; s(:@a); 17:30
camelia [1 2]
timotimo [Coke]: fwiw i believe ponie and pony are two rather different things 17:32
ponie was supposed to be perl5 on parrot, pony is a new language iirc
17:33 wamba left
ilmari wasn't there a perl 1 on parrot as well? 17:33
17:34 psychoslave joined
[Coke] timotimo: well, that's embarrasing. Thanks for letting me know! 17:42
ilmari: wasn't a full impl., as I recall. something allison had worked on
17:44 pecastro joined 17:50 giraffe joined, giraffe is now known as Guest9306 17:51 hythm_ left 18:00 espadrine joined 18:05 HaraldJoerg1 joined
timotimo shouldn't rakudo have become "as fast as c" when we published perl6.c? 18:05
18:05 HaraldJoerg left
El_Che timotimo: you're evil 18:06
masak you can't ever achieve c, not if you have nonzero mass 18:07
El_Che new Science Fiction series have FTC space ships 18:09
timotimo the obvious way to be faster than C is not having to go the long way around 18:10
that's how pypy got their one Faster Than C blog post where they measured pypy's string format against C's sprintf 18:11
because their formatting got turned into static code because the format string was constant
18:11 comborico1611 joined
timotimo but sprintf had to evaluate it over and over 18:11
Juerd masak: lol 18:16
El_Che the pypy approach is a no go. rakudorakudo is way too long
18:18 brrt joined
Juerd It'd be rara... Not sure if that's better. 18:18
18:21 sauvin left
masak I think Lady Gaga already tried that. 18:22
raschipi Just call it 駱駝駱駝 18:25
comborico1611 I will rejoice when that satanist is dead.
geekosaur can we, er, take that kind of talk elsewhere? 18:28
yo're welcome to your opinions but this is not the place for them
comborico1611 Oh. I didn't realize I'd be censored. Sorry about that. 18:30
geekosaur how many people do you see here mouthing off? 18:32
comborico1611 Exactly where in my two statements that I've made today, did I "mouth off"? 18:33
raschipi The first. 18:34
18:35 ExtraCrispy left 18:42 Xliff joined 18:43 wamba joined 18:47 HaraldJoerg1 is now known as HaraldJoerg
masak comborico1611: are you here for the #perl6? :) 18:48
geekosaur they've been doing perl 6 for a while 18:50
and mostly well behaved, up to then
masak goodie. I have a hard time staying up to sync nowadays ;) 18:51
moritz too 18:54
masak in many cultures, it is considered impolite to rejoice at someone's demise
but more shocking, I think, was the non sequitur 18:56
timotimo yeah, that swung from light-hearted banter and puns to that ... 18:58
masak m: sub shuffle($l) { $l.pick(*) }; sub balanced($s) { so all([\+] $s.comb.map(-> $c { $c eq "(" ?? 1 !! -1 })) >= 0 }; repeat until balanced(my $s) { $s = ("(" xx 5, ")" xx 5).flat.&shuffle.join }; say $s 19:05
camelia ()(()()())
masak there. that should make the discussion more balanced.
moritz nice use of triangle reduce, masak++ 19:07
masak I don't reduce often...
moritz m: say ord '('
camelia 40
masak ...but when I do, I trangle reduce
moritz m: say ord ')'
camelia 41
masak moritz: oh no no no no :)
moritz masak: you know me far too well :-)
masak you're having impure thoughts 19:08
[Coke] IMO, wishing someone dead is grounds for an outright ban. 19:10
moritz I've learned much of the Art of Evil Shortcut by reading my predeccor's code at $work
[Coke]: I wish death to far too many people to support that. It's just that on good days, I can contain myself 19:11
masak .oO( IMO, people wishing someone dead should be shot on sight )
masak .oO( sincerely, Epimenides ) 19:12
raschipi masak, noted
masak moritz: the containment is actually a monad. in Haskell, it's in Control.Monad.Dead.Lazy 19:15
AlexDaniel quotable6: dead
quotable6 AlexDaniel, OK, working on it! This may take up to three minutes (4582161 messages to process)
AlexDaniel, 3756 messages (2005-02-28⌁2018-04-26): gist.github.com/d1ef66c8fa6642a3c6...bc68d1ea76 19:16
masak "not to beat a dead horse, but aside from inertia and masak and the pain of switching, why are we still using rt.perl.org ?" -- ouch :)
AlexDaniel I also like this one 19:17
“It's really flappy. Two runs dies right away, then many runs doesn't die: gist.github.com/zoffixznet/9ee7467...a33498099”
19:17 comborico1611 left
AlexDaniel for a bit I was trying to figure out how it matched “dies” from /dead/ 19:17
:) 19:18
masak haha
masak too
timotimo wow, nice
masak that's death for ya. sneaks up on you.
you're enjoying a standard SHA-1, and then, BOOM! 19:19
raschipi there's dead
masak you try to act cool about it, like
"nice to see you there, dead"
but it's too late. the day is ruined 19:20
can someone calculate the probability of the substring "dead" happening in a uniformly random 40-hexdigit string? I can almost see how to calculate it, but I'm a bit tired. 19:25
19:26 Zoffix joined
masak in a 4-hexdigit string it's already 0.0015, so... it's unlikely. 19:27
Zoffix masak: 4⁴*10?
m: say 4⁴
camelia 256
Zoffix err
m: say (1/40)⁴
camelia 0.00000039
masak Zoffix: I think there's an assumption in there about 10 non-overlapping 4-digit segments, which is not how it works.
Zoffix masak: how did you get 0.0015?
masak Zoffix: 1 / 16 ** 4
Zoffix Oh duh, I've used 40 :P 19:28
masak * 100, although I neglected to say it was a percentage :/
19:28 domidumont left
masak 0.0015% 19:28
Zoffix masak: and there are 36 trials, right? 19:29
masak 37, methinks
Zoffix m: say +(10⁴⁰).comb.rotor: 4 => -3
camelia 38
Zoffix m: say (1/16)⁴*38 19:30
camelia 0.00058
masak but they're not independent
.oO( good enough approximation for a physicist :D )
masak moritz: this is why we can't have nice things :P
AlexDaniel 0%, good, let's move on. :P
Zoffix Why not? I can shuffle 40 chars, by shuffling each segment of 4 and seeing if I got "dead"
masak Zoffix: because "dead" might not fit neatly in such a segment 19:32
it might straddle two
moritz Zoffix: if the 4th character is a 0, that stops 4 possible substrings from being "dead"
Zoffix ok 19:33
masak moritz said it better
AlexDaniel m: say (1/16)⁴ * 29
camelia 0.000443
AlexDaniel has no idea what he is doing
masak this, interestingly, is also the basis of Knuth-Morris-Pratt
Zoffix m: say (sum do for ^10000 { ('a'…'z', 0…9).flat.pick(40).contains: 'dead' and 1 or 0 })/10000 19:34
AlexDaniel that should be a good approximation :)
camelia 0
Zoffix hah 19:35
masak and so it was
moritz a..f, not a..z
Zoffix m: say ('a'…'z', 0…9).flat.pick(40)
camelia (4 v r t 6 g o c b k z 7 3 h a s m f d 8 j u y 9 5 w p q e i n 2 0 l x 1)
masak right. hexdigits.
Zoffix m: my \c := ('a'…'f', 0…9).flat; my \n = 10_000; say (sum do for ^n { c.pick(40).contains: 'dead' and 1 or 0 })/n 19:36
camelia The iterator of this Seq is already in use/consumed by another Seq
(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
moritz m: say (sum do for ^10000 { ('a'…'f', 0..9).flat.pick(40).join.contains: 'dead' and 1 or 0 })/10000
camelia 0
Zoffix m: my \c := ('a'…'f', 0…9).flat.cache; my \n = 10_000; say (sum do for ^n { c.pick(40).contains: 'dead' and 1 or 0 })/n
camelia 0
Zoffix m: my \c := ('a'…'f', 0…9).flat.cache; my \n = 100_000; say (sum do for ^n { c.pick(40).contains: 'dead' and 1 or 0 })/n
camelia 0
Zoffix m: my \c := ('a'…'f', 0…9).flat.cache; my \n = 10000_000; say (sum do for ^n { c.pick(40).contains: 'dead' and 1 or 0 })/n
AlexDaniel but fwiw gists have 32 char ids, not 40
camelia (timeout)
Zoffix Oh I forgot a join
masak and .roll(40), not .pick(4)
19:37 Xliff left
masak 40 19:37
hoelzro also, are .pick and .roll uniform?
Zoffix m: my \c := ('a'…'f', 0…9).flat.cache; my \n = 100_000; say (sum do for ^n { c.roll(40).join.contains: 'dead' and 1 or 0 })/n
masak yes, but .pick removes
hoelzro has been successfully nerd-sniped
camelia 0.00046
moritz hoelzro: yes
19:37 darutoko left
Zoffix m: my \c := ('a'…'f', 0…9).flat.cache; my \n = 1000_000; say (sum do for ^n { c.roll(40).join.contains: 'dead' and 1 or 0 })/n 19:37
hoelzro nods
camelia 0.000594
masak m: my $i = 0; repeat until my $s.contains("dead") { ++$i; $s = ("a".."f", 0..9).flat.pick.join }; say $i
Zoffix That's pretty close to my calculated 0.00058
camelia (timeout) 19:38
19:38 bwisti joined
moritz good enough for a physicist, as I said :) 19:38
Zoffix :)
masak I'm running that timed-out thing locally, and it's still running.
Zoffix masak: you picked just one letter
instead of 4 or whatever 19:39
moritz or 32 :)
masak oops
masak is new at this "coding" activity
moritz maybe you should start with some tests :-) 19:40
masak and someone I wrote .pick, too
masak slaps moritz with a big herring :)
AlexDaniel cording? sounds fun
masak m: my $i = 0; repeat until my $s.contains("dead") { ++$i; $s = ("a".."f", 0..9).flat.roll(40).join }; say $i
camelia 933
masak oh, that's better
m: say 1 / 933
camelia 0.001072
raschipi ? 19:41
AlexDaniel m: my \c := ('a'…'f', 0…9).flat.cache; my \n = 100_000; say (sum do for ^n { c.pick(40).contains: 'dead' and 1 or 0 })/n; say now - BEGIN now
camelia 0
19:42 mcmillhj left
Zoffix m: my \n := 1000; say (sum do for ^n { my $i = 0; repeat until my $s.contains("dead") { ++$i; $s = ("a".."f", 0..9).flat.roll(40).join }; $i })/n 19:42
AlexDaniel e: my \c := ('a'…'f', 0…9).flat.cache; my \n = 100_000; say (sum do for ^n { c.pick(40).contains: 'dead' and 1 or 0 })/n; say now - BEGIN now
evalable6 0
AlexDaniel just a bit faster :)
camelia (timeout)
masak getting 0.00063 after 100_000 runs 19:43