🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
guifa2 What is dba() in rakudo source? I'm guessing debugging something, but I couldn't find its associated method def 03:48
cpan-raku New module released to CPAN! ProcStats (0.3.1) by 03LEMBARK 04:34
MasterDuke guifa2: pretty sure it's "doing business as" 09:03
guifa2: github.com/Raku/nqp/blob/master/sr...#L192-L194 09:04
lizmat jnthn++ 09:52
chloekek .. 10:11
cpan-raku New module released to CPAN! Algorithm::NaiveBayes (0.0.5) by 03TITSUKI 12:42
cpan-raku New module released to CPAN! Gnome::GObject (0.16.5) by 03MARTIMM 12:57
AlexDaniel chloekek: ...
Xliff AlexDaniel && chloekek: .... 13:06
AlexDaniel m: .say for -10....5 # .... operator! :P 13:41
camelia -10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
AlexDaniel heh, should've used this:
m: .say for -10....0 # .... operator! :P
camelia -10
-9
-8
-7
-6
-5
-4
-3
-2
-1
0
Doc_Holliwood added code to rosettacode.org/wiki/Password_generator#Raku 15:12
which version do you like better?
AlexDaniel Doc_Holliwood: that's a lot of code 16:08
Doc_Holliwood It's a bit longer because of the decoupling, yes. 16:16
Xliff Doc_Holliwood: Couldn't you write this "take %char-groups{ .key }.pick for %char-groups" 17:57
as this "take .pick for %char-groups.values"
Geth ¦ problem-solving: alabamenhu assigned to jnthn Issue Rounding issues github.com/Raku/problem-solving/issues/176 18:13
Doc_Holliwood or even take .value.pick for %char-groups, yeah that's better 18:14
guifa2 Ugh I wish github had a delete option for issues. =\ 18:17
timotimo hold on, it doesn't? 18:29
mst I think you can close and lock it and then nuke all the content 18:30
guifa2 timotimo: what mst said, I closed it, and deleted the content of the post, but I couldn't actually delete the issue itself =\ 18:37
timotimo ah dang 18:39
well, you can rename the repository, copy everything over except the thing you don't want, then rename the new one and delete the old one 18:40
clearly!
guifa2 timotimo: I'm sure there are those that would love for that to happen but accidentally rename it to Perl6 or something along the way ha 18:56
guifa2 .tell chloekek: I just saw your issues re printf. See my comments there, not sure if you'd want to collab on a projec there, but I'd be happy to help work on it. 19:08
tellable6 guifa2, I'll pass your message to chloekek
Hermit are there any docs on embedding a raku interpreter for use as an extension mechanism in another program 19:13
maybe more appropriately embedding moarvm and the raku compiler 19:14
MasterDuke Hermit: don't know that there are any docs, best bet is probably looking at Inline::Perl6 19:16
Hermit I don't see the connection 19:17
Oh, it embeds a MoarVM 19:18
guifa2 Or maybe by using the JS or JVM variants. Although I know I'm terrible and don't test on those at all =\
Hermit They're too slow I think
[Coke] find myself wishing for a command line raku arg to say the result of the last calc. 19:19
raku -s '<maths>'
Hermit it's surprisingly hard to find a scripting language that will make proper use of multiple cores
raku would be perfect but there's no precedent for it being embedded into another program 19:20
MasterDuke Hermit: nine is probably the best person to talk to 19:21
Doc_Holliwood Made some improvements and put it in its own paragraph. rosettacode.org/wiki/Password_gene...ctional.29 19:22
still open for suggestions
timotimo you can look at moar's main.c and such to find out how to create an MVMInstance and initial MVMThreadContext 19:23
after that, i would probably recommend doing IPC over Channel objects (aka async blocking queue) between host program and embedded moarvm
MasterDuke timotimo: can you craft some code where the jit bails completely because of param_op_i? 19:33
timotimo let's see 19:36
Hermit thank you timotimo 19:37
guifa2 are NQP-ish questions best asked here or on raku-dev or?
guifa2 doesn't have any right now, but will soon
Hermit I think I'd be comfortable looking at how the top level singleton objects are created and placing those in my program, compiling and linking issues aside 19:38
I'm more worried about accessing script objects from c/c++ code since these are potentially in use in a multithreaded script
timotimo first attempt didn't work 19:39
Hermit There are likely good synchronization mechanisms for script<->script code in raku / moarvm but it would be a lot more complicated if I e.g. started a script in a thread that shared resources with a c++ program 19:40
MasterDuke timotimo: same here 19:40
timotimo what do you need it for? 19:41
MasterDuke trying to do github.com/MoarVM/MoarVM/pull/660 correctly 19:43
timotimo as i understood it we were waiting for a whole refactor of args handling for those ops to get jitted 19:47
MasterDuke i thought those were the param_on_* ones? but can you find that discussion? maybe i should just close the PR 19:48
timotimo it's for all the optional ones i think?
MasterDuke hm 19:49
MasterDuke timotimo: interesting, my attempt does bail if i comment out github.com/MoarVM/MoarVM/blob/mast...#L358-L379 20:22
so i have something i can test. but is the whole thing moot anyway? 20:23
timotimo commenting it out doesn't sound like a good idea though?
it has a break in its default, so it'll just act as if there weren't that op
or perhaps the checks below that will bail it out 20:24
MasterDuke i actually just added a break at line 363
timotimo should have the same effect 20:25
MasterDuke but will it ever be the case that the op will really make it through without getting speshed? if so, i can use this hack to test. otherwise the jitting will be pointless 20:35
timotimo when there's too many arguments, i think it'll skip arg speshing and let the args ops through? 20:37
ckc Good Day - newbie question: while working on Shitov's compiler tutorial, I'm having a simple problem. How can I get 'use' to import .rakumod files located in the same directory as the code containing 'use'? I do not wish to place them elsewhere. 20:51
timotimo you will need to either "use lib '.'" or give -I. on the commandline 20:55
there's also a way to import by file path, but i forgot what it was
ckc Thanks; the correct directory is being checked, and the file LinguaAST.rakumod is present, the code includes 'use LinguaAST', but it still isn't being found. Perhaps it's something to do with using Singularity shell (university won't allow a server install on short notice). Probably too much to troubleshoot, I may just dump everything in one 21:07
file. Love the language, though.
Grinnz if . is interpreted as a relative path, note that it's relative to cwd - raku probably has a simpler way to get a file path relative to current file 21:10
ckc I'm puzzled because zef-installed modules work; my own .rakumod do not: "Could not find LinguaAST at line 221 in: file#/ilab/users/ckc14/cpl2". I don't know what "file#" has to do with anything, but else the directory is correct. This is using the command perl6 lingua.pl6 in the Singularity shell based on a Singularity Docker Rakudo Star import. 21:17
Probably not a typical use case.
AlexDaniel ckc: do you have a META6.json file? 21:20
ckc: if not, then it's possible that your rakudo is too old and it simply doesn't know about .rakumod extension yet 21:21
but if you use a META6.json file then it doesn't matter
ckc I do not. Is there a template you could point me to?
AlexDaniel ckc: docs.perl6.org/language/modules#Pr...the_module 21:23
ckc: “Make your META6.json file look something like this:”
ckc Thanks! That did it. I would not have found that anytime soon. 21:35
AlexDaniel me too 21:37
I don't think we recommend .rakumod yet, exactly for that reason
ckc I'm just starting in Raku, but my first reaction is delight. Makes Python seem like a straitjacket. If I could figure out how to get Raku to generate Python code for Pandas and Matplotlib I'd be thrilled - summer project, perhaps, if someone hasn't done it already. 21:49
moritz ckc: are you aware of Inline::Python? 21:52
I've actually included an example of using matplotlib in the "Perl 6 Fundamentals" book 21:53
there's a branch of Python 3 support in the Inline::Python repo; not quite finished yet :/
ckc At the moment I'm just trying to get through finals - compilers, computability, neural nets - will have spare time in a few weeks! I'll definitely look into your book. Any est delivery date on the Py3 Inline? 21:56
moritz not really; currently distracted by work, family and a global pandemic
ckc This is probably idle speculation, but if Raku has fundamental support for parallelism in a way Python doesn't, and if it were quite easy to parallelize Python data science programs via Py3 Inline or some other means, I expect there'd be interested users. Perhaps Raku could serve to tie together the various data science tools. 22:04
ckc Everyone's got ideas for what other people should spend their time working on, of course. 22:05
lizmat ckc: too bad you missed this round: news.perlfoundation.org/post/gc_cp_mar_2020 22:06
perhaps the next round you could do a grant proposal for getting Python 3 support in ? 22:07
AlexDaniel that'd be awesome 22:08
lizmat ckc: just a hint :-)
ckc I'd make out the check to moritz. Glad to know the organization is sponsoring development of the language; I'm definitely looking forward to learning it. Anyway, thanks all, and I'm off to dinner with my own two little boys, ciao. 22:10
timotimo the "subinterpreter" thing python recently gained is similar to using raku with inline::python to connect multiple python instances together to use multiple cores 22:18
sacomo hi all 22:36
sacomo has there been any progress on a raku-project-to-executable-binary front? 22:41
Doc_Holliwood m: dd (0..Inf).List.pick(Inf) 23:04
camelia Failure.new(exception => X::Cannot::Lazy.new(action => ".pick from", what => Any), backtrace => Backtrace.new)
Doc_Holliwood LTA!
m: .say for (0..Inf).List.pick(Inf) 23:05
camelia Cannot .pick from a lazy list
in block <unit> at <tmp> line 1
bahid hey 23:21
guifa2 ckc: what kind of module are you making with Lingua? 23:49
tellable6 guifa2, I'll pass your message to ckc