[00:00] *** guifa2 left [00:02] *** dogbert11 left [00:02] *** pecastro left [00:04] *** eax left [00:05] *** wingfold left [00:05] *** dogbert11 joined [00:05] *** wingfold joined [00:09] *** monkey__ left [00:10] *** wingfold left [00:17] *** xinming left [00:17] *** wingfold joined [00:17] *** wingfold left [00:18] *** wingfold joined [00:18] *** xinming joined [00:19] *** monkey__ joined [00:22] *** wingfold left [00:33] *** mowcat left [00:34] *** xinming left [00:35] *** xinming joined [00:49] *** wingfold joined [00:50] *** wingfold_ joined [00:50] *** wingfold left [00:51] *** wingfold joined [00:51] *** wingfold_ left [00:55] *** wingfold_ joined [00:55] *** wingfold left [00:56] *** metagib joined [00:58] Hi, i forget how to know if a number is an integer, my approach was this [00:58] "100.sqrt ~~ Int" #It's false, i but need to know if the result is an integer [01:00] *** wingfold_ left [01:02] *** _________ left [01:04] *** _________ joined [01:05] Also the bridge in the discord bot doesn´t work since more of three weeks [01:06] *** wingfold joined [01:10] m: sub integral($x) { $x == $x.Int }; print integral 100.sqrt [01:10] rakudo-moar 726a75e24: OUTPUT: «True» [01:11] actually it should be sub integral($x) { ?try { $x == $x.Int } } [01:24] *** wingfold_ joined [01:24] *** wingfold left [01:25] Nice, i remember a specific method inside the lenguaje but maybe never existed lol [01:26] m: sub isint(Numeric $number) {$number == $number.Int}; say isint 100.sqrt [01:26] rakudo-moar 726a75e24: OUTPUT: «True␤» [01:27] why the second option with try ? how is different to the first  one ? [01:28] m: sub integral($x) { $x == $x.int }; print integral 2i [01:28] rakudo-moar 726a75e24: OUTPUT: «No such method 'int' for invocant of type 'Complex'. Did you mean any␤of these: 'Int', 'UInt'?␤ in sub integral at line 1␤ in block at line 1␤␤» [01:28] m: sub integral($x) { $x == $x.Int }; print integral 2i [01:28] rakudo-moar 726a75e24: OUTPUT: «Cannot convert 0+2i to Int: imaginary part not zero␤ in sub integral at line 1␤ in block at line 1␤␤» [01:28] m: sub integral($x) { ?try { $x == $x.Int }}; print integral 2i [01:28] rakudo-moar 726a75e24: OUTPUT: «False» [01:29] (you need the ? to coerce to a boolean, otherwise it returns Nil} [01:29] *** wingfold_ left [01:34] Ohh nice, i dont consider the imaginary roots [01:35] thanks !!! [01:35] *** metagib left [01:37] *** dataangel left [01:47] *** DiffieHellman left [01:47] *** wingfold joined [01:47] *** DiffieHellman joined [01:51] *** wingfold left [02:03] *** xinming left [02:04] *** xinming joined [02:04] *** wingfold joined [02:06] *** wingfold left [02:07] *** wingfold joined [02:11] *** wingfold left [02:14] *** orinthe7 joined [02:15] *** orinthe left [02:15] *** orinthe7 is now known as orinthe [02:16] *** kvw_5 joined [02:19] *** kvw_5_ left [02:24] *** Sgeo__ joined [02:27] *** Sgeo_ left [02:32] *** monkey__ left [02:33] *** wingfold joined [02:36] *** monkey__ joined [02:38] *** guifa2 joined [02:41] *** xinming left [02:43] *** xinming joined [03:01] *** aindilis` left [03:08] *** xinming left [03:08] *** xinming joined [03:20] *** Doc_Holliwood joined [03:20] *** wingfold left [03:28] *** xinming left [03:29] *** xinming joined [03:32] *** wingfold joined [03:36] *** wingfold left [03:41] *** kaiwulf left [03:43] *** tejr left [03:44] *** tejr joined [03:45] *** xinming left [03:46] *** xinming joined [03:50] *** wingfold joined [04:00] *** asymptotically left [04:00] *** asymptotically joined [04:02] *** monkey__ left [04:08] *** asymptotically left [04:09] *** asymptotically joined [04:10] *** asymptotically left [04:11] *** asymptotically joined [04:11] *** Doc_Holliwood left [04:21] *** [Sno] joined [04:24] *** sno left [04:35] *** Doc_Holliwood joined [04:38] *** wamba joined [04:46] *** wingfold_ joined [04:46] *** wingfold left [04:46] *** parabolize left [04:46] *** maggotbrain joined [04:50] *** wingfold_ left [04:54] *** Geth left [04:57] *** wingfold joined [04:58] *** wingfold_ joined [04:58] *** wingfold left [04:59] *** wingfold joined [04:59] *** wingfold_ left [05:04] *** wingfold left [05:10] *** wingfold joined [05:15] *** wingfold left [05:16] *** japhb left [05:18] *** japhb joined [05:18] *** xinming left [05:19] *** xinming joined [05:30] *** wingfold joined [05:33] *** xinming left [05:33] *** xinming joined [05:44] *** guifa2 left [05:47] *** frost-lab joined [05:49] *** silug left [05:55] *** silug joined [06:02] *** epony left [06:16] *** wingfold left [06:24] *** xelxebar left [06:26] *** xelxebar joined [06:29] *** elcaro left [06:29] *** elcaro joined [06:30] *** wingfold joined [06:55] *** ufobat joined [06:58] *** andinus joined [07:06] *** jmcgnh left [07:13] *** jmcgnh joined [07:23] *** wamba left [07:24] *** notagoodidea joined [07:24] *** wingfold left [07:29] *** Sgeo__ left [07:39] 🎉‭🎉‭🎉‭ MUGS 0.0.6 is now released and uploaded. :-D [07:41] *** wingfold joined [07:46] *** wingfold left [07:47] *** wingfold joined [07:48] *** wamba joined [07:48] *** wingfold left [07:48] *** wingfold joined [07:50] *** wamba left [07:50] *** wamba joined [07:50] *** wamba left [07:51] *** domidumont joined [07:53] *** wingfold left [07:54] *** wamba joined [08:02] *** wamba left [08:05] *** wingfold joined [08:13] *** wingfold left [08:16] *** Manifest0 left [08:16] *** wamba joined [08:17] I am gonna pull a PR for the countdown stuff from Ben Hoyt somewhere today (simple and optimized) any modification to enhance it is welcome (in particular the optimized version) [08:20] *** Manifest0 joined [08:25] *** wingfold joined [08:37] *** aborazmeh left [08:42] *** wingfold left [08:49] *** dakkar joined [08:55] *** sena_kun left [08:56] *** wingfold joined [08:58] *** notagoodidea left [08:58] *** sena_kun joined [09:03] *** xinming left [09:03] *** xinming joined [09:05] *** El_Che_ is now known as El_Che [09:18] *** kensanata joined [09:18] *** asymptotically left [09:23] *** asymptotically joined [09:27] *** pecastro joined [09:30] *** xinming left [09:31] *** xinming joined [09:35] *** kensanata left [09:40] *** jmerelo joined [09:46] *** ufobat_ joined [09:47] *** asymptotically left [09:47] *** wingfold left [09:47] *** asymptotically joined [09:51] *** a3r0_ joined [09:55] *** jmcgnh left [09:55] *** andinus left [09:55] *** ufobat left [09:55] *** a3r0 left [09:56] *** jmcgnh_ joined [09:58] *** jmcgnh_ is now known as jmcgnh [09:58] *** jmcgnh is now known as jmcgnh_ [09:59] *** jmcgnh_ is now known as jmcgnh [10:01] *** wingfold_ joined [10:09] *** rindolf joined [10:14] *** [Sno] left [10:28] *** Doc_Holliwood left [10:32] *** Doc_Holliwood joined [10:38] *** wingfold_ left [10:50] *** wingfold joined [11:03] *** plvicente joined [11:07] *** xelxebar left [11:09] *** xelxebar joined [11:11] *** Geth joined [11:11] *** benkolera left [11:20] *** squashable6 left [11:20] *** Kaiepi left [11:21] *** squashable6 joined [11:21] *** squashable6 left [11:23] *** squashable6 joined [11:28] *** Black_Ribbon left [11:29] *** xinming left [11:29] *** xinming joined [11:37] *** wingfold left [11:50] *** wingfold joined [11:51] *** frost-lab left [11:57] *** xinming left [11:58] *** plvicente left [11:58] *** xinming joined [12:07] *** wingfold left [12:07] *** wingfold joined [12:11] *** xinming left [12:11] *** wamba left [12:13] *** xinming joined [12:25] *** wamba joined [12:26] *** plvicente joined [12:30] weekly: https://www.raku-lang.ir/en [12:30] CIAvash, Noted! (weekly) [12:36] *** Geth left [12:41] CIAvash: looks nice, but how is it intended? as a proposal? a demo ? [12:42] *** Doc_Holliwood left [12:46] lizmat: It was a proposal a year ago when I opened an issue for it on problem-solving, but now it's an alternative website. But the community still can use the source code for creating a new site if they want to. [12:46] *** plvicente left [12:47] weekly: lizmat: It was a proposal a year ago when I opened an issue for it on problem-solving, but now it's an alternative website. But the community still can use the source code for creating a new site if they want to. [12:47] lizmat, Noted! (weekly) [12:47] so I won't forget :-) [12:47] afk& [12:48] *** notagoodidea joined [12:48] https://github.com/benhoyt/countwords/pull/74 here it is. [12:48] it's nothing special but hey why not. [12:49] *** __jrjsmrtn__ left [12:50] *** __jrjsmrtn__ joined [12:52] *** epony joined [12:56] *** xinming left [12:57] *** monkey__ joined [12:57] *** xinming joined [13:00] m: (^9).classify({$_ %% 2 ?? :{:first:2k} !! :{:second:2k}}, :into(my %h{Hash})) [13:00] rakudo-moar 726a75e24: OUTPUT: «Type check failed in binding to parameter 'key'; expected Hash but got Pair (:k(2))␤ in block at line 1␤␤» [13:01] what am doing wrong ^^^^ ? [13:02] This looks like it should construct a %h Hash with Hash keys. But the keys are turned into Pairs somehow? [13:04] *** plvicente joined [13:04] m: say :{:first:2k}.WHAT [13:04] rakudo-moar 726a75e24: OUTPUT: «(Hash[Mu,Any])␤» [13:04] it _should_ be a Hash... [13:12] oh, I guess the fact that a Hash is an Iterable is confusing things? [13:20] *** monkey__ left [13:25] *** plvicente left [13:39] *** jmerelo left [13:43] *** QhpAptyj9hj0RQwM joined [13:45] *** wingfold left [13:45] *** wingfold joined [13:46] *** Gruber is now known as Grrrr [13:47] *** wingfold left [13:47] *** wingfold joined [13:48] *** wingfold_ joined [13:48] *** wingfold left [13:50] *** wingfold_ left [13:50] actually, I'm just having difficulty with _any_ way of using Hashes as Hash keys [13:50] *** wingfold joined [13:51] m: my %h{Hash}; %h{ %(:k1:k2) } = 42 [13:51] rakudo-moar 726a75e24: OUTPUT: «Type check failed in binding to parameter 'key'; expected Hash but got Pair (:k1("v1"))␤ in block at line 1␤␤» [13:51] camelia: that's because hashes are not a value type [13:51] erm, meant codesections [13:52] *** wingfold left [13:52] reading the docs on that now. [13:52] ty [13:52] *** wingfold joined [13:53] moritz: does that mean that only value types can be used as Hash keys? [13:54] *** plvicente joined [13:57] yes [13:58] But I can use a List of Pairs as a key. Lists aren't value types either, are they? [13:58] Or does immutability mean they are? [13:58] *** Doc_Holliwood joined [13:59] *** Sgeo joined [14:00] m: say (1, 2, 3).WHICH [14:00] rakudo-moar 726a75e24: OUTPUT: «List|73990384␤» [14:00] hm, looks more like a ref type to me [14:01] but I think lizmat did some of work on that some time ago, maybe she knows? [14:04] *** wingfold left [14:04] *** wingfold joined [14:05] m: my %h; %h{ (:k1:k2).Map } = 42; [14:05] rakudo-moar 726a75e24: ( no output ) [14:05] m: my %h; %h{ (:k1:k2).Map } = 42; %h.keys.map: {.WHAT.say} [14:05] rakudo-moar 726a75e24: OUTPUT: «(Str)␤(Str)␤» [14:06] *** plvicente left [14:06] *** wingfold_ joined [14:06] m: my %h := :{ (:k1:k2).Map = 42}; %h.keys.map: {.WHAT.say} [14:06] rakudo-moar 726a75e24: OUTPUT: «Type check failed in binding; expected Associative but got Block (-> ;; $_? is raw = O...)␤ in block at line 1␤␤» [14:06] *** wingfold left [14:07] m: my %h := :{ (:k1:k2).Map => 42}; %h.keys.map: {.WHAT.say} [14:07] rakudo-moar 726a75e24: OUTPUT: «(Map)␤» [14:07] *** wingfold_ left [14:07] there we go... [14:07] *** wingfold joined [14:07] m: my %h := :{ (:k1:k2).Hash => 42}; %h.keys.map: {.WHAT.say} [14:07] rakudo-moar 726a75e24: OUTPUT: «(Hash)␤» [14:09] *** xinming left [14:09] moritz: ^^^ it looks like I can use Hashes/other ref types as keys just fine -- just not as a constraint? [14:10] *** QhpAptyj9hj0RQwM left [14:10] *** xinming joined [14:11] m: my Hash $h = :{ (:k1:k2).Hash => 42}; $h.keys.map: {.WHAT.say} [14:11] rakudo-moar 726a75e24: OUTPUT: «(Hash)␤» [14:11] *** QhpAptyj9hj0RQwM joined [14:12] *** wingfold left [14:12] (also seems to work with assignment, not just binding) [14:12] *** wingfold joined [14:14] *** wingfold_ joined [14:14] *** wingfold left [14:15] *** wingfold joined [14:15] *** wingfold_ left [14:17] *** wingfold left [14:18] *** wingfold joined [14:19] *** astik_ joined [14:22] *** wingfold left [14:23] *** astik__ left [14:24] *** notagoodidea left [14:31] *** notagoodidea joined [14:37] *** wingfold joined [14:42] *** daimon is now known as daemon [14:46] *** plvicente joined [14:47] *** plvicente left [14:53] *** parabolize joined [14:58] *** Doc_Holliwood left [15:10] *** Doc_Holliwood joined [15:16] *** plvicente joined [15:18] *** codesect` joined [15:19] *** codesections left [15:21] *** QhpAptyj9hj0RQwM left [15:22] *** QhpAptyj9hj0RQwM joined [15:24] *** codesections joined [15:30] SmokeMachine: I think I just now found a bug, where when we try to save the Blob col type, Red will try to concat the Blob to Str with ~ operator. [15:34] *** xinming left [15:35] *** xinming joined [15:39] xinming: would you mind to open an issue with an example of code for that, please? [15:39] *** notagoodidea left [15:40] *** literal joined [15:40] *** plvicente left [15:41] *** wingfold left [15:41] SmokeMachine: Ok, creation worked, while calling .^save will raise exception. [15:41] *** wingfold joined [15:45] *** wingfold left [15:52] *** wingfold joined [15:53] *** xinming left [15:53] *** xinming joined [15:56] hmm, ignore me, It seems, It's because of wrong type of column, after I changed column to other type, I can't seem to reproduce the bug [15:57] *** Kaiepi joined [15:57] *** wingfold left [15:58] xinming: That sounds a lot like this issue: https://docs.raku.org/language/traps#Using_[~]_for_concatenating_a_list_of_blobs [15:59] *** codesect` left [15:59] *** codesections left [16:00] *** codesections joined [16:00] *** wingfold joined [16:01] *** wingfold_ joined [16:01] *** wingfold left [16:05] *** wingfold_ left [16:05] *** wingfold joined [16:05] *** plvicente joined [16:09] *** Doc_Holliwood left [16:10] *** wingfold left [16:16] *** b2gills left [16:18] *** jmerelo joined [16:23] *** wingfold joined [16:32] *** notagoodidea joined [16:37] *** plvicente left [16:38] *** QhpAptyj9hj0RQwM left [16:46] *** wingfold left [16:46] *** wingfold joined [16:49] *** wingfold_ joined [16:49] *** wingfold left [16:50] *** QhpAptyj9hj0RQwM joined [16:53] *** wingfold_ left [16:53] *** plvicente joined [17:01] *** wingfold joined [17:06] *** wingfold left [17:06] *** wingfold joined [17:07] * [Coke] wonders how having a hash as a key is helpful. [17:07] <[Coke]> That is, what's the use case? [17:11] *** xinming left [17:12] *** xinming joined [17:17] *** QhpAptyj9hj0RQwM left [17:18] *** QhpAptyj9hj0RQwM joined [17:18] *** aluaces left [17:31] *** plvicente left [17:38] *** dakkar left [17:47] *** aborazmeh joined [17:49] *** samcv_ is now known as samcv [17:49] *** samcv left [17:49] *** samcv joined [17:54] *** tison joined [18:09] *** ufobat_ left [18:09] *** tison left [18:11] *** wingfold_ joined [18:11] *** wingfold left [18:16] *** wingfold_ left [18:19] <[Coke]> if I run 'zef install MUGS' I get as far as "===> Searching for missing dependencies: RPG::Base, Cro::WebApp, Term::termios, Text::MiscUtils::Layout, Pluggable" and then it hangs. [18:19] <[Coke]> (trying again with --verbose) [18:20] *** wingfold joined [18:21] *** wingfold left [18:21] *** lynx__ joined [18:21] *** wingfold joined [18:24] <[Coke]> ... maybe the new 0.0.6 release just now fixed it? install proceeding [18:25] *** Geth joined [18:25] <[Coke]> (can't easily see the old version I tried to install, it scrolled off) [18:26] *** wingfold left [18:35] *** wingfold joined [18:36] *** aluaces joined [18:39] *** wingfold left [18:42] *** xinming_ joined [18:46] *** xinming left [18:46] *** jmerelo left [18:46] *** wamba left [18:49] [Coke]: Did the install complete? [18:51] <[Coke]> no. ended up getting a segfault instead [18:51] [Coke]: Hmm. What OS are you running, and how did you install zef? [18:53] *** wingfold joined [18:53] *** wamba joined [18:54] *** jmerelo joined [18:58] *** wingfold left [18:59] *** eseyman left [19:00] *** notagoodidea left [19:03] That way I might be able to recreate the issue on my end :) [19:05] *** eseyman joined [19:09] curious, why is there no builtin infix operator for appending lists? [19:09] e.g. infix:<..>(@a, @b) { |@a, |@b } [19:09] *** mowcat joined [19:10] *** wingfold joined [19:10] m: my @a = <0 2 6>; my @b = <7 8 9>; @a ,= @b; say @a [19:10] rakudo-moar 726a75e24: OUTPUT: «(\Array_58686824 = [Array_58686824 [7 8 9]])␤» [19:11] er, [19:11] *** domidumont left [19:12] ooh, I didn't know there was prettyprinting for circular data structures [19:12] that's neat [19:20] *** QhpAptyj9hj0RQwM left [19:24] *** QhpAptyj9hj0RQwM joined [19:28] *** lynx__ left [19:30] *** drakonis left [19:31] *** wingfold left [19:32] *** xelxebar left [19:32] *** xelxebar joined [19:34] *** drakonis joined [19:34] *** wingfold joined [19:37] *** Doc_Holliwood joined [19:39] *** wingfold left [19:43] *** wingfold joined [19:48] *** wingfold left [19:48] *** brtastic joined [19:53] *** wingfold joined [19:55] *** jmerelo left [19:55] *** benkolera joined [20:01] *** wamba left [20:18] *** QhpAptyj9hj0RQw joined [20:22] *** QhpAptyj9hj0RQwM left [20:30] *** aindilis joined [20:39] *** wingfold left [20:45] *** wingfold joined [20:46] *** wingfold left [20:46] *** wingfold joined [20:49] *** wingfold left [20:49] *** wingfold joined [20:54] *** wingfold left [20:59] *** wingfold joined [21:00] the below behavior is a bug, right? [21:01] m: sub f(:$named) {dd $named}; f(:named('k1' => (:pair:done), 'k2' => :pair:done)) [21:01] rakudo-moar 726a75e24: OUTPUT: «$(:k1((:pair("list"), :done("right"))), :k2(:pair("list")))␤» [21:02] I know there's a syntax error -- the second pair list should be inside parens. But that should result in the Signature not matching, right? Not just silently disappear... [21:04] I think it's applied as an adverb somewhere... but TBH this is something I never managed to wrap my head around [21:04] *** drakonis left [21:04] adverb like in the %hash:delete access [21:06] hmm, I thought that implemented through named parameters. Hold on, I just read something about that [21:07] https://perl6advent.wordpress.com/2013/12/10/day-10-adverbly-adverby-adverbs/ [21:12] m: sub f(:$named, *%h) {dd $named; dd %h}; f(:named('k1' => (:pair:done), 'k2' => :pair:done)) [21:12] rakudo-moar 726a75e24: OUTPUT: «$(:k1((:pair("list"), :done("right"))), :k2(:pair("list")))␤Hash element = {}␤» [21:12] if it's turning into an adverb, then in theory it should show up in the slurpy, right? [21:15] *** QhpAptyj9hj0RQw left [21:21] is there a way to do ioctls in raku (without nativecall)? https://docs.raku.org/language/5to6-perlfunc#ioctl indicates no dice, but maybe that's out of date? [21:22] codesections: it might be an adverb to the pair constructor, which ignores it? [21:23] moritz: Oh, good thought. [21:24] http://perlpunks.de/paste/show/60527389.2f5c.1fc [21:25] the QAST::WVal+{QAST::SpecialArg}(Str :named) d in the argument list of the .new call seems to support this hypothesis [21:26] so does [21:26] m: say Pair.^lookup('new').signature [21:26] rakudo-moar 726a75e24: OUTPUT: «(Pair: |)␤» [21:27] m: say Pair.^lookup('new').candidates.map: *.signature [21:27] rakudo-moar 726a75e24: OUTPUT: «((Pair: Cool:D \key, Mu \value, *%_) (Pair: Mu \key, Mu \value, *%_) (Pair: Mu :$key!, Mu :$value!, *%_))␤» [21:28] m: say &infix:«=>».candidates.map: *.signature [21:28] rakudo-moar 726a75e24: OUTPUT: «((Mu $key, Mu \value))␤» [21:29] yep, moritz, you were right. So that just leaves the question of whether it's a bug or not [21:32] *** brtastic left [21:33] *** kaiwulf joined [21:40] *** wingfold left [21:40] *** wingfold joined [21:44] *** wingfold_ joined [21:44] *** wingfold left [21:48] *** wingfold_ left [22:02] *** wingfold joined [22:03] *** daxim left [22:26] *** aindilis` joined [22:26] *** aindilis left [22:34] *** xinming_ left [22:35] *** xinming_ joined [22:37] m: my uint8 $x = 0; print +^ $x; [22:37] rakudo-moar 726a75e24: OUTPUT: «-1» [22:37] hmmm... [22:37] on my system, that prints 'Cannot invoke this object (REPR: P6opaque; NQPMu)'. Either way, I want it to return 255 instead of coercing to a regular Int. Is there a way to do that? [22:39] *** aindilis` left [22:40] *** aindilis joined [22:42] moon-child: I'm pretty sure there are some bugs in our uint code atm: https://github.com/rakudo/rakudo/issues/3936 [22:44] m: my uint8 $x = 0; print (my $ = +^ $x) [22:44] rakudo-moar 726a75e24: OUTPUT: «-1» [22:44] m: my uint8 $x = 0; print (my $ = +^$x) [22:44] rakudo-moar 726a75e24: OUTPUT: «-1» [22:44] m: my uint8 $x = 0; print (my $ = +^ $x<>) [22:44] rakudo-moar 726a75e24: OUTPUT: «-1» [22:44] m: my uint8 $x = 0; print (my $ := +^$x) [22:44] rakudo-moar 726a75e24: OUTPUT: «-1» [22:44] *** wingfold left [22:45] m: my uint8 $x = 0; print (my $ = +^ 0) [22:45] rakudo-moar 726a75e24: OUTPUT: «-1» [22:45] m: my uint8 $x = 0; print (my uint8 $ = +^ $) [22:45] rakudo-moar 726a75e24: OUTPUT: «Use of uninitialized value of type Any in numeric context␤255 in block at line 1␤» [22:46] :/ [22:46] m: my uint8 $x = 0; print (my uint8 $ = +^ $x) [22:46] rakudo-moar 726a75e24: OUTPUT: «255» [22:46] ...which is actually what I *meant* to type the first time... [22:49] *** mowcat left [22:51] *** oneeggeach joined [22:51] *** wingfold joined [22:52] *** wingfold left [22:52] *** wingfold joined [22:55] hmmm, I still get this error 'Cannot invoke this object (REPR: P6opaque; NQPMu)' [22:55] with the latest git [22:55] (aside: anyone know why the makefile opts to install into a local dir instead of system-wide?) [22:57] *** wingfold left [22:58] Odd, I don't get that error on release or git (though I haven't built it in a few days) [22:59] I don't know the reasoning for the Makefile, but I like to keep the dev version in its own folder and run release for other work, so I'm fine with it. [23:00] But you can set a different one with an argument to the ./configure script [23:00] *** xelxebar left [23:00] *** xelxebar joined [23:05] *** Black_Ribbon joined [23:07] reverted to the same commit hash as the bot; same result [23:07] weird [23:07] guess I'll have to make my utf8 decoder less clever then [23:08] Why do a utf8 decoder? It's built in ... [23:09] I'm making a repl, so it needs to read a character at a time. And builtin getc has one character of buffering, for combining characters, which I can't find out how to disable [23:09] so, I don't actually need to do the decoding myself, but I need to know how many continuation bytes to fetch [23:15] *** xinming_ left [23:16] *** xinming_ joined [23:17] moon-child: Oh, I have a solution to that. [23:18] https://github.com/ab5tract/Terminal-Print/blob/master/lib/Terminal/Print/RawInput.pm6 or https://github.com/ab5tract/Terminal-Print/blob/master/lib/Terminal/Print/DecodedInput.pm6 or https://github.com/Raku-MUGS/MUGS-UI-CLI/blob/main/lib/MUGS/UI/CLI/Input.rakumod (all of which I wrote at various times and for various needs) [23:20] The first one just allows you to get raw input that hands you data as soon as there are enough utf8 bytes to decode, and importantly *WITHOUT* waiting for combining characters. [23:20] The second one decodes escape sequences and special keys streaming from the RawInput supply. [23:21] The third one is a start on a Linenoise/ReadLine replacement that isn't as broken as Linenoise is, nor nearly as large/complex as Readline. [23:22] hmmm, I already wrote the function and basic escape decoding, but might steal some of your code there [23:22] It's worth knowing BTW, that it's safe to concatenate strings ending with base characters with strings starting with combining characters -- MoarVM automatically does NFG fixups to make the string normalized afterwards. [23:23] *** wingfold joined [23:23] ahh, that's good to know [23:25] *** berber44 joined [23:25] moon-child: One useful bit is that the third one (the Linenoise replacement) is the first one with code to multiplex querying the terminal and reading input. [23:26] Which is useful for determining where the cursor actually is, how big the terminal is, etc. [23:29] *** rindolf left [23:32] The biggest limitation of the Linenoise replacement is that I hadn't added escape sequence decoding yet (nor history search, tab completion, or hints, but those aren't fundamental to the input question you seemed to have) [23:33] tab completion will be a pain. I want to do what zle does and show the completions below the prompt (without making a new one, like bash does), but that seems somewhat involved [23:33] ... which is pretty much why I hadn't yet split it out of the MUGS codebase and released it separately, though that's likely at some point; Linenoise is just too broken around ANSI and non-latin alphabets. [23:33] I think someone did a linenoise that handled utf8 [23:34] As far as I could tell, that project got abandoned ... and I doubt it was ever as Unicode-smart as Raku is out of the box. [23:35] few things are as unicode-smart as raku is out of the box :P [23:35] The tab completions on a different line thing are why being able to query the terminal while accepting input is very useful. ;-) [23:36] But the other problem is that Linenoise is utterly unaware of ANSI sequences in the prompt (despite using them for terminal control). Which means if you like to highlight your prompts ... Linenoise will happily screw things up as soon as you backspace at start of input. [23:36] it also doesn't support multiline editing or input [23:37] Also Linenoise can't understand not havin the full display width to work with. So if you want to keep your input line inside a frame, well ... SOL. [23:37] Yeah, it does long line input. Sorta. But not multiline. [23:45] *** wingfold left [23:50] *** wingfold joined [23:51] *** wingfold_ joined [23:51] *** wingfold left [23:55] *** wingfold_ left