31 Matching Annotations
  1. Sep 2020
    1. It turns out that even the length of time an element has been mounted is an important piece of state that determines what pixels the user sees. And some of this state can’t simply be lifted into our application state.

      What this means is that our desire to express UI using pure functions is in direct conflict with the very nature of the DOM. It’s a great way to describe a state => pixels transformation — perfect for game rendering or generative art — but when we’re building apps on the web, the idea chafes against the reality of a stateful medium.

    2. Functions have lots of interesting and useful properties. You can isolate them. You can compose them. You can memoize them. In other words, functional UI feels correct, and powerful, in a way that wasn’t true of whatever came before it. I think this is why people get quasi-religious about React. It’s not that it’s Just JavaScript. It’s that it’s Just Functions. It’s profound.

    1. A paradigm is a model or pattern. In JavaScript, there are a number of popular paradigms including object-oriented programming (OOP) and functional programming (FP). Paradigms are more important than is sometimes recognized. They help form mental models for solving problems. Becoming well-versed in the principles of a given paradigm can help accelerate development by providing mental shortcuts for solving the challenges that arise while building applications. They can also help produce higher quality software.
    1. We wanted a library designed specifically for a functional programming style, one that makes it easy to create functional pipelines, one that never mutates user data.
  2. Jun 2020
    1. Refactoring is intended to improve the design, structure, and/or implementation of the software (its non-functional attributes), while preserving its functionality.

      First sighting: "non-functional attributes".

    1. In systems engineering and requirements engineering, a non-functional requirement (NFR) is a requirement that specifies criteria that can be used to judge the operation of a system, rather than specific behaviors. They are contrasted with functional requirements that define specific behavior or functions

      This is a strange term because one might read "non-functional" and interpret in the sense of the word that means "does not function", when instead the intended sense is "not related to function". Seems like a somewhat unfortunate name for this concept. A less ambiguous term could have been picked instead, but I don't know what that would be.

  3. Apr 2020
  4. Feb 2020
    1. Nix is a purely functional package manager. This means that it treats packages like values in purely functional programming languages such as Haskell — they are built by functions that don’t have side-effects, and they never change after they have been built.
  5. Jan 2020
  6. Nov 2019
    1. We might have some dirty mutable objects for performance - but our high-level API should be purely functional. You should be able to follow the React model of modelling your UI as a pure function of application state -> UI.
    1. the abstraction I wished to have was a sort of a pure functional Vim, completely decoupled from terminal UI - where 'vim' is a function of (editor state, input) => (new editor state)
  7. May 2019
    1. However, it is still often stated that the other orbital energies have no physical meaning, and that it is a pity that nothing like Koopmans' theorem to give meaning to the other occupied orbital energies exists. The truth could not be more different: it has been established22–25 that the KS orbital energies of the valence levels in molecules approximate the experimental ionization energies much more closely (typically at 0.1 eV level) than the Hartree–Fock orbital energies do (difference with IPs typically ∼1 eV).

      This is really one of the more spicy takes here. KS orbitals having no physical interpretation is often heard in the community, and here is a list of references and evidence that they do have physical significance.

  8. Jan 2019
    1. after the terminal operation of the stream pipeline commences.

      Above is because of the nature of Streams in general: they are lazily executed (or put another way, execution is delayed until the latest convenient method call).

  9. Nov 2018
    1. That is using a specific tool for a specific use case. You don’t actually have a table view of your data. Once it’s in a table, man, you’re good. That is the modeling. A sequel database table, you have this amazing high-level language for doing all sorts of cool operations with it.To turn this into some class hierarchy, it’s almost criminal. There, I said it. It’s like you’re throwing away the power that you have.

      about a situation when you sometime want an is-a relationship but in most cases just have it as loosely structured (table-like) data format

  10. Sep 2018
  11. Aug 2018
  12. Apr 2018
    1. (== 10)

      This confused me. I'm relatively new to Haskell and did not know about sectioning. After learning that detail, this makes sense as a (right) partial application of the (==) function.

  13. Aug 2017
    1. Since Clojure uses the Java calling conventions, it cannot, and does not, make the same tail call optimization guarantees. Instead, it provides the recur special operator, which does constant-space recursive looping by rebinding and jumping to the nearest enclosing loop or function frame. While not as general as tail-call-optimization, it allows most of the same elegant constructs, and offers the advantage of checking that calls to recur can only happen in a tail position.

      Clojure's answer to the JVM's lack to tail call optimization

  14. Apr 2016
    1. In Switzerland, one of my recent ancestors was functionally illiterate. Because of this, she “signed away” most of her wealth. Down the line, I’m one of her very few heirs. So, in a way, I lost part of my inheritance due to illiteracy.

      Explained further in the screencast. My paternal grandfather’s mother came from a well-to-do Schneider family and was a devout Christian, but she “read” the Bible upside-down, according to my paternal grandmother.

  15. Mar 2016
  16. Jul 2015
    1. Keeping unpure functions clearly named and organized in such a way that they can be easily identified versus pure functions is a common goal of modularizing and organizing Scala applications.
    2. Much like a Unix power user will compose multiple single-purpose tools into a complex piped command, a functional programmer will combine single-purpose function invocations into chains of operations (think Map/Reduce).