01:39 hulk joined 01:40 kylese left 01:51 maylay_ joined 01:53 maylay left 02:15 hulk left, kylese joined 02:30 kylese left 02:34 kylese joined 03:29 stanrifkin_ joined 03:31 stanrifkin left 05:31 kjp left 05:32 kjp joined 05:33 kjp left, kjp joined 06:18 Xliff joined
Xliff Does anyone know if there is code to check if an IP address is a bogon in Raku? 06:18
06:21 merp left 06:22 merp joined 08:47 Aedil left 08:54 Sgeo left 08:55 sena_kun joined 10:03 Aedil joined
ab5tract bogon? I only know that term in the context of Australian slang :) 11:47
lizmat from WP: Bogon filtering is the practice of filtering bogons, which are bogus IP addresses of a computer network. Bogons include IP packets on the public Internet that contain addresses that are not in any range allocated or delegated by the Internet Assigned Numbers Authority or a delegated regional Internet registry and allowed for public Internet use. The areas of unallocated address space are called the bogon space. 11:48
ab5tract Ah, thank you lizmat 11:49
11:53 eseyman left 11:55 manu_ joined, manu_ is now known as eseyman
antononcube Good to know! 13:13
I was thinking to look up "bogon"... Or make jokes about vogons in Raku. (E.g. writing poetry with it.) 13:44
Xliff Note the distinct difference in the first letter. :p 14:58
At any rate, I think I have something. 14:59
antononcube @Xliff The sound corresponding to "v" very often mutates to the sound corresponding to "b" (In and between languages.). E.g. "vivlia" -> 'bible" , "varvaros" -> "barbarian", etc. 15:09
So, "vogon" -> "bogon" is a "valid mistake" ! 🙂 15:10
lizmat in MacOS I just right-clicked on the word "bogon" and then selected: Lookup "bogon" 15:47
it's a nice feature :-)
antononcube In Discord is "Search by Google", but, yeah, same thing... 16:04
roguerakudev Seeing a weird issue when trying to print the number of elements in an array inside an interpolated string 16:05
No such method 'list' for invocant of type 'VMNull'
lizmat is precompilation involved ?
roguerakudev I don't think so 16:06
lizmat can you provide a gist ?
roguerakudev this is spread across multiple files but it's all local, not a module
yeah trying to get a minimal reproduction now
antononcube Here is a "bogon filtering with Raku" poem: 16:08
cdn.discordapp.com/attachments/633...2258d&
lizmat gets a blanket, just to be sure :-) 16:09
antononcube @lizmat Hm... I generated "Vogon poetry with Raku" first. 16:12
lizmat with Vogons you never know :-)
antononcube But it is way too readable.
roguerakudev huh, I am having real trouble reproducing this minimally 16:13
maybe the search to make it break in the correct way will reveal something
yeah I just cannot get this to reproduce 16:41
the original issue is in quite a large project 16:42
Xliff antoncube 17:18
Only if you're human. Try and pass that reasoning off to a machine and it will laugh at you.
antoncube: Oh god.. the poem was nice, but the code IN the poem was too much! 17:19
Here. Allow me to hand you a working example: 17:20
replit.com/@Xliff/BogonsNotPoetry#main.raku
And honestly, I had this written over an hour ago and it slides right in to the ongoing joke! 17:21
.seen vrurg 17:25
tellable6 Xliff, I saw vrurg 2024-10-09T19:14:06Z in #raku-dev: <vrurg> Though I'm not happy with the semantics either way. Using `handles` as a fallback resolution is more appealing to me. In which case `*` becomes the fallback of fallback. :)
Xliff What's the best way to encode RAW ANSI into a Raku string? 17:51
17:57 Sgeo joined
roguerakudev The VMNull issue turned out to be with .assuming 18:43
18:43 Aedil left
On another note, is there a runtime way to do something like use lib? I have a plugins directory whose location can change based on an environment variable, so it’s not known at compile time 18:44
But I want to have rakudo look in there for stuff to require 18:45
lizmat roguerakudev I think there's an issue for that already :-( 18:49
japhb Xliff: What exactly do you mean by RAW ANSI? (And for that matter, what do you mean by "best"? ;-) ) 20:33
timo let's make a slang :3 20:34
i assume something more pleasant than ... what's it again, "\x0e[99"
japhb timo: ESC is better represented as just "\e" for clarity 20:35
timo ideally, you could just press the "green" key on your keyboard and start writing green bytes directly into your .rakumod file
japhb Shades of ColorFORTH
timo isn't it disappointing that you can't have .rtf.rakumod 20:36
wouldn't you love to just `use Blorb:from<odt>` and have your raku sources as .odt OpenDocument Text?
sometimes it would just be much nicer to have `my @data = " and then an embedded open document spreadsheet 20:37
japhb We'll just have to teach `pandoc` how to convert to/from Raku code, and then we're done!
timo regular raku code doesn't have anything that could even approximate different fonts, bold/italics/underscore, text and background color, font size, and whatever else i forgot 20:40
btw is there a way to have a "%15s" in the format string be spelled with 15 characters so it can line up with something else that has these column widths? 20:41
can i use "% s"?
i think perl has a feature just like that, but it might be deprecated or something? 20:43
maybe it's only the special variable where you assign that string that's deprecated, or at least not encouraged any more perhaps?
antononcube @Xliff I am getting “page not found” from replit.com. 20:44
librasteve m: my $s = Format.new("%15s"); say $s('yo'); 20:46
evalable6 (exit code 1) 4===SORRY!4=== Error while compiling /tmp/phj0zQ0mFp
Undeclared name:
Format used at line 1
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Undeclared name: Format used at line 1
librasteve m: use v6.e.PREVIEW; my $s = Format.new("%15s"); say $s('yo'); 20:47
evalable6 yo
Raku eval yo
librasteve m: use v6.e.PREVIEW; my $s = Format.new(" %s"); say $s('yo'); 20:50
evalable6 yo
Raku eval yo
librasteve m: use v6.e.PREVIEW; my $s = Format.new("{' ' xx 15}%s"); say $s('yo'); 20:52
evalable6 yo
Raku eval yo
SmokeMachine Hi! Shoud RakuAST nodes be value objects?
I mean, should this be true? 20:53
m: use experimental :rakuast; say RakuAST::Name.from-identifier("bla") ~~ RakuAST::Name.from-identifier("bla")
camelia False
lucs If I see something like `my $*x = ...`, what kind of variable is `$*x` called? (to look it up in the docs) 21:27
[Coke] docs.raku.org/syntax/Twigil 21:28
it's a twigil indicating a dynamic variable.
lucs Aha, okay, thanks.
[Coke] docs.raku.org/language/variables#Twigils is slightly better.
lucs Thank you :) 21:29
[Coke] (and from there to docs.raku.org/language/variables#D...variables)
sure.
lucs I thought it was something like that (I was thinking of Perl's 'local' declarations), but couldn't remember what they were called. 21:30
[Coke] huh. the docs describe dynamic variables after the second url, and the last url is just a list of dynamic variables. weird.
ah, docs.raku.org/language/variables#The_*_twigil
... which due to a bug isn't rendering the heading.
lucs I want the bodies of all proto expression of a function to share a variable and using a dynamic variable is one way i've found of making it possible. 21:42
For example:
m: proto sub baz (|) { my $*n = 21; {*} }; multi sub baz { say $*n * 2 }; baz
camelia 42
lucs Is that a good (best?) way to do it?
[Coke] i wonder what the logic is about just $n not working there. 21:45
I half expect declaring it in the proto would carry over.
lucs It unfortunately doesn't. 21:46
m: proto sub baz (|) { my $n = 21; {*} }; multi sub baz { say $n * 2 }; baz
camelia ===SORRY!=== Error while compiling <tmp>
Variable '$n' is not declared. Perhaps you forgot a 'sub' if this was
intended to be part of a signature?
at <tmp>:1
------> my $n = 21; {*} }; multi sub baz { say ⏏$n * 2 }; baz
timo can you put the multi candidates into the proto sub's body? :D
[Coke] But yes, that seems very reasonable. (ah, the proto dispatches to the {*}? that would do it) 21:47
timo even if that works, i don't think it would actually work
with regards to closure semantics and whatnot
lucs timo: When there'e only one, sure, but this is very golfed down compared to what I'm really trying to do :)
timo don't multithread this at home, kids!
22:01 stanrifkin_ left 23:03 sena_kun left 23:41 swaggboi left 23:45 swaggboi joined 23:53 Xliff left