Then, you could take those comments, and have the compiler use them to ensure you’re using the right variable in the right place. Oh wait, we just invented a type system.
Then, you could take those comments, and have the compiler use them to ensure you’re using the right variable in the right place. Oh wait, we just invented a type system.
Works even better in Ruby, as the code as given is valid, you just need to monkey patch length
:
#!/usr/bin/env ruby
module DayLength
def length
if ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"].include? self
"24 hours"
else
super
end
end
end
class String
prepend DayLength
end
day = "Monday"
x = day.length
print(x)
It could be Ruby; puts
is more common, but there is a print
. With some silly context, the answer could even be correct:
#!/usr/bin/env ruby
module DayLength
def length
if ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"].include? self
"24 hours"
else
super
end
end
end
class String
prepend DayLength
end
day = "Monday"
x = day.length
print(x)
I’m sorry to hear that. I think at one point in my past, about half my job was tracking down nil dereference errors in Ruby. And probably a quarter was writing tests for things a good type system would catch at compile time.
By vertical tabs do you mean tabs on the side instead of the top? If so, check out the tree-style tabs extension, it’s great.
What? The people who made him buy it got paid already. I’m sure they’re laughing every time they see it drop in value.
Python with numpy/matplotlib/scipy.
Isn’t that what Unreal Engine has?
I’ve also heard it referred to as “source available”.
I also appreciate that you’re supposed to learn Django 19 years before you learn Python.
You should have some understanding of the nix language to use it, but I wouldn’t worry too too much.
I would also start by installing nix and home-manager on top of whatever distro you already use. For some config, you need to specify things in nix, but for things in home-manager, for example, you can usually either use nix or point to a toml or conf or whatever file.
I prefer to come at it from an immediate utility level, and I think a good place to start with that is home-manager.
You can install nix and home-manager on any Linux distribution or MacOs. It lets you, in a single place, specify what packages you want, services you want to run at the user level, and what config files you want in your home directory. For a lot of things, home-manager has built-in config options, but you can also specify arbitrary config files.
Then, you can take this one file to a new computer, and with no other config, have everything set-up the way you like it.
NixOs allows you to do this for your whole system.
It also has a bunch of other benefits, which tie-in to the jargon you bring up. But if you want to check it out, I’d worry about that later.
I guess I’m neutral evil? I call shenanigans.
Verified is probably a stricter metric than you need/want. Many games aren’t verified just because of font-size issues and the like on the small screen.
I personally don’t think they do, but an argument can certainly be made. Rust proc macros can run arbitrary code at compile time. Build scripts can also do this.
This means, adding a dependency in Cargo.toml is often enough for that dependency to run arbitrary code (as rust-analyzer will likely immediately compile it).
In practice, I don’t think this is much worse than a dependency being able to run arbitrary code at runtime, but some people clearly do.
They’re semantically different for PATCH requests. The first does nothing, the second should unset the
name
field.