guifa | meh, just going with .foo with %hash<foo> //= Foo.new; I think it's as concise as I'll get | 01:00 | |
01:34
lizmat_ left
01:35
lizmat joined
02:04
hulk joined
02:05
kylese left
|
|||
timo | could make an operator like postfix:<++> that just doesn't increment or anything | 02:12 | |
guifa | timo: true, but I think my final one is at least recognizable if not quite a pattern | 02:15 | |
also, I just realized that this mDNS / Zerconf module / project would make a badass talk on concurrency | 02:16 | ||
I have supplies leading to supplies leading to supplies | |||
and yet the design is crazy clean | |||
udp port gives a supply, packets are processed by the mDNS server and records are put into a set of supplies based on types. the zeroconf module is subscribed to those and makes additional queries as needed to scope out the landscape and, based on what it finds, emits records onto yet another supply | 02:18 | ||
and the end user just does my $zc = Zeroconf.new; $zc.service-notification('_printer._tcp.local').tap: -> { ... } | 02:19 | ||
03:15
hulk left,
kylese joined
|
|||
ab5tract | guifa: snazzy! | 03:21 | |
guifa | I mean, I'm sure if I made it a monolith in C it'd be about a gazillion times more efficient, but so far, it seems more than fast enough for mDNS | 03:57 | |
03:59
Sgeo left
04:03
Sgeo joined
04:35
Aedil joined
|
|||
aruniecrisps | @ab5stract tried doing that, doesn't seem to be doing anything it looks like | 05:05 | |
ab5tract | Boo :( | 05:33 | |
Next best thing might be to nuke the whole dependency | 05:34 | ||
07:22
Xliff joined
|
|||
Xliff | Can someone explain to me the arguments for the following call? - go_path_pie_wedge (GOPath *path, double cx, double cy, double rx, double ry, double th0, double th1) | 07:23 | |
I'm fine with the first 2, but the rest of them are confusing. | |||
The first 3 rather. I'm trying to write bindings for this in raku. | |||
I think I lost a brain cell or two within the last 5000 lines of Gnumeric/GOffice | 07:24 | ||
08:25
Aedil left
08:49
abraxxa-home joined
08:52
abraxxa-home left
08:55
abraxxa-home joined
09:14
Sgeo left,
Sgeo_ joined
09:24
melezhik joined
|
|||
melezhik | aruniecrisps: on my memory zef :from<native> thing always been an issue , I still believe there should be a simple way to declare native dependencies , and this should not be in META/zef, in many other language any library depending on native c/c++ lib just through an exception in any form staying it needs the one, and then `apt-get/yum and friends | 09:27 | |
install native lib` just do the job ... | |||
@aruniecrisps on my memory zef :from<native> thing always been an issue , I still believe there should be a simple way to declare native dependencies , and this should not be in META/zef, in many other language any library depending on native c/c++ lib just through an exception in any form staying it needs the one, and then `apt-get/yum and friends | |||
install native lib` just do the job ... | |||
09:32
melezhik left
09:50
Xliff left
10:20
sena_kun joined
10:30
itaipu left
10:55
Aedil joined
11:02
Sgeo_ left
11:32
Aedil left
|
|||
Geth | ecosystem/main: 18a85cebd8 | (Elizabeth Mattijsen)++ | META.list Remove BigRoot It lives on as a Raku Community module |
11:43 | |
11:52
melezhik joined
|
|||
melezhik | I've put some my ideas on how Dormitory could evolve as wiki pages - github.com/melezhik/Dormitory/wiki - comments are welcome | 11:52 | |
El_Che | melezhik: what do you mean by Dockerfree? Are you running on bare metal? | 11:55 | |
melezhik | I mean docker or any container are not used at all | 11:56 | |
just build from source code and run thing as is on host | |||
and yeah this could be bare metal | 11:57 | ||
El_Che | so, you stick to straight-forward applications with no os dependencies? | ||
11:59
xinming joined
|
|||
El_Che | the no-docker thing is the simplicity for the dev? | 11:59 | |
12:01
melezhik left
|
|||
Geth | ecosystem/main: fdae6d45c7 | (Elizabeth Mattijsen)++ | META.list Remove Statistics::LinearRegression I lives on as a Raku Community module |
12:14 | |
ecosystem/main: 6ddc3424d8 | (Elizabeth Mattijsen)++ | META.list Remove UNIX::Daemonize It was a WIP and its tests have been failing for many years already |
12:15 | ||
12:26
xinming left
12:29
melezhik joined
|
|||
melezhik | El_Che yes, more or less. I think people sometimes overuse docker, where simple `zef install . && cro run` is enough (as an example in Raku world, but the same idea for other stacks). Ā I mean for production it's valid to use containers/k8s but for dev it could be overkill | 12:32 | |
12:35
xinming joined
12:37
melezhik left
|
|||
El_Che | just to be clear, is it a framework for Raku or for all languages? And of so, how do you handling stuff like compiling en dependencies | 13:09 | |
it's hard to tackle | |||
Geth | ecosystem/main: d47270d150 | (Elizabeth Mattijsen)++ | META.list Remove overload::constant It lives on as a Raku Community module |
13:13 | |
aruniecrisps | @melezhik what do you think is the solution to this problem? | 13:26 | |
13:32
xinming left
13:34
xinming joined
13:45
melezhik joined
|
|||
melezhik | @El_Che - this is for any language framework. Where people need microservises architecture | 13:47 | |
I donāt see why installing dependencies could be an issue | |||
Most of the dependencies are handled by language native managers like pip/python go mod tidy /go , zef/Raku etc | 13:49 | ||
If we talk about system things like databases or any system packages. In case of dormitory all the heavy duty stuff is carried out by Sparky which shines for such a job | 13:50 | ||
See for example some prebuilt plugins - sparrowhub.io/search?q=sparkyci | 13:51 | ||
aruniecrisps | i generally agree with not having native dependencies as part of META6.json | 13:52 | |
melezhik | So people donāt rewrite anything and just use it | ||
aruniecrisps, yes that the idea | |||
13:53
melezhik left
|
|||
aruniecrisps | I still don't know why --exclude="pq" doesn't seem to be doing anything | 13:54 | |
ugexe | why don't you post the full output with --debug because --exclude="pg" specifically has worked for other people and generally works | ||
aruniecrisps | $ zef install --debug --exclude="pq" DB::Pg ===> Searching for: DB::Pg ===> Found: DB::Pg:ver<1.1>:auth<cpan:CTILMES>:api<1> [via Zef::Repository::Ecosystems<rea>] ===> Dependencies: NativeCall, NativeLibs, LibUUID, JSON::Fast, pq, Test, Test::When ===> Searching for missing dependencies: LibUUID, pq:ver<5>:from<native> ===> Failed to find dependencies: pq:ver<5>:from<native> Failed to resolve some missing | 13:57 | |
dependencies (use e.g. --exclude="pq" to skip) | |||
ugexe | fair enough | 13:59 | |
yeah exclude indeed seems to have stopped working with native dependencies | 14:05 | ||
i guess you have to do `--exclude="pq:ver<5>:from<native>"` | 14:17 | ||
although --exclude="pq" should just work | |||
however i also observe that just --exclude="pq" does not just work | |||
aruniecrisps | i do wonder if i basically lose the actual postgres connectivity if i disable it | 14:23 | |
ugexe | --exclude doesn't disable anything, it just tells zef to ignore looking for that dependency. since it is a native dependency it can't install it anyway | 14:29 | |
14:42
xinming left
|
|||
antononcube | How come? > Sadly it has turned out to be impossible to organize a Raku Conference (neither in-person or online) [ā¦] | 14:42 | |
14:46
xinming joined
|
|||
lizmat | because Shitov didn't want to do it, and nobody else wanted to take it on? | 14:51 | |
15:12
Aedil joined
|
|||
antononcube | I see. | 15:22 | |
15:28
melezhik joined
15:30
melezhik left
15:35
melezhik joined,
melezhik left
15:36
melezhik joined
|
|||
melezhik | . | 15:36 | |
15:40
melezhik left
15:43
melezhik joined
15:46
melezhik left
15:57
melezhik joined
15:58
melezhik left
16:27
melezhik joined
16:28
melezhik left
|
|||
antononcube | BTW, there are plenty of unapproved comments of Raku Advent 2024 posts. So, advent authors -- please approve (or reject) the ones of your posts. | 16:40 | |
17:04
melezhik joined
17:06
melezhik left
|
|||
guifa | whoa | 17:18 | |
just realized | |||
if my $foo = [call] { ... } elsif $foo == [other value] { ... } works | 17:19 | ||
I don't know why I was only anticipating the $foo to be valid in the first block | 17:20 | ||
ab5tract | guifa: indeed, that's one of the early "hook" features that pulled me into the language. being able to do inline assignments in a sequence of expressions is totally awesome | 17:33 | |
if you *don't* want $foo available outside of the first block, you add it as an argument in a pointy block (if [call] -> $foo { ... }) | 17:35 | ||
guifa | ab5tract did you manage to fix the indirect call syntax for Comma? | 18:23 | |
because it looks like it's (kind of) working and you don't know the level of joy that this brings me | |||
color is showing up white (not sure if the intent is for it to match sub calls or method calls, or just be different to highlight it's an indirect) but melikes | 18:25 | ||
19:04
Aedil left
|
|||
ab5tract | hmmm, not sure what's going on there, as I haven't touched the parser guts yet | 19:42 | |
19:56
rypervenche joined
|
|||
antononcube | @timo The "BOOTException" I a mentioned two days ago is happening when installing "Jupyter::Chatbook" using an INIT phaser. In that phaser a JSON file is ingested that has new lines or to content of that JSON file is expanded in the phaser to have new lines. Without the new lines no exception is given. I could not make a simpler, smaller code that manifests that failure or exception. | 20:13 | |
Turned using a class method and a TWEAK is a better solution. And I do not get the exception when expanding the content. | 20:14 | ||
guifa | ab5tract : ah, well, still... whatever changed, I'm super happy :) | 20:25 | |
ab5tract | merry christmas! ;) | 20:26 | |
guifa | $*SCHEDULER.cue: { push: ab5tract, @beers.pick(3) }, :at<next-conference> | 20:27 | |
so .raku methods... | 20:28 | ||
for more ephemeral things like handlers, what are people's thoughts? just put a .new and assume it's bad practice to try to .raku them ? | 20:29 | ||
timo | for that case it's fine to give something that is merely informative, i think | 20:57 | |
there is no guarantee that eval-ing the result of a .raku gives a perfect result for everything | 20:58 | ||
antononcube, I was hoping i could use the error that you are encountering to test if the error message improvement works | 21:04 | ||
guifa | timo: alright, noted. I'm putting a bit too much polish on this module as I go ha | 21:08 | |
timo | i'm assuming your changes to the json string are causing it to become invalid, the parse error exception is landing in a variable somewhere and getting stored and then serialization reaches it and bails out | 21:09 | |
guifa | making an IPv6 subset is ... ugly lol | 21:10 | |
timo | indeed. so many different ways to specify stuff | 21:11 | |
guifa | I think i'll save that until later | 21:15 | |
timo | yeah it's probably fine to have the function inside moar that converts the ipv6 string to the correct struct return the error, then throw that as an exception | 21:17 | |
we have ways to throw typed exceptions directly from inside moarvm, but it's a little bit fiddly, so it might be good enough to substring match on the X::AdHoc thrown by whatever op does this | |||
if you want to make it structured, that is. which we should probably do at least at some point, but if it stands in the way of implementing the feature, it doesn't have to be immediately, and it doesn't have to be you who does it | 21:18 | ||
guifa | oh this is at a much higher level | 21:20 | |
timo | if you want to do it really weird, you can expose a syscall that only tries to do the conversion and nothing else, and returns if it was successful or not | ||
then the subset can just be `where { nqp::syscall("is_this_ipv6", $_) }` | |||
guifa | so when you advertise a ZeroConf service, you need to have a service name (e.g. 'My HTTP Server._http._tcp.local'), either an IPv4 or IPv6 address and a hostname, and optionally some config text | 21:23 | |
I'm trying to be good and valid everything at the higher level with good error messages. by the time it gets to MoarVM level, this will already be tucked into a DNS packet | 21:24 | ||
timo | ooh | 21:25 | |
this isn't about UDP broadcast support any more, got it | |||
we don't have a grammar for ipv6 addresses in the ecosystem yet? | |||
guifa | maybe | 21:26 | |
timo | there is an IP::Addr dist | 21:27 | |
raku.land/zef:vrurg/IP::Addr | 21:28 | ||
guifa | timo: I haven't been able to figure out broadcasting / receiving on my IPv6 interface. When the IPv6 address goes to MoarVM resolve function, it always comes back the IPv4 equivalent. When I try to force the binding anyways since I know it's a valid hostname, I end up with an address unavailable error | ||
timo | say IP::Addr.new( "2001:db8::/123" ).broadcast; | 21:29 | |
will fail with "no method" exception because broadcast is not available for IPv6 addresses. | |||
^- i wonder if this has something to do with that? | |||
> Key Concept: IPv6 has unicast and multicast addresses like IPv4. There is, however, no distinct concept of a broadcast address in IPv6. A new type of address, the anycast address, has been added to allow a message to be sent to any one member of a group of devices. Implications of the Changes to Address Types in IPv6 | 21:30 | ||
guifa | I'm sending to a multicast and I edited code so that libuv should be adjusting accordingly | 21:31 | |
but I'll need to try with some other languages/libraries to see if it's a limitation in libuv or my setup, etc | |||
github.com/vrurg/raku-IP-Addr/blob...kumod#L187 looks like my current approach isn't really any different, except I'm using split then regex heh | 21:33 | ||
timo | A socket can (un)subscribe to a multicast group using: | 21:37 | |
where membership is UV_JOIN_GROUP or UV_LEAVE_GROUP. | |||
^- it feels like something went missing here lol | |||
can you send to a multicast without "joining" the correct multicast group first? is that perhaps what's missing? | 21:41 | ||
i've not written code yet that attempts to multicast or anycast on ipv6 | 21:42 | ||
22:06
Sgeo joined
|
|||
guifa | Yeah, the UV_JOIN_GROUP is what I'm using and it works okay with IPv4 | 22:13 | |
r = uv_udp_bind(udp_handle, ssi->bind_addr, (ssi->flags & 0b10) ? UV_UDP_REUSEADDR : 0); | 22:14 | ||
that's actually the line that's causing the error, iirc | 22:15 | ||
The only other thing I can think of is that the casting from sockaddr_in6 to sockaddr isn't working entirely as intended | 22:20 | ||
timo | did you already try strace or perf trace to see what the syscalls that it actually issues look like? at least strace does some helpful decoding of the arguments to be more human-readable, too | 22:21 | |
guifa | I haven't yet -- I admit, those are tools I don't really have much experience using | 22:23 | |
timo | strace is one of the first tools i reach for in situations like this | 22:28 | |
22:37
sena_kun left
|
|||
guifa | okay, at least with printf'ing ha, I was able to rtack it down to uv_udp_set_membership | 22:41 | |
does okay with a stringy representation of IPv4, but doesn't like IPv6 | |||
let me try it fully qualified to see if that changes | 22:42 | ||
timo | can you try stracing the startup of like avahi-daemon if you set it to ipv6-only mode, if that is even a thing it has? | 22:46 | |
guifa | ugh | 22:51 | |
dtrace: system integrity protection is on, some features will not be available | |||
timo | oh, macos? | 22:53 | |
guifa | ya | 22:55 | |
I'll see about booting up a VM and trying this in there -- it's a decent set up since I have to recompile with my MoarVM edits and Rakudo edits | 22:56 | ||
timo | sounds like a job for a Containerfile ;) | 22:57 | |
guifa | ha I'm trying to limit the number of "okay time to learn a new tool" moments on this project :-) | 23:02 | |
timo | :D | 23:03 | |
guifa | right now it works just fine with IPv4 and realistically that's probably enough for most people | ||
timo | what, you don't measure projects by "number of new tools learned"? ;) | ||
guifa | for now, at least | ||
timo | right, ipv6 will never actually become a thing | ||
or maybe in ... 20 years :) | |||
guifa | I'm sure it will .... eventually lol. | ||
but for home WLANs, it's really probably overkill | 23:04 | ||
also apparently it's just fine to point the multicast to the same socket from what I was reading | |||
(from IPv4 and IPv6) | |||
oh nm | 23:12 | ||
I got it! | |||
thank you NodeJS who also uses libuv | |||
stackoverflow.com/questions/384483...th-node-js | |||
timo | .o( and you'll get the messages back, too, by default? ) | ||
guifa | Whereas the IPv4 doesn't need an interface address (and so their examples on libuv's page uses NULL), IPv6 does | 23:13 | |
I just passed in "::%en0" (my wifi interface) and voila! | |||
timo | ah, makes sense! | 23:16 | |
i mean, i'm not entirely sure why it's necessary / forced | |||
and of course the error code and message you got back were ... less than helpful | |||
guifa | The catch is there's no way to predict that address (technically called a "zone identifier" i guess) | 23:58 |