01:49 xinming joined 02:00 hulk joined 02:02 kylese left 02:15 hulk left, kylese joined 02:27 MasterDuke joined 03:25 MasterDuke left 04:53 Aedil joined 05:30 Sgeo left 05:40 Aedil left 06:08 kylese left 06:12 kylese joined 06:59 xinming left 07:03 xinming joined 07:12 sena_kun joined 07:15 xinming left 07:17 xinming joined 07:27 xinming left 07:29 xinming joined 07:59 Aedil joined
ab5tract Comma 2.0 beta 8 / HEAD now supports automatic creation of test run configurations (via cmd+R or right clicking on the test file/directory) 08:00
08:26 sena_kun left 09:11 Aedil_ joined, Aedil_ left 09:12 Aedil left
librasteve 🍬 09:45
10:11 Aedil joined
tbrowder hi, i swear i use to be able, in a program, to use this line: "use lib "./lib" in a subdir of a module repo with an existing "../lib", but no longer. think 12:36
i think i can set the enn var path still, gotta go for now...
[Coke] You shouldn't use lib like that. 12:48
lizmat
.oO( old habits die hard )
12:49
[Coke] Often see this trying to run tests in an uninstalled module - when running the test, make sure you're using the equivalent of -I. or RAKULIB=. so it can find the local copy of your uninstalled modules. 12:50
I used to all the time, and ugexe has slowly been able to convert me. :)
I think the only place I have that does something similar is in raku/doc because we aren't ever going to install it. 12:51
so don't copy that as an example. (I should add a warning about not copying it as an example to the code)
... I could probably just remove it at this point. 12:56
(ah, I think I left it this way so I didn't have to list provides: in the meta6, but the failure on install makes it clear we're never installing anything) 13:00
tbrowder thank you…old habits certainly do die hard! 13:12
[Coke] Just pushed some changes to raku/doc to avoid that bad example. apologies. 13:13
Geth ecosystem/main: c00034c2e8 | (Elizabeth Mattijsen)++ | META.list
Remove PrettyDump

It lives in the zef ecosystem now
13:32
antononcube @Coke Because of popular demand I plan to apply Raku-RAG to Raku-doc. 13:52
Well, I think only 2-3 people asked about it, but I am rounding up...
ab5tract +1 :) 13:53
antononcube At first, I plan to have a simple text chunks splitting using locally run LLaMA models. (ChatGPT might be too expensive and slow to get the vector embeddings.) But at some point I request help for "slicing and dicing" Raku doc chapters into semantically meaningful chunks. 13:56
tbrowder okdoky: i see yr cng. fer us dummies you might remind us one way to do it is at shell prompt in working dir run “export RAKULIB=path/to/lib” 13:58
antononcube A strongly suspect there modules with POD6 / RakuDoc grammars. (I am only aware of "raku-pod-extraction", raku.land/zef:finanalyst/raku-pod-extraction .)
tbrowder then run script… 13:59
ab5tract tbrowder: IIUC the real answer is to properly setup `META6.json` 14:00
and use `-I.`
antononcube @Coke What exactly is "rakudoc" doing? Does make a "tree" or Document Object Model (DOM) of Raku documentation (placed in specified directories)? raku.land/zef:coke/rakudoc 14:02
ab5tract uff, that's a harder one to answer 14:09
the short answer: yes
antononcube 🙂 Good enough!
ab5tract it uses the compunit precompilation classes to store the info
but it's... a bit of an ancient mess at this point 14:10
I expect you will find much better examples of generating pod output in the doc repo itself
antononcube Ok, I just (re-)cloned it. 14:11
lucs Why does the first one here work, but not the second?: 14:13
m: my @baz = << /tmp/foo /tmp/jub >>; for @baz>>.uc -> $f { say $f } 14:14
camelia /TMP/FOO
/TMP/JUB
lucs m: my @baz = << /tmp/foo /tmp/jub >>; for @baz>>.IO.absolute -> $f { say $f }
camelia No such method 'absolute' for invocant of type 'Array'
in block <unit> at <tmp> line 1
antononcube It seems this code has to be used: @baz>>.IO>>.absolute . 14:15
lucs Hmm... Indeed, that does work, but I guess I don't understand the >> operator enough to know what's going on. 14:17
antononcube: Did you happen to know that would work?
antononcube: *How did you happen to know that would work? 14:18
14:18 japhb left
[Coke] rakudoc was intended to be perldoc for raku. I wouldn't treat it as an example of anything at this point. 14:19
I am planning on revisiting once the new rakudoc stuff lands.
antononcube @Coke good to know -- thanks! 14:20
[Coke] (you can't really install doc-only stuff at this point)
ab5tract lucs: the output of a hyper call is listy 14:21
m: dd [<< /tmp >>]>>.IO; dd [<< /tmp >>]>>.IO.WHAT 14:22
camelia [IO::Path.new("/tmp", :SPEC(IO::Spec::Unix), :CWD("/home/camelia"))]
Array
ab5tract since you want to call .absolute on each of the things output by the or
*by the previous hyper, you need to once again hyper 14:23
lucs ab5tract: Aha, thanks.
ab5tract You can think of it similarly as to how you have to chain .map calls if you plan to operate on each of the elements again
lucs: my pleasure 14:24
antononcube @lucs Well, I think of ">>." as .duckmap (or .nodemap , or .deepmap) hence, ">>." has to be inserted between the methods (".tc", ".absolute", etc.) 14:25
14:26 japhb joined
ab5tract lucs: you can also compose the chain ahead of time 14:26
m: my &chain = *.IO.absolute; dd [<< /tmp >>]>>.&chain
camelia ["/tmp"]
lucs antononcube: .(duck|node|deep)map : I think I've seen those words before :-)
antononcube Again, these kind of questions should be handled by a Raku-specialized LLM. (RakuGPT or whatever.) 14:27
I was thinking to use the name "RakuGrock", but "Grock" is used by LLM / AI of X/Twitter. 14:28
lucs ab5tract: I'm taking notes, thanks. 14:29
[Coke] Yes, let's not copy X. 14:30
14:31 Sgeo joined
ab5tract antononcube: I don't understand your point about *map 14:33
m: dd [ ["/tmp", ["/tmp"] ] ].deepmap(*.IO.absolute)
camelia ["/tmp", ["/tmp"]]
ab5tract m: dd [ ["/tmp", ["/tmp"] ] ].deepmap(*.IO.d)
camelia [Bool::True, [Bool::True]]
ab5tract you should have the same semantics at map in all the variants, outside of the obvious distinctions 14:34
*as map
antononcube I was saying there is an analogy with ">>." and the different maps. (Not a precise statement.) 14:35
ab5tract I got confused since I said the same thing you did earlier, but you referred specifically to similarities with the map variants instead 14:42
antononcube Agh, you typed in and posted your answer(s) faster than me... 14:43
ab5tract communication is hard :)
does anyone else here remember BeOS fondly? 16:16
context: I'm trying to figure out how to set the mime type of a file, which is something that was super fluid in BeOS 16:17
use case: we save RakuAST code in `rakumod` files, but it's actually NQP (or maybe NQP++, depending on how you look at it) 16:20
[Coke] ab5tract: what OS are you trying to do this on? 16:22
ab5tract macOS, but it's only really relevant if it's something that gets carried along everywhere 16:23
ie, lives on through `git`, `tar`, etc 16:24
[Coke] prerry sure mac has a file attribute you could use, but not sure it would even last through git back to mac. 16:41
"It's a bit of a category mistake to talk about ‘the MIME type of a file’ – ‘files’ don't have MIME types; only octet streams have them" 16:42
[Coke] cannot find the command line magic he was thinking of. 16:45
librasteve retests to Comma Plugin 16:51
BUILD SUCCESSFUL in 1s
new project - ok 16:58
open (small project) -ok
tbrowder [Coke]: in my subdir code i was able to use a pretty generic BEGIN block to die cleanly and remind me to set the required env var 17:00
[Coke] nice 17:02
librasteve open (mega big project) - ok 17:04
admire syntax highlighting - noce
all is looking good - fantastic!! 17:05
17:07 Sgeo left 17:12 Sgeo joined
ab5stract: I am having difficulty with some older CommaIDE projects - the new syntax highlighting is not appearing ... is there a recipe to delete older config files maybe? 17:30
and I have uninstalled / reinstalled the latest commaplugin and restarted the IntelliJ Ultimate each time 17:39
timo i seem to recall a submenu to clear different kinds of caches, maybe under File, or maybe under Help 17:52
librasteve timo: thanks ... I hadn't thought of that ... sadly does not help 17:58
File >> Invalidate Caches btw 17:59
ab5tract librasteve: are you installing from the release zip? or did you compile from HEAD? 18:09
librasteve clean git clone, build locally
ab5tract ok
scullucs @librasteve github.com/rakudo/rakudo/issues/5646 18:10
ab5tract did you use `File > Open` or did you open from the IDEA welcome page?
the recipe is `rm -rf .idea; rm *.iml`
librasteve welcome page iirc 18:11
ab5tract but using `File > Open` *should* work, as should `New From existing Sources...`
librasteve no - thats wrong
ab5tract opening from welcome page doesn't trigger the open project processor :(
librasteve lemme check 18:12
ab5tract if it detects a Comma project (it does this by scanning `$project.iml` for `PERL6_MODULE_TYPE`), it will `rm -rf .idea; rm $project.iml` for you 18:13
it's quite annoying that it needs to use `Open` to trigger this, though
librasteve thanks - I'll have a double check and revert if there's a real issue 18:15
19:09 Aedil left
tbrowder .tell ab5tract i am using a module sub dir as a test bed and it will never be officially part of the module. maybe not a good practice, but many of my published modules have such 19:27
tellable6__ tbrowder, I'll pass your message to ab5tract
ab5tract but I would expect -I. to work in that situation 19:29
tbrowder ok, how do i test for the existence of a directory without 19:30
ab5tract or -I../../ or whatever
tbrowder yes, but i'm too lazy to do that
how do i test for the existence of a directory without it magically being created? i usually run something like: "if not $dir.IO.d { say "dir '$dir' not found" }; 19:39
[Coke] m: for <a b c d>.combinations(3) -> @c { for @c.permutations -> $a { dd $a }}
camelia $("a", "b", "c")
$("a", "c", "b")
$("b", "a", "c")
$("b", "c", "a")
$("c", "a", "b")
$("c", "b", "a")
$("a", "b", "d")
$("a", "d", "b")
$("b", "a", "d")
$("b", "d", "a")
$("d", "a", "b")
$("d", "b", "a")
$("a", "c", "d")
$("a…
[Coke] ... how to write that with just method calls and one for loop?
timo m: <a b c d>.combinations(3)>>.permutations.map(&dd) 19:41
camelia (("a", "b", "c"), ("a", "c", "b"), ("b", "a", "c"), ("b", "c", "a"), ("c", "a", "b"), ("c", "b", "a")).Seq
(("a", "b", "d"), ("a", "d", "b"), ("b", "a", "d"), ("b", "d", "a"), ("d", "a", "b"), ("d", "b", "a")).Seq
(("a", "c", "d"), ("a", "d", "c")…
timo that may not be right
[Coke] was trying with a few .map variants and couldn't get there. thanks.
timo m: <a b c d>.combinations(3).map(*.permutations.map(*.dd))
camelia ( no output )
timo m: <a b c d>.combinations(3).map(*.permutations.map(*.dd)).eager
camelia ( no output )
[Coke] ah. it's not, there's Seqs in there. 19:42
timo m: <a b c d>.combinations(3).map(*.permutations.map(*.dd).eager).eager
camelia No such method 'dd' for invocant of type 'List'
in block <unit> at <tmp> line 1
timo m: <a b c d>.combinations(3).map(*.permutations.map(&dd).eager).eager
camelia ("a", "b", "c")
("a", "c", "b")
("b", "a", "c")
("b", "c", "a")
("c", "a", "b")
("c", "b", "a")
("a", "b", "d")
("a", "d", "b")
("b", "a", "d")
("b", "d", "a")
("d", "a", "b")
("d", "b", "a")
("a", "c", "d")
("a", "d", "c")…
[Coke] but I could flat it at the end
timo the differenwe where you get a $ and i get no $ is because i just run dd on the thing, but you pass the thing into a scalar first
m: <a b c d>.combinations(3).map(*.permutations.map({ $^a.dd }).eager).eager
camelia No such method 'dd' for invocant of type 'List'
in block <unit> at <tmp> line 1
timo m: <a b c d>.combinations(3).map(*.permutations.map({ dd $^a }).eager).eager
camelia $("a", "b", "c")
$("a", "c", "b")
$("b", "a", "c")
$("b", "c", "a")
$("c", "a", "b")
$("c", "b", "a")
$("a", "b", "d")
$("a", "d", "b")
$("b", "a", "d")
$("b", "d", "a")
$("d", "a", "b")
$("d", "b", "a")
$("a", "c", "d")
$("a…
[Coke] ... I'll just use two loops. :) 19:43
timo whatever looks most pleasant in the context of the rest of the code 19:44
tbrowder when i use that test in a BEGIN block, a non-existing directory gets created (with a .precomp subdir) 19:45
timo can you give us exactly what you're running? 19:46
tbrowder ab5tract: seriously, i do much programming via an app on my ipad, and do lots of finger fumbles so i like to minimize that for repetitive stuff 19:47
timo: i'm getting that inside the script i've made to tell raku where RAKULIB is. 19:48
ab5tract tbrowder: in that case I would add a shell alias `r` that does `raku -I.` :) 19:49
timo i would expect as soon as a rakudo is launched with a RAKULIB set to some folder that it may create that to put a .precomp in it
tbrowder sounds good to me. 19:50
timo: and makes sense
ab5tract: good idea, but i have too many other aliases to keep up with now!! and not enough brain cells! 19:53
19:53 xinming_ joined
tbrowder and it's a challenge 19:53
i.e., fun
as well as a learning experience, but that alias is a great idea!, thanks 19:55
ab5tract tbrowder: I hear that.. I'm looking at making a BNF for NQP and going cross-eyed. but it would be a good learning experience, for sure 20:18
timo that way certainly lies madness 20:38
ab5tract i was hoping NQP would be a bit more reasonable than Raku proper :) 20:41
timo what would you use a BNF of NQP for? 20:42
ab5tract to generate a parser for Raku integration 20:43
theoretically unlocking refactoring tools, jump to declaration, find usages, etc
as well as the obvious advantages of syntax highlighting
s/Raku integration/Comma integration/ 20:44
it's been a long week :)
timo ah, Comma
jnthn had developed some Special Sauce to make the raku grammar for Comma 20:45
ab5tract I think that more or less required writing the parser by hand 20:46
tbrowder hear, hear! 👏
timo you write it with raku grammar though 20:48
ab5tract and generate Java code? interesting... 20:50
timo well, not exactly java code though
not readable in any sense of the word i think?
tbrowder while on this topical area, my Christmas wish is that some grammar expert fix raku emacs so HERE block strings are handled correctly.
timo github.com/ab5tract/comma-plugin/b...arser.java look at this 20:52
ab5tract yeah, you're right 20:54
but something had to create all of this: github.com/ab5tract/comma-plugin/t.../comma/psi
timo ah, i suppose that's at least partially manual yeah 20:58
but even with a BNF parser for nqp you'd still need to build that
ab5tract afaict all the psi stuff can be generated from the BNF 20:59
plugins.jetbrains.com/docs/intelli...arser.html 21:00
timo ah, ok 21:01
but do you want to have a completely separate set of psi nodes for nqp and raku? surely you'll want to reuse at least a few
21:02 jmcgnh left
ab5tract I think it's probably wise to have separate stacks 21:02
but that's really a question of how much handwork is required
if I can get away with generation, separate is clean and simple. else wise, sharing starts becoming much more attractive 21:03
anyway, I've poked the arcane master privately about it, hopefully he can help me find the path of the least-painful-of-the-tortures :) 21:07
antononcube: I wonder if this might come in handy for your "RakuDroid" efforts - github.com/ab5tract/comma-plugin/b.../core.json 21:14
21:17 jmcgnh joined 21:21 [Coke] left 21:30 sena_kun joined 22:01 xinming_ left 22:02 xinming_ joined
SmokeMachine Hi, I have a question… is rakubrew installing x86 rakudo into m1 machines? I’m asking because I was trying to use native call on my m1 machine using a lib I have compiled myself and it was saying it was expecting x68_64 and was getting arm64… 22:08
22:12 xinming left 22:13 xinming_ left 22:15 xinming joined 22:18 xinming_ joined
ugexe rakubrew installs arm64 on arm architecture 22:19
SmokeMachine My error is odd then… 22:22
ugexe file $(which raku) 22:24
/Users/nlogan/.rakubrew/versions/moar-blead/install/bin/raku: Mach-O 64-bit executable arm64
SmokeMachine www.irccloud.com/pastebin/44rQiGVp/
ab5tract I've had this happen before 22:25
SmokeMachine usercontent.irccloud-cdn.com/file/.../image.png
ab5tract I think it *builds* arm64 22:26
but installs x86
ugexe what version of rakubrew are you using?
SmokeMachine I just self upgraded...
ugexe check anyways
ab5tract SmokeMachine: did it compile? or did it install a pre-compiled package? 22:27
ugexe my guess is whatever you used to build the library did so using x86
SmokeMachine www.irccloud.com/pastebin/VNihweG5/odd%3A
odd...
ugexe the command is rakubrew rakubrew-version
ab5tract ugexe: SmokeMachine's paste is definitely showing an arm64 dylib (`incompatible architecture (have 'arm64', need 'x86_64'))`) 22:28
SmokeMachine www.irccloud.com/pastebin/ah8Ncmle/
ab5tract SmokeMachine: did you do `build` or `install`? 22:30
ugexe "have 'arm64', need 'x86_64'" seems ambiguous to me does have arm64 mean his computer has arm64 and the library needs x86_64
ab5tract it's saying that the loader needs x86_64 and the dylib has arm64 22:31
SmokeMachine do you mean the lib or raku? the lib I compiled and I'm passing the path and raku I built and global
ab5tract I agree that it's a bit ambigious
SmokeMachine: I mean `rakubrew build` vs `rakubrew install` 22:32
ugexe oh i totally thought i saw arm64 in usercontent.irccloud-cdn.com/file/.../image.png
ab5tract I've spent a lot of time trying to track down the compilation settings to fix this before
ugexe it says x86 though yeah
i think you just need to update rakubrew
SmokeMachine www.irccloud.com/pastebin/j1ihJIJL/the%20lib%3A
ab5tract SmokeMachine: try `rakubrew install moar-2024.07` 22:33
ugexe there are a couple of updates - one cant be made using self-upgrade and requires manually copying over the updated executable. others address arm64 build and precompiled binaries specifically
ab5tract ugexe++
SmokeMachine www.irccloud.com/pastebin/YEnI1DYN/
I'll try installing rakubrew again... 22:34
ugexe github.com/Raku/App-Rakubrew/commi...a1d40be8e2
i think those PerlIO errors could be related to rakubrew having been trying to use the wrong architecture for perl5 22:35
ab5tract ugexe++
SmokeMachine ugexe++
ab5tract maybe download was what i was thinking of..
anyway, looking forward to trying the fixed version 22:36
I'm on v37 - trying the installer script it says `You should just upgrade your installation instead of installing over it!` 22:37
22:38 sena_kun left
ab5tract manual update == v39 22:40
SmokeMachine it seems it worked!!! Thank you very much!!! 22:48
ab5tract SmokeMachine: \o/ 22:56
SmokeMachine www.irccloud.com/pastebin/rUimjohv/ 22:57
test.so came from go...
ab5tract really? nice! 22:59
I didn't know that go could compile C ABI compatible libraries
also surprising to see a `.so` on macOS :)
SmokeMachine www.irccloud.com/pastebin/fbud7nyO/ 23:00
I called that that way...
ab5tract very cool! 23:01
SmokeMachine I'm thinking on creating modules with native call for this lib: github.com/charmbracelet/bubbletea...me-ov-file
it looks very beautiful for CLI apps... 23:02
23:17 [Coke] joined