This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html Set by lizmat on 8 June 2022. |
|||
00:00
loken left
|
|||
Nemokosch | anyway, the point is that this should work if you have the up-to-date Digest and Digest::HMAC distributions | 00:04 | |
jaguart | my rakudo-pkg / zef install has always been permission dodgy, as I initially wanted to have raku installed once serverwide | 00:30 | |
I've given up on this, and apt-purge / rm -rf / reinstalled - fingers crossed | 00:31 | ||
`prove6 -Ilib,. t` fails in github windows workflow - ` Missing argument in parameter list.` and points to the comma? | 00:33 | ||
Nemokosch | well... does anyone know Windows scripting? ^^ | 00:36 | |
jaguart | it has scripting?? | 00:37 | |
argh, so `prove6 -I.,lib t` works but `prove6 -Ilib,. t` fails | 00:38 | ||
that's fairly pants | 00:39 | ||
so on a new rakudo-pkg install, `zef install App::Mi6' fails because JSON::Marshal fails | 00:51 | ||
install JSON::Fast -> install JSON::Marshal still fails | |||
install JSON::Name -> install JSON::Marshal still fails | |||
install JSON::OptIn -> install JSON::Marshal works | 00:52 | ||
I'm guessing its because Marshall tests depend on the others, but they are only tested and waiting, not yet installed when it fails | 00:53 | ||
install App::Mi6 now fails on Template::Mustache... | 00:54 | ||
Nemokosch | I wonder why Template::Mustache is even involved | 00:55 | |
jaguart | Pod::To::HTML my guess | ||
I now have 6 pre-depends to install... | |||
Nemokosch | not gonna lie, many distributions are just badly designed... | 00:56 | |
jaguart | this is why zef feels flakey - the attempt to do atomic installs doesnt work well with Raku repos | ||
Nemokosch | to install all this bloatware for something that should be really banal | ||
jaguart | no - Im pretty sure its the approach to install failing because test dependencies are not yet available | ||
a different approach would install the pre-depends and roll-back on faiure | 00:57 | ||
I just have to work each one through manually and its fine | |||
Nemokosch | but dependencies are indeed installed prior to testing | ||
jaguart | no they are not - Mustache has 6 pre-depends - they are not yet installed | 00:58 | |
Nemokosch | yes, they *are* rolled back if the eventual distribution installation fails, but nevertheless they *are* installed before testing the eventual distribution | ||
jaguart | let me try - I bet it will work if I manually install each one | ||
ok - so need a better theory on why install is so flakey | 00:59 | ||
Nemokosch | if it indeed works if you install it one by one, I'm positive something just doesn't work right | ||
jaguart | are they really? - once you pass all the tests, you see all the installed messages come up... | ||
JSON::Marshal worked by manually installing each predepends | |||
I'll try Mustache... | 01:00 | ||
Nemokosch | no, the logs show exactly that the dependencies are installed after their own tests and before the test of the main distribution | ||
jaguart | so there is still a test failure for installing Mustache... but can't track it down | 01:24 | |
and it doesn't happen when you install from the repo | 01:25 | ||
and prove6 and zef test in the repo all work fine | |||
sofar, trying to install Mi6 I have fails on JSON::Marshall, Template::Mustache... and now Pod::To::HTML... | 01:26 | ||
but first - sandwich | |||
01:30
Manifest0 left
|
|||
jaguart | meh - hard to understand the backtrace | 01:58 | |
zef install NativeHelpers::Blob fails... | 01:59 | ||
if I `raku --ll-exception -e 'use Zef::CLI' install NativeHelpers::Blob --debug` | |||
seems to barf at: src/core.c/Rakudo/Internals/HyperRaceSharedImpl.pm6:59 | 02:00 | ||
Nemokosch | why does stuff like that even install... š¦ | 02:01 | |
jaguart | something from LibCurl I think | ||
rf | How can I ignore files with my META6.json? | 02:05 | |
jaguart | the test fail backtrace: Exception.pm6 <- control.pm6 <- Zef::Client 738 <- Zef::Client 727 <- HyperRaceShared.Impl 59 <- HyperPipeline 82 et | 02:06 | |
Nemokosch | what do you mean "ignore"? | ||
jaguart | HyperRaceSharedImpl:59 my int $i = -1 | 02:07 | |
rf | When I upload my dist, I don't want certain files to be indexed or included in the tarball. | 02:08 | |
Nemokosch | I really doubt META6.json is for this... although I'm not sure if everything in that folder is wrapped into a distribution | 02:10 | |
rf | It is. It just runs gtar on the dir | 02:16 | |
Nemokosch | anyway, META6 is mostly the interface of the distribution, not a config file, is it | 02:17 | |
rf | I guess, I thought that it might simply pull from git, but it uses the directory. | 02:18 | |
Nemokosch | anyway, thinking about it... "it just runs gtar on the dir" - what does? | ||
jaguart | rf: are you using `mi6`? | 02:24 | |
rf | fez upload seems to just tar my directory and upload it | 02:28 | |
Nemokosch | hopefully everybody will remember this. There are loads of presentations on the ecosystems, starting from tonyo's talk from the 2021 conference, guifa's talk on the Perl & Raku conference and later a 2.0 version of it on the Raku conference and I think one of lizmat's 2022 talks also covered the question of ecosystems somewhat | ||
rf | jaguart: Not for this project sadly. I discovered it a little late | ||
Nemokosch | then this behavior is tied to fez probably - I for one hope it doesn't hack its own configuration into META6 | 02:30 | |
jaguart | the alternate maybe mi6 - but this is an example of installing App::Mi6 on a clean linux rakudo-pkg install: gist.github.com/jaguart/f04d343e26...ee1480963c | 02:32 | |
rf | How did you install rakudo? | ||
Nemokosch | mi6 itself uses fez when you push to "the zef ecosystem" | 02:33 | |
jaguart | rakudo installation: github.com/nxadm/rakudo-pkg | ||
rf | I'm not sure if you've tried rakubrew, but it stopped me from having problems | 02:34 | |
Nemokosch | this is definitely not a normal thing... | ||
I also swear by rakubrew btw | |||
rf | rakubrew.org/ | ||
jaguart | yeah - I used it for a while - but looking for automated production deployment and upgrades | 02:35 | |
rf | Docker to the rescue? | ||
Nemokosch | jaguart: what version of zef do you have? | ||
jaguart | we're old school - VMs and servers | 02:36 | |
zef:ver<0.14.6>:auth<github:ugexe>:api<0> | |||
rf | Interesting to hear Raku in production like this, how many services/what is it doing? If you don't mind sharing | 02:37 | |
Nemokosch | okay, it might actually be the latest | ||
jaguart | rakudo-pkg 2022.12 installs zef:ver<0.14.5>:auth<github:ugexe>:api<0> but the instructions say 'zef upgrade' straight away | ||
nothing production yet - the hope is to replace our Perl5 devops, bootstrap, CI, release tools and monitoring tools. Not for quite a while is my guess | 02:40 | ||
rf | That's very cool. Best of luck :D | ||
Nemokosch | rf: by the way, fez doesn't bundle hidden files | 02:41 | |
that's one thing for sure (also, this is documented) | |||
rf | Okay, that is good. I can just hide them for now. | 02:42 | |
02:42
rf left
02:44
Heptite left
|
|||
Nemokosch | github.com/tony-o/raku-fez fez has rather accessible code, I'd say | 02:44 | |
03:09
Heptite joined
04:54
discord-raku-bot left,
discord-raku-bot joined
05:05
PolarBearXL joined
05:51
Heptite left
05:54
discord-raku-bot left
05:55
discord-raku-bot joined
06:54
discord-raku-bot left
06:55
discord-raku-bot joined
07:55
discord-raku-bot left,
discord-raku-bot joined
08:55
discord-raku-bot left,
discord-raku-bot joined
09:10
dakkar joined
09:55
discord-raku-bot left,
discord-raku-bot joined
10:55
discord-raku-bot left,
discord-raku-bot joined
11:16
Manifest0 joined
|
|||
jaguart | I'm stymied trying to `mi6 build` - I want to regen the README.md and the META6.json - but my module depends on another unreleased module | 11:16 | |
I've tried: `raku -I.,lib,../Kaolin/lib -e 'use App::Mi6; App::Mi6.new.cmd("build")'` | 11:17 | ||
but `mi6` seems to run `rakudo -I/home/jeff/src/Grok --doc=Markdown lib/Grok.rakumod` :( | 11:18 | ||
whew: RAKULIB to the rescue | 11:19 | ||
11:46
PolarBearXL left
12:55
discord-raku-bot left
12:56
discord-raku-bot joined
13:52
rf joined
13:55
discord-raku-bot left
13:56
discord-raku-bot joined
15:06
Heptite joined
|
|||
grondilu | I'm so bad at grammars that I might as well post here. I'm trying to write a grammar for OBJ files and I fail miserably. I can't even parse into lines. Just lines ! | 17:33 | |
I tried grammar { rule TOP { <line>+ }; rule line { \N+ } } and that just hangs. | 17:34 | ||
I tried grammar { rule TOP { <line>+ }; rule line { \N* } } and that just hangs. | 17:35 | ||
17:49
dakkar left
|
|||
stevied | it took me a long time to wrap may head around as well | 18:09 | |
lots of trial and error before I started to get it | |||
don't put a semi after the curly bracket | 18:15 | ||
Nemokosch | Isn't that necessary though? | ||
stevied | not the code I have | 18:16 | |
``` | 18:18 | ||
grammar BLAH { | |||
token TOP { <line>+ } | |||
token line { [ <blah1> || <blah2> \n ] } | |||
} | |||
``` | |||
19:54
discord-raku-bot left,
discord-raku-bot joined
20:30
jgaz joined
|
|||
p6steve | maybe grammar { rule TOP { <line>+ } rule line { \N+ } }, the '+' meaning one or more as opposed to '*' zero or more? | 21:47 | |
Nemokosch | that's probably better because it won't end up generating empty matches for eternity | 21:48 | |
I wonder... what if there is a lookahead assertion | 21:51 | ||
p6steve | <@398722324125450240> you were very close ```grammar Thing { rule TOP { <line>+ }; rule line { \N+ } }``` is fine | 21:52 | |
<@563790557831495691> you had me thinking with the ';' point, but actually it's a no-op | 21:53 | ||
stevied | ok, yeah, i was wondering about that | ||
p6steve | yeah I had to try it to check | 21:54 | |
Nemokosch | I think it's often necessary after the curly braces if you don't add a line break | ||
stevied | i had worked out how to do a grammar line by line at one point and I have forgotten how I did it. Now I feel compelled to work it out again. | ||
p6steve | ``` | 21:56 | |
grammar Thing { rule TOP { <line>+ }; rule line { \N+ } } | |||
my $here = q:to/END/; | |||
20 port: 8888 | |||
21 cidr: 0.0.0.0/0 | |||
END | |||
say Thing.parse: $here; | |||
``` | |||
so, no need for line breaks | |||
you can likely do this with any "declaration" block | |||
Nemokosch | m: grammar Thing { rule TOP { <line>+ } rule line { \N+ } } | 21:57 | |
p6steve | total red face, <@297037173541175296> you are right | ||
Nemokosch | without the semicolon | 21:58 | |
stevied | oh man, is the grammar preview feature broken in comma again? | 22:03 | |
p6steve | you on a mac? | 22:07 | |
stevied | yeah | 22:08 | |
ok, it's working in a different project. wasn't working in one that already had a grammar | |||
p6steve | I have Comma plugin in IntelliJ Idea 2021.3.3 (the latest supported by Comma) | ||
stevied | flaky | ||
p6steve | WARNING: /Users/stephenroe/.rakubrew/versions/moar-2022.12/bin/raku is loading libcrypto in an unsafe w | 22:09 | |
WARNING: /Users/xxx/.rakubrew/versions/moar-2022.12/bin/raku is loading libcrypto in an unsafe w | |||
22:28
jgaz left
|
|||
stevied | ok, I think this is probably the definitive grammar for splitting "lines" | 22:55 | |
``` | |||
grammar LINES { | |||
token TOP { <line>+ } | |||
token line { .+? \n || \n || .+ $$ } | |||
} | |||
``` | |||
22:55
loken joined
|
|||
this uses a loose definition of a "line" | 22:55 | ||
22:58
discord-raku-bot left,
discord-raku-bot joined
|
|||
so this will match "one\ntwo<EOF>" or "one\ntwo\n" or "one\n\n" | 22:59 | ||
Nemokosch | I don't remember... does || mean "first match"? | 23:00 | |
23:02
loken left
23:03
loken joined
23:17
loken left
|
|||
stevied | it's called "alternative" operator | 23:23 | |
Nemokosch | what's the difference between this and | ? | 23:26 | |
p6steve | in regex branches separated by |, the longest token match wins, independent of the textual ordering in the regex | 23:31 | |
jaguart | so || -> first match, and | -> longest match ? | 23:53 | |
if so, feels like || would be faster... | 23:54 | ||
Nemokosch | docs.raku.org/language/regexes#ind...nation:_|| |