🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel!
Set by lizmat on 6 September 2022.
[Coke] work? (same as with lines, turning things into a Seq instead of dealinf with the string. 00:00
00:00 reportable6 left
Homer_Simpson but now if you do just 0 without a space it fails 00:00
and people do just do that so
[Coke] m: dd '01 02 03 04'.words>>.Int
camelia (1, 2, 3, 4)
Homer_Simpson it cant be 01 etc 00:01
00:01 reportable6 joined
Homer_Simpson nor can it have a space before it or anything else 00:01
(except newlines) 00:02
so each line must start with 0 1 2 3 4 or 5 then either nothing , a space, or a space and then more data
in C you would use fprintf iirc 00:04
to parse each line
00:05 ab5tract left
Nemokosch fscanf that is 00:05
Homer_Simpson oh ok yeah 00:07
[Coke] I'd write a regex with named captures. 00:08
Homer_Simpson also in comma, the output keeps getting deleted when I resize the terminal by clicking and dragging the edge 00:12
its real weird, if I drag it only a bit then it deleted up to there 00:13
ive tried powershell , powershell 7.3 , cmd, and looking everywhere in settings
also tried reinstalling 00:18
so that comma would be back with default settings
00:34 codesections left 00:35 codesections joined 00:39 jjido left 01:01 Manifest0 left 01:13 ispyhumanfly joined 01:28 codesections left 01:53 rf joined 01:57 epony joined 02:36 rf left 02:38 discord-raku-bot left 02:39 discord-raku-bot joined 02:59 kjp left 03:06 kjp joined 03:27 Homer_Simpson left 03:45 razetime joined 04:07 razetime left 04:29 razetime joined
coleman If you use Kakoune, help make this syntax highlighter better? github.com/superwhiskers/raku.kak/issues/1 04:33
This little heredoc patch makes it usuable for me; supporting all quoting constructs/interpolation will be more work
05:29 linkable6 left, evalable6 left 05:30 linkable6 joined 05:31 evalable6 joined 05:39 discord-raku-bot left, discord-raku-bot joined 05:46 discord-raku-bot left, discord-raku-bot joined 05:54 kjp left 05:56 kjp joined 06:00 reportable6 left 06:01 reportable6 joined 06:39 discord-raku-bot left, discord-raku-bot joined 06:43 razetime left, discord-raku-bot left 06:44 discord-raku-bot joined 06:48 discord-raku-bot left, discord-raku-bot joined 06:52 discord-raku-bot left 06:53 discord-raku-bot joined 07:11 abraxxa joined 07:19 abraxxa left, abraxxa joined 07:34 ecocode left, ecocode joined 07:40 abraxxa left 07:43 abraxxa joined 07:46 abraxxa left 08:05 abraxxa joined 08:17 Sgeo left 08:39 discord-raku-bot left, discord-raku-bot joined 09:17 jjido joined 09:19 sena_kun joined 09:35 jjido left 09:39 discord-raku-bot left, discord-raku-bot joined 09:57 jpn joined 10:31 sena_kun left 10:36 Manifest0 joined 10:39 discord-raku-bot left 10:40 discord-raku-bot joined 10:47 ab5tract joined 11:11 jjido joined 11:12 ab5tract left 11:20 ab5tract joined 11:22 sena_kun joined 11:30 ab5tract left 11:39 discord-raku-bot left 11:40 discord-raku-bot joined 11:44 jjido left 11:51 Xliff left 11:58 ab5tract joined 12:00 reportable6 left 12:01 reportable6 joined 12:16 ab5tract left 12:35 abraxxa left 12:45 jpn left 13:00 jpn joined 13:07 jpn left 13:11 Xliff joined
Xliff \o 13:20
13:20 jpn joined
Xliff Hi. I'm trying to write tests for an update to DBIish that requires me to write an .so lib for missing features. 13:20
I've added the following line to META6.json 13:21
"resources": [ "linux/gcc-i686/libmysql_reconnect.so" ,
I've added that file to resources/linux/gcc-i686/libmysql_reconnect.so 13:22
However when I run the following in the project directory: raku -e '%?RESOURCES<linux/gcc-i686/libmysql_reconnect.so>' 13:23
It returns Nil.
I'm trying to run my tests locally before I "zef install .", so can someone assist?
13:24 epony left 13:35 razetime joined
Nemokosch %?RESOURCES only exists on distribution level, that's for sure 13:36
13:39 discord-raku-bot left, discord-raku-bot joined
ugexe right, its only accessable within a distribution. i'm not sure what it could possibly mean outside of that 13:42
13:43 razetime left 13:48 ab5tract joined
Xliff What mechanism reads the locak META6.json file? 13:49
Couldn't that be used to set %?RESOURCES outside of a Distribution? 13:50
Are non-installed Distributions created when "-I ." is used on the Rakudo commend line? 13:56
lizmat yup. -I. will fake that for you, afaik
as opposed to -Ilib, as that will not be able to see the META6.json file 13:57
Xliff Still not working 13:58
raku -I. -e '%?RESOURCES.keys.gist.say'
lizmat it only works *inside* a module that is loaded with -I.
Xliff Oh! LOL. 13:59
lizmat it's considered private information
13:59 ab5tract left
lizmat much like private attributes 13:59
if you want to expose it, you need to do that inside the module
14:05 lichtkind joined
Xliff lizmat: \o/ -- Thanks! 14:06
14:06 vrurg left 14:14 vrurg joined 14:15 merpaderp left 14:31 ab5tract joined 15:06 Sgeo joined 15:10 epony joined 15:11 razetime joined 15:17 ab5tract left 15:40 discord-raku-bot left, discord-raku-bot joined
Geth ¦ doc: coke self-assigned Will this content-only repo need to be restructured? github.com/Raku/doc/issues/4182 15:42
15:44 discord-raku-bot left 15:45 discord-raku-bot joined 15:55 rf joined
rf I noticed this snippet in some code: :16($data.subbuf(0,$i).decode) what is the :16 adverb? Base 16? 15:56
Xliff Where was it used? 15:57
[Coke] m: say :3<1234>'
camelia ===SORRY!=== Error while compiling <tmp>
Cannot convert string to number: malformed base-3 number in '312⏏534' (indicated by ⏏)
at <tmp>:1
------> say :3<1234>⏏'
[Coke] m: say :3<1232>' 15:58
camelia ===SORRY!=== Error while compiling <tmp>
Cannot convert string to number: malformed base-3 number in '312⏏532' (indicated by ⏏)
at <tmp>:1
------> say :3<1232>⏏'
[Coke] m: say :3<1222>'
camelia ===SORRY!=== Error while compiling <tmp>
Two terms in a row
at <tmp>:1
------> say :3<1222>⏏'
expecting any of:
infix stopper
statement end
statement modifier…
[Coke] m: say :3<1222>
camelia 53
[Coke] OMG sorry. :)
Xliff m: say :16<12345>
camelia 74565
Xliff OMG! I didn't know that! LOL
[Coke] m: say :16<255>
camelia 597
[Coke] m: say :16<ff> 15:59
camelia 255
[Coke] there, just to demonstrate the order. ;)
15:59 vrurg left
Xliff m: say :16<100> 15:59
camelia 256
[Coke] docs.raku.org/type/Int
Xliff O I C 16:00
m: say :3<100>
camelia 9
rf That is neat thanks! 16:01
16:01 vrurg joined
Xliff m: "100".base(3).say 16:01
camelia No such method 'base' for invocant of type 'Str'. Did you mean any of
these: 'AST', 'Bag', 'Date', 'Hash', 'are', 'asec', 'hash', 'take'?
in block <unit> at <tmp> line 1
rf m: 100.base(3).say;
camelia 10201
rf m: 10201.base(10).say;
camelia 10201
16:02 vrurg left 16:11 vrurg joined 16:13 vrurg left 16:14 vrurg joined 16:20 ab5tract joined 16:39 Xliff left 17:05 jgaz joined 17:10 ab5tract left 17:21 ProperNoun left 17:22 razetime left 17:34 sena_kun left 17:38 Homer_Simpson joined 17:42 codesections joined 18:00 reportable6 left 18:01 reportable6 joined 18:09 sena_kun joined 18:12 jpn left 18:33 notna joined 18:35 n1to joined
Homer_Simpson so is there something a bit less verbose than substr 18:47
pastebin.com/W1TY4Y9M 18:48
substr is saying that somehow my first character for each line is magically at 1 and that 0 is basically magic and invisable 18:49
0 to 3 but theres literally only 3 characters there and not 4 (excluding \n which is probably removed anyhow by rakus built in routines 18:52
18:59 MoC joined
Homer_Simpson making it 1 to 3 chops off the 0,1,2,0,1,2,0,1,2 and making it 0 to 2 chops off the 4,4,4,4,4,4,4,4,4 19:01
lizmat m: say "foobarbaz".comb(3) 19:04
camelia (foo bar baz)
lizmat something like that ? 19:05
ah, no misread
you want the first 3 chars of each line?
Homer_Simpson yeah 19:06
lizmat m: say "zippo\nzappo\nzorro".lines>>.substr(0,3)
camelia (zip zap zor)
[Coke] it's position/length, not start/end
Homer_Simpson how do I rewrite that as routines
is there a function that does it like start/end 19:07
[Coke] sub1 ( sub2 ( data )) vs. data.method2.method1
lizmat m: for lines "zippo\nzappo\nzorro" { say substr($_,0,3) }
camelia zip
Homer_Simpson maybe substr-ne() ?
[Coke] Please read some of the docs when you have questions/concerns about a given routine.
many .methods also have routine forms (but not all) 19:08
Nemokosch Yes, reading the docs would definitely help 19:09
Especially since we tend to assume that you have done it and might have incorrect conclusions from that 19:10
[Coke] substr does take different types of arguments (it's a multi) - you might find one there you like.
Homer_Simpson I made a list of some yesterday , by reading the list of every raku routine/method 19:11
[Coke] For example, one of the variants is a Range object.
Homer_Simpson ok ill try range thx 19:12
19:16 Manifest0 left 19:40 notna left 19:42 melezhik joined
melezhik El_Che - I am trying to use rakubrew on oracle arm64 arch and get ( expectedly ) this - Couldn't find a precomp release for OS: "linux", architecture: "arm64", version: "2022.12" 19:43
how can I install rakudo on arm?
19:43 notna joined, notna left 19:46 n1to left 19:47 n1to joined 19:54 dogbert11 joined 19:56 dogbert17 left 19:59 jpn joined 20:00 MoC left 20:03 rf left, rf joined
Homer_Simpson hmm now the range isnt working again pastebin.com/fbK4BLby 20:05
it was supposed to read up to a space per line 20:06
I should really do < chr(32) assuming the ldraw format supports any whitespace character that is less than or equal to 32 (space) 20:09
or lt chr(32) 20:10
20:11 epony left, melezhik left
El_Che melezhik: use the packages I linked 20:12
tellable6 El_Che, I'll pass your message to melezhik
El_Che melezhik: they will be automatically be built for all new rakudo releases. I just need to integrate them in the repos. But they will be always built nevertheless
tellable6 El_Che, I'll pass your message to melezhik
20:18 codesections left
Homer_Simpson if its the first space then it should jump to another block, if its the second, another block , etc. if it doesn't detect spaces then it will treat 11 as matching 1 20:23
I only wrote 2 parameters per line for now but there is about 14
0 or 1 or 2 is param1 (line type), and 4 is param 2 (colour)
20:46 jpn left 21:11 Fam joined, jpn joined 21:29 xinming left 21:32 xinming joined 21:34 Fam left 21:58 xinming left, xinming joined 22:20 jpn left 22:33 xinming left 22:34 xinming joined, jpn joined 22:38 jcallen left 22:40 jpn left 22:55 jcallen joined 22:57 Homer_Simpson left 23:04 rf_ joined 23:05 rf left 23:09 jpn joined 23:14 jpn left 23:25 jpn joined 23:27 melezhik joined
melezhik . 23:27
tellable6 2023-01-20T20:12:10Z #raku <El_Che> melezhik: use the packages I linked
2023-01-20T20:12:52Z #raku <El_Che> melezhik: they will be automatically be built for all new rakudo releases. I just need to integrate them in the repos. But they will be always built nevertheless
melezhik .tell: El_Che - thanks - will let you know 23:28
tell: El_Che - thanks - will let you know 23:29
tellable6 melezhik, I'll pass your message to El_Che
23:30 n1to left 23:31 melezhik left 23:33 lichtkind left 23:35 jpn left 23:36 jpn joined, rf_ left, sena_kun left 23:41 jpn left 23:54 jpn joined