HNHacker News
TopNewBestAskShowJobs

solomonb

1,308 karma · joined December 2, 2019

Software engineer with interests in programming language theory and type theory.

I also like compost.

and radio.

blog.cofree.coffee www.kpbj.fm www.kchungradio.org

ssbothwell_at_gmail_dot_com

submissionscomments
solomonb··on Itter.sh – Micro-Blogging via Terminal
Its neat but isn't it basically just `wall`?
solomonb··on What got lost in translation from Lean Manufacturing into Agile?
> One of the fascinating things about lean manufacturing is that few companies outside of Toyota (let alone manufacturing) have ever successfully gone lean. Projects like NUMMI were a failure.

Is that really true? I'm asking not debating, as I may have selection bias in how I observe Lean Manufacturing through the lens of small to mid size companies with active public relations via the internet.

> I think the key that makes process improvement work in manufacturing is that the production line is continuous, and the measuring of outcomes is independent. Car quality, customer satisfaction, units produced, mistakes, etc.

I think this makes a lot of sense. The products in software development are a lot more nebulous.

solomonb··on How each pillar of the First Amendment is under attack
He can't run again.
solomonb··on Apple squandered the Holy Grail
> I used my mom's typewriter, which she typed her thesis on in the 1950s

The point was that later typewriters had a features like memory, automatic indentation and erasing that were not available in 1950s era typewriters..

solomonb··on Quiver: A Modern Commutative Diagram Editor
Yeah I understand that the existence of the commutative diagram implies that it typechecks. I was trying to give OP a basic intuition for them. I should have said something like:

If you follow the two paths around the square you will find that everything typechecks correctly and both paths get you to the same result. This shows how the two paths are equal in some sense.

solomonb··on Quiver: A Modern Commutative Diagram Editor
Its a way of demonstrating that two paths through a diagram are in some sense equal. The dots in the corners are objects and the arrows are morphisms.

To keep this simple just imagine the objects are types and the arrows are functions between those types.

You start out in the upper left corner and walk through the two paths checking the types as you go along. If the diagram typechecks correctly then it is said to commute and the two paths are in some sense equivalent. The specific sense depends on a bunch of details elided here.

solomonb··on Markov Keyboard: keyboard layout that changes by Markov frequency (2019)
Hi shae!
solomonb··on 8 months of OCaml after 8 years of Haskell in production (2023)
You can desugar let bindings that way but often times (as I believe is the case in GHC) you have a `Let` term in your AST.
solomonb··on 8 months of OCaml after 8 years of Haskell in production (2023)
In a production application you generally don't write code like that. I find it tends to be the opposite problem where you often see giant `do` blocks performing all sorts of monadic effects.
solomonb··on 8 months of OCaml after 8 years of Haskell in production (2023)

    mySubroutine = do
      foo <- mkFoo
      bar <- mkbar foo
      mkBaz bar
    
    mySubroutineV2 =
      mkFoo >>= \foo ->
        mkBar foo >>= \bar ->
          mkBaz bar
solomonb··on Functional Programming Self-Affirmations
You still don't need monads for any of this. Monads give you an ad-hoc polymorphic way of doing monadic actions.

Short circuiting on `Either` is a specific case of this. You can define your own EitherBind in any language.

    eitherBind :: Either e a -> (a -> Either e b) -> Either e b
    eitherBind (Left e) _ = Left e
    eitherBind (Right a) f = f a
Now you can bind over Either to your heart's content without needing an encoding of Monads in your language.
solomonb··on Functional Programming Self-Affirmations
> How can you do "Errors as values" at a large scale without do-notation / monads?

You don't need monads for this. You just need the ability to encode your error in some term like `Either e a` and ability to eliminate those terms. In Rust for example that is the `Result` type and you use pattern matching to eliminate those terms.

solomonb··on Monocle: Optics Library for Scala
Words can have many uses.

https://en.wikipedia.org/wiki/Optic_(disambiguation)

> In computer science, optics are a general class of bidirectional transformations

solomonb··on The Skyline algorithm for packing 2D rectangles
One of my first big personal programming projects was implementing this and a bunch of variations in python many years ago: https://github.com/solomon-b/greedypacker

Its still my most starred repo. :shrug:

solomonb··on Everything Is Just Functions: Insights from SICP and David Beazley
Well for theorem proving you need Sigma and Pi types plus some notion of equality. Can you achieve those with Scott or Church encoding?
solomonb··on Everything Is Just Functions: 1 week with David Beazley and SICP
You can derive these implementations from the recursion principle for your type:

  data Maybe a = Nothing | Just a

  foldMaybe :: (Unit -> r) -> (a -> r) -> Maybe a -> r
The two higher order functions passed into `foldMaybe` are your `Nothing` and `Just` (modulo I added the Unit param to the Nothing case to be a little more precise).
solomonb··on Hacker Fab
Its true, I'm not even that old (late 30s) and used to etch tons of PCBs for ham radio projects.
solomonb··on Nutrient levels in retail grocery stores
Well that quote appears to contradict the article's claim that speed to market is the most important factor.

Now I don't know what to think..

solomonb··on How We Feel
"How We Feel is a free journal for your well-being created by scientists, designers, engineers, and psychologists. Over time, you will learn precise words to describe how you feel, spot trends and patterns, and practice simple strategies to regulate your emotions in healthy ways."
solomonb··on Quit Social Media (2016)
He states:

> What the market values is the ability to produce things that are rare and are valuable.

> what the market dismisses are activities that are easy to replicate and produce a small amount of value. Well social media use is the epitome of an easy to replicate activity that does not produce a lot of value [...] by definition the market is not going to give those activieis a lot of value [...]."

Yet in the years since this TEDx talk we have seen the rise of influencer and streamer celebrities who have gained an immense amount of wealth and power.

solomonb··on Do AI detectors work? Students face false cheating accusations
If AI detectors worked, couldn't you then use one as a scoring function to create an undetectable perfect AI?
solomonb··on John Carmack on inlined code (2014)
Purity is not a requirement for functional languages. See Ocaml, Erlang, Racket, Scala, Clojure, Common Lisp, etc.
solomonb··on John Carmack on inlined code (2014)
"pure FP" does not mean only writing in a functional style. Purity refers to referential transparency, ie., functions do not depend on or modify some global state.
solomonb··on John Carmack on inlined code (2014)
The original article literally starts with this:

> In the years since I wrote this, I have gotten much more bullish about pure functional programming, even in C/C++ where reasonable: (link) > >The real enemy addressed by inlining is unexpected dependency and mutation of state, which functional programming solves more directly and completely. However, if you are going to make a lot of state changes, having them all happen inline does have advantages; you should be made constantly aware of the full horror of what you are doing.

He explicitly says that functional programming solves the same issue as inlining but more directly and completely.

solomonb··on Show HN: Winamp and other media players, rebuilt for the web with Web Components
Any chance you can do foobar2000?
solomonb··on Ask HN: What are you working on (September 2024)?
Right on. Before getting into tech I was a carpenter and I always wished I had an opportunity to try my hand at machining.
solomonb··on Ask HN: What are you working on (September 2024)?
I just picked up an old Sheldon Lathe. I got it for $200 and hauled it myself with a drop trailer. Its going to need a lot of work but its a beautiful old machine.
solomonb··on Why Haskell?
> Well, from my perspective, I've never worked at a place that's used polysemy of freer-effects.

I have with another deprecated effect library. Its a bummer to have something so core to the architecture that is deprecated but then to not have the time or buy-in to do anything about it.

solomonb··on Why Haskell?
> effectful and Bluefin are here to stay. I guarantee it. For non-IO-based effect systems (e.g. polysemy, freer-effects) I agree.

Just to be clear I think Bluefin is really cool and I'm a fan of your work overall.

I'm speaking from the industry/production perspective here. When polysemy and freer-effects were released there was a similar belief that they were here to stay.

transformers and MTL have stood the test of time, are heavily documented, and are pervasive throughout Hackage. Understanding them and how to build programs with them is essential for anyone trying to break into 'production haskell' as a career move.

solomonb··on Why Haskell?
> Of course I can. I can always change the code to anything I like. That's what "rewriting" is. The question is only whether the business logic still makes sense, and whether the old call site code still works. Just look at the example I gave above.

You have a function that can return a Null response and you are claiming you can rewrite it to be one that does not return a Null.

This means that in the cases where your function previously produced a `Null`, you have to produce a `Y`. You claimed you can do this if you write the function to receive `X|Null`. In other words you are claiming you can write `(X -> Y|Null) -> X|Null -> Y`. I challenge you to write this function.

> "Implementing" is a special case of rewriting, so how can you say you can implement something but not rewrite it?

I didn't say that. You claimed you can write `(X -> Y|Null) -> X|Null -> Y`. I am saying that is impossible but you could write `(X|Null -> Y) -> X -> Y|Null`. Do you see the difference?

← PreviousPage 9 of 16Next →