HNHacker News
TopNewBestAskShowJobs

s4vi0r

400 karma · joined October 26, 2016

submissionscomments
s4vi0r··on Implementing and Understanding Type Classes (2014)
I thought the problem was related to subtyping? AFAIK the reason Scala doesn't have HM inference is because something about the existence (nominal?) subtyping makes it impossible/super hard to infer types that may seem obvious/easy - even with monomorphic functions.

Ex.

def fact(n: Int) = if (n == 0) 1 else n * fact(n - 1)

will fail to compile and tell you that you need to provide a return type.

s4vi0r··on Towards Scala 3
To add onto this, its not one line functions but rather functions whose body is a single expression.

You can do a big for comprehension, or a if/else, or a big chain of function calls, etc. without having to add brackets.

In practice you often end up not really using braces that often when writing FP style Scala.

s4vi0r··on Older Americans Are ‘Hooked’ on Vitamins
Can you elaborate? I've never heard anything about that before.

Your body can handle massive amounts of vitamin C and D, so its a bit surprising to hear that supplementing the (generally) small amount you'd find in a vit D pill could be harmful.

s4vi0r··on Making a Statically-Linked, Single-File Web App with React and Rust
As widely used/loved as nginx seems to be, I couldn't for the life of me find any good resources that hand hold a bit more than just reading the docs and hoping for the best.

Know any good nginx books or courses?

s4vi0r··on Why are diapers so expensive?
No, you entirely missed the point.

Cloth being better is something else entirely, nor was I suggesting that disposable diapers be discounted with taxpayer money. The point was "Why does the poor in the richest country in the world have to worry about something as inane as affording diapers in 2018?"

I agree that people should use cloth - but the response to "Hey, this poor person can't even really afford to buy diapers!" shouldn't be "wow that damn government making her dependent on welfare bux, shes so dumb she doesn't even know about cloth too!". It just reeks of being completely out of touch with the poor experience in America. Maternity leave isn't really a thing for someone like her - should she maybe be working an extra job or two to afford better diapers? Even if she doesn't, how do you know she has the time to deal with changing and washing cloth diapers? Being a stay at home mom doesn't exactly work as well as it did in the 50s or 60s, and she doesn't have a husband working for a tech company or whatever who can support a family on a single salary.

s4vi0r··on Why are diapers so expensive?
You don't even understand what privilege means, my dude. I expect my government to serve myself and the people, and not a handful of old dudes at the top of the food chain. If you think a government serving its people is a privilege, I think you have a very poor idea of what democracy is (or should be).

>...certain people leech, do not want to find a job...

This is privilege and propaganda at work right here. Being so far removed from what its like to be poor that you unironically believe some bullshit like "poor people just want government bux for free".

>I grew up with cloth... Not because my family was poor, but because other types weren't available... I don't see that cloth diapers are a poor-peoples choice.. Is it below some "level” you think should exist?

Absolutely - I expect that the poor in the richest country in the world aren't forced to regress to the standards of 50-60 years ago for their children. There's nothing wrong with cloth diapers or the fact that you were brought up with them. The issue is that people like you don't think its a problem that somebody in the USA in 2018 has to get cloth diapers not because they want to, or their baby's skin handles it better or whatever, but because they literally cannot afford not to.

What the fuck is with this race to the bottom? Yes, I absolutely expect there to be certain standards of living in different countries that are upheld by society and government. How am I the crazy one here? I don't want to live in a fucking country where I'm making 6 figures, comfortable in my air conditioned home while down the street somebody has to shit on the street because public toilets were abolished because muh taxation is theft or something.

There's nothing shameful about being poor or different countries having different standards of living - there is something shameful about a society which looks at somebody struggling and instead of lending a hand tells them to pull themselves up by their bootstraps.

s4vi0r··on Why are diapers so expensive?
Jesus, your comment and the other replies just straight up reek of privilege/ignorance.

What you're suggesting is obviously the pragmatic choice - obviously, if she's poor as shit and can't afford regular diapers, using reusable cloth ones is a great solution. But that's not the fucking point of the article - its $CURRENT_YEAR in the richest country in the world, this absolutely shouldn't be a thing that happens in the first place.

I'm not even a communist or anything, but its absolutely insane to me that Americans don't realize how "third world" their country is in some ways. Do you think that back in the 50s and 60s when your parents or grandparents were buying the first mass produced disposable diapers, they would have expected 60 years later people would be forced to go back to washable cloth diapers because they couldn't afford regular diapers? What a stupidly low standard to have for the wealthiest country in the world.

Capitalism is an awesome thing, but it seems conservative pundits and the rich have convinced a lot of people that you can't have both a strong, capitalist free market economy along with a government that actually gives a shit about its citizens and not just the top 10,000 guys with the biggest wallets or whatever.

s4vi0r··on Google's 'secret' smart city on Toronto's waterfront sparks row
If this really becomes a thing, I'm gonna be staying away from any sections of the city that have any Google crap built, or just altogether moving if it gets bad enough.

Given who this is, and the shit they pulled in NYC with the kiosks, I don't trust them for one second to be doing this for any reason other than to enable broader surveillance/data collection using cameras, microphones, etc. in public spaces. All Google is interested in is collecting more data so that they can build better systems to collect more data with and shove ads down your throat + sell your information to the highest bidder.

s4vi0r··on Google's 'secret' smart city on Toronto's waterfront sparks row
I think that's a _very_ generous interpretation of the comment.
s4vi0r··on How Java 10 Will Change the Way You Code
Why'd they ignore the top survey result, var AND val? It was by far the most popular choice, and it saves you from writing final over and over again, which would hopefully help to encourage better code style/practice for Java developers.
s4vi0r··on Zuckerberg summoned to House Of Commons inquiry
Definitely. Especially after the whole Facebook getting to CAs office(s) before authorities thing.
s4vi0r··on Volkswagen will kill the Beetle, squashes plans for a successor
I find that the people who feel "safer" or whatever in these cars tend to be the worst drivers. Also, they often pull into intersections to make left turns without moving their car, making it impossible to turn until the light goes yellow or red. I really wish there were fines or demerit points for doing that shit.

That, and/or require stricter licensing for larger cars. Giving a skittish person who doesn't "feel safe" in a normal car an even bigger car where they're more insulated from their surroundings is a recipe for disaster.

s4vi0r··on Literate Devops with Emacs Org-Mode (2014)
Is there some way to tell org exactly how I want it to spit out HTML?

I was going to do my blog entirely with org-mode+org-publish, but it spits out a mess of HTML and also a small bit of js for some reason, so I'm just writing html directly myself now.

I don't really find writing html myself all that annoying or anything, but it'd be nice if I could get org to generate really clean/simple HTML for me that I could then write a small script to parse and wrap in divs I've defined for styling.

s4vi0r··on The New U.S.-China Rivalry: A Technology Race
Its because your post reads like standard whataboutism Russian and Chinese online paid trolls/propagandists spout.
s4vi0r··on Xray – An experimental next-generation Electron-based text editor
...why not sublime?

I don't understand why these electron editors are popular at all. With all due respect to the people working on them (because it really isn't their fault for the most part), they're bloated slow pieces of shit. I don't like electron in general, but its an especially bad choice for a text editor intended for developers.

If you don't like vim or emacs, sublime does what the electron editors do but better. Its probably the most performant of all the text editors I've used; vim and emacs both don't like gigantic logfiles, but sublime handles them without issue. The only bad things I can say about it are lacking vim emulation and worse dev experience than Emacs. But then again, I've never used an editor anywhere near as nice as Emacs in terms of language integration for a lot of the languages I work with.

s4vi0r··on Why Developers Never Use State Machines (2011)
Traditional programming languages and imperative thinking don't lend themselves to writing state machines, so its not really that surprising that they're under utilized.

Its kind of frustrating constantly reading posts where people shit on functional programm(ers|ing) for being too ivory tower-y or whatever, when its kind of hard not to be when a lot of the older FP guys have spent the last like 20-30 years going "yo this is dope you guys should really be doing this" and getting largely ignored. State machines are super commonly used in languages where you can (easily) construct ADTs and pattern match on them.

s4vi0r··on Some Notes About How I Write Haskell
To me it seems sorta like reasonable Java. Tons of QoL upgrades that Java hasn't (or won't, due to compatibility issues) implemented over the years make it so that you can write Kotlin without absolutely having to rely on a massive IDE or something like project Lombok. They've got great tooling and a lot of support, and they've been adding in tons of great features (e.g inline classes/value classes coming soon).

If I had to build a company today Kotlin would definitely be at the top of my list; I may love other languages much more, but Kotlin and C# are easily at the top of the developer experience imo, since they've got great tooling/ecosystem/support and both are very approachable/average languages that won't really scare anyone away like how Haskell might (despite it being one of the most underrated/most scare monegered/most misunderstood languages out there imo)

s4vi0r··on Some Notes About How I Write Haskell
Would you care to explain more about your style? It sounds like a nice compromise, and the lack of pattern matching and HKTs in kotlin is definitely a bit of a pain point after having gotten so used to Scala and Haskell.

ML on the JVM seems like a nice niche for it, but I'm not sure I really have seen libraries or Scala devs sorta advertise their style/library as ML inspired. I've seen OCaml mentioned as an inspiration to Scala before, but there are some notable differences between the two (e.g. inheritance vs structural typing)

s4vi0r··on Nix 2.0 Released
Where have you run into derision/assholes with nix or FP? Absolutely there are assholes (or perhaps people who just don't realize how rude their words/actions are) in the community - especially on Twitter and reddit in my experience - but I've never not felt welcomed or been talked down to when I asked for help in an IRC/discord channel.

I see this get mentioned all the time in respect to FP communities in particular but I really can't relate at all. And its not like I haven't asked my fair share of stupid questions in these communities or anything.

s4vi0r··on Some Notes About How I Write Haskell
How do you feel about Scala currently? I'm a Scala dev as well who's kind of been moving away from it over the past few months.

I'm not really sure of the future of the language. Most of the super committed community members are fans of the Haskell inspired style, which is great (its how I write Scala, personally) but I'm not sure why you'd then choose Scala over Haskell, or if you need the JVM, Eta or even Frege. The majority of 'casual' Scala people seem to use it as Kotlin with implicits more or less, and as more and more libraries and features come up for Kotlin I'm not even sure that it makes sense to use Scala for those people, given the larger backing, better tooling, easier on boarding, etc for Kotlin.

s4vi0r··on Elm changed my mind about unpopular languages
The communities for languages like Elm are definitely smaller, but they're also "passion languages", if that makes sense. Nobody is learning elm because they've been or feel forced to (like you might with React, eg) or because they needed to maintain a legacy codebase at an old job or something. They're learning it because they're interested/like it, etc. So when it comes time to hire you have a small(er) pool of candidates than a react position might draw but the candidates are going to be people who've played around with Elm and enjoyed it and want to get a job writing Elm.

I'm kinda surprised more companies don't take the risk - its not like these are bad languages, either. There's still a huge chunk people (in terms of absolute number, not portion of total devs of course) out there playing around with languages like Elm or Haskell or a Lisp/Scheme, or OcaML, F#, etc. who'd be super excited to use those languages professionally.

s4vi0r··on How and why we moved to Vue.js
Doesn't redux handle that?
s4vi0r··on An opinionated guide to Haskell
+1, emacs+intero is the way to go.

Emacs in general is highly underrated due to years of RSI/muh loading time shitflinging. Evil mode is by far the most complete vim emulation out there, and other than JS pretty much every language I write has been a more enjoyable/easy experience on Emacs than it was on vim or st3.

s4vi0r··on An opinionated guide to Haskell
Cabal version too high. Did you have a pre existing cabal installation independent of stack or something?
s4vi0r··on 3D Color Print
Huge part of why I refuse to switch to a non-macbook laptop, despite not being at all happy with the direction they've taken the pro in with the latest iteration.
s4vi0r··on A man accused of cheating at video games may lose his Guinness World Record
Because they accepted beyond ridiculous scores without any real proof, or even skepticism? In like every game this dude has a record in his score is impossibly higher than 2nd place. And these aren't even games or records which have been around for a couple weeks so that you can argue there's room for improvement.
s4vi0r··on My next laptop isn't gonna be a Mac
USB-C is already pretty ubiquitous, but I agree. I don't understand why they dumbed down the mbp - the 'plain' macbook is more than good enough for most consumers and I'm sure they would've loved the touchbar and whatnot.

Obviously I don't want them to make the pro into an ugly thinkpad style thing for the sake of more battery and ports, but I think plenty of people would've been perfectly fine with the new mbp mostly just being an upgrade to internals and maybe the screen. Instead, they dumped the Esc key for a novelty feature pretty much nobody really cares about, dumped the awesome magsafe charging, and got rid of a bunch of ports - not that the old version had a ton in the first place - for pretty much no good reason.

If there were another laptop on the market that Just Worked™ anywhere near as well as the mbp, I definitely would've switched but as it is I'm sticking to my late 2014 model and hoping the next gen mbp is less of a flop.

s4vi0r··on Org-Mode for Visual Studio Code
Or just accept that emacs is objectively better software and switch to it? Evil mode is by far the most complete/true to vim vim emulation that exists, as far as I know.
s4vi0r··on Supreme Court Takes Up Internet Sales Tax Conundrum
Because most people don't see taxation as theft, and don't mind paying it in exchange for certain goods/services?
s4vi0r··on Amazon announces candidate cities for HQ2
I think you're overestimating the trumples. He has an abysmal approval rating, and the types of people who tend appprove of him (e.g. rural poor) aren't exactly big spenders/prime consumers or whatever. Trump will raise a stink about it, but I'd be very surprised if anyone normal/reasonable felt Amazon opening hq2 in Canada to be like a personal attack against America or something.
← PreviousPage 2 of 4Next →