🦋 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.
tbrowder ref match. this helped me get a single string.. 10:26
tbrowder m: my $s = 1abc2abc3abc; my @w = $s.split(/\d/, :v); while @w { my $a = @w.shift; if $a ~~ Match { my $b = @w.shift; say "{$a.Str} $b"} else { say $a }} 10:33
camelia ===SORRY!=== Error while compiling <tmp>
Confused
at <tmp>:1
------> my $s = 1⏏abc2abc3abc; my @w = $s.split(/\d/, :v);
tbrowder once more 10:34
tbrowder m: my $s = <0abc1abc>; my @w= $s.split(/\d/, :v); while @w { my $a = @w.shift; if $a ~~ Match { my $b = @w.shift; $a .= Str; say "$a $b"; else { say $a }} 10:37
camelia ===SORRY!=== Error while compiling <tmp>
Missing block
at <tmp>:1
------> $a .= Str; say "$a $b"; else { say $a }}⏏<EOL>
tbrowder m: my $s = <1abc2abc>; my @w = $s.split(/\d/, :v); while @w { my $a = @w.shift; if $a ~~ Match { my $b = @w.shift; $a .= Str; say "$a $b";} else { say $a }} 10:41
camelia
1 abc
2 abc
tbrowder extacting txt from pdf is very useful. instead of spending a half hour or so manually entering utility costs for a year in a spreadsheet, i can spend hours creating a raku prog to do it for me! 😄 12:51
librasteve tbrowder - i wrote PDF::Extract for this purpose- feel free to try it! 13:16
also Contact raku.land/zef:librasteve/Contact 13:18
and raku.land/zef:librasteve/Net::Google::Sheets so you can paste the results to a Google sheet 13:19
these modules are intended as (skeletal) components that can be fleshed out and reused 13:22
lizmat: (belated) thanks for the pointer on private multis - i guess it’s sensible to have multis participate fully in method despatch (for roles, inheritance and so on) 13:26
antononcube @librasteve "i wrote PDF::Extract for this purpose- feel free to try it!" -- I used it to analyze the PDF of Trump vs. Anderson. (By the Supreme Court by USA.) 14:45
tbrowder librasteve: l looked at yr module but couldnt’t find where pdftotext comes from 15:02
Imightbeaturtle Hello everyone! I'm new here 19:30
lizmat hi Imightbeaturtle!
quib Hello, Imightbeaturtle 19:31
Imightbeaturtle I've only been using Raku for a couple months and I love how expressive it is, my only other experience with programming is with Java and Raku honestly just blew my mind.
I'd love to contribute anyway I can
lizmat hehe, glad to hear that :-)
antononcube @Imightbeaturtle Hmm... I am not sure what is our turtle policy. I think raccoons might be welcome.
Imightbeaturtle oof 19:32
lizmat antononcube: come on?
antononcube @Imightbeaturtle Are you, by any chance, a raccoon that thinks it might be a turtle?
Of course, turtle are fine -- tend to be wise.
Imightbeaturtle not the last time I checked
lizmat Imightbeaturtle: what would you like to contribute with? in the ecosystem, in core, in marketing? writing blog posts? 19:34
antononcube @Imightbeaturtle How long have you programmed in Java?
Imightbeaturtle A couple years, not professionaly though
lizmat: Ecosystem would be nice 19:35
antononcube @Imightbeaturtle Consider re-programming your favorite Java packages in Raku using LLMs.
lizmat Imightbeaturtle: get raku.land/zef:skaji/App::Mi6 19:36
then get a fez login: raku.land/zef:tony-o/fez
then run "mi6 new Foo::Bar" and start programming :-) 19:37
antononcube @Imightbeaturtle I am always looking for Raku enthusiasts: (1) try and regularly use Raku Chatbooks, and (2) more generally, use / access LLMs via Raku.
Imightbeaturtle @antononcube why raku chatbooks? 19:39
quib i have been training llm's about programming lately and i find like 1/8 of the time they get confused and start writing perl5 when i ask for raku
antononcube <Imightbeaturtle> "why raku chatbooks?" -- short introduction video here: www.youtube.com/watch?v=wNpIGUAwZB8 19:42
There are a few other related movies some short, some long. 19:43
Basically, using Raku Chatbooks lets you do Literate Programming with convenient (I think) LLM inclusion.
Imightbeaturtle I see 19:57
I use this package right? 19:59
raku.land/zef:antononcube/Jupyter::Chatbook
antononcube Yes !
Ideally, you have used Jupyter before. Also, I prefer using the Jupyter chatbooks via Visual Studio Code. 20:00
@quib What is the complexity of the programs you tried? And, yes, often I get Perl instead of Raku with LLMs. But most recent OpenAI models tend to produce good enough Raku results. 20:02
@quib I have started -- and not finished -- a few articles / blog posts about LLM failings for tasks in different "nerdy" sub-cultures. 20:05
librasteve tbrowder: its a wrapper on poppler that is called via shell from raku with pdftotext 20:27
poppler installs the pdftotext cmd on linux like machines (I have tested with a mac) linux.die.net/man/1/pdftotext 20:31