Better HN
topnewbestaskshowjobs
Log inSign up

hellofunk

9,428 karma · joined Jul 10, 2015 (11y ago) · 3,276 submissions

John Bellick, Mexico City
Submissions

2191.

HANSEI as a Declarative Logic Programming Language for OCaml(okmij.org ↗)

1 points · by hellofunk · 10y ago · discuss

2192.

Tall teenager hands out business cards to people who ask about his height(mashable.com ↗)

2 points · by hellofunk · 10y ago · discuss

2193.

Ask HN: What makes OCaml so desired for writing compilers?

5 points · by hellofunk · 10y ago · 4 comments

comment 10y ago · link · parent

So, an employee was found at their desk chatting with the office mate all afternoon while working? That sounds like exactly the kind of practice that gives on-site work a bad name.

If I found out one of my employees was using their office as a social lounge while working at my company, you better believe it would result in a conversation and possible revocation of their on-site privileges, forcing them to work in solitude at home instead so I could see real results.

comment 10y ago · link · parent

For pattern matching, that's true. And my response is, stay tuned. C++ has a lot more to offer in this area in the future. std::variant is opening a big door for all kinds of new features in the language, and for those who cannot wait, there are pattern matching libraries out there to peak at.

comment 10y ago · link · parent

I'm not sure I understand; in C++17, why can't you write a function that returns std::optional?

comment 10y ago · link · parent

It is widely speculated that pattern matching and many other syntactic enhancements are coming to C++ because of the big door that std::variant has opened.

comment 10y ago · link · parent

Lot of syntactic sugar recently added to C++ and a lot more in C++17. The structured bindings in particular are really excellent ways for unpacking tuples and structs with type inference into new variables automatically.

comment 10y ago · link · parent

The problem with Boost.variant is that all data is doubly allocated, including at least 1 heap allocation as a copy. This is not obvious and is certainly not what a lot of users would want. But you are right, it does this to avoid exceptional situations.

comment 10y ago · link · parent

They are implemented completely differently. The only real similarity is in the name and API. Boost variant suffers from significant performance penalties that the new std::variant does not have.

comment 10y ago · link · parent

I'd like to see a React or FRP approach to the Qt Quick Controls, using C++ (not JS).

comment 10y ago · link · parent

It's true for a lot of applications other than gaming.

2203.

C++17 Structured Bindings(skebanga.github.io ↗)

2 points · by hellofunk · 10y ago · discuss

comment 10y ago · link · parent

No one wants to look through a lengthy git log to find the reason something was done to a particular block of code!

comment 10y ago · link · parent

Not mentioned in this article is the effect that dynamic typing vs. static typing has on how you comment. It is common practice in Clojure, for example, to heavily document every function, because it is a dynamic language and there are no other obvious ways to indicate the types of arguments or the function's return value (though that is gradually changing in the language, but not entirely). This practice is so encouraged and standard in Clojure that all functions can be defined with language-standard documentation strings that become a part of the function definition, which can then be looked up at the REPL.

Some statically typed languages don't suffer from this particular problem of making types clear, so you will see comments less, and reserved more for cases where logic is hard to parse conceptually. But some static languages have a similar problem due to type inference, which causes commenting in the same fashion as a dynamic language.

I am of the school of thought that except for making types clear, the best way to comment your code is to make the code as clear as possible so that it is obvious without extra explanation. Often, you can refactor a clumsy or confusing piece of code in a way to make its intent clear.

But sometimes you cannot, and that's where comments come in.

comment 10y ago · link · parent

Well, then all browser vendors are to blame, because the experience with Apple browsers is no better or worse than any other browser for serious web-based apps.

comment 10y ago · link · parent

That's not a choice. Browser technology is still a long way from native performance.

comment 10y ago · link · parent

Dash advertises offline use. And that it packages docs.

comment 10y ago · link · parent

Just noticed that Dash offers iOS docs. I wonder if Apple has a rule against charging a fee to provide their own documentation?

comment 10y ago · link · parent

I hope we will see an update here or somewhere soon that provides more information on why it was removed.

2211.

Fast and Easy C++ Object Serializer(codeguru.com ↗)

1 points · by hellofunk · 10y ago · discuss

comment 10y ago · link · parent

This affects other VPNs as well, not just Tor.

comment 10y ago · link · parent

And on iOS too!

comment 10y ago · link · parent

> It's moving from a memsafe language back to C++

JS a safer language than C++? I would argue the opposite.

comment 10y ago · link · parent

> I don't consider it authentication.

Maybe you don't, but a lot of others do. Like, Apple.

comment 10y ago · link · parent

Maybe it's an age thing. In my age group, everyone has a car, but also many have children.

comment 10y ago · link · parent

I think part of the issue is that Chicago's downtown and inner city are small enough that you typically do want to get out of town. Compared to cities like New York where people can easily go months, even years or decades, without ever thinking about leaving the city proper. That tends to be why so many people (vast majority) in Chicago own cars. And I've heard no end to the rants about trying to park in that town.

comment 10y ago · link · parent

Chicago culture is nothing like New York, however, so the comparison is a bit moot. Chicago is very much a Midwestern city with a Midwestern culture. And in my years living in Chicago, I didn't know a single person who didn't own a car, and most of them spent lots of time driving.

2219.

Warning After Reports Some Samsung Washing Machines Exploded(abcnews.go.com ↗)

1 points · by hellofunk · 10y ago · discuss

1
737475
110