🦋 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:01 melezhik left 00:18 aborazmeh joined, aborazmeh left, aborazmeh joined 00:25 Xliff joined
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
00:32 konvertex left
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
01:05 patrickz left 01:36 molaf left
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
01:50 molaf joined 01:51 pilne left
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
02:05 Manifest0 left 02:06 Manifest0 joined
Xliff Damn. File not found. 02:06
02:07 ensamvarg_g6 joined
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
02:45 poohman joined
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
02:49 aborazmeh left 03:48 Itaipu left 03:51 brtastic joined 03:52 poohman left
elcaro Hey... so can someone explain to me what "relocatable" builds are, and why I would (or would not) want it? 03:58
04:08 xelxebar left 04:10 poohman joined 04:22 xelxebar joined 04:36 flyingtiger left 04:53 poohman left 04:57 Itaipu joined 05:05 brtastic left 05:07 mayuresh joined
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
05:13 mayuresh left, mayuresh joined
mayuresh anyone active? 05:19
i guess not!
see you all after 12 hours.
05:20 mayuresh left 05:27 sauvin joined 05:30 brtastic joined
Geth doc/fix-link: 5b2ff62290 | (Stoned Elipot)++ | doc/Language/list.pod6
Fix link
05:39
doc: stoned++ created pull request #3406:
Fix link
05:43 poohman joined 05:46 sjm_uk joined
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
06:34 jjmerelo joined 06:43 sjm_uk left 06:45 sjm_uk joined
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
07:09 patrickb joined 07:14 cpan-raku left 07:15 cpan-raku joined, cpan-raku left, cpan-raku joined 07:17 jjmerelo left 07:19 Altai-man_ joined 07:40 pecastro joined
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
08:11 jjmerelo joined 08:18 xinming left 08:19 xinming joined, poohmaan joined 08:23 poohman left, ufobat_ left 08:26 sena_kun joined 08:27 Altai-man_ left 08:30 jast joined 08:33 konvertex joined 09:07 Black_Ribbon left 09:19 molaf left 09:21 rindolf joined 09:39 andreoss joined 09:42 sour joined 09:53 xinming left, xinming joined 09:58 ufobat joined 10:25 Altai-man_ joined 10:27 sena_kun left
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`
11:27 evalable6 left 11:28 evalable6 joined 11:33 Kaiepi left, Kaiepi joined 12:01 clarkema joined 12:03 poohmaan left 12:23 abraxxa left 12:26 sena_kun joined 12:27 Altai-man_ left 12:32 sour left 12:37 dpk left 12:38 dpk joined 12:40 sour joined 12:49 thundergnat joined, dpk left 12:50 jjmerelo left
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
12:50 dpk joined 12:51 aborazmeh joined, aborazmeh left, aborazmeh joined
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 ^^^^
12:55 thundergnat left 12:57 Doc_Holliwood left
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
13:21 Doc_Holliwood joined 13:24 vrurg_ joined 13:26 vrurg left 13:28 vrurg joined 13:31 vrurg_ left 13:49 veesh left 13:50 veesh joined 14:10 brtastic left 14:12 harrison joined 14:13 harrison left 14:17 sour left 14:21 aborazmeh left 14:22 poohmaan joined 14:25 Altai-man_ joined 14:27 sena_kun left 14:29 Tirifto joined
cpan-raku New module released to CPAN! Gnome::N (0.17.6) by 03MARTIMM 14:48
14:49 brtastic joined 14:59 MilkmanDan left 15:00 MilkmanDan joined 15:07 MilkmanDan left 15:08 MilkmanDan joined 15:10 jjmerelo joined
cpan-raku New module released to CPAN! Gnome::GObject (0.16.7) by 03MARTIMM 15:11
15:21 sjoshi joined 15:24 sjoshi left 15:25 melezhik joined, sjoshi joined 15:32 sjoshi left 15:40 brtastic left, brtastic joined, melezhik left 15:42 domidumont joined
cpan-raku New module released to CPAN! Gnome::Gtk3 (0.28.4) by 03MARTIMM 15:42
15:46 melezhik joined, Tirifto left
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
16:00 Doc_Holliwould joined 16:02 Doc_Holliwood left 16:04 ensamvarg_g6 left 16:16 Voldenet left
Geth doc: Prince213++ created pull request #3407:
Change .perl to .raku in documents
16:20
16:22 Voldenet joined, Voldenet left, Voldenet joined 16:23 thundergnat joined
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
16:25 poohmaan left
bisectable6 thundergnat, bisect log: gist.github.com/e66698bb55b083a0b5...54f7e57a5b 16:25
thundergnat, (2020-05-07) github.com/rakudo/rakudo/commit/4b...4ac3cf6ec0
16:25 sena_kun joined
thundergnat Hm. Minor breaking change for code in the wild, but I think it was intentional. 16:26
easy fix
16:27 thundergnat left, Altai-man_ left
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
16:44 thundergnat joined
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
16:46 thundergnat left
Dwarf Oh my goodness 16:47
16:47 vike1 left
Dwarf Wait, how did you answer me after joining 16:47
tobs this channel is publicly logged 16:48
Dwarf Thanks, superman 16:49
16:49 chloekek joined
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
16:53 Black_Ribbon joined 16:56 molaf joined
Geth doc: tbrowder++ created pull request #3409:
Modify and clarify routine sprintf details
16:58
17:02 domidumont left 17:21 patrickb left 17:23 patrickb joined 17:24 patrickz joined 17:27 patrickb left
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
17:43 Doc_Holliwould left 17:52 Doc_Holliwould joined 18:13 jjmerelo left, lichtkind joined 18:25 Altai-man_ joined 18:27 sena_kun left 18:29 sauvin left 18:39 skids joined
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
18:49 melezhik left 18:55 molaf left
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
19:13 poohmaan joined 19:21 MasterDuke left
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
19:49 brtastic1 joined 19:51 brtastic left, brtastic1 is now known as brtastic
Geth ecosystem: khalidelboray++ created pull request #493:
Add Zap Module
19:52
19:57 dotdotdot left 20:01 Kaeipi joined 20:02 Kaiepi left 20:05 dotdotdot joined 20:11 vike1 joined 20:15 rindolf left 20:21 poohmaan left 20:23 melezhik joined
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
20:26 sena_kun joined 20:28 Altai-man_ left 20:40 andreoss left 20:43 MasterDuke joined 20:45 chloekek left 21:00 melezhik left 21:11 sjm_uk left 21:19 skids left 21:34 melezhik joined 21:38 brtastic left 21:52 ufobat_ joined 21:56 ufobat left 22:00 sena_kun left 22:07 patrickz left 22:12 brtastic joined 22:34 grumble is now known as rawr 22:41 pilne joined 22:44 melezhik left 22:50 clarkema left 22:56 girafe left 23:21 Sgeo joined 23:25 pecastro left 23:42 lichtkind left