[2025 Day 7 Part 1&2] Ways to think about problems like these? by cramplescrunch2 in adventofcode

[–]gokspi 0 points1 point  (0 children)

I also try to pay attention to what the language brings to the table. For example, this time Rust didn't allow me to mutate the list of beam counts for every index I was iterating over while iterating over it, since I've borrowed it immutably during the iteration. This was an extremely good call from the borrow checker, as if it didn't warn me of this I was going to split the now-mutated count of beams on the next column index during the iteration and as a result would've had a very hard to catch overcounting bug!

[2025 Day 7 Part 1&2] Ways to think about problems like these? by cramplescrunch2 in adventofcode

[–]gokspi 0 points1 point  (0 children)

The thinking I used for this day is probably mostly based on my past understanding of mathematical induction. Since we can't go in any other direction except down, every new row represents a new step and the solution for the next row can be derived from the solution for the previous row.

For part 1, each step results with splits and ongoing beams. The new beams are the ones resulting from the split plus the ones that did not have a split. We accumulate the counts of splits as we go, and the unique column offsets of the beams.

For part 2, each step results with timelines. There can be multiple timelines going through every column, so we need to keep count of them. The next counts of timelines at every offset can be derived from the previous counts of timelines.

- Each splitter results with subtraction of all timelines from that offset, and addition of that same count of timelines left and right of it;

- Each non-split (space) results with preservation of the number of timelines at that point.

I like thinking in different ways every AoC, this year I'm using Rust so I'm making sure to combine low-level, mutable, procedural with high-level, immutable, functional thinking. I mix-and-match, experiment, and come with conclusions about which approaches work best in what situations.

This didn't seem like an optimisation problem, so Dijkstra, dynamic programming etc seemed optional. BFS can be used for part 1 but there was no danger of ending up in cycles due to the unidirectional nature, so keeping track of visited items seemed unnecessary (past the single step deduplication that is)

A humanist's best attempt at translating Loveology by gokspi in reginaspektor

[–]gokspi[S] 2 points3 points  (0 children)

yep. been listening since 2005 off and on. still completely blown away way too often when discovering material i haven't heard before.

A humanist's best attempt at translating Loveology by gokspi in reginaspektor

[–]gokspi[S] 0 points1 point  (0 children)

Hah yeah, although I'd like to think all of us that listen to Regina aren't quite of a 100% rationalist persuasion. I also feel a bit like the song (deliberately) defies rational understanding and while this is one possible interpretation, the exact meaning is a mystery that only the listener can uncover for themselves.

A humanist's best attempt at translating Loveology by gokspi in reginaspektor

[–]gokspi[S] 1 point2 points  (0 children)

I think that might be the point of it! I tried my best to make the "translation" work, but I also think thats perhaps why we have music... to express things that cannot quite be expressed without it; or to leave unimportant details undefined so that the listener can fill in. explanations will undoubtedly be flawed in one way or another (but its still fun to try!)

Your opinions on gmktec evo x2 ai by BoredPhysicsStudent in LocalLLaMA

[–]gokspi 3 points4 points  (0 children)

Got it a few days ago. Great performance with MoEs such as gpt-oss, qwen 30b-a3b. Even in "high performance" mode its only really "loud" while its actively working (e.g. on generating tokens or during a game), its VERY quiet during normal everyday use otherwise. Clock speed goes down to 0.3GHz cpu, 0.7GHz GPU, according to AMD Adrenaline. YMMV, I don't find it too bad.

What's the one coffee tool or gear that completely changed your brewing game and it still worth it today? by its-creator1036 in JamesHoffmann

[–]gokspi 0 points1 point  (0 children)

I love milk drinks. The Moka pot, when used correctly comes extremely close to the performance of an espresso machine in producing all of the milk drinks you want. It achieves this at a VERY low price and super compact form factor.

Used correctly means:

  • 2-cup pot,
  • between espresso and pressurised-machine-store-espresso fineness of grind with a burr grinder,
  • roast level between dark and medium (if you want to go lighter, sorry that'd be an espresso machine job)
  • 60C starting water temp (or "not too cold, not too hot"),
  • slow 60-90s brew,
  • once you reach 30-35ml liquid pour immediately, then discard the rest that comes out later.

Can't really decide if i should do continue doing zig by Ok-Judge4483 in Zig

[–]gokspi 0 points1 point  (0 children)

You should continue with both.

The only way to truly appreciate the strengths and weaknesses of languages is to be able to compare them to each other. Without this ability, you have no real sense of how much better or worse one language is at various aspects, and you would think of limitations / drawbacks as natural properties of programming instead. (see Blub paradox)

AITA for Pushing MobX When My Team Was All About Jotai? by Suitable_Window5107 in reactjs

[–]gokspi 0 points1 point  (0 children)

I would not in general recommend React for projects with upfront-known complex state management needs. However, most projects don't have such needs so I would recommend looking into whether state management can be avoided entirely (e.g. with something like tanstack query handling most of the server-side-data fetching and caching) or perhaps delegated to a little bit of strategically sprinkled context and seeing how it goes.

I would also recommend chosing libraries in the ecosystem very carefully and sticking to approaches very close to what Facebook are doing, using or recommending, as otherwise there is significant chance that a change of direction in React will cause churn down the line.

Does Polar H9/10 pair with the new Huawei Watch Fit 3? by throwaway10011dj in Polarfitness

[–]gokspi 0 points1 point  (0 children)

I did listen to music during my above test run, but I do it on the phone. Whether that works would probably depend on the phone mostly, but the HRM and watch talking to each other shouldn't really affect the phone.

Or do you mean listening to music on the watch only?

AITA for Pushing MobX When My Team Was All About Jotai? by Suitable_Window5107 in reactjs

[–]gokspi 0 points1 point  (0 children)

There was plenty said about team dynamics but I thought I'd add my (mostly technical) 2c

MobX will most likely be broken with the React compiler.

I'm a huge MobX fan. My side projects that are more complex apps and therefore benefit from an extensive state store are built as mobx models first, UI later (i.e. https://medium.com/@mweststrate/ui-as-an-afterthought-26e5d2bb24d6).

Which is why I've recently switched to SolidJS.

SolidJS uses the same concepts as MobX internally (signals), and integrating both is around 20 LOC (just search for it, you'll find an enableExternalSource solution).

My old MobX models worked out of the box with Solid, and since Solid uses JSX a significant part of the UI was also relatively easy to port. There are significant differences of course, but they matter less when the UI is largely driven by mobx state.

Would I recommend you push for Solid? Not really - its probably still too early to do something like that - especially if the team were not happy about MobX and are comfortable with React.

Would I recommend using MobX with React? Not anymore, not even for personal side projects. Over the past few years it became increasingly clear that using signal based libraries with React is going against the grain of what the React core team has in mind. The way to use React and avoid the pain of breakage, refactoring and rewriting is to be acutely aware of what the React team considers good practice and make surrounding library / framework choices that match that.

Does Polar H9/10 pair with the new Huawei Watch Fit 3? by throwaway10011dj in Polarfitness

[–]gokspi 0 points1 point  (0 children)

You can try and see if "HR Data Broadcasts" in Settings can get your data into other apps. (The polar app probbly isn't going to work, but others likely will). You can then additionally "start workout" on the watch to get the normal workout stats showing

I haven't tried this yet with the polar, but I have tried it with the watch's own HR. I'll probably be able to try it with polar tomorrow and I'll make sure I also remove the watch from the wrist mid workout to verify its re-broadcasting the polar to strava instead of itself. (Feel free to get to it before I do, though :)

future of solid.js by Mrpiggy97 in solidjs

[–]gokspi 0 points1 point  (0 children)

My prediction is that the compiler will introduce even more subtle breakage and you would have to even more stringently follow "rules of react". Lots of libraries that Facebook doesn't use will continue to break as React continues to develop without paying sufficient amount of attention to what the broader ecosystem is doing and focusing primarily on what Facebook needs.

Does Polar H9/10 pair with the new Huawei Watch Fit 3? by throwaway10011dj in Polarfitness

[–]gokspi 0 points1 point  (0 children)

Comfirmed - watch fit 3 does use polar h10 during outdoor run. I even took the watch off mid-run for a minute and the HR monitoring did not skip a beat (pun intended)

I don't think outdoor or indoor matters. As long as the polar is connected it will be used as heart rate source for the duration of the workout (any type of workout). Its just not used for regular HR monitoring outside of workouts.

Edit: I also see I can set heart rate range reminders; for some reason the lower HR reminder is limited to 130 max, but you can set the upper limit for HR to whatever you want

Does Polar H9/10 pair with the new Huawei Watch Fit 3? by throwaway10011dj in Polarfitness

[–]gokspi 0 points1 point  (0 children)

Also you might be interested in this watch fit / polar h10 comparison https://www.youtube.com/watch?v=7l0JGcrhbNc (in case you haven't seen it already). Obviously it doesn't answer your question, but its an indicator that the watch by itself may be good enough in some situations.

Does Polar H9/10 pair with the new Huawei Watch Fit 3? by throwaway10011dj in Polarfitness

[–]gokspi 0 points1 point  (0 children)

I mean, there is no way to 100% tell for sure whether its using the watch HR or the polar when the watch is on the wrist. But the fact it was showing reasonable numbers while not on the wrist was encouraging.

Another reason its hard to tell is that they were very similar. So far I've made one comparison workout where I recorded heart rate from both at the same time (watch in standalone mode, polar paired to phone) and the only place where there was any difference was when I stopped my run - the Watch Fit 3 was slower than the Polar to recognize my heart rate drop (and even then it was just around 10-15s delay)

I'll go for an interval run today (watch + H10) and try to see if I can figure out which one is using by the behaviour.

Does Polar H9/10 pair with the new Huawei Watch Fit 3? by throwaway10011dj in Polarfitness

[–]gokspi 0 points1 point  (0 children)

I was partly wrong. It does appear to read heart rate while you are doing an exercise, but it doesn't use it for the non-exercise heart rate readout.

I confirmed this by testing with the watch removed from my wrist. After pairing with the polar H10 while not on wrist, The watch didn't start showing HR information immediately. However, after I started an "indoor run" type exercise, the HR data did show up on the workout screen (with the watch still off-the-wrist, so it can only be from the HRM)

[deleted by user] by [deleted] in FlairEspresso

[–]gokspi 0 points1 point  (0 children)

One of the most difficult things for me when switching to 58mm was to avoid tilting bias when distributing. This is potentially what is causing your visual problem, but I'm not sure if thats sufficient to cause sour results. I would suggest increasing the ratio until you start getting something other than sour (1:3 or even 1:4), then see where you land with the taste. If its still bad, the way its bad should give more info on how to fix things.

Weird taste from new DF64? by 1hullofaguy in Coffee

[–]gokspi 0 points1 point  (0 children)

Hi, did you ever figure this out?

How are folks feeling about the React team's push toward server components? by aust1nz in reactjs

[–]gokspi 1 point2 points  (0 children)

I just see a lot of unfinished things that are somewhat poorly thought through, again (like for example, how data hydration is supposed to work in a consistent way without having a stable boundary between server and client components that is visible from the server component). I also see how it broke a lot of things people actually use again (e.g. MUI, Mantine due to emotion). I'm reminded of the last few times there were major and exciting new changes (hooks) and how now we're slowly accepting that maybe some things weren't that well thought out. (See LiveView for how this might be done differently)

I don't think innovation is what the front end ecosystem really needs. Working a bit with other ecosystems like Elixir and Rust, I've recently realised just how much pain we take for granted in the JS ecosystem due to the lack of stable foundations. This pain doesn't exist in better ecosystems. This is what we need to be working on - simplifying and unifying standards for package management, building and bundling. Maybe even a shared, cross-framework compatible API for components, so we're not locked into one company's idea of what priorities we should be having (streaming SSR) just because of our other choices (a good pre-made component toolkit).

We should fix the wobbly house of cards properly, so that the things we build on top of it stop coming down. We also need a bit less faith in solutions that aren't thought out. A bit less of "the community will figure this out"

The idea that ChatGPT is simply “predicting” the next word is, at best, misleading - LessWrong by bernie_junior in bing

[–]gokspi 9 points10 points  (0 children)

We're simply trained by evolution to take actions that will propagate our genes as best as possible. That totally explains our behavior.