!zghijEASpYQWYFzriI:nixos.org

Hydra

393 Members
110 Servers

Load older messages


SenderMessageTime
3 Sep 2021
@grahamc:nixos.org@grahamc:nixos.orgah nice11:44:42
4 Sep 2021
@ilkecan:matrix.orgilkecan joined the room.12:40:11
5 Sep 2021
@janne.hess:helsinki-systems.dedas_jimage.png
Download image.png
20:22:01
6 Sep 2021
@grahamc:nixos.org@grahamc:nixos.orghaha13:07:56
7 Sep 2021
@grahamc:nixos.org@grahamc:nixos.orgit is astonishing to me how easy it is to just ... write totally wrong code.15:15:24
@sternenseemann:systemli.orgsterniin perl especially :p15:15:41
@grahamc:nixos.org@grahamc:nixos.orgexacttly15:15:45
@sternenseemann:systemli.orgsterniI think the hydra notify issue you fixed recently is the perfect example for the kind of problems you run into15:16:17
@grahamc:nixos.org@grahamc:nixos.orgthe one about the missing argument?15:16:28
@grahamc:nixos.org@grahamc:nixos.orgI wish it could do the most bare minimum amount of "hey you claim to call this function but that function doesn't exist anywhere at all in perl anywhere"15:16:39
@sternenseemann:systemli.orgsternilike you can just forget to add a function argument that's required somewhere and it fails very silently unless you add a ton of boilerplate everywhere15:16:43
@grahamc:nixos.org@grahamc:nixos.orgyeah15:16:47
@janne.hess:helsinki-systems.dedas_j isn't it enough to just my (a, b) = @_? 15:17:21
@janne.hess:helsinki-systems.dedas_jThat should warn when a variable is not defined or am I wrong here?15:17:36
@grahamc:nixos.org@grahamc:nixos.orglmao that is a top tier perl troll15:17:47
@janne.hess:helsinki-systems.dedas_jhuh? I really don't know any better :D15:18:00
@grahamc:nixos.org@grahamc:nixos.orgwell for one you can't use $a and $b15:18:10
@grahamc:nixos.org@grahamc:nixos.orgtwo it'll just undef all the rest I think15:18:35
@janne.hess:helsinki-systems.dedas_joh wow15:18:39
@sternenseemann:systemli.orgsterniif you call that function with just one arg b is just undef is the problem15:18:45
@sternenseemann:systemli.orgsterniat least you can't do $foo if it was never declared15:19:03
@sternenseemann:systemli.orgsterni and virtually every function will do something half reasonable with undef so it ends up failing in a completely different place usually 15:19:29
@grahamc:nixos.org@grahamc:nixos.orghttps://github.com/NixOS/hydra/pull/100415:19:36
@grahamc:nixos.org@grahamc:nixos.orgyou can define prototypes15:21:25
@grahamc:nixos.org@grahamc:nixos.org to say what arguments it requires and vaguely what type it is expecting, but you can't do this for -> called subs 15:22:39
@sternenseemann:systemli.orgsterniso that's 99% of hydra15:30:42
@grahamc:nixos.org@grahamc:nixos.orgyup15:31:03
@sternenseemann:systemli.orgsterniunfortunately I think using the “oop” style of Perl is the only maintainable way 15:35:42
@sternenseemann:systemli.orgsternisince without enforcing an interface it is probably really hard to keep data structures consistent15:36:06
@cjbayliss:matrix.orgcjbayliss (they/them) joined the room.22:13:05

Show newer messages


Back to Room ListRoom Version: 6