šŸ¦‹ 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:10 jpn left 00:19 lichtkind__ left 00:22 gdown joined 00:41 adsasd joined
adsasd hello. Who I can get help of functions in REPL ? 00:42
MasterDuke adsasd: what's the problem? 00:45
adsasd no problem, only I want now if the REPL is like Julia, with help of function and can see the source code of functions 00:46
or list of parameters of methods
MasterDuke sort of. `foo.^methods` will give you a list of all methods for foo 00:47
then you could choose one and call `.signature` on it to see what parameters it takes 00:48
and .WHY on a method should give you a link to it's page on docs.raku.org 00:49
but you can't easily see the documentation or implementation inline in the REPL 00:50
00:51 tejr left, tejr joined
adsasd Perfect, thanks!!! There are page in docs.raku.org or other site with the information you have given me or more things ? 00:53
MasterDuke yeah, that's the main documentation site 00:54
adsasd do you know the page ?
MasterDuke hm. i don't think the docs have a section specifically about the REPL. information about introspection is also kind of scattered throughout. e.g., docs.raku.org/language/objects#Met...rospection has some information, but it doesn't have everything 00:58
adsasd many thanks 01:01
MasterDuke welcome
the search on the doc site is pretty good. if you search for introspection you'll get a lot of relevant hits 01:02
adsasd I am new to Raku and Spanish. If you would like to help by for example gathering information to create a page in the REPL documentation where you could start
MasterDuke hm, not quite sure what you mean. are you asking where you could find information about the REPL so you could combine it all into one page? 01:05
adsasd yes 01:06
MasterDuke i'm not sure. i don't think there is very much information specifically about the REPL. it doesn't have a whole lot of unique functionality, it's pretty much the same as the rest of the language. i.e., those things i mentioned like .WHY and .signature are just part of the general language, not only for the REPL 01:08
but i would suggest asking in #raku-doc, you'll probably get a more useful answer there
adsasd thanks 01:10
MasterDuke happy to help
fyi, a bunch of the doc people are also in europe, so there's a decent chance they won't be online until tomorrow 01:16
01:20 adsasd left 01:34 ab5tract left, ab5tract joined 02:11 hulk joined 02:12 kylese left 02:16 adsasd joined
andinus rakudo downloads should work now: setup redirects for: rakudo.org/dl/rakudo/rakudo-2023.10.tar.gz 02:31
02:49 adsasd left 02:55 AlexDaniel joined 02:59 AlexDaniel left 03:41 tea3po joined 03:44 teatwo left 03:50 Xliff left 04:20 oodani left 04:21 oodani joined 04:50 svartur-hrafn left 05:36 leah2 left 05:37 leah2 joined 05:51 CIAvash joined 05:55 arkiuat joined 06:58 gdown left 07:08 arkiuat left 08:17 guifa_ joined 08:18 guifa left 08:52 Xliff joined 08:54 lichtkind__ joined 08:56 hulk left 08:58 kylese joined 09:10 constxqt left 09:12 Marcool04 joined
ab5tract andinus++ 09:14
Marcool04 andinus confirmed!
thanks a bunch šŸ‘ļø
09:30 grondilu joined
grondilu m: say grammar { rule TOP { <ident>* \% \s \n } }.parse: qq{foo bar\n} 09:53
camelia Nil
grondilu m: say grammar { rule TOP { <ident>* % \s \n } }.parse: qq{foo bar\n}
camelia Nil
grondilu m: say grammar { rule TOP { <ident>* % \s } }.parse: qq{foo bar\n} 09:54
camelia ļ½¢foo bar
ļ½£
ident => ļ½¢fooļ½£
ident => ļ½¢barļ½£
grondilu m: say grammar { rule TOP { <ident>* % \s $ } }.parse: qq{foo bar\n}
camelia ļ½¢foo bar
ļ½£
ident => ļ½¢fooļ½£
ident => ļ½¢barļ½£
grondilu m: say grammar { rule TOP { [<ident>* % \s]\n } }.parse: qq{foo bar\n}
camelia Nil
10:01 jpn joined
CIAvash rakudo binary download urls still redirect to Rakudo's GitHub page rakudo.org/dl/rakudo/rakudo-moar-2...gcc.tar.gz 10:04
Rakudo Downloads page also shows a "500 Server Error" rakudo.org/downloads 10:05
Marcool04 CIAvash ah... indeed. I only checked the source tarball link šŸ¤¦ā€ā™‚ļø
andinus yes i only setup redirects for source tarballs 10:06
Marcool04 I think the binaries were hosted elsewhere and haven't been pulled back yep
yet*
andinus atikon boxes are still down, i won't be able to pull it from theere
patrickb has binaries for last few releases, we should be able to restore them 10:07
Marcool04 out of pure curiosity, can I ask what happened with atikon? is it a hardware/infrastructure issue on their side?
andinus the point of contact addresses we had, they don't work there anymore 10:08
they relayed that the services should have been up but that's not the case
seems to be a major outage on their end
Marcool04 wow ok 10:09
10:22 adsasd joined, adsasd left 10:29 sena_kun joined
grondilu m: say grammar { rule TOP { [<ident>* % \s]\n } }.parse: qq{foo bar\n} 10:37
camelia Nil
grondilu ^why doesn't that parse?
m: say grammar { rule TOP { foo\n } }.parse: qq{foo\n} 10:46
camelia ļ½¢foo
ļ½£
nemokosch not using rules is always a safe choice
this whole "sigspace" business does more harm than good tbh
grondilu m: say grammar { regex TOP { [<ident>* % \s]\n } }.parse: qq{foo bar\n}
camelia ļ½¢foo bar
ļ½£
ident => ļ½¢fooļ½£
ident => ļ½¢barļ½£
11:03 constxqt joined 11:05 grondilu left 11:14 jpn left
andinus rakudo.org/downloads is up, i restored some old binaries, rakudo.org/downloads/star is up as well 11:19
11:22 jpn joined
librasteve šŸ‘ 11:29
11:45 teatwo joined
xinming Is it possible to import defined constants from c header files? 11:46
Or we need to duplicate all these definitions in raku again?
11:48 tea3po left
ab5tract No way to import directly, no. 11:50
11:52 Sgeo left 11:55 CIAvash left 11:59 Marcool04 left 12:42 jpn left
xinming ab5tract: Ok, thanks. what is the best practise to import then? Writing in c, and regex to extract the define values? 13:13
ab5tract Itā€™s pretty common to parse them. Others just copy paste and correct to Rakuā€™s syntax, doing it manually. 13:15
When you parse the C header, you use a grammar to generate Raku as output 13:16
Then the generated output is your library 13:17
xinming ab5tract: Is there lib for this purpose?
ab5tract Thatā€™s how Iā€™ve seen it done, when parsed.
There is one called gptrixie though it is bit unpolished and out of date 13:18
xinming ab5tract: thanks, will use them as long as it works. No need for the polished things. 13:19
ab5tract you might look at what vushu is doing in this library: github.com/vushu/raylib-raku
In case you run into issues with gptrixie 13:20
xinming Ok, thanks, I try to use raku to control 51 mcu for fun. 13:21
ab5tract What is 51 mcu?
xinming ab5tract: 8051 micro controller. 13:22
mcs-51
ab5tract ah, cool!
I hope you have lots of fun hacking on it in Raku! Consider keeping us posted with any problems and progress :) 13:23
xinming ab5tract: will trouble here, But probably be a slow progress :-) 13:24
13:34 jpn joined 13:39 jpn left 14:35 jpn joined 14:40 jpn left 15:15 jgaz joined 15:24 jpn joined, sftp left 15:27 sftp joined 15:29 jpn left 15:56 dbonnafo left, dbonnafo joined 16:03 dbonnafo left, dbonnafo joined 16:10 jpn joined 16:15 jpn left 17:07 jpn joined 17:12 jpn left 17:20 jjatria left, jjatria joined 17:38 jpn joined 17:42 skaji_ left, skaji_ joined 17:49 jpn left 18:24 nine left, nine joined 18:39 jpn joined
SmokeMachine Hi there! Does anyone know why I had to add `no precompilation` here (github.com/FCO/HTML-Component/blob...t.rakumod) to make it return the same ā€œobjectā€ every time I used it? I feel like it should work without thatā€¦ is that a bug? 19:12
19:23 jpn left
holmdunc The interesting thing about Raylib specifically is that they provide a complete description of their C API as JSON github.com/raysan5/raylib/blob/mas...b_api.json , meaning source code for a binding can simply be generated in a data-driven way 19:26
.vushu yes i noticed this to, but it is only done for raylib, but isnt done for raygui which I also try to tackle šŸ˜Š 19:39
20:06 jpn joined 20:11 Sgeo joined 20:13 jpn left 20:20 jpn joined
tbrowder__ SmokeMachine: is that supposed to be somthing like a singleton? 20:23
20:25 jpn left
SmokeMachine tbrowder__: yes 20:26
tbrowder__ docs describe how to do that
i don't think you need method new, for one thing 20:27
sorry, it does show a new method. the example is "class Singleton" 20:29
SmokeMachine I have tried many different waysā€¦ as just a class, with new using anonymous variable, with a my variable inside the classā€¦
tbrowder__ i just searched for "singleton" in the docs box
don't know if that will help 20:30
yr use case
SmokeMachine Just saw that on the docsā€¦ I tried that way tooā€¦ 20:31
That works if I `use` it only in 1 fileā€¦ but returns a different object when `use`ing it from different files 20:33
ugexe fwiw i'm not sure i'd use //= since parallel calls to new could result in a situation where the definedness check is false for two threads, and so both end up setting the value 20:37
that wouldn't be related to your stated problem though 20:38
(you could also just put a lock around the use of //=) 20:41
SmokeMachine Iā€™ll try with a lock, but Iā€™m not sure if thatā€™s it on this caseā€¦ 20:42
ugexe class Foo { my $cached-self; my $cached-self-lock = Lock.new; method new { $cached-self-lock.protect({ return $cached-self //= self.bless }) } } 20:43
thats probably how i would have written that type of logic, although i'm not sure if its actually any better 20:44
SmokeMachine I tried with a class like this as well: class Bla { my @bles; method push(|c) { @bles.push: |c }
20:52 jpn joined 20:57 jpn left
SmokeMachine no luck with the lock... :( 20:59
ugexe: ^^ 21:00
ab5tract .vushu is raygui included in the raylib-raku distribution? 21:29
.vushu ab5stract im still working on it and have yet not release anything, but have made progress, i think im making a seperate module for it šŸ™‚ 21:32
22:02 constxd left 22:03 constxd joined 22:06 dbonnafo_ joined 22:07 dbonnafo left 22:11 dbonnafo_ left
ab5tract Ok! I had fun playing around with raylib-raku today. Even got into shaders a bit. Thatā€™s one powerful little header file Ray has put together. And your wrapper to it feels very idiomatic 22:11
22:11 dbonnafo joined 22:12 sena_kun left 22:21 dbonnafo left 22:23 jpn joined
.vushu ab5tract indeed raylib is a very cool library, nice that you enjoy the wrapper šŸ˜Š 22:25
22:27 justThanks left 22:28 justache joined 22:31 jpn left
librasteve so the Singleton in the docs (docs.raku.org/language/classtut#Cl...variables) is not thread safe I guess... maybe that could be improved with an āš›ļø class variable? 22:41
22:41 justache left 22:48 justache joined
fwiw that example also needs to have (or reinstate) the way to get the instance object ie. my $obj = Singleton.instance; 22:51
anyway it needs someone a bit sharper than me on the atomic safety side to make a doc issue since I will likely butcher it 22:52
22:54 jpn joined 22:59 jpn left 23:01 lichtkind__ left 23:15 justache left 23:20 justache joined 23:26 justache left 23:31 justache joined 23:44 teatwo left 23:45 teatwo joined 23:46 jpn joined 23:50 jpn left