Geth problem-solving/coke/repl: aeb6ffa26c | (Will Coleda)++ (committed using GitHub Web editor) | solutions/rakudo/Configurable-REPL.md
Update Configurable-REPL.md
00:40
holmdunc Something I've seen go wrong in other REPLs with configuration prompts is when the characters that make up the escape sequences for ANSI colours get counted towards the visible width of the prompt, and that screws up line-wrapping calculations etc 09:05
In Bash, one can give it a helping hand and delimit such ANSI stuff explicitly www.gnu.org/software/bash/manual/h...e%20prompt 09:16
ab5tract Ah nice, someone has written a decent Kotlin pros/cons blog post and now I don’t have to tylerrussell.dev/2025/01/10/my-tho...r-4-years/ 11:18
tbrowder .seen codesections 12:55
tellable6 tbrowder, I saw codesections 2023-11-11T17:01:26Z in #raku: <codesections> The source for design.raku.org is at github.com/Raku/old-design-docs, if we really need it
antononcube > Pretty much every function should tell you the control flow result and the data result. That is why some people rave about monads. 15:03
timo right, "effect systems" where you can only cause some kind of effect (mutating some "global" state, causing output or generally interacting with a socket or file descriptor or whatever) if your caller passes in (or is annotated to be allowed to cause) the effect in question 15:13
[Coke] (repl line length) - i don't think we are doing any word wrapping calculations. 16:35
nahita3882 somewhat unrelated but an extra newline after the output makes it feel less dense, e.g., IPython does this 17:16
[Coke] With RAKUDO_REPL_PROMPT you could customize this. 18:15
... except I don't support \n yet, do i.
Geth problem-solving/coke/repl: 35bb2b9555 | (Will Coleda)++ (committed using GitHub Web editor) | solutions/rakudo/Configurable-REPL.md
Update Configurable-REPL.md
18:16
[Coke] (Done, added to POC) 18:18
Geth problem-solving/coke/repl: 5af9ba5275 | (Will Coleda)++ (committed using GitHub Web editor) | solutions/rakudo/Configurable-REPL.md
Update Configurable-REPL.md
[Coke] ^^ Anyone have any input on naming of env vars, suggested implementation, missing strftime items, if any of the future dev notes are required for this to get merged, etc. Comments welcome 18:20
I think changing /l to to /s was suggested by ugexe? 18:21
ugexe i dont think that was me unless you were referring to me mentioning it would have been nice if we had referred to language version as std (standard) like e.g. C++ does. then the distinction might be more obvious 18:32
[Coke] ah, thought it was trying to justify the /s with "our language is *like* the c++ standard..>" 18:40
OK. no change is easiest change. :)
coleman Doesn't it cost like $500 to get a copy of the *real* C++ standard :)? 18:44
ab5tract Hey now, it *is* a lot of pages ;) 18:57
Looks like it's around $240 for 2104 pages
Geth problem-solving/coke/repl: 8ee014bdd3 | (Will Coleda)++ (committed using GitHub Web editor) | solutions/rakudo/Configurable-REPL.md
Update Configurable-REPL.md
18:59
coleman I suppose that's indeed a lot of pages 19:00
ab5tract Doesn't exactly explain why they don't offer a PDF version for free, of course 19:01
[Coke] I think if we were in that position, we'd want a nominal fee to support the foundation. 19:03
any thoughts on renaming \i to \! ? 19:07
(or \# , depending on what to be consistent with)
also for colors, if we supported them - \c{bold;red}\i\c{reset} ? 19:08
I would not be opposed to doing a minimal set of colors here and if we ever supported the full DB (or supported elsewhere in core), we could swap it out for that. 19:09
lizmat "full DB" ? 19:10
[Coke] cursor movement/manipulation, clearing portions of the screen, all the colors... 19:12
I'm thinking I could have a small bit here for "bright/dim/reset/italic/underline/blink/inverse/hidden/strikethrough" (or some subset) and black/red/green/blue/yellow/magenta/cyan/white 19:13
ab5tract [Coke]: AFAIK that's the entire ANSI color set. 19:14
Unless there's one final one that allows you to provide a color value in hex 19:15
FWIW, I still more or less completely support putting everything that is available in Terminal::ANSIParser into core 19:17
but even just the presentation side of things would be a good start
Also: thank you for pushing forward on this! 19:21
tbrowder m: my $f="afile.ps"; say $f.IO.basename.extension 19:31
camelia No such method 'extension' for string 'afile.ps'
in block <unit> at <tmp> line 1
ugexe basename returns a string, but IO::Path has the extension method 19:32
m: my $f="afile.ps"; say $f.IO.extension 19:33
camelia ps
tbrowder ah, thanks? hard to remember for me. it seems like i have seen .basename on a path, but maybe the path j 19:34
*had been stringified 19:35
m: my $f = "a.ps"; say $f.basename.IO.extension 19:36
camelia No such method 'basename' for string 'a.ps'
in block <unit> at <tmp> line 1
tbrowder m: my $f="a.ps"; say $.IO.basename.IO.extension 19:38
camelia ===SORRY!=== Error while compiling <tmp>
Variable $.IO used where no 'self' is available
at <tmp>:1
------> my $f="a.ps"; say $.IO<HERE>.basename.IO.extension
expecting any of:
argument list
term
tbrowder arg, ff
timo doesn't .extension already give you the extension of the file, no need to do basename first? 19:39
tbrowder m: my $f="a.ps"; say $f.IO.basename.IO.extension
camelia ps
tbrowder wel, i'm writing tests for my module that does file conversions, so i need that ability 19:40
timo OK 19:41
tbrowder speaking of raku, lizmat showed me how to get the file "stem" but i can't find my note. i think it's with one of the experimental things like use RakuAST or the like. can RakuAST be used with camelia? 19:45
lizmat m: use v6.e.PREVIEW; say "foo.bar".IO.stem
tbrowder m; use RakuAST; say "hi"
camelia foo
lizmat it's 6.e functionality 19:46
tbrowder 👍
yeah, thanks!
scullucs Oooh! "Stem". I love it! I've been wondering what to call that part for years. 19:53
timo hmm, what would a method called "sprout" do. add a new directory? 19:56
there's a name for a piece of new growth on a tree or plant that i can't remember right now 19:57
timo .sap.slurp to get the file contents :D 20:17
[Coke] how to specify background colors: \c{red} would be foreground. \c{bg:red} ? 22:48
(in a REPL prompt)
(would we want to force fg: on foreground colors?) 22:52
I have RAKUDO_REPL_PROMPT='[\c{red;bold;bg:green;italic}\i\c{reset}] > ' working 22:56
Geth problem-solving/coke/repl: 4f1a3d7484 | (Will Coleda)++ | solutions/rakudo/Configurable-REPL.md
Add \c support
23:14
[Coke] again, feedback welcome, thanks! 23:15
Geth problem-solving/coke/repl: 4f0c48c53d | (Will Coleda)++ | solutions/rakudo/Configurable-REPL.md
Add Solution for Configurable REPL

Fixes #459
23:36