This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html
Set by lizmat on 8 June 2022.
01:01 Manifest0 left 01:23 librasteve_ left 08:27 Manifest0 joined 10:22 habere-et-disper joined
habere-et-disper m: 2 == 999.say 10:22
camelia WARNINGS for <tmp>:
999
Useless use of "==" in expression "2 == 999.say" in sink context (line 1)
habere-et-disper m: say 2 == 999.say
camelia 999
False
habere-et-disper m: say( 2 == 999.say ) 10:23
camelia 999
False
lizmat m: say 2 == True
camelia False
lizmat m: say 1 == True 10:24
camelia True
lizmat m: say 1 == 999.say
camelia 999
True
habere-et-disper So == is operating in boolean and not numeric context if one of the operands is a string ? 10:28
lizmat no, == coerces to numeric 10:29
m: say +True
camelia 1
lizmat and say() returns True
m: say say "foo"
camelia foo
True
habere-et-disper Can we say cast instead of coerce ? Are they roughly equivalent ? 10:40
I got confused in the REPL as "2 == 999.say" gives 999 without False at the end. As does "?( 2 == 999.say )". 10:46
lizmat the reason the REPL doesn't say False, is because the statement already output something: in that case the REPL does *NOT* show the value of the statemennt 10:55
habere-et-disper (y) 10:56
lizmat re cast vs coerce: in the case of casting, the actual value doesn't change, does it? You e.g. cast a 16bit int into a 32bit int, but not to a string, right? 11:05
habere-et-disper Hmm... I've not made that distinction -- interesting. 11:10
11:39 habere-et-disper left
Tirifto m: say 6 ~~ (3 > 2); given 6 { when (3 > 2) { say 1 }; default { say 0 }; } 14:35
camelia True
0
Tirifto Does someone know why ‘given 6 { when (3 > 2) … }’ does not amount to ‘6 ~~ (3 > 2)’, or perhaps rather ‘6 ~~ True’? 14:40
antononcube Is there an easier or shorter way to convert an list of two numbers @pos into a Range object than this one: Range.new(|@pos)
ab5tract you could make a local sub called range (or shorter) that does this 14:41
but nothing built-in AFAIK 14:42
antononcube 👍
Tirifto I suppose @pos[0]..@pos[1] is not really shorter or easier. xP 14:44
antononcube @Trifto No, it is not. And that is the answer ChatGPT gave me... 15:08
15:37 habere-et-disper joined
habere-et-disper Maybe this could work for antononcube ? 15:44
m: my @pos=[2,9]; @pos.minmax.WHICH.say
camelia Range|2..9
ab5tract ah, nice! I had forgotten that minmax makes a range 15:47
antononcube Hmm.. more precisely "minmax gives a range" ? 15:49
@habere-et-disper Thanks -- works nicely! 15:50
habere-et-disper :]
antononcube @habere-et-disper Did you ever use "Text::CodeProcessing" ? 15:52
Tirifto (The range will always start with the smaller coordinate, though.) 15:53
antononcube Good point. But my use case (so far, today) is getting sub-strings from indices. 15:54
habere-et-disper Can I message from here to a specific user behind discord-raku-bot ? 16:01
If so, pray tell the invocation !
antononcube @habere-et-disper I think so -- you have to mention their handle prefixed with '@'. 16:09
@habere-et-disper Alternatively, just get a Discord account. 16:10
habere-et-disper @antononcube Hi antononcube. Do only you see this ? I don't want to spam the channel. 16:13
antononcube Hm... I think the whole channel sees it. 16:15
I defiintely see it, though! 🙂 16:16
Tirifto Or invite them over to IRC. ;P 16:18
antononcube @Trifto Are you saying that if log in to IRC someone can message me privately. (If yes, then I will do it.) 16:22
Tirifto @antoncube, I think that if you’re connected to the IRC server directly, people can send you a private message (using the command “/msg $nickname $message”). 16:26
(And many clients will probably let you start a conversation with a user through the context menu.) 16:29
@antononcube ↑ Sorry, got your name wrong the first time. 16:30
16:34 DarthGandalf left
antononcube Ok, thanks! 16:35
18:24 MasterDuke joined 19:16 librasteve_ joined 19:29 DarthGandalf joined 20:00 habere-et-disper left
ab5tract antononcube: 'Hmm.. more precisely "minmax gives a range" ?' ... I believe true precision lies in 'minmax constructs a Range' 20:01
And yes, private messaging is a core feature of IRC. That's how we would interact with pirate bots to get into queues for transferring DiVX files 20:04
*DivX
(IRC also provides several options for initiating direct transfers between users, which is how the bots transferred thoe files) 20:08
21:57 Manifest0 left 23:58 librasteve_ left