🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | Log inspection is getting closer to beta. If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 25 August 2021.
[Coke] jdv: I recommend at a minimum, that for things we go, any file with a commit date in 2022 be upgraded. I've seen folks do *any file*, regardless of last update date. If you have anything crazier, bounce it off codesections, probably. 01:35
leont Another night, another rakubug. 04:03
m: package Foo { role Some::Bar {}; my class Some::Baz does Some::Bar {} }; Foo::Some::Baz.new
camelia ( no output )
leont That should die
Will file tomorrow
moritz agreed, looks like a bug to me 08:38
you don't need the role to reproduce it
m: package Foo { my class Some::Baz { } }; Foo::Some::Baz.new 08:39
camelia Could not find symbol '&Baz' in 'Foo::Some'
in block <unit> at <tmp> line 1
moritz huh, at least with my local raku :D
*rakudo
guess I should build a newer one
077AAD8E0 tonyo: yr http asynch server seem to be a bit easier to setup vs cro, yes? 11:44
elcaro mental blank... what's the sub version of $class."$method"()... ie, how can i calls sub `foo()` if `$var='foo'` 12:02
oh wait... it's `::{'&foo'}()`
stupid brain
or `::{"&$var"}()` as the case may be 12:03
moritz m: sub f() {say "moo"}; my $name = 'f'; say &::($name) 12:29
camelia &f
moritz IMHO that's the least cluttered syntax if you want to call (and not get a reference to it) 12:30
m: sub f() {say "moo"}; my $name = 'f'; say &MY::{$name}
camelia ===SORRY!=== Error while compiling <tmp>
Undeclared name:
MY used at line 1
moritz m: sub f() {say "moo"}; my $name = 'f'; say MY::{'&' ~ $name}
camelia &f
moritz if you want to get a reference 12:31
(and only want to look in the lexical scopes)
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2022/02/07/2022-06-basicly/ 13:55
moritz lizmat++ 14:05
synthmeat that newsletter is by far the best periodic technology updates i get. i don't even do much (or at all) raku, and i still read it top to bottom 14:55
Darkcoal synthmeat: you're referring to Rakudo Weekly News? 15:26
synthmeat yeah 15:27
[Coke] lizmat++ 17:10
dorkdoggler moritz that $MY MY output is confusing I would expect the error to be on the second commsnd 18:42
anyway viva raku + rakudo + camelia 18:43
bye
frank26 Hi, I have a problem wrt to building a module of mine with the debian package of rakudo. This is the module github.com/soundart/perl6-tweetnacl. I do "zef install ." and end with "/usr/bin/ld: cannot find -latomic_ops" 20:09
If I remove atomic_ops from the generated Makefile the module seems to be working. 20:11
[Coke] ? what is -atomic_ops? 20:14
? what is -latomic_ops?
[Coke] the only atomic_ops I have in my makefile is: 20:16
-I'/Volumes/BUKKIT/Users/coke/sandbox/rakudo/install/include/libatomic_ops' \
[Coke] File::Which should update to check for raku as a test instead of perl6 20:19
frank26 Hm that seems to be the directory containing the headers files of that library. -latomic_ops is for the linker.
[Coke] I assume you mean the rakudo makefile, though it's not clear how that impacts your module. 20:20
(I was able to do a zef install --dry . in the module checkout, no errors) (I'm on OS X, though) 20:21
frank26 "zef" creates for my module a Makefile. In that Makefile is a linker line referring to atomic_ops 20:23
ugexe maybe something from LibraryMake that you use? github.com/retupmoca/P6-LibraryMak...#L144-L147 20:24
[Coke] ah. issue with LibraryMake perhaps? Or your debian package of rakudo being misconfigured? 20:25
frank26 Yes I think this github.com/soundart/perl6-tweetnac...file.in#L9 gets expanded with %LIBS% 20:29
[Coke] it concerns me that debian's version is still calling itself Perl 6 20:29
frank26 %LIBS% seems to be -lffi -ltommath -latomic_ops -luv -lm -lpthread -lrt -ldl 20:30
[Coke] ah, the MoarVM Makefile, not rakudo. Still, don't see a -latomic_ops in mine. 20:33
MasterDuke moarvm uses libatomic_ops, i suspect you need to install the libatomic-ops-dev debian package 20:34
[Coke] Shouldn't the package require it automagically?
frank67 Sorry I accidentally left the channel
[Coke] (if it's going to die this way?)
and changed your ID. :)
and changed your ID. :) 20:35
MasterDuke but i think it's only because building his module requires compiling some c code
frank67: if you missed my earlier comment, "moarvm uses libatomic_ops, i suspect you need to install the libatomic-ops-dev debian package" 20:37
frank67 Yes indeed  libatomic-ops-dev solved that. I think I did not find that package, as I searched for atomic_ops ,not atomic-ops.
frank67 So is this a bug somewhere? My code does not use atomic_ops. Or should I update the readme to give a hint that this package might be required? 20:40
MasterDuke fyi, if you build your own rakudo, moarvm recently gained the ability to use c11's atomic ops instead (assuming you have a supported OS+compiler), so you could pass `--moar-option='--c11-atomics'` to the rakudo Configure.pl call 20:41
frank67 I am still uncertain: how should I document the build procedure of my code, so that someone else could succeed building it? Does the native call machine require atomic_ops to be linked against the parts of the code I provided? 20:48
ugexe for a debian package you probably shouldnt be running e.g. Build.pm 20:50
MasterDuke i think he's saying he got his rakudo from a debian package, but is installing his module with zef 20:51
frank67 Yes exactly. 20:52
ugexe if you can make it work without LibraryMake maybe try that
or delete whatever entries from github.com/soundart/perl6-tweetnac...uild.pm#L9 you dont want 20:54
frank67 I think this is quite hard, especially if there are variants like  `--moar-option='--c11-atomics'` around. 21:00
frank67 I will  add a pointer to libatomic-ops-dev (and the other not used libs like ) into the readme for now. The linker seems to prevent the extra libs being added to the shared library libtweetnacl.so 21:11
frank67 thank you! 21:22
[Coke] I would also report up to debian they need to add a dep on this package. 22:27
[Coke] that also would have solved the issue; I imagine that rakudo will explode if you try to use the atomic ops. 22:28
[Coke] m: my $a=1; $a⚛++; say $a; 22:37
camelia ===SORRY!=== Error while compiling <tmp>
Calling postfix:<⚛++>(Mu) will never work with any of these multi signatures:
(atomicint $target is rw --> atomicint)
at <tmp>:1
------> my $a=1; $a⏏⚛++; say $a;
[Coke] m: my atomicint $a=1; $a⚛++; say $a; 22:37
camelia 2
[Coke] ... except you already installed the dev lib. ah well.
MasterDuke i don't believe so, it's just that LibraryMake (or whatever creates the Makefile) is guessing that the include line for the non-rakudo-related code needed to be compiled for that module should be copied from the moarvm build 22:39
github.com/zostay/raku-LibraryMake...e.pm6#L133 22:42
Geth doc: 7c34ffddf6 | raiph++ (committed using GitHub Web editor) | doc/Language/nativecall.pod6
test

test
22:55
linkable6 Link: docs.raku.org/language/nativecall
[Coke] that commit is failing 'xtest' 23:01
Geth doc: 3b68625daf | raiph++ (committed using GitHub Web editor) | doc/Language/nativecall.pod6
Revert accidental (immediately prior) test commit
23:06
linkable6 Link: docs.raku.org/language/nativecall