🦋 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 vrurg: Nice work on the COERCE changes. I'm curious, however: will the old method still work? 00:35
It will be a while before I can move my existing code over to the new method so just wanted to make sure.
guifa Xliff: it should. the COERCE is a last resort 00:38
so it’ll try first Foo.Bar, and then try Foo.COERCE(Bar)
Xliff guifa++
And does it handle the limited coercion format? 00:39
method foo (Bar(Cool) $a) { ... }
Although technically, that type check could be performed on .foo() 00:40
guifa with that, if you passed in a Cool, it would first do Cool.Bar, then Bar.COERCE(Cool), then lastly Bar.new(Cool) 00:44
That last one I suppose in *theory* could break existing code in some weird edge case, but it’s also following the original design docs 00:51
guifa doesn’t know how much more of this templated out coding he can stand. But will totally be worth it when it’s done 00:53
Geth ecosystem: littlebenlittle++ created pull request #563:
Add Stache to ecosystem
02:10
Geth doc: d7de693342 | (Stoned Elipot)++ | doc/Type/Thread.pod6
Use code formatting
07:19
linkable6 Link: docs.raku.org/type/Thread
jmerelo Don't know if this will affect us www.docker.com/blog/rate-limiting-...e-numbers/ Not for the time being, I guess, but it might in the future. 07:46
El_Che jmerelo: it will
it just take a few CI's
jmerelo El_Che: Well, a hundred in 6 hours. I would have to check on the repositories I know, but most of them have not even reached 100 pulls yet. 07:50
El_Che: this reached 6000 hub.docker.com/r/jjmerelo/perl6-doccer/, but it goes up to a couple of pulls a day at most 07:51
El_Che: this one, hub.docker.com/r/jjmerelo/alpine-raku, less than 2K. Maybe if the language becomes incredibly popular, it will. But by using specialized containers, I don't think this will become a problem in the foreseeable future. 07:52
jmerelo The main problem I see is that limits are _on the user_, not on the repository. So we'll need to see how that affects CI. Will all Travis users be considered the same? 08:00
jmerelo Ah, I see here it's based on the individual IP adress... www.docker.com/blog/scaling-docker...rk-egress/ Meaning all Travis users will share their allotment of pulls? 08:01
Well... apparently, yes docs.travis-ci.com/user/docker/ 08:03
jmerelo quietly curses the whole situation. But I guess it's only fair. 08:04
El_Che it's a gracious way to shut it dowm 08:26
the free part
Geth ¦ problem-solving: JJ assigned to codesections Issue There's no effective way to communicate something to all people with commit bits in the different Raku repos and organizations github.com/Raku/problem-solving/issues/246 08:41
El_Che jmerelo: in case I didn't congratulate you with the rsc role: cheers 09:38
tyil lizmat: good news, my comment yesterday not knowing when I'd be going to the office is invalid, I'm at my work office today 09:39
lizmat wow!
tyil so I'll be getting the CLA signed and scanned this afternoon, I hope 09:40
lizmat :-) 10:05
El_Che the CLA sounds like adding people to your will 10:36
:)
moritz one CLA to rule them all, and in the darkness to bind them! 11:26
El_Che it's kind of a faustian deal :) 12:16
Zero_Dogg Is it safe to call a NativeCall imported function, where an option was int32, with a raku-native int? Ie. will rakudo cast it to a proper int32 (or throw if it's outside its range)? 13:13
tib Hello, I wrote something that could maybe fit into the advent calendar. Somebody here to review it ? 13:14
good to know : 1. I'm total raku noob 2. I'm not native english speaker 3. It's about profiling/perfs 13:16
but you probably already know this :) 13:17
timotimo Zero_Dogg: it should work. i assume it would truncate, but you can expose the actually native sub via a sub that does a range check on a full Int
Zero_Dogg timotimo: nod, it's a quick and dirty import of kill(3) so I'm not using any time on writin proper wrappers for it, just wanted to make sure I'm not doing something completely wrong, I'm calling it with what I know to be a valid PID and the number literal for the signal 13:21
timotimo it's not working? 13:28
strace may be worth a try
Zero_Dogg It's working just fine. Just wanted to ask to make sure it's not just working by chance and isn't about to break in surprising ways because I'm misunderstanding the interface somehow :) 13:31
timotimo OK 14:02
gfldex tib: lizmat tends to pick the nits out of mine. 14:33
tib: did you write it already? 14:34
tib yes, it's almost ready for publication, but I'm not sure if it deserves anyway :D 14:36
gfldex it's more about the spirit then correctness 14:37
tib yes
gfldex tib: I could have a look later today. As Santas time machine technican I'm well qualified. 14:42
tib what is your github username ? 14:44
gfldex gfldex
tib added to repo, this is the README.md, there is another (french) article (about Raku also), just ignore it :) 14:46
tbrowder hi, #raku ppl 14:56
i need some help with a class i'm trying to design 14:57
my simplest one is a "field" which has a starting x position which must be defined at construction 14:59
tbrowder it also has an ending postiion called "urx" and a "width", one of which is required at construction and the other will be defined by the two now-defined other attrs 15:02
tbrowder i will need a BUILD sub, and all three attrs will have $! twigils. 15:05
so the question is how do i describe the BUILD sub? 15:06
tbrowder my shot at signature "submethod BUILD(:$x, :$urx, :$w)" 15:08
ben_ You can assign directly to private class attributes with `submethod BUILD(:$!arg1, :$!arg2) {}`. A constructor would return `self.bless(arg1 => 'foo', arg2 = 'bar')`
**arg2 => 'bar` 15:09
tadzik tbrowder: I think it may be easier to hehe build in your new() method 15:10
tbrowder yes, but i want to delay until i know what is provided so i can calculate the other (this is a geometric object)
tadzik see if you got at least 2 things, die if not, and if you did, calculate the 3rd and pass all 3 to bless()
ben_ You can also add valdiators to your private class attributes using a `where` clause. 15:11
tbrowder hm, can't i do that inside the submethod BUILD?
look at this BUILD sig: (:$x!, :$urx, :$w) 15:13
then i do the necessary stuff inside. shouldn't that work? 15:14
why would i need bless?
ben_ In this case $urx and $w would be optional private arguments. You can still access $!urx and $!width in the body of the block
bless is called by within a constructor to generate the class instance. When the instance is build, BUILD is called to populate the newly-minted instance's private attributes. 15:15
From my understanding! 15:16
tbrowder ok, given my case, is there any advantage of going the "new" route instead of the BUILD route (except i think the "new" route causes trouble with subclassing)
ben_ for example the body of the built in `new` constructor just something like `return self.bless(...)` 15:18
tbrowder or i could use TWEAK?
ben_ I have never used TWEAK myself. I think it's just another routine that is called during the lifecycle of an object, though. 15:19
tbrowder all right, thanks ben_ and tadzik, enough to press on, back if i get stuck 15:20
bye
ben_ good luck!
tadzik tbrowder: I think the advantage of using new() over BUILD here is that you can more explicitely describe what you actually mean to do. Maybe because I have really no clue how you could do that in BUILD though :P 15:21
new() just seems like a fitting place to turn the arguments into attributes
but take what I say with a grain of salt, I'm a known hater of this model ;) 15:22
see www.youtube.com/watch?v=783CBT1r1DU
xinming SmokeMachine: What is the right way to do many to many relationship? Or, we just write methods, and filter them ourselves? 15:44
kawaii xinming: I did something like this www.irccloud.com/pastebin/GJzG640d/ 15:46
xinming kawaii: Thanks, will check 15:47
jmerelo tib: create a PR in the repository, I'll take a look. 15:48
xinming kawaii: This is what I'm doing now too, but I wish something more native way.
jmerelo .tell tib create a PR in the repository, I'll take a look.
tellable6 jmerelo, I'll pass your message to tib
xinming m: package A { class B { }; class B::C { } }; B.raku.say 16:04
camelia A::B
xinming kawaii: Your example reminds me this. Is this a bug?
I think that namespace B should be within A, Not register them globally.
lizmat m: package A { my class B { }; my class B::C { } }; B.raku.say 16:05
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
B used at line 1
patrickb jmerelo: The documentation isn't updated automatically anymore, right? Can you trigger a rebuild?
xinming m: package A { class B { }; }; B.raku.say 16:11
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
B used at line 1
xinming lizmat: Then, why in this example, B is not defined? 16:11
I'm actually confused about the inconsistency here.
m: package A { class B { }; my class B::C { } }; B.raku.say 16:12
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
B used at line 1
SmokeMachine xinming: it’s not yet implemented, but planes... 16:12
xinming SmokeMachine: Ok, Will use hand written version. 16:13
SmokeMachine *planed
SmokeMachine xinming: I’ll add a new issue explaining my thoughts about the syntax of many-to-many 16:14
jmerelo patrickb: it's not been updated automatically since the old infrastructure burned down... 16:17
I'll do it now
patrickb jmerelo: That's a fast reply! Thank you!
ben_ Is there a builtin for converting a list of Str into a filesystem path?
jmerelo ben_: append .IO 16:20
jmerelo m: say "/tmp".IO.raku 16:20
camelia IO::Path.new("/tmp", :SPEC(IO::Spec::Unix), :CWD("/home/camelia"))
ben_ For example I have `('A', 'B', 'C')` and I want to produce 'A/B/C/' on unix and 'A\B\C' on nt 16:22
tobs m: say $*SPEC.catfile(<A B C>) 16:28
camelia A/B/C
tobs ben_: ^ it's inside the $*SPEC object, didn't see it exposed through IO::Path
tbrowder tadzik: nice talk.have you done something like that for raku? i mean demo
tobs $*SPEC provides an interface to the filesystem operations that should work on the current host. If you need others, I think you can instantiate IO::Spec::* objects according to demand. 16:29
tbrowder *demo yr preferred approach in raku? 16:30
tobs m: say IO::Spec::Win32.catfile(<A B C>)
camelia A\B\C
ben_ @tobs thanks that was what I was looking for!
tadzik tbrowder: no, unfortunately not 16:33
jmerelo patrickb: still trying. I had a trusted installation I knew worked, it no longer does. I'm going to try again my other laptop, which I know it works. At the same time, tryhing latest version of Raku 16:48
Oh that h... 16:49
lizmat xinming: sorry, was afk& 16:51
my package A { our class B { } }; dd A::B # our shows makes it visible, and it's inside, so A::B 16:52
evalable6 A::B
lizmat my package A { class B { } }; dd A::B # the default scope for class is "our", so this is also A::B
evalable6 A::B
lizmat my package A { my class B { } }; dd A::B # my limits the visibility to inside the A package, so outside of it, we cannot see it 16:53
m: my package A { my class B { } }; dd A::B # my limits the visibility to inside the A package, so outside of it, we cannot see it
camelia Could not find symbol '&B' in 'A'
in block <unit> at <tmp> line 1
tib jmerelo : ok I get your message :) I will wait for the pre-review from gfldex before to know if it "fits the spirit" 16:54
tellable6 2020-11-18T15:48:20Z #raku <jmerelo> tib create a PR in the repository, I'll take a look.
jmerelo tib: the spirit this year is that we would like them to be as beginner (as in no exposition to Raku) as possible. Seasonal references are appreciated, but really not needed. 17:01
patrickb: OK, done. Check out, for instance, the new docs.raku.org/type/IO::Path::Parts 17:04
(might not be there if the CDN has not caught up yet)
Hum, typegraph is missing... 17:05
OK, will have to try that for next...
holyghost I've found my mongbat wizard 3D model back, I am writing a 3D scenekit game. I hope I can use the model later on for pagan : github.com/theholyghost2/pagan, my game engine in the works 17:34
pagan is written in raku 17:35
holyghost The scenekit game is a 3D version of an adapted NES solstice game 17:37
The quest for the staff of Demnos
too bad free models are hidden on the net, seems pricey sometimes 17:38
but then again it kills the artists work 17:39
So I better watch out when I put it into a raku module
Problem is pagan needs 3D acceleration, and I am a bit behind on that since X11R6 17:43
the older version had none
wayland I dunno, but I better use a GL system I guess
There's SDL2 in it for now
moon-child I used c for gl, and then nativecall'd from a raku runner 17:45
holyghost I hope Xliff can help out later on, if he finds the time
moon-child : ok 17:46
There'd better be a module, which I am not going to do myself, I have too much work already for that
moon-child problem is that all the low-level 3d apis are *really annoying* to deal with. (From any language.) So you may have better luck with something like ogre3d
holyghost true 17:47
moon-child gl is fairly easy to wrap, as it's all integer constants and floating arrays; and you can generate bindings from the xml spec
holyghost sure, ogre is pretty cool compared to GL
and there's more support e.g. there's a FreeBSD package 17:48
moon-child there's also a freebsd package for opengl... 17:49
(two, actually)
holyghost anyway, I have a floor made up of cubes with a monkey/mongbat character in Xcode 10.14. Now I need to make it move 17:50
moon-child : mesa and ?
moon-child nv 17:51
holyghost ah ok
which is nice :-)
The mongbat has a red wizard hat on it with some white stripes then has a purple body 17:52
I also have a mongbat's quest game in the works, but this one will be called Solstice3DX 17:53
with X being something else
ok, I am a bit afk now, will try to alleviate the models and code tomorrow 17:54
patrickb jmerelo: Looking very good, thank you! Also my rewrite of the object construction docs is now online :-) 18:00
tbrowder: I have recently rewritten the object construction documentation with the aim to be a lot more obvious and clearer. If you want you could have a look. (I do value feedback :-) (docs.raku.org/language/objects#Obj...struction) 18:03
tbrowder .tell tadzik maybe you should write a Moose for raku, call it RakuMoose or RMoose or Bison or Elk
tellable6 tbrowder, I'll pass your message to tadzik
patrickb tadzik: ^ Maybe also an interesting read for you.
tadzik patrickb: oh, definitely, thanks :) 18:04
lizmat tbrowder: what would Moose bring to Raku that it doesn't already have ?
tadzik tellable6: why didn't you tell me anything :o
tellable6 tadzik, I'll pass your message to why`
tadzik 3>:( 18:05
tbrowder: I think I'm done with writing animal-named things for a while ;P
tbrowder oh, maybe nothing, but tadzik's talk on moose i think has some applicability to raku, but patrickb's docs may help...going there now. 18:06
tbrowder patrickb's doc is better, but i think tadzik's position was toward an easier cookbook-like approach. just my two cents. 18:19
tadzik well, I just don't like the overreaching (imo) has design, regardless of how it's documented
`has` design *
tbrowder i
anyhoo, this has been very helpful for my current project, thanks! 18:20
the project btw is to provide a way to describe pdf forms' empty fields so dwarring's pdf classes can be used to fill them. the use case is for us irs forms and and it will include a cvs2txf converter for direct input to some us tax software. 18:24
the module is currently named TXF 18:25
the module should be able to be used for any pdf form that needs filling programmatically 18:27
pkmnx I was looking at the "most wanted modules" list ... 19:02
pkmnx github.com/Raku/raku-most-wanted/b...modules.md 19:03
pkmnx and it said: 19:03
These are the most-wanted pure Raku modules (as opposed to native library bindings). ...
... and then it named:
"Graphics::Magick (port of Perl version)" ...
...
but, fundamentally, the perl version wraps: 19:04
...
libGraphicsMagick.so.3 19:05
and to get this into raku, I would think one would use native call ...
... but i thought to ask here to see if there was some other way that I don't now about ... 19:06
melezhik .tell tyil I have this error (probably on the latest version of Hash:;Merge) - gist.github.com/melezhik/6a0a037c7...e43d26c86d 19:07
tellable6 melezhik, I'll pass your message to tyil
pkmnx i mean, I guess you could say it wraps: 19:11
./lib/x86_64-linux-gnu/perl5/5.30/auto/Graphics/Magick/Magick.so
for example ...
melezhik .tell tyil I am doing this github.com/melezhik/Sparrow6/commi...0516e072b0 as temporary remedy
tellable6 melezhik, I'll pass your message to tyil
melezhik it helped 19:17
melezhik if someone is interested I've start an alpha version of RakuPlay - rakudist.raku.org/play/ - a service to run Raku code under different Rakudo versions with Raku modules installation support 20:02
it'd be useful if someone want to give their code, modules for a spin and share results with other people 20:03
pkmnx ok ... no answer ...
I'll look for some answer elsewhere ... 20:04
melezhik here is an example of running HTTP::Tiny - raw.githubusercontent.com/melezhik...kuplay.png cc jjatria 20:07
rakudist.raku.org/sparky/report/RakuPlay-2/1310 20:09
JJAtria[m] melezhik: Cool! :D 20:14
ctilmes pkmnx: I worked on GraphicsMagick a while back -- let me know if you want to take a look at what I did. 20:21
tellable6 2020-07-22T20:58:33Z #whateverable <Xliff> ctilmes Have you figured out a way of using C function pointers from Raku? Hope things are going OK with you! TIA
melezhik twitter.com/melezhik2/status/13291...6795111425 RakuPlay teaser on twitter 20:32
I might bring it to a dedicated DSN name, it shares a rakudist host so far ... I am just poor with resources :] 20:33
Geth advent/authors-kaiepi: 0951e06bc7 | (Ben Davies)++ (committed using GitHub Web editor) | raku-advent-2020/authors.md
Add Kaiepi as an author

Just about all the Raku I write nowadays is typed. How to leverage Raku's type system is something I struggled with initially, so I figure an advent article on some strategies I use when typing my code would be helpful for others interested in doing this.
20:50
advent: Kaiepi++ created pull request #65:
Add Kaiepi as an author
20:51
pkmnx cltimes ... 20:56
sure ... I"m just looking at some quite basic definitions, to see if I'm even up for the task ...
trying to determine what is meant.
Graphics::Magick isn't a part of CPAN, but rather one yanks the distro and builds and installs from a local ... 20:57
there's a so, libMagick... 20:58
and then there's the Magick.so, created from xs ...
so, I guess, what is being asked for, from the raku "wanted modules" perspective is something that sits on top of that Magick.so work ? 20:59
and not a more lower level thing that hits libGraphicsMagick.so.3 ... 21:00
?
so, in brief, I'm just trying to understand the ask.
from the "wanted modules" perspective ... 21:01
...
then we can get into the programming details ...
ctilmes pkmnx: Mine is a 'lower level thing that hits libGraphicsMagick.so.3" 21:08
SmokeMachine xinming: I think one of the best ways of doing many-to-many currently is something like this: www.irccloud.com/pastebin/JuWHQ0x7/
ctilmes I'll try to clean it up a bit and publish a work in progress. I ran into some problems and just walked away from it for a bit. It still needs a lot of clean up. 21:09
But it does make it really easy to do some of the basic 'convert' type stuff
I don't have all the drawing functions implemented yet
reading/writing an image in all the formats, resizing, chop, coalesce, crop, deconstruct, flatten, flip/flop, mosaic, roll, shave, noise, blur, convolve, despeckle, edge, emboss, enhance, sharpen, charcoal, colorize, implode, oil-paint and more 21:12
tyil melezhik: yes, that's probably because there's a backwards incompatible Hash::Merge:ver<2.0.0> now 21:17
tellable6 2020-11-18T19:07:11Z #raku <melezhik> tyil I have this error (probably on the latest version of Hash:;Merge) - gist.github.com/melezhik/6a0a037c7...e43d26c86d
2020-11-18T19:11:50Z #raku <melezhik> tyil I am doing this github.com/melezhik/Sparrow6/commi...0516e072b0 as temporary remedy
melezhik yeah
tyil 1.0.0 still works just fine, for the most part
melezhik yes, this is why I froze it in Sparrow6 meta
tyil I found a small bug, and decided to just rewrite it to my latest preferences, since it's a very small module :p 21:18
alright, that should solve it for now then :D
it was one in many dependencies for getting App::Assixt into the current-year, I hope to be spending next weekend for the finishing touches :D
melezhik sure 21:19
tyil (I plan to make App::Assixt also pin on a specific version number for dependencies (and auth, api) in the future, for exactly this reason, tbh) 21:20
regardless, I'm glad that a version pin solved your issue
pkmnx cltimes - why do they say they want, on the modules wanted page 21:25
not a native call library ? 21:26
I don't understand why they wouldn't want that, in this case ?
pkmnx ... unless, they are looking to replace, as much as possible, the code from Graphics::Magick ...and would like a drop in ? 21:26
... but that's the nature of my questions, I think ... not technical, really ... but motivationally - so as to understand what is needed ... 21:27
[Coke] do we know who added that ask to the most wanted? You could ask them to clarify 21:45
pkmnx Coke - yeah, I was thinking that. 21:46
I was reading the history but maybe should just hit the git blame & see if I can find out directly ... 21:47
pkmnx I was kicked off, but, Coke, it was lizmat who penned the ask. 21:53
pkmnx so, I'll just ask there. 21:53
cltimes, can you send me your email & I'll write liz & cc you ... 21:54
?
[Coke] ok. she may have added it for someone else, just to level set.
pkmnx "level set" ?
www.netlingo.com/word/level-set.php 21:59
Geth advent: 0951e06bc7 | (Ben Davies)++ (committed using GitHub Web editor) | raku-advent-2020/authors.md
Add Kaiepi as an author

Just about all the Raku I write nowadays is typed. How to leverage Raku's type system is something I struggled with initially, so I figure an advent article on some strategies I use when typing my code would be helpful for others interested in doing this.
22:28
advent: ece2776935 | Altai-man++ (committed using GitHub Web editor) | raku-advent-2020/authors.md
Merge pull request #65 from Raku/authors-kaiepi

Add Kaiepi as an author
Geth advent: pheix++ created pull request #66:
Add pheix as an author
23:12
Kaiepi .tell jmerelo, i can be reached most reliably with a ping on irc 23:26
tellable6 Kaiepi, I'll pass your message to jmerelo
SmokeMachine .tell xinming any suggestions about this? github.com/FCO/Red/issues/454 23:57
tellable6 SmokeMachine, I'll pass your message to xinming
patrickb .tell rba I just created a new rakubrew release (v14). Can you upload the files? (rooster.uber.space/patcloud/index....JLQDZcjbf)
tellable6 patrickb, I'll pass your message to rba
patrickb is off to bed
SmokeMachine kawaii: any suggestion about this? github.com/FCO/Red/issues/454 23:58