This channel is intended for people just starting with the Raku Programming Language ( Logs are available at
Set by lizmat on 8 June 2022.
01:59 raiph joined 02:34 tea3po joined 02:37 teatwo left 02:41 raiph left 02:43 raiph joined 02:48 raiph left 07:43 Manifest0 joined
rcmlz m: #| operator ≈ compares with tolerance 1e-10 sub infix:<≈>(Numeric \a, Numeric \b --> Bool){ abs(a - b) < 1e-10 } #| one sentence description sub is-even(Numeric \a --> Bool){ a mod 2 == 0 } say &is-even.WHY; try { say &≈.WHY; say ≈.WHY; } 09:57
Raku eval Exit code: 1 ===SORRY!=== Error while compiling /home/glot/main.raku Preceding context expects a term, but found infix ≈ instead. at /home/glot/main.raku:11 ------> say ≈⏏.WHY;
rcmlz Is it possible to attach a Declarator block to an infix? 09:58
I was wondering how I could allow the user to investigate how e.g. ≈ works 09:59
nemokosch wasn't the problem much rather the way of retrieving?
rcmlz m: #| one sentence description sub is-even(Numeric \a --> Bool){ a mod 2 == 0 } say &is-even.WHY;
Raku eval one sentence description
nemokosch &[≈] could work, or so could simply typing out &infix:<≈>
rcmlz m: #| operator ≈ compares with tolerance 1e-10 sub infix:<≈>(Numeric \a, Numeric \b --> Bool){ abs(a - b) < 1e-10 } say &[≈].WHY; say "Nice! Thank you!" 10:00
Raku eval operator ≈ compares with tolerance 1e-10 Nice! Thank you! 10:01
11:23 wafflus joined
wafflus can anyone show me or point me to a place that shows how to install zef on wsl 11:25
nemokosch if you use Rakubrew, you probably don't need to install zef and it has a build-zef command as well 11:26
if you just have any Rakudo that came by, you could clone zef and get it install itself
wafflus k wiill try that way i';ve tried about 5 different ways and they all have problems 11:27
11:35 tea3po left, tea3po joined 11:48 tea3po left
wafflus terrible i think i installed a app:rak but it doesn't auto add it to path and when i tried to run it i get a bash error I also tried installed a different packages and it complains about missing depedancies 11:52
rcmlz Not WSL, perhaps still helpfull: lately I played around with Github workflows and after installing rakudo via apt I used sudo git clone; cd zef; sudo raku -I. bin/zef install . ; cd .. ; sudo rm -rf zef/; sudo /usr/lib/perl6/site/bin/zef install Test JSON::Tiny 11:53
wafflus k ty few mins will try 11:55
none work 12:02
tying building it 12:03
nemokosch you probably rather have a WSL problem 12:04
wafflus maybe but is pretty confusing to install 12:06
nemokosch it was like wsl --install or something...
wafflus not wsl i mean raku + zeg 12:07
nemokosch I don't think so
and to be frank, I don't find it fair that you have very peculiar environmental problems and mask them as some Raku problem
wafflus put it this way raku has caused me the most problems 12:08
there are loads of diffrerent way and diffrenet packages
nemokosch it feels a lot like you could be trying to install Node and then suddenly Node "would have the most problems" 12:10
wafflus i've got node installed and working 12:11
not saying raku is the only thing with problems 12:12
nemokosch still, the point is that the problem is probably on your side. It's not rocket science to set up WSL and run rakubrew, or add some apt source and run an apt install
wafflus ofc it must be it's always the users fault with linux:P 12:14
12:14 teatime joined
nemokosch I have seen people who thought the computer would just magically turn off or caught gazillions of adware, the threshold is simply different 12:15
somebody like that would never even get to Linux, or Mac for that matter
yabobay wouldnt that mean that user error is a bigger factor in windows and so with linux its more likely to be some random crap? 12:17
nemokosch no, it would just mean that "clueless user" have a different definition 12:18
wafflus or i mean maybe it just badly desinged software or maybe it hasn't been tested or maybe the installation instructions are incorrect 12:19
nemokosch a "clueless user" of Windows would never even get to one single environmental variable
yabobay it is crazy how not portable rakudo is
nemokosch anyway, here, I don't see anything actionable
somebody did something with some environment, it didn't work, let's blame Rakudo 12:20
rcmlz Did not soneone setup a Ansible playbook or something convinient for WSL?
wafflus @nemokosch i just follow the instructions i don't go editing files (unless it tells me) anways i might have got it to work 12:22
rcmlz As long as Rakudo-Star is not available via "App-Store" (installable via apt, Apple-App-Store or Windows-App-Store) , I guess there is need for convinience solutions ...
nemokosch I mean on Linux it hardly gets any more convenient than Rakubrew 12:23
literally it tells you what to paste, then you read the output, again, it tells you what to paste
and after two iterations, you are done
wafflus and the only real reason i'm using wsl is because raku didn;t work on windows with unicode
nemokosch and the fix didn't work for you
wafflus nope 12:24
nemokosch the fix that wasn't even Rakudo-specific
rcmlz yes, but the majority of (potential) users (like pupils and students) is not using Linux as main environment.
nemokosch okay but that's kind of not a reason to shit on the Linux toolchain which is pretty much foolproof from all my experience
yabobay assuming that rakudo will run on ur machine at all 12:25
nemokosch I have never seen it not run
rcmlz Correct, on Linux and Mac I also never experienced any issues.
nemokosch so I don't know why you would assume the opposite
several people went ahead and hacked around to build it even on Android
yabobay ive got a raspberry pi with arch that wont compile it 12:26
nemokosch Quite possibly because of the lack of resources
rcmlz Last time I had a look you could install Python on Windows via Microsoft App-Store.
nemokosch I'm not saying that it's okay to possibly peak at multiple gigabytes of RAM during compilation but as a Typescript user, that's not all that unexpected 12:27
rcmlz But in my experience: if you are running e.g. Python on Windows and want to use some ML libraries, there are also problems and "do not compile here" and "incompatible there" ... so nothing unusual ... 12:28
nemokosch Regarding Windows, I absolutely agree with you. Now, go tell people to deploy and test on Windows... 12:29
rcmlz LOL
nemokosch For myself, I'm not a masochist to build on Windows, and I won't spend my freetime inventing tests. If somebody can compile sensible test scenarios, sure, I can go through them but that's the most. 12:30
lakmatiol Can confirm, rakudo compilation is fairly resource intensive
yabobay wouldnt that just freeze the machine? cause thats not what happened 12:31
also using pkgsrc on a decently specced desktop running ubuntu
nemokosch never had any issues on that sort of environment 12:32
by the way, truth be told, I don't know what Raku has to bring to the table for a Windows user, other than being a random scripting language of a hundred
yabobay is there something it cant do on windows? 12:33
nemokosch same could be said for Perl any day, I think it's not even preinstalled on Windows
that's basically one of the biggest "features" down
the whole idea of shell scripting, processing string-based standard file handlers, Unix domain sockets... 12:34
shell scripting has never been similar, and PowerShell is a completely incompatible approach to the traditional Unix way 12:35
yabobay maybe ur doing scripting thats not for system stuff (something that connects to an API on the internet for example) or ur writing an actual application 12:36
nemokosch you could do that, in theory, and it's supposed to work, in theory 12:38
it doesn't seem like people do that, or even really think of doing that
wafflus they are different tools i like powershell for its ease of use in the terminal but i also like or at least find some of the features of raku interesting 12:39
plus its weird 12:44
plus its weird 12:56
m: say "test" 13:05
camelia test
antononcube On what hardware and OS? 13:06
lakmatiol It was IIRC a Linux school server, a gold Xeon sth sth, took several dozen minutes (then failed due to libuv, which is fair). Part of that was probably needing to disable parallelism due to a harsh thread limit. 13:08
antononcube Thanks! 13:10
wafflus phasers or cool\weird if you use them in a repl then the values get thrown away and are not automatically outputed 13:11
nemokosch yeah they are quite surely not meant for the REPL
wafflus yes i was jsut a little confused as to where the values go as when you use a do for you get the values outputed to the screen 13:12
a .say fixes it anways 13:13
antononcube Related, I have to figure out an Windows YAML script for testing Raku packages with GitHub Actions. (It seems I got Linux and macOS working on a few "showcase" packages, but not Windows.)
I have to exeperiment with phasers in the notebook solutions... 13:14
nemokosch check out File::Find 13:15
reminds me, I should just merge that PR
antononcube Will do! It is/was in my TODO list. 13:16
antononcube Basically, I got busy reprogramming "LLM::Functions" and "LLM::Prompts" in Python... 13:17
Turned out, that the Python re-programming of "Jupyter::Chatbook" is easier. (Not surprisingly.) 13:19
13:25 wafflus left
@nemokosch Worked! Thanks! See: 13:34
rcmlz m: say 5 ∈ UInt; 15:37
Raku eval False
rcmlz Does this sort of things only work in signatures and return values? 15:38
yabobay i think you want ~~ instead
m: say 5 ~~ UInt;
Raku eval True
rcmlz so UInt is not a "Set"
yabobay yea, its a type 15:39
lizmat 5 is not an element of the set containing the UInt type 15:43
antononcube @rcmlz That works in Mathematica, of course. At some point Raku should get a symbolic (sub-)system. 16:00
In this case, though, it might very well fairly easy to re-define (elem) to work on types. 16:04
lizmat you mean that 5 ∈ UInt would be the same as 5 ~~ UInt ? 16:10
antononcube @lizmat Yes. (I am not saying it should, but if someone prefers that notation, it can be done.) 16:12
lizmat in Raku, set semantics operate on the .WHICH values 16:14
special casing this for types feels... icky and a future WAT
antononcube Yeah, sure. Also, I gave wrong information about Mathematica -- the corresponding symbols are only meant to be used in set relations. 16:19
For example, Element[7, NonNegativeIntegers] : 16:21
nemokosch Types are genuinely not sets in programming tbh 17:22
lizmat I guess you could consider UInt as a lazy Set: (^Inf).Set 17:34
22:07 raiph joined
ingy 3D/close 22:56
22:56 ingy left
nemokosch wrong chat 23:13
23:13 deoac joined
With types and sets: I think we tend to think of the set data structure as something that is discrete and finite 23:15
of course, the values of data types are finite but often impractically large to evaluate as a set
and the subset constraint is like a completely different paradigm, it's a predicate 23:16
I think this is a bit like the rectangle and the square in OO 23:19
that is, makes clear conceptual sense in math but can lead to complications in a data structure-wise more rigid, behavior-wise more dynamic environment 23:21
23:36 teatime left 23:37 teatime joined 23:54 hythm joined