🦋 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.
guifa2 .tell notagoodidea RakuAST will let me create compiled-ish code without using EVAL, and interact much better with existing pblocks, etc, 00:26
tellable6 guifa2, I'll pass your message to notagoodidea
tbrowder hm, i have Pod::To::Markdown as dependency in META6.json and it's not being found in github testing 02:48
sortiz tbrowder, According to its META6 data you can found it at github.com/softmoth/perl6-pod-to-markdown 04:23
samebchase- ] 04:51
guifa2 [ 05:02
tbrowder sortiz: but i don't know why zef isn't finding it. it is supposed to be in the non-cpan ecosystem. 11:00
tellable6 tbrowder, I'll pass your message to sortiz
pilne so, since i lurb prolog so much, but prefer to do non-prolog stuff, not in prolog :D i can... (ab?)use inline::perl5 to use the perl5 module "AI::Prolog"???? (and work towards a possible 100% raku implimentation if i feel froggy?) 13:09
or avoid the GIL-concurrency woes of.... other languages by using inline::otherlang? 13:10
tbrowder some advice, please: eventually i will need some binary java or c or c++ prog installed for a module. the source is in java. to start with, can the Build.raku take care of the work required (extract source from resources, compile, and install on the local host)? 13:12
(but i plan to convert java to c++ and use native call) 13:14
pilne: i have been using perl modules successfully with raku. 13:15
pilne raku just feels like a "get shit done" kinda language 13:17
guifa2 pilne: that's a pretty good way to put it. 13:58
tonyo tbrowder: depending on what you need, zef can handle some non-raku dist depends - github.com/ugexe/zef/blob/eedccd49...sing.t#L19 14:17
tonyo i don't recall how much of warthog was originally put in there - a lot of it is based upon github.com/tony-o/p6-warthog 14:20
tbrowder tonyo: thnx! 14:22
guifa2 tbrowder: it should be able to. IIRC you just put a Build.pm6 in the root directory of the module, and you can run whatever commands you need to there. But I haven't done anything with that yet (the only C code I use is a resource in a pre-build process) 14:28
tonyo tbrowder: the `native` flag from the original didn't make it's way into zef's s:q
vrurg tonyo: fez gives me LTA error 'wget error'. Nothing else besides it. For the same reason, I think, the module is not indexed and I get emailed back with 'panic caught'. Again, no details. 14:29
tonyo: Unfortunately, I have a meeting right now, won't be able to diagnose it better until later today. 14:30
tonyo vrurg: are you on 15? i pushed a bunch of fixes for some of that yesterday or the day before
i'm just starting my day so will be around to chat after your meeting
tbrowder i have used a Makefile in Build.raku and it seems to work fine. i’ll just get the Makefile working and the see what happens. 14:31
vrurg Ah, updates to 16 now. Will check.
oddp Wut, since when is this multi-dim slicing/accessing working? @foo[a..b; c..d] 14:34
Sweet!
#AreWeJuliaYet 14:36
guifa2 oddp: that's been around for a while actually, although lizmat made it go lightning fast recently 14:38
vrurg tonyo: fez 16 doesn't result in wget, but I still get 'Meta error: panic caught' from zef on email. 14:39
oddp Thought I tried that half a year ago and it spewed errors.
tbrowder another question: will any binary found in a module's ./bin dir work when installed by zef? e.g., a compiled java prog? 14:46
java cli prog?
probably not... 14:47
tbrowder ah, but one in ./resources i think can be called by the installed repo, and its subs and methods, maybe that's the answer! 14:50
or not...
guifa2 tbrowder: in a pinch you can always put it in the resources and grab the path to the file
tbrowder yes, that's what i'm thinking 14:51
and a java cli should work on most hosts, should it not? 14:52
guifa2 Actually, java isn't installed by default on Macs. Not sure on Windows. 14:53
But you can make set java as a requirement for install
tbrowder oh, cool, with Build as tonyo said? 14:54
*demoed? 14:55
tonyo vrurg: good news about wget - you mind emailing me your tarball and i'll take a look? i'll pm my email 15:03
vrurg tonyo: the wget problem is gone with fez 16. It's now the server side which fails. 15:05
tonyo understood. i'll see if the tar stayed because of the panic but i usually don't have access if an email was sent 15:08
if you don't mind emailing me whatever is in your `sdist` folder i can take a look and figure out what happened 15:10
and then fix the issue so it's not a future problem
guifa2 tbrowder: the java requirement would be in the dependencies part of the meta6 15:13
El_Che github actions is pretty impressive 15:18
working on a rakudo-pkg 2.0 and there is a lot of stuff that can be removed 15:19
and it's fat
fast
tbrowder guifa2: ok, thnx 15:23
El_Che the idea is that devs/release manager can just fork the repo en throw away build pkgs with no setup 15:24
patrickb is quite impressed how nice it is to edit the docs using pod6.in/ 15:49
El_Che nice 15:50
I would love to see a plugin that converts md to pod6
]cough*comma*cough 15:51
guifa2 El_Che: Okay, thanks for giving me a new project (I can at least make on in module format) 15:55
El_Che guifa2: I am an old hipster, that along the way got used to md and now complains at clouds when he sees language specific formats 16:08
:)
guifa2 It should be actually possible, I think, to create a POD6 declarator for other languages 16:13
so you could do =begin md
masak I'm kind of in the camp of "Markdown is the worst format, except for all the other formats" 16:14
guifa2 actually likes markdown
masak well, me too. a lot.
guifa2 I made a dialect of it for my transcriptions
If you've ever seen a TEI document, or worse ever had to write one…… 16:15
masak I just wish it didn't have to be so complicated.
perry Personally, I really like org-mode's markdown syntax.
orgmode.org/quickstart.html#markup
masak I think my ideal would be (a) something very much like Markdown, but (b) that I could reconstruct from first principles if needed
perry: I'll check that out -- thank you 16:16
El_Che The thing is that the kids know md and it's good enough 16:17
perry Good luck inserting a link or image without 1) a button that inserts the text 2) looking it up
El_Che perry: do you insert images in pod? 16:18
perry Oh I mean in markdown
guifa2 El_Che: I would only because I've started making banner images for a lot of my modules 16:39
A little color at the top of a module's documentation / readme … I dunno, it ended up looking a lot nicer than I expected 16:40
github.com/alabamenhu/Intl-CLDR for example 16:41
(also thanks to this my Google image search is filled with searches of butterflies haha)
PimDaniel Hi \o 16:58
Does anybody know how to make a sub (or method) prototype that receives an associative of associative? 16:59
guifa2 proto foo (Associative %foo) { * } 17:06
PimDaniel I do not even know the proto keyword :( 17:09
guifa2 but if you were just wanting a model of a sub that does it 17:10
sub foo (Associative %foo) { … Ç
{ … }
PimDaniel Well here's what i need : The caller is : color(foreground => %(red => 33,blue => 22, green => 178, background => % the same); but this is probably not the better way to archieve this. 17:13
tonyo if you're trying to force that structure you can use a `where` in the sub sig
PimDaniel No i don't need to force anything , just to control eventualy. I made the same in php with a hash of list. 17:15
I'v not been able yet to pass a hash to a sub. :(
tonyo m: sub x (%x) { %x.raku.say; }; x( {hello => 'world'} ); 17:16
evalable6 {:hello("world")}
PimDaniel hum this is my caller that is bad. 17:17
tonyo if you want to pass that foreground as you can do it one of two ways 17:19
m: sub color(*%x) { %x.say; }; color(foreground => %(red => 33,blue => 22, green => 178, background => 5));
evalable6 {foreground => {background => 5, blue => 22, green => 178, red => 33}}
tonyo m: sub color(:%foreground) { %foreground.say; }; color(foreground => %(red => 33,blue => 22, green => 178, background => 5));
evalable6 {background => 5, blue => 22, green => 178, red => 33}
PimDaniel tonyo; OOOOh thanks, this is what i'm searching! 17:20
but why that didn't work ! i made exactly that. :( 17:21
Ok thanks tonyo and guifa2 : i must look carrefully and try again i'll watch your informations, searching into the reference... 17:22
tonyo you likely forgot the `:` on the %foreground. if you're sending `foreground => ...` it doesn't coalesce to { foreground => ...}, it attempts to assign to a named variable `foreground` in the signature
PimDaniel Doesn't work : Too few positionals passed; expected 1 argument but got 0 17:30
Hooo sorry
Yes it does, sorry; 17:33
RaycatWhoDat I was just thinking about something during my walk 17:43
RaycatWhoDat Silly question but how crazy would calling some sort of Raku AOT artifact through NativeCall be? 17:44
I'm tickled by the notion of using Raku to speed up Raku
Even if it's a fantasy 17:45
jmerelo RaycatWhoDat: That's what Raku does out of the box... 17:46
RaycatWhoDat:plus I guess we have to let the optimizer work by using it through high-level functions.
RaycatWhoDat: maybe the new RakuAST engine will have a bit of more access to internals... but it will be through macros, not through NativeCall. Far as I can tell, at least. 17:47
RaycatWhoDat jmerelo: Really? Could you point me towards more information on that? I didn't know that was happening
jmerelo RaycatWhoDat: www.reddit.com/r/rakulang/comments...rthington/ then you can access the periodical reports at the Perl Foundation site 17:48
RaycatWhoDat Oh, sorry, not the RakuAST stuff 17:49
The reply to "using Raku to speed up Raku" 17:50
Unless I'm just dense?
tadzik I'm not sure what you mean by "calling some sort of Raku AOT artifact through NativeCall" 17:52
jmerelo RaycatWhoDat: there's a bit about jitting in Raku here www.reddit.com/r/ProgrammingLangua...;context=3
RaycatWhoDat: I can't find reference to how the optimizer works. Probably in some jnthn's talk. 17:53
RaycatWhoDat tadzik: I thought it would be interesting if Raku was able to compile a module and call it through NativeCall or something of the sort.
jmerelo: No worries. Thanks for the links!
tadzik RaycatWhoDat: so that assumes that you can compile Raku code to native code that will run faster than what's currently ran on MoarVM 17:54
which is a bold assumption :) There's a reason MoarVM exists rather than Rakudo just targeting LLVM or something
and the start of the problem is there is currently nothing that can generate "native" binaries from Raku code 17:56
RaycatWhoDat tadzik: Makes sense. 17:57
Oh well. Fun to think about. 17:58
PimDanie1 \o 18:51
jmerelo PimDanie1: hey!
PimDanie1 Why is pack still experimental? Can i use it? 18:51
PimDanie1 I'm afraid it it desapear tomorrow. 18:52
jmerelo PimDanie1: I think that halfway along implementation people realized that maybe that Perl feature wasn't too worth the while to invest time into.
PimDanie1: It's not planned to be obsolete far as I can tell, but it might not be as complete as you'd expect (meaning: not as complete as in Perl) 18:53
PimDanie1 Are there workaround? 18:54
What i wanna do is :
PimDanie1 i have 3 int8 18:55
jmerelo Give it a try. I think you're good with that.
Also, everyone, Google Summer of Code is about to be announced. We need your projects here github.com/perl-foundation-outreac...2021-ideas We're going to apply under the aegis of The Perl Foundation 18:56
PimDanie1 and i wanna convert them to one int 24, well let's say 32.
It is easy to do with C language.
Another solution should be tu use bits seeking, may be better, no? 18:57
haha i see read-bits method in the reference, may be it's better 19:00
Ok thank's : back tomorrow. 19:04
raku-bridge <ionsolo> what's the intended use of is pure trait? 21:51
oddp docs.raku.org/routine/is%20pure 21:53
Man, arr.flat not flattening an array of arrays got me again today. :( 21:55
raku-bridge <ionsolo> but how the compiler know the output it's the same? memoizes the results? 21:56
MasterDuke you tell the compiler by using the trait. it doesn't verify 21:57
raku-bridge <ionsolo> oddp try [;] with a star less or more with more dimensions you have 21:59
<ionsolo> '@a[;]
oddp >>.List.flat does it, but you always have to remember that when handling arrays. 22:01
Oh, cool, never seen that before, slick. 22:03
shan hi 23:00
shan gist.github.com/shantaram3013/39b9...064fc51152 why does this not work 23:02
i mean, running it with `rakudo driver.raku` 23:03
vrurg shan: usually it is considered a good practice to explain what exactly happens. But my first guess is that I can't load the module because rakudo doesn't search for modules in the current directory. 23:11
shan vrurg: how am i supposed to make it do that? 23:12
vrurg Oh, it actually should read "it can't load the module". 23:14
shan: do what exactly?
shan AYYY it worked
vrurg: look for modules in the current directory
the answer is "use lib 'lib'" 23:15
and make a folder called lib
vrurg shan: Correct. And it's funny, but my client lost my second message where I was mentioning "use lib '.'" or -I. 23:16
shan ah crap