HNHacker News
TopNewBestAskShowJobs

embwbam

1,066 karma · joined January 22, 2010

submissionscomments
embwbam··on The Haskell job market has been growing steaily since 2008
You don’t need to explain the monad laws to a beginner. They don’t need to know what bind does. All they need to know is how to use do syntax, and enough of how it works to use IO, Maybe, State, and a few others.

After they’ve been working for a month or so, they’ll “get” monads on a gut level, and the details won’t be so confusing to them.

embwbam··on 100x Faster Than Wi-Fi: Light-Based Networking Standard Released
Sorry. I was just going by the literal reading of the infra (under) red.
embwbam··on The Haskell job market has been growing steaily since 2008
I find promises and futures in other languages (python, JavaScript, rust) close enough to how monads work to gain a very productive working intuition for them.
embwbam··on The Haskell job market has been growing steaily since 2008
Yes that’s exactly what the Maybe monad does! It would look like this in Haskell code

    doStuff :: Maybe X
    doStuff = do
      r1 <- cmd1
      r2 <- cmd2 r1
      …
      return rX
Which is syntactic sugar for:

    doStuff = cmd1 >>= cmd2 >>= …
embwbam··on The Haskell job market has been growing steaily since 2008
They’re like promises or futures, but limited to chaining only one type of thing:

Maybe (optionals) - chain steps and abort if any step is empty.

IO - perform IO side effects, and run the next step when this one completes. Just like a async/await.

You use monads all the time in other languages! Haskell just has many more kinds and allows the programmer to make their own.

I always twitch when I hear someone say you can’t both understand and teach them. Did I succeed?

Also note that you don’t have to totally understand monad machinery to use them productively, only to write your own.

embwbam··on 100x Faster Than Wi-Fi: Light-Based Networking Standard Released
You can encode a lot more information in higher frequencies.

But each frequency has different things that are opaque to it, and travel different distances before dropping off.

Wi-Fi is already “really low frequency, really low intensity infrared light”, so I suspect the article is correct when it says we won’t notice it.

embwbam··on Responding to “Are bugs and slow delivery ok?”
Lol, you’re not wrong. It’s pretty clear organizations prefer the illusion of getting something quickly to accurate information
embwbam··on Responding to “Are bugs and slow delivery ok?”
In my experience, one can accurately predict development time by correctly working around the planning fallacy.

The planning fallacy is something like "Humans are hopelessly optimistic. Even if you think you're planning for the worst case, unexpected things will happen, and your estimate is more like the best case scenario. This is true even if you try to compensate for the planning fallacy by being more pessimistic".

So you can't fix it by padding more weeks, trying to think of all the things that might happen, etc.

The only way to compensate for this is detailed in Kahneman's "Thinking Fast and Slow" (Must-read for many reasons). That is to start with prior evidence. Rather than making your estimate, start with "How long did it ACTUALLY take the last time someone did something like this?" and only then modifying the estimate for circumstances.

There is a huge gap between these two methods:

1. "How long does it take an average team to create a SAS product? Maybe a year?" Then modify for "but our team is extra smart, so maybe I'll shorten that to 10 months"

vs

2. "How long will this take? It's not a complicated product, and our team is smart: maybe 4 weeks for feature X, 6 for feature Y, 2 to deploy. I'll even throw in an extra 4 weeks of padding for unknowns, so 16 weeks".

embwbam··on Smart Guy Productivity Pitfalls (2013)
I agree with this sentiment completely. Virtue is ultimately internal.

However, when did sacrificing all for 40h a week become the definition of honesty? I think the GP and other expressing the sentiment are pointing out that corporations would love for us to feel a moral imperative not to get distracted or do anything else during the day.

There are other honest frameworks for work. Why not measure output monthly? I would argue that’s it’s far more relevant, and one could choose when and how to work and still feel good at the end of the month with the body of work we deliver.

We do not owe our virtue to a corporation.

I took a few years off from work recently, and I realized that one of the things I missed most was having peers and stakeholders tell appreciate my work. I think that is what our virtue wants: to help those immediately around us and be appreciated and respected for it. You could theoretically take lots of time off and still do that.

embwbam··on Debunking the Myth of Dollar Cost Averaging
This usually comes up because people procrastinate investing and end up with a large amount of money sitting idle. They have anxiety about how to put it into the markets.

Saving with each paycheck isn’t dollar cost averaging. It’s lump sum. DCA would be something like putting 1/4 of your total savings every week.

Anyway, in my experience this situation comes up a lot due to the above

embwbam··on NYC skyscrapers sit vacant
English as a first language. Implicit shared cultural values. Time zones. You are way less work to manage than someone across the world from another culture.

Some companies do outsource everything but it’s HARD.

embwbam··on Apple Card’s new high-yield Savings account is now available, offering a 4.15 p
Many banks have high-yield savings accounts, but I think they use them to attract customers, so they don't automatically put you in them if you don't ask. That said, I just looked up wells fargo and I don't see any.

Capital One is paying 3.5% right now for "Performance Savings".

Note that these rates change in relation to the federal interest rates. You'll sign up for a great rate, and in 3 years it can go back down to a half percent

embwbam··on A year from quitting my full-time PM job – what I miss the most
Oh don’t get me wrong, I’m never going back to a corporate job. I’m just saying there is some boredom. But it’s way better than a bad job. I just found a startup founder who needs some help. I’m putting in like 10-15 hours most weeks, on my own time, and it’s quite enjoyable
embwbam··on A year from quitting my full-time PM job – what I miss the most
6 months is too short to experience boredom. We have years of things we have been putting off to do. I think it takes 1-2 years before it starts to feel like too much time.
embwbam··on A year from quitting my full-time PM job – what I miss the most
I’m 4 years in and I am getting bored. How do you fill your time? (Honestly, include video games for example)

Do you stick to a routine?

Don’t get me wrong, I’ve very much enjoyed traveling, climbing, games, people, etc. But I miss programming and I find that I’m not motivated enough to finish things without knowing someone will use it. Hence my current desire to find a super flexible hourly client.

embwbam··on Advice to Aimless, Excited Programmers (2010)
I've had jobs like this a couple of times and they've always been my favorite. Unfortunately, later in my career I haven't been able to find or create this again. It seems like you have to stumble onto it from somewhere else in an organization.
embwbam··on When Will Fusion Energy Light Our Homes?
From the article:"The role for fusion would not be, “Oh, we’ve invented it. Let’s not bother building more wind turbines.” It would be, “We’ve invented it. Is this a better way than our alternative options to fill in the gaps and supply the last bit?”"

I think this is absolutely wrong. Limitless cheap energy will create unprecedented demand for new, previously wasteful ideas. Think about how energy availability made climate-controlled houses possible. Now try to imagine how future capitalists will sell us something previously unimaginable with a 10x or 100x energy supply.

embwbam··on When Will Fusion Energy Light Our Homes?
I read an interesting article saying that all wealth ultimately comes from an energy surplus. Nearly-free limitless energy might launch humanity into a new level of wealth.

There was another article I read that any values outside of self-preservation, such as taking care of the earth, or the poor, are only possible during a surplus.

Part of the reason that the right is afraid of committing to help the poor is because they don't think the economy could handle it. If the economy is at a new level, we might be able to agree on trying new things.

It'll be time to let the robots do the work, at least until they rebel and get granted citizenship.

embwbam··on School of Haskell: Basics (2013)
If you're not a fan of the ruby-on-rails / swiss army knife approach that IHP takes, check out Scotty. Add Lucid for Html rendering, and Selda for Postgres. (There are other options for any of these tools if you prefer)

  - Scotty (simple web routing) https://hackage.haskell.org/package/scotty
  - Lucid (html rendering) https://hackage.haskell.org/package/lucid
  - Selda (postgres) https://selda.link/
embwbam··on Learn Haskell by building a blog generator – a project-oriented Haskell book
I think IHP for learning Haskell has the same flaw that Rails always did. You have no idea what is part of the language and what is part of the framework. You'll get stuck once you stray from the golden path.

I'd recommend starting with Scotty instead. It's much easier to understand what it is doing. Use Lucid for HTML rendering, and your choice of DB libraries (I like Selda). These all avoid template haskell and don't rename any prelude functions. If you add them one at a time you'll see what each one is offering and understand where to go when you need to do something more complicated

embwbam··on Some AI Systems May Be Impossible to Compute
Think of it like human intuition. We haven't developed left-brain logic AI yet, but we are getting closer to training AI to outpace a trained human. They can look at a picture and say "That's a dog". That's an intuitive thought, not a logical one. A car could say "this situation feels dangerous", and ask the drive to take over, or it could just react and steer intuitively. It might not be able to reflect on its actions yet, but that doesn't mean it couldn't learn to drive.

Not that I think we WILL get to full self driving any time soon, but the car not being able to explain itself doesn't prevent us from getting there.

embwbam··on SPAs Were a Mistake
I agree. I've been thinking about this lately, and have implemented something I think is interesting in Haskell.

https://github.com/seanhess/juniper

It's an implementation of Elm (imagine React if you're a JS dev), but all logic is executed on the server. State is passed back to the server whenever you choose to listen to an event. The view is then re-rendered and virtual dom diffed on the client. Non-interactive pages are just views. If you want them to be interactive, you add a Message an update function.

I used it on a client project and it was pretty delightful.

It probably isn't documented well enough yet to make total sense, but I think it's a step in the right direction.

embwbam··on Ask HN: What is your spiritual practice?
I think unless you have been both religious and atheist, it’s hard to compare which results in better morals and values. It’s a common misconception that having a god free life will result in an immoral or amoral existence. It’s simply not true. Leaving religion felt empowering and made me think seriously about which values mattered to me.

Humans have always had the capacity to be good to each other inside them. The idea that religion or god is necessary for that is demonstrably false.

embwbam··on Marketing is scary for a solo developer
How might an experienced solo developer work with an experienced marketer? My network has ended up being very thin in that regard. Would you partner on some developer's zany project? Or are you folks available to consult?
embwbam··on “Great resignation” wave coming for companies
I have many rock climbing friends who live on less than 15k a year. They often do it for years, working seasonally 3-5 months a year. the trick is to go somewhere with a very cheap lifestyle. It can be accomplished by living in your car in the mountains, or traveling to SE Asia, etc. The climbing provides something to do and a sense of community.

There are other cultures like this. I’ve seen kids from Europe doing a gap year staying in hostels for very little (they sometimes do some light work for the hostel to get a free place to stay)

embwbam··on Multi-User Dungeons (MUDs): What Are They? and How to Play
I only just learned that MUDs exist from this article, but I've wanted to create some kind of collaborative RPG thing since forever.

I'd love to collaborate on something if you're interested

embwbam··on Simple Bank Is Closing
You can open multiple high performance savings account by going to the normal account application online. It has you login partway through the process and then adds it to your account
embwbam··on Names are not type safety
Practically, I disagree with the GP. A newtype is fine in these cases. You don't have to say you know what to do with negative Lengths if you have a smart constructor that won't let you create one.
embwbam··on Haskell web framework IHP aims to make web development type-safe and easy
> IHP's templating HSX is targeted at people with a react background that are familiar with JSX syntax. In the background it compiles down to blaze-html and can be used together with e.g. forM_ (which we have aliased to forEach). It's just a more familiar syntax on top of blaze html.

Ok, but then your users will write views without understanding what they're doing. All the magic will make them feel confused and powerless when they do anything outside of the blessed path. They can't extrapolate that forM_ works for any monad in the future.

> The |> just looks more beautiful to us :) Take a look at the gorgeous expressiveness of this

Agreed, I wish we all used |> instead of &, but that operator is called & in Haskell. You're crippling your users' ability to read other code-bases in the future. And that same code would be plenty readable with &, don't you agree? Your example doesn't even show your operator, you're replacing it with a unicode character. I could make vim do the same for &.

> Yes, IHP is the haskell framework for builders :-)

There's so much more to "building" than the first month of development! Easing someone into the Haskell ecosystem is much more important than helping them get a CRUD app running that they don't know how to customize. Haskell is an order of magnitude more productive for me than other languages (ruby), because of its differences.

embwbam··on Haskell web framework IHP aims to make web development type-safe and easy
This looks well done, but having used Haskell professionally on multiple web projects, I have to take issue with some of the design choices.

Templating? Haskell provides such a wonderfully clean way to generate HTML via combinators and do notation. You don't need a quasi quoter to get a DSL. See Lucid. All templating does is remove control features (like forM, for example). [1]

They've reinvented common operators. For example, (|>), which is great, I've used it in Elm, but the Haskell version of this is (&) from Data.Function.

These are just a few examples. They're ignoring Haskell conventions to make it more familiar to people coming from other backgrounds, even when the community conventions are strictly better or equal. Rails was a nightmare for me, it was impossible to tell what was a language feature and what came from the framework. I suspect this will equivalently speed up initial development while slowing understanding.

[1] https://mmhaskell.com/blog/2020/3/16/lucid-another-html-opti...

← PreviousPage 2 of 8Next →