3 ms·
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 lang
by neurotrace 6y ago
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.
- rwmj 6y agoI 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.
- gkfasdfasdf 6y agoI finally found a few samples in the pdf tutorials. Agree putting some code samples front and center would be nice.
- sesm 6y agoSome code samples can be found in `test/blechc/codegeneration`, I guess they serve as compiler test cases.
- ReactiveJelly 6y ago> 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.
- turbinerneiter 6y agoHere: https://www.blech-lang.org/docs/examples/ https://www.blech-lang.org/docs/examples/ - there are three examples in the form of GitHub repos: https://github.com/frameworklabs/blinker https://github.com/frameworklabs/blinker https://github.com/frameworklabs/react https://github.com/frameworklabs/react https://github.com/mterber/blech-dcf77 https://github.com/mterber/blech-dcf77
- eternalban 6y agoThis 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/ 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.)
- ReactiveJelly 6y agoIt'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?
- turbinerneiter 6y agoMaybe they don't want people who refuse to spend 5 minutes on reading the docs, where they would find 3 complete, runnable examples.
- throwaway33339 6y agoAh, this is what exclusive by design really means.
- eternalban 6y agoIf 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".