🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:01 [Coke] joined 00:06 reportable6 left 00:07 reportable6 joined 00:14 getimiskon left 00:16 euandreh left
[Coke] . 00:20
00:24 Manifest0 left 00:32 jgaz joined 00:36 swaggboi joined 01:03 monkey_ joined 01:04 euandreh joined 01:05 swaggboi left
SmokeMachine m: ^10 .pick(*).pairs.min(*.value).key 01:25
camelia ( no output )
SmokeMachine m: say ^10 .pick(*).pairs.min(*.value).key
camelia 4
jdv anyone know if blin, or i guess whateverable, can run against rando rakudo,nqp, or moarvm refs? 01:31
SmokeMachine tbrowder: on the todays adventpost the Task class format seems odd and it seems the journal class is missing 01:39
tbrowder yes, it isn’t finished yet, it wasn’t supposed to be published… 01:43
it’s an emergency place holder…i’m in an internet-free zone for a couple of days 01:45
02:05 evalable6 left, linkable6 left 02:25 monkey_ left
tonyo tbrowder: you cruising around on the f18c's and making my friends in crash crew work the holidays? 02:30
02:32 jgaz left 02:38 ggoebel left
tbrowder no, just in the country at a place away from internet. just weak cell signal good enough for low data irc 02:41
03:06 evalable6 joined 04:06 greppable6 left, reportable6 left, sourceable6 left, coverable6 left, evalable6 left, bisectable6 left, unicodable6 left, bloatable6 left, shareable6 left, tellable6 left, nativecallable6 left, committable6 left, notable6 left, quotable6 left, releasable6 left, statisfiable6 left, benchable6 left, squashable6 left 04:07 greppable6 joined, statisfiable6 joined, coverable6 joined, shareable6 joined 04:08 committable6 joined, bisectable6 joined 04:09 benchable6 joined, squashable6 joined, reportable6 joined, unicodable6 joined
thowe why isn't Atom coloring my Raku syntax? I gotta make it somehow? 04:28
does it not know to highlight when the file is named *.raku?
*gasp* yes. Naming it *.p6 seems to get me syntax highlighting! This must be fixable 04:29
so... What's the right way to make my .raku files get Atom syntax highlighting? 04:36
think I got it 04:40
05:07 notable6 joined, linkable6 joined, tellable6 joined 05:08 quotable6 joined, bloatable6 joined 05:09 sourceable6 joined 05:22 mexen joined 05:51 Xliff left 06:04 frost joined 06:07 reportable6 left 06:08 holyghost joined 06:52 holyghost is now known as holly, holly is now known as holyghost_ 07:06 nativecallable6 joined 07:07 releasable6 joined 07:08 holyghost_ is now known as holyghost 07:10 reportable6 joined
holyghost I compile ircii, segfaults on linux x64 07:16
(--without-openssl) 07:17
07:21 seednode left 07:22 seednode joined
holyghost curses/ncurses problem AFAIK 07:26
07:33 holyghost left, holyghost joined 08:09 evalable6 joined 08:31 holyghost left 08:46 Sgeo left, TheAthlete joined 09:13 holyghost joined 09:52 ggoebel joined 09:53 abraxxa joined 10:00 abraxxa left 10:01 abraxxa joined 11:01 evalable6 left, linkable6 left 11:25 holyghost left 11:28 Skarsnik joined 11:33 holyghost joined
El_Che that takes me back 11:38
I think most moved to irssi and/or weechat
lizmat or Textual if you're on a Mac 11:41
11:48 Skarsnik left
holyghost Right, thx 11:50
Too bad BitchX isn't available anymore, was a good d00d client 11:53
It was the beginning of colored irc clients 11:54
d00d == dude 11:55
El_Che bitchx is around 11:58
holyghost Oh
El_Che no longer an ircii script, but standalone
11:59 msudx joined
msudx i got here from perl6.org 12:00
SmokeMachine I use www.irccloud.com/ I like it very much... and also use it it on my phone and that makes both sync... 12:01
12:01 evalable6 joined
holyghost SmokeMachine, I'm mostly in a terminal, but thanks 12:01
Summer irccloud also works as a general bouncer for irc clients too, blog.irccloud.com/bouncer/ paid feature but pretty neat 12:03
tbrowder SmokeMachine: i also use irccloud, it makes it easier to use irc imho
holyghost I was in on xchat in 1.6/1.8/2.0 for linux, now I use it on my mac 12:04
Xchat azure it's called
Summer I'd use irccloud if it was flosser, instead im probs gonna have to use a Lounge instance 😭 12:06
SmokeMachine Summer: thanks! I didn't know that!!! I think I'll give it a try, just for testing!
Summer xchat has mostly been replaced by hexchat
holyghost which is windows based AFAIK
Summer all platforms, gtk 12:07
12:08 reportable6 left
Summer hexchat.github.io/news/2.16.0.html tingping has seemingly wanting to retire from maintaining hexchat for a while 12:08
holyghost Needs stupid dlls on windows
Summer yeah the plugin system is p scuffed there 12:09
holyghost Everything should be MFC based, but no-one understood that of course
12:09 reportable6 joined 12:10 SmokeMachine2 joined
holyghost Ok, I'm back online, shameen.ddns.net, you may have routing problems 12:12
SmokeMachine test 12:14
cool! I'm using Textual on IRCCloud!
thanks Summer! 12:15
12:15 SmokeMachine2 left
holyghost lol 12:16
Now trying to decide to write the cgi scripts in perl, python or ruby :-) 12:17
Summer raku 😳 12:18
holyghost Aaaaah! There's no perl6 anymore ! :-)
tbrowder don’t laugh, but has anyone any interest in a mod_raku for apache http server?
holyghost yes
Need a separate binary AFAIK 12:19
Summer raku for lwan 😳
tbrowder ah, that’s right.
? 12:20
holyghost Also, we can update the raked site then, with more binaries (e.g. mod_raku) 12:21
Summer lwan.ws/ its a dis at the closed source "quantum proof horizontally parallisable" gwan 12:22
holyghost I guess Debian would be interested
tbrowder i hope so :-) 12:23
holyghost I had the horse book back in the day (mod_perl), but I guess there's a place for raku web programming in raku.so AFAIK 12:27
tbrowder holyghost: i have some cgi working using raku 12:28
holyghost sure
Which uses the interpreter
tbrowder yes
i get nothing at raku.so 12:29
12:29 ggoebel left
holyghost tbrowder, as in php.so, I don't know the mod_perl things 12:30
For apache I mean
PHP is somewhat nicer and uses perl syntax 12:31
tbrowder i don’t need super speed so raku interp has worked fine where used so far
holyghost sure
But you can extend it
source code is nice :-) 12:33
tbrowder i’ve tried to keep my sites super secure and have stayed away from php for many years. 12:34
holyghost Oh, ok
tbrowder, you don't like php ? 12:35
tbrowder but maybe it’s better now
holyghost PHP was stupid yes 12:36
lizmat wonders in how many communities the holyghost is active
holyghost Now with M$ on it it's better
El_Che mod_* is not where the sh*t is at, nowadays
holyghost lizmat, 2 :-)
tbrowder best thing for apache lately is ease of use with letsencrypt
El_Che webservers are pretty much reverse proxies, hence the language does not matter
12:37 synthmeat left
holyghost I guess to prefer what you program in 12:37
tbrowder yes, but i still don’t have a reverse proxy working yet :-( 12:38
no excuse, though, always putting the hard work off
lizmat tbrowder: the latest Cro has reverse proxy support, no ? 12:39
tbrowder yes, but i’ve talked to jnthn about it a bit. and getting tls support on the inside is a bit sticky. 12:40
on my main site i use tls certs for private user access 12:41
lizmat ah, I see: most reverse proxies I had to work with, didn't need that because they ran on trusted networks
Summer random aside, does anyone know any non-traditional ssh servers? la something that would be good for app development instead of as remote access? 12:42
libraries also fine
12:42 Altai-man joined
holyghost Summer, openssh ? 12:42
Not libssh2
Ssh.com vs. openbsd 12:43
ssh is yndicated
s/yndicated/syndicated 12:44
Summer thats v traditional, I guess as examples, github.com/gliderlabs/ssh and /x/crypto/ssh, www.paramiko.org/, etc, full control over the auth process is the main thing (just so I can accept all keys) 12:47
holyghost Maybe Hellman for solaris 12:48
Sorry, I only know openssh
openssh is on Debian as a separate package 12:51
or was 12:54
12:58 ggoebel joined
holyghost It's blowfish based, which is unterrijndael 12:59
13:03 linkable6 joined 13:14 getimiskon joined 13:15 ggoebel left 13:16 ggoebel joined 13:36 p6steve left 13:39 msudx left 14:08 monkey_ joined 14:10 TempIRCLogger left, TempIRCLogger joined 15:10 shareable6 left, squashable6 left, nativecallable6 left, greppable6 left, bisectable6 left, bloatable6 left, benchable6 left, linkable6 left, evalable6 left, statisfiable6 left, coverable6 left, unicodable6 left, reportable6 left, notable6 left, sourceable6 left, releasable6 left, quotable6 left, tellable6 left, committable6 left 15:11 frost left, bisectable6 joined, evalable6 joined, unicodable6 joined 15:12 benchable6 joined, linkable6 joined, committable6 joined 15:13 tellable6 joined 15:29 monkey_ left, mexen left 15:30 Sgeo joined
tbrowder btw, i noticed when putting comm modules in zef the master branch will be changed to name. has that been codified by the steering commitee 15:37
*committee 15:38
lizmat well, no, but it *is* the general trend, and I thought I'd do that in one go 15:56
El_Che it's the default at github for new repos
lizmat as it is for new repos with App::Mi6 afaik 15:57
16:07 mcmillhj joined
mcmillhj When capturing an array returned from a `sub` I noticed that an extra level of nesting was added. Can someone explain what is happening here? topaz.github.io/paste/#XQAAAQAyAgA...OIWgt49lw3 16:08
16:11 monkey_ joined, quotable6 joined, coverable6 joined 16:12 statisfiable6 joined, squashable6 joined, reportable6 joined 16:13 notable6 joined, releasable6 joined, sourceable6 joined 16:24 monkey_ left 16:27 stoned75 left 16:28 Xliff joined
holyghost hi Xliff 16:36
16:40 monkey_ joined 16:51 holyghost left
Xliff \o 16:52
16:53 monkey_ left 16:54 tejr_ left, tejr joined 16:59 mcmillhj left 17:08 TheAthlete left
tbrowder got it 17:11
17:12 shareable6 joined 17:14 bloatable6 joined
[Coke] mcmillhj - that link was broken over two sends. might want to put it into a link shortener first. 17:41
.tell mcmillhj - it's the parens around ($should-continue, @buffer) - remove the parens and it works as you expect. 17:43
tellable6 [Coke], I'll pass your message to mcmillhj
17:51 abraxxa left
thowe is DBIish the /correct/ thing to use to talk to my Pg databases? 17:54
lizmat there's also DB::Pg I have no experience in either. jnthn said he liked the more rakuish interface of DB::Pg in their advent post last year 17:56
thowe Oh. I think I misunderstood that. I think I assumed DB::Pg was somehow used by DBIish. 17:58
Given my current mindset I think I would err on the side of "more rakuish interface". 18:00
lizmat yeah, that would be my hunch as well 18:02
thowe I have a chunk of business logic I wrote 15 years ago in Ruby that I want to take another run at with Raku. Feels a bit like a boss fight, but I would feel good about having done it. Making my second attempt at learning Raku atm.
ugexe If you're rewriting Ruby are you not using a ORM? 18:04
thowe I did not for the original code. In fact, my displeasure at what Ruby had to offer in that area at the time led to me learning Perl so I could use DBIC. The logic itself doesn't /need/ to talk to the database, but I have another project that does. I would actually like to try to make this first thing a web service with Cro maybe. 18:06
The project was written in a caffeine fueled rush, but it has always worked so I never replaced it. 18:08
18:09 reportable6 left
SmokeMachine thowe: If you need/want an ORM some day, maybe you would like to take a look at Red... 18:10
18:10 reportable6 joined
thowe So it sits there, for years, taunting me with its ugliness and stubborn insistence on continuing to work despite the fact I hate it. 18:10
SmokeMachine, yeah, I noticed Red is a thing. I think it might be the right tool for my other project but I need to get through my "Learning Perl 6" book first. 18:11
SmokeMachine .tell mcmillhj it seems if you replace the List `()` with a signature `:()` and the `=` with a `:=` you get what you want: glot.io/snippets/g5eg08jvxz 18:14
tellable6 SmokeMachine, I'll pass your message to mcmillhj
thowe I get really confused by the Advent Calendar code, so I am afraid of creating another abomination that taunts me for years if I don't learn the language better this time before stepping in the ring.
18:26 linkable6 left 18:29 habere-et-disper joined
habere-et-disper m: say $*RACU 18:30
camelia Dynamic variable $*RACU not found
in block <unit> at <tmp> line 1
habere-et-disper Can we improve on the suggestions for dynamic variables?
tonyo not really worth the effort 18:35
thowe: DB::Pg is the best thing to use for postgres connectivity
thowe Thank you; that seems to be the consensus, and that's where I will be looking. 18:41
18:45 Altai-man left
lizmat habere-et-disper: could you make an issue for that please ? 18:55
18:58 habere-et-disper left 18:59 tejr left 19:00 tejr joined
El_Che thowe: the fun thing of rewriting is not transposing A to B (Ruby to Raku), but refactoring and make use of feature of the new language (in my view) 19:02
thowe That's my goal. After 15 years of thinking about the problem, I haven't really come up with better logic. However, I think I can make it look nicer, be more clear, and arrange it in a way that better exposes the problem it is solving. Also, I think I can keep it very discoverable to my colleagues who use Ruby, etc... 19:11
And, maybe, I'll actually come up with a few better ideas along the way. I intend to do it without referencing the old code. 19:12
El_Che if it's the first Raku program at your org is kind of a business card (if you accept my out od fate reference)
thowe: I come up with great ideas all the time when refactoring, genius level
thowe: however, I don't agree when refactoring the next time :) 19:13
I tend to go for clarity instead of cleverness
everyone is too lazy to profile anyways (except when needed of when there is a problem) so cleverness-of-this-is-faster does not pay off for me 19:14
19:18 monkey_ joined
thowe I find I get really good at understanding the problem. I rarely feel I solved it in the best way. This particular problem is pretty easy to add some optimization to because you can get the most common cases out of the way up front. The meat is in handling the combinations of edge cases. 19:19
But I learn in a bubble... Code in a bubble. Have a lot of other things to do. If it weren't for IRC I would be worse off; a lot of Perl folks have been very patient with me. 19:21
lizmat if you can improve the algorithm, that's ok! what El_Che means is that generally finding the fastest way to do something in Raku given a certain algorithm, is generally not worth it 19:23
.oO( unless you're working on the core :-)
thowe Oh no, I totally get that clarity is more important than brevity or optimization. 19:26
19:26 linkable6 joined
thowe I think it was Knuth who said something like "Programs should be written to be read by people and only incidentally by computers." I'm probably butchering the quote. 19:27
Definitely my goal. I just think Raku lends itself to readability, if done right, in much the same way Ruby is, if done right. You have options for writing it so that it makes sense when read "out loud" even. 19:28
19:30 japhb joined
thowe anyway, i feel like I'm spamming the channel 19:30
japhb lizmat: ... or the mantle. The data format codecs need to be as fast as possible, for instance, because inevitably someone's going to do something that requires reading or writing a LOT of data. 19:33
jdv its a dual edged sword. i sometimes see raku code and it takes a while to parse it mentally cause its so tight. 19:37
19:38 Skarsnik joined
tonyo who is `ohmycloud` on github? 19:40
lizmat good question 19:41
19:48 jgaz joined 19:58 monkey_ left
thowe Whoa, live TPF in Houston. =) 20:02
lizmat there are many reasons /me will not attend, one of them Texas and its ridiculous laws that seek to dis-empower women 20:09
20:11 nativecallable6 joined
thowe damn... good point. There's goes the wind from my sails. 20:15
lizmat sorry... please don't let me stop you... this is a personal choice 20:42
*my* personal choice
jgaz When using Raku's dir() routine is it possible to filter by file type? Examples: I only want subdirectories or maybe I only want certain file extensions? 21:00
21:01 guifa joined
lizmat :test( *.ends-with(".raku")) 21:01
jgaz ^^
guifa curses leapseconds 21:02
jgaz what about the dir case? directories don't have file extensions.
21:03 orangebot joined
lizmat m: dir(., :test(*.say) ) 21:05
camelia ===SORRY!=== Error while compiling <tmp>
Malformed postfix call
at <tmp>:1
------> dir(.⏏, :test(*.say) )
lizmat m: dir(".", :test(*.say) ) 21:06
camelia .
lizmat m: dir($*CWD.absolute, :test(*.say) )
camelia .
lizmat other than inspecting the string, I don't see an easy way 21:07
jgaz ok
It was worth asking about.
21:07 Guest9516 joined
lizmat jgaz: I guess that's why I made raku.land/zef:lizmat/paths :-) 21:08
MasterDuke m: say dir(".", :test(*.IO.d)) 21:15
camelia (".".IO "..".IO ".cpanm".IO ".local".IO ".npm".IO ".perlbrew".IO ".rcc".IO "Perlito".IO "evalbot".IO "log".IO "nqp-js".IO "p1".IO "p2".IO "perl5".IO "std".IO ".cpan".IO "rakudo-j-inst-1".IO "rakudo-j-1".IO "rakudo-j-inst-2".IO "rakudo-j-2".IO "lib".IO…
jgaz Yeah, I jsut found this: andrewshitov.com/2018/10/31/workin...in-perl-6/ 21:17
This is helpful. 21:18
guifa lizmat: I know you've been doing some edits to CORE::DateTime. I'm not sure the best way to expose it (commence bikeshedding), but one potentially useful addition would be to give a leapsecond adjusted posix time (some utilities prefer that). I think I could code something up such that .posix could optionally take :leapseconds, adjusting accordingly. 21:39
lizmat I think a separate method would be better? 21:40
guifa lizmat: hence commence bikeshedding ha. I swore that there used to be a method that returned a True/False value (or accepted one) to account for LSs, although that was only because some POSIX time stamps are ambiguous due to the LS. 21:45
lizmat there's a named arg to account for it I seem to recall 21:46
guifa that's what I thought, but it's not on the docs page. I'll go take a look at the edit history for it 21:48
21:49 habere-et-disper joined
guifa huh, maybe I just dreamed it up. 21:52
kybr is there something like this `'('.unicode-property<mirror> eq ')'` ? 21:53
ugexe yeah, but i dont remember what it is 21:55
guifa kybr: at best you can get Bidi_Paired_Bracket, but that's designed for bidirection text. It should be mostly correct whenever something is defined, but values might not always be defined 21:56
m: say '[({<“‘«\\′⸂'.comb>>.uniprop('Bidi_Mirroring_Glyph').join 22:07
camelia ])}>»⸃
22:13 greppable6 joined
elcaro is there a more efficient way to punt a method call to a function than just doing `method m($arg) { some::func($!attr, $arg) }` 22:23
tonyo callsame or callwith if you're calling the parent from an inherited class 22:26
lizmat m: class A { BEGIN A.^add_method("foo",&say) }; A.foo # elcaro something like that ?
camelia (A)
tonyo m: role A { method a { say "A.a"; }; }; class B is A { method a { say "B.a"; callsame; say "/B.a"; }; }; B.a; 22:27
camelia B.a
22:32 ggoebel left 22:35 Guest9516 left
elcaro lizmat: thanks... I figured I would need to compose it in at compile time to get the least overhead 22:38
22:41 ggoebel joined
lizmat calls it a day& 22:43
22:44 japhb left
elcaro Haha, I'm not sure it works yet... but take the day off, you've earned it. 22:44
I'm trying to punt the `push` method of class that does `Array::Agnostic`... I may be trying to be too clever for my own good.
But I'll poke around the MOP a little more before I give up. 22:45
Xliff Waht's the best way to determine logarithmic scale given a set of numbers? 22:52
22:53 getimiskon left 23:14 habere-et-disper left
thowe is "use v6" still a thing? 23:21
elcaro kind of... if you are using features/semantics introduced in 6.d, you might want to do `use v6.d` to ensure people running v6.c are aware. 23:24
though hopefully the amount of people running v6c is very low
same goes for using newer features... you might want to use v6.e.PREVIEW (or just use v6.e when it comes out) 23:25
but outside of that... i think a plain `use v6` is not necessary.
thowe Ah. Understood. That way there is a record of the environment/timeframe in which some code was written. 23:27
guifa It's also a nice way to say "I have not tested this against higher versions". It's unlikely that 6.e will break anything for 6.d or 6.c, but it's always possible 23:33