🦋 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.
japhb Xliff: If you're talking about the difference between Terminal::Print::DecodedInput and the later versions of similar code -- T::P::DI is a hack that *mostly* works, as long as your needs are not too great. The later modules try to actually get *correct* parsing, based on the work in Terminal::ANSIParser, and with the ability to send queries to (and receive responses from, of course) the terminal/terminal 00:29
tellable6 japhb, I'll pass your message to Xliff
japhb emulator. Which allows things like detecting screen size and color depth.
Nemokosch Voldenet is back 💪 08:34
Nemokosch hi hi 10:32
m: say '1' ~~ S/1/2/ 10:33
camelia Potential difficulties:
Smartmatch with S/// is not useful. You can use given instead: S/// given $foo
at <tmp>:1
------> say '1' ~~ ⏏S/1/2/
2
Nemokosch Telling lies again, ha? :s
Does anybody know about this fake potential difficulty? Smartmatch with S/// is not only useful but it does work, even. 10:34
lizmat how does it work ? 10:43
Nemokosch it did correctly return 2 10:46
these "potential difficulties" are sometimes more harmful than useful, to be honest; smartmatching does set the topic variable and anyway, why _should_ it not work when s/// also works with smartmatching 10:50
lizmat m: no worries; say '1' ~~ S/1/2/ 10:54
camelia 2
lizmat m: say '1' ~~ s/1/2/
camelia Cannot modify an immutable Str (1)
in block <unit> at <tmp> line 1
lizmat perhaps the worry should be for the "s" case .... 10:55
Nemokosch the s case is also good if the LHS is mutable 10:58
m: my $foo = '1'; $foo ~~ s/1/blah/; say $foo; 11:00
camelia blah
Nemokosch I'd say smartmatching to S/// is in fact more useful than to s/// because you can use it as a part of a longer expression. 11:01
for s/// the return value seems to be as if you did m// or sth alike 11:02
lizmat yeah, that's why I like to chain .subst statements all the time :)
Nemokosch Fair point but wouldn't it be good if something ~~ S/// just didn't shout? ^^ 11:04
lizmat seems like the original text was "Smartmatch with S/// can never succeed because the subsequent string match will fail" 11:05
f54ff833 from 2015 11:06
lizmat which was changed by Zoffix in 2016 in be210fba 11:06
Nemokosch m: no worries; say '2' ~~ S/2/12/ ~~ S/12/42/ 11:07
camelia 42
Nemokosch I would say this paradigm is elegant even 11:08
lizmat this was the associated issue: github.com/Raku/old-issue-tracker/issues/5273 11:10
lizmat goes back to look at other stuff 11:11
Nemokosch the only concern I could see arise is that this smart"match" doesn't produce a Bool value. However, that goes for m// as well, and there might be others 11:13
Nemokosch So maybe it's not even a criterion of smartmatch to always be strictly about matching in the "is it or is it not" sense 11:14
Voldenet Nemokosch: I was always here, just more quiet than usual :) 12:32
Ulti hey ho, I was wondering if anyone knows of or has tried to produce Dash compatible DocSets for the Raku documentation? 12:48
Ulti or perhaps more importantly would value that 12:53
Nemokosch what is Dash? 12:57
[Coke] . 13:25
Nemokosch boo 13:27
[Coke] returns from a business trip to find his long running irc session is kaput and all messages lost. 13:28
[Coke] read some raku blog posts while traveling, thanks lizmat et al. :) 13:29
Ulti Nemokosch it's a documentation tool, basically a man system but GUIafied kapeli.com/dash the main thing is it has a "docset" format thats basically a precompiled SQLite file indexing the docs plus all the docs in a directory. zealdocs.org/ is a Linux client 13:42
I noticed Perl 5 is on there but not Raku, and p6doc being relatively similar it might not be very hard to sort out a Raku docset 13:43
Nemokosch Seems like some greedy Mac-orinted thing, I for one don't feel positive towards anything that starts like this 13:47
Voldenet I'm betting that some mac-owning person might implement that eventually 13:48
Ulti who do you think I am??? 13:49
Voldenet :)
Ulti I havent touched anything to do with the doc system in Raku though and know there are some peeps here deep in it
I'll start by taking a look how the perldoc version for P5 works 13:50
though I think its one supported by the author of Dash which is maybe less helpful
I tend to have at all times like 20 browser tabs open with docs in, which destroys battery life and is just annoying they're not local 13:51
I also program in maybe 5 different languages regularly so having to use different tools to search the docs is mildly annoying 13:52
Voldenet …i just use one tool, web browser :> 13:54
though I get the point
Ulti a little Raku program that understands the docset format and can search from the CLI would also be a neat outcome of playing around, given if Im modelling the SQLite file to write one I can definitely go around reading and searching them 13:58
maybe render as ascii to the terminal too...
Nemokosch the browser is the new OS haha 14:00
Voldenet you can run x86 vms through webasm
Altreus Where does zef come from, or whatever's replaced zef if that's a thing? 14:01
it's not in rakudo-moar-2022.07-01-linux-x86_64-gcc.tar.gz 14:02
Voldenet raku.land/github:ugexe/zef 14:03
Ulti Altreus I thought that was always true?
Voldenet the installation section works, I've tested this many times
Altreus It might be but I'm usually several months removed from the last time I downloaded raku :D
so I never remember that this happened before 14:04
Voldenet: thanks :)
Voldenet Ulti: I think that you can use kapeli.com/docsets#copyDocumentation with github.com/Raku/doc 14:05
BUT creating good index will be difficult, because docs don't contain enough semantic info 14:06
Altreus Personally I've found pod6 (what's it called now?) to be harder to use than pod5 14:07
hrm i've linked $PATH/raku to bin/raku from the dist, which itself links to rakudo, and installing zef seems to want to use /usr/bin/env rakudo 14:13
Altreus Is it better to add that bin dir to my $PATH instead? 14:13
oh I bet what I previously did was make a raku dir and link *that* and then put that dir/bin into $PATH! Maybe I should just use rakubrew 14:14
Nemokosch maybe you should :) 15:04
patrickb Altreus: The archives in rakudo.org definitely have ZDF included. I suspect you missed to look in archive/share/perl6/site/bin/ 15:15
s/ZDF/zef/
Also there is the set-env.sh script, which sets up the paths correctly (both bin/ and share/perl6/site/bin/) 15:17
[Coke] I have a mac and am interested in the docs, what was the original thing? 16:15
Voldenet [Coke]: original thing was Dash compatible DocSets for the Raku documentation for viewing in kapeli.com/dash 16:44
tellable6 Voldenet, I'll pass your message to [Coke]