🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
00:05 reportable6 left 00:07 reportable6 joined
guifa Actually on further thought, I don't think it fails because negatives numbers don't have literals 00:12
I'm fairly certain 2e1 will compile as a literal 00:13
And it's fairly reasonable to forbid that in the colon syntax: :2e1foo makes my eyes awnt to bleed lol
Nemokosch Hm, I think this is a logical fallacy, could be one on both of our sides 00:21
guifa I've always seen :2a as a useful short hand for some contexts allowed because numbers can't validly begin identifiers 00:22
guifa . o O ( although if someone wrote a slang making <ident> start with <alnum> instead of <alpha> ... )
Nemokosch ":-1a only doesn't work because negative numbers don't have literals" <=> "by changing only one thing - to support negative numbers as literals - :-1a would start working" 00:23
I think you don't disprove that by saying "there are literals that don't work with this colon pair syntax" 00:24
I definitely feel less positive about :2e1foo than :-1a, gotta give you that
guifa And then Rats too! 00:25
:1/2foo
oh
what's the correct interpretation of :i :-) 00:26
that's a literal number after all hahaha
Nemokosch :1.2foo looks fine by me, to be honest
are you sure it is a literal and not an operator?
guifa it's a term 00:27
say i.WHAT
evalable6 (Complex)
Nemokosch oh okay, the sole i is indeed a term
guifa say :٧foo 00:28
evalable6
guifa say :7foo
evalable6
guifa hmm, both compile on that, so it is using <digit> at least
Nemokosch and now imagine
that sub foo( --> i) {} works but sub foo( --> -1) {} doesn't... 00:29
I kinda hope this feels anomalistic enough not only for me haha
guifa I think that situation could be solved by allowing anything known at compile time
guifa says as if that's simple
That would allow something like 00:30
Nemokosch Pretty sure you have said this before 00:31
And yes, I think that's much harder to do everywhere consistently than to just say "okay scrap that, -1 IS a literal after all"
guifa But would bring other benefits :-)
namely
Nemokosch and as you could see, negative numbers are explicitly hacked with the presence or absence of whitespace
guifa BEGIN my $bar = [calculation]; sub foo (--> $bar) { … }
Nemokosch -1 .succ is not the same as -1.succ and stuff like that
oh right, something I wanted to at least mention one more time, although I already got labelled "a pedantic ding dong" (or whatever) for it 00:33
guifa RIght now 2 -1 is valid for 2 - 1. Would making it literal cause that to be parsed as 2 (-1), and thus a syntax error? (I'm not sure, but it might require more grammar rewriting) 00:34
Nemokosch Raku is not Rakudo, and this is good to keep in mind, even if we sometimes pretend they are the same thing 00:35
where I'm getting at is that it would be important to avoid the situation where Rakudo behavior gets specced simply for being Rakudo behavior. "Undefined behavior" is not the way to go in my opinion, but if something feels odd to document, it's probably "wrong behavior" 00:37
in which case "Rakudo does not conform with Raku", rather than "Raku lacks specification for Rakudo behavior"
sortiz Well, roast specs raku, not rakudo, and in fact in roast there are lots of "rakudo todo" and NYI 00:39
guifa So Raku standard grammar (going all the way back to Perl 6's STD.pm6) does not define numbers with a negative literal
github.com/perl6/std/blob/28329a77....pm6#L2538
Nemokosch guifa: to be honest, I wouldn't mind 2 -1 being a syntax error, for my 2 cents 00:40
guifa hmm, actually nm. numeric underneath does
guifa hunts this down in Rakudo grammar
huh, we don't have a <numeric>. I wonder where down the line that changed 00:41
nemokosch: there's your argument for Rakudo :-) just wrap <number> in a <numeric> that handles the signs 00:42
tellable6 guifa, I'll pass your message to Nemokosch
Nemokosch yes well, this case is specified pretty well, I didn't mean this for Rakudo - if anything, I rather meant the whitespace-sensitivity around negative pseudo-literals 00:45
what can I say, I think this is an "esoterism" in the specification, to define something with the name "number" or "integer" that doesn't cover "half of the numbers" that we write down in our everyday lives, so to speak
00:46 sortiz left, sortiz joined
I don't see any advantages of it and theoretically it's very impure but it's not such an impactful "esoterism" as some others are 00:49
confer "negation lifting" or what the term was
you know, when (1, 2, 3).any != 2 turns into !((1, 2, 3).any == 2) 00:51
I don't intend to hurt anyone by saying this but that behavior... really only resembles INTERCAL 00:53
01:01 Nemokosch joined 01:06 thowe left 01:29 Nemokosch left 01:32 amenonsen left, amenonsen joined 01:37 Kaiepi left 02:00 avuserow left 02:12 avuserow joined 02:50 sortiz left, sortiz joined 02:59 thowe joined 03:38 Zero_Dogg left, Zero_Dogg joined 03:46 aqua2 left, aqua2 joined 04:02 RakuIRCLogger left, Geth left 04:04 Geth joined 04:05 lizmat joined 04:41 xinming left 04:44 xinming joined 04:54 thowe left, thowe joined 05:27 swaggboi left
lizmat weekly: fosdem.org/2023/news/2022-11-07-ac...um=twitter 05:27
notable6 lizmat, Noted! (weekly)
lizmat plenty of devrooms that someone could give a Raku based presentation in 05:28
see also: news.perlfoundation.org/post/fosdem # mini-grants 05:34
05:41 Zero_Dogg left 05:42 razetime joined, Zero_Dogg joined
sortiz lizmat, I'm preparing a companion for your PR#5095, I would greatly appreciate your comments. github.com/salortiz/POSIX-PWDENT 05:45
lizmat sortiz: you're aware of raku.land/zef:lizmat/P5getpwnam and raku.land/zef:lizmat/P5getgrnam ? 05:49
sortiz Yes of course, but I'm trying a more "idiomatic" API 05:52
05:59 razetime left
lizmat ok, sure: you either might want to use that as a dependency, or steal the code from it 05:59
05:59 razetime joined
lizmat I found some tricky stuff with getpwent between the various OSes that has been intergrated into P5getpwnam / P5getgrnam 06:00
different OSes having different length structs
sortiz You're right, I'll take a look. 06:02
Thanks a lot. 06:04
lizmat you're welcome :-) 06:05
I like the API :-)
06:06 Geth left, Geth__ joined, Geth__ left, reportable6 left, Geth joined 06:08 reportable6 joined 06:10 razetime left
lizmat sortiz: I don't like the caveat Isn't there a way around it? aka, copy the values out of the struct to create a PwdEnt object ? 06:10
I mean, with this interface, something like $*PWDENT<foo> eq $*PWDENT<bar> would always be true ? 06:11
sortiz You can use .Map (or .Hash or .List) to get persistent objects, but the casual and common use (to get some specific data) is much cheaper returning the raw CStruct. 06:14
And that's the reason for having two Iterables. 06:16
lizmat somehow this feels like a premature optimization 06:18
I mean, how many entries do you expect a /etc/passwd to have, and how many times would you run it?
anyways, it was my 2c worth :-) 06:19
sortiz Much appreciated!
I suspect the most common use cases will be ~$*PWDENT[Int] and +$*PWDENT<Str>, hence the optimization. 06:23
06:23 razetime joined
sortiz BTW, I left a comment on PR#5095 06:25
tonyo half tempted to volunteer for the go room and give a talk about using the C macro preprocessor to get real macros in go in the stead of generators 06:27
my `real macros in go` got a lot of h8 06:28
06:33 razetime left 06:34 razetime joined 06:45 Some-body_ joined 06:47 DarthGandalf left, xinming left, Some-body_ is now known as DarthGandalf 06:49 xinming joined 07:23 Sgeo left 07:39 razetime_ joined, razetime_ left 07:47 razetime left 07:59 abraxxa joined 08:03 razetime joined 08:04 abraxxa left, abraxxa joined 08:08 Geth left 08:16 Kaiepi joined 08:38 razetime left, razetime joined 09:09 epony left 09:18 sena_kun joined 09:19 dakkar joined 09:33 razetime left, razetime joined 09:52 epony joined 09:57 sortiz left 09:58 Voldenet_ joined, Voldenet left, Voldenet_ is now known as Voldenet 10:06 Voldenet_ joined 10:07 Voldenet left, Voldenet_ is now known as Voldenet, abraxxa left 10:12 jjido joined 10:18 jjido left 10:26 abraxxa joined 10:42 razetime left 10:43 razetime_ joined 10:53 Nemokosch joined
Nemokosch Hello hello 10:54
tellable6 2022-11-08T00:42:11Z #raku <guifa> nemokosch: there's your argument for Rakudo :-) just wrap <number> in a <numeric> that handles the signs
Nemokosch oops, wrong chat again... the bait
11:07 sena_kun left
gfldex is there a way to get hold of the raw bits of a bigint? 11:36
11:44 sena_kun joined 12:07 reportable6 left 12:08 reportable6 joined 12:18 Nemokosch left
El_Che tonyo: I don't think that macros is that big sale as you think in the go world 12:27
"how to make go more like C" is not that popular :) 12:28
tonyo: what use case of macro specifically are you thinking of? 12:31
surely not constants and generics? 12:32
12:42 Nemokosch joined 12:49 rir joined 12:50 rir left 13:09 Nemokosch left 13:50 japhb left 13:57 japhb joined 14:18 japhb left 14:19 japhb joined 14:24 Altai-man joined, sena_kun left 14:34 derpydoo joined 14:47 nine left, nine joined 14:48 Sauvin left 14:49 Sauvin joined 14:54 swaggboi joined 14:55 Sgeo joined 15:22 TieUpYourCamel left 15:35 TieUpYourCamel joined 15:53 bigfondue left
japhb lizmat: Had my first non-trivial need for rak yesterday. It was *way* faster than I expected for what I asked it to do. Bravo! 15:58
tonyo El_Che: it was mostly just a "could it work" article, i know go people are less than thrilled about anything until bob pike says it's ok 16:03
the talk would just be a troll talk
El_Che tonyo: you could dress it up ass converting go into rust 16:11
tonyo transpiler for two compiled languages..haha
El_Che nah, just adding the rust complexity at the lang level 16:12
16:19 Nemokosch1 joined 16:25 sena_kun_ joined 16:28 Altai-man left 16:39 Nemokosch1 left 16:49 Nemokosch joined 16:51 Bocaneri joined, Sauvin left, Bocaneri is now known as Guest6797 17:08 abraxxa left 17:18 razetime_ left 17:20 Nemokosch left 17:27 Guest6797 is now known as Sauvin 17:33 Nemokosch joined
lizmat japhb: nice! 17:33
lizmat clickbaits rakudoweekly.blog/2022/11/07/2022-...aluersion/
17:34 melezhik joined
melezhik o/ 17:34
17:35 dakkar left
melezhik . 17:37
17:39 Kaipei joined 17:42 Kaiepi left 17:43 melezhik left, Nemokosch left 17:44 Nemokosch joined 18:04 squashable6 left 18:05 squashable6 joined 18:07 reportable6 left 18:08 abraxxa-home joined, reportable6 joined 18:10 abraxxa-home left 18:17 sena_kun_ left, Nemokosch left 18:31 Nemokosch joined 18:35 sortiz joined, bigfondue joined 18:52 Sauvin left, Bocaneri joined 18:53 Bocaneri is now known as Guest186 18:54 sena_kun joined 18:56 Guest186 is now known as Sauvin 19:40 Kaipii joined 19:43 Kaipei left 19:55 melezhik joined
melezhik Anton Antonov, you live in Coral Springs, Florida, right ? We think about moving this area ... I'd good to talk ))) 19:55
20:34 Nemokosch left 20:39 sortiz left 20:40 sortiz joined 21:03 Maylay left 21:10 Maylay joined 21:46 melezhik left 21:47 derpydoo left
guifa gfldex: raw bits as ... a buf or ? 22:23
22:46 sena_kun left 23:46 committable6 left, greppable6 left, bloatable6 left, benchable6 left, quotable6 left, unicodable6 left, reportable6 left, statisfiable6 left, tellable6 left, squashable6 left, releasable6 left, shareable6 left, sourceable6 left, nativecallable6 left, bisectable6 left, evalable6 left, linkable6 left 23:47 greppable6 joined, linkable6 joined, shareable6 joined 23:48 bisectable6 joined, releasable6 joined, committable6 joined, bloatable6 joined, evalable6 joined, quotable6 joined 23:49 squashable6 joined, statisfiable6 joined, reportable6 joined, tellable6 joined, nativecallable6 joined, unicodable6 joined, sourceable6 joined, benchable6 joined