Eyy I just watched Red Ranger, extremely enjoyable for how stupid it is. I bet I’d have loved power rangers if I watched it as a kid
Traister101
Yo whatup
- 0 Posts
- 38 Comments
I can’t judge but wow. Impressive
You cannot have a string argument, arguments and variables in JS don’t have a type. All you have in JS is objects. Actual functions, like full on
function foo(){}
are still objects, like you can actually store data on the things.
JavaScript doesn’t have typed parameters or variables. The function expects a string and does things in the function body which converts the object into a string. JS shares this behavior with all dynamically typed languages and it’s extremely useful in some contexts and extremely frustrating in others. It’s down to what it’s being used for. Dynamic languages make excellent scripting languages, see Python really just being a souped up shell lang
It’s not a string argument though, it’s JS. You can argue it’s expected to be a string but like the rest of JS all you can know from the signature alone is that it takes an object. Hopefully your little ducky quacks the right way!
Ah yes now I can… dereference a raw pointer (yes that’s essentially the only thing unsafe rust actually enables you to do, it doesn’t disable the borrow checker or anything else, it just allows you to play with pointers)
So what’s 0 do then? I’m okay with wacky indexes (I’ve used something with negative indexes for a end-index shorthand) but 0 has to mean something that’s actually useful. Using the index as the offset into the array seems to be the most useful way to index them.
If your joking yes, if your not Java and Java Script are seperate things.
Uninitalized memory (
int a;
with no assignment) vector of int vectors (IE a dynamicint[][]
) and attempting to finda
, anint
in the vector of vectors of int IEint
instead ofvector<int>
. I think the iterator type is correct but I’m not sure off the top of my head
Traister101@lemmy.todayto Programmer Humor@programming.dev•Next month is gonna be rough282·7 months agoYou don’t have to be religious to think a fat dude in some red clothes that magically travels around the world giving out presents to good children isn’t a fun yearly tradition. Frankly it’s kind of an overdramatic reaction to a small red hat overlaid onto an icon. Should configuration be provided to disable the functionally? Sure I don’t care, hell have it disabled by default I don’t mind but it’s stupid to make a huge stink about something so minor.
JetBrains has really nice Git integration. Interactive rebaseses and merges are quite pleasant but I’m still dipping into the command line to do stuff occasionally. Most commonly a
git reset HEAD~
cause I want to split a commit though I had to dig through the reflog the other day cause I suddenly realized I lost an important branch that ended up being over a hundred commits back.
Traister101@lemmy.todayto Programmer Humor@programming.dev•"GitHub CI is easy", he said. "It's just `bash` ", he said.4·8 months agoAct works out pretty good but you need to pass it a token and stuff so the actual github CLI bits can work which is kind of a hassle. It took me much too long to discover you need a classic token, the one from the github CLI app
gh auth token
won’t work.Edit: Ah! Also getting act setup involved getting docker setup which involved me enabling virtualization in my bios for what I swear is like the 4th time I’ve done so. Also because I’m on Windows (iirc at least) I had to setup WSL or just make a windows container ಠ_ಠ
Traister101@lemmy.todayto Programmer Humor@programming.dev•You seen the jank? I live in it.. molded by it...3·8 months agoI’d say in most cases that’s a sign something needs to be extracted into a separate function. Course sometimes code is just complicated and extracting only makes things harder to follow. Even then I’d much rather use early return than nested
if
s as those are significantly harder for me to follow.
Traister101@lemmy.todayto Programmer Humor@programming.dev•You seen the jank? I live in it.. molded by it...6·8 months agoMy code got much more readable when I learned about early returns lol
And the entire stack trace
Wow, that looks like a nightmare
Yep that’s why I refuse to use standard libraries. It just makes my code too complicated…
Traister101@lemmy.todayto Programmer Humor@programming.dev•Not really sure whether S-expressions or Python indentation-based scoping get more hate...274·1 year agoSemantic whitespace is awful because whitespace (something that you can’t actually see) has meaning in how the program runs. Braces
{
}
for scopes gives you the ability to easily tell at a glance where a scope ends. Whitespace doesn’t allow for that. Especially, especially when you can accidentally exit a scope (two new lines in a row with Python) and it’s not actually an error (Pythons global scope). Yeah formatters and linters make this less of an issue but it sucks… Languages with legible symbols for scoping are significantly easier to reason about, seeend
symbols in Lua.
It erases the type of what your pointing at. All you have is a memory location, in contrast to
int*
which is a memory location of an int
Because it sounds like English words which is “cool”