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.
00:03 ab5tract left 01:57 Kaipei left 02:02 opoku joined 02:29 ab5tract joined 02:39 ab5tract left 02:40 ab5tract joined 03:24 opoku left 03:36 ab5tract left 03:37 ab5tract joined 03:48 ab5tract left, ab5tract joined 03:54 ab5tract left 03:55 ab5tract joined 04:00 ab5tract left
jaguart is there a raku-tidy? ala perl-tidy> I've tried Perl6::Tidy but Could not find symbol '&Catch-All' in 'Perl6' 05:13
06:14 kjp left 06:17 kjp joined 09:31 samebchase joined 09:39 Kaipei joined
lizmat jaguart: there's no raku-tidy yet 10:08
but it is getting closer, now that RakuAST is coming to fruition
m: say q/my $a = 42 + 666/.AST.DEPARSE 10:10
camelia my $a = 42 + 666
lizmat hmmm... those 4 spaces at the start are wrong :-)
still work to do on the DEPARSE front :-) 10:11
Luolong How do I compare dates in Raku .. like How do I check if two date objects are equal? 10:19
Nemokosch seems that Date objects are "value types" 10:24
so you might as well do === on them
quite a lot of ways will give you the right value(s) with Date 10:27
`cmp` for comparison, `-` for difference, `eqv` or `===` (or even `eq`, based on string representation) for identity 10:28
lizmat m: say Date.today == Date.today 10:37
camelia True
lizmat m: say Date.today == Date.today.earlier(:1day)
camelia False
lizmat m: say Date.today > Date.today.earlier(:1day)
camelia True
lizmat m: say Date.today < Date.today.earlier(:1day)
camelia False
Nemokosch seems that `==` is explicitly overloaded for Date? That seems inconsistent with the design of the language, to be honest. 10:44
lizmat Why? you could think of dates as numerical values (and underneath, there *is* a single numerical value) 10:46
Nemokosch the irony is, though, that Date does *not* support Numeric coercion. `==` works *for the wrong reason* 10:47
Those numeric comparisons should work because of a Numeric coercion backing them up
lizmat: straight to the topic: do you have any objections to removing the overloads and adding a Numeric and an Int method? 10:56
lizmat what would that achieve? The numeric value of a Date is a number from an arbitrary offset 11:03
the only thing we know that it is monotonically increasing for each day passed
that's why == < > and friends work
if you really want to know the value: 11:04
m: dd Date.today.daycount
camelia 59949
lizmat m: dd Date.today.later(:1day).daycount
camelia 59950
12:54 jgaz joined 13:23 QhpAptyj9hj0RQwM joined 14:20 ab5tract joined 14:22 ab5tract left 14:23 ab5tract joined 17:14 jgaz left 18:12 jgaz joined 18:17 discord-raku-bot left 18:18 discord-raku-bot joined 18:36 discord-raku-bot left, discord-raku-bot joined 18:40 discord-raku-bot left, discord-raku-bot joined 19:06 CodeTortoise joined 19:16 n1to joined
CodeTortoise I know this is a trite and probably annoying question asked a thousand times, but what is everyone using to program raku with. I just installed Raku-Vim, and I am just glad to have some automatic formatting and syntax highlighting. I was trying out Comma, and that is nice because I am already used to Clion. 19:20
lizmat is oldschool (vim) 19:22
19:25 ab5tract left, ab5tract joined
CodeTortoise Yeah, I always go back to vim, because it is so easy to get in and out of, absolutely no ceremony just to edit something. 19:28
lizmat well, that's true if your properly Stockholm Syndromed to vim :-) 19:29
*you're
CodeTortoise Nah. I never got deep into it. I am always planning to learn all the commands, and get it set up to personal specs, but all I ever do is set indent to spaces or whatever. 19:30
19:30 n1to left
Nemokosch a big drawback is the use of the "vimscript" language for customisation 19:36
but then there's Neovim with Lua 19:37
CodeTortoise I am using Neovim. I haven't really done any customization, but I do like Lua. For a moment I was using Awesome WM, and Pico-8 is built with it. 19:41
Anton Antonov @CodeTortoise Comma (commaide.com,) is the system I write Raku packages with. I use Mathemaitica and Jupyter for research projects. 19:44
p6steve comma++ 19:47
CodeTortoise It is really slick. It was smart to use the JetBrains platform. It works so well. Hell, they are the only IDE I can thing of that I can switch from my linux desktop to macbook with no hassle, especially since my laptop is old and is no longer compatible with XCode 19:49
What kind of research do you do? 19:50
Anton Antonov Interesting -- I was looking earlier today about ways to use Xcode with Raku. (People are doing that with Python and Perl.) 19:55
p6steve also, Comma is available as a plugin for Intellij IDEA which means I can use Python / PHP / perl / Raku / Web tools together 19:56
CodeTortoise Alas, every Apple product I have is basically a handme down from my family whenever they upgrade, so I don't look too hard into programming using those tools. However, there are couple things that run best on it, like the Self language, and an old visual programming language called Martin that I cannot seem to find. 19:58
p6steve since you may have seen my thoughts on Mac (M1) development and need for Docker/Ubuntu, I am optimistic that JetBrains Intellij (Gateway)[www.jetbrains.com/help/idea/remote...nt-a.html] will work with Comma plugin - but untested. 19:59
fwiw I find Xcode on an M1 MBA to be quite heavy compared to Comma IDE 20:00
CodeTortoise I almost bought an new MacBook Pro. I was about to pull the trigger on the last variant with a touchbar, since I think it is one of Apples best innovations. Well, there are plenty of Windows laptops with full on second touch screens, but it is not the same. 20:05
It would be cool to have all your sigils lined up for instant access, or even just the Greek alphabet and other letters. 20:08
p6steve or ♎️ 😎 20:21
to be fair to Apple they (with Swift) seem to be one of the few language developers that have cottoned on to the "right" way to do unicode and I hope that the touch function keys come back for that reason (without the price tag) 20:23
20:34 ab5tract left
Anton Antonov Also, Swift has strong, working "out of the box" libraries for Scientific computing and Machine learning. And, of course, they work on iOS, padOS, macOS. This is hard to beat. 20:35
20:35 ab5tract joined 20:41 QhpAptyj9hj0RQwM left
Luolong yes, thanks. It seems ~~ worked admirably for me once I figured out why some of the date values were not actually Date objects but Strings... 21:25
yes, thanks. It seems `~~` worked admirably for me once I figured out the small typo in a regex that failed to capture one of the date formats properly 21:26
Nemokosch oh right, the idea is that `~~` should also gave you sane results in these cases 21:31
it seems that in this case, it dispatches to a `===` call 21:32
that's like the default 21:33
21:33 ab5tract left 21:34 ab5tract joined 21:52 Kaipei left, Kaipei joined 22:08 jgaz left 22:21 ab5tract left 23:22 Heptite joined 23:37 Ebudae joined 23:41 Heptite left