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.
1,066 karma · joined January 22, 2010
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.
doStuff :: Maybe X
doStuff = do
r1 <- cmd1
r2 <- cmd2 r1
…
return rX
Which is syntactic sugar for: doStuff = cmd1 >>= cmd2 >>= …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.
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.
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".
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.
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
Some companies do outsource everything but it’s HARD.
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
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.
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.
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.
- Scotty (simple web routing) https://hackage.haskell.org/package/scotty
- Lucid (html rendering) https://hackage.haskell.org/package/lucid
- Selda (postgres) https://selda.link/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
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.
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.
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.
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)
I'd love to collaborate on something if you're interested
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.
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...