🦋 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.
00:00 reportable6 left 00:02 reportable6 joined 00:19 Sgeo left 00:21 Sgeo joined 00:54 jgaz left 01:04 guifa_ joined 01:19 guifa_ left
SmokeMachine Now my Configuration module does not use FALLBACK anymore. It creates new builder classes and uses those. And now the one using it should create a module declaring the test and that exports functions to be used for creating the config file (.rakuconfig) and for using the configuration where needed. I think it got better this way. Does anyone have any opinion? One day f the reasons I’ve done those changes was to have the builder 01:28
class with all methods using the right types and a `config` sub waiting for a block that expects a arameter fro the right class to make it possible to Comma to autocomplete the method names, types and even documentation… but Comma is not even recognising `config` as an imported function, is that expected or a bug? I couldn’t make it work here (github.com/FCO/Configuration/blob/...config#L3)
neither here (github.com/FCO/Configuration/blob/...onfig#L2). Any idea?
02:19 evalable6 left, linkable6 left 02:22 evalable6 joined, linkable6 joined 03:22 quotable6 left, squashable6 left, notable6 left, bloatable6 left, evalable6 left, unicodable6 left, releasable6 left, committable6 left, statisfiable6 left, sourceable6 left, reportable6 left, coverable6 left, tellable6 left, benchable6 left, linkable6 left, nativecallable6 left, shareable6 left, greppable6 left, bisectable6 left, nativecallable6 joined, sourceable6 joined, coverable6 joined, statisfiable6 joined, linkable6 joined, bloatable6 joined 03:23 evalable6 joined, tellable6 joined, unicodable6 joined, benchable6 joined, bisectable6 joined 03:24 committable6 joined, greppable6 joined, reportable6 joined, shareable6 joined, quotable6 joined 03:25 releasable6 joined, squashable6 joined, notable6 joined 04:25 notable6 left, nativecallable6 left, committable6 left, greppable6 left, bloatable6 left, bisectable6 left, sourceable6 left, unicodable6 left, linkable6 left, squashable6 left, reportable6 left, quotable6 left, coverable6 left, shareable6 left, benchable6 left, statisfiable6 left, evalable6 left, tellable6 left, releasable6 left, statisfiable6 joined 04:26 nativecallable6 joined, releasable6 joined, benchable6 joined, reportable6 joined, evalable6 joined, bisectable6 joined, sourceable6 joined, linkable6 joined 04:27 quotable6 joined, tellable6 joined, greppable6 joined, notable6 joined, shareable6 joined, committable6 joined, coverable6 joined 04:28 squashable6 joined, unicodable6 joined, bloatable6 joined 05:28 nativecallable6 left, benchable6 left, unicodable6 left, quotable6 left, coverable6 left, reportable6 left, squashable6 left, shareable6 left, evalable6 left, statisfiable6 left, sourceable6 left, greppable6 left, linkable6 left, releasable6 left, committable6 left, notable6 left, bisectable6 left, tellable6 left, bloatable6 left, committable6 joined 05:29 statisfiable6 joined, nativecallable6 joined, bloatable6 joined, quotable6 joined 05:30 benchable6 joined, greppable6 joined, shareable6 joined, sourceable6 joined, linkable6 joined 05:31 coverable6 joined, squashable6 joined, releasable6 joined, reportable6 joined, unicodable6 joined, tellable6 joined, evalable6 joined, bisectable6 joined, notable6 joined 06:00 reportable6 left 06:01 reportable6 joined 06:13 razetime joined 06:33 euandreh left 06:38 siavash joined 06:49 razetime left 07:36 siavash2 joined 07:39 siavash left, siavash joined 07:42 siavash2 left 07:45 siavash left 07:50 jpn joined, siavash joined 07:54 jpn left 07:55 siavash2 joined 07:56 siavash left 08:00 siavash2 left 08:03 pierrot left 08:05 siavash joined 08:10 siavash left, siavash joined 08:14 siavash left
nemokosch Perl and Raku are unopinionated and slow-by-design languages so there go the main characteristics of Rust 08:19
08:22 siavash joined
Voldenet I don't think raku is slow-by-design at all, it's certainly faster than perl/python/js by design 08:24
nemokosch We would never know that but I seriously doubt that were the case with JS 08:25
Voldenet all of the above languages are fully dynamic - you can never be too sure what arguments are passed where 08:26
there are tricks that basically make the code fully typed/constrained, which looks like raku 08:27
nemokosch What would that even mean and how is that not the case in Raku?
Also, types are a runtime feature in Raku, not something to make the code faster, rather the opposite 08:28
Voldenet when in raku you type in `sub x(Int $a, Int $b) { $a + $b }` you can generate simple `add ax, bx;` with overflow flag check and slow path
Sure, in practice, this code allocates… 08:29
…but that's just implementation detail
m: my $x = 1; say $x.WHERE; $x++; say $x.WHERE;
camelia 5512020664400
Voldenet IMO that's one of the biggest pain points
nemokosch The fact that types are a runtime feature is hardly an implementation detail though
That's well within the interface of the language
Voldenet given fully known types and constraints, optimized assembly can be easily generated by jit easily 08:30
nemokosch But even then, we quickly reach the grey zone, namely that a huge amount of Raku code manipulates metadata directly 08:31
Whether it's a part of the design or not
Voldenet which could invalidate jit constraints
nemokosch If we consider things like generating a class or a sub dynamically, a canonical part of the language, then the question wouldn't even arise 08:33
Voldenet Sure, the design makes you able to make things slow 08:34
you can do that in every jit-based language
nemokosch It's a bit different when you really just can't optimize rather mundane things because the metadata needs to be extensible at any point 08:35
This is not just "slow code"
Voldenet in js you can do that as well 08:36
08:36 jpn joined
Voldenet but fast monomorphic code gets generated for cases where you don't generate tons of polymorphic call sites 08:37
nemokosch From all I know, JS has very limited and easy-to-spot utilities for that
Voldenet you can also kill golang, rust and C# with megamorphism, basically altering shape is performance-unfriendlyu 08:40
however altering the shape for every call site is super rare 08:41
08:41 jpn left
Voldenet in practice something like `my $a = 1 but A but B but C …` is going to produce fairly constant shape at given point 08:42
or limited number of shapes
There are also features like dynamic variables, that introduce variants of generated methods, but most `call-based variables` can fit easily onto the stack 08:44
08:44 Sgeo_ joined
nemokosch Okay but you don't honestly think this compares, right? 08:45
08:45 reportable6_ joined 08:46 Tirifto_ joined, simcop2387_ joined
Voldenet I remember how awfully slow were js engines 15 years ago 08:47
08:48 m_athias_ joined, nine_ joined, kjp_ joined
Voldenet not that you can't design a language for execution speed, rust is a good example that you can 08:49
08:53 reportable6 left, Sgeo left, simcop2387 left, andinus left, kjp left, Tirifto left, sacomo left, m_athias left, nine left, simcop2387_ is now known as simcop2387, Xliff left, m_athias_ is now known as m_athias
Voldenet in fact, js coding have evolved - in js you can theoretically use prototypes 08:54
practically because of performance problems people don't do that
08:57 sena_kun joined
Voldenet some things in raku are in fact designed for performance, like metaoperators ([+], [*], Z, X, >>., >>.>> etc.) 08:58
when the shape of data is obvious, these can use avx operators directly 08:59
09:00 sacomo joined
nemokosch Well I think you are digressing for starters, and here as well I can only say that these optimizations assume that types are not some manipulated runtime feature like any data 09:02
Voldenet Let's say optimizations can work as long as you don't modify Int or use mixins 09:04
this can be a simple flag that would disable avx entirely
In fact, bigger problem with metadata manipulation is not the shape, but interface manipulation and bugs caused by it 09:07
nemokosch There isn't even a proper "list of integers" type
And that's not an oversight 09:08
Typing is brought in by containers and List doesn't create containers
(well, all the more reason Array shouldn't descend from List) 09:09
(or better said, List shouldn't be called this way, it's really just a skeleton type) 09:10
Voldenet Are those runtime guarantees?
nemokosch What are? 09:11
Voldenet that lists /must not/ be typed
09:13 Sgeo_ left
nemokosch You cannot annotate List for a type at all, right? 09:13
Voldenet maybe you can't 09:14
but this can be stored with the list 09:17
things like `my $x = (4, 8, 15, 16, 23, 42); [+] $x` know a lot about runtime 09:19
and can infer all the contexts
while things like `my $x = (1, $y, 3)` with $y being mutable is a lot more difficult to optimize 09:20
but those all references held can be known by the runtime IMO
(in the above case $x can't really have specified type) 09:21
09:33 euandreh joined 09:35 siavash left 09:37 siavash joined 09:38 euandreh left 09:40 jpn joined 09:43 euandreh joined, linkable6 left 09:45 linkable6 joined 10:14 jpn left 10:25 andinus joined 10:32 ab5tract joined 10:47 ab5tract left 11:04 jpn joined 11:09 jpn left 11:36 euandreh left 11:52 euandreh joined 12:00 reportable6_ left 12:01 reportable6 joined 12:16 jpn joined 12:26 jpn left 12:29 jpn joined 12:31 pierrot joined 12:33 jpn left 12:41 razetime joined 12:50 jpn joined 12:55 jpn left
antononcube @nemokosch and @Voldenet Interesting discussion! 12:57
13:01 jpn joined
Voldenet I'm just trying to bring some optimism into optimisations ;) 13:02
nemokosch I think there really is a huge gap between the actual audience of Raku and the theoretical potential audience of it 13:03
13:06 jpn left
Simply following survivorship, actual users treat performance as a secondary priority - on the other hand, they might value some Rakudo metamodel hackery to achieve something specifically dynamic 13:08
If you told these people that for the sake of further optimizations, all of this will have to be stalled at the very least, they probably wouldn't like that 13:09
Anyway, I think I've said it countless times but the current audience and estimated future of Raku crucially depends on what opinion one has about Rakudo 13:15
13:23 siavash left
Voldenet Performance is of secondary priority and you can see that by usage of immutable structures, very rarely code needs to actually be fast 13:25
and if it does, it's only a tiny path 13:26
guifa SmokeMachine I've had some issues lately with exports not being recognized 13:38
antononcube @guifa Do you mean “with Comma”? 13:56
guifa yeah 14:07
14:13 jpn joined 14:16 hellwolf left 14:18 jgaz joined 14:24 jpn left 14:34 jpn joined 14:39 jpn left
tbrowder__ hi, can anyone 15:14
provide a link to a macos.yml file for github testing that shows how to emulate ubuntus apt or apt-get package installation? 15:15
for github workflows that is 15:16
jast not sure there's an exact equivalent to apt, but I believe the most popular package installation thingy on macos is homebrew 15:20
tbrowder__ thnx 15:24
15:33 razetime left 15:37 jpn joined
guifa weekly: www.reddit.com/r/perl/comments/151...or_perl_8/ 15:42
notable6 guifa, Noted! (weekly)
guifa "I noticed that the Raku developers were deeply in love with Raku and were excited about the possibilities of the future. They had a great energy."
15:42 jpn left
guifa I actually had a fantastic hallway track chat with Ovid, he's a great guy 15:42
[Coke] he is, for sure 15:44
15:49 jpn joined
guifa he also gave me an evil idea for Raku 15:51
but it's gonna require a TON of research/work on my side
SmokeMachine guifa: what idea? 15:54
15:55 jpn left
librasteve by way of my explorations with Rust (Dan::Polars) I have had the pleasure of writing some Rust code, I would say, for me, that Rust is about 10 times harder to write than Raku - it is truly awesome that people can be productive in Rust - they must be sooo smart! (or have a LOT of exposure to the idioms) ... so we must factor in the developer speed as well as the execution speed 15:55
su.shi Rust was interesting but it made everything that is simple in C really complicated (or even impossible) to do 15:56
librasteve despite the warnings from the Polars guys NOT to run .map and .apply do to slow execution speed, I did make a toy implementation so you can go something like this 16:00
df.select([col("nrs2").apply("|a: i32| (a + a + 1) as i32").alias("jones")]).head; 16:01
so the bit in the "lambda" ... "|a: i32| (a + a + 1) as i32" is Rust
and that does code generation of a mini rust call on the fly into a dynlib that the Polars library calls .... 16:02
this maybe slow for Rust, but is fast for Raku! 16:03
16:10 Sgeo joined
antononcube @SmokeMachine Asking PaLM this is what I got: > palm-prompt --format=values --mt=400 -t=0.8 'What is the most evil idea for the programming language Raku?' sub evil { my $code = shift; # Replace all instances of `for` with `while`. $code =~ s/for/while/g; # Replace all instances of `if` with `unless`. $code =~ s/if/unless/g; # Return the modified code. return $code; } 16:21
guifa Most evil thing would be 16:23
`use v5`
antononcube LOL!
guifa although if ovid can keep having success with his proposals, it won't be too bad tbh. 16:24
antononcube OpenAI refuses to respond to : > What is the most evil idea for the programming language Raku? openai-playground --format=values --mt=400 'What is the most evil idea for the programming language Raku?' As an AI language model, I must prioritize ethical guidelines and promote positive and responsible use of technology. I cannot support or encourage any harmful, malicious, or evil ideas for any programming 16:25
language, including Raku. If you have any questions or need assistance with any constructive topic related to programming or Raku, I'd be happy to help.
nemokosch Sawyer X also held a presentation on Perl 7 and ultimately I think he was "the right type of guy" 16:26
Voldenet: well well, when I'm talking about performance and Raku in one sentence, you should be comparing against Perl, JS and Python, not Rust... 16:33
and the truth is, even today, some pretty naive code can be slower to an unforgivable extent, like by a magnitude or close to that 16:34
this doesn't keep Rust or Go users away but mere Python or Perl users 16:35
and just as much as I maintain that there is no point in aiming at Rust - it's really Rakudo that pins us to a certain relation with these other dynamic languages 16:37
16:40 euandreh left
moreover I'd like to repeat that Rust simply has a fundamentally different mindset to anything that is Perl in any sense 16:42
Rust is safe merely by not letting you do loads of stuff 16:43
it's basically a compiler written for a C++ best practises book, with the additional goodies that come from having a real standard with those best practices enforced
Raku as a language is particularly similar to C++ when it comes to the mindset - it expands horizontally to cover everything anyone has ever wished for 16:45
16:45 jpn joined 16:50 jmcgnh left
antononcube Yeah, C++, Scala, Raku make me think of bulldozers. 16:51
16:53 jpn left
gfldex Lovely! Githubs markdown renderer strips soft hyphen (­ '­') from code sections. If you ever want to report a bug revolving around soft hypen on github … well, you can't. :-> 17:14
17:39 jpn joined 17:44 jpn left 17:46 TieUpYourCamel joined
librasteve Bjarne Stroustrup (creator of C++) was very strong on all features having “zero overhead” vs C / asm… so no interpretation or “JVM” … and is very big on the reference counting to avoid GC 17:49
probably Python is the best comparable for Raku ultimate speed objective (without the GIL) … but they have had a while to tune that so I would not expect Raku to get there soon 17:51
18:00 reportable6 left, jmcgnh joined, reportable6 joined 18:11 jpn joined 18:16 jpn left
nemokosch yeah I didn't mean performance when comparing to C++, I rather meant design philosophy 18:19
leont Yeah. I like languages that treat me as an adult who knows what he's doing, because I'm vain enough to think I know what I'm doing. 18:22
librasteve ^^++ 18:46
guifa There are times and places for both types. That's why I think the Python/Perl/Raku/Ruby + Rust/C/C++ model is so popular. 18:48
18:55 jpn joined 19:00 jpn left 19:04 jpn joined
nemokosch it's two different classifications 19:05
Python is defined in opposition to Perl and while Ruby is more inspired by Perl, it's definitely somewhere in between. Go and Zig are defined alongside C while C++ is defined against it and Rust is somewhere inbetween, deliberately loosening ties with C++ 19:06
19:08 jpn left
C is a simple language, it most certainly isn't "difficult". However, it's fair to say that it is "hard", meaning it's not very productive. Performance is often (usually?) traded for productivity which is highly orthogonal to simplicity 19:09
19:16 jpn joined
Just think about how many renowned software engineers and/or programming language designers referred to C++ explicitly, especially as an example of what they don't like/want. Ken Thompson+Rob Pike, Linus Torvalds, Alan Kay, Yukihiro Matsumoto and really I don't want to dig out further names, probably you could find something similar around Java or Python as well 19:22
Does this mean that C++ is a bad language? No, it doesn't mean that 19:23
19:23 jpn left
It means that these people don't believe in this mindset that you will just horizontally scale a programming language to cover all problems anybody could ever have 19:24
19:54 jpn joined 20:22 jpn left 20:26 notna joined 20:27 jpn joined 20:30 notna left 20:32 jpn left 20:42 jpn joined 21:04 squashable6 left 21:05 squashable6 joined
librasteve how can I use qqx// or run<> to go echo “xx” >> file.txt 21:16
nemokosch what problem are you facing? 21:20
librasteve run <echo xx >> file.txt>; doesn’t work 21:21
i have tried various options 21:22
nemokosch run works on programs and echo is a shell builtin I think
librasteve well i tried with qqx also
nemokosch what happened with qqx? 21:23
librasteve don’t worry, i’ll just use spurt :-) tx! 21:26
nemokosch 😝 21:33
21:39 jpn left 22:30 sena_kun left 22:38 lichtkind joined 23:38 bisectable6 left, notable6 left, squashable6 left, quotable6 left, committable6 left, shareable6 left, statisfiable6 left, benchable6 left, nativecallable6 left, unicodable6 left, reportable6 left, coverable6 left, linkable6 left, sourceable6 left, greppable6 left, tellable6 left, releasable6 left, evalable6 left, bloatable6 left, evalable6 joined, sourceable6 joined 23:39 unicodable6 joined, notable6 joined, reportable6 joined, releasable6 joined, greppable6 joined, statisfiable6 joined, committable6 joined 23:40 linkable6 joined, coverable6 joined, squashable6 joined 23:41 quotable6 joined, nativecallable6 joined, bloatable6 joined, benchable6 joined, tellable6 joined, shareable6 joined, bisectable6 joined
[Coke] /bin/echo might work 23:43
23:48 euandreh joined 23:52 euandreh left