Better HN
topnewbestaskshowjobs
Log inSign up

hellofunk

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

John Bellick, Mexico City
Submissions

comment 10y ago · link · parent

I love lambdas, but a lot of commenters are throwing around the word "closure" here, and c++ lambdas are definitely not closures. You can capture outside variables by value or by reference, but that value can expire before the lambda runs if the reference no longer exists; in which case, you are in trouble. Unlike a true closure (as in lisp or other languages), where the closed-over value stays around.

If we talk only about c++ capture lists by value (i.e. [=]), then you could make a case for a more appropriate use of the word "closure" but since many lambdas do more than this, I think the distinction is necessary.

However, even in by-value captures, if you are capturing a pointer by value, the issue remains. So, really it is not a good idea to think of lambdas as closures in the functional sense typically used in other languages.

comment 10y ago · link · parent

The RAM issue (if there was one) has nothing to do with the language in this case. If we are talking about lisp, then I assume we are referring to any true lisp, in which case the underlying hardware scenarios widely vary.

I don't know how Arc does it but Clojure's resources are no different than any of the millions of Java web servers running; just a much better language to run on vs Java for that platform.

comment 10y ago · link · parent

>The parameter list is optional.

To avoid confusion, only an empty parameter list is optional. You can't omit the parameter list if you take args, unlike lambda shortcuts in languages like clojure which allow you to implicitly refer to arguments inside the body using a universal variable name, and therefore omit the parameter list for all lambdas. That possibility does not exist in c++.

comment 10y ago · link · parent

I assume this is only for stateless lambdas, that have not captured anything? Because otherwise a function pointer would not be enough, right?

Currently, any stateless lambda can decompose into a function pointer and be passed to any function that expects a function pointer, right?

Are you saying that ++17 has augmented this, and if so can you provide more details or a reference (or an example) as I'm quite curious to know more.

comment 10y ago · link · parent

Clojure is running enterprise tools around the world. We use it exclusively at our company, partly because we are small and time:productivity ratio is really good with it for few developers.

But much larger companies are using it also, nearly exclusively.

As far as macros go, the most popular Clojure library for routing web requests on a server is Compojure, and it wraps a lot of low-level stuff up in a tight lisp macro set that makes it trivial to functionally compose your http requests. It's pretty nifty and is used extensively in industry.

Also this web site you are interacting with right this moment as you read this is built on lisp.

comment 10y ago · link · parent

One of the most important differences is the type system of Haskell vs. the dynamic typing of CL. This is not a trivial distinction and they are quite different ways to program.

2497.

China's tech culture is so intense that people sleep and bathe in their office(uk.businessinsider.com ↗)

1 points · by hellofunk · 10y ago · discuss

comment 10y ago · link · parent

Most human errors are easily preventable.

comment 10y ago · link · parent

I can't say I'm surprised. I had a surgery once at a supposedly well-respected regional hospital, and they made several careless mistakes with me. Everything turned out fine, but there was considerable opportunity for easily preventable things to have gone wrong if it weren't for dumb luck.

2500.

Ask HN: How many of you actually use and rely on intellisense/autocomplete?

3 points · by hellofunk · 10y ago · 1 comment

comment 10y ago · link · parent

Haven't heard them myself and I'm quite involved with the community.

Some disappointments about core.typed not being what some would have liked, but other than that...

comment 10y ago · link · parent

All 3 of those lamentations could also apply to Clojure, but I don't think anyone who used Clojure would lament it.

comment 10y ago · link · parent

Agreed. Swift is quite high-level compared to C or C++, for examples. As with any languages, there are tradeoffs with performance.

comment 10y ago · link · parent

Not too surprising, OSX is a common platform for devs who are linux/unix-oriented but want a high-level OS with all the sleek GUIs and mainstream features. OSX is a certified Unix OS, after all, so it tends to speak to emacs users in a way that you won't typically find among the Windows base.

Yes Unix is not Linux, but I see OSX widely used at hackathons and conferences because of its underpinnings.

comment 10y ago · link · parent

>First of all, go() statement in Go language does parallelism in addition to simple green-threading. With all the talk about 'concurrency is not parallelism' that seems to be part of Go's DNA, I find the design decision to support both using a single statement a bit weird.

Have to agree on this, and often wonder the same thing.

2506.

Ask HN: How do you like the trend of auto-playing videos on mainstream sites?

6 points · by hellofunk · 10y ago · 8 comments

comment 10y ago · link · parent

I'm curious how Swift is getting adopted on Linux and what success folks are having in writing Linux command-line apps or other apps?

2508.

Stack Overflow’s New CMO(blog.stackoverflow.com ↗)

1 points · by hellofunk · 10y ago · discuss

2509.

Jack Dorsey has lost $340M in two weeks(marketwatch.com ↗)

1 points · by hellofunk · 10y ago · discuss

2510.

35 tons of dead fish suddenly wash up in a lake in China(mashable.com ↗)

3 points · by hellofunk · 10y ago · 1 comment

comment 10y ago · link · parent

Perhaps most smaller apps, yes. And some big ones too. But a very significant percentage of the commercial software industry writes apps for OSX in C++, including Autodesk, Adobe, many major games written using engines like Unreal and Unity (which also support other languages), etc.

That's not a knock against anyone who does or doesn't write apps in a particular language; but folks should know what the reality is, and Objective C or Swift are by no means the only or even necessarily the most profitable ways to writes apps for OSX, though those languages are perfectly fine for many circumstances.

comment 10y ago · link · parent

I don't know who you've been talking to, but that's ridiculous. C++ is one of the most widely-used languages for writing native apps for any OS. Adobe products, Chrome, anything built with Qt, even the Swift language itself, all made in C++.

comment 10y ago · link · parent

It's also true that oftentimes ideas that are truly profound are instead perceived as bullshit.

comment 10y ago · link · parent

I'm sure there are other common words in most/all of those threads that wouldn't surprise us.

comment 10y ago · link · parent

Google docs voice typing, which I've tried, has similar success rate for me as Siri.

comment 10y ago · link · parent

I think he was being sarcastic.

comment 10y ago · link · parent

Siri mis-hears about every other sentence I send her, so I'd say speech recognition is far from solved.

But we are getting closer.

comment 10y ago · link · parent

I don't think that will ever change but toolkits that let you target more than one platform will continue to improve (like Qt).
1
838485
110