🦋 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.
Xliff \o 00:31
tellable6 2020-05-07T10:50:55Z #raku <MasterDuke> Xliff: looks like the fastest is something like `my Buf $b = <...>; my $ca = CArray[uint8].allocate($b.elems); @$ca = @$b`
hey Xliff, you have a message: gist.github.com/5fdc4d64aae1323e56...76e45de2bd
Xliff Hey all! Long time no type.
I hit it. 400k lines of Raku in 2 years!
drive.google.com/file/d/12j1Dy6zIc...sp=sharing
Personal goal reached.
:)
.tell MasterDuke Ooh! Thanks! 00:32
tellable6 Xliff, I'll pass your message to MasterDuke
Xliff What this means? Hopefully now I will have time between this completion and $dayJob to finish work on the Raku changes I've been working on... LOL 00:38
tigerpaws Supposing I wish to convert some XS module from perl5 to raku. What is the recommended approach? 01:41
Xliff tigerpaws: NativeCall. What modules are you interested in? 01:43
tigerpaws I'm looking at interfacing tensorflow, but that needs google's protobuff. For that, I found code.google.com/archive/p/protobuf-perlxs/. I don't know how old it is, but at worst it might give me a headstart. 02:04
Xliff Looking... 02:05
Xliff Damn. File not found. 02:06
Xliff Found this 02:07
github.com/spiritloose/protobuf-perlxs
tigerpaws Ah. Good catch. I was about to download the source and move it manually to github. It's not so old. I was worried it might be 2008 or something. 02:09
Xliff I think the best bet is to take the XS code and convert it using NativeCall. It's not trivial, though. I tried doing this with libxml2 and it I never finished. 02:10
So it looks like this code needs to be run against something. Do you know what? 02:11
tigerpaws But what I saw of NativeCall (not actually having used it yet) it seems generally simpler than XS. Yes, the code is run against .proto files that specify the interface to google libraries, in my case, tensorflow. 02:12
The protocode is a grammar specifying the interface parameters to the different library functions. I expect to use the tensorflow C library directly, but there are a lot of functions, and they may change, since the api is not yet stable. It's safer for me to use tensorflow's .proto files so I can catch changes as they happen. 02:15
Xliff I think the best thing to do is convert this to a set of NativeCall defs: github.com/tensorflow/tensorflow/b.../c/c_api.h
Do you have examples of the .proto files?
tigerpaws yes. for example, github.com/tensorflow/tensorflow/b...ster.proto 02:17
Xliff Hmmm... I'd have to examine this more closely before I could provide you a strategy. 02:18
tigerpaws But you may be right, maybe I'm better off going directly to the C api and just using the proto files as examples.
Xliff I think so.
If you would like, I'd be happy to help you with this.
tigerpaws There are a lot of protobuf files in that directory. Yes, I would certainly appreciate some help. I'll start by cloning the tensorflow C api. The description for adding new language bindings to tensorflow is minimal, but at least they specify the minimum set of classes we need. 02:21
So I'll start with bare skeletons of all the classes, then see how to fill them in. 02:22
Xliff It's better if you don't use C++ and go straight to the C API.
But go ahead and break things down into classes and we'll touch base. You have my email, right? 02:23
tigerpaws Yes, C++ would require another level of wrappers. What's your email? 02:24
Xliff Check your PMs
tigerpaws ??
Xliff Oh. I never sent it... LOL! 02:25
I just did.
tigerpaws PM=private message? Got it. Thanks.
Let me get a skeleton going. I intend to try to interface tensorflow into raku so we can run tensorflow with native raku vector objects. I'm realtively new to raku, but have over 20 years of perl experience. Now I'd like to help raku get some traction where python runs the world. 02:28
Xliff Excellent! Sounds like a plan! 02:30
Looking forward to working with you. 02:31
tigerpaws I'm also wondering whether having Inline::J (www.jsoftware.com/#/README) might be interesting. It's faster than numpy for matrix stuff. It's an APL offshoot
Trouble is, it's not open source.
It is a C library. 02:32
Xliff Does it have header files?
tigerpaws and the source is available. It has header files.
Xliff As long as we have that, we can use it. We'll just have to be very careful with the licensing issues. 02:33
tigerpaws Those are my two project ideas. J is free for non-commercial use. For commercial use, a license is required from jsoftware.
I haven't seen any place where J has been embedded, so I don't know how it might work. I an sending them an email to find out how receptive they are to the idea, and how it might work. 02:35
Xliff Well, I assume we will start this out as non-commercial and move from there, so the initial work should be covered, yes? 02:36
However an exploratory email is as good idea.
BTW - Here are some of the projects I've been working on, if you are curious: drive.google.com/file/d/12j1Dy6zIc...sp=sharing
Think of that as a CV ... :) 02:37
tigerpaws Great. Your knowledge of spreadheets might come in handy on the data loading side... tensorflow eats data like there was no tomorrow. 02:39
As for J, I was not worried about the non-commercial side, just how much assistance they might be willing to provide (especially if we run into bugs in their library). 02:41
Xliff OK. 02:43
tigerpaws Thanks for offering to help. I'll get back to you as soon as I have a skeleton built on github. Have a good evening! 02:45
elcaro Hey... so can someone explain to me what "relocatable" builds are, and why I would (or would not) want it? 03:58
mayuresh hello. :) 05:07
tellable6 2020-05-09T07:29:20Z #raku <nine> mayuresh: it's quite common for the channel to be quiet when Europe is asleep
mayuresh anyone active? 05:19
i guess not!
see you all after 12 hours.
Geth doc/fix-link: 5b2ff62290 | (Stoned Elipot)++ | doc/Language/list.pod6
Fix link
05:39
doc: stoned++ created pull request #3406:
Fix link
Geth doc/fix-link: c816f08079 | (Stoned Elipot)++ | doc/Language/list.pod6
fix link
05:54
poohman hello all, 06:09
do we have the concept of car and cdr from lisp 06:10
?
for our lists and arrays?
or we should manipulate the arrays with tail or something similar?
guifa2 - wrote a regex for what was needed, but the Intl::Numbers look interesting - will have a look - thanks 06:14
Geth doc: 5b2ff62290 | (Stoned Elipot)++ | doc/Language/list.pod6
Fix link
06:29
doc: c816f08079 | (Stoned Elipot)++ | doc/Language/list.pod6
fix link
doc: fdb6afdaad | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Language/list.pod6
Merge pull request #3406 from Raku/fix-link

Fix link
linkable6 Link: docs.raku.org/language/list
doc: b6c5380990 | (Tom Browder)++ | 12 files
Replace 'RESUME:' with 'OUTPUT:' for consistency

The latest convention for the docs is to show output in examples in this manner:
   ...some Raku code... # OUTPUT: <<...some example output...\n>>
... (21 more lines)
06:32
doc: 3e742e8f2e | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | 12 files
Merge pull request #3405 from tbrowder/indie-output

Replace 'RESULT' with 'OUTPUT:' for consistency
poohman m: my @a=1 .. 10; for @a.kv -> $cnt,$val{for @a.tail(@a.elems-$cnt) ->$t {say $t}} 06:46
camelia 5===SORRY!5===
Shape declaration is not yet implemented; please use whitespace if you meant something else
at <tmp>:1
------> 3my @a=1 .. 10; for @a.kv -> $cnt,$val7⏏5{for @a.tail(@a.elems-$cnt) ->$t {say $t
Malformed parameter
at …
poohman m: my @a=1 .. 10; for @a.kv -> $cnt,$val {for @a.tail(@a.elems-$cnt) ->$t {say $t}}
camelia 1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
3
4
5
6
7
8
9
10
4
5
6
7
8
9
10
5
6
7
8
9
10
6
7
8
9
10
7
8
9
10
8
9
10
9
10
10
poohman in the above example do we have an idiomatic way or a simpler way than using @a.tail(@a.elems-$cnt)?? 06:47
guifa2_ poohman: hmm... 06:51
Are you needing the elements like that, or just wanting a list of lists? 06:52
(e.g., (1..10), (2..10), (3..10), etc)
poohman list of lists I guess 06:53
want it for recursion
just like cdr in lisp 06:54
guifa2_ doesn't know lisp so .... hopefully he can help 06:56
I would do this
m: my @a = 1..10; for ^@a -> $c { .say for @a.tail(@a - $c) } 06:57
camelia 1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
3
4
5
6
7
8
9
10
4
5
6
7
8
9
10
5
6
7
8
9
10
6
7
8
9
10
7
8
9
10
8
9
10
9
10
10
guifa2_ theoretically you shoul dbe able to do @a.tail(* - $c) but for some reason it's not taking. 06:58
Kaiepi m: my @a = (1..10); for @a -> $c { .say for @a.skip: $c } 07:50
camelia 2
3
4
5
6
7
8
9
10
3
4
5
6
7
8
9
10
4
5
6
7
8
9
10
5
6
7
8
9
10
6
7
8
9
10
7
8
9
10
8
9
10
9
10
10
Kaiepi m: my @a = (1..10); for @a -> $c { .say for @a.skip: $c - 1 } 07:51
camelia 1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
3
4
5
6
7
8
9
10
4
5
6
7
8
9
10
5
6
7
8
9
10
6
7
8
9
10
7
8
9
10
8
9
10
9
10
10
Altai-man_ .tell AlexDaniel` 2020.02.1 was very, very ad-hoc and I'm a bit surprised it's a single issue. Glad we even made it and glad dyncall folks now test on musl before releasing a new version. :) 11:21
tellable6 Altai-man_, I'll pass your message to AlexDaniel`
thundergnat bisectable6: 2020.20 say $_, ', ', +$_ for |(^0x0FFF).grep( { .chr ~~ /<:Nd>/ and .unival == 1|2|3 }).batch(3)».chr».join; 12:50
bisectable6 thundergnat, On both starting points (old=2015.12 new=b874c68) the exit code is 1 and the output is identical as well
thundergnat, gist.github.com/9374406b3cc647a55f...3d580ed162
thundergnat bisectable6: old=2020.20 new=HEAD say $_, ', ', +$_ for |(^0x0FFF).grep( { .chr ~~ /<:Nd>/ and .unival == 1|2|3 }).batch(3)».chr».join; 12:52
bisectable6 thundergnat, Cannot find revision “2020.20” (did you mean “2020.05”?)
thundergnat ARGH
bisectable6: old=2020.02 new=HEAD say $_, ', ', +$_ for |(^0x0FFF).grep( { .chr ~~ /<:Nd>/ and .unival == 1|2|3 }).batch(3)».chr».join;
bisectable6 thundergnat, Bisecting by exit code (old=2020.02 new=b874c68). Old exit code: 0
thundergnat, bisect log: gist.github.com/c927fb1991f1f9e6f0...2d437439b7
thundergnat, (2020-05-12) github.com/rakudo/rakudo/commit/a0...eb75db2b30
thundergnat Submitted as R#3694 12:55
linkable6 R#3694 [open]: github.com/rakudo/rakudo/issues/3694 Unicode numeric digit strings no longer coercible to Numeric
thundergnat lizmat ^^^^
cpan-raku New module released to CPAN! IRC::Client::Plugin::DiceRolls (0.0.0) by 03TYIL 12:58
New module released to CPAN! IRC::Client::Plugin::NickServ (0.3.0) by 03TYIL 12:59
New module released to CPAN! Grammar::DiceRolls (0.1.0) by 03TYIL
New module released to CPAN! Log::Simple (0.1.0) by 03TYIL 13:00
New module released to CPAN! Log (0.1.0) by 03TYIL
donaldh_ m: (^25).map: ('A'..'Z').List.rotate(*) 13:06
camelia Type check failed in binding to parameter '$rotate'; expected Cool but got Whatever (*)
in block <unit> at <tmp> line 1
donaldh_ I don't understand why that doesn't work.
m: (^25).map: -> $n { ('A'..'Z').List.rotate($n) }
camelia ( no output )
lizmat donaldh_: how much would you want to rotate ? 13:07
donaldh_ 0, 1, 2, ...
lizmat aaah...
* is NOT the same as { $_ }
m: (^25).map: ('A'..'Z').List.rotate(* + 0) 13:08
camelia Type check failed in binding to parameter '$rotate'; expected Cool but got WhateverCode (WhateverCode.new)
in block <unit> at <tmp> line 1
donaldh_ But you can use whatever * with map, right?
cpan-raku New module released to CPAN! Log::Colored (0.1.0) by 03TYIL
New module released to CPAN! Log::JSON (0.1.0) by 03TYIL
lizmat m: (^25).map: { ('A'..'Z').List.rotate($_) }
camelia ( no output )
donaldh_ Hmm, why does that work when this doesn't.. 13:09
m: (^25).map: ('A'..'Z').List.rotate($_)
camelia Type check failed in binding to parameter '$rotate'; expected Cool but got Any (Any)
in block <unit> at <tmp> line 1
cpan-raku New module released to CPAN! Gnome::N (0.17.6) by 03MARTIMM 14:48
cpan-raku New module released to CPAN! Gnome::GObject (0.16.7) by 03MARTIMM 15:11
cpan-raku New module released to CPAN! Gnome::Gtk3 (0.28.4) by 03MARTIMM 15:42
melezhik rba looks like I successfully run small instance in aws 15:47
even though aws told me that my free tire is not eligible to run small instance, it still made it
probably it is now charged by org billing account 15:48
I am going to terminate it and run under ubuntu, accidentally picked red hat 15:49
tigerpaws I've converted the tensorflow headers, but they are full of 'typedef struct TF_SessionOptions TF_SessionOptions;' and this is refused by NativeCall (after being converted by APP::GPTrixie). Isn't this just an opaque type? How do I represent that for NativeCall? 15:50
timotimo there is a difference between "struct TF_blah" and "TF_blah"
in that you can't write "TF_blah my_var" 15:51
you'd have to write "struct TF_blah my_var"
for some reason
and you get around that by creating a typedef
so whenever you write TF_blah it substitutes struct TF_blah for you
tigerpaws It's been a long time I've done any C. So how do I make NativeCall accept that? raku says: Class TF_SessionOptions has no attributes, which is illegal with the CStruct representation. 15:54
timotimo you'd want to toss out all the empty ones
though you may need to forward-declare a bunch of classes
so maybe just turn them into stubs by putting ... into the body
tigerpaws There are a lot of them. I thought they were just opaque structs, so they would still be structs, but on raku's side we would never deal with their internals. 15:55
Geth doc: Prince213++ created pull request #3407:
Change .perl to .raku in documents
16:20
thundergnat bisectable6 2020.02 say [0,1,2,3,4,5], *.rotate(-1) … !*.tail; 16:24
AlexDaniel` needs a : 16:25
thundergnat ah
bisectable6: 2020.02 say [0,1,2,3,4,5], *.rotate(-1) … !*.tail;
bisectable6 thundergnat, Using old=2020.02 new=HEAD in an attempt to do what you mean
thundergnat, Bisecting by exit code (old=2020.02 new=c2e8b22). Old exit code: 0
bisectable6 thundergnat, bisect log: gist.github.com/e66698bb55b083a0b5...54f7e57a5b 16:25
thundergnat, (2020-05-07) github.com/rakudo/rakudo/commit/4b...4ac3cf6ec0
thundergnat Hm. Minor breaking change for code in the wild, but I think it was intentional. 16:26
easy fix
AlexDaniel` Altai-man_: colabti.org/irclogger/irclogger_lo...05-15#l317 16:28
tellable6 AlexDaniel`, I'll pass your message to Altai-man_
Dwarf I couldn't find this on docs.raku.org/language/variables, but what does | do in front of a variable? 16:41
thundergnat Dwarf: | creates a Slip. Basically turns a collection into a list rather than a single entity. 16:45
m: say ^10
camelia ^10
thundergnat m: say |^10
camelia 0123456789
Dwarf Oh my goodness 16:47
Dwarf Wait, how did you answer me after joining 16:47
tobs this channel is publicly logged 16:48
Dwarf Thanks, superman 16:49
Dwarf I wonder where to find that in the documentation so I can read more about these. I know + casts to an Int etc but slips are new to me 16:51
rba is curious about what melezhik is doing with RakuDist
tellable6 2020-05-14T15:44:26Z #raku-dev <patrickb> rba Prebuilt releases of rakudo for 2020.05.1 are available for download from rooster.uber.space/patcloud/index....EJLQDZcjbf (as always). Can you upload to rakudo.org? Thank you!
rba patrickb: Huch, good reminder. Will upload later today! 16:52
Geth doc: tbrowder++ created pull request #3409:
Modify and clarify routine sprintf details
16:58
Geth doc: a243338e1d | (Tom Browder)++ | doc/Type/independent-routines.pod6
Modify and clarify routine sprintf details

File affected:
  + doc/Type/independent-routines.pod6
17:28
doc: 1e0c2583b2 | (Juan Julián Merelo Guervós)++ (committed using GitHub Web editor) | doc/Type/independent-routines.pod6
Merge pull request #3409 from tbrowder/sprintf

Modify and clarify routine sprintf details
linkable6 Link: docs.raku.org/type/independent-routines
jdv79 m: sub s(Str:D $a?){}; s(); 18:47
camelia Parameter '$a' of routine 's' must be an object instance of type 'Str', not a type object of type 'Str'. Did you forget a '.new'?
in sub s at <tmp> line 1
in block <unit> at <tmp> line 1
jdv79 i don't get that 18:48
its optional but its not...
if that's the case how does one do MMD involving an optional but defined arg? 18:49
MasterDuke m: multi sub a(Int:D $b?) { say "optional" }; multi sub a() { say "none" }; a(); a(2); a(Int) # seems to work when you do have multis 19:00
camelia none
Cannot resolve caller a(Int:U); none of these signatures match:
(Int:D $b?)
()
in block <unit> at <tmp> line 1

optional
lizmat jdv79 $a? is syntactic sugar for $a = Any 19:02
or actually $a = Str in this case
m: dd Str ~~ Str:D 19:03
camelia Bool::False
lizmat jdv79: one does not, afaik
jdv79 hm, ok 19:36
[Coke] m: sub s(Str:D $a=""){}; s(); 19:39
camelia ( no output )
[Coke] ^^ you could flip it a bit and give it an empty string as a default
Geth ecosystem: khalidelboray++ created pull request #493:
Add Zap Module
19:52
Geth ecosystem: 68ce775c36 | (Khaled Mohamed Elborey)++ (committed using GitHub Web editor) | META.list
Add Zap Module
20:25
ecosystem: 7c82d01dc7 | (Elizabeth Mattijsen)++ (committed using GitHub Web editor) | META.list
Merge pull request #493 from khalidelboray/patch-1

Add Zap Module