552 karma · joined April 22, 2021
I wish that I knew what I know now, When my sutures were younger.
I've looked into native Linux development a few times, for example, and haven't even been sure what's the best toolkit to use. It feels like you'd have to invest quite a lot in a particular toolkit to even see if it can do what you need, coming fresh from web dev like a lot of people who go for Electron obviously are (myself included).
Actually, as another commentor mentioned, you can and should just choose something that represents what you want. In many cases it will be an object with various domain-specific fields. If you need to be sure that "3.99" always comes back as "3.99", you can use a string, which doesn't have any issues with precision in the storage format, and will usually map exactly to how humans deal with the concept. (Not necessarily recommending this, but it's worth considering.)
Similarly with JavaScript precision issues, to take another example that's been mentioned here - if you need numbers to be precise and the performance cost is acceptable, JavaScript can compute to arbitrary precision just as well as any other language. Just don't assume you're forced to convert your concept of a number to use the built-in numeric types and operations.
Recently started learning Rust: https://gushogg-blake.com/r/learning-rust-1.
Anyway, about half way down we came upon some large animal footprints and stopped to look at them. They were very clear and we both thought they could have been big cat prints. They looked too big for a dog, and the location and time of year didn't make that much sense for casual dog walking and there were no other human prints around. We still had a few miles to go and camping out in tents or in a sheep shelter for the night was very much on the table, so I think we both decided to just put the idea of a big cat out of our minds, to the extent we took it seriously to begin with. Makes me wonder!
From the being-hired side, I was hired by Chess.com when the CEO found my chess app on GitHub. I think that was one of his main hiring strategies - look for chess-related projects and get in touch with the authors.
Having used Lezer and CodeMirror a bit on a different project, they both seem like they are probably high quality and well thought out projects from a speed and reliability perspective, but I found the architecture and docs to be confusing and unergonomic.
The main issue I have with the docs/architecture (for CM at least) is that they use a concept called "facets" without really explaining what it means, and to be honest it felt like a level of abstraction/indirection that my brain couldn't handle.
The other issue with the docs is that they don't seem contextualised enough, somehow. They would list the functions/methods of an object but not really explain how it fit into the system as a whole. Maybe this is to do with not understanding facets, or CM's extension architecture, enough, or something, but it was definitely a recurring theme of my experience. I also found the CM API slightly confusing in that (almost) everything you do is via a function that takes some state object as input, as opposed to via calling methods on that object, but that's more of a style issue once you realise that you have to `import {doSomething} from "codemirror"` and `doSomething(state)` as opposed to `state.doSomething()`.
Yeah, not claiming that my hunches are any more scientifically valid, but that is my best guess from what I've read.
I agree and I do think it's good to take some degree of control over it, especially with the already unnatural environment we're subjected to. I just think there is another side to the IF story that isn't told as often.
I think people who are naturally good at sticking to things and are already interested in self optimisation etc are probably more prone to overdoing it and doing extreme diets like one meal a day or 30 bananas a day. The "intermittent" in IF is a bit misleading in my opinion, because none of the youtubers I was watching back in the day seemed to mention taking a break from it. It was basically choose an eating window like 6-10h and then stick to it rigidly, which to me doesn't really capture what I assume these people are going for - something more like the random periods of extended fasting that we might have undergone as hunter-gatherers.
The main difference is I have a short para at the top as an intro. Also you can click each position for more details.
Code for it is on gitlab: https://gitlab.com/gushogg-blake/svelte-cv
Does not have domain-specific dependencies.
So a code editor based on ACE or CodeMirror would not be from scratch, obviously, but one that involves writing all of the domain-specific logic would be. Using generic libraries doesn't stop something being from scratch. (In my case Tree-sitter is arguably domain-specific, but an early version did use a hand-coded JavaScript tokeniser in its place.)
> The biggest challenge is figuring out how to store the text document in memory. My first thought was to use an array, but that has horrible performance if the user inserts text anywhere other than the end of the document.
I guess this is only an issue in low level languages, as I just used a JavaScript string and I don't think it's been a perf issue in 2+ years using my editor full time. Plenty of other things have been, of course - rendering long horizontal lines comes to mind, as my approach to optimisation assumed rendering a single line would be cheap and expanding the logic to render partial lines would add another whole dimension of complexity.
(By "long" I mean an entire minified file, for example.)
It worked great for the use case I built it around initially but I think it would need a scripting/logic component to generalise to any conceivable refactoring.
5 => 0101
And the only way I can get this to give -6 is if the bitwise NOT operator takes this entire representation (0101), inverts the bits, then creates a new sign bit and inverts that, giving: ~5 => 11010
[1]: https://en.wikipedia.org/wiki/Two's_complement 5 => 00000000000000000000000000000101
~5 => 11111111111111111111111111111010
But parseInt("11111111111111111111111111111010", 2) is 4,294,967,290, not -6. (Even if the first bit were interpreted as the sign, shouldn't this be -2,147,483,642?)The fingerprint idea is that emotions are caused by body states without that layer of interpretation/construction, so you could look at bare metrics like blood pressure, arousal, and facial expression and derive which emotion the person must be feeling directly from them.