🦋 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:21
DarthGandalf joined
|
|||
antononcube | Hi, @guifa! | 00:51 | |
01:00
guifa joined
01:11
kylese left
01:12
hulk joined
|
|||
.landyacht. | docs.raku.org appears to be down | 02:08 | |
02:10
stanrifkin_ joined
02:13
stanrifkin left
|
|||
coleman | I think I've fixed the docs site now | 02:14 | |
02:14
landyacht joined,
landyacht left
|
|||
.landyacht. | yep, working now | 02:14 | |
02:15
hulk left,
kylese joined
|
|||
on a related note, on my browser (desktop firefox running on linux), the main content of the docs site is shifted over to the right such that part of it is off-screen | 02:16 | ||
turning off .container { max-width: 1140px; } under the >1204 @media selector fixes it | 02:17 | ||
coleman | mind filing a bug at github.com/Raku/docs-website | 02:23 | |
03:10
stanrifkin joined
03:12
stanrifkin_ left
03:45
kylese left
03:47
kylese joined
05:58
Aedil joined
06:14
Aedil_ joined,
Aedil_ left
06:15
Aedil left
07:47
apac joined
08:27
lichtkind joined
08:28
Aedil joined
09:09
bdju left
09:12
bdju joined
|
|||
vasko | SmokeMachine That sounds pretty good. Exactly not every Cromponent/Component needs a URL + methods does it? Some might just be used a a subcomponent shared between multiple resources. | 10:02 | |
10:27
Sgeo left
10:49
synthmeat left
10:52
gabiruh left
10:56
[Coke] left
10:58
cleo joined
11:15
sjm_ joined
11:16
gabiruh joined
|
|||
sjm_ | Hello channel, I would like to see if Raku can be used for a couple of new projects. One is a simple web service, the other will use Sparrow (Thanks for the suggestion Liz). I am looking for a minimal docker compose file that will run these, so seeking your suggestions. | 11:18 | |
lizmat | sjm_ o/ | 11:20 | |
sjm_ | lizmat o/ | 11:25 | |
lizmat | librasteve might have some ideas for you | 11:37 | |
wayland | melezhik might also have some ideas. | 11:55 | |
sjm_ | great. I ahve created a container however :q | 11:59 | |
seem to be getting stuck with dependancies | |||
11:59
[Coke] joined
|
|||
sjm_ | Maybe if I can get some help on the zef modules that I should install would unblock me. | 12:00 | |
I am using Debian Trixie as the base image | |||
lizmat | what does raku --version say ? | 12:01 | |
sjm_ | Welcome to Rakudo™ Star v2025.02. | 12:02 | |
Implementing the Raku® Programming Language v6.d. | |||
Built on MoarVM version 2025.02. | |||
lizmat | ok, so that's relatively recent | 12:03 | |
so that came with zef | |||
what is the error message you get wrt dependencies ? | 12:04 | ||
sjm_ | this: failed to solve: process "/bin/sh -c zef install PrettyDump Test::Deeply::Relaxed Test::Output LibCurl URI Digest::SHA1::Native Text::MiscUtils Method::Protected Test::Run \"Rainbow:ver<0.3.0+>\" File::Directory::Tree Test::META" did not complete successfully: exit code: 1 | ||
I have removed some dependencies to see if I can narrow it down | 12:05 | ||
lizmat | that would be helpful | ||
need to go afk, so hope someone else will be able to help you & | 12:06 | ||
sjm_ | thanks Liz | ||
tbrowder | Voldenet: ref Pod::TreeWalker, i've asked the original author, Dave Rolsky, for his opinion on the "is required" trait. | 12:10 | |
sjm_ | actually with less deps, the container builds, so I will come back if there is something that I need that doesn't build. Also will share the docker recipe if it works (and the minimal CMS app). | 12:15 | |
Voldenet | tbrowder: I have no strong feelings about `is built` - it works, but I use 'new' instead anyway | 13:28 | |
tbrowder | thnx | 13:38 | |
14:12
Xliff joined
|
|||
Xliff | \o | 14:12 | |
tellable6 | 2025-05-03T16:13:31Z #raku <wayland> Xliff: Under what conditions? Is .r a method? Does it exist? Are you calling it? | ||
Xliff | Does raku track the dependencies of a given module? | ||
I see this comment (irclogs.raku.org/raku/2019-10-23.html#10:53) from Kaiepi in 2019, but would like to use a module's name rather than its file path. What's the best way to accomplish this? | 14:20 | ||
14:23
lizmat left
14:29
apac left
14:52
apac joined
|
|||
tbrowder | i know you can collect them via zef | 14:57 | |
see App::Zef::Deps | 14:59 | ||
by [Coke] | 15:00 | ||
good stuff | |||
15:25
El_Che left
15:27
El_Che joined
15:31
stanrifkin left
|
|||
librasteve | sjm_: hi! welcome to the fun house | 15:54 | |
sjm_ | Hello librasteve! thank you. | 15:56 | |
librasteve | on simple web service, the active framework options are raku.land/zef:rawleyfowler/Humming-Bird or cro.raku.org ... HB is lightweight, with Cro you can make HTTP services with eg web sockets | ||
yw | |||
sjm_ | for the Sparrow app, I will try Cro | 15:57 | |
librasteve | ok - please feedback your experience ... we are always aiming to improve | 15:58 | |
sjm_ | what would have helped is a simple docker compose. I have created one and once verified as working, I can share | 16:00 | |
librasteve | chatgpt.com/share/68178f19-6d8c-80...2741e329b4 looks about right for minimal web service (I don't see a use JSON::Fast so you may need to add that (there are also some Class <=> JSON tools over at raku.land you can search for) | 16:02 | |
sjm_ | Thanks - will add JSON::Fast and anything else required. The solution must only use existing packages and not try to build anything. | 16:03 | |
librasteve | I have not got around to making a docker compose for Cro - when I get to it my aim is to automate this github.com/librasteve/Air-Play#build (ie you should be able to follow these manual steps yourself and then automate most of it in docker compose - the rest in sparrow) | 16:04 | |
sjm_ | what's picocss.org/ (site doesn't load) | 16:06 | |
librasteve | s/org/com please can you point me to the error | 16:08 | |
(yeah there's a few things in Air such as SASS for Pico CSS) that you don't need | 16:09 | ||
sjm_ | readme line 50 | ||
from picocss.org | |||
The site at picocss.org seems to be unavailable. | 16:10 | ||
librasteve | sorry that's a typo - should be picocss.com | ||
please can you point me to the page where I made that error | 16:11 | ||
sjm_ | github.com/librasteve/Air-Play/blo...md?plain=1 | ||
librasteve | ok fixed - tx! | ||
sjm_ | yw | 16:12 | |
librasteve | also you can ignore anything related to installing Air and Red since you just want Cro | 16:13 | |
sjm_ | will do. I think I am starting from something much simpler, but could then go on to build what you have here. Will test over next days and let you know. | 16:15 | |
librasteve | btw - you don't have to run cro behind a reverse proxy like nginx unless (i) you want to make https / letencrypt easier or (ii) you want to reverse proxy for scalability | ||
[I wanted (i) when I chose this setup] | 16:16 | ||
sjm_ | indeed - my infrastructure has edge proxies which manage ssl and some other housekeeping. I will be replacing nginx with sozu soon. | 16:17 | |
librasteve | oh - i was planning to go from nginx to caddy - will take a look at that (simple letsencrypt is really all i need) | ||
SmokeMachine | sjm_: this may help (and I think it already creates a dockerfile for you): cro.raku.org/docs/cro-tool | 16:18 | |
librasteve | good point! | ||
sjm_ | librasteve maybe not sozu than, it's main feature is the ability to send config to it live without restart. You may want something simpler. | 16:20 | |
SmokeMachine - thanks, will take a look | 16:21 | ||
librasteve | simple is good | ||
if we had a docker-compose that could deploy from cro stub Dockerfile.yaml that would be very cool | 16:23 | ||
SmokeMachine | sjm_: if you end up liking Cro templates, you can also take a look att cromponents (but only if you like Cro templates… I’m not trying to show more options just to make it more complicated) | ||
16:32
phogg` is now known as phogg
|
|||
sjm_ | I have two projects - one is a simple headless multi-site markdown cms, and the other is a more complex orchestration API service with a UI, and using Sparrow for remote execution. This is less about UI and more API. I believe I need Cro for the second, still learning. | 16:36 | |
librasteve | sjm_: one last thing (thinking about it at bit) - the steps to do to go from install raku (which iiuc is done by Sparrow) to get Cro running (on AWS clean ubuntu 24.04LTS) are set out here github.com/librasteve/raku-CLI-AWS...akumod#L40 ... well lines 46-52 can be done better with sparrow - it's line 54 and then 56-59 that are prerequisites for | 16:37 | |
Cro | |||
sjm_ | I see, sparrow to install raku | 16:38 | |
I am using chatgpt to help get this started. Once concept is proven, | 16:39 | ||
librasteve | yeah Sparrow should get you to install raku and then run local cmds to install the other deps | ||
so you will need to take my 4-5 lines of perl and convert to Sparrow | |||
(dunno hw to do that ;-() | 16:40 | ||
sjm_ | ok, I will spend more time on this over the week, and feed back progress | ||
librasteve | then use Sparrow to load and run the Dockerfile made by Cro stub | ||
sjm_ | I may need to get some professional Raku support, assuming my concept is proven. For various reasons, I can only pay a french tax payer so if anyone knows of a French Raku dev, drop me a note please | 16:41 | |
librasteve | that should run easily on http ... then for https should be able to add reverse proxy (eg my nginx example) or feedin cert info via Sparrow setting ENV for certificate / port info | 16:43 | |
sjm_ | ok - that is all I can do today, will be back here in the week with updates, or for more help | 16:44 | |
thanks all for your help | |||
librasteve | anytime | 16:45 | |
16:45
librasteve_ joined
17:05
lizmat joined
17:08
Sgeo joined
|
|||
Voldenet | hm, I thought about how `is built` works and if I were to build a proper DI container, how would I find out the actual dependencies of a class? | 17:47 | |
`.^find_method('new').signature.param.map(*.type)` works in the trivial case where I use `new` for everything | 17:48 | ||
erm, `.^find_method('new').signature.params.map(*.type)` | 17:49 | ||
and this obviously won't work when class has `is built` | 17:50 | ||
lizmat | why wouldn't it ? | ||
tbrowder | Voldenet: I heard from Dave Rolsky and he said he hadn't looked at the code in a long time and all he rembers is he worked on it. No comment on the "is built" trait vs "is required" | 17:52 | |
Voldenet | m: class Foo { has Str $!test is built }; Foo.^find_method("new").signature.params.map(*.type).say | ||
camelia | ((Mu) (Any)) | ||
Voldenet | it simply doesn't have the Str, probably the *%_ gets passed down | ||
m: class Foo { has Str $!test is built; method new(Str :$test) { self.bless(:$test) }}; Foo.^find_method("new").signature.params.map(*.type).say | 17:53 | ||
camelia | ((Foo) (Str) (Mu)) | ||
tbrowder | lizmat: have you seen my PR for Pod::TreeWalker? if so, any comment on "is built" vs "is required" there? | 17:55 | |
lizmat | didn't look in depth yet | 17:56 | |
Voldenet | m: use nqp; class Foo { has Str $!test is built }; Foo.^attributes.grep({ nqp::getattr_i($_, Attribute, '$!is_built') }).map(*.type).say | 18:24 | |
camelia | ((Str)) | ||
Voldenet | that's a thing of beauty | ||
18:59
stanrifkin joined
19:02
wayland76 joined
19:03
wayland left
|
|||
lizmat | Voldenet: too bad nqp is needed for that... I guess an accessor method in the Attribute class would be needed | 19:06 | |
Xliff | m: class A { has $!a is built; has $.b }; my $b = A.^attributes.tail; $b.^attributes.gist.say' | ||
camelia | ===SORRY!=== Error while compiling <tmp> Two terms in a row at <tmp>:1 ------> attributes.tail; $b.^attributes.gist.say<HERE>' expecting any of: infix infix stopper statement end statement modifier… |
||
Voldenet | yes, and it's quite an implementation detail | 19:07 | |
Xliff | m: class A { has $!a is built; has $.b }; my $b = A.^attributes.tail; $b.^attributes.gist.say | ||
camelia | (str $!name int $!rw int $!ro Mu $!required int $!is_built int $!is_bound int $!has_accessor Mu $!type Mu $!container_descriptor Mu $!auto_viv_container Mu $!build_closure Mu $!package int $!inlined Mu $!dimensions int $!box_target int $!positional_de… | ||
Xliff | Voldenet: Would be nice if the solution didn't have to rely on nqp to break encapsulation. | 19:08 | |
m: class A { has $!a is built; has $.b }; my $b = A.^attributes.tail; $b.^methods.map( *.name ).sort.say | |||
camelia | (<anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> <anon> Str WHY apply_handles compose container dimensions get_value gist inlined package … | ||
Xliff | m: class A { has $!a is built; has $.b }; my $b = A.^attributes.tail; $b.^methods.map( *.name ).grep( * ne '<anon>' ).sort.gist.say | 19:09 | |
camelia | (Str WHY apply_handles compose container dimensions get_value gist inlined package readonly set_value set_why) | ||
lizmat | if someone would make a PR to make an Attribute.built method, I would definitely merge that (and possibly for other Attribute attributes as well | 19:10 | |
Xliff | lizmat: Noted. Where should the tests be placed? | ||
lizmat | t/spec/S12-attributes/class.t ? | 19:11 | |
Xliff | Thx | ||
19:32
guifa left
19:41
lizmat_ joined
19:44
lizmat left
19:52
sjm_ left
|
|||
tbrowder | my naive take on Pod::TreeWalker: is there a practical use for the “is built” trait using this distro? if so, let’s put it in the README and create a test for it. | 19:53 | |
19:56
ACfromTX left
20:05
guifa joined
20:30
ACfromTX joined
20:34
Aedil left
|
|||
Xliff | OK, here's the smallest invocation I could find for getting dependencies: | 21:43 | |
m: use Zef::Config; use Zef::Client; my $zcf = Zef::Config::guess-path; my $zc = Zef::Config::parse-file($zcf); my $z = Zef::Client.new( config => $zc ); if $z.find-candidates("Zef").head -> $zd { $z.list-dependencies($zd).map( *.identity ).gist.say } | |||
camelia | Failed to update cpan mirror No such method 'IO' for invocant of type 'Any'. Did you mean 'so'? (NativeCall Test Zef::Distribution::DependencySpecification<5995561137312>) |
21:44 | |
Xliff | Ack! Looks like camelia has no modules installed. | ||
21:55
sjm_ joined
22:03
sjm_ left
22:08
sjm_ joined
22:18
sjm_ left
22:21
sjm_ joined
22:22
lichtkind left
22:37
sjm__ joined,
sjm_ left
22:58
sjm__ left
22:59
sjm_ joined
23:01
lizmat_ left,
lizmat joined
23:02
sjm_ left,
wayland76 left,
sjm_ joined
|
|||
tbrowder | yup, so sad | 23:03 | |
23:37
sjm_ left
23:38
sjm_ joined
23:48
sjm__ joined
23:49
sjm_ left
23:55
sjm__ left,
sjm_ joined
|