Readit News logoReadit News
jrrrp commented on Flix – A powerful effect-oriented programming language   flix.dev/... · Posted by u/freilanzer
wk_end · 2 months ago
I agree with OP that this seems a little unfortunate, even though it's pretty par for the course.

"Bugs are not recoverable errors" is such a fuzzy idea. On the one hand, indexing an array with an out-of-bounds integer could just be considered a program bug. On the other, the point of making the indexing operation return an optional value is to force the program to handle that scenario, preventing it from being a bug. One of the examples they give of a "recoverable error" is illegal user input, but in the case of "the user enters an index and it might be invalid", the language does nothing to keep the recoverable error from turning into an unrecoverable program bug.

jrrrp · 2 months ago
It does seem to depend highly on the context in which the array is used. Strictly defined algorithm with an off-by-one: bug. User-defined indexing as you say is a counter. I suppose it is hinging on arrays being used in less dynamic contexts where you're likely to know the length, so to save you from handling all the Nones. I think I'd prefer a parallel api that returns Option, so you don't need to duplicate the bounds checking.
jrrrp commented on Flix – A powerful effect-oriented programming language   flix.dev/... · Posted by u/freilanzer
miniBill · 2 months ago
Very cool language. The standard library looks mostly sane, although it does have `def get(i: Int32, a: Array[a, r]): a \ r` which means that it must have some kind of runtime exception system. Not my cup of tea, but an understandable tradeoff
jrrrp · 2 months ago
Just looking at the language myself, but it seems that it treats out-of-bounds array access as a non-recoverable bug and panics [1, 2], whilst map access returns Option [3]. Exceptions are a language construct only to enable Java compatibility and not recommended otherwise [4], but that's not to say you couldn't implement your own try/catch using the effect system. `r` is a region variable as the sibling comment says.

[1] https://doc.flix.dev/chains-and-vectors.html#vectors

[2] https://flix.dev/principles/ See also "Bugs are not recoverable errors"

[3] https://api.flix.dev/Map.html#def-get

[4] https://doc.flix.dev/exceptions.html

jrrrp commented on Getting Past Procrastination   spectrum.ieee.org/getting... · Posted by u/WaitWaitWha
yodsanklai · 3 months ago
> Across a decade working at hypergrowth tech companies like Meta and Pinterest, I constantly struggled with procrastination

I used to procrastinate a lot when I was a PhD student and later in academia. Sometimes, it was literally weeks of doing nothing and stressing out.

I eventually migrated to big tech and I now rarely procrastinate. We have pretty tangible goals, good results are rewarded and lack of results would raise concerns pretty quickly.

In my case, working in the right environment helped a lot with procrastination.

jrrrp · 3 months ago
It's good to read this while being in one of those nothing-months myself. I have extended the deadlines and my goals are not clear.

Incidentally, I have a supervisor who felt the exact same way when he was doing his PhD and fled to industry. Evidently he found that there was something to be enjoyed in the freedoms of research and returned.

jrrrp commented on My simple knowledge management and time tracking system   henrikwarne.com/2024/11/0... · Posted by u/henrik_w
TechDebtDevin · 10 months ago
I just use Logseq (+ syncthing for sync) with extensive tagging (thousands of tags added a year) + a random Pomodora app that keeps records and descriptions of each Pomadora. Simple and effective
jrrrp · 10 months ago
How do you manage having thousands of tags? What is your use case? I quite quickly moved away from them because I couldn't have a strict/normalised system for it. E.g., I would end up with #a, #as, #<synonym of a>, #parent/as, etc. After a while of this, it would either reduce to nothing better than keyword search, or the effort of keeping track of existing tags and the "right" tags would prevent me from tagging at all.

u/jrrrp

KarmaCake day5November 15, 2024View Original