Live data from Hacker News

Show HN: An Easy Programming Language That Runs in the Browser

kabas.online

81–90 of 91 posts

Re: Show HN: An Easy Programming Language That Runs in the Browser

#81

Earlier quoted context omitted.

Python? Python is really easy to learn and has reached VB levels of snowball network effects.

https://xkcd.com/1987/ Don't get me wrong, I like Python. If you're a non-programmer and you want to start programming, and you want to be useful and to be able to automate stuff quickly, you should learn Python. Especially where math and statistics stuff is concerned -- I have a friend who recently started programming, and Python was his entry point. Unfortunately, the environment problems that everyone says are sol…

I do a lot of "creative" work in Excel too. Finance/business stuff where the shape of the problem itself is ill-defined. It's a whiteboard, not a "programming language" -- nothing that isn't visible will ever happen; nothing is programmed.

----

I had to write codes for my dissertation in Matlab because that's what my advisor knew. Matlab is popular in research because so many ideas are already whiteboarded in matrix formalisms. I feel like Python is like this, but for object-oriented programming: rewriting my dissertation codes in Python gives me uglier code because of numpy, but it's easier to package it in such a way that it can be reused and extended. (I.e. it's not its mathematical nature, it's "parameterizable encapsulation". This is even better seen in something like Flask).

I think you're saying that Python isn't great at procedural programming. I disagree -- the syntax is simple and it's there -- it's just that not a lot of relevant open source projects rely on a procedural style. Contrast: Python isn't great at functional programming; it's very hard to express ideas like functors and monads.

Re: Show HN: An Easy Programming Language That Runs in the Browser

#82

Earlier quoted context omitted.

https://xkcd.com/1987/ Don't get me wrong, I like Python. If you're a non-programmer and you want to start programming, and you want to be useful and to be able to automate stuff quickly, you should learn Python. Especially where math and statistics stuff is concerned -- I have a friend who recently started programming, and Python was his entry point. Unfortunately, the environment problems that everyone says are sol…

I do a lot of "creative" work in Excel too. Finance/business stuff where the shape of the problem itself is ill-defined. It's a whiteboard, not a "programming language" -- nothing that isn't visible will ever happen; nothing is programmed. ---- I had to write codes for my dissertation in Matlab because that's what my advisor knew. Matlab is popular in research because so many ideas are already whiteboarded in matrix…

> I think you're saying that Python isn't great at procedural programming.

No, I'm saying it has weaknesses as a first programming language for beginners. Of course Python is practical, that's why it's so insanely popular.

The reason my friend went back to Excel wasn't because of a weakness in how Python is structured or what types of programs you can write in it. He left it because he didn't like needing to look up how to do things, or look to see what library supported what function. Excel is limited and inflexible, but he knows the "API" by heart, so when he's doing something creative, he's spending more time thinking in depth about the concepts he already knows, and less time learning new concepts.

Python is just big. There's a lot of it. There are multiple ways to do everything. That's good, and I like that about the language. But it's also kind of bad. You can ignore a lot of it, but that takes effort and it limits what resources/tutorials you can look at online. Being able to grab someone else's code off the Internet and learn from it or change it for your own projects is nice. But if you want to do that for Python, you need to be good at the language first.

That's what I think the strength of very small languages are. You can hold them entirely in your head without too much effort, so as a beginner you're able to spend more time applying them, which is often the fun part of programming for a beginner anyway.

Re: Show HN: An Easy Programming Language That Runs in the Browser

#83

Earlier quoted context omitted.

That sounds similar to Wirth’s Law. In general the more efficient a computer’s hardware is, the more bloated its software will be, so the slower the whole system will run.

While certainly related, I think GP was suggesting more that the same idea also applies to ease of development rather than raw hardware power.

I think that the raw-hardware-power aspect is actually a special case of ease of development - in that case, it's the ease of not having to think about low-level consequences of your abstractions or spend effort on optimizing your code!

Re: Show HN: An Easy Programming Language That Runs in the Browser

#84
post #79
post #30

Earlier quoted context omitted.

`end` as block delimiter makes much noise. Python code looks clean because it only uses indentations to delimit blocks. But this makes it at least difficult to refactor the code and to reformat it automatically.

I agree with the parent, but for visual reasons: I think the dot is easily missed/forgotten when quickly glancing at your code, and that there is a visual imbalance between a 5 character starting statement (while) and a single character to end the block (the dot likely being the tiniest character available on top). Just my 2c

You do not have to see it, you can see the indentation anyway. The dot is only for the parser (code formatter).

Re: Show HN: An Easy Programming Language That Runs in the Browser

#85
post #8

I think there's more value to be had in building better learning resources around programming languages than continually trying to simplify them at the expense of power. Besides that, if someone is already looking for a simple scripting language, Lua already exists. I personally prefer its syntax as well.

Lua might have little features and have a small footprint, but it's not simple to understand

Lua was made specially for non programmers. I think it is really intuitive and easy. I agree with the comment that perhaps understanding optmisation details is hard. But that's hard in every language.

Re: Show HN: An Easy Programming Language That Runs in the Browser

#86

Earlier quoted context omitted.

I do a lot of "creative" work in Excel too. Finance/business stuff where the shape of the problem itself is ill-defined. It's a whiteboard, not a "programming language" -- nothing that isn't visible will ever happen; nothing is programmed. ---- I had to write codes for my dissertation in Matlab because that's what my advisor knew. Matlab is popular in research because so many ideas are already whiteboarded in matrix…

> I think you're saying that Python isn't great at procedural programming. No, I'm saying it has weaknesses as a first programming language for beginners. Of course Python is practical, that's why it's so insanely popular. The reason my friend went back to Excel wasn't because of a weakness in how Python is structured or what types of programs you can write in it. He left it because he didn't like needing to look up…

Yeah, but your examples (TI Basic, Pico8) all imply that a first programming language has to follow a procedural style.

There's no reason whatsoever it should be so. I knew some odds and ends before college but had my introduction to programming with a SICP-like (but much simpler, I wasn't a CS major at MIT) course in Scheme that was taught by the creator of Lua. Like SICP, it emphasized a "compositional", mostly functional style. The next course was data structures in C.

So of course, a "First Course in Programming with Python" will be nothing like a "First Course in Programming with ZX Basic" (which yeah, encouraged you to peek and poke into memory directly, etc). A "First Course in Programming with Haskell" will be even more different. But some may argue that those who have cut their teeth on Haskell are better prepared for anything.

At any rate -- Haskell is really difficult but Scheme was until recently pretty popular.

Re: Show HN: An Easy Programming Language That Runs in the Browser

#87

Earlier quoted context omitted.

> I think you're saying that Python isn't great at procedural programming. No, I'm saying it has weaknesses as a first programming language for beginners. Of course Python is practical, that's why it's so insanely popular. The reason my friend went back to Excel wasn't because of a weakness in how Python is structured or what types of programs you can write in it. He left it because he didn't like needing to look up…

Yeah, but your examples (TI Basic, Pico8) all imply that a first programming language has to follow a procedural style. There's no reason whatsoever it should be so. I knew some odds and ends before college but had my introduction to programming with a SICP-like (but much simpler, I wasn't a CS major at MIT) course in Scheme that was taught by the creator of Lua. Like SICP, it emphasized a "compositional", mostly fun…

It's not about procedural programming -- it's about the size of the language.

If you know of a functional language who's entire manual and standard library can fit on 2 or 3 sheets of paper, then fine, use that. But Python certainly isn't that language. Neither is Javascript. Neither is Haskell.

Doesn't mean you can't start on it. Heck, one of my very early languages was C++. But that doesn't mean it's beginner-friendly. Remember, I'm not talking about what your first programming class in college or high-school would be. I'm talking about, "can you sit down over a weekend with zero programming knowledge and end up with at least a basic understanding of how the entire language and runtime works?"

Scheme... yeah, I guess I can see Scheme being OK. But you're really missing the entire point of what I'm saying. The reason I brought up Excel in the first place was to drive home that how good the system is overall for practical, real-world purposes does not matter.

I bring up examples like TI Basic because if you want to teach someone TI Basic, you can hand them just a calculator and then give them one HTML file (https://www.ticalc.org/programming/columns/83plus-bas/cherny...) and that's it. You're done. They'll be able to figure out the rest.

TI Basic is a fantastically designed beginner language. Not because it's procedural. Because it introduces a small number of concepts that force the user to be creative and encourage them to organically discover more advanced topics on their own without an internet tutorial. It's fantastic because it's so small that even a beginner can look at any other example program on the web, even if written by an expert, and generally speaking know what it's doing.

Re: Show HN: An Easy Programming Language That Runs in the Browser

#88

Earlier quoted context omitted.

While certainly related, I think GP was suggesting more that the same idea also applies to ease of development rather than raw hardware power.

I think that the raw-hardware-power aspect is actually a special case of ease of development - in that case, it's the ease of not having to think about low-level consequences of your abstractions or spend effort on optimizing your code!

Fair point!

Re: Show HN: An Easy Programming Language That Runs in the Browser

#89

Earlier quoted context omitted.

I have found that immutability is actually simpler to understand (and, potentially related, results in fewer bugs per LOC written), it's just that everyone's (including mine!) first language is usually procedural/mutable so that seems to be what is "easy"

I can't fathom why you've been downvoted. I think you're absolutely correct: there's nothing "obvious" about either flavor. It's really clear, in hindsight, why we started out with mutability (and self-modifying code and all sorts of "crazy" bit-twiddling goodies from the age of hardware-specific software). But I don't think it takes too much imagination to envision a world in which immutability becomes the default,…

Now that RAM is relatively cheap and garbage collection algos are pretty decent, immutability should be the default, because it eliminates an entire class of bugs while enabling benefits like "easy" lock-free concurrency, etc.

Here's a project I'm excited about, I think it's the first fully-functional/immutable/declarative cross-platform GUI library in existence https://github.com/boydm/scenic Still pretty rudimentary but has made great strides in a year and the demo is pretty amazing (especially given how NOTORIOUSLY gui toolkits are typically OOP/procedural/mutable)

https://www.youtube.com/watch?v=1QNxLNMq3Uw

Boyd Multerer got famous via Xbox Live.

Re: Show HN: An Easy Programming Language That Runs in the Browser

#90
post #7

The original Javascript was intended as an easy language that runs in the browser. And so it was in 1996. In reality, it seems, a successful language that runs in the browser had no way around becoming a "full-blown" language, as opposed to "easy".

JavaScript still can be easy if you ignore the rest of the ecosystem. Thing is, sooner or later, at the very least you find yourself wanting something like lodash or jQuery[1]. Ironically, the latter also came into existence to make programming across different browsers simpler back in the bad old days (of not that long ago), and did an admirable job of that. Unfortunately jQuery, and similar libraries of the mid-nou…

A helpful resource: http://youmightnotneedjquery.com/
Post reply on HN