🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
00:07 reportable6 left 00:08 reportable6 joined 00:32 oodani left 00:34 oodani joined 00:42 mexen joined, Geth left 00:52 Xliff left
[Coke] if I click on one of the fosdem 2022 videos, it goes into an infinite load loop on fosdem.org 01:33
if you have an alternate where you're trying to match something you know isn't right and then die?
like a common syntax error you want to be helpful on? 01:34
01:50 Merfont joined, Kaipi left 02:36 frost joined
guifa [Coke] that's what I was thinking, but it actually doesn't work unless it's the final chioce in a sequence 02:59
03:31 mexen left 03:38 SqrtNegInf left 04:27 frost left 04:29 Darkcoal joined 04:57 Darkcoal left 04:59 Darkcoal joined 05:33 frost joined 05:46 mexen joined 05:48 jrjsmrtn left 05:50 jrjsmrtn joined 06:07 reportable6 left 06:08 Sgeo_ joined 06:09 discord-raku-bot left, discord-raku-bot joined, Sgeo left 06:18 discord-raku-bot left, discord-raku-bot joined 06:55 esalebu joined 07:03 esalebu1 joined 07:07 esalebu1 left, esalebu1 joined 07:08 esalebu left 07:21 abraxxa-home joined 07:38 abraxxa joined, frost left 07:41 jjido joined
guifa codesections GO TO BED 07:47
(we're both up way too late on reddit haha) 07:48
07:54 abraxxa left 07:58 abraxxa joined 08:00 qorg11 left 08:02 abraxxa left 08:03 Geth joined, abraxxa joined 08:07 reportable6 joined
El_Che isn't codesections not based on Europe? Pretty late if that's the case :) 08:07
08:07 Geth left 08:08 Geth joined 08:10 qorg11 joined 08:25 Sgeo_ left
guifa yeah, we're both stateside 08:26
08:30 razetime joined, razetime left
El_Che ah, depending on the coast it may be still late :) 08:36
08:42 frost joined 08:54 achille joined 09:07 dakkar joined 09:09 jjido left 09:13 frost left 09:31 jmcgnh left, esalebu1 left 09:34 esalebu joined 09:39 jmcgnh joined 10:10 immediate joined
immediate thanks lizmat that's very good to hear! 10:11
10:38 Darkcoal left 10:39 esalebu left 10:40 Darkcoal joined 11:40 sourceable6 left, releasable6 left, reportable6 left, bloatable6 left, benchable6 left, quotable6 left, nativecallable6 left, coverable6 left, tellable6 left, bisectable6 left, evalable6 left, unicodable6 left, notable6 left, greppable6 left, shareable6 left, linkable6 left, committable6 left, statisfiable6 left, squashable6 left, notable6 joined 11:41 releasable6 joined, tellable6 joined, linkable6 joined, committable6 joined 11:42 whatnext joined, shareable6 joined
whatnext Greetings all :) 11:43
11:43 greppable6 joined
whatnext so look 11:43
about this sentence:
"There is a long term Rakudo 11:44
# based project to develop a new, comprehensive DBI architecture for
# Perl 6."
found in the DBIish notes
lizmat afaik that project is almost biologically stable :-(
whatnext which project is that then? 11:45
i mean - does it have a name and/or documentation? :) 11:47
lizmat moritz might still remember 11:57
whatnext hm "might still remember" doesn't sound too promising :') 12:08
ok I have another more specific question about DBIish
12:08 reportable6 joined
moritz doesn't remember 12:09
whatnext DBIish::mysql in fact: I am seeing "mysql server has gone away" cropping up quite a bit, I am guessing idle connections are getting auto closed(?) - I see Pg has "keepalives" options but I don't see this for mysql. Just wondered if anyone knew an obvious solution for mysql? :) 12:13
12:13 immediate left
moritz ping the connection now and then? 12:14
lizmat whatnext: that is usually a server side setting
12:15 abraxxa-home left, abraxxa-home joined
whatnext hm the same db is being used across multiple applications without that problem 12:16
moritz: I guess this is a possibility - I just thought there might be a setting somewhere 12:17
thanks! :)
12:29 Darkcoal left 12:35 Darkcoal joined 12:40 whatnext left, bisectable6 joined 12:41 benchable6 joined, unicodable6 joined, Darkcoal left 12:42 sourceable6 joined, quotable6 joined 12:43 statisfiable6 joined, Darkcoal joined 12:49 jmcgnh left 12:58 jmcgnh joined 13:08 achille left 13:14 Merfont left, Merfont joined 13:30 rypervenche joined 13:31 Merfont left, Merfont joined 13:41 bloatable6 joined 13:42 coverable6 joined
leont I'm observing that a $vow.keep appears to hang, anyone have a clue what could cause that 14:36
14:37 camelia left
leont It has a then handler, it isn't being run 14:37
14:37 oodani_ joined 14:38 rypervenche left, oodani left, coleman-x left
japhb Doesn't ring a bell -- can you golf it to something gist-able? 14:39
14:39 rypervenche joined 14:40 evalable6 joined
leont It seems it doesn't hang, it throws inside a Supply 14:41
Supply's done handler, and then the exception gets eaten and something else gets confused
14:42 coleman-x joined 14:43 nativecallable6 joined 14:44 immediate joined, camelia joined 14:58 Merfont left, Kaipi joined
leont Apparently Vow.keep does not have a default argument, and that was the problem. 15:05
But because it was called in a done handler, the exception was swallowed and I was none the wiser
japhb Oof. Glad you found it though. 15:09
tbrowder tonyo: may i see your apache conf entries for the cro app? 15:15
japhb tbrowder: --> #cro ? 15:16
15:20 curiosa joined 15:21 curiosa76 joined
tbrowder tonyo usually hangs out here, #cro is very quiet 15:24
15:25 curiosa left
tbrowder until it isn’t!!! thnx for reminder 15:25
.ask tonyo may i pos see yr apache conf entrys for yr working cro app? 15:33
tellable6 tbrowder, I'll pass your message to tonyo
curiosa76 Hi, I am searching for a module that allows to evaluate C expressions at compile time and set them in constants, is there already available? 15:34
something like this:
my @*C-INCLUDES = '<fcntl.h>';
constant word_size = C::expression::expr "sizeof(int)";
constant O_CREAT = C::expression::expr "O_CREAT";
it would be useful for portability
maybe one can think also of the following shortcuts: 15:35
constant word_size = C::expression::size "int";
constant offset-flock-lstart = C::expression::offset "l_start", "flock"
if it's not already there, would people over here find a stuff like this useful? 15:37
what would be a good name for it, I think C::expression sucks a lot 15:41
should be findable by the keyword portability, or machine dependency
or cpu
of course it would require a C compiler installe
15:41 squashable6 joined
japhb curiosa76: NativeCall has a fair amount of that functionality already, but with a very different syntax and world view. It knows the size of basic C types, it allows you to define a C struct and map it as a Raku object, and so forth. Parsing headers and automatically producing the matching Raku code is more in the domain of e.g. GPTrixie. 15:47
curiosa76 japhb thank you for the answer. I know nativecall 15:52
principally, the values of #defined constants can change from machine to machine
and for that the approach of NativeCall is to use conditionals 15:53
that I do not want to do
I wouldn't parse the headers, I would compile the expression with a C compiler and extract the values from the generated code 15:54
gptrixie is also faulty in my point of view since it tries to output nativecall code from C headers, that is clearly not generally possible 15:56
what I need is just for portability
japhb: how do you achieve this in NativeCall: constant O_CREAT = C::expression::expr "O_CREAT"; 16:01
?
japhb curiosa76: That's something for which I would have used e.g. GPTrixie, if I needed to do a lot of it, or hand-edited if I only needed a little. When I did the OpenGL bindings for Parrot, back in the day, I did it by parsing just the subset of C header syntax needed to extract the constants and function signatures. (I cheated, in other words.) 16:04
curiosa76 how do you achieve that with GPTrixie?
it seems totally out of scope for me
guifa has thought it would be a cool proof of concept to write a codeblock in C and compile at Raku compile-time and auto set up the NativeCall interface. But not sure if the slangs are quite yet up for it. 16:05
curiosa76 basically GPTrixie helps you writing that by hand
16:05 Sgeo joined
curiosa76 guifa is aiming too high! 16:06
japhb what you wouldn't like in the approach I propose? 16:07
japhb curiosa76: Run GPTrixie at build time? It's pretty darn rare to build a Raku module distribution on a different OS/arch than you use it on. 16:08
Because if you're doing things at BEGIN time in a module (and thus at build & precomp time when installing that module), you might as well do them using a build script as a BEGIN block. 16:09
curiosa76 japhb running GPTrixie at build time and parsing the output is no different then compiling the code and parsing the assembler, what I am proposing is a nice interface to that that meld well with the activity to writing a module
japhb And not have to hand-write a whole bunch of code that exists to avoid ... hand-writing a bunch of code.
curiosa76 but GPTrixie does not help you with that
what guifa wants to achieve would really help 16:10
that would mean to implement a C compiler in raku
japhb curiosa76: I didn't say parse the output of GPTrixie. I was saying "just *use* the output of GPTrixie directly". Let it create a module, use it in your module, pull out the definitions that you cared about.
curiosa76 japhb did you ever looked at GPTrixie output?
??
japhb github.com/Skarsnik/gptrixie#example 16:11
curiosa76 there are things in C that are not even possible to express in nativecall
like most of the language a part a subset of statments
japhb you are really cherry picking
16:20 jjido joined
tonyo tbrowder: you just trying to get the reverse proxy working? 16:28
tellable6 2022-02-16T15:33:09Z #raku <tbrowder> tonyo may i pos see yr apache conf entrys for yr working cro app?
tonyo if so, what port is your app listening on?
16:32 immediate left 16:34 curiosa joined, dogbert17 joined 16:36 curiosa76 left
curiosa let's say that one day there will be a C compiler implemented in Raku, there would be still things to adjust like the way C code interact and intersect with raku code. This can go very far such as when you expand a C macro and you end up with untyped raku code mixed with the code generated by the C macro. Let's say that one manage to cover 99% of 16:44
usage patterns maybe by carefully thinking about runtime support, there would be still incompatibilites due to the fact that C is a compiled language that is well adjusted to the OS binary format while Raku is not.
16:44 jjido left
curiosa Even if one really think about everything, you are still inferior by the reality that Raku needs C much more than C needs Raku 16:45
the power unbalance would still be overwhelming
even Grammars, that are a very strong point of raku, are matched by Bison to a level that is hard to tell which one is better 16:46
one would think that Raku is the child of the love hate relation between Larry and Bison 16:47
lizmat curiosa: and your point is? :-)
curiosa cucked by Java lovers
[Coke] ok, there goes any interest in this as a serious conversation for me. 16:48
curiosa lol
[Coke] wonders if the radar for use of that word works in a multi-language community or if the super red flags are US only. 16:49
curiosa I guess it depends on the cultural background
[Coke] to attempt to address the potentially serious ask of will raku ever be able to dynamically compile C... I don't think that would be core, but I could see something like P5's Inline::C, but even that doesn't sound like it would meet the ask here. 16:50
curiosa yep 16:51
I am coming to the realisation that the C language is not a very friendly langauge toward anything that is not C derived 16:52
[Coke] points to modules.raku.org/dist/Inline:cpan:FROGGS
last updated 2014.
curiosa when people invented C, they really decided that this is a "ring to rule them all" 16:53
guifa I'm pretty sure that's … not what was being thought of when C was made. 16:54
curiosa don't underestimate malice, guifa
guifa The history of C is pretty well documented. 16:55
16:55 abraxxa left
curiosa history is written by the winners 16:55
think about Objective C, their object system and runtime is much more friendly to other languages than C 16:58
still, it is C, because C is C
wouldn't be C if C wasn't C
leont C is C, because it's the successor of B (and BCPL) 16:59
guifa leont++
curiosa fine.. I am wondering if one could come up with a language that is based on C but takes all Raku innovations 17:01
something that could just extern 'C', but be raku
prog.vub.ac.be/~tjdhondt/ESL/BCPL_t...chards.pdf cool stuff 17:03
17:05 mexen left
curiosa be university professor, write tool to build other compilers, end up with everyone using that tool as the only compiler 17:07
17:12 curiosa left
tbrowder .tell tonyo port 10000 for cro app 17:16
tellable6 tbrowder, I'll pass your message to tonyo
17:24 abraxxa-home left 17:36 dakkar left 17:56 juanfra__ joined
gfldex weekly: news.ycombinator.com/reply?id=3036...2330363321 18:03
notable6 gfldex, Noted! (weekly)
18:06 djerius left 18:07 djerius joined 18:08 reportable6 left
tonyo tbrowder: you should have a line like `ProxyPassReverse / localhost:10000/` in your virtualhost, that's the simplest reverse proxy with apache. you may need to enable the module with `a2enmod proxy` 18:08
tellable6 2022-02-16T17:16:52Z #raku <tbrowder> tonyo port 10000 for cro app
18:10 reportable6 joined 19:10 squashable6 left, reportable6 left, benchable6 left, unicodable6 left, committable6 left, bisectable6 left, coverable6 left, nativecallable6 left, releasable6 left, statisfiable6 left, shareable6 left, linkable6 left, tellable6 left, greppable6 left, sourceable6 left, bloatable6 left, notable6 left, quotable6 left, evalable6 left, bloatable6 joined, benchable6 joined 19:11 shareable6 joined, coverable6 joined 19:12 unicodable6 joined, statisfiable6 joined, nativecallable6 joined, squashable6 joined 19:13 linkable6 joined
tbrowder ok 19:37
19:39 japhb left
tbrowder .tell tonyo thanks! 19:48
20:06 japhb joined 20:11 sourceable6 joined, releasable6 joined, bisectable6 joined, quotable6 joined 20:12 reportable6 joined 20:13 evalable6 joined, committable6 joined 20:39 jjido joined 21:12 notable6 joined 21:39 Darkcoal left
leont I'm observing a "Disconnecting because Disconnected" warning/error and I'm not sure where in my stack it's coming from 😕 (don't get me wrong, it's correct, but I want to suppress it) 21:50
22:13 greppable6 joined
Anton Antonov Is there are a way to disable "Live Preview" in Comma / Commaide ? 22:22
22:30 jjido left
ugexe leont: maybe something like `CATCH { when CX::Warn { say .backtrace } }` 22:41
leont Doesn't seem to help 22:42
ugexe if its an error you'd need to use e.g. default { } instead 22:43
exception rather
leont CONTROL doesn't seem to do the trick either 22:44
ugexe is it an async thing? 22:53
if so there is QUIT { } 22:56
23:11 jjido joined 23:15 leah2 left 23:27 morte_ joined, leah2 joined 23:35 kawaii_ left, skaji left, tbrowder left, mjgardner left, skaji joined, leont left, rjbs left, PotatoGim left, ecocode__ left, rjbs joined, leont joined 23:36 tbrowder joined, mjgardner joined, ecocode__ joined, kawaii_ joined 23:37 PotatoGim joined, morte_` joined 23:39 morte_ left 23:41 jjido left 23:43 morte_` left
leont It is an async thing, but there's no QUIT (at least not in my code, but it's using IO::Socket::Async) 23:52