🦋 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.
antononcube weekly: rakuforprediction.wordpress.com/20...rchatbook/ 02:05
Xliff \o 08:38
Which module can I used to detect for URLs in strings?
antononcube @Xliff Does this help: rosettacode.org/wiki/URL_parser#Raku 09:13
@Xliff Here is the "URI" repository: github.com/raku-community-modules/URI 09:17
Xliff antoncube: Thanks, but no. Those are only useful for when you already have the URL. 09:50
antononcube @Xliff I see. This makes me think I have to include a “URL recognizer” in “Text::SubParsers”. 10:14
Xliff antoncube: That would be nice. 10:22
antoncube: Take a look at the this repository -
my token url {
[ $<scheme>=<nodeParts>+ '://']?
[ $<user>=<nodeParts>+ ':' $<pass>=<nodeParts>+ '@' ]?
$<host> = [ (<nodeParts>+) ** { 2 .. Inf } %% '.' ]
[':' $<port> = \d+ ]?
[
'/' 10:23
(<nodeParts>+)+ %% '/' '/'?
['?' <kvPairs>+ %% '&' ]?
]?
}
Ack!
Let's try this again -- replit.com/@Xliff/PigishlyURLDetection
antoncube: That's detecting most if not all of the URLs I can think about.
antononcube 👍 10:34
lizmat And yet another Rakudo Weekly hits the Net: rakudoweekly.blog/2023/09/04/2023-...september/ 12:23
nemokosch chromatic still counting the years, eh 13:35
lizmat: "meanwhile, Python was there" links to news.ycombinator.com/user?id=dale_glass 13:38
tbrowder__ hi, given a list @arr, how do i show all items except the last 3? i know i can do this clunky way: my $n = @arr.elems, ..., but how do i do that in this fancy form: .say for @arr['some magic rakuism'] 14:11
antononcube @tbrowder @arr.head(*-3) ? 14:20
nemokosch I think @arr.head(* - 3) would be one way
damn
tbrowder__ [] instead of ()? 14:21
nemokosch head is a method
antononcube Does this work? @arr[^(*-2)]
tbrowder__ not yet 14:23
nemokosch seems to me it actually does 14:24
antononcube It should be @arr[^(*-3)] -- and, yes, I just tried it. 14:25
tbrowder__ yes, it does. thanks
nemokosch fair fair
off-by-one errors 14:26
tbrowder__ i also got this to work: say $_ for @arr[0..*-4]
antononcube 🙂 yeah, but precision in Raku counts...
nemokosch I'm kinda surprised that works but it does
0 .. * would be a range but 0 .. * - 1 is a WhateverCode 14:27
antononcube @tbrowder Yeah, I just used the range shorthand because CommaIDE nags about it.
tbrowder__ i like yours. anyone have fewer chars between the []?
antononcube @tbrowder Well, I a thinking now that I should parse and interpret in my DSLs statements like these : 1) "show all elements but last 5", 2) "give me all list elements except the first 2". 14:30
tbrowder__ cool 14:31
i'm trying to show debian bash experts a better way ;-D
nemokosch it would be hard to show them a worse way than using shell 14:32
tbrowder__ agree!! 14:33
thanks, folks, using anyononcube's way is best cause the 3 is the key point 14:34
antononcube Thanks @tbrowder! And --- in your face @nemokosch! Take that! You were too slow!! 14:35
nemokosch www.youtube.com/watch?v=mwnT2AGMMMc 14:36
antononcube Thanks! (Also thank you for mentioning chromatic earlier, I followed the links from Liz's post.) 14:37
nemokosch chromatic was a core engineer (if not THE core engineer) of Parrot 14:38
frankly it's a "just asking for a coffee" situation
antononcube I am not sure what do you mean. 🙂 I am asking for coffee all the time : www.buymeacoffee.com/antonov70 14:41
nemokosch same 14:43
I mean that you can chill while these people are (rightfully) criticizing each other's work, lol
antononcube I see -- yeah. 🙂 14:46
@nemokosch The official video seems to have all elements we discussed today: LLMs, arrays. coffee. www.youtube.com/watch?v=H6BEkPzstJQ 14:50
nemokosch I didn't link it because there are weird censorships in the vocals
it's creepypasta material 14:51
antononcube Agh, I see, I noticed that, but I thought is the download speed. 14:51
nemokosch it would be a good idea to get that album, though
damn it, there was a disc market just yesterday 14:52
didn't know
antononcube "Legion of 💥" 14:56
tbrowder__ antononcube: a sensitive question on yr recent speech in russia, any sense of Russian scientists' opinions on invasion?
back later.. 14:57
antononcube @tbrowder I have a short answer and long answer. 🙂 15:03
tbrowder__ yr choice 15:46
tbrowder__ but long would be best 16:09
antononcube @tbrowder Ok, long it is. 🙂 16:43
lizmat nemokosch thanks fixed 16:49
nemokosch 🍬 17:08
not sure who said it but I've heard that Rust's famous type safety is a bit overclaimed because it actually disallow doing things that people do want to do 17:44
and therefore a considerable amount of unsafe code is written anyway 17:44
how this is relevant? I don't know, probably it isn't, just something that bugs me 17:45
guifa I mean, it's a bit like RAku in that good practices are made easy, and questionable ones are possible but made to be intentionallly difficult to encourage people to avoid doing them 18:14
I mean take 18:15
www.reddit.com/r/rakulang/comments...wo_arrays/
nemokosch Did you actually understand what the question was? Because I surely didn't 19:38
vendethiel That’s true of everything 20:47
That’s a dumb claim
Except if you go the route of Coq or Agda or Idris maybe 20:48
nemokosch "that's true of everything" is not a useful observation when it's about a supposed qualitative difference 21:15
if all we can observe about Rust is the same we can observe about C or C++, what is the fuss about 21:16
antononcube @liz There is no "Anton's corner" in the latest rakudo-weekly. 😢 22:17
I would like to point out that "Jupyter::Chatbook" is expected to make a big splash. 😎 So, it should be more widely promoted! rakuforprediction.wordpress.com/20...rchatbook/ 22:19