News for hackers. Stuff that matters.
Re:JavaScript right on the hardware by bpodgursky on Wednesday August 14, 2013 @06:41PM (#6214848)
When all you know how to use is a hammer, everything looks like a nail...
Re:JavaScript right on the hardware by jfb on Wednesday August 14, 2013 @07:11PM (#6215060)
"True. When your hammer is C++, everything begins to look like a thumb." [1]

[1] http://www.anvari.org/fortune/Quotations_-_Random/3041_quote...

Re:JavaScript right on the hardware by drdaeman on Wednesday August 14, 2013 @07:25PM (#6215140)
Why it's always C/C++ (not even Pascal or Oberon) in another corner of the ring? If hardware is powerful enough to sustain Node.JS, why not use OCaml, Racket or, maybe, some JVM-based language? Or, if the scripting is a requirement, Lua, Tcl or maybe Python.
Re:JavaScript right on the hardware by JoshTriplett on Wednesday August 14, 2013 @07:37PM (#6215202)
C/C++ is always in one corner because it's the go-to language (heh) for code that needs to do direct hardware access and manipulation.

That said, if I don't strictly have to run C/C++, I'd much rather run Haskell or Python. And you'd be surprised where you can run high-level languages like Python; one project I work on runs Python in the GRUB2 bootloader to test BIOS and hardware, giving Python full ring0 privileges, raw memory access, ACPI method invocation, and SMP support. Some of the Python standard library is missing (an HTTP server, for instance), but quite a bit of it is available. See http://biosbits.org/ for that project.

Re:JavaScript right on the hardware by TheLegace on Thursday August 15, 2013 @05:51AM (#6216918)
Well I have been trying to play around with LLVM on ARM Cortex-M4 micro controllers specifically the STM32F4 series of my controllers there is a github project that tries to use Clang.

Now if I had the time and experience I wanted to try and compile this library called py2llvm. The library that can compile static variables and python syntax into LLVM bitcode with C like performance. I think that is the best of both worlds.

Re:JavaScript right on the hardware by 14113 on Wednesday August 14, 2013 @09:15PM (#6215584)
I love python. It's nothing like javascript really. It's more like C, but with an approachable wrapper.
Re:JavaScript right on the hardware by jarek on Wednesday August 14, 2013 @07:31PM (#6215171)
Because a lot of people know Javascript and C/C++.
Re:JavaScript right on the hardware by drdaeman on Wednesday August 14, 2013 @07:43PM (#6215231)
Okay, maybe Racket and OCaml are relatively obscure options, but quite a lot of people know Java and Python. And I can't say Lua's not popular, too.
Re:JavaScript right on the hardware by jarek on Wednesday August 14, 2013 @07:50PM (#6215263)
I'd expect Javascript programmers dwarf Lua programmers by a couple of orders of magnitude. At least one OOM if you want to limit to people who only know the language "well."
Re:JavaScript right on the hardware by kyllo on Thursday August 15, 2013 @01:15AM (#6216289)
In the game programming industry (PC games, not iOS/Android games), the two most popular languages are C++ and Lua. That's probably part of the reason why these two languages keep getting brought up in this thread to compare against Javascript.