News for hackers. Stuff that matters.
Re:Taking C Seriously by jonathansizz on Wednesday November 02, 2011 @05:12PM (#3188954)
Those TIOBE numbers (linked to in the article) are quite interesting.

As well as C refusing to go away, there's a noticeable surge for C#, Objective-C and Lua, and a substantial erosion in the popularity of trendy languages like Python and Ruby.

Re:Taking C Seriously by malkia on Wednesday November 02, 2011 @05:59PM (#3189128)
Lua is small and embeddable. You can run multiple independent instance of it in the same process. The lua table is a very useful data structure.

Then you have luajit - also a small, easy to embed solution, that approaches standard "C" written code, and it's main weakness, from what I understood (Mike Pall had a post about it) is it's garbage collector.

On top of that, ffi bindings make "C" calls extremely fast, when the jit is active, and not very bad when the interpretter runs (but slower).

And the lua/luajit license allows you to embed it in your application, without the need to share source code.

Mike Pall is working on ppc, arm versions (and I think there might be already ppc jit).

Not last to forget - awesome community (comp.lang.lua).

Re:Taking C Seriously by strait on Thursday November 03, 2011 @01:55AM (#3190502)
Using LuaJIT with minimal FFI C code to optimize, seems to be the best way forward in maximizing both performance and maintainability.

What would be really interesting is to see someone highlight specific cases where this approach ultimately fails to measure up in performance with using pure C.

I would think that the LuaJIT approach would be tens of times more maintainable for a sufficiently large application, so it's really imperative here that we ask 'Why not?'

Re:Taking C Seriously by malkia on Thursday November 03, 2011 @12:58PM (#3192612)
You can always find cases where it would fail. And that's ok. For what it's doing, and what it allows it's simply unbelievable (at least to me) how it succeeds in doing it (I understand very little of compilers, and little of interpretters).

One area which is not easy translatable is OpenMP (www.openmp.org), inlined assembly, and SSE packed floats. But that's okay, and even then there is probably a better alternative - a language more suited to such tasks, instead of "C" - OpenCL (www.khronos.org) or DirectCompute.

But for general coding, it's very very good.

Re:Taking C Seriously by flomo on Thursday November 03, 2011 @03:23AM (#3190686)
The odd thing is TIOBE shows a general decline in JavaScript beginning in mid 2009. Even if the index is just a count of search engine results, this feels like exactly the opposite of what's happening in the real world.