Re:Blech Programming Language
by neurotrace on Friday September 18, 2020 @09:15AM
(#24516323)
Why is it so difficult to find example code? The very first thing that every programming language website should show is an example. Show me what sets your language apart from the others and let me see if I like the syntax.
[ Parent
| on HN ]
I thought I'd reply to this with a more direct link to the examples, but ... you're not wrong at all, even after a bunch of navigation through the documentation I cannot find a single self-contained program. There are some one- or two-line examples that give it a little flavour, but nothing significant. The full program examples are zipped up and I'm not going to bother to download those.
Re:Blech Programming Language
by ReactiveJelly on Friday September 18, 2020 @10:57AM
(#24517568)
> The full program examples are zipped up and I'm not going to bother to download those.
They could at least link to a Git repo.
When I click on the GitHub icon on "Download" it doesn't take me to GitHub.
When I click on "Contributing to Blech" the page is empty.
A repo with a README.md and bare uncommented source code would be more useful.
Re:Blech Programming Language
by turbinerneiter on Friday September 18, 2020 @11:04AM
(#24517662)
Here: https://www.blech-lang.org/docs/examples/ - there are three examples in the form of GitHub repos:
https://github.com/frameworklabs/blinker
Re:Blech Programming Language
by gkfasdfasdf on Friday September 18, 2020 @09:46AM
(#24516697)
I finally found a few samples in the pdf tutorials. Agree putting some code samples front and center would be nice.
Some code samples can be found in `test/blechc/codegeneration`, I guess they serve as compiler test cases.
Re:Blech Programming Language
by eternalban on Friday September 18, 2020 @10:25AM
(#24517163)
This is likely a generational/cultural issue. Blech documentation seems comprehensive, and those who prefer reading specifications will have no problem with it.
That said, they also do give fairly comprehensive set of examples: https://www.blech-lang.org/docs/examples/
Looking at a 270+ loc example called 'virtualSafeLock.blc', picking a random initial example. (It's a pain, you have to unzip code archives, but it's there.)
Re:Blech Programming Language
by ReactiveJelly on Friday September 18, 2020 @11:01AM
(#24517630)
It's not cultural that if you generate static HTML with syntax-highlighted code, the viewer only has to click once, whereas a zip file requires 3 or 4 clicks, plus filesystem namespace, for an un-highlighted version.
If you want 100 people to view your website, isn't it fair to spend 50x of your own time as you can save of the viewer's time?
Re:Blech Programming Language
by eternalban on Friday September 18, 2020 @12:13PM
(#24518612)
If I am shopping around for an embedded systems language, I am more interested in reading about the runtime, any limitations, and the language spec. Technical considerations are top of the list. Thus "cultural".
Re:Blech Programming Language
by turbinerneiter on Friday September 18, 2020 @11:09AM
(#24517732)
Maybe they don't want people who refuse to spend 5 minutes on reading the docs, where they would find 3 complete, runnable examples.
Re:Blech Programming Language
by throwaway33339 on Friday September 18, 2020 @11:23AM
(#24517934)
Ah, this is what exclusive by design really means.