🦋 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.
tbrowder__ hi, how do i use $*ERR to redirect stderr to /dev/null inside my raku program? 00:07
ugexe m: $*ERR = class { method print(|) { }; }; die 42; 01:17
camelia ( no output )
tbrowder__ thnx. 01:20
trying now...
whoa, i still need $*OUT to work as usual 01:22
oh, i think i see...trying now
works as advertised, thanks, Nick! 01:33
another example needed in the docs
Ambrose hi 08:23
slight problem with this page: rakudo.org/star/macos if anyone's interested 08:24
mfiano Hi again. I was here a year or so ago, but I got distracted with a work programming project to get to know Camelia better. 08:26
preventing me from getting to, rather.
nemokosch Well, what is the problem? 08:29
And welcome back ^^ 08:30
Ambrose Hi, it says there's an application that I can drag to my Applications folder, but there isn't 08:37
mfiano Thanks. No problem, just saying hi.
Ambrose There's 08:38
bin
include
lib
share
I mean, I've installed Raku the other way by now but clearly somethings going on with that install documentation
mfiano I'm new here, but that looks like a standard FHS filesystem layout. Did you look in bin where binaries are usually located? 08:39
Ambrose I got there from here: rakudo.org/star
Then clicked "installation instructions" 08:40
"that looks like a standard FHS filesystem layout. Did you look in bin where binaries are usually located" yeah there's stuff in `bin` but that's not the point I'm making. 08:41
The point I'm making is, the instructions says I should open it up and find an application
mfiano applications are binaries. binaries are always found in a specific directory on Unix-likes, which MacOS is. 08:42
This is assuming you know about Mac
Just enter bin, and copy the application from there
Ambrose A can of coke and a bottle of coke are both OK but if your instructions tell me to open the can with the ring pull then I will be puzzled if you've given me a bottle
Once again, nothing wrong with the _contents of that file_ 08:43
I'm saying the instructions don't match the content
mfiano You can find an application if you open it up. Which part is confusing?
Ambrose OK here are the instructions: “Drag-and-drop the application from that window into /Applications" 08:44
If you follow the instructions up to *drag and drop the application* and there's no application, then the instructions are wrong or confusing 08:45
There was probably a different version before, I don't know
nemokosch As you might have noticed, there hasn't been a Rakudo Star release for Mac for more than three years 08:54
Maybe this used to work in a different time. Hell, even Macs have changed since early 2020 08:55
Maybe it would make sense to add something like "this used to exist, help needed to revive it" 08:56
Ambrose Yeah anyone who bought a new mac recently is probably swearing like a trooper over everything to do with architectures for a start 08:57
Apple now makes their own chips, yay good for them except a lot of stuff won't compile
nemokosch yeah... I don't think Rakudo has a cross-compilation toolchain (I don't know if Mac's installers have, even) 09:03
and the people who create the Rakudo Star releases probably simply don't have a Mac, or a Mac person around to assemble the things 09:04
Ambrose Just for the record I have successfully got Raku running before I even got on this chat: 09:06
`Welcome to Rakudo™ v2023.06.
Implementing the Raku® Programming Language v6.d.
Built on MoarVM version 2023.06.`
I assume I'm relatively up to date
nemokosch yes, it should be compilable, there are people who use it
just not with the Rakudo Star bundle
Ambrose I installed it via macports which went just fine 09:07
nemokosch I think rakubrew itself should work for recent Mac as well
Ambrose I'm just showing my kid how I can type π in raku and it knows it's Pi 09:11
Also e and i
nemokosch perhaps there is tau as well 09:19
I kinda don't like how i is not a valid Complex literal in itself, you'd have to write 1i to parse it 09:20
Ambrose Yeah τ worked 09:21
nemokosch well, technically, there are no Complex literals, just like how there are no negative literals; it's rather like there are parseable expressions 09:24
Ambrose I don't know enough about maths to understand the argument, just thought my kid who IS good at maths would be interested 09:34
nemokosch fair enough 09:37
they are like ingrained constants 09:38
actually, constants are usually similarly ingrained; they are resolved at compile time and then a term is created for them in the grammar itself
antononcube @Ambrose Show your kid Mathematica, then. 🙂 09:40
Ambrose I will check that out thanks 10:34
thundergnat Regarding the discussion yesterday about a named parameter for "split". I would be in favor of: "pieces" 11:25
m: multi split(Str $str, Str $needle, :$pieces = Inf) { $str.split($needle, $pieces) }; say 'a:b:c:d:e'.&split(':', :3pieces);
camelia (a b c:d:e)
lizmat well, then it would be ":3max-pieces" ?
because you specify the maximum number of pieces, you can't guarantee the actual number of pieces? 11:26
but I like "pieces" as a concept
thundergnat Hmm. max-pieces would be more accurate but may be unnecessarily verbose. Just a thought. 11:27
nil 1 15:10
Xliff \ 15:54
tellable6 2023-09-11T19:36:04Z #raku <gfldex> Xliff I did spend some thinking time on your reusability question. You don't even need a macro. An EVAL in a BEGIN inside a module won't get a performance hit, thanks to precomp.
Xliff \o
.tell gfldex True, that would be nice for RakuAST, but how would you deploy it in code? 15:56
tellable6 Xliff, I'll pass your message to gfldex
gfldex I guess there is always more room for another post on my blog. :) 15:57
Xliff Aha! That is true! Looking forward to it! 15:59
In the meantime, I have been experiencing an issue with raku where I will run one of my projects and get a "no space left on drive" 16:00
This is with the editor "pulsar" (nee atom) running.
If I close pulsar, the program runs fine.
Is it possible that pulsar is changing the environment in such a way that a drive space check is reporting no space when there actually is? 16:01
MasterDuke ulimit problem? 16:02
Xliff If it was a ulimit problem then why would anything work? Why does shutting down pulsar fix the issue?
gfldex Xliff: Pulsar could use cgroups to limit itself. 16:17
Xliff How would I do that? 16:20
Or do you think that its use of cgroups is the cause? 16:21
Funny you mention that. I just ran into the problem, again.
Close pulsar.... problem goes away.
gfldex What happens if pulsar is open and you run the Raku progam from a different terminal? 16:22
Xliff Different terminal. Same problem. 16:24
nemokosch lately I've been trying to get some code polished for ppm 16:39
but all in all, I'm very thankful I don't have to actually use this editor
and it's mostly the fault of Atom as an organization, they did a far worse job than any hobbyist volunteer group 16:40
coleman I recently became aware of "Invisible XML", a grammer language that reminds me (a little bit) of Raku grammars invisiblexml.org/ 17:09
The idea is you write a grammar to parse random text formats into xml. 17:10
tonyo . 19:44
coleman: man i would've loved that 15 years ago 19:45
dealing w soap and xnmp