🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
Geth doc: flwyd++ created pull request #3983:
101-basics: correct secondary/primary designation
03:18
SmokeMachine Does someone here have an opinion about this? twitter.com/smokemachine/status/14...67776?s=20 04:09
Guest722 Hello all! I have got one question about callable and DateTime. Do I the right thing here: 07:35
my &f = sub ($self) { $self.str; };
DateTime.now(formatter => &f);
DateTime.now then blocks, nothing is returned ever. I have to cancel the program via CTRL + C. or after some time the OS kills the process:
> my &f = sub () {}
sub { }
> say DateTime.now(formatter => &f)
Too many positionals passed; expected 0 arguments but got 1
  in sub  at <unknown file> line 1
  in block <unit> at <unknown file> line 1
> my &f = sub ($self) {$self.Str; }
sub { }
> say DateTime.now(formatter => &f)
[1]    209147 killed     raku
raku  267.63s user 3.45s system 55% cpu 8:07.59 total
moon-child Guest722: what do you expect to happen? 07:37
moon-child when you ask the DateTime to format itself, it calls that subroutine you defined with itself. That subroutine then asks the DateTime to format itself, so it calls the subroutine you gave it, which asks the DateTime to format itself, in response to which it calls the subroutine you gave it ... 07:38
ecocode__ good morning ! is App::Mi6 the tool to use to create a new library module ? 09:14
MasterDuke there are some others also, but yes 09:20
ecocode__ thanks 09:23
MasterDuke np 09:33
ecocode__ hmm.. how can I make ```zef test``` more verbose ? 10:40
Guest779 moon-child THX for the obvious... Silly me. I took the example and thought I am very smart to try it out with just a minimal code... 10:45
moon-child :) 10:47
Geth doc: a978afc3f7 | (Trevor Stone)++ (committed by Juan Julián Merelo Guervós) | doc/Language/101-basics.pod6
101-basics: correct secondary/primary designation

The previous paragraph points out that matches is the primary sort criterion. This line takes advantage of stable sort by sorting by the _secondary_ criterion (sets) _first_ and then sorts by the _primary_ (matches).
11:47
linkable6 Link: docs.raku.org/language/101-basics
m6locks hi, how to install raku on bsd 15:50
Couldn't find a precomp release for OS: "openbsd", architecture: "x86_64"
I thought rakubrew compiled from sources 15:51
(like rvm)
patrickb We currently don't offer precompiled releases for openbsd, because there are some technical difficulties. 15:56
rakubrew can compile from source, but can also download precompiled releases. 15:57
MasterDuke i would expect compiling with rakubrew to work, but if not couldn't you take the script or whatever from ports and manually use that?
patrickb Use the `download` and `build` subcommands respectively.
m6locks ok, will try thx 16:30
SmokeMachine new features on my new project (that I'm still thinking if it worths to be developed), does anyone have any opinion on it? twitter.com/smokemachine/status/14...45606?s=20 19:17
Kaiepi SmokeMachine, the &factory block looks gather-ish. do the assignments come with side effects? 19:30
SmokeMachine Kaiepi: I use the model type to generate factory type for each model used by a factory and each factory is a instance of that class. The assignments applies to that instance 19:33
Kaiepi: does that make sense? 19:40
Kaiepi replacing the assignments with take (key => value) in combination with something like .bless(|(gather block), |%rest) might allow for bindings to work as well
SmokeMachine That was my first try, but I wanted that to need the method to exist… to maybe in a future have that autocompleted by an ide… 19:43
Kaiepi ah
SmokeMachine Make sense? 19:44
Kaiepi not really :(. not very familiar with red 19:46
algorev Hello 21:05
I've just got this error on some code I wrote:
"Autovivifying object closures not yet implemented. Sorry."
It's a compile-time error
Does someone know what the heck it could mean? 21:06
lizmat could you create a gist with the --ll-exception backtrace ? 21:18
algorev gist.github.com/algorev/aa28de561b...b30e1be1b1 21:23
I added the affected code too
MasterDuke i suspect you need a space after your role/class names, before the '{' 21:26
algorev Oh 21:27
It worked!
Thanks a lot!
I do have a last question though
lizmat yeah, also for the methods for consistency :-)
algorev How do you `require` code from a file that's in the same directory 21:28
Raku's module system confuses me
lizmat very good point ahah
lizmat algorev: I guess the question should first be: why do you need 'require' ? 21:30
algorev The file i sent in the gist contains a few class and role definitions and i'd like to use the from another file 21:31
*them
lizmat perhaps docs.raku.org/language/modules#Exp..._importing could be of help ? 21:32
algorev Sounds like it 21:33
Though in my case raku seems to think that the current directory is not part of the module search path
Is there an option to tell it where to look?
I'm making a gist showing what it tells me
lizmat -I
if you must
aka, -I. 21:34
there are a bunch of reasons for not wanting to use that in production, but for prototyping it's ok
algorev gist.github.com/algorev/be7728c27d...42fa7d11dc 21:37
I'd prefer knowing the correct way if i can make it work 21:38
Less hassle for everyone down the road
lizmat I would use "use ActivationFunction" and call the script with -I. 21:44
and probably drop the "use v6" , that's really redundant in a script with a .raku extension 21:45
algorev It worked! Thanks a lot. Also, noted for the v6 ;) 21:48