šŸ¦‹ 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.
00:19 jpn joined 00:24 jpn left 00:48 guest4242 joined 00:52 constxqt_ joined 01:19 AlexDaniel left 01:20 jpn joined 01:25 jpn left 02:06 jpn joined 02:11 jpn left 02:33 hulk joined 02:35 kylese left 02:37 Sgeo left 02:39 Sgeo joined 02:48 guest4242 left 03:15 jpn joined, hulk left, kylese joined 03:20 jpn left 04:10 jpn joined 04:15 jpn left 04:23 jpn joined 04:28 jpn left 04:30 epony left 04:49 epony joined 05:24 jpn joined 05:29 jpn left 05:54 epony left 05:56 epony joined 06:25 jpn joined 06:30 jpn left 07:26 jpn joined 07:31 jpn left 07:55 sena_kun joined 08:27 jpn joined 08:32 jpn left 08:56 dakkar joined 09:02 Sgeo left 09:09 sena_kun left 09:26 jpn joined 09:30 abraxxa joined 09:34 abraxxa left 09:40 abraxxa joined 09:56 Tirifto left 10:05 jpn left 10:07 jpn joined 10:15 Voldenet left 10:16 Voldenet joined 11:20 merp joined
tbrowder__ .tell tonyo my pm to you should be visible 11:41
tellable6 tbrowder__, I'll pass your message to tonyo
11:48 nine left, nine joined
antononcube If I have a nested hash, say, {:a(${:A(${:u(1)}), :B(${:u(3), :v(5)})}), :b(${:A(${:v(5)}), :B(${:u(2)})})} , how can get the (nested) keys that produce non-Nil with calls like this: %h{'a';*;'v'}; ? 11:59
BTW, I was thinking this should work %h{'a';*;'v'}:kv . I am not sure what is the rationale not to, but probably it should be mentioned in docs.raku.org/language/subscripts . 12:02
nemokosch m: my %h = {:a(${:A(${:u(1)}), :B(${:u(3), :v(5)})}), :b(${:A(${:v(5)}), :B(${:u(2)})})}; %h{'a'; 'B'; 'v'}.say 12:08
evalable6 Potential difficulties:
Useless use of hashā€¦
nemokosch, Full output: gist.github.com/f8fb18bc64bbffeeab...5c6cab2188
Raku eval (5) Potential difficulties: Useless use of hash composer on right side of hash assignment; did you mean := instead? at /home/glot/main.raku:1 ------> })}), :b(${:A(${:v(5)}), :B(${:u(2)})})}ā; %h{'a'; 'B'; 'v'}.say
nemokosch m: my %h = :a(${:A(${:u(1)}), :B(${:u(3), :v(5)})}), :b(${:A(${:v(5)}), :B(${:u(2)})}); %h{'a'; *; 'v'}.say 12:09
evalable6 (5 (Any))
Raku eval (5 (Any))
nemokosch Well, this is the behavior I would expect 12:10
not sure what the problem is
it reads left to right, %h indexed with 'a', that indexed with everything (aka all values), that indexed with 'v'. Anything "more clever" would be too much magic imo. If you don't want undefined values, just filter them out. 12:13
lizmat m: use v6.e.PREVIEW; my %h = :a(${:A(${:u(1)}), :B(${:u(3), :v(5)})}), :b(${:A(${:v(5)}), :B(${:u(2)})}); dd %h{'a';*;'v'}:v 12:26
camelia (5,)
lizmat antononcube in 6.e these slices are more DWIM
just use :v to just get the defined values
or use :k to get the valid "paths" 12:27
m: use v6.e.PREVIEW; my %h = :a(${:A(${:u(1)}), :B(${:u(3), :v(5)})}), :b(${:A(${:v(5)}), :B(${:u(2)})}); dd %h{'a';*;'v'}:k
camelia (("a", "B", "v"),)
nemokosch m: use v6.e.PREVIEW; my %h = :a(${:A(${:u(1)}), :B(${:u(3), :v(5)})}), :b(${:A(${:v(5)}), :B(${:u(2)})}); dd %h{'a';*;'v'} 12:35
evalable6 (Any, 5)
Raku eval (5, Any)
nemokosch well, not sure why :v does that
or what is it that it does exactly 12:36
if it just sorts the indefinite values out, then it probably shouldn't; if it does something more finegrained than that, how to make it not overly magical?
lizmat m: my %h = a => 42, b => 666; dd %h<a b c>
camelia (42, 666, Any)
lizmat m: my %h = a => 42, b => 666; dd %h<a b c>:v
camelia (42, 666)
lizmat :v will skip undefined values 12:37
m: my %h = a => 42, b => 666, c => Int; dd %h<a b c>:v
camelia (42, 666, Int)
lizmat actually not undefined, non-existing keys
nemokosch okay, that's a bit different because that couldn't be post-processed 12:38
m: my %h = a => 42, b => 666, c => Any; dd %h<a b c>:v
evalable6 (42, 666, Any)
Raku eval (42, 666, Any)
nemokosch that kinda makes sense, although the interface is a bit peculiar... 12:39
lizmat m: my %h = a => 42, b => 666; %h<a b c>[2] = 137; dd %h 12:40
camelia Mu %h = {:a(42), :b(666), :c(137)}
lizmat note that it is not just an Any, but actually a container that can be assigned to and then will vivify the appropriate key in the hash 12:41
nemokosch what was this [2] though
there is nothing remotely 2 about the output 12:42
lizmat m: my %h = a => 42, b => 666; dd %h<a b c>
camelia (42, 666, Any)
lizmat %h<a b c> is a List, [2] indexes into the 3rd element of it
nemokosch well, this is confusing
m: my %h = a => 42, b => 666; %h<a b c>{'x'} = 137; dd %h 12:43
evalable6 (exit code 1) Type List does not support associative indexing.
in block <unit> at /tmp/NgfX78Qctx line 1
Raku eval Exit code: 1 Type List does not support associative indexing. in block <unit> at main.raku line 1
nemokosch it's consistent at least but it is kind of confusing still
m: my %h = a => 42, b => 666; %h{'a', 'b', 'c'; 'x'} = 137; dd %h 12:44
evalable6 (exit code 1) Type Int does not support associative indexing.
in block <unit> at /tmp/7nE5w3LO0h line 1
Raku eval Exit code: 1 Type Int does not support associative indexing. in block <unit> at main.raku line 1
nemokosch m: use v6.e.PREVIEW; my %h = a => 42, b => 666; %h{'a', 'b', 'c'; 'x'} = 137; dd %h
Raku eval Exit code: 1 Type Int does not support associative indexing. in block <unit> at main.raku line 1
evalable6 (exit code 1) Type Int does not support associative indexing.
in block <unit> at /tmp/IikKKdv23j line 1
nemokosch hm, right, the data type 12:45
m: my %h; %h{'a', 'b', 'c'; 'x'} = 137; dd %h
Raku eval Hash %h = {:a(${:x(137)}), :b(${:x(Any)}), :c(${:x(Any)})}
evalable6 Mu %h = {:a(${:x(137)}), :b(${:x(Any)}), :c(${:x(Any)})}
nemokosch m: my %h; %h{'a', 'b', 'c'}{'x'} = 137; dd %h
evalable6 (exit code 1) Type List does not support associative indexing.
in block <unit> at /tmp/ZTKHYKv7Nd line 1
Raku eval Exit code: 1 Type List does not support associative indexing. in block <unit> at main.raku line 1
nemokosch it does make sense indeed but it's kind of overwhelming 12:46
lizmat and then you get the :exists :delete adverbs :-)
and combinations of those with :k :v :kv or :p :-) 12:47
nemokosch how does %h{'a', 'b', 'c'} work from core perspective? Are they separate arguments or one list? 12:48
@melezhik hi, build failed after adding a sparky.yaml file for turning flappers off 13:04
13:05 Tirifto joined
the spawned sparrowdo command exited unsuccessfully 13:05
no retry, no nothing, it just goes on like nothing happened 13:06
and the scm folder is completely empty now... 13:08
13:09 japhb left
it turns out the suggestion about pre-triggering is rather suboptimal. It's too late to do cleanup in the directory because the directory is already eliminated at that point... 13:10
I can probably work around it but it would be good to have a way to run stuff when the previous scm is still there
let's see if I can just run the commands before the directory ... call 13:12
melezhik @nemokosch I am not sure if I understand what you are taking about . Can I see sparkyd logs ? 13:25
13:26 japhb joined
nemokosch long story short - when I talked about a pre-trigger, I meant something that runs before the scm folder gets mangled 13:26
and apparently anything after "directory 'scm'" is too late
melezhik Ok. You can execute any command before scm folder is created ā€¦ also this could be any / empty folder as well itā€™s up to a user implement the logic, like I said , sparkyd does not create scm folder for you, it only triggers a new build whenever a new commit arrives , it has some internal state that keep last checked commit sha, that is it , but it does not even do gut pull / fetch of any data 13:30
Gut -> git
nemokosch Okay, thank you. Right now I'm having a fight with VNC 13:35
Is there a CLI way to manually trigger builds, by any chance?
melezhik Yes 13:39
antononcube @lizmat thanks a lot!
melezhik github.com/melezhik/sparky#command-line-client 13:40
Just point it a directory holding a project
This will execute build strait away 13:41
nemokosch cool, thank you 13:49
melezhik ++ 13:59
nemokosch I submitted an issue about the complete lack of VNC to the provider, now it's time to get back to this 14:05
no, this is still not good 14:15
> task bash: git checkout github.com/2colours/rad.io.gi ... FAILED > The spawned command 'bash --login .sparrowdo/sparrowrun.sh' exited unsuccessfully (exit code: 1, signal: 0) 14:16
blablabla
frankly, at this point I'd just say this doesn't work. By now, it's literally the original file. 14:17
I needed to make a dummy commit, THAT worked 14:20
no, it's safe to say this sparky-runner doesn't work 14:27
even after recovering with a proper commit, it fails 14:28
melezhik Can I see your spraky.yaml and sparrowfile ? Also there should be more logs in sparkyd log , that give more details . I guess when you run locally via cli , tags are not initialized , so you need to provide sane defaults for them , see this - github.com/melezhik/sparky#trigger...cm-changes 14:30
But again , hard to say for sure without looking at sparky.yaml and sparrowfile 14:31
See ā€œTo set default values for SCM_URL and SCM_BRANCH, use sparrowdo tags: ā€¦ā€ section 14:32
nemokosch they are not really default values though, are they? They belong to the very project that is run 14:35
gist.github.com/2colours/df4fdb659...41b99c7dde 14:37
it does test my patience
I don't even know where the logs of sparrow tasks go, to confirm that my last modification had any effect, besides apparently not breaking anything 14:40
melezhik Ok. If you run a build using a cli you get a log into stdout / stderr 14:54
nemokosch anyway, what I wanted to do works - it didn't have much to do with the CI - so still thinking that manual triggering doesn't really work, I'll move on to some actual work finally šŸ˜…
melezhik If you post this to a gist it will help 14:56
nemokosch >just one little thing with the discord bot, in case it's simple >one little thing works >poof two hours gone on infrastructure
that very much includes the non-existent VNC as well of course 14:57
which should exist but in practice I see no server or anything 14:58
but now... I definitely need to be gone, work is not getting anywhere this way...
16:01 japhb left 16:05 japhb joined 16:15 japhb left 16:19 japhb joined 17:28 jpn left 17:29 DarthGandalf left 17:32 DarthGandalf joined, jpn joined 17:46 dakkar left
@melezhik sorry i just noticed that the date in the Changes file of Sparky has a weird date for the latest release 18:01
it's coming straight from the future šŸ˜…
melezhik Yeah. Time machine ? )))) 18:02
Upps, looks like I messed up with changes file 18:04
So donā€™t believe it, Sparky 0.1.16 is not yet there LOL šŸ˜‚
nemokosch šŸ¤£ 18:11
I mean, seems to be released anyway
18:26 jpn left 18:33 jpn joined 18:53 sena_kun joined 18:54 jpn left 19:24 jpn joined 19:30 jpn left
jdv .seen antoncube 19:52
tellable6 jdv, I haven't seen antoncube around, did you mean antononcube?
jdv antononcube: how does one change the model used by WWW::OpenAI?
the default one is deprecated at openai now
antononcube @jdv With the option "model". And yes, I should review the entry points (i.e. URL paths) and models to reflect the recent changes by OpenAI. 20:27
I think I will make "gpt-4" to be the default one. But there are cheaper and faster ones... 20:28
21:30 jpn joined
@jdv Do you have the most recent version of "WWW::OpenAI"? (2.17) 21:37
jdv their pages say 3.5 instruect supercedes dav 003 21:47
antononcube: platform.openai.com/docs/deprecations/ 21:48
looks like i have 0.2.11 21:49
21:54 jpn left 21:57 jpn joined 22:06 jpn left 22:07 jpn joined 22:11 Xliff_ joined
Xliff_ \o 22:11
No weekly?
Everything alright?
lizmat yeah, just a slow news week and other stuff to do... will be one tomorrow, probably 22:12
Xliff_ OK. Delays are fine as long as you are OK!
22:13 abraxxa left
lizmat yeah... fine enough to be cycling for more than an hour in a wind-chill of -8 degree Celsius :-) 22:19
yes, it was cooold :-)
Xliff_ :( 22:20
jdv that's too cold for cycling 22:21
i rarely ride in < 45f
lizmat sissy :-)
22:40 jpn left
antononcube @jdv The latest ā€˜WWW::OpenAIā€ version should have the updated models. By default though, text completion models are used. I will submit version 2.18 tonight that will use chat models by default. 22:55
(As I mentioned aboveā€¦) 22:56
@lizmat same thing here ā€” I just came back from a run in a very cold weather. (18C in Florida.) 23:00
23:40 sena_kun left 23:51 Sgeo joined