🦋 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.
melezhik o/ 10:03
lizmat melezhik o/ 10:04
melezhik I am looking for Raku module to build distribution gist / graphics - pseudo graphic / ascii graphic is ok
so I have time series data and I need to draw a simple plot 10:05
to show me distribution
nothing fancy
any thoughts ?
tbrowder melezhik: hi, have you tried searcing raku.land with some key words? 11:06
tellable6 tbrowder, I'll pass your message to melezhik
tbrowder i need to find if 2 strings share at least one char. i know i can loop through one word with .comb and use .contains on the other, but i think lizmat has shown some fancy set methods that are classier. 11:10
tadzik tellable6++, what a tech :) 11:11
tbrowder ah, set intersection & seems to be the operator 11:18
m: my $a = "abc"; my $b = "cde"; say ($a.comb & $b.comb).elems 11:20
camelia all(3, 3)
lizmat m: dd "abc".comb (&) "cde".comb
camelia Set.new("c")
tbrowder lizmat: thank you! 11:21
i noticed the parens in the docs but ignored them :( 11:23
lizmat an approach in which you create a Set of the longest string and then do a loop with (elem) on the letters of the other, would probably be more efficient
tbrowder okey dokey, but all i care about for now is truthy if any char is shared with very short strings 11:26
in my csv module i can't have line endings and sep chars sharing any char 11:27
lizmat m: dd ?("abc".comb (&) "cde".comb) 11:29
camelia Bool::True
lizmat m: dd ?("abc".comb (&) "def".comb)
camelia Bool::False
tbrowder at least with my simple approach 11:30
and the leading ? is same as using .so, yes? 11:31
lizmat yup
tbrowder thank you! see ya later 11:31
melezhik tbrowder - yep, and have not found anything ... any ideas? 11:56
tellable6 2024-04-26T11:06:12Z #raku <tbrowder> melezhik: hi, have you tried searcing raku.land with some key words?
tbrowder melezhik: i think one of the raku advents discussed a terminal prog of some kind 15:56
tellable6 tbrowder, I'll pass your message to melezhik
tbrowder what's the easiest way to create an identical alias for sub X so that calling sub Y with the same args will return the same result? 16:09
melezhik: Terminal::Graphing::BarCharts may be a starting point 16:14
tellable6 tbrowder, I'll pass your message to melezhik
lizmat m: sub a() dd }; my constant &b = &a; b() 16:42
camelia ===SORRY!=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> sub a()⏏ dd }; my constant &b = &a; b()
expecting any of:
new name to be defined
lizmat m: sub a() { dd }; my constant &b = &a; b()
camelia sub a()
lizmat tbrowder ^^
rir_ "raku --profile-filename=name" gives a deprecation notice. But seems to already be deprecated as 'name' is not created. 16:49
tbrowder lizmat++ 🥰 17:00
librasteve m: sub a($x) {$x²}; my &b := &a; say b(2) 17:04
evalable6 4
Raku eval 4
tbrowder ok, for use in a module i added "is export(:foo)" and put that line following the real sub's def and all is well. i didn't need the ':=', '=' worked fine. i also didn't use the "my". 17:16
rockin and rollin...
nine I'd appreciate feedback on my grant proposal: news.perlfoundation.org/post/sseif...as-apr2024 20:46
lizmat also: www.reddit.com/r/rakulang/comments...n_seifert/ 20:51