sueden.social ist einer von vielen unabhängigen Mastodon-Servern, mit dem du dich im Fediverse beteiligen kannst.
Eine Community für alle, die sich dem Süden hingezogen fühlen. Wir können alles außer Hochdeutsch.

Serverstatistik:

1,8 Tsd.
aktive Profile

#fp

3 Beiträge3 Beteiligte0 Beiträge heute

Just had a little realization that part of my FP struggles right now is that I’m trying to design my systems as objects too much, still. I’ve always known this is part of the basic FP learning curve, but having a realization moment is good. I wish I could articulate the realization better but I’ll give this basic example:

Bad
pub type Storage(collection_type) {
    StorailStorage(
        read: fn(String) -> Result(collection_type, storail.StorailError),
        write: fn(String, collection_type) -> Result(Nil, storail.StorailError)
    )
    /// ...more storage implementations
}

// Then you have to write the functions for each implementation and assign them to the created Storage record (pseudo-objects, btw)

This is bad because I’m basically just trying to make objects that contain methods. It’s right there, duh. However, I’m not sure what the idiomatic solution is. That’s where I’m wandering off to now…

#Gleam#FP#OOP

To be honest, with today's powerful type systems, virtual function call tables in a binary suggest one of two things: you've either over-invested in value-level logic at the expense of the type level, or you don't understand your problem domain well enough and are masking it with "generic" solutions.

My #Fairphone 4 is draining battery like crazy over the past few months. Surely, I should buy a new battery for it soon (software says, a full charge is around 3350 mAh instead of 3900 mAh it had back in 2021 when I bought it), but this cannot be the only issue here...

Not using it at all drains around 2-3%/h and simply web browsing or a short YouTube video sometimes drains 30%/h (extrapolating). Sometimes, the device is warm even when I haven't used it for hours. The Energy-consumption settings page lists cellular connection as the top consumer next to display (when using the phone). That is, even when the device sits motionless at a spot with perfect 4G or 5G connectivity. It is only bearable in energy-saving mode (1%/h).

I've been researching online, and it looks like a bunch of people have that issue. People are speculating it is a non-functional deep-sleep in some circumstances. I wonder if a factory reset (or switch to #LineageOS?) could help.

Did anyone have similar experience with #FP4 or even other #Android devices?

#Fairphone4#Fairphone5#FP

A possible #FP #learning path for #CS students of all levels, from an introductory level to an advanced level:

• "Introduction to Functional Programming", Bird (1988)
• "The Implementation of Functional Programming Languages", Peyton Jones (1987)

• "Introduction to Automata Theory, Languages, and Computation", Hopcroft (1979)
• "Handbook of Theoretical Computer Science, Volume B: Formal Models and Semantics", Leeuwen (1994)

• "An Introduction to Functional Programming Through 𝜆-Calculus", Michaelson (2011)
• "Introduction to Combinators and 𝜆-Calculus", Hindley (1986)

• "Category Theory for Programmers", Milewski (2019)
• "Category Theory", Awodey (2008)

• "Types and Programming Languages", Pierce (2002)
• "Homotopy Type Theory", The Univalent Foundations Programme (2013)