🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). This channel is logged for the purpose of keeping a history about its development | evalbot usage: 'm: say 3;' or /msg camelia m: ... | 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 8 June 2022. |
|||
00:01
linkable6 joined
00:07
reportable6 left
|
|||
SmokeMachine | saint-: it seems to be the ? On chats | 00:09 | |
00:10
reportable6 joined
|
|||
SmokeMachine | saint-: if you remove it (the `?`) it works: glot.io/snippets/gbu92d4tjy | 00:10 | |
(I removed the action while testing…) | |||
saint- | SmokeMachine why does it break though? What if I want the match to be frugal/non-greedy | 00:19 | |
Because for my actual usecase I need it to be frugal | 00:24 | ||
00:31
Colere left
00:39
kaskal- left
00:41
kaskal joined
01:02
Colere joined
|
|||
SmokeMachine | Because you haven’t said a limit it would search for, so it will only return 1 char… but if you add a limit (like a <?before> for example it works well: glot.io/snippets/gbu92d4tjy | 01:04 | |
m: say “aaaaaaaa” ~~ /a+?/ | 01:05 | ||
camelia | 「a」 | ||
SmokeMachine | m: say “aaaaaaaab” ~~ /a+?/ | ||
camelia | 「a」 | ||
SmokeMachine | m: say “aaaaaaaab” ~~ /a+? <?before “b”>/ | 01:06 | |
camelia | 「aaaaaaaa」 | ||
SmokeMachine | saint-: 👆 | ||
saint- | SmokeMachine : glot.io/snippets/gbuamtf4rl | ||
Why does it work when it isn't part of a token. Meaning like if I just put <char>?+ | 01:08 | ||
I think I get it though | |||
Because there is no end limit when it evaluates just that token on its own | |||
It's weird that those aren't equivalent though, I guess that's just how raku works right? | 01:09 | ||
SmokeMachine | What do you want? Multiple sentences? Why not `token sentence { <word>+ % <.ws> <endPunc> }; token sentRefEnd { <sentence>+ <ref> }`? | 01:11 | |
(I forgot to mention word would be `\w+` | 01:12 | ||
saint- | The % thing is interesting, didn't see that yet, but | 01:14 | |
Right now I'm just trying to understand how this works, or rather why it's not working | |||
01:15
lichtkind left
|
|||
SmokeMachine | glot.io/snippets/gbuavu593w | 01:15 | |
saint- | SmokeMachine glot.io/snippets/gbuawafqem | 01:16 | |
This still doesn't work, but the commented line works | |||
SmokeMachine | (Sorry for keep using glot.io, but I’m using my phone… so no computer to test code) | ||
saint- | That's no problem, it's a cool site! | 01:17 | |
As for my problem, I just want to understand why my example glot.io/snippets/gbuawafqem doesnt work | |||
SmokeMachine | Because char includes the endPunc, so it gets consumed by it and never is found by <?before> | ||
saint- | Oh wait okay it should be nongreedy | 01:18 | |
Non greedy doesn't work either | |||
token sentFrag { <char>+? <?before endPunc> } | |||
This doesn't help | |||
SmokeMachine | glot.io/snippets/gbuazuteey | 01:19 | |
saint- | Why doesn't non-greedy work though | 01:21 | |
It works if I don't put it in a 'sub' token | |||
I get why your example works but it's pretty contrived just for this use case | |||
Or not that clear in general I guess | |||
It's putting logic of other tokens in a lower level which shouldn't need to know about stuff | 01:22 | ||
Sorry if I'm not expressing it cleraly | |||
SmokeMachine | saint-: sorry, I’m going to sleep now… (2:22 here…) | ||
saint- | Okay no problem thanks for the help! | 01:23 | |
02:15
evalable6 left,
linkable6 left
02:16
linkable6 joined
02:17
evalable6 joined
03:17
statisfiable6 left,
bloatable6 left,
shareable6 left,
bisectable6 left,
unicodable6 left,
releasable6 left,
evalable6 left,
notable6 left,
nativecallable6 left,
greppable6 left,
coverable6 left,
committable6 left,
linkable6 left,
sourceable6 left,
benchable6 left,
quotable6 left,
tellable6 left,
reportable6 left
03:18
greppable6 joined,
coverable6 joined,
nativecallable6 joined,
benchable6 joined,
quotable6 joined
03:19
bloatable6 joined,
shareable6 joined,
statisfiable6 joined
03:20
notable6 joined,
bisectable6 joined,
committable6 joined,
releasable6 joined,
evalable6 joined,
sourceable6 joined
03:21
unicodable6 joined,
reportable6 joined,
linkable6 joined,
tellable6 joined
04:21
shareable6 left,
releasable6 left,
benchable6 left,
sourceable6 left,
reportable6 left,
unicodable6 left,
linkable6 left,
nativecallable6 left,
bisectable6 left,
coverable6 left,
tellable6 left,
notable6 left,
evalable6 left,
committable6 left,
quotable6 left,
greppable6 left,
bloatable6 left,
statisfiable6 left,
bloatable6 joined,
reportable6 joined,
notable6 joined
04:22
nativecallable6 joined,
evalable6 joined,
sourceable6 joined,
linkable6 joined,
committable6 joined,
tellable6 joined
04:23
unicodable6 joined,
bisectable6 joined,
releasable6 joined,
quotable6 joined,
greppable6 joined,
coverable6 joined
04:24
shareable6 joined,
statisfiable6 joined,
benchable6 joined
05:24
bisectable6 left,
tellable6 left,
quotable6 left,
committable6 left,
reportable6 left,
linkable6 left,
statisfiable6 left,
shareable6 left,
coverable6 left,
bloatable6 left,
nativecallable6 left,
notable6 left,
sourceable6 left,
greppable6 left,
unicodable6 left,
releasable6 left,
evalable6 left,
benchable6 left,
evalable6 joined
05:25
benchable6 joined,
committable6 joined,
quotable6 joined,
bloatable6 joined,
sourceable6 joined
05:26
notable6 joined,
nativecallable6 joined,
coverable6 joined,
greppable6 joined,
releasable6 joined,
unicodable6 joined,
reportable6 joined,
linkable6 joined
05:27
shareable6 joined,
bisectable6 joined,
statisfiable6 joined
05:34
saint- left
06:00
reportable6 left,
reportable6 joined
06:17
Sgeo left
|
|||
Nemokosch | I think SmokeMachine made a perfect argument | 06:42 | |
> Because you haven’t said a limit it would search for, so it will only return 1 char | |||
06:44
merpaderp left
06:46
merpaderp joined
|
|||
a regex/token is one entity, it's not some macro that gets substituted into another regex/token | 06:49 | ||
06:56
abraxxa joined
06:57
Oshawott joined
|
|||
Having said that, I haven't got a clue why or how this works: glot.io/snippets/gbuazuteey | 06:59 | ||
06:59
archenoth left
07:00
abraxxa left,
abraxxa joined
07:06
Kaiepi joined
|
|||
okay, I think I get it | 07:07 | ||
it wouldn't match the final dot before the ref | |||
it's kinda hacky, basically the definition of a character prevents those from being matched | 07:08 | ||
08:00
archenoth joined
08:02
Oshawott left
08:37
Oshawott joined
08:39
archenoth left
08:46
lichtkind joined
09:09
jaguart joined
09:19
Oshawott left,
Sankalp left,
Sankalp- joined,
Oshawott joined
09:20
Sankalp- is now known as Sankalp
09:45
Ven_de_Thiel joined
|
|||
Ven_de_Thiel | o/ | 09:45 | |
m: "-".IO.e; say 1; "-".IO.d; | |||
camelia | 1 Failed to find '/home/camelia/-' while trying to do '.d' in block <unit> at <tmp> line 1 |
||
Ven_de_Thiel | m: subset File of Str where .IO.e && !.IO.d; sub f(File) { say 1; }; f("-"); | 09:46 | |
camelia | Constraint type check failed in binding to parameter '<anon>'; expected File but got Str ("-") in sub f at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
09:52
Sankalp left
|
|||
Voldenet | "-" is valid filename, try /dev/stdin | 09:56 | |
09:58
sena_kun joined
|
|||
Nemokosch | lizmat: what does CLI::Help do actually? It seems like if I just make my MAIN sub a multi, I would get -h and --help for free without it as well | 10:05 | |
lizmat | how? | 10:06 | |
m: multi sub MAIN() { }; @*ARGS = "--help" | 10:07 | ||
camelia | Usage: <tmp> |
||
lizmat | is that what you mean ? | ||
Nemokosch | yes | ||
SmokeMachine | Hi lizmat have you seen my answer about json? | ||
lizmat | well, that's for the cases where you can specify the handling of your options as arguments to main | ||
"rak" is too complicated for that, it basically has *%_ to catch all options, and takes it from there | 10:08 | ||
then CLI::Help is very helpful (to me anyway), as it let's me write extended help in text files in resources | |||
SmokeMachine: so how would you specify a path ? | 10:09 | ||
Nemokosch | Fair enough | ||
SmokeMachine | As code: *.parsed andthen .<path><to><wanted><key>.defined | 10:11 | |
(About specifying help on resources files… do you also use it to generate your README and/or your pod? | 10:12 | ||
lizmat | no, the pod is maintained separately and the README generated from that | 10:19 | |
that information is more for the module developer / maintainer in my view... | |||
the user of "rak" will probably only use --help and/or have man pages created from that, I'd guess | 10:20 | ||
SmokeMachine | (I read App::Rak’s README and Changes file probably more than I should… :) ) | 10:21 | |
lizmat | well, until recently, that was the only source of info | 10:22 | |
--help should give you a lot more now | |||
SmokeMachine | *more than I probably should (sorry I should learn proper English…) | 10:24 | |
lizmat | SmokeMachine: so I guess the problem re handling JSON, is that pretty JSON would be separated up into multiple lines, instead of a single blob? | 10:26 | |
SmokeMachine | No, also because when searching on json you would probably search for a path and not a string… | 10:27 | |
For example, if you want to search for every json-schema that has a endpoint defined with a query parameter called “property”. Only searching by the string “property” wouldn’t help… | 10:30 | ||
lizmat | is there a module that would allow you to search a hash / array (from from_json) like that? | 10:31 | |
SmokeMachine | I was think in pure Raku... just parse the json and do something like: | 10:34 | |
m: my $parsed-json = {a => { b => { c => 42 }}}; say $parsed-json<a>{*}>><c> | |||
camelia | (42) | ||
lizmat | so, if JSON would be recognized, and a parsed json would be in $_ in your Callable, then you could do: | 10:40 | |
rak '{ .<a>{*}>><c> }' ?? | 10:41 | ||
SmokeMachine | m: something like that, but I'd prefer to have an obj representing the file, that way I could do something like `rak '{ next unless .extension(2) eq "schema.json"; .parsed.<a>{*}>><c> }'` | 10:44 | |
camelia | ===SORRY!=== Error while compiling <tmp> Bogus term at <tmp>:1 ------> ile, that way I could do something like ⏏`rak '{ next unless .extension(2) eq "sc expecting any of: argument list infix inf… |
||
SmokeMachine | (sorry, please ignore the `m:`) | 10:45 | |
lizmat | how about a --json flag that would try to interprete each selected file as JSON, and only if that parsed, would present it as $_ to your callable? | ||
this would also imply --files-with-matches | 10:46 | ||
SmokeMachine | better, but I couldn't, yet, avoid json that are not json-schema... | ||
lizmat | how can you separate one from the other ? | 10:47 | |
SmokeMachine | blablabla.schema.json is a json-schema (depending on the user's definition) | ||
lizmat | is that a file extension? sorry, am a json schema noob | 10:48 | |
SmokeMachine | you could also, for example, search all json files that the content doesn't match the file name `rak '{ .file-name eq .parsed<file-name> }' | 10:49 | |
I don't think that's required, but I've seen many places using like that | 10:50 | ||
another example, without using json, if you want to search all files that mentions its own name on its content `rak '{ .content.contains: .file-name }'` | 10:53 | ||
(assuming .file-name yould return the name of the current file and .content would return a string with its content) | 10:54 | ||
10:58
linkable6 left
11:00
linkable6 joined
11:03
Nemokosch joined
|
|||
Nemokosch | m: $composit = { dummy => <actual content> }; $composit .= <dummy>; | 11:03 | |
camelia | ===SORRY!=== Error while compiling <tmp> Variable '$composit' is not declared. Did you mean 'CompUnit'? at <tmp>:1 ------> <BOL>⏏$composit = { dummy => <actual content> |
||
Nemokosch | oops | ||
m: my $composit = { dummy => <actual content> }; $composit .= <dummy>; | 11:04 | ||
camelia | No such method '&postcircumfix:<{ }>' for invocant of type 'Hash' in block <unit> at <tmp> line 1 |
||
Nemokosch | ^ why does it lie? | ||
SmokeMachine | m: my $composit = { dummy => <actual content> }; $composit .= AT-KEY("dummy") | 11:06 | |
camelia | ( no output ) | ||
SmokeMachine | m: my $composit = { dummy => <actual content> }; $composit .= AT-KEY("dummy"); say $composit | ||
camelia | (actual content) | ||
SmokeMachine | curious | ||
Nemokosch | I mean... okay but AT-KEY is lower-level and less powerful | 11:07 | |
SmokeMachine | m: $composit = {}; $composit{("bla", )} | ||
camelia | ===SORRY!=== Error while compiling <tmp> Variable '$composit' is not declared. Did you mean 'CompUnit'? at <tmp>:1 ------> <BOL>⏏$composit = {}; $composit{("bla", )} |
||
SmokeMachine | m: my $composit = {}; $composit{("bla", )} | 11:08 | |
camelia | ( no output ) | ||
SmokeMachine | m: my $composit = { dummy => <actual content> }; $composit .= {"dummy"}; | 11:09 | |
camelia | No such method '&postcircumfix:<{ }>' for invocant of type 'Hash' in block <unit> at <tmp> line 1 |
||
Nemokosch | m: my $composit = { dummy => <actual content> }; dd $composit.{"dummy"}; | 11:10 | |
camelia | $("actual", "content") | ||
Nemokosch | is this a syntax hack, then? | ||
lizmat | not sure | ||
Nemokosch | anyway, I think .= could be expected to work? | 11:11 | |
11:11
Ssw joined
|
|||
SmokeMachine | I would expect that to work... | 11:11 | |
11:13
Nemokosch left
|
|||
SmokeMachine | that's not only that... | 11:14 | |
this works: | |||
m: my $composit = { dummy => <actual content> }; $composit .= self.elems; say $composit | |||
camelia | {dummy => (actual content)} | ||
SmokeMachine | but this doesn't: | ||
m: my $composit = { dummy => <actual content> }; $composit .= self.<dummy>; say $composit | |||
camelia | ===SORRY!=== Error while compiling <tmp> Malformed postfix call at <tmp>:1 ------> > <actual content> }; $composit .= self.⏏<dummy>; say $composit |
||
Nemokosch | well, did it work | 11:15 | |
seems to me it didn't return what you asked for | 11:16 | ||
SmokeMachine | yeah, I think you are right | ||
Nemokosch | which is no surprise actually - there is an issue for the precedence of .= | 11:17 | |
SmokeMachine | m: my $composit = { dummy => <actual content> }; $composit .= (self.<dummy>); say $composit | ||
camelia | ===SORRY!=== Error while compiling <tmp> 'self' used where no object is available at <tmp>:1 ------> my => <actual content> }; $composit .= (⏏self.<dummy>); say $composit expecting any of: argument list t… |
||
SmokeMachine | :( | 11:18 | |
11:27
Nemokosch joined
|
|||
Nemokosch | another interesting one | 11:27 | |
11:27
Ssw left
|
|||
Nemokosch | m: my @values = (1..90).pick: 5; @values.classify(* % 3){1}[0] = 1; dd @values; | 11:28 | |
camelia | Array @values = [48, 4, 55, 5, 80] | ||
Nemokosch | so the assignment succeeded... but to what? | ||
m: my @values = (1..90).pick: 5; dd @values; @values.classify(* % 3){1}[0] = 1; dd @values; | 11:29 | ||
camelia | Array @values = [85, 47, 76, 33, 24] Array @values = [85, 47, 76, 33, 24] |
||
SmokeMachine | 12:29 <Nemokosch> m: my @values = (1..90).pick: 5; dd @values; (my %c = @values.classify(* % 3)){1}[0] = 1; dd @values; dd %c | 11:30 | |
m: my @values = (1..90).pick: 5; dd @values; (my %c = @values.classify(* % 3)){1}[0] = 1; dd @values; dd %c | |||
camelia | Array @values = [85, 6, 68, 16, 17] Array @values = [85, 6, 68, 16, 17] Hash %c = {"0" => $[6], "1" => $[1, 16], "2" => $[68, 17]} |
||
SmokeMachine | There! | ||
Nemokosch | so classify did copy, after all | 11:34 | |
again, I think this should be documented... rotor for example doesn't copy. You can witness the modified element. | 11:36 | ||
11:44
lichtkind_ joined
11:47
lichtkind left
12:00
reportable6 left
12:03
reportable6 joined
12:05
Ven_de_Thiel left
12:08
Kaipei joined
12:10
Kaiepi left
12:18
frost joined
|
|||
lizmat | SmokeMachine: release 0.20 of rak has a --json option | 12:28 | |
SmokeMachine | \o/ | 12:29 | |
lizmat | % time rak '{ $_ with .<auth> }' --json | ||
META6.json: zef:lizmat | |||
12:38
frost left
|
|||
Nemokosch | okay, next thing... | 12:38 | |
m: my &test = *{'fej'}; my &test2 = *{'fej'; 'orr'}; | 12:39 | ||
camelia | Type Whatever does not support associative indexing. in block <unit> at <tmp> line 1 |
||
Nemokosch | m: my &test = *{'fej'}; | 12:40 | |
camelia | ( no output ) | ||
Nemokosch | so yeah, the first one works, the second doesn't, is what I'm trying to say | ||
lizmat | yeah, the rules of WhateverCode generation are mysterious | 12:41 | |
Nemokosch | and the error message is clearly less-than-awesome, even if it doesn't work | 12:42 | |
I don't know why it should not work but the error message is lying basically | |||
SmokeMachine | m: my &bla = *.<bla>; my %a = %( bla => 42); say %a.&bla | 12:43 | |
camelia | 42 | ||
lizmat | well, if the currying doesn't work, the * is a Whatever | ||
so technically, I understand the message | |||
SmokeMachine | me too... | 12:44 | |
lizmat | but maybe an AT-KEY on Whatever could provide a better (runtime) error | ||
m: my &test2 = *.{'fej'; 'orr'} | |||
camelia | Type Whatever does not support associative indexing. in block <unit> at <tmp> line 1 |
||
Nemokosch | You know the underlying behavior, in that sense you can understand the error message. But in this sense, all error messages are correct, this is not a high tally... | 12:46 | |
Probably this fails on a syntax problem. But should it, really? Even with the dot | 12:49 | ||
SmokeMachine | but yes, I agree that's LTA | ||
that should work IMHO... | 12:50 | ||
Nemokosch | I don't actually know but if I were to guess, once you detect the syntax problem, it's not more difficult to make it work than to give back a descriptive error message instead | 12:52 | |
lizmat | I suggest making an issue for it, and marking it as something to be solved in the RakuAST branch | 12:53 | |
Nemokosch | I'm trying to remember these and compile (haha) them in the evening | 12:56 | |
SmokeMachine | lizmat: could something like this be done? `ran --modify-files --backup=<ext> --save=I` and then `ran -I=bkp` mean `ran --modify-files --backup=bkp`? (just curious) | ||
lizmat | I've been thinking about that, but have yet to find a way to make it easy to pass the given argument to the correct option | 12:57 | |
how about ###? | 12:59 | ||
rak --modify-files --backup=### --save=I | 13:00 | ||
SmokeMachine | `{}`? | ||
lizmat | and then rak -l=bkp ? | ||
'{}' indicates a callable... which could be confusing with a needle like that | 13:01 | ||
SmokeMachine | my message was missing the last part, sorry: `rak --modify-files --backup=<ext> --save=i=ext` | ||
yes, makes sense... I was thinking on `find`... | 13:02 | ||
lizmat | find functionality is also on my list :-) | 13:03 | |
SmokeMachine | (could, adding a "name" for the parameter, help on "documenting" your tags?) | ||
lizmat | ? | 13:04 | |
SmokeMachine | like, this `rak --modify-files --backup=<ext> --save=I=ext`, when you call `rak --list-additional-options` could return `-i=ext` and that helps you to know it expects an extension... | 13:05 | |
or better: `rak --modify-files --backup=<extension> --save=i=extension` => `-I=extension` | 13:06 | ||
lizmat | hmmm | ||
SmokeMachine | (sorry, my Mac keeps replacing `i` with `I`) | 13:07 | |
lizmat | using < or > in an argument, will be troublesome in most shells | 13:09 | |
Nemokosch | is i a reserved trademark of Apple? xD | ||
lizmat | SmokeMachine: also, how to handle a default | 13:11 | |
SmokeMachine | maybe it could even accept optlong's format, then `--save=I=extension` would ben that's a flag, `--save=C=lines=I` mean it's a number, etc | ||
`--save=C=lines=i` | |||
but maybe that's too much | 13:12 | ||
lizmat | rak --modify-files --backup=[bak] --save=I | ||
rak -l would use bak | |||
rak -l=bkp would use bkp ? | |||
SmokeMachine | I like it! | ||
rak --context=[10] --save=C ? | 13:13 | ||
`rak --context=[] --save=C` for argument required? | 13:14 | ||
lizmat | rak --modify-files --backup=! --save=I # argument required | 13:15 | |
lemme mull over that during a little bicycle ride :-) | 13:16 | ||
SmokeMachine | :) | ||
13:19
rypervenche left
13:24
rypervenche joined
14:20
m_athias left,
nine left,
nine joined
14:21
m_athias joined
14:49
saint- joined
14:50
saint- left,
saint- joined
14:53
jgaz joined
14:57
abraxxa left
15:00
Nemokosch left
15:18
ProperNoun left
15:20
jgaz left
15:31
morte_ joined
16:31
greppable6 left,
coverable6 left,
nativecallable6 left,
bloatable6 left,
releasable6 left,
quotable6 left,
bisectable6 left,
evalable6 left,
benchable6 left,
linkable6 left,
shareable6 left,
committable6 left,
sourceable6 left,
unicodable6 left,
statisfiable6 left,
notable6 left,
reportable6 left
16:32
quotable6 joined,
bisectable6 joined,
shareable6 joined,
bloatable6 joined
16:33
notable6 joined,
committable6 joined,
evalable6 joined,
greppable6 joined,
nativecallable6 joined,
sourceable6 joined,
benchable6 joined
16:34
coverable6 joined,
releasable6 joined,
reportable6 joined,
linkable6 joined,
unicodable6 joined,
statisfiable6 joined
16:40
jgaz joined
|
|||
Nemokosch | Hey, do you know what I should do with an Exports.pm6 file if I want to make an old module up-to-date? | 17:29 | |
or is this something completely ad-hoc in HTML::Tag? Because it's indeed not listed in the provides section... | 17:32 | ||
for now, I'm gonna assume the latter and add it to provides | 17:37 | ||
17:40
linkable6 left,
evalable6 left
17:42
evalable6 joined,
linkable6 joined
18:00
reportable6 left,
reportable6 joined
18:04
ProperNoun joined
18:14
morte_ left
18:17
ProperNoun left
|
|||
SmokeMachine | hi again lizmat ! could it be prettified some how? usercontent.irccloud-cdn.com/file/...8%402x.png | 18:21 | |
lizmat: sorry, maybe that's not needed... usercontent.irccloud-cdn.com/file/...4%402x.png | 18:22 | ||
lizmat | yeah, whatever you return, gets output. If it's not a string, it will get stringified, which may not be what you want | 18:23 | |
18:24
ProperNoun joined,
morte_ joined
|
|||
SmokeMachine | lizmat: something seems wrong: usercontent.irccloud-cdn.com/file/...1%402x.png | 18:29 | |
`rak '*.<a>{*}>><c>'` hangs | 18:31 | ||
lizmat | % rak '*.<a>{*}>><c>' --degree=1 | 18:32 | |
Type WhateverCode does not support associative indexing. | |||
SmokeMachine | yes... sorry... same here when I pass a single file... | ||
but `rak --json '*.<a>{*}>><c>' <(echo '{"a": {"b": {"c": [42, 13, 3.14]}}}')` seems to not be expecting `--json` | 18:34 | ||
18:34
ProperNoun left
|
|||
lizmat | SmokeMachine: I think it's basically because reading from STDIN is not really implemented yet | 18:35 | |
SmokeMachine | but that's a file... and that works for other codes... | 18:36 | |
lizmat | hmmm | ||
SmokeMachine | for example, `rak --json '*.<a><b><c>' <(echo '{"a": {"b": {"c": [42, 13, 3.14]}}}')` works well | ||
18:37
ProperNoun joined,
eseyman joined
|
|||
lizmat | then it's because it's not a valid WhateverCode: | 18:39 | |
m: dd q/*.<a>{*}>><c>/.EVAL | |||
camelia | (Failure.new(exception => X::AdHoc.new(payload => "Type WhateverCode does not support associative indexing."), backtrace => Backtrace.new),) | ||
18:39
sena_kun left
|
|||
Nemokosch | uh-oh, the associative indexing is back | 18:40 | |
18:40
sena_kun joined
|
|||
lizmat | I guess I need to check for the EVAL to return a Failure | 18:41 | |
SmokeMachine | I also think so... but why is that blaming --json? | 18:42 | |
lizmat | some twisted logic issue in the MAIN sub I guess :-) | ||
it should have complained about the needle | 18:43 | ||
SmokeMachine | lizmat: rak is becoming great! | 18:44 | |
lizmat | m: CATCH { say "CATCH" }; q|/ foo bar /|.EVAL # meh, looks like this type of compile error is not catchable :-( | 18:50 | |
camelia | Potential difficulties: Space is not significant here; please use quotes or :s (:sigspace) modifier (or, to suppress this warning, omit the space, or otherwise change the spacing) at /home/camelia/EVAL_0:1 ------> / foo⏏ bar … |
||
SmokeMachine | lizmat: I have another suggestion, if you don't mind, that I'm not sure how useful it would be... | 18:51 | |
lizmat: the option to watch a file or a dir and that would be like `tail -f ... | grep ...` | 18:53 | ||
lizmat | rak --watch pattern paths ? | 18:54 | |
SmokeMachine | yes | ||
lizmat | feels doable :-) | ||
SmokeMachine | :) | ||
does `--json` accept a list of jsons 1 p/ line? (like this: jsonlines.org) that's very used for logs... kind of the perfect use-case for rak... | 18:59 | ||
lizmat: ^^ | 19:00 | ||
lizmat | --json currently assumes the whole file | ||
--json-per-line could well take one line and convert to json | |||
SmokeMachine | --json-line? | ||
lizmat | if that would fail, should it abort or ignore | ||
--json-per-file and --json-per-line you can create your own shortcuts if you want :-) | 19:01 | ||
--json will go in that case | |||
SmokeMachine | đź‘Ť | 19:02 | |
(sorry for keep asking more features...) | |||
lizmat | hmmm... didn;t know about JSONlines... maybe JSON::Fast::Hyper should also support that | ||
I can always say "no" or "make a PR" | 19:03 | ||
:-) | |||
19:04
mexen left
19:07
morte_ left,
morte_` joined
19:25
morte_` left
19:43
linkable6 left
19:45
linkable6 joined
19:47
morte_` joined
20:15
Xliff joined
20:54
morte_` left
20:58
morte_` joined
21:01
jgaz left
21:07
sena_kun left
21:08
sena_kun joined
21:13
guifa_ left
21:14
guifa joined
21:18
sena_kun left,
saint- left
21:31
morte_` left
21:38
morte_` joined
21:56
morte_` left
|
|||
Nemokosch | I'm almost certain there was discussion about .= | 22:43 | |
But where is the issue for it? | |||
22:56
evalable6 left,
linkable6 left,
evalable6 joined
22:57
linkable6 joined
23:12
jaguart left
23:16
Sgeo joined
|
|||
Geth | ¦ problem-solving: 2colours assigned to coke Issue Function return types should also tell about the used assignment/container github.com/Raku/problem-solving/issues/337 | 23:23 | |
Nemokosch | Anyway, I've just created 3 issues for 3 different things... | 23:25 |