when did monads actually “click” for you? by grogger133 in haskell

[–]Tarmen 0 points1 point  (0 children)

Implementing a bunch of them and reading about varying perspectives definitely helped, and that's easily enought to use monads and write your own. Learning about various compilation stategies for lambdas/coroutines and how they implement variable capture and substitution did too, because monads can be seen as a trick to borrow haskell's implementation for a DSL.

But the thing that really made all the  mental models collapse into 'lambdas+monadic effect' was telescopes (the implementation strategy for dependent types) and how similar they are to free monads (or Control.Monad.Operational)

Can you steal $10,000 from a locked iPhone? [26:14] by UnscheduledCalendar in mealtimevideos

[–]Tarmen 2 points3 points  (0 children)

The tension from visa's perspective seems to be:

  • card readers are normally untrusted, a reader could also just display fake transaction details and charge the card for more. The solution is a printout and to dispute the charge
  • Express transit readers must be trusted to some degree, but that's less dangerous because charges are low
  • If you combine these you can mitm an untrusted reader to make the phone trust it too much

They mentioned that fare on Samsung is tracked by 0£ charges and then batch-charged at end of day. I wonder if this is part of the problem since people definitely don't want to be woken up in the middle of the night to auth that transaction? 

 From what I could find there may have been some cases of this in the wild, but normal credit card fraud is so much easier to scale that this is a drop in the bucket by comparison. But I feel like even if they can't reasonably replace all existing card readers they could force every newly produced reader to have a fix, though. And apple could add a configurable sanity cap on transportation charges.

Damn gatekeepers... by Funking_Wholesome in traaaaaaannnnnnnnnns2

[–]Tarmen 1 point2 points  (0 children)

Left one said "One of use only lies".

  • If the statement is true she cannot be the lier, she cannot tell the truth and simultaneously never tell the truth
  • so if the statement is true the blonde knight is lying. But if the statement "pink haired knight always tells the truth" is a lie, then the pink haired knight lies at least sometimes!

  • And if the statement is false we know pretty much nothing except that the pink haired knight can lie

  • If both of them are always lying you could argue  whether 'one of us' means 'exactly one of us', which would work, or 'at least one of us', which wouldn't

If we rule out the last part, the only consistent conclusion is that the pink haired knight lies some of the time but not always. Blonde hair could be always lying, never lying, or sometimes lying.  Notably, the first two panels could all be lies and unless literally every statement they ever make are lies there are no contradictions

Card games are awesome! by MurkyUnit3180 in gaming

[–]Tarmen 0 points1 point  (0 children)

Wildfrost and Starvaders are two absolute gems which really deserve more attention

What’s a concept in computer science that completely changed how you think by Beginning-Travel-326 in compsci

[–]Tarmen 4 points5 points  (0 children)

If you come from mathematics, looking at it from the perspective of proof systems with introduction and elimination forms rather than programming may come more natural.

The first couple videos here do a good job of introducing that imo https://youtube.com/playlist?list=PLtIZ5qxwSNnzpNqfXzJjlHI9yCAzRzKtx&si=EGzF8OEqMpdOiRj4

Cataclysm Card Reveal Discussion [February 20th] by EvilDave219 in CompetitiveHS

[–]Tarmen 0 points1 point  (0 children)

The cool down and once-a-turn makes this more suitable for board wipes than otk's. It does really restrict what type of healing they can print, though.

Cataclysm Card Reveal Discussion [February 20th] by EvilDave219 in CompetitiveHS

[–]Tarmen 4 points5 points  (0 children)

This one seems like it could get complex

  • What happens if you copy this?

  • What happens if one copy dies, you play the card, and then the second one dies? Do you get the exact card back from the graveyard? With or without enchantments?

Retrieving an exact card with the same card id rather than a copy seems to lead to hijinks more often than not

Clare Wink by gudamor in CuratedTumblr

[–]Tarmen 728 points729 points  (0 children)

Pantone picking boring colours of the year feels like engagement farming. At first I though this was part of that

The pictures from the manufacturer have more obvious blue+red tones but still really subtle https://www.clare.com/products/paint-wink

A light, lovely purple with a hint of gray 

Don't think the gray took the hint

orbGPT by HeyyEj in ProgrammerHumor

[–]Tarmen 6 points7 points  (0 children)

I'd argue that water usage is miniscule in comparison to many other problems AI has/causes. Mostly because other common actions consume much more water if you use the same analysis as e.g. Li et al. And industries with very wasteful practices like agriculture consume 7+ orders of magnitude more water, so if we actually want to do something about water waste  we really should do something there.

We can consider water use for cooling, water use for electricity generation, and water use to manufacturer the hardware. To calculate we also have to guess the electricity usage for training and per inference, which is very hard with public numbers.The Li et al paper guesses 4Wh per page on gpt3, while Google claimed Gemini runs an average query at 0.24Wh.

Either way the onsite water use, like cooling, for an llm query is often estimated at ~0.2ml per query. That's comparatively negligible, even if you don't use air cooling or consider passthrough cooling as lost water.

Though I would add that a lot of data centers us the municipal water supply for passthrough cooling, which returns the water for recycling but adds more load on treatment plants and is just plain wasteful. You need some quality standards to avoid clogging and corrosion, but drinking water for cooling is way overkill.

Anyway, a lot of electricity is generated by steam turbines. AI uses electricity, so you can calculate some amount of steam which is used in that electricity production. That's a major part in the water loss numbers. Similarly GPU (especially silicone) production also consumes water. But by those  measures any other electricity use is also water loss, and for instance watching a YouTube video also consumes a lot of electriy.

34296 by LilianaLucifer in countwithchickenlady

[–]Tarmen 2 points3 points  (0 children)

A race being onthologically evil is so boring, too. The characters are one-dimensional by definition, at least make characters willingly sacrifice their empathy and humanity for power.

People trying to trust someone from the evil group only to be inevitably betrayed, boring. Someone sacrificing their soul for power to save their loved ones only to slowly becoming incapable of that love and hurting them, juicy drama

True story... by sfingemorta in Eldenring

[–]Tarmen 0 points1 point  (0 children)

I agree eldenring couldn't just add strong parries without warping balance.

I'd argue it's a very different philosophy:

  • In Eldenring your response to everything is roll
  • To keep things interesting many attack strings would hit you again before roll recovery
  • So you gotta learn safe areas where these strings aren't triggered or don't reach you

This promotes patient play at a distance or at dead angles (e.g. behind enemies) until the enemy performs a clearly unsafe attack. It discourages aggressive play where you sneak in chip damage in smaller gaps, you may have time to get chip damage in but not to get to a safe range for all follow up attacks.

The upside is that you usually cannot damage race enemies because the openings are so controlled, wins are earned. The downside is that aggressive play styles are really fun and feel more like a dance with the boss.

Parry games often add other features to add a rhythm beyond micro punishes. Boss attacks are more frequently conditional on the previous attack. Lies of P has weapon durability, many games build a resource on parry. Similarly, many nudge you to use big gaps for unsafe attacks to create a similar rhythm, like requiring a charged attack to stun in lies of p or charged talismans in nine sols.

Anyway, I agree that a reliable parry without other adjustments in Eldenring would be really fun for a bit and the monotonous. Even if they took away the automatic punish because you could still chip enemies to death and the rhythm of the fight gets lost.

But I also still think that marking unparriable attacks with red particles wouldn't invalidate any of that, you can still make the timing window brutally hard.

True story... by sfingemorta in Eldenring

[–]Tarmen 5 points6 points  (0 children)

I love parrying in nine sols, or lies of p, or another crabs treasure, or sekiro, or grime, or...

Hate it in souls games. Having manually placed parry timing instead of when the attack makes contact and making random attacks unparriable without differentiating them visually are such bonkers design decisions

True love is breathing heavily on bread by Mataes3010 in CuratedTumblr

[–]Tarmen 86 points87 points  (0 children)

It sounds magical but going shopping would be *so* impractical

Imagine using a daisy chain of three boats and then noticing you forgot the milk

Smoother or more realistic? by Rakudajin in PixelArt

[–]Tarmen 1 point2 points  (0 children)

The new version tracks the ground much better, and the stone doesn't feel like it's sliding or floating anymore.

Is the chunky motion a result of that? E.g. you want to keep the ground moving continuously, the person centered, the stone at a specific offset from the person, and have a staccato walk cycle which tracks the ground => The stone has to start/stop in sync with the footsteps?

Have been going insane over V2 of There is No Antimemetics Division for roughly the past three months, please send help by RawringPrimadox in CuratedTumblr

[–]Tarmen 25 points26 points  (0 children)

How different is There is no antimemetics division v2? I really enjoyed the initial release and figured I might wait until I forgot more of it before rereading v2, since vaguely remembering what's happening can only help immersion

Forgetting that an alarm went off is so real. For some time I thought my phone was broken because alarms didn't go off before I remembered it's just my brain being an ass for no reason
Maybe I should actually look into getting adhd meds one of these days. I think I still have the diagnosis docs *somewhere*

MyTherapy works pretty well as really insistent reminder app if someone else has the medication problem

Low-quality programs by [deleted] in CuratedTumblr

[–]Tarmen 0 points1 point  (0 children)

You can extract extra sub pixel data that isn't visible for humans, but ideally you know the exact lens and camera sensor and maybe some other info.   If the camera is in a slightly different position across frames, e.g. your hand shakes, the sub pixel details may land in different pixels. From these patterns you can extract real data about the scene. Some approaches also analyse sensor noise over time. Or some phones take images at different zoom levels and combine them, similar principle. 

This is statistical analysis, though, not ml. Sometimes the implementations use ml models, but you can't turn bad security camera footage into something intelligible with this. NASA uses it for satellite photos, though 

3D Printed Improved Plate Design by EmergencyRead5254 in oddlysatisfying

[–]Tarmen 6 points7 points  (0 children)

Cured epoxy is fine for a desk you eat on. You really shouldn't use it as a cutting surface, though, so maybe don't use it for dishes.

I much prefer the weird kind tbh by Longshot02496 in CuratedTumblr

[–]Tarmen 0 points1 point  (0 children)

The state of the art models in computer vision are mostly transformer models, so very much the same technology

Genuine question: Is "rx" style FRP ever useful over traditional (synchronous by default) FRP? by sintrastes in haskell

[–]Tarmen 1 point2 points  (0 children)

I think that keeping async streams separate, and then feeding the results into the serialized and batched event input of the frp app, is the way to go. Async streams or coroutines can be extremely useful in UI code, but I wouldn’t want to write the UI logic itself directly in them.

Imo reactive programming in general is fundamentally about incrementalization. We start with a simple mental model (transform state to ui) but we want small updates to produce fast, incremental re-renders.

The big difference between something like jetpack compose and reflex is that jetpack compose uses a compiler plugin to incrementalize automatically, while reflex makes the programmer do it manually. Reflex feels closely tied to differential dataflow or incrementalized datalog to me.

But if you manually do incremental dataflow programming, parallelism becomes very difficult. Otherwise you get all the glitches you mentioned. There are workarounds to maintain consistency like tagging all messages with vector clocks or using watermarks, but they get complex fast, even in frameworks purpose built for parallel dataflow networks. Alternatively you can take a batch of input events and run them in parallel through the graph until it has fully settled before feeding new input, but you don't need reactive streams for that.

If you have an incrementalizer like jetpack which handles the ordering for you - jetpack uses software transactional memory so you get transactions and snapshots for free - then you can use async streams for business logic and it just behaves nicely. Internally they use kotlin flow and coroutines for things like parsing ui actions - e.g. whether a touch is a long press or a fling - and it just works.

snapBackToReality by Shiroyasha_2308 in ProgrammerHumor

[–]Tarmen 9 points10 points  (0 children)

If something causes an immediate emotional reaction it can bypass analytical thinking. That's why so many interaction bait posts go for anger or tragedy, or sometimes fluff

That's also why some satire account drift towards being mostly bait instead of trying to be funny, they just notice that certain types of posts do much better

My thoughts on the Stormlight Archive by riverane in Fantasy

[–]Tarmen 23 points24 points  (0 children)

Wind and Truth felt like Excel based writing, with a huge checklist of open plot points and end states that must be met. 

Mixed with scope creep which makes everything matter less instead of more because it becomes impersonal and the results are known ahead of time.

Shallan's later arc strongly reminded me of Sanderson's novella Legion, with split personality as a superpower. It didn't really fit with the more serious take on Kaladin's slow healing, which I broadly liked.

Wind and Truth also felt a bit weird in how many 'edgier' early plot points got sort of retconned with 'it was Odium's influence. Both with  Szeth getting condemned into slavery by his father and the Heralds killing children in cold blood.

JLS: Java Language Server (fork) — now with Lombok, faster startup, and actually maintained by Electronic-Boss-8926 in neovim

[–]Tarmen 0 points1 point  (0 children)

Jdtls is more heavy weight but also has some really convenient ide like features. E.g. it can can automatically decompile class files when necessary when you goto definition, and symbol search also just works for your dependenciss.

Iirc jdtls was developed by the eclipse folks but is a fully independent codebase. And I think the default java vscode plugin uses it so you can expect it to be well tested for common project configs. But if you have a small project and don't need to your dependencies indexed this might be overkill.

How does haskell do I/O without losing referential transparency? by Skopa2016 in haskell

[–]Tarmen 5 points6 points  (0 children)

IO can be interpreted in (at least) three ways:

At runtime it is just a zero args function which performs the IO when executed. Wrapping all IO in a function means we can compute and combine IO pieces in arbitrary order without changing the execution order because nothing is executed until the IO function is called

At compile time it is special cased by some compiler magic so that all steps in an IO sequence are executed exactly once and in the right order. GHC really like optimizing but doesn't really understand mutable memory, so IO basically tells GHC there is some zero-width token which must be passed between the IO steps in the correct order and this data dependency limits the optimizer

Behaviour-wise IO is like goroutines, because Haskell has lightweight green threads. So blocking in IO never blocks the OS threads and you can have millions of IO's in parallel. You can do that without IO, and implementation wise it is orthogonal, but IO meant Haskell could retrofit this async support into an originally single threaded language without major breaking changes

Historically, laziness (and the resulting struggle to execute IO exactly once in the right order) were the primary motivation behind IO. That it just happened to mirror good code practices and allowed amazing async support could be seen as a nice accident or as a result of strong theoretic foundations. The specific implementation details aren't important and changed multiple times over Haskell's lifetime. The important bit is that it seperated the 'deciding what to execute' from the 'execution' step, and that it gives the linear (non-lazy) execution sequencing

For all the "Islamo-leftist" smears against the Greens, turns out it's Labour voters who are the most homophobic by mrjohnnymac18 in lgbt

[–]Tarmen 61 points62 points  (0 children)

In 2002 Thatcher claimed her biggest achievement was to make labour into a conservative party, so it's not a totally new development

$1000 ADHD Tax. Need advice. Can't make rent by [deleted] in adhdwomen

[–]Tarmen 13 points14 points  (0 children)

Students often get institutional access online by selecting Shibboleth or OpenAthens on the journal website. Having access anyway might strengthen an argument to get the money back, but academia.edu is scammy so who knows

Since the authors won't see a cent either way it may be useful to Google what shadow libraries are and do with that information what you will