[00:02] *** reportable6 left [00:03] *** reportable6 joined [00:36] *** aborazmeh left [00:38] *** aborazmeh joined [00:39] *** aborazmeh left [00:43] *** brtastic left [01:33] *** canbenshanlo left [01:34] *** kvw_5 left [01:36] *** kvw_5 joined [02:10] *** parabolize joined [03:10] *** evalable6 left [03:10] *** statisfiable6 left [03:10] *** sourceable6 left [03:10] *** tellable6 left [03:10] *** bloatable6 left [03:10] *** reportable6 left [03:10] *** nativecallable6 left [03:10] *** releasable6 left [03:10] *** quotable6 left [03:10] *** greppable6 left [03:10] *** bisectable6 left [03:10] *** coverable6 left [03:10] *** committable6 left [03:10] *** linkable6 left [03:10] *** notable6 left [03:10] *** shareable6 left [03:10] *** unicodable6 left [03:10] *** squashable6 left [03:10] *** benchable6 left [03:11] *** greppable6 joined [03:11] *** quotable6 joined [03:11] *** statisfiable6 joined [03:11] *** unicodable6 joined [03:11] *** tellable6 joined [03:11] *** nativecallable6 joined [03:11] *** squashable6 joined [03:12] *** shareable6 joined [03:12] *** benchable6 joined [03:12] *** reportable6 joined [03:12] *** releasable6 joined [03:12] *** evalable6 joined [03:12] *** bisectable6 joined [03:12] *** notable6 joined [03:12] *** bloatable6 joined [03:13] *** sourceable6 joined [03:13] *** linkable6 joined [03:13] *** committable6 joined [03:14] *** coverable6 joined [03:20] *** |Sno| joined [03:23] *** [Sno] left [03:47] *** rindolf joined [04:28] *** tejr left [04:30] *** tejr joined [04:59] *** squashable6 left [05:01] *** squashable6 joined [05:54] *** stoned75 joined [06:02] *** reportable6 left [06:03] *** epony left [06:04] *** reportable6 joined [06:05] *** epony joined [06:24] *** wamba joined [06:25] *** Sgeo left [06:25] *** Sgeo_ joined [06:25] *** stoned75 left [06:28] *** parabolize left [07:05] *** sxmx1 left [07:16] *** brtastic joined [07:18] *** stoned75 joined [07:45] *** aluaces joined [08:32] *** stoned75 left [08:47] ¦ doc: 9ef2ef0046 | (JJ Merelo)++ | doc/Language/variables.pod6 [08:47] ¦ doc: Removing references to "interpolation" [08:47] ¦ doc: [08:47] ¦ doc: Slightly rewording and explaining what a twigil is, too. Following @treyharris pointed advice on the thoughts on the original test. Closes #2588 [08:47] ¦ doc: review: https://github.com/Raku/doc/commit/9ef2ef0046 [08:47] Link: https://docs.raku.org/language/variables [08:48] *** linkable6 left [08:49] *** linkable6 joined [08:52] *** daxim left [08:55] *** frost-lab joined [08:56] *** squashable6 left [08:56] *** pecastro joined [08:57] *** squashable6 joined [08:59] *** Sgeo_ left [09:08] *** daxim joined [09:41] *** stoned75 joined [10:15] *** rindolf left [10:17] *** Black_Ribbon left [10:18] ¦ doc: d685762903 | (JJ Merelo)++ | 2 files [10:18] ¦ doc: Splits the "environment variables" file in two parts [10:18] ¦ doc: [10:18] ¦ doc: The original file no longer reflected its intent, so it's better to have it split. It also helps with making information on running raku more prominent, following #2263 [10:18] ¦ doc: review: https://github.com/Raku/doc/commit/d685762903 [10:18] ¦ doc: 185de4d168 | (JJ Merelo)++ | doc/Programs/04-running-raku.pod6 [10:18] ¦ doc: Changes text to current raku -h text [10:18] ¦ doc: [10:18] ¦ doc: Which includes a good amount of stuff... [10:18] ¦ doc: review: https://github.com/Raku/doc/commit/185de4d168 [10:18] ¦ doc: 530d05ed56 | (JJ Merelo)++ | doc/Programs/04-running-raku.pod6 [10:18] ¦ doc: Some clarifications #2263 [10:18] ¦ doc: [10:18] ¦ doc: It remains to check if those target options still remain. [10:18] ¦ doc: review: https://github.com/Raku/doc/commit/530d05ed56 [10:18] *** linkable6 left [10:19] *** linkable6 joined [10:28] *** linkable6 left [10:31] *** linkable6 joined [10:42] *** canbenshanlo joined [11:01] *** rindolf joined [11:49] *** brtastic left [11:54] *** holli left [12:02] *** reportable6 left [12:04] *** reportable6 joined [12:30] *** whatnext joined [12:32] *** linkable6 left [12:33] hello all:)  quick question: I understand that executing a method stored in a variable can be done via `$object."$variable"()` - but what about a meta method? Neither `$object."^$variable"()` or `$object.^"variable"()` seem to work? [12:35] *** linkable6 joined [12:38] there might be a shorter way, but this is what comes to mind: [12:38] m: my $meth = 'methods'; say 42.HOW."$meth"(42) [12:38] rakudo-moar dcd354efe: OUTPUT: «(new Capture Int sign Num Rat FatRat abs Bridge sqrt base polymod expmod is-prime floor ceiling round lsb msb narrow Range conj rand sin asin cos acos tan atan atan2 sec asec cosec acosec cotan acotan sinh asinh cosh acosh tanh atanh sech asech cosech…» [12:39] (42.^methods is just sugar for 42.HOW.methods(42)) [12:40] ah yes ok I get it - thanks I will try that [13:16] is HOW an acronym ? [13:17] *** whatnext left [13:18] Yeah, for Higher Order Workings (I wasn't around, but I suspect they really wanted it to spell HOW, because that doesn't mean a whole lot...) [13:24] *** wamba left [13:26] it also ties into WHO, WHICH, WHAT and WHY, other ALLCAPS introspection methods [13:27] and WHERE [13:58] thx ! [14:05] *** domidumont joined [14:17] *** DiffieHellman left [14:18] *** DiffieHellman joined [14:41] *** frost-lab left [14:48] *** spacebat2 left [14:49] *** spacebat2 joined [15:00] is there a json kind of file format which has richer types but cross platform please? [15:00] xml? [15:01] TOML and YAML are also frequently suggested [15:06] *** rindolf left [15:07] *** parabolize joined [15:14] ¦ doc: ea511b1702 | (Stoned Elipot)++ | doc/Language/nativetypes.pod6 [15:14] ¦ doc: Use code formatting [15:14] ¦ doc: review: https://github.com/Raku/doc/commit/ea511b1702 [15:14] Link: https://docs.raku.org/language/nativetypes [15:18] * ecocode[m]1 < https://matrix.org/_matrix/media/r0/download/matrix.org/zMyWiemoeUUJwTElakLqZCiU/message.txt > [15:19] ugexe: xml feels too lengthy [15:19] I'll check TOML, I don't like yml [15:20] * ecocode[m]1 < https://matrix.org/_matrix/media/r0/download/matrix.org/nPGlaQbJVhbgmjvfmdpTMOrL/message.txt > [15:45] *** stoned75 left [15:56] *** daxim left [15:56] *** daxim joined [16:18] *** Kaeipi joined [16:18] *** Kaiepi left [16:19] *** sftp left [16:19] *** sftp joined [16:23] *** Kaeipi left [16:23] *** sena_kun left [16:23] *** Kaeipi joined [16:25] *** sena_kun joined [16:31] *** aluaces left [16:42] *** mowcat joined [16:46] howdy! [16:48] pray tell what is the unicode hex value for the tiny newline char as is desired in a pod doc OUTPUT: line? [16:50] m: say "foo" [16:50] rakudo-moar 77d8a6d40: OUTPUT: «foo␤» [16:50] m: say "␤".ord [16:50] rakudo-moar 77d8a6d40: OUTPUT: «10␤» [16:50] m: say "␤".uniname [16:50] rakudo-moar 77d8a6d40: OUTPUT: «␤» [16:50] hmmmm [16:51] some weird interaction there, locally: [16:51] $ r 'say "␤".ord.base(16)' [16:51] 2424 [16:52] $ r 'say "␤".uniname' [16:52] SYMBOL FOR NEWLINE [16:53] the two enclosing guillemot codes are xaa and xbb [16:54] i can use the uniname, thanks, lizmat [16:55] m: say "\x2424" [16:55] rakudo-moar 77d8a6d40: OUTPUT: «␤␤» [17:00] * ecocode[m]1 < https://matrix.org/_matrix/media/r0/download/matrix.org/pISvOvhyqftUMSjWMIuiDVAf/message.txt > [17:02] m: say "\c[symbol for newline]" [17:02] rakudo-moar 77d8a6d40: OUTPUT: «␤␤» [17:03] m: say "\c[newline]" [17:03] rakudo-moar 77d8a6d40: OUTPUT: «5===SORRY!5=== Error while compiling ␤Unrecognized character name [newline]␤at :1␤------> 3say "\c[newline7⏏5]"␤» [17:07] ecocode[m]1 not sure how to interpret the gist: if it is a question, why not just asked ? [17:09] *** brtastic joined [17:09] lizmat: there is a question 😉 "How do I send a pointer to an int32 raku var to a C-function ? " [17:09] but it is probably bad formulated [17:09] * but it is probably badly formulated [17:10] isn't this just about setting up the right signature for the "is native" sub? [17:10] m: say "OUTPUT: \xabsome string\x2424\bb" [17:10] rakudo-moar 77d8a6d40: OUTPUT: «OUTPUT: «some string␤b␤» [17:11] m: print "\xabsome string\x2424\xbb" [17:11] rakudo-moar 77d8a6d40: OUTPUT: ««some string␤»» [17:11] ``` [17:11] sub cfunc ( int32 is rw ) returns int32 is native('mylib') {*}; [17:11] ``` [17:12] but does not work [17:13] or maybe it does, but I can't figure how to send take a Pointer to my ```int32 $var``` when I call the sub [17:13] * or maybe it does, but I can't figure how to take a Pointer to my `int32 $var` when I call the sub [17:14] from this code I cannot draw any conclusion on what could be wrong [17:14] need some code that shows a wrong answer and what you expect it to be [17:15] hmmm [17:15] I'm trying to call a function from the lpsolve lib [17:16] I can send you the code I am trying out, but you'd need to install the lib on your system ... [17:17] and I don't want you to bloat your system for me [17:17] *** wamba joined [17:18] please make a gist of the code [17:19] is that lib apt-gettable ? [17:20] https://glot.io/snippets/fynuds3xgg [17:20] I guess so... it should be called lpsolve [17:21] E: Unable to locate package lpsolve # meh [17:21] > <@freenode_lizmat:matrix.org> is that lib apt-gettable ? [17:21] * I guess so... it should be called lp-solve [17:21] echo! [17:21] corrected: lp-solve [17:24] ```my $pv_row = nativecast(Pointer[num64],$v_row);``` [17:24] is just one of the many trials I did... [17:24] I did not expect it function [17:27] Cannot locate native library 'liblp-solve55.so' # meh [17:27] it *is* there [17:29] *** aluaces joined [17:30] hmprf [17:30] Native call cast expected return type with CPointer, CStruct, CArray, or VMArray representation, but got a P6opaque (Num) [17:30] does that sound familiar ? [17:30] yup [17:31] at least with the code I pushed ... [17:31] still trying out a lot of stuff [17:31] no success though [17:33] I can't seem to get a Pointer to the num64 $v_row [17:33] and nativecall is very opaque to me (if that is what I need) [17:36] ecocode[m]1: I don't see immediately what is wrong, I hope someone else will pick this up [17:38] Ok. Thanks for looking into this ! [17:38] ecocode[m]1 just too deep into other stuff atm, sorry [17:39] in any case, looks like debian has the lp-solve library installed by default, so there no problem wrt bloating systems [17:46] ecocode[m]1: fwiw, I'm working on a better way to look at the IRC logs: [17:46] https://logs.liz.nl/raku/search.html # alpha version [17:50] awesome ! [18:01] *** holli joined [18:02] *** reportable6 left [18:03] *** reportable6 joined [18:03] hi ecocode[m]1 [18:04] ecocode[m]1: add_constraintex is expecting arrays, not just pointers to single values. something more like "sub add_constraintex( LPrec, int32, CArray[num64], CArray[int32], int32, num64)" is probably closer [18:17] *** canbenshanlo left [18:17] *** holli left [18:21] I'll try that out [18:27] *** patrickb joined [18:33] *** domidumont left [18:37] here is one working example: https://gist.github.com/raydiak/4b41408ebf17ee8e103886ba54f23c4f [18:40] not saying it's the best way to do it, I'm no expert with nativecall and typed arrays and all that, but hopefully it's a starting point for learning [18:41] thx ! [18:41] you're welcome :) [18:42] I had this https://glot.io/snippets/fynwl27pky , but that gave an error... [18:42] I compare with yours 😀 [18:44] *** stoned75 joined [18:44] also notice you can't have a space between "sub" and "(arg, arg, ...)". you can either do "sub arg, arg, ..." or "sub(arg, arg, ...)". it treats "sub (arg, arg, ...)" as passing a single list instead of multiple arguments to the sub [18:46] excellent ! that space solved the issue !!!! [18:47] just for future reference, telling us what error you're getting can be very useful instead of just "an error" :) [18:47] now that is weird though [18:48] is that only for NativeCall subs ? or also for normal methods ? [18:48] all subs [18:48] *** Sgeo joined [18:48] yup, figured that 😀 [18:49] it still feels weird ;) [18:49] it thinks "sub (arg1, arg2, ...)" is the "sub arg1, arg2, ..." form because of the space, so it treats the "(arg1, arg2, ...)" as a List being passed all into the first parameter [18:50] because you define methods with a space after the subname and you can't when you call it [18:50] yup, I understand the idea.. [18:51] you can define subs/methods without the space if it makes you feel better :) [18:51] maybe it is good practice to never add a space between subname and ( [18:52] that's what I prefer, but people like Tux disagree :-) [18:52] but then, they have a slang all to their own :-) [18:53] so you do ```subname( arg1, arg2 )``` [18:53] ? [18:53] or you just remove all the spaces ? [18:53] I don't, but you can :) [18:53] I tend to just not use the () unless I have to [18:54] hmmm [18:54] when do you "have to" ? [18:55] my definitions usually look like "sub subname ($param1, $param2) {" and call like "subname $arg1, $arg2;" [18:55] I'd love to have a rakutidy for this 😀 [18:56] if there's something else after the sub call you need the parens. e.g. "get_something($with, $args).do_something_else_with_it" [18:56] ah ok [18:57] or if it's in a list like "(sub1($arg), sub2($arg))" [18:58] because (sub1 $arg, sub2 $arg) parses as (sub1($arg, sub2($arg))) [18:58] I think [18:59] anywhere it seems ambiguous I just add the parens to make sure [19:00] yup, I'll follow the footsteps of lizmat 😀 [19:00] well, now that the code seems to work, it looks pretty clean 🤓 [19:00] she is an excellent example to follow, very clean and clear code from what I've seen. better than my own, for sure [19:48] *** linkable6 left [19:48] *** evalable6 left [19:48] *** linkable6 joined [19:49] *** evalable6 joined [20:46] *** brtastic left [20:48] *** stoned75 left [20:59] *** rindolf joined [21:09] *** wingfold joined [21:12] *** patrickb left [21:22] *** kst left [21:30] *** mowcat left [21:37] m: sub f (Num() @a) { dd @a }; f [1] [21:37] rakudo-moar 77d8a6d40: OUTPUT: «Type check failed in binding to parameter '@a'; expected Positional[Num(Any)] but got Array ([1])␤ in sub f at line 1␤ in block at line 1␤␤» [21:37] this is something I never quite learned...I get that it isn't accepting it because the type of the passed array doesn't match the type of the parameter, but how *do* I get it to accept a plain untyped list of whatever and coerce it to an array of e.g. Num in this example? [21:37] *** wingfold left [21:37] *** kst joined [21:39] m: sub f (Array[Num()]() $a) { dd $a}; say f [1] [21:39] rakudo-moar 77d8a6d40: OUTPUT: «Array[Num(Any)].new(1e0)␤Nil␤» [21:40] I don't know how to do so with an @ sigil, though [21:40] thanks! can I do that with an @-sigiled parameter? [21:40] ah, you beat me :) [21:41] yeah, it _seems_ like there should be a way..., but I haven't found it [21:42] m: sub f (Num() @a) { dd @a; }; my Int @b = 1,2,3; f @b [21:42] rakudo-moar 77d8a6d40: OUTPUT: «Array[Int] @b = Array[Int].new(1, 2, 3)␤» [21:42] hmm [21:44] m: say Int ~~ Num(); [21:44] rakudo-moar 77d8a6d40: OUTPUT: «True␤» [21:45] m: sub f (Array[Num()]() $a, @a = $a) { dd @a}; say f [1] # Not sure if this counts :D [21:45] rakudo-moar 77d8a6d40: OUTPUT: «Array[Num(Any)].new(1e0)␤Nil␤» [21:50] heh...I'd be more inclined to put that in the body than the sig [21:52] yeah, agreed, … but that _clearly_ wouldn't be creating an @-sigiled param, where as this kind of is [21:52] or, is, but at too high a cost [22:02] are you lawyering me? ;) [22:04] m: sub f (@a where { $_.map: *.=Num }) { dd @a[0]; }; f( [1,2,3] ); f([qw]) [22:04] rakudo-moar 77d8a6d40: OUTPUT: «Num element = 1e0␤Failure element = Failure.new(exception => X::Str::Numeric.new(source => "a", pos => 0, reason => "base-10 number must begin with valid digits or '.'"), backtrace => Backtrace.new)␤» [22:04] that works too but is just as ugly [22:05] re lawyering [22:05] :D [22:06] tonyo: I _think_ that has different semantics -- doesn't that always do a run-time check, whereas Array[Num()]() is at least theoretically compile-time? [22:07] yea that's always runtime [22:14] the coercion has to be runtime too [22:14] fwiw. [22:17] fair point. Well, if we have to drop to runtime, then this is also an option [22:18] m: sub f (@a where all .map: * ~~ :Num | 0) { dd @a }; say f [1]; say f [1, 0]; f [22:18] rakudo-moar 77d8a6d40: OUTPUT: «Array element = [1]␤Nil␤Nil␤Array element = [1, 0]␤Constraint type check failed in binding to parameter '@a'; expected anonymous constraint to be met but got List (("a", "b", "c"))␤ in sub f at line 1␤ in block at line…» [22:19] (it'd actually be fairly pretty but for that 0 edge case ...) [22:23] *** aluaces left [22:24] *** dogbert11 left [22:25] *** dogbert11 joined [22:30] i guess it could be compile if everything was typed, eg eating json from a webservice into a predefined structure [22:33] *** wamba left [22:35] *** rindolf left [22:58] *** pecastro left [23:01] *** thundergnat joined [23:01] m: sub f (*@a where {.=map: *.Num}) { dd @a; }; f 0, 1e0, 3, 1.19, e; [23:01] rakudo-moar 77d8a6d40: OUTPUT: «Array element = [0e0, 1e0, 3e0, 1.19e0, 2.718281828459045e0]␤» [23:05] m: sub f (*@a where {.=map: *.Num}) { dd @a; }; f 'a', 'b'; [23:05] rakudo-moar 77d8a6d40: OUTPUT: «Array element = [Failure.new(exception => X::Str::Numeric.new(source => "a", pos => 0, reason => "base-10 number must begin with valid digits or '.'"), backtrace => Backtrace.new), Failure.new(exception => X::Str::Numeric.new(source => "b", pos => 0, …» [23:06] *** dotdotdot left [23:08] *** dotdotdot joined [23:10] m: sub f (*@a where {all .=map: *.Num}) { dd @a; }; f 'a', 'b'; [23:10] rakudo-moar 77d8a6d40: OUTPUT: «Constraint type check failed in binding to parameter '@a'; expected anonymous constraint to be met but got Array ([&CORE::infix: line 1␤ in block at line 1␤␤» [23:10] m: sub f (*@a where {all .=map: *.Num}) { dd @a; }; f 3, 4; [23:10] rakudo-moar 77d8a6d40: OUTPUT: «Array element = [3e0, 4e0]␤» [23:52] m: sub f (*@a where {.=map({$_ ~~ Numeric ?? .Num !! Num}) }) { dd @a; }; f 0, 1e0, 3, 1.19, e, 'a'; [23:52] rakudo-moar 77d8a6d40: OUTPUT: «Array element = [0e0, 1e0, 3e0, 1.19e0, 2.718281828459045e0, Num]␤» [23:57] m: say 5i ~~ Numeric; say 5i.Num [23:57] rakudo-moar 77d8a6d40: OUTPUT: «True␤Cannot convert 0+5i to Num: imaginary part not zero␤ in block at line 1␤␤» [23:57] s/Numeric/Real/