🦋 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.
00:00 Doc_Holliwood left
tbrowder .tell yary fun briefing! 00:08
tellable6 tbrowder, I'll pass your message to Yary
moon-child thoughts on adding ∊ as an alias for ∈? 00:11
guifa I feel like the discussion had come up once about doing some aliases like that and the result of the discussion was folks weren’t keen on it 00:56
00:59 guifa left 01:18 Doc_Holliwood joined 01:19 maggotbrain left 01:21 maggotbrain joined 01:24 Maylay joined 01:25 epony joined 01:27 Garbanzo_ joined 01:29 tech_hutch joined
tech_hutch Hi 01:29
Does Raku have any form of destructuring/unpacking?
01:31 pecastro left 01:38 JRaspass joined 01:44 Xliff joined
Xliff vrurg: You still around? 01:46
02:02 JRaspass left
vrurg Xliff: kind of. 02:06
Xliff vrurg: OK. If you have some time, I'd like to talk adding candidates to proto. 02:08
This is to hopefully... finally... address the lingering issues with Method::Also
So I have a HOW that I want to pun to an object to overide its normal behavior, particularly incorporate_multi_candidates. 02:09
vrurg Xliff: time is the problem. :( But hopefully, I'll manage. 02:10
Xliff However I need to make sure that 1) the aliased proto is added and 2) all of the aliased candidates are added.
This is what I currently have, now. 02:11
I suspect much of that is out of date.
Since time is a factor, just a quick looksee would be appreciated.
But will probably need more of your time when available. 02:12
02:13 Doc_Holliwood left
vrurg Somehow I suspect that you can actually just clone the originals, change their names, and push back to multi_methods_to_incorporate before invoking the original incorporate_multi 02:14
Xliff: have you tried this approach?
Xliff Not tried, no. Was thinking something similar, yes. 02:15
That's a thought. I'll preserve this and try that in the main branch. 02:16
@!multi_methods_to_incorporate is just an array with (.name, .code) pairs, right?
Or... maybe just method objects? 02:17
vrurg Xliff: consider RoleToRoleApplier or RoleToClassApplier in src/Perl6/Metamodel 02:18
looks like it's an object. 02:19
It's an object of internal class MultiToIncorporate 02:20
It has only .name and .code on it.
Xliff It's internal? :S -- can I get access to that from the HLL? 02:21
vrurg Xliff: you don't need to know a class to work with its instances. 02:24
tech_hutch Hey guys, sorry to interrupt you, but how do you pass a class constructor to another function? I've tried various ways of using `&`, but it doesn't seem to work.
Xliff OK, so add_multi_method should do what I need?
vrurg: OK, thanks. I'll create another branch and let you know how it goes. 02:25
vrurg Xliff: I think it must. 02:26
add_multi_method, I mean.
tech_hutch: use Class.^lookup("new"), but normally you don't need it. If you see yourself in need to do so then either you do some very low-level, or you do something wrong. :) 02:27
tech_hutch Hm, okay
vrurg tech_hutch: really, why?
tech_hutch I'm just trying to parse every line of a file into a class
I'll gladly hear a more idiomatic way to do that lol 02:28
vrurg Ok, then all you need the class typeobject.
02:28 wamba left
tech_hutch What do you mean? Use the type as a function? 02:29
vrurg m: sub foo(Any:U \class) { class.new }; class Foo {}; say foo(Foo).WHICH
camelia Foo|72327024
tech_hutch Oh, I actually don't need to do it dynamically. I just didn't want to have to make a lambda just to call the constructor 02:30
vrurg `class` is a bad name for a parameter, actually. But otherwise...
tech_hutch I'm basically doing `"some_file".IO.lines.map: -> $line { Class.new: $line }` 02:31
vrurg Performance? 02:32
Or what's the reason to avoid a closure?
tech_hutch I'm not really concerned about performance, I just wanted to see if there was a way that looks nicer lol
vrurg I don't think that 'my &c = Class.^lookup("new"); .map: &c(Class, $line)' would look any better. Most certainly, it'd complicate reading the code. 02:36
m: my @a = 1,2,3; class Foo { has $.v; multi method new($v) { self.new(:$v) } }; my Foo() @b = @a; say @b 02:37
camelia [Foo.new(v => 1) Foo.new(v => 2) Foo.new(v => 3)]
tech_hutch Yeah, that's not great
I'll just stick with what I have
vrurg tech_hutch: you can try coercion.
tech_hutch Oh?
vrurg 'class Class { method new($attr) { self.new(:$attr) } }; my Class() @converted-lines = $handle.lines' Should work 02:39
tech_hutch Wow, it actually does! 02:41
What interesting syntax
vrurg tech_hutch: For safety you could even use Class(Str:D) to avoid accidental acceptance of undefineds or unsupported type. 02:43
tech_hutch I see
02:52 tech_hutch left 03:06 Manifest0 joined 04:06 linkable6 left, notable6 left, evalable6 left, greppable6 left, sourceable6 left, unicodable6 left, nativecallable6 left, benchable6 left, bloatable6 left, shareable6 left, quotable6 left, bisectable6 left, statisfiable6 left, committable6 left, coverable6 left, squashable6 left, releasable6 left, tellable6 left, greppable6 joined, nativecallable6 joined, tellable6 joined, committable6 joined, releasable6 joined 04:07 quotable6 joined, unicodable6 joined, linkable6 joined, bisectable6 joined 04:08 bloatable6 joined, coverable6 joined, shareable6 joined, squashable6 joined, benchable6 joined 04:09 notable6 joined, sourceable6 joined, statisfiable6 joined, evalable6 joined 04:10 cpan-raku left 04:14 webstrand joined 04:25 cpan-raku joined, cpan-raku left, cpan-raku joined
guifa2 tech_hutch: when you say destructuring/unpacking you mean like in signatures or Java's serializable? 05:15
tellable6 guifa2, I'll pass your message to tech_hutch
05:25 linkable6 left, linkable6 joined 05:39 Garbanzo_ left, Garbanzo_ joined 05:40 Garbanzo_ left, Garbanzo joined 05:52 parabolize left 05:53 asymptotically left 06:53 quotable6 left, nativecallable6 left, benchable6 left, linkable6 left, unicodable6 left, squashable6 left, evalable6 left, committable6 left, sourceable6 left, greppable6 left, coverable6 left, notable6 left, bisectable6 left, bloatable6 left, bisectable6 joined 06:54 committable6 joined, greppable6 joined, linkable6 joined, nativecallable6 joined, quotable6 joined, bloatable6 joined 06:55 benchable6 joined, notable6 joined, unicodable6 joined, evalable6 joined, sourceable6 joined 06:56 coverable6 joined, squashable6 joined 07:09 mowcat left 07:19 brtastic joined
Geth ecosystem/alabamenhu-patch-2: f2cb7283b5 | L'Alabameñu++ (committed using GitHub Web editor) | META.list
Add Intl::Format::Number to ecosystem

  (can we get it on the first try this time?)
ecosystem: alabamenhu++ created pull request #575:
Add Intl::Format::Number to ecosystem
07:48 telex joined 08:02 asymptotically joined 09:02 evalable6 left, linkable6 left, evalable6 joined 09:03 linkable6 joined 09:08 Garbanzo left 09:13 domidumont joined 09:32 sena_kun joined 09:33 wamba joined 09:54 sjm_uk joined 09:58 Sgeo left
Geth doc: 75d5b04334 | (Stoned Elipot)++ (committed by Juan Julián Merelo Guervós) | 2 files
lastcall is an independent routine ref #3767
linkable6 DOC#3767 [open]: github.com/Raku/doc/issues/3767 [docs] lastcall is most probably in the wrong place
10:06 Black_Ribbon left 10:19 Altai-man joined 10:21 sena_kun left 10:35 asy joined, asymptotically is now known as Guest14717, asy is now known as asymptotically 10:36 xelxebar left, xelxebar_ joined, Guest14717 left 11:21 pecastro joined 11:38 Doc_Holliwood joined
Geth doc: stoned self-assigned lastcall is most probably in the wrong place github.com/Raku/doc/issues/3767
30db88bdce | Coke++ | doc/Language/modules.pod6
11:51 sjm_uk left 11:58 sno left 12:13 cpan-raku left 12:14 cpan-raku joined, cpan-raku left, cpan-raku joined 12:18 notagoodidea joined
Doc_Holliwood Is it possible to inspect/change what has been gather-ed from within the block? 12:50
12:54 wamba left 13:02 sjm_uk joined
notagoodidea is it a performance cost between `slurp` and `IO.lines`? 13:26
13:33 wamba joined
notagoodidea ok, `slurp` seems faster (17s vs 28s for 100_000 times to open the same files) 13:35
13:35 Doc_Holliwood left 14:01 wamba left 14:05 stoned75 left, stoned75 joined 14:20 sena_kun joined 14:21 Altai-man left 14:36 sjm_uk left 14:45 lucasb joined 15:08 MasterDuke left 15:20 wamba joined 15:25 hungrydonkey joined 15:45 parabolize joined
moritz yes, it has to do less 15:50
15:50 tech_hutch joined
moritz lines needs to read *and* search for newlines 15:50
notagoodidea Is slurp lazy or it will hang on very large files? 15:53
Xliff moritz: Hi. Can you help me figure out why my slang keeps running into the 'two terms in a row' rule? 15:58
m: my @a = gather for <1 2 3> { take $_; @a.gist.say } 16:02
camelia []
Xliff m: my @a = gather for <1 2 3> { take $_; @a.gist.say }; @a.gist.say;
camelia []
[1 2 3]
Xliff Doc_Holliwood: ^^ Looks like that's a no. 16:03
tellable6 Xliff, I'll pass your message to Doc_Holliwood
Xliff Doc_Holliwood: re: your gather/introspect question
tellable6 Xliff, I'll pass your message to Doc_Holliwood
guifa2 notagoodidea: slurp is not lazy, lines is though 16:29
[Coke] tony-o: question about fez. Does it have a literal "META" file? or might the docs that were recently added to raku/doc be referring to the modules META6.json file? 16:34
github.com/Raku/doc/blame/master/d....pod6#L920 16:35
(found by running the xt/ tests in raku/doc, it doesn't like "META" as a standalone) 16:37
16:41 hungryd34 joined, hungrydonkey left 16:43 hungryd34 left
[Coke] has a patch coming assuming it's the raku META6.json and also addresses issues found with xt/aspell.t 16:43
doc: 7a25604eaa | Coke++ | 2 files
Track new words
linkable6 Link: docs.raku.org/language/modules
16:52 xelxebar_ left, asymptotically left, tejr left 16:55 notagoodidea left
codesections just to make sure I'm not missing something obvious: There's no idiomatic way to bulk-export the `our` scooped variables in a module, is there? It feels really verbose to keep writing `our sub ... is export`, but that _is_ the accepted way to do it, right? 16:55
16:55 sjm_uk joined 16:56 ufobat_ joined 16:57 monkey` joined
codesections (I know I could do something fancy with `sub EXPORT` but my understanding is that this isn't very idiomatic and, in any event, would still be verbose. But I'd love to hear that I'm wrong on either count!) 16:57
16:58 cpan-raku left 16:59 cpan-raku joined, cpan-raku left, cpan-raku joined 17:01 MasterDuke joined 17:02 tech_hutch left 17:04 JRaspass joined 17:16 asymptotically joined
guifa2 codesections: maybe something like sub EXPORT { OUR::.Map } 17:30
OUR:: is a hashy stash of all the our-scoped symbols. sub EXPORT needs to produce a Map of symbol-name + symbol value, and … that's exactly what .Map gets you :-) 17:32
codesections guifa2: yeah, I was wondering about something like that. Or maybe just putting the exports inside a `my package EXPORT::DEFAULT {...}` block? 17:34
17:35 Sgeo joined, sam21 joined
guifa2 yeah. I'm curious though, what are you doing with lots of ours and exports? I tend to use either/or rather than both 17:35
codesections hmm? Maybe I'm confused... I thought that exported variables need to be `our` scoped unless you want the consumer to need to type out the whole module name on each use. Am I wrong about that? 17:38
17:39 jmchael joined 17:41 moony left, moony joined 17:43 Sgeo_ joined
guifa2 hmm oh I guess you do have to our scope them, huh. my bad. (tbh I think I almost always use sub EXPORT for variables) 17:44
sam21 commit: HEAD for 1..20 -> $i {CATCH {default { say "Error ",$i;next}} my @list = 0 xx $i; for @list Z @list -> $a, $b {}} 17:45
committable6 sam21, gist.github.com/f9a671e3464b09e92b...4ee6ccd689
17:45 Sgeo left
sam21 commit: HEAD for 1..20 -> $i {CATCH {default { say "Error ",$i;next}}; my @list = 0 xx $i; for @list Z @list -> $a, $b {}} 17:45
committable6 sam21, ¦HEAD(65a5cce): «Error 1␤Error 3␤Error 5␤Error 7␤Error 9␤Error 11␤Error 13␤Error 15␤Error 17␤Error 19␤»
17:46 coldpress_ is now known as coldpress
sam21 Hello, I don't understand why the code above fail for every list with odd number of elems. Is this normal? 17:48
timotimo the Z operator will iterate until the shortest of the lists has ended
17:50 pecastro left
guifa2 it's because of the pointy block 17:50
-> $a, $b requires two arguments to be produced 17:51
17:51 pecastro joined
sam21 commit: HEAD say (1,2,3) Z (1,2,3) 17:52
committable6 sam21, ¦HEAD(65a5cce): «((1 1) (2 2) (3 3))␤»
guifa2 With ^3 the first time you get (1,1) and (2,2), the second time you get (3,3) and … error
If you're wanting $a to 1, and $b to be 1, use deconstruction 17:53
m: for <a b c> Z <1 2 3> -> ($a, $b) { say "letter $a, number $b; " }
camelia letter a, number 1;
letter b, number 2;
letter c, number 3;
sam21 Thank you both, I don't know about deconstruction but i will look at the doc 17:54
Ok parenthesis! 17:57
18:14 ufobat_ left 18:17 BenGoldberg joined 18:19 Altai-man joined 18:21 sena_kun left
tbrowder .seen thundergnat 18:24
tellable6 tbrowder, I saw thundergnat 2021-01-07T17:00:34Z in #raku: <thundergnat68> >[Coke] Is there interest in having a sort algorithm like tcl's [lsort -dictionary]? Perhaps something like modules.raku.org/search/?q=Sort%3A%3ANaturally ?
tbrowder .tell thundergnat Base::Any is awe-inspiring! 18:25
tellable6 tbrowder, I'll pass your message to thundergnat68
moritz Xliff: sorry, I have zero experience with slangs 18:28
guifa2 Xliff: I actually recently did a slang very similar, I'll try to recreate and test it later today 18:29
[Coke] guifa2: you can add a ? to make the last one optional. 18:41
m: for <a b c> -> $a, $b? { say "$a $b" }
camelia a b
Use of uninitialized value element of type Mu in string context.
Methods .^name, .raku, .gist, or .say can be used to stringify it to something meaningful.
in block at <tmp> line 1
[Coke] m: for <a b c> -> $a, $b? { dd $a, $b }
camelia "a"
18:48 domidumont left
codesections is there any way to write a signature for a named argument that accepts Positionals and converts non-positionals -- and that still uses `@`? 18:49
I'd like to do something like this:
m: sub f(List() :$a) { dd $a }; f("foo") 18:50
camelia Too many positionals passed; expected 0 arguments but got 1
in sub f at <tmp> line 1
in block <unit> at <tmp> line 1
codesections m: sub f(List() :$a) { dd $a }; f(:a('foo'))
camelia $("foo",)
codesections but use `@` (since the argument always _will_ be positional) 18:51
[Coke] codesections: I don't know of a way to do that, and it seems like a code smell. 18:54
if you want to do it, you can do it yourself at the top of your routine. 18:55
codesections [Coke]: Thanks. That's interesting -- what about it strikes you as a code smell? 18:56
(my sense is that a lot of the built-in functions accept either a List or a single arg (instead of requiring the caller to pass in a one-element List, and I usually try to do the same in the name of dwim)Thanks. That's interesting -- what about it strikes you as a code smell? 18:58
18:58 wamba left
[Coke] because those are two different types of args and conflating them seems very surprising. 18:58
if you want two different styles of args, there are multis. 18:59
but if you want named to be treated as positionals... why not just used positionals?
codesections good point re: multis 19:00
19:04 xelxebar joined
codesections [Coke]: as to the "why" part of your question, just for ergonomics. Consider the Hero class example at docs.raku.org/type/Attribute#method_gist That has a signature of (:$name, :@inventory), which means that a caller has to do something like `Hero.new(:name<Bob> :inventory(($the-sword,),))` if they want to create a hero with only one item in their inventory. But it's clear we wouldn't want to make :inventory into a positio 19:14
19:15 sjm_uk left 19:20 notagoodidea joined
notagoodidea I was looking at the source of RUN-MAIN and view : github.com/rakudo/rakudo/blob/65a5...in.pm6#L55 about the `coerce-allomorphs-to` option. I don't see any trace of it in the documentation (yet?) 19:23
19:23 faisal_javed joined 19:25 faisal_javed left 19:28 monkey` left
codesections I guess a different way to put what I was saying is that, given that this works: 19:32
m: sub g(*@a) { dd @a }; g(0);
camelia Array element = [0]
codesections I don't understand why this doesn't:
m: sub f(:$a (*@b)) {dd @b}; f(:a(0))
camelia Cannot unpack or Capture `0`.
To create a Capture, add parentheses: \(...)
If unpacking in a signature, perhaps you needlessly used parentheses? -> ($x) {} vs. -> $x {}
or missed `:` in signature unpacking? -> &c:(Int) {}
in sub f at <tmp> l…
[Coke] ah. you want slurpy named? that's not how I read your ask. 19:36
19:37 mowcat joined, monkey` joined
[Coke] (my bad) 19:37
codesections well, I didn't either :) It took a bit more playing around to realize that's what does what I want 19:38
Xliff guifa2: Thanks. 19:42
moritz: Ah, Ok. 19:43
[Coke] can't you just use :$a ?
m: sub f(:$a) { dd $a} ; f(:a(0)) ; f(:a<0 1 2 3 4>)
camelia 0
$(IntStr.new(0, "0"), IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"), IntStr.new(4, "4"))
[Coke] m: sub f(:$a) { dd $a[]} ; f(:a(0)) ; f(:a<0 1 2 3 4>) 19:44
camelia 0
(IntStr.new(0, "0"), IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"), IntStr.new(4, "4"))
codesections [Coke]: yeah, you can (and that's what I'm doing). That doesn't nicely convert `0` into `(0,)` for you, and you give up the @ sigil signal that you're dealing with a list. 19:46
19:46 wamba joined
codesections you can fix the first with `sub f(List() :$a)`, but then you're in the odd place of having a $ variable that is _always_ a @ type 19:47
which is what made me curious if I was missing something 19:48
[Coke] let us know if you find it. :) 19:50
codesections will do :)
19:52 thundergnat joined
thundergnat tell tbrowder: Glad you find it useful, or awe-inspiring at least. :-) 19:54
tellable6 2021-01-10T18:25:56Z #raku <tbrowder> thundergnat Base::Any is awe-inspiring!
thundergnat meh
.tell tbrowder: Glad you find it useful, or awe-inspiring at least. :-)
tellable6 thundergnat, I'll pass your message to tbrowder
notagoodidea m: multi sub f(:@a){dd @a}; f(:a<0 1>); f(:a<0>)
camelia (IntStr.new(0, "0"), IntStr.new(1, "1"))
Cannot resolve caller f(:a(IntStr)); none of these signatures match:
in block <unit> at <tmp> line 1
tbrowder well, it's so much better than my Number::More I'm thinking of retiring it 19:56
Xliff Base::Any?
tbrowder yes
19:57 rindolf left
tbrowder mine was more an exercise in how to do it rather than utility, but it (Nd Base::Any do have utility when trying to have unique but ordered ids for databases. they enable smaller widths for large numbers 19:59
at least visually 20:01
Xliff Ah. Base::Any looks nifty.
Might make it easy to do spreadsheets.
thundergnat To be honest, Base::Any started out as routines I wrote to solve Rosettacode tasks. Once I nailed them down I just collected them all together and stuck them in a module. 20:02
tbrowder how so?
thundergnat Figured if I spent so much time figuring them out, may as well make them easily available to others.
tbrowder spreadsheets, that is
Xliff Columns
tbrowder ah, i forgot about that, i usually use the integer rep 20:03
Xliff Yeah. 20:04
Still fresh, so I'm testing it out.
thundergnat Actually... most of my modules started out that way. 🤔 20:05
Xliff raku -e 'use Base::Any; set-digits("A"..."Z"); say 26.&to-base(26)' # BA (?) 20:07
20:07 Sgeo_ left
Xliff 25 is Z 20:07
That's odd.
thundergnat A is 0
20:08 JRaspass left 20:09 Sgeo joined
thundergnat Any standard base does not have a 'digit' in that base. 20:09
Just like base 2 doesn't have a digit 2 20:10
Xliff OK. That kinda makes it difficult to go from A = 1 to AA = 27
Still neat, though.
Better use might be a RYO crypto tool.
Geth doc: d4887a5d6d | (Stoned Elipot)++ | 2 files
[skip ci] Add GitHub workflow to run tests from t/

  ... with the help of a companion script running the tests in a container
with the image jjmerelo/perl6-doccer.
ref #3777
linkable6 DOC#3777 [open]: github.com/Raku/doc/issues/3777 [docs] We need to speed up tests or otherwise reduce dependence on Travis
20:19 monkey` left 20:21 MasterDuke left 20:32 Sgeo left 20:34 Sgeo joined 20:43 sxmx left 20:44 sxmx joined
thundergnat raku -e'use Base::Any; set-digits( flat "🦋", "A"..."Z"); my @cols = lazy flat Any, (^∞).map({.&to-base(27)}).grep( !*.contains("🦋")); say @cols[$_] for 1..5; say @cols[24..29];' 20:55
Xliff ^^^
Xliff Hah! Odd. I did consier using base 27. 20:58
thundergnat++ # Thanks
O I C how that works, now. 21:00
21:00 MasterDuke joined
Xliff thundergnat: Now how about doing that in reverse? ];-D 21:02
thundergnat ?? maybe something like: @cols.first: * eq 'FD', :k; 21:04
moritz or just @cols.first: 'FD', :k;
smart-matching with a string does string equality comparison 21:05
thundergnat err, yeah, what moritz++ said.
Xliff LOL! True enough.
21:10 zxcvz left
Xliff Can roles take an optional parameter? 21:18
Or a named parameter? 21:21
stoned75 docs.raku.org/language/objects#Par...ized_roles
gfldex Xliff: they take named, slurpies and mandatory named. Not sure about optional. 21:25
m: role R[$p?] { has $.a = $p };
camelia ( no output )
gfldex m: role R[$p?] { has $.a = $p }; class C does R {}; C.new.a.say; 21:26
camelia (Mu)
gfldex m: role R[$p? = "default"] { has $.a = $p }; class C does R {}; C.new.a.say;
camelia default
gfldex Xliff: they do :)
Xliff gfldex: Thanks! # gfldex++ 21:28
Geth problem-solving/solution-250: 825db3d8b1 | Altai-man++ | solutions/documentation/search-categories.md
Provide a solution document for github.com/Raku/problem-solving/issues/250

  "Documentation search categories are not standartized"
Fixes github.com/Raku/problem-solving/issues/250
21:34 sam21 left 21:38 melezhik joined
melezhik Hi I've a playground for Sparky CI - lightweight CI server written on Raku. Here you can find example projects for some Raku modules. If someone is interested to experiment/play with - let me know ... Sparky could be self - hosted easily and could be a good alternative to Travis that have recently limited support of open 21:41
source projects ...
perry Snazzy domain name. 21:44
21:44 Xliff left
melezhik it's playground so far and the main idea - self-hosted, everyone could spin it up easily ... 21:45
21:50 Altai-man left 21:51 melezhik left
notagoodidea zef 22:10
cog The Rakudo INSTALL.md mentions a parallel test but no parallel build. What is the the incantation with parallel build of MoarVM 22:29
Perl Configure.pl does not help either 22:31
That would translate in make -j win the respective folders 22:36
Solved by setting envier to MAKEFLAGS=-j 22:40
notagoodidea mm, you can't call "nqp" from the REPL? I call "use nqp;" and after ":qp::istrue(True)" return "Could not find nqp::istrue, did you forget 'use nqp;'". 22:44
m: use nqp; nqp::istrue(True);
camelia ( no output )
notagoodidea m: use nqp; say nqp::istrue(True); 22:45
camelia 1
notagoodidea it is with rakudo v2020.12 from rakudo-pkg. 22:46
22:47 Xliff joined 22:48 JRaspass joined
notagoodidea Oh. The import of modules in the REPL is not permanent but only available for the ongoing line. 22:48
"use nqp; say nqp::istrue(True);" works but not spread in two lines. 22:49
is it the expect comportment for the REPL? 22:50
gfldex The REPL got quite a few limits. Raku is a lot less dynamic that it might seem at first. 22:51
notagoodidea May you say more because with a compiled language like OCaml the REPL experience is quite good. 22:55
gfldex Rakudo will use early binding when it can and then inline whereever possible. 22:58
22:58 brtastic left
gfldex If you spread a routine across multiple lines the REPL tries to maintain scope and that is buggy. 22:59
notagoodidea I don't connect the done between this and the limit of the REPL?
oh. 23:00
23:11 pecastro left 23:13 aindilis left 23:17 pecastro joined 23:21 bigdata joined
bigdata Does raku better support ML and other stuff python is good for? 23:38
How does raku compare to python? 23:40
notagoodidea I don't have seen the binding to the usual lib but the use of NativeCall seems to make it easier to build around wrapping and binding to C/C++/Fortran libs. 23:43
The ecosystem is way younger and does not benefit from the same amount of energy put in by the larger python community. 23:44
23:44 aindilis joined, wamba left
notagoodidea But you can call python from raku via Inline::Python 23:44
On the language level, it is very different on the surface and under it. Depends on what you look for in term of usage and in general. 23:45
But if you want to go the ML/Big Data/Heavy Calc, Julia is a better call imho and you can also call Python and R via Julia with similar libs than Inline::Python in Raku. 23:46
bigdata: what do you have in mind?
bigdata i believe you have answered my question
23:47 jess left
notagoodidea Yep after it depends what you call "ML & stuff". 23:48
Whipping PyTorch, Tensorflow etc., I have not seen Raku binding around but I did not look after also (and I am pretty new to the language). 23:49
Crunching some BigInt, I think that when the support for BigInt gonna move from tommathlib to GMP, it is gonna be better. 23:50
23:50 melezhik joined
notagoodidea After, it depends, I used to be on geodata dance and I can easily whip a Postgres+Postgis install put raku in front and play with that. 23:51
Maybe not doing bayesian inferance on gespatial data but besides R, a bit Python and Julia, I don't know any language with enough library to make it easy. 23:52
guifa2 ATM I haven't seen much work done on ML in Raku — but I have a project that in the next year or two will benefit greatly from it, and so I may look to create bindings 23:53
notagoodidea An idea which lib you may target? 23:54
23:55 Kaiepi left, Kaiepi joined 23:57 mowcat left 23:58 dataangel joined