🦋 Welcome to the former MAIN() IRC channel of the Raku Programming Language (raku.org). This channel has moved to Libera (irc.libera.chat #raku)
Set by lizmat on 23 May 2021.
raydiak everything you store into a Scalar is itemized. every element of a Hash or Array is put into a scalar automatically, which provides mutability 00:07
m: my %x = %(a => <1 2 3>); .raku.say for %x<a>
camelia $(IntStr.new(1, "1"), IntStr.new(2, "2"), IntStr.new(3, "3"))
raydiak ^ note the leading "$"
moon-child ahhh 00:12
raydiak Xliff: not sure why it says 4, should be 3 afaik. the _I variant takes a 3rd arg, the type of result to return, as noted at the end of the section here: github.com/Raku/nqp/blob/master/do...rkdown#mul 00:19
m: use nqp; say nqp::mul_I(2, 2, Int);
camelia 4
raydiak m: use nqp; say nqp::mul_i(2, 2); # or this 00:20
camelia 4
raydiak Xliff: locally here on 2021.05, your example correctly asks for 3 operands, not 4 00:24
m: use nqp; say nqp::mul_I(2, 2);
camelia ===SORRY!===
Arg count 2 doesn't equal required operand count 3 for op 'mul_I'
moon-child dynamic variables are ♥ 04:50
(in moderation, of course)
guifa yup! much easier than needing to keep track of all sorts of random parameters that you may or may not use and just have to pass through 05:08
Getting a weird bug
Cannot find method 'set_name' on object of type Bool when trying to use a custom declarator inside of another one
guifa it works a-okay until I try to .^add_method on the inner type 05:10
hmm I think I figured it out 05:14
guifa: was an idiot and had a semicolon in the list of bless arguments 05:21
Geth doc: 287d9186df | (Bruce Gray)++ (committed by Juan Julián Merelo Guervós) | Makefile
Finish .t renumbering from 201128008 and 04702f1fb , to fix `make ctest`
05:33
doc: 58dc2f36c5 | (Bruce Gray)++ (committed by Juan Julián Merelo Guervós) | xt/pws/words.pws
Add new words to aspell
sarna hey, what's the difference between Iterable and Iterator? I can't figure it out from the docs 07:08
nine The Iterable is what you iterate over, i.e. some kind of list. The Iterator is what keeps track of where in the iteration you are. 07:14
sarna nine: so if I want to implement a custom collection, what would I implement? both, on two objects? or both on one object? or.. 07:23
moon-child you implement Iterable on your collection. The Iterable returns an Iterator, which contains a bit of state 07:27
so you need to make both
elcaro I think the minimum is: define a class that `does Iterator` and has a `pull-one` method. 07:31
m: class M does Iterator { has @.elems = 1..3; method pull-one { @!elems ?? @!elems.shift !! IterationEnd } }; .say for Seq.new(M.new) 07:33
camelia 1
2
3
nine That's certainly the minimum, but you really want to have Iterable and Iterator separate. Otherwise one can only ever iterate once over your collection. 07:36
guifa Iterable is role. It says "HEY, you can iterate over me". 07:38
The way things interact with the iterable is by first calling .iterator, which is the thing that actually handles iteration 07:39
that thing is of the role Iterator, and as el caro mentions, the bare minimum is to have a pull one
guifa The example here docs.raku.org/type/Iterator#IterationEnd shows this. An Array is Iterable (so it's not separately declared) 07:42
The .iterator method returns an anonymous iterator that holds its own state (starts at 0, but increments by two after each pull)
nine m: class MyCollection does Iterable { has @.elems = 1..3; method iterator { class :: does Iterator { has $.coll; has $!i = 0; has $.end; method pull-one { $!i < $!end ?? $!coll.AT-POS($!i++) !! IterationEnd } }.new(:coll(self), :end(@!elems.elems)) }; method AT-POS($i) { @!elems[$i] } }; .say for MyCollection.new 07:44
camelia 1
2
3
guifa: just realized he's been fighting an error making GTK work with declarators all night only to realize that it's because there's some GTK set up code that must be run before anything else, and the way composition works, the execution order was getting mixed up. Too tired now htough to figure a work around tonight =\ 07:46
MasterDuke anyone here know where/how one installs the visual studio command line tools thing? 08:26
frost-lab m: say 1 08:27
camelia 1
moon-child there's an installer thing 08:28
it has its own installer, which is . . .
but anyway, once you install the installer with the installer installer, you should be able to use it to install the cmdline tools. It's the same installer as for regular vs 08:29
MasterDuke hm. i see some ms blogposts about enabling it in vs, but i haven't found an installer yet. but i need to download the vs installer, which will have an option for just the command line tools? 08:30
moon-child yes
iirc
MasterDuke apparently there's some sort of free-ish community edition of vs, i'll try that installer 08:32
holyghost MasterDuke, search for csc.exe (mcs on linux/unix) 08:35
e.g. C#
the command line edition for C/C++ is online though
win7 or win10 08:37
MasterDuke out of the many install options, i don't see one that just says "minimum stuff needed for the developer powershell", so i guess i'll just install a bunch of the c/c++ options and hope for the best (but first, expand the vm's disk) 08:42
raydiak I think you may be looking for "build tools for visual studio" visualstudio.microsoft.com/downloa...tudio-2019 09:20
MasterDuke ah ha! that looks promising 09:22
raydiak also fwiw, if you're doing this in a vm there's a free image that comes with win 10, visual studio, and some other stuff preinstalled. the catch is it has an expiration. developer.microsoft.com/en-us/wind...-machines/ 09:26
MasterDuke ugh, still getting 'fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory' 09:32
but maybe that vm will be easier
raydiak the trick to the expiration is as far as I ever saw it only stops working on boot, so you just save state on the machine when you close it, never actually reboot the vm. I used it for many months beyond expiration that way 09:34
MasterDuke ha 09:35
sarna nine, elcaro, guifa: thanks for explaining! :) 09:41
raydiak MasterDuke: a number of different suggestions pop up when I search for that error. if you don't have luck with that vm image, maybe just copy/paste the whole error into a search engine. several people suggest completely uninstalling/reinstalling all things related to vs. some people got it after an upgrade, or trying to add the C++ components after the initial install (they aren't included by default 09:52
apparently). some people found the file and manually added the path to their project's include dirs
a myriad of possibilities is covered at docs.microsoft.com/en-us/cpp/error...rror-c1083 09:53
including "Most C++ Standard Library header files do not have a .h file name extension."
and some people solved it by install the windows 10 sdk from developer.microsoft.com/en-us/wind...ws-10-sdk/ 10:00
what a mess...
MasterDuke i got moarvm building now, but it's using gmake instead of nmake, which i don't really want. will try that vm when it finishes downloading 10:05
MasterDuke got it using nmake 10:10
nine And just like that you got yourself a Windows dev environment? 10:12
MasterDuke ish 10:13
nine That looks downright trivial! Compared to.....DOS? QNX? 10:16
MasterDuke couldn't compare, haven't tried with either of those. but this is only reinforcing my desire to have as little to do with windows as possible. only trying to get my gmp branch building/working 10:22
raydiak windows makes me miss dos by comparison. sure it wasn't as pretty and intuitive to the uninitiated, but usually when something didn't work the list of possible causes was extremely short 10:31
nine raydiak: yeah, the simplicity was kinda nice. OTOH "not working" often meant just freezing with no way to debug. The thing I fell in love with instantly when trying Linux for the first time was how chatty it was. Makes finding out what's going wrong so much easier. 10:34
raydiak if something was freezing, you probably set a jumper wrong or your floppy went bad :D I wasn't much of a programmer back then though, can't honestly speak to what it felt like to develop under it besides some GW-BASIC and batch files 10:39
though don't get me wrong, I'd certainly never advocate for dos over linux
El_Che (unrelated: I *always* type "ls" in a dos cmd box)
nine raydiak: let me put it this way: programming under DOS made pressing ctrl+s into a reflex for me :D 10:43
raydiak heh I could see that 10:45
jdv lizmat: i think your logs app is stalled at 5-22 10:49
lizmat jdv: it doesn't show "today" yet 10:50
and I am trying to fix an issue with logs getting updated with lines removed 10:51
jdv i don't know what you mean 10:51
raydiak El_Che: for years after I switched from windows to linux I'd type ipconfig instead of ifconfig 10:52
jdv 5-22.html exists but 23 and 24 seem to not
lizmat indeed. 23 is on its way, 24 won't be until tomorrow at this point
raku on 23 may suffered a lot from double logging 10:53
colabti.org/irclogger/irclogger_lo...2021-05-23
jdv seeing in double is still preferrable to not seeing at all;)
lizmat jdv agree
anyways, updating such a corrected log revealed an issue crashing the server 10:54
and I'm trying right now to fix that
please be patient :-)
raydiak alright, second attempt at sleep for me. good luck fighting the good fight MasterDuke++. thank you for building our own logging infrastructure lizmat++. good * all \o 10:59
lizmat jdv: 23 is now love 11:01
*live :-)
jdv: note that this is still the freenode feed 11:02
still mulling on how to handle the migration to Libera
jdv ah, i thought your stuff had moved over already 11:03
lizmat on the one hand, it feels I should just merge the logs of the period where both will be active
lizmat on the other hand, that might be even more confusing 11:04
perhaps with the freenode lines having a marker hhhmmm
but first my time is needed on the RWN
El_Che ok, I closed my freenode windows as they were taking space :) 11:16
tbrowder howdy, finally got here with usual nick 11:31
lizmat tbrowder o/ 11:42
tbrowder lizmat \o 13:16
howdy! 13:17
or "howdeee" as minnie pearl on grand ol opry used to say 13:18
if you're looking for something to do (ha ha), try the conundrum on moarvm, pr #1498 13:20
i'm just the messenger 13:22
lizmat: hopes that request was not just meant for her 13:23
tbrowder no, certainly not :-)) 15:02
tbrowder but your expertise is deep as well as wide in extent 15:11
tbrowder and you're retired so you have lot's of free time, right? (hha ha, just kidding) 16:22
hankache m: say 'Hello #raku'; 16:36
camelia Hello #raku
codesections \me waves 16:37
lizmat tbrowder: mostly retired :-) 16:39
hankache :) 16:40
Is there a reason we have no op on #raku? 16:41
ugexe presumably no one has felt compelled to leave themselves opd 16:43
hankache Yeah! 16:44
@lizmat hankache: does that answer your question?
hankache Hehehehe 16:45
What are the benefits/drawbacks of having ops. I understand ops can mute or kick spammers right? 16:47
hankache: is trying to understand how IRC works 16:48
ugexe if you consider having to do the work a benefit, then sure
hankache Benefit for the channel. Not so much for the person do it 16:49
ugexe agreed
generally ops mute/unmute the channel, kick or ban people, and change the topic 16:51
hankache I like that it's fast compared to other alternatives 16:53
Slack literally kills my machine
lizmat
.oO( it's not for nothing that the english dictionary defines "slack" as also to men "slow or sluggish" )
16:54
*mean
El_Che slack is phonetic Dutch for snail or slug 16:57
tbrowder codesections: \o 16:59
lizmat also: "slakkegang" means "very slow" 17:04
Juerd s/slakke\K/n/ 17:05
lizmat oops :-) 17:06
lizmat afk for a bit& 17:07
lizmat And yet another Rakudo Weekly News hit the Net: rakudoweekly.blog/2021/05/24/2021-...hattering/ 19:49
And yet another Rakudo Weekly News hit the Net: rakudoweekly.blog/2021/05/24/2021-...hattering/ 19:50
lizmat and if you read that, you know you're on the wrong IRC server :-) 19:50
guifa lizmat++ 20:10
guifa is there a way to get Comma to recognize EXPORTHOW stuff ? Or is the Cro/Red support hardwired in? 20:23
b2gills I would suspect that it is hardcoded. 20:27
It may be that all you have to do is install the module in the rakudo that Comma points to
sienet_ja_LSD[m] #raku:irc.libera.chat is not accessible at this time. 20:29
lizmat sienet_ja_LSD[m] ? 20:31
guifa b2gills: hmm, I'll try doing the install route here in a bit. Playing with declarators is fun until Comma marks it all as error-filled ^_^
lizmat you mean from Matrix: yes, indeed, that's still being set up
AlexDaniel btw I no longer see any spam 20:50
last was many hours ago 20:51
maybe it's chill now
sienet_ja_LSD[m] aye
AlexDaniel well… you don't see it here because of the bot
but the bot doesn't see it also, sooo…
sienet_ja_LSD[m] :) 20:52
AlexDaniel let's try without the bot 20:52
we'll see how it works, ping me if the spam is back 20:53
lizmat will do 20:55
b2gills Comma doesn't understand things like &[!~~] either 21:19
El_Che perl is broken in ubi 8 ATM bugzilla.redhat.com/show_bug.cgi?id=1963049 (in case someone is building raku on that platform) 21:38
El_Che (trying to workaround it) 21:42
El_Che (it looks I did) 21:49
rbt Are there examples of how to use the COERCE-INTO() method mentioned in the release notes? 21:54
guifa gist.github.com/alabamenhu/550e19c...6a501f5efe <-- codesections, this actually works, although the "constant foo = bar" feels pretty word. 22:00
rbt: I'm thinking that that may be an error in the release notes? 22:02
vrurg can correct me, but I believe the ultimate decision was to just use COERCE in the new coercion protocol, rather than COERCE-FROM and COERCE-INTO 22:03
vrurg guifa: you're right. 22:04
rbt Okay. I got tricked here: 22:06
./docs/announce/2020.11.md: - `Bar.COERCE-INTO(Foo)`
vrurg It's a leftover from early commits of the branch. Unfortunately, it made it's way into the announcement and ChangeLog. 22:07
*made its 22:08
El_Che rakudo-pkg 2021.05 released 22:15