Prophet
@welltypedwitch
Followers
3K
Following
48K
Media
667
Statuses
10K
There's no sense crying over every mistake. You just keep on trying till you run out of cake. - GLaDOS https://t.co/70SfmxnROe https://t.co/p6LXXU7dGH
Joined July 2019
@ChShersh okay but why though? being able to open pdfs as browser tabs is such a good feature.
1
2
4K
welp, look what i just found in some code i wrote 7 months ago. (this is not a joke lol)
Due to my elite programming skillz, I figured out how to shave off THIRTY SECONDS from my app's startup time. Here's my optimization tips:. 1. Remove the sleep(30) call I added a month ago and forgot to remove.
9
49
1K
"ask her what the difference between a compiler and an interpreter is" is such a middle of the bell curve meme question lol.
These are simple questions that a lot of people learn during their first college computer science course. If you haven’t, though, it’s never too late. It’s easy to forget things that we don’t use, but I promise that no one graduates from Harvard with a computer science degree
34
27
1K
tell me you don't know how compilers work without telling me.
honestly anyone who has written software claiming AI isn't dangerous because it's 'just emitting tokens' is being disingenuous or is in a deep state of cognitive dissonance. the first phase of compilers is called "tokenization". emit the right tokens and you can own the world.
15
24
527
this tweet is so funny to me. they had google bard generate go and rust code for the same problem, apparently didn't notice that the results do very different things and then concluded that Rust Is Bad because, uh, the code bard generated does error handling?.
My crusade against some RUST zealots continues. Here are examples of build patterns with #golang and #rustlang.Not only do you need to know less about language with Go to understand what is going on here, but look at this rust "simple" error handling. Oh, my Spaghetti Monster
27
29
492
even hotter take: generated source code shouldn't exist. you should be able to use a nice expressive, introspectable metaprogramming system instead.
My hottest tech take: generated source code should be committed. It happened to me so many times when the code generation logic was changed, a bug was introduced and there were no git diff to even compare with the old versions.
33
21
377
i don't buy this. in fact, i'm going to claim the exact opposite!. i think it's *easier* to predict what the fold is going to compile to than the loop. (1/a lot).
Despite the merits of the 1st alternative, many people like the 2nd because they can predict the minimum the compiler will do to translate that to machine code, and that minimum is perf-sufficient. Not just that, but the 2nd can also be changed to a map-reduce in one line. (1/5)
19
26
273
@hot_girl_spring well yeah because records just do this for you, but the concept of having a function to get the value rather than exposing the field itself is still there with records, right?.
2
0
220
Language I dislike: Python.Language I begrudgingly respect: Scala.Language I think is overrated: OCaml >:).Language I think is underrated: Lua.Language I like: OCaml.Language I love: Haskell.Language I dream of writing in: Vega.
Language | dislike: Java .Language I begrudgingly respect: TypeScript.Language I think is overrated: Go.Language I think is underrated: Elixir.Language | like: Haskell.Language | love: OCaml.Language | dream of writing in: Rust.
16
7
176
this also applies to our fancy high level functional languages btw. any time you're storing a static collection of things in a linked list instead of an array because it's easier or because that's what everything else expects is a language failure.
I got to watch a person livecoding in C and instead of put themselves through writing Yet Another Hash Find, they just literally wrote a linear scan because "it was easier and this code will never be a critical path". This is what a lot of other people said about their shit too!.
4
12
170
i do think it's really funny that the bar to being """cracked""" on here is apparently now "writing a compiler and using haskell" lol.
@tunahorse21 the most cracked dude I know wrote a compiler in uni and was the first person I saw using Haskell. that was 17 years ago. he still hasn’t made it to senior because he’s deadass the weirdest dude to communicate with. coding skills will only get you so far.
14
7
160
@The_MrX_ what performance penalty? i would be very concerned if your java JIT can't inline a trivial getter.
2
0
152
death by 1000 cuts sums up ocaml so well unfortunately. and not just the tooling, even the language itself has soo much like this. just off the top of my head, there is.- polymorphic comparison.- reference equality.- whatever ocaml calls "type variables". .
@Aron_Adler opam/dune for sure. opam mostly but, dune isn’t bad but feels a bit lacking. Also things like init project seems like could have some better defaults, and structure/naming. Just many small things. Death by 1000 cuts. Stuff you could probably get used to if you stick it out, but.
10
10
152
I've looked into what's actually happening here and this is honestly such a strange TS bug. If TS knows that T is a subtype of { x : A | B }, it somehow assumes that T["x"] is *exactly* A | B and *not* a subtype of it, which is just wrong.
Woops! Despite doing everything by the books and not using any escape hatches ('as', 'any', or 'non-null assertions') TypeScript let us give a normal 'member' admin permissions! 💥
5
12
128
hey to be fair: he never said the inferred type had to be correct.
@MarkovMagnifico Done right, a compiler should be able to figure out type automatically. It’s not that hard. Not that it will matter much in the AI future.
7
1
132
Haskell = Celeste.Idris = Slay The Spire.Agda = Touhou: Lost Branch of Legend.Scala = Wolfenstein II.JavaScript = Fortnite.C++ = Doom.Rust = Doom (2016).ATS = Elden Ring.OCaml = Counter Strike.F# = Valorant.Polaris = Portal 2.Teika = 5D Chess With Multiverse Time Travel.
Programming Languages as Video Games. Java = Call of Duty.TypeScript = World of Warcraft.Python = Sid Meier’s Civilization.C = Counter Strike 1.6.C++ = Dota 2.Go = Slay The Spire.Rust.Lisp = Portal 2.Haskell = Dwarf Fortress.OCaml = Elden Ring.Excel = Minecraft.
21
12
127
@tthbaltazar Yes exactly. _ mod 4 is always in the range 0. =3 which is usually what you want.
1
0
115
@stylewarning i mean, it *is* pretty surprising that default arguments are evaluated once and then shared but that's.1) a property of the language, not the interpreter and .2) something you *really* need to know if you're ever using default arguments.
7
1
111