| 3 Sep 2021 |
@grahamc:nixos.org | ah nice | 11:44:42 |
| 4 Sep 2021 |
| ilkecan joined the room. | 12:40:11 |
| 5 Sep 2021 |
das_j |  Download image.png | 20:22:01 |
| 6 Sep 2021 |
@grahamc:nixos.org | haha | 13:07:56 |
| 7 Sep 2021 |
@grahamc:nixos.org | it is astonishing to me how easy it is to just ... write totally wrong code. | 15:15:24 |
sterni | in perl especially :p | 15:15:41 |
@grahamc:nixos.org | exacttly | 15:15:45 |
sterni | I think the hydra notify issue you fixed recently is the perfect example for the kind of problems you run into | 15:16:17 |
@grahamc:nixos.org | the one about the missing argument? | 15:16:28 |
@grahamc:nixos.org | I 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 |
sterni | like 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 everywhere | 15:16:43 |
@grahamc:nixos.org | yeah | 15:16:47 |
das_j | isn't it enough to just my (a, b) = @_? | 15:17:21 |
das_j | That should warn when a variable is not defined or am I wrong here? | 15:17:36 |
@grahamc:nixos.org | lmao that is a top tier perl troll | 15:17:47 |
das_j | huh? I really don't know any better :D | 15:18:00 |
@grahamc:nixos.org | well for one you can't use $a and $b | 15:18:10 |
@grahamc:nixos.org | two it'll just undef all the rest I think | 15:18:35 |
das_j | oh wow | 15:18:39 |
sterni | if you call that function with just one arg b is just undef is the problem | 15:18:45 |
sterni | at least you can't do $foo if it was never declared | 15:19:03 |
sterni | 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 | https://github.com/NixOS/hydra/pull/1004 | 15:19:36 |
@grahamc:nixos.org | you can define prototypes | 15:21:25 |
@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 |
sterni | so that's 99% of hydra | 15:30:42 |
@grahamc:nixos.org | yup | 15:31:03 |
sterni | unfortunately I think using the “oop” style of Perl is the only maintainable way | 15:35:42 |
sterni | since without enforcing an interface it is probably really hard to keep data structures consistent | 15:36:06 |
| cjbayliss (they/them) joined the room. | 22:13:05 |