🦋 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.
grondilu Type theory is pretty cool. I like how it's used to define integers out of natural numbers. I wondered how it would be implemented in raku. Here is a draft: gist.github.com/grondilu/a9812e3a8...19bd46f5d0 11:34
lizmat :-) 11:35
nemokosch aren't classes our-scoped by default? 13:01
lizmat m: class A { }; say OUR::<A> # looks like 13:05
camelia (A)
lizmat m: my class A { }; say OUR::<A> # looks like 13:06
camelia (Any)
Voldenet there's practical uses of natural numbers being types - once I needed (in C#) the "unique type" as identifier for DI use and ended up using natural numbers sequence 13:25
grondilu lol now that I think about it, the way I implemented it is absurd memory-wise, I would end up making an instance for all natural numbers up to the highest I would need. 13:29
nemokosch oh right 13:30
100 as a natural would create 101 instances
Voldenet though at some point I switched to using 10 instances of digits and using Number<Digit, Number<Digit>> instead 13:31
nemokosch I asked the our class thing because there is our class Nat and class Int but the latter is also referenced with the fully qualified name somewhere below
perhaps it could be consistent
grondilu @nemokoscch yeah. In any case using instanciation is not really in the spirit of type theory if I understand correctly. 13:32
I couldn't see how to make it work any other way, though.
nemokosch behold, Anton Antonov incoming 13:37
antononcube @grondilu "using instanciation is not really in the spirit of type theory" -- then try implementing in R not in Raku. (R designers prefer not to deal with fine granularities like scalars.)
Actually, since R is descendant of LISP, I wonder is Racket more suitable for type theory. (Than Raku.) 13:42
grondilu I'm new to this anyway. Can OOP be used to implement type theory? 13:43
grondilu I mean superficially it looks so but what do I know. 13:43
antononcube Well, sure. But OOP is just a paradigm. Meaning, someone/something should come up with OOP "design patterns" for type theory. 13:45
And since "Interpreter" is well established OOP design pattern, one can argue, that of course OOP can be applied to type theory, at least via "Interpreter". 13:46
grondilu @antononcube you've worked on a Maxima parser, right? 13:50
antononcube Maxima!! 🤮🤮🤮
Ok, good guess! 🙂 Mathematica, though, not Maxima. 13:51
Granted, they are very close...
grondilu I've looked into Maxima recently, it doesn't seem so bad.
antononcube And, I worked not on the Mathematica parser, but just on certain numerical algorithms. 13:52
Yeah, Maxima is fine enough. (Again very similar to Mathematica.)
But I did implemented parsers with Mathematica: resources.wolframcloud.com/PacletR...alParsers/ . 13:53
Since I liked functional parsers so much, I also implemented them in Raku: raku.land/zef:antononcube/FunctionalParsers 13:54
grondilu What I'm interested in is a CAS that I could use from raku. Mathematica is a no-go as almost nobody will be willing to buy a license or install the Wolfram engine. 13:56
antononcube Wolfram Engine is free for developer. And recently a team of two developed a very nice notebook interface to it. 13:57
Do not get me wrong -- I would prefer Raku-native symbolics.
And having Mathematica integrated with Raku, should give at least a good way of verifying symbolic implementations in Raku. 13:58
grondilu Well a test suite using Wolfram engine for verification would not be hard to write. You can always use shell commands. 14:00
antononcube Please see this: www.youtube.com/watch?v=nWeGkJU3wdM
I think it is less than 8 min long... 14:01
grondilu *watching 14:02
I have no idea what ZMQ is. 14:03
antononcube It is used a lot for inter-process communications. For example Jupyter (notebooks framework) is based on Zero MQ (ZMQ). 14:04
grondilu Is this like a virtual network layer? 14:05
tea3po nah
en.wikipedia.org/wiki/Message_queuing_service 14:06
I think it's more like RPC
antononcube @grondilu zeromq.org
tea3po I meant IPC not RPC I guess 14:07
grondilu Why was it necessary? Raku's IPC wasn't working?
antononcube @grondilu I prefer "standard" solutions -- for me using ZMQ is standard solution. 🙂 14:08
For example, Mathematica uses ZMQ with all of its external language evaluators. (Julia, Node.js, Python, R, Matlab, etc.) Meaning, if I want to program Raku as an external evaluator in Mathematica then I would use ZMQ. 14:10
Which reminds me -- if you prefer to use Raku via Mathematica notebooks -- or chatbooks -- you can use the paclet "RakuMode" : resources.wolframcloud.com/PacletR.../RakuMode/ . 14:20
grondilu I'll tell you what I want to do and if you want you can tell me what method would be best. 14:25
I have this geometric algebra module, github.com/grondilu/clifford, that I would like to improve. Mostly making it faster. 14:26
Every time I look it into it, I end up concluding it needs symbolic calculus. I think the computations could be one shot so I'm thinking putting them in a BEGIN block or something. 14:27
so maybe I could connect to wolframalpha, so that users do not need to install Mathematica? 14:28
Is it possible to submit arbitrary Wolfram code to wolframalpha? 14:29
antononcube @grondilu I will address the last questions first. 1. You can use Wolfram Server or Wolfram Cloud 2. www.wolfram.com/application-server/ 3. www.wolfram.com/server-deployment-options/ 14:32
Alternatively, you can do something similar to the following solution of mine: 1. Get Wolfram Engine (WE) -- again, free for developers 2. Make a Cro application that connects to WE 3. Expose the Cro serivice to end-users 14:34
grondilu That makes sense. So I guess now I have no excuse not to work on it 😉 14:36
antononcube I have discussed the Raku-Cro-WE solution in several movies: - "Doing it like a Cro" : www.youtube.com/watch?v=wS1lqMDdeIY - "Raku for prediction presentation at TRC-2021": youtu.be/flPz4lFyn8M?si=Ml4UGgsiduI076pX 14:37
@grondilu Good luck! It is in my TODO list to experiment with symbolics in Raku, but I have too many side projects to that in the near future. 14:39
For example, "everyone" wants to talk to me about LLMs. 14:40
(Well, except people from Raku's community...)
grondilu Well, I think LLM and symbolic calculus are related. I expect LLMs to be trained on proof assistant languages eventually. I would not be surprised if full automation in mathematics comes in a few years. 14:51
antononcube Interesting hopes! I am using LLMs to generate different mathematical models. (Currently) LLMs can be used to reduce the initial, kick-start work. But / otherwise, the hallucinated code / models / math needs to be verified and "not trusted". 14:53
Basically, generate, mistrust, and verify. ™️
@grondilu 1. Do you use Jupyter notebooks? 2. Do you use Jupyter with Raku kernel? 3. Do you use Raku to access LLM services? 14:56
grondilu I could never figure out this Jupyter thing. I have a Mathematica license anyway so I barely see any use for Jupyter. 14:57
though I'm kind of tired of having to upgrade my license every time a new Mathematica version is out. That's why I recently looked into maxima. 14:58
antononcube Try the "RakuMode" paclet then -- if you have Mathematica version >= 13.2, it is going to be based on the Chatbook style. 14:59
grondilu I have 13.0
antononcube Well, to some extend that is why I developed the Jupyter chatbook solutions -- more people know how to deal with those kind of setup. (And want to continuously do it.) 15:00
grondilu I'll look into Jupyter again some day, but I tend to stick to the terminal so I'm not sure I'll stick to it. 15:02
antononcube Here is a Jupyter chatbook (Python-based) that shows mathematical text generation and rendering at the bottom: github.com/antononcube/Python-Jupy...ells.ipynb 15:03
grondilu I know Jupyter is fairly popular so I may be missing out. 15:04
antononcube BTW, that Jupyter notebook is a good example-artifact of the "less is more" triumph over "elite, superior solutions" (like Mathematica.) 15:06
ab5tract_ I’m trying to recall all of the “three-letter” refactors and I know I’m missing at least one 17:25
Nom = new object model 17:26
GLR = Great List Refactor
??? = ? ? ?
AST = abstract syntax tre 17:28
*treee 17:29
lizmat AST is not really a refactor, RakuAST is :) 17:33
nemokosch To be fair, don't know what to compare to 17:37
But "new object model" sounds like something that might have been a historical mistake
Doubling down on the work of certain individual was probably a historical mistake, I probably don't have to say the name. Those who know know 17:39
antononcube Please share the name with "last row". 17:49
Ok, you can message me in private... 🙂
nemokosch what is this "last row"? 17:50
lizmat nemokosch nom even predated my involvement, so I'm not sure who / what you mean by your last remark 17:52
I mean, the "new" on nom is basically as new as en.wikipedia.org/wiki/New_College,_Oxford 17:54
nemokosch I suspected that "new object model" is something about the metamodel 17:59
seems like it pretty much is
bartolin I'm bewildered and also somewhat annoyed by these statements about historical mistakes. It feels like you speak badly about the past work of many volunteers. (I don't want to know whom you single out there.) I don't understand why you are doing that. And what do you mean by "historical mistake"? Do you think the old implementation (that was replaced by "nom") was better and should have stayed? 18:07
Maybe (hopefully) I'm reading too much into this. 18:08
nemokosch I don't know of a non-volunteer around this language. I am a volunteer and I'm pretty sure you are also a volunteer. I don't think this is a good excuse for anybody. 18:09
The difference is that some people apparently have treated this project as "free lunch", not really taking it seriously the very moment it became uncomfortable for them
it's not really about what "contemporary" state existed 18:11
the community took somebody's hobby work overly seriously
bartolin Well, maybe I'm missing some insights. I've never heard that before. 18:12
lizmat neither
also: I object against the phrase "hobby work"
the fact that hardly anybody gets paid for what they do for Raku, does not make it "hobby work" 18:14
nemokosch If somebody drops out every time any sort of inconvenience shows up, without feeling any sense of responsibility to the community, that's hobby work
I don't even think it's fair to even call this "volunteering", it's just freetime fun activity
lizmat people give what time they have, and some of us have a life 18:15
nemokosch I'm not talking about that, though 18:16
El_Che this is turning dark
tellable6 2023-10-19T18:08:47Z #raku-dev <jdv> El_Che the release happened
lizmat then I'm unclear *what* you are talking about
nemokosch When somebody feels no responsibility towards a project whose architect they pose as 18:17
bartolin Maybe we shouldn't continue this discussion? I don't think that it will lead to anything good.
nemokosch That's really an extreme
It's not exclusive to them, or even to this project, that there are people who inflate the meaning of volunteering to "I got no money for this so it's your fault to expect the least caring or quality" 18:18
but that doesn't mean one cannot learn from it
lizmat stops feeding 18:19
nemokosch starts learning? 18:20
to be frank, it's not the greatest pleasure that every time any of you start thinking about these things, you come to the same conclusions, almost every single time 18:23
and yet you refuse to draw the conclusions, because it's inconvenient
instead, I get to be the bogeyman
almost like certain AlexDaniel, really 18:24
bartolin nemokosch: is there a way to exchange private messages? I'm still thinking about the above discussion, but don't want to follup up in this channel. 19:14
nemokosch sure, one sec... 19:15
antononcube damn! I just cooked some 🍿 19:24
Nemokosch DMs open 19:24
stanrifkin discord-raku-bot is a bot?
bartolin Nemokosch++
bartolin is a noob with irc -- /msg doesn't seem to work 19:27
Nemokosch discord-raku-bot is basically a bridge 19:28
the bot that gets to send messages collected on discord
there is an analoguous bot on discord that sends the messages collected on IRC to the appropriate channel on discord 19:29
stanrifkin So discord-raku-bot is a pool of people? Not an individual? 19:31
antononcube It is an LLM. (Not.)
Nemokosch <antononcube> for example signifies that this message was sent by the discord user called "antononcube" 19:33
stanrifkin Nemokosch: OK, thanks. Now it makes sense.
antononcube 🙂 🙂 19:54
Nemokosch 🕵️‍♀️ 20:00