2 ms·
> Wrong. Javascript has typed arrays. When's the last time you actually looked at Javascript? 1998? See comments here: https://news.ycombinator.com/item?id=646
by cbsmith 13y ago
> Wrong. Javascript has typed arrays. When's the last time you actually looked at Javascript? 1998?
See comments here: https://news.ycombinator.com/item?id=6468339 https://news.ycombinator.com/item?id=6468339
As recently as a few months ago I had to base64 encode a binary protocol because the JavaScript guys couldn't handle decoding the raw bytes.
> They are using lua.
Yes, but it seems like lua is merely used as a target rather than a programming language. What language people actually code in is highly relevant if your goal is to make a domain more accessible.
> They just have a front end to lua that uses javascript syntax, it would seem. Because languages without curly braces are scary, and the goal is to make this stuff accessible.
There are a lot of languages with curly braces that aren't half as scary as JavaScript.
> To the expert, making your niche accessible to plebes is scary. I understand.
I appreciate your "understanding". Next time you are trying to make the big "I can read your mind" power play, you might want to read the context a bit more carefully.
I don't generally do programming that talks directly to hardware, so even by your rationale I have no reason to be threatened, and I'm all for making this niche more accessible. I've seen excellent jobs of making hardware accessible to novice programmers using Java, Smalltalk, and even things like SCRATCH and Alice. I think that stuff is great. As you put it, "making a niche accessible to the plebes" is a great endeavour and what I have spent most of my career striving for. I've learned a thing or two about that path along the way. This isn't the first time a choice like this has been made. I thought I'd share that this particular choice, if anything, undermines the goal.
- TheZenPsycho 13y ago"I thought I'd share that this particular choice, if anything, undermines the goal." but that isn't what you shared. All you had to share was vague old man gripes about a language, with the only concrete example being something that is only really half true. For christ's sake, you suggested Java and Objective-C for the task. How do you expect to have any credibility after that? For a novice language, why are you expecting a typical task would be decoding a binary protocol? To claim that you are just sharing your wisdom here is intellectually dishonest.
- cbsmith 13y ago> For christ's sake, you suggested Java and Objective-C for the task. How do you expect to have any credibility after that? Because while they might not be considered "hip" languages, they have large developer communities and are comparatively straightforward to pick up for any web developer that isn't familiar with them, yet they still have good support for the task at hand: talking to hardware. > For a novice language, why are you expecting a typical task would be decoding a binary protocol? Because they're talking to hardware, and because working with binary is actually much simpler (if your language doesn't have some bizarre aversion to it). If you've ever taught novices to program, it's actually easier to start with binary as you avoid all the complexity of text encodings and parsing. You want an integer? Read an integer. No length prefixed fields. No reserved characters. No escape sequences. No terminating characters. No character set encodings. No case sensitivity or symbolic equivalents to worry about. The worst you might have to deal with is endianess and usually you can dodge that issue by starting with native endianess. C makes it harder with it's "not sure what width that is" fixed point integers, but that's part of why you don't pick C for that job either. Working with binary only really becomes a pain once you have to start talking to humans.
- TheZenPsycho 13y ago> comparatively straightforward to pick up for any web developer that isn't familiar with them compared to javascript. really? you think java is "easy to pick up" ? I'm going to have to just say I disagree with you there. I don't like my chances of convincing you how silly that sounds. You seem to be operating on some very peculiar assumptions.
- cbsmith 13y ago> compared to javascript. really? you think java is "easy to pick up" ? Yes, compared to JavaScript, it absolutely is. Really, the only PITA with learning Java is all the framework-itis (which is starting to become an issue with JavaScript as well, but that's another story...). For things like embedded systems, Java doesn't have any of that stuff and it magically returns to the comparatively simple language for programming network aware hardware it was originally intended to be. > You seem to be operating on some very peculiar assumptions. My assumptions are from teaching and watching other teach both children and adults how to program (usually with adults it has been people who are already professional programmers). I'd absolutely agree that Java isn't the best teaching language, but particularly if you've got someone who already knows how to program (which is kind of what I think of when I hear "web developer") at least at some basic level, it tends to be pretty easy to pick up. JavaScript on the other hand, is quite the opposite. I've worked with "copy-and-paste" developers who couldn't really write their own program from scratch to save their lives. When you asked them to explain what the code they'd pasted in was doing, JavaScript was invariably the language where they had the hardest time deciphering what was going on, and more often than not, you ended up sympathizing with their difficulty. (C++ and Perl can also be quite difficult to decipher, but they tend to have the advantage that anything much more complex than a one liner generally won't work at all if just blindly copied and pasted, so copy-and-paste coders tend to be rarer breeds there).