🦋 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.
tonyo japhb: merged your resource R. currently don't have a way to manage orgs. i've been thinking a lot about how to do that and also to allow access (through those orgs) to darkpac^Hns 00:57
japhb tonyo: OK, fair enough
tonyo mostly thinking about how to make a UI for managing that as it seems like it'd easily get unwieldy through CLI 00:58
japhb tonyo: Just filed github.com/tony-o/raku-fez/issues/31 (which I mention here since you're looking at fez stuff right now). :-)
tonyo i'll take a look into that - that might require a reindex 01:00
goes a long with the change i'm testing right now to allow module authors to remove their modules
japhb (y) 01:01
Thanks tonyo
tonyo japhb: indexes now should show correct dependency counting 06:45
japhb tonyo: Looks like it worked for MUGS::Core, thank you! Now on to the next few repos in the dependency graph .... 07:44
japhb tonyo: Yup, worked for all my repos so far. 08:30
tonyo: And as a bonus ... I just uploaded the 100th dist to fez! 08:31
japhb 🎉‭🎈‭ 08:31
plvicente Hi 09:29
I have a doubt
PimDaniel Hi \o, /me jemerelo i could implement the code rather simply into my class, look at get_method_link method : pastebin.com/iU79psrG
PimDaniel jemerelo But now i get the pro lem that instead of passing the reference, the code is evaluated en runs. :( weird. This only happens in the hash passed to the new sub which is a default constructor , look at the comments into the code. 09:32
PimDaniel To all : I think this question is more general and has nothing to do with the first question: 09:34
suppose we have a code reference $mycode which points to a sub or method... okay? now: 09:35
PimDaniel In some situations when you write : $code , and suppose you have an lvalue : $x = $code; $x will contain the code reference, but in other situations it will contain the returned type of the sub because the code ran. 09:37
I do not want the code to run : why does my code run? I thought it should run in 2 situations: 09:38
tyil I thought you need to add `()` after it to run, so $x = $code() will have $x contain the return value of running $code, but $x = $code should make $x a copy of $code 09:39
PimDaniel 1/ if i put & before , 2/ if i add parentesis after : &$mycode; or $mycode(...);
PimDaniel tyil : i did not put the () and the code ran. If you get the time look at my code posted here and please, read the comments: pastebin.com/iU79psrG 09:42
PimDaniel \o 10:18
PimDaniel jmerelo and tyil. Forget it : the solution works, it was just horrible mistakes that i made into Event class code. Thank's a lot. 10:20
jmerelo .tell PimDaniel sorry, I didn't catch this before... You can use .tell jmerelo to leave messages for me here. 10:42
tellable6 jmerelo, I'll pass your message to PimDaniel
jmerelo .tell PimDaniel you can use the sigil & to indicate it's a block instead of a $ 10:43
tellable6 jmerelo, I'll pass your message to PimDaniel
cog m: my $a = enum < a b c >; say $a.keys 12:20
camelia (a b c)
cog m: enum A < a b c >; say A.keys
camelia () 12:21
lizmat m: dd enum < a b c > # cog 12:23
camelia Map.new((:a(0),:b(1),:c(2)))
lizmat so maybe that's the weird thing? 12:24
cog I file a bug
lizmat cog++
cog Sorry to file and not to follow thru. I am trying to get to speed in MoarVM internals. 12:25
lizmat cog: no pb, thanks for reporting! 12:26
cog m: enum A < a b c >; say A.enums.keys 12:35
camelia (b a c)
cog Seems to be the expected behaviour. Highly unintuitive though. github.com/Raku/old-issue-tracker/issues/1418 12:42
cog Probably I fail to understand the benefits to inherit from Any or Cool. 12:56
lizmat perhaps the Mu.keys should check for an EnumHOW and return .enums.keys? 13:00
alas, we cannot dispatch on the HOW of a class
cog Just got a magic track pad replacing an erratic mouse. Expensive even discounted by amazon but nice. 13:05
lizmat I dropped one 3 years ago, and its surface splintered much like an iPhone does 13:07
haven't replaced it, since it just still works :-) 13:08
El_Che I am a trackball man :)
lizmat if touchpads hadn't been invented, I would be using a trackball as well
mouses are evil
El_Che I don't even know if trackpads work on linux 13:17
ab5tract I'm still a bit blown away that slurping a 1.2GB file into an array takes 10x the memory (and that's even using `str` instead of `Str`, which saves a couple GB) 13:35
tellable6 2021-02-17T21:58:29Z #raku <MasterDuke> ab5tract: Tux still does post his benchmark timings most days, but in #raku-dev
lizmat pretty sure they do, woolfy has one ?
ab5tract: is it ASCII, UTF-8 or binary data ?
ah, str 13:36
hmmm
cog Every char is 32bits inside raku ?
lizmat ab5tract: do you need to have it in an array?
MasterDuke 10x the 1.2GB, or 10x the size if slurped as a single string?
ab5tract MasterDuke, 10x the 1.2GB 13:37
lizmat, I'm open to other options, the basic idea is to insert CSV data into an SQLite db
I can do that on each line (I'm not actually using .slurp, I'm using while/.get) 13:38
El_Che I have the latest ergo logitech one, but I don't think there are many users. Many will see it as a 90s tech :) 13:38
lizmat ab5tract:
lizmat for "file".IO.lines -> $line { 13:38
ab5tract but I thought it would be interesting to see how SQLite handles the millions of rows in a transaction
lizmat is the most memory efficient way to handle big files 13:39
it is lazy
it will read blobs at a time, and produce lines from that lazily
MasterDuke it doesn't like too many. we have to limit the number of values in an individual transaction when creating a .sql profile
ab5tract lizmat, doesn't seem to change the memory usage :/ 13:41
over while/.get
on an open filehandle
lizmat then maybe it's the SQL side that's taking all of the memory ?
ab5tract MasterDuke, interesting, I was reading something that SQLite was quite capable of doing a lot of inserts in a single transaction. part of me needed to "see it to believe it" :) 13:42
lizmat, all I'm doing inside the loop is @lines.push: $l (where @lines is defined outside the loop as my str @lines) 13:43
MasterDuke i think it's a pretty high number, but i'm pretty sure we did hit it
lizmat ab5tract: yeah, that will eat memory :-)
MasterDuke well, there might be a different limit for number of individual inserts vs number of values in an insert values
lizmat ab5tract: so is that SQL you're pushing? 13:44
ab5tract nope, CSV lines 13:44
lizmat, if you are curious, it's the allCountries.zip in download.geonames.org/export/dump/ 13:45
lizmat so why are you pushing to the array ? 13:46
ab5tract lizmat, but really, creating an array of each line of text from a 1.2GB file doesn't seem like it would imply a 10x explosion to me
lizmat, to insert into SQLite in a single transaction
lizmat well, as cog++ pointed out, if it's all ASCII, there is at least a 4x increase because internally 32bit / grapheme 13:47
ab5tract also, because my first instinct was `my @lines = $path.IO.slurp` and I was shocked when I hit swap space with ~14GB of extra memory
MasterDuke well, moarvm does try to store ascii as 8bit 13:49
lizmat well, apart from it taking more memory than you expect, why read / store everything in memory and then process, I presume?
ab5tract sorry, what's the presumption there? 13:51
indeed the next thing I would do would be to spawn $core-1 threads to convert to an AoH 13:52
lizmat ab5tract: why not do something like my @AoH = "file".IO.lines.hyper.map: ... 13:56
ab5tract lizmat, no good reason not to do that at all :)
won't that be the same as slurping? 13:57
ie, pull in all lines and then call hyper on the result? 13:58
lizmat nope, it will only read lines for a batcn
IO::Path.lines is lazy
ab5tract sweet!
that definitely sounds way better, though I doubt it will have a huge impact on the overall memory impact if I store the result, I could insert into the SQLite db per hyper batch and that should make for an interesting result 14:00
lizmat well, there's that
ab5tract lizmat, I haven't spent a whole lot of time investigating or optimizing this. I was just shocked by the impact of my @lines = $path.IO.slurp and started down that path. Inserting almost a million rows one at a time didn't seem like the best option to me either, but I was only at the stage of looking at the memory "explosion" 14:02
ab5tract lizmat, thanks for the suggestion! :D 14:02
lizmat yw 14:02
andinus so i was building rstar 2021.02, moar build was successful but nqp build failed with: ix.io/2RF2 14:31
andinus it failed twice 14:31
andinus i'm on openbsd 6.8, gmake 4.3 14:32
MasterDuke tyil: ^^^ 14:51
tyil hmm 14:53
tyil I can reproduce it on FreeBSD at least (I don't have any running OpenBSD machines to test on) 15:05
tyil andinus: you were running an earlier Rakudo Star without any problems, right? 15:10
tyil I shouldn't be testing this on my bouncer server I think 15:17
andinus tyil: yes, rstar 2020.10 worked fine 15:31
tyil alright
openbsd-6.8 doesn't play nice in a vm it looks like, so I'll continue testing in a freebsd vm for now, since I got the exact same error there 15:32
I'm guessing it's a difference between GNU and BSD
andinus maybe but it uses gnu make right?
tyil it should, yes
and since 2020.10 worked fine, I think that should continue to work fine 15:33
andinus everything broke for me, when i run raku it exits with "segmentation fault" 15:34
i think thats because moar was upgraded but rakudo is still 2020.10
tyil yeah, probably
interesting 15:44
on a freebsd VM *without* gmake installed it seems to work fine, but a retry after install gmake throws the errors
tyil ah, my rstar install step calls `make`, but if `gmake` is installed, it seems to make a different Makefile, which then in turn *must* be called with gmake now 15:52
so I need to check if gmake is installed, and if that's the case, call gmake && gmake install instead of make && make install
checking if that's also the case for rakudo
doesn't seem to be the case for moarvm, interestingly enough
andinus: care to test a small change for me, to confirm this hunch? 15:53
andinus tyil: i see, ok
so the installer can work with bsdmake? 15:54
tyil if gmake is not installed, it seems to work on this vm
andinus i see, also is there a way to skip moar build since its already installed? 15:56
tyil not currently
andinus do i test without gmake or are you sending a patch? 15:57
tyil I'll make you an updated rakudo star tarball to test with in a (hopefully) short moment
El_Che tyil: search the path and call make with full path? 15:59
tyil that won't do anything
full path or not doesn't matter here
the issue seems that the configure steps of nqp and rakudo produce a different makefile if they find gmake installed 16:00
tyil but r* always calls regular make 16:00
El_Che I see
tyil so I'm making it so that r* will also check if gmake is installed, and use that instead for nqp/rakudo
tyil andinus: testing the change on my vm now 16:06
and it seems to work for the NQP build now 16:07
andinus: dist.tyil.nl/raku/star/rakudo-star...1-2.tar.gz the tarball in question, if you have time :>
guifa2 is it possibly to add a multi method at runtime or are they locked in place at composition? 16:08
guifa2 meh it looks like that's the case 16:11
MasterDuke you can add at runtime, but then you'll have to call ^compose on whatever you've added it to
guifa2 ah okay 16:12
that's actually not going to be terrible then
andinus tyil: thanks, i'll test it in a min 16:13
tyil thanks, keep me posted :)
guifa2 is making a Role that will provide an autocoercion to classes that implement it. 16:13
jmerelo guifa2: looks cool
guifa2 Each class can REGISTER-COERCE to send its coercion method over, but I wasn't sure if I could manage to provide proper ordering, etc
andinus tyil: looks like nqp build was successful, it's building rakudo now 16:32
tyil \o/ 16:34
thats a good first sign
andinus rakudo was also installed! 16:44
thanks tyil!
tyil andinus: thanks for reporting the issue :>
I'll commit it to master and plan a release with the fix soon-ish 16:45
andinus is it safe to exit the script? its installing the modules but it didn't update the src since that already existed
so its installing the same modules again
tyil should be fine
some modules may be of a higher version (such as zef)
so I wouldn't recommend it, but it shouldn't break anything either
andinus the fetch thing skipped zef too because it already existed in src/ 16:46
tyil ah
you dont need to fetch with the "official" tarball, only if you git cloned the repo and want to make a tarball of it
andinus yes i cloned the repo, missed the release tarballs 16:47
tyil ah, then you should be good
andinus yeah, i think i'll update zef and other modules later 16:48
tyil you can `rstar clean -s && rstar fetch` to update the modules, and only install modules with `rstar install [-p installdir] modules`
but it's not specifically needed
andinus i see, i'll just install the modules with that then ^
tonyo japhb lmk if you have any issues, i just changed the way it indexes/processes 17:29
it being fez.
japhb tonyo: Meaning, I should test uploads again? 19:03
tonyo if you uploaded last night should be good, i see the 100th module uploaded to Fez .. i've uploaded too so it should be fine 20:27
just changed to sqs processor rather than triggering from the upload directly (so i don't have to race removal/adding to main index)
Geth problem-solving/solution-250: 053ef5b4ef | Altai-man++ | solutions/documentation/search-categories.md
Provide a solution document for github.com/Raku/problem-solving/issues/250

  "Documentation search categories are not standartized"
Fixes github.com/Raku/problem-solving/issues/250
20:58
doc/search-categories: 15 commits pushed by Altai-man++
review: github.com/Raku/doc/compare/9d5dfd...abe7b044db
21:11
doc/search-categories: 14 commits pushed by Altai-man++
review: github.com/Raku/doc/compare/5fabe7...af85b86862
21:12