skysight-inc/HackerNews huggingface dataset:
I have read many "criticism of Go" articles and this one is one of the most direct-to-the point.

TL;DR: topics covered:

1. capitalization rules create inconsistent behavior

2. Structs do not explicitly declare which interfaces they implement.

3. No exceptions

4. A very good one: "Here’s far too much magical behavior. For example, if I name my source file i_love_linux.go, it won’t get compiled on my Mac. If I accidentally name a function init() it’ll get run automatically. (...) It’s fine for small projects but bites you on large ones, and Go was meant to address the problem of “programming in the large”."

5. Identifier name clashes

6. It’s difficult to generate Go code automatically due to the compiler being picky on imports, etc.

7. No ternary operator.

8. (complaint about sort.interface{} that could have been solved using generics)

9. "Import versioning and vendoring is terrible. "

10. No generics.

11. "The append() function modifies the array in-place when it can, and only returns a different array if it has no place left. You couldn’t ask for worse API design. How many bugs are caused by forgetting to assign the result? A lot, because initial testing may not trigger a resize."

I would personally replace (6) with "absolutely no half-decent metaprogramming abilities (nor an expressive type system that could give you a workaround here.)"
One thing I've been confused with about transpiled languages is how does correctness transfer? How do types or lifetimes etc. transfer to WASM, for instance? Or does it just depend on the correctness to be verified in the pre-compilation/transpilation stages?
Any language that doesn't have first-class support for ADTs is a waste of my time. And I say that as someone who's working with TypeScript all day long, and try to push it in my team, even though it sometimes requires verbose code and boilerplate. But I take that over plain JS any day. It took long enough for my coworkers to recognise the benefit of a type system. Can't push them too hard too far too quickly.
No offense meant, but that couldn't be more wrong. If you're writing for the server, you can already use whichever language best suits the problem at hand. WASM will eventually allow the same choice in the browser.

The extent to which WASM could be used in the Node ecosystem would essentially be an indictment of how badly the Node community has bungled FFI. (node-ffi[0] should absolutely be added to Node core, not be independently maintained and always trailing compatibility with newer node releases, right now you have to choose between security or compatibility)

[0]: https://github.com/node-ffi/node-ffi
> The first can be remediated by planning to bring new hires up to speed, and just making that investment in them. (It can also be a useful filter

It can be a useful filter in both directions. I'm more impressed with prospective employers who have an onboarding plan including some reasonable model of a learning curve than prospective employers who assume "oh, we use popular language/framework/tooling x/y/z, so if we find someone who knows these specific things, onboarding will be a snap or practically take care of itself."
Ask HN: Anybody use optimization/ OR techniques professionally?
I am currently enjoying the coursera module on discrete optimization with Minizinc [1]. Optimization modeling always seems to me that it has great potential, but I find it hard to find case studies of real applications, nor do I know anybody that uses it professionally. The case studies I have found are all military based, and I find that a little far from anything I would use it for.

Could all you operations researcher types share your experience? I would also love to hear from anyone who uses optimization modeling or OR in their professional capacity, and about projects.

Please note when I say "real applications," I don't mean a large scale simulation of a standard problem by an academic using made-up data and models. I know that you can use Minizinc to solve the traveling salesman problem, but I want to hear about an actual sales organization -- one that sells stuff (Amazon devs/ analysts, please chime in!).

For "real application" examples: in social services, I could see optimizing case work schedules, application of expensive interventions for best pay off, etc ; then I would want to hear about the actual roll out of this system in county X. In circuits, I could see using optimizing design problems, e.g. getting close to a required time constant using a dozen resistor and capacitor options; then how it was used to improve a robot that is actually produced. In dev ops, I could imagine a model for best machine allocation. Etc.

My two real application of optimizatioin: I used quadratic programming to fit population translation matrices to demographic data [2], and we once used AMPL with NEOS to find estimates of population by household type that would fit a time series with a few years of missing data.

[1] https://www.coursera.org/learn/basic-modeling/

[2] https://escholarship.org/uc/item/47t278gq
Be like Google! Build a graph!

I use a free, open-source knowledge graph database[1] with an Emacs frontend. It resembles tree-based knowledge schemes like FreePlane or Org Mode, but things can have multiple parents, not just multiple children. It offers full-text search via Apache Lucene, which resembles regular expressions but also offers boolean operators. It also lets you selectively merge your knowledge base with other peoples' -- share what you want with who you want, without having to segment your experience of the data into separate files.

(I am one of the developers.)

[1] https://github.com/synchrony/smsn/wiki
Save your trolling for elsewhere
> For example, if I name my source file i_love_linux.go, it won’t get compiled on my Mac

What could be the reason for this?
> We put thieves in prison...In the same way society has a reason to put strict limits on surveillance

On one hand, we have a stylised burglar. On the other, a stylised lockpicking tool maker. The former is illegal; the latter is more complicated.

I am conservative about expanding the scope of the law. You criminalise surveillance apps in one decade and in the next, a security researcher disclosing a bug gets bitten.

> what damages can someone with a spy app on their phone ask for?

If someone snooped on my phone without my permission, they would see a lot of confidential client information. They may also see my and my loved ones’ protected health information. Finally, they will have sought and procured illicit access to my device, which is itself illegal. Lots of potential monetary damage in there, if only in legal time to ensure everyone who needs to be notified gets notified.
That's exactly how our corporate IT department works. They get nothing done and working there must be a complete nightmare. I have told my boss that I will refuse to work on anything where they are involved.
# Analyze article posts, sort by hostility and bias
# Compare to points from article
# begin
Same here. I learned on the go how to grow a project from 10k lines to 1 million lines, and the insights of how to scale largely had to do with team dev practices and modularization. Eventually I learned to decompose back into multiple independent code bases developed by separate teams communicating through documentation and bug trackers and now I would avoid growing a codebase up to 1 million lines.
Is your internet connection fast and reliable?
If you come from a functional background (or otherwise just prefer expression-based languages), the if statement-based version is just horrible. Several languages work around this by not having ?: but instead having `if` be an expression.
PureScript doesn't do a bad job either. And even Haskell (GHCJS) has good FFI into JavaScript (I'd argue even better than PureScript!). How bad can you make interop between a higher-level language and JS? What are the bad examples?
>book Practical Common Lisp

It is a wonderful book and Common Lisp is powerful to the max, but note that CL is a multi-paradigm language and examples won't necessarily be in the "functional" style. Quite the opposite, Common Lisp makes imperative programming very comfortable (and OOP as well.)
Ad tech? I would love to see another attempt at a privacy-respecting ad network, kinda like what The Deck ( http://decknetwork.net ) used to be, or what Read The Docs is doing ( http://docs.readthedocs.io/en/latest/ethical-advertising.htm... ).

I think there is still money to be made advertising quality products especially if you are efficient (so your company's overheads are very low).
It really is striking to me that it is so popular to dislike Go on HN. A lot of people seem to have to voice their dislike for it instead of just not using the language.
3 options to drain your sinuses.

1) Eat a chili pepper. As hot as you can handle. The point is to get you perspiring and salivating. Will completely drain your sinuses in the next 5 mins.

2) Aerobic exercise or a run for 10 mins.

3) Inhaling steam.
As a member of a representative democracy, I should be able to hold and express political opinions on things like immigration and affirmative action without risking career death. The fact that I can't do so is beyond just sad, it's dangerous to our democracy in general.
Ternary operators are the best! Highly expressive and concise, and everybody instantly understands it. Is there a single drawback about it?
How Did NASA Film Apollo, the Shuttle and Other Launches [video]
I think this is an interesting exploration because I really enjoyed the description of profiling and improving performance, but I came away feeling exactly the opposite of the title. I think it's really cool that JS optimization can provide so many wins, but this article makes it seem fairly fickle and if they're not familiar with VM internals I would not expect most developers to complete this journey. Using wasm+rust/c++ is interesting in part because you can get so much more predictable performance out of the box. When the performance comes from language features instead of VM-specific optimizations the performance might be easier to maintain across revisions and hopefully will be less subject to regression from VM changes.
Not exactly a new idea: https://en.wikipedia.org/wiki/Unix_philosophy
I had no idea until this thread that Elon Musk hadn't been with Tesla from the beginning. I presume reasonable people can disagree, but, no, I don't think leading someone's A round, even if you take an operational role at some point afterwards, makes you a "cofounder".
While I think most of the points raised are subjective, the overall theme does make sense to me. Of late my toolbox has become:

Ruby - for problems that are programmer bound - regular web servers / APIs, CRUD.

Go - for problems that are CPU / Memory bound - fast servers, proxies, APIs with lots of long I/O waits or high RPS requirements.

Java - for problems that require modelling - logistics systems, data structures, algorithm heavy or design heavy problems

JS/React - for UI
> I'm a beginner with functional languages, but isn't the type system completely orthogonal to the fact that Elm is a functional language?

You're completely correct, though for whatever reason functional languages almost always have strong type systems.
Holy crap this is a mess. I'm assuming this is a 1/10 because their scale doesn't go down to 0.

$350 for a device you effectively cannot repair without ruining some part of it is absolutely astonishing. To anybody that says "so what?", if any part of this dies for whatever reason, not only are you almost completely out of your money, there's no way this thing is actually getting repaired by Apple. At best most of the components end up going through a recycler. At worst, that's 5lbs of added landfill.

Speakers are something that NEED to be repaired. It's one of the non-solid state technologies that we haven't found a better alternative for, and are some of the most fragile parts in systems today. These drivers/cones WILL wear out over time and the only thing you're going to be able to do is buy a new unit.
I agree. I think TypeScript is a decent language, but after working with the DOM in a functional way, verses object-oriented and imperative paradigms, I don't think I'll ever go back. To paraphrase and hijack what the author stated, HTML feels like it was created for Elm (and functional programming in general). I'd add HTTP to that as well. The combination just feels right.
Apropos the need for better programming languages,

> FWIW [...] Haskell

Sigh. So the wizziest Haskell programmer I know, has repeatedly done the following. They build a model of the mathematics of a problem domain. And then they mentally/manually compile that down to Haskell. Sometimes extending GHC internals to get an adequate target.

He's the compiler. It's a compilation process built of wizzy wet-ware, and Coq, and ... with very little tooling support. GHC is just the compiler target.

I'm not good enough to do that. I can't bridge that gap manually. That gap between insightful description of problem domain, and inexpressive language. I can't be the primary compiler, floating unsupported in air. I need a language and environment that has at least some clue what I'm trying to do. That participates and checks and supports me. That has a type system rich enough to directly describe problem domains, to describe math. Not merely a low-level target for a mental compiler.

Otherwise, everything I write is still just sculpting kludges.

GHC makes a nifty compiler target. All we need now, is a nifty compiler. ;)
Biggest collection of Reddit data per cryptocoin
No offense taken! I am pretty new to the JS world.

"WASM will eventually allow the same choice in the browser."

When will that actually be? That's the big question.
1. Capitalization. Author cited they didn't want to change how they named things and it conflicted with Go export rules. Okay then.

> 4. A very good one: "Here’s far too much magical behavior. For example, if I name my source file i_love_linux.go, it won’t get compiled on my Mac. If I accidentally name a function init() it’ll get run automatically. (...) It’s fine for small projects but bites you on large ones, and Go was meant to address the problem of “programming in the large”."

4. is great for large projects. Once you learn the convention, it is super easy to see which files are for which platforms. It makes it to navigate large trees.

6. Look at how protobufs do it. Easy to work around.

11. Understand how Go works, run go vet.
I'm not a big fan of DRM and don't want to defend it, but your description is a bit incomplete.

Those 10 determined people/pirates go off and put the cracked software (or the serials) up for download for the "not so determined" pirates who just want to download a cracked version (or serial) that works. Those don't have the skills (and willpower) to do the work needed to crack software.

Those, however, aren't 10 people: the ratio of cracker to "not so determined pirate" is an important part of the puzzle. Perhaps 1000 people will get the cracked version. I don't know, but the 1-to-many relationship is quite obvious from a distribution system such as BT or Mega.

I'm not trying to justify DRM (and certainly not what these guys have been up to), but your presentation makes it look like measures such as these are trying to fight a super-minority of folks (ie 10 out of 1000, or about 1%), when reality is most likely very different.

I have an app on the Mac App Store (I won't spam you with the download link since it's irrelevant to the discussion and I'm not here to fish for downloads) with analytics that report that many "purchase attempts" fail with a strange error (ie not a cancellation by the user, not a problem reaching servers, etc), and I have no other choice but to imagine that these are from people who are trying to pirate my app. And it's nowhere near a 1% fraction.

In my previous company, we'd have server side verification of receipts (per Apple rules), and about an hour after we'd release our software, we'd see a torrent of verification failures in our logs.

Software piracy is quite widespread and is an issue that we shouldn't gloss over. Still, I wouldn't condone what these guys seem to have been doing.

As a side comment on style, you could have made your point without saying "Vendor makes a shitty product" as there is no need to denigrate products that vendors make in such a generalized manner. You'll be taken more seriously if you can adopt a more balanced stance.
The author doesn’t gain anything, it’s entirely to help the reader understand their own readiness for the material. It’s not rude, it’s straightforward and matter of fact.

If you don’t meet the prerequisites, you should avoid the material. Not because the author has stated the obvious, but because you’re not prepared for it. If you’d like you can interpret it as rudeness, but really it’s intended to help people save time instead of waste it.

The first thing I do when I open a new textbook is flip to the preface material to see what the prerequisites are and how firm they are. Sometimes “passing familiarity” is enough, sometimes “mathematical maturity” is enough. But there are many treatments where that is not the case, and it’s better for everyone who’s serious about the material to be upfront about it.
"Programmable money" is one shorthand example for smart contracts. As a simple example, you could create a payroll smart contract that pays a fixed amount of coins/tokens/whatever at a certain time each month to a given ERC20 compliant address. You can contrast this with Bitcoin, whose two main functions are securely storing and sending bitcoin (limited by design).

For a more in-depth answer regard smart contracts, here is an article by Vinay Gupta where he sets the context for Ethereum, smart contracts and blockchain against the existing way of organising and sharing data (SQL, the web, how organisations share data, protocols, and more):

https://medium.com/humanizing-the-singularity/by-the-end-of-...
We've had talk of sheeple for decades now. Nothing new, methinks.
"Never mind there's not much evidence its actually a problem."

What measure of proof do you require, to convince you that it's a problem worthy of your attention?
Exactly. One almond requires about a gallon of water. We can easily replace that with a more efficient food.
This really is a proven problem. Plastic doesn’t enter into the ocean in isolation. It’s dumped with all the other environmental, health damaging chemicals, metals, and etc. Humankind is not taking care of its waste and it’s destroying the weather cycles, climate, and ecosystems.
Go enforces the convention of using the architecture name as the last part of the filename as a way to compile code specific to that platform. For example, code that used epoll would be in _linux.go, and the windows and mac versions would be named appropriately.
You're right, I stand corrected!
This does seem to be growing into a problem. I have a friend who is a recovering alcoholic and recently he went to a tech meetup where not only was it centered around alcohol but there really wasn't anything else provided. He rightly chided the organizer for not considering that there might be people who want to attend who don't consume alcohol.
The traditional way is more readable, I agree. I think it has more to do with statefulness.

let example

if (someCondition) {
example = 3
} else {
example = 4
}

In javascript, for example, like above, I'm initializing a variable (with let, allowing reassign-ability). Its value can be modified later by other code.

Alternatively, I could use a ternary operator and a const to avoid potential unwanted reassignments.

const example = (someCondition) ? 3 : 4

------------

Some languages, like Kotlin, actually let you use an if-else expression in a single line...

val max = if (a > b) a else b

... or even allow you to return the last line of a block to assign a value:

val max = if (a > b) {
print("Choose a")
a
} else {
print("Choose b")
b
}

*val, in Kotlin, is similar to const in javascript; it's not reassignable.
Sony Xperia XZ1 Review – The OmniBalance Design Must Fall
Majestic Mondays – Feb. 19, 2018 – What Our Unicorns Are Grateful For
> Elm requires that you think through all the edge cases. You must consider and specify what will happen in every case.

Wouldn't that be the case with _every_ typed and compiled programming languages (or at least, every typed and compiled programming languages that support pattern matching)?
How about a USB OTG microphone, GPS and camera that tell a pack of lies, ideally implemented as an app on a second phone.
I don't think he wants you to feel bad for him, I think he's just underscoring it's an echo chamber, which is true.
I think it's because there's a relatively large contingent on HN who dislike Google in general and therefore, by extension, anything they build/support.

EDIT: Why the downvoting? Sure, there are valid issues with golang, but there are also a small but vocal minority on HN who enjoy being rude to Google because they don't like Google, which is what my comment relates to. I certainly don't have any axe to grind with the author, the article, or the commenter to whom I'm responding. It was just a perspective on why, in general, golang might get more of a slating than it perhaps deserves, and I acknowledge that amongst that there will obviously be some people who have many valid reasons not to like golang. Sheesh.
Correctness is typically checked long before code generation happens. This does mean the code generation backend must be trusted, whether the target be x86 or wasm. Just as you have to trust CPUs to not expose processes' memory to each other (oops).
It's not: the TypeScript type system is unsound (accepts code that violates it), and there are no runtime checks, so it doesn't actually guarantee anything: a TypeScript variable may in fact contain any value regardless of its declared type.

I'd say the best type systems are found in Rust (naturally models zero-cost abstractions but doesn't have dependent types) and Idris and Coq (have dependent types but don't naturally model zero-cost abstractions).
I feel like this is a better way of putting it:

"If you are in the business of collecting data without users' explicit permission you shoudln't be in business."
edit: I misread the question, my comment was geared toward languages transpiled to JS.

It's compile-time safety. Virtually none of the type knowledge exists in the runtime. Still, it's far better than nothing, with the self-documenting nature of typed code being one of the biggest wins IMO.
Hayabusa was an active probe that had working thrusters capable of changing its orbit. Elon Musk’s car is an inert hunk of plastic and metal at this point, without as much as a communication link back to Earth.
> It’s difficult to generate Go code automatically.

But, I must say, I do really like that Go makes the AST a first-class citizen and a core part of the standard library. While not strictly a Go thing, in the languages I usually find myself programming in you have to rely on third-party implementations of varying degrees of quality or, even more common from what I see in the wild, messy string building. Being able to focus on generating the tree and have the built-in printer generate the code in the format that Go users expect is a much nicer way to generate code.
>how does correctness transfer?

The same way it transfers when the language is compiled to x86 instructions! By adding a pre-written and pre-compiled runtime.
Ask HN: (looking advice) building websites for local businesses (Side hustle)?
I work with Java and at the moment looking for new job. In the meantime I’d like to work on some side hustle and have read some people here telling about creating websites for local businesses and maintaining them.

My idea is to cold call/email local businesses in London (where I live) that have very old website and offer them a new one page website, easy to build and maintain.

What kind of hosting would you recommend for one page websites and suggestions on how to monetise other than one-off?