Live data from Hacker News

What programming languages are used most on weekends?

stackoverflow.blog

261–270 of 299 posts

Re: What programming languages are used most on weekends?

#261

Earlier quoted context omitted.

Then again, sed works differently on different platforms, and awk is not the same as gawk or nawk, both of which have many more features than standard awk. If you're used to the GNU implementation, you might be surprised to find your script doesn't work on a system without the gawk implementation. On Linux, I can use this sed command: sed -i ‘s/^”//’ example.txt That deletes any quotation marks that are at the beginn…

This is why I have gripes about the OS X command line. I can't confidently use the scripts I do on Ubuntu/Mint/Debian. Like, get with the program, Apple. It infuriates me and I'm moving entirely off their platform as soon as my Mac kicks the bucket.

I have a script which installs and aliases all the equivalent GNU commands on OSX. You can fix a lot of the annoyances.

Re: What programming languages are used most on weekends?

#262

Earlier quoted context omitted.

It's true that you can program in a functional style in almost any language, but it's just simpler for Javascript. Functions are first-class objects in Javascript, and arrays have built-in forEach, map, reduce, and filter -- all useful for a beginner in functional programming. C++ and Java have lambdas and foreach, but they aren't as simple to use.

Functional Programming is about working with mathematical functions . Having "first-class functions" in the language is nice, but then passing function pointers around is nothing more than procedural programming [1] and yes, the difference is huge. As for those utilities you mention, Javascript is the most broken of them all: >>> ["10", "10", "10"].map(parseInt) [10, Nan, 2] [1] https://en.wikipedia.org/wiki/Procedur…

Why does functional programming have to be about math?

That is precisely the kind of insistence that prevents people from adopting functional languages for real world programming tasks.

JavaScript certainly lacks language level support for function composition, but it has the basic tools to allow you to build combinators and compositional functions yourself, and when dealing with functions as data you often find you can elegantly refactor code by building such a thing - so in terms of 'learning about functional programming' JS can be a great workbench to help procedural minded programmers discover those tools by discovering and building them.

So maybe JS doesn't teach functional programming, but it does at least introduce you to paradigms from which it is possible to see the benefits of a functional language.

Of course, if you then hear that those languages are only for doing math in then you'll stick with JavaScript.

Re: What programming languages are used most on weekends?

#263

Earlier quoted context omitted.

Haha, since Subversion was born in the height of XML frenzy, they figured it was a good idea for the built-in web interface to just output XML and a default XSLT. That way if anyone wanted to customize it, they could do so to their heart's content by just specifying a different XSLT. I loved Subversion at the time, and so created the TortoiseSVN Menu plugin [1] for Firefox, and an accompanying XSLT to add lots of ric…

In my opinion, XSLT is a disappointing implementation of a great idea: a DSL for structurally transforming a data format, encoded in the same data format. I guess S-expressions fit the bill if you want to use a Lisp, but I wouldn’t mind having something similar for JSON.

I very much agree with your sentiment here. That's why I find Haskell lenses so fascinating. Although it's another level of challenge since it's done on a type level.

> something similar for JSON

And I've looked for this as well. Haven't really tried any solution in the trenches but this one might be interesting for you: https://github.com/mmckegg/json-query

Also, GraphQL is tangentially related.

Re: What programming languages are used most on weekends?

#264

Earlier quoted context omitted.

In most of today "real world" languages you can't use pointers.

If you can get NullPointerException, then you are using pointers. May be you meant that you can't use pointer arithmetic, but pointers are used almost everywhere.

Most by number possibly, rather than by market share.

Re: What programming languages are used most on weekends?

#265

Earlier quoted context omitted.

Hum... If you look at the later graph, Haskell's volume is among the lowest volumes of anything there. What really makes sense. SO format does not suit Haskell very well.

Could you elaborate on why Stack Overflow is ill-suited to Haskell?

Haskell is the land of deep concepts that lead to huge powers.

Hoogle will already tell you most of what you can learn to small, fact-focused, objective and unanimous explanations about real code. SO intellectual avoidance rules hit much before people can explain anything useful.

Re: What programming languages are used most on weekends?

#266

You don't use recursion or pointers professionally? On what world are you considered a real world programmer?

Too bad that's a straw man since the comment you replied to didn't say anything about not using pointers and resursion. It said real programmers don't ask that many questions about them.

Also too bad for your high horse answer that all the best real world programmers acknowledge that pointers & recursion are places where bugs hide disproportionately. Many real world programmers suggest that pointers & recursion are things to avoid. NASA's safety code guidelines are well known around here because it says explicitly to avoid both recursion and pointers.

Rule #1: "Restrict all code to very simple control flow constructs – do not use goto statements, setjmp or longjmp constructs, and direct or indirect recursion."

Rule #9: "The use of pointers should be restricted. Specifically, no more than one level of dereferencing is allowed. Pointer dereference operations may not be hidden in macro definitions or inside typedef declarations. Function pointers are not permitted."

https://en.m.wikipedia.org/wiki/The_Power_of_10:_Rules_for_D...

Re: What programming languages are used most on weekends?

#267

Earlier quoted context omitted.

It's true that you can program in a functional style in almost any language, but it's just simpler for Javascript. Functions are first-class objects in Javascript, and arrays have built-in forEach, map, reduce, and filter -- all useful for a beginner in functional programming. C++ and Java have lambdas and foreach, but they aren't as simple to use.

Functional Programming is about working with mathematical functions . Having "first-class functions" in the language is nice, but then passing function pointers around is nothing more than procedural programming [1] and yes, the difference is huge. As for those utilities you mention, Javascript is the most broken of them all: >>> ["10", "10", "10"].map(parseInt) [10, Nan, 2] [1] https://en.wikipedia.org/wiki/Procedur…

So that others don't have to spend time searching: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Re: What programming languages are used most on weekends?

#268
post #125

Earlier quoted context omitted.

I went to ut austin and after a long time using haskell for intro classes the administrators succumbed to temptation (and possibly pressure from dell/ibm for wage slaves) maybe ~10 years ago and started using java. It was kind of horrible because the professor for (at least one of the) intro classes reproduced cons, car and cdr from lisp and had us construct a bunch of data structures out of this monstrous java lisp…

It was around when Dijkstra died that UT switched away from Haskell to Java. And yes, from what I've heard from several faculty members around in that period, a lot of it was from external pressure from large regional employers (some of which you have mentioned).

"Over my dead body" indeed.

Re: What programming languages are used most on weekends?

#269

Earlier quoted context omitted.

Functional Programming is about working with mathematical functions . Having "first-class functions" in the language is nice, but then passing function pointers around is nothing more than procedural programming [1] and yes, the difference is huge. As for those utilities you mention, Javascript is the most broken of them all: >>> ["10", "10", "10"].map(parseInt) [10, Nan, 2] [1] https://en.wikipedia.org/wiki/Procedur…

Why does functional programming have to be about math? That is precisely the kind of insistence that prevents people from adopting functional languages for real world programming tasks. JavaScript certainly lacks language level support for function composition, but it has the basic tools to allow you to build combinators and compositional functions yourself, and when dealing with functions as data you often find you…

> Why does functional programming have to be about math?

You've misunderstood the GP's point. It's not that FP is about math, it's that you want to emphasize mathematical functions -- functions that don't rely on inputs other than their parameters and return values in a consistent co-domain. This is just good style to improve testability and minimize sources of potential bugs.

Post reply on HN