Very cool. To be honest most of these languages (except maybe Lisp and BASIC) are pretty awful. I can't imagine writing anything in them. Especially K. That's got to result from some form of brain damage...
It’s only 7 bytes of code. !10 returns a list of numbers 0 to 9. 1+!10 adds 1 to each of them resulting in a list [1, 2, …, 10]. Finally /1+!10 applies * verb with scan adverb and returns 123...*10 which is a factorial of 10.
But it processes arrays of numbers in such an elegant way what no other language can compete with it (well, maybe numpy).
Uhm yeah or maybe MATLAB? I mean I mainly like MATLAB because of its unbeatable plotting abilities, but even MATLAB can do prod(1:10)
. I am very happy to spend 3 extra bytes on that readability improvement!
Only a Linux user's answer to "how do I install software that's not packaged for my distro" would be "don't".
The only Git GUIs that I've ever liked:
- GitX, and its many forks. Mac only though.
- Git Extensions. Terrible name, but this is actually a standalone Git GUI and is surprisingly decent. I think it started Windows only but maybe there's a Linux port now.
- VSCode's "Git Graph" extension. It's not quite as fully featured but it integrates well into VSCode and is pretty nicely designed.
I've tried almost all the others (SmartGit, Sublime Merge, GitKraken, etc.), and didn't really like how they worked.
It's sooo sloooow though.
Ooo I've not seen this before. Looks interesting.
Impressive persuasion! I can't imagine that ever working at any company I've worked at.
Swift users... how is it? I hear compile times are bad. Worse than C++/Rust?
It's not just that. Debugging segfaults and UB can be an absolute nightmare.
The C++ committee still haven't learnt their lesson. I recently learnt about C++20 coroutines, which are pretty neat, if complex (there are pretty much no good learning resources about them). However they are still putting unnecessary UB footguns in it.
It's not moot. The Safe C++ is opt-in to safety. It has to be because otherwise it wouldn't be compatible with existing C++.
Yeah but I have written a lot of Rust and I have yet to use a single unsafe
block.
Saying "but.. unsafe!" is like saying Python isn't memory safe because it has ctypes
, or Go isn't memory safe because of its unsafe
package.
No it doesn't, that's bullshit.
I haven't actually used this site (found it after I already learnt Git), but it gets posted a lot, and one issue I feel like it has is it shows you the Git graph using a tool that you have to immediately throw away after you've finished this tutorial.
I think it would be better if it had an actual real Git tool shown. I would say VSCode's Git Graph extension would be ideal but unfortunately it has a stupid license.
That's... kind of extreme! I don't know of any alternatives that allow migrating issues from Github and generating these graphs anyway.
The tool on the page. If you try a large repo it will indeed hit that limit, offer a button to authenticate yourself, but if you click that button it never loads the target URL.
Unfortunately it's not my organisation so I can't create a project.
Gives "rate limit exceeded" and the authorisation link doesn't work unfortunately.
Does anyone know of a website that will show you a graph of open/closed issues and PRs for a GitHub repo? This seems like such an obvious basic feature but GitHub only has a useless "insights" page which doesn't really show you anything.
Well Intel's Octane was meant to be that. I'm not sure it quite made it but anyway it ended up being way too expensive and people just stuck with RAM + disk.
He never said it was an Internet Draft. Try actually reading. It might help you in the future when you are discussing things.
I think I disagree with everything here.
Exceptions Are Much Easier to Work With
Well, they're "easier" in the same way that dynamic typing is easier. It's obviously less work initially just to say "screw it; any error gets caught in main()
". But that's short term easiness. In the long term its much more painful because:
- You don't know which functions might produce errors, and therefore you don't know where you should be even trying to handle errors. (Checked exceptions are the answer here but they are relatively rarely used in practice.)
- Actually handling errors properly often involves responding to errors from individual function calls - at least adding human readable context to them. That is stupidly tedious with exceptions. Every line turns into 5. Sometime it makes the code extremely awkward:
try {
int& foo = bar();
} catch (...) {
std::cout << "bar failed, try ...\n";
return nullopt;
}
foo = 5;
(It actually gets worse than that but I can't think of a good example.)
Over 100× less code! [fewer exception catching in their C++ database than error handling in a Go database]
Well... I'm guessing your codebase is a lot smaller than the other one for a start, and you're comparing with Go which is kind of worst case... But anyway this kind of proves my point! You only actually have proper error handling in 140 places - apparently mostly in tests. In other words you just throw all exceptions to main()
.
System errors [he's mainly talking about OOM, stack overflow & arithmetic errors like integer overflow]
Kind of a fair point I guess. I dunno how you can reasonably stack overflows without exceptions. But guess what - Rust does have panic!()
for that, and you can catch panics. I'd say that's one of the few reasonable cases to use catch_unwind
.
Exceptions Lead to Better Error Messages
Hahahahahaha. I dunno if a bare stack trace with NullPointerException
counts as a "better error message". Ridiculous.
Exceptions Are More Performant
Sure maybe in error handling microbenchmarks, or particularly extreme examples. In real world code it clearly makes little difference. Certainly not enough to choose an inferior error handling system.
I would say one real reason to prefer exceptions over Result<>
s is they are a fair bit easier to debug because you can just break on throw. That's tricky with Result<>
because creating a Err
is not necessarily an error. At least I have not found a way to "break on Err
". You can break on unwrap()
but that is usually after the stack has been unwound quite a bit and you lose all context.
I'd like to know which specific projects they funded. It's there a list anywhere?
YouTube Video
Click to view this content.
Very impressive IDE integration for Dart macros. Something to aspire to.