3 ms·
Constructive Criticism: I could not find any code examples on the website within 3 minutes of searching, gave up, and left.
by Joboman555 8y ago
Constructive Criticism:
I could not find any code examples on the website within 3 minutes of searching, gave up, and left.
- kccqzy 8y agoApparently the code examples don't display with JavaScript turned off.
- nicklovescode 8y agoI had the same experience with JavaScript enabled
- markvangulik 8y agoIf you wouldn’t mind, please post a screenshot where you think an example is supposed to be displayed but isn’t. Or mail it to “mark” at the same address as the website.
- emmelaich 8y agoI persevered following the "Learn" link. Then went to the Github page. https://github.com/AvailLang/Avail/blob/master/distro/src/examples/Tutorial.avail/Hello%20World.avail https://github.com/AvailLang/Avail/blob/master/distro/src/ex... Not impressed tbh. Module "Hello World" Uses "Avail" Extends "Avail" = ( "keyword lexer" ) Entries "Greet" Body Method "Greet" is [ Print: "Hello, world!\n"; ];
- Sean1708 8y agoThere's a couple in this section[0] of the FAQ. I don't know whether it's because I'm too used to using traditional languages, but it does not look at all pleasant to write (IMO). Interesting idea though. [0]: http://www.availlang.org/about-avail/documentation/faq.html#q3 http://www.availlang.org/about-avail/documentation/faq.html#...
- klibertp 8y agoI have a blog post from a few years back with a sample, here: https://klibert.pl/posts/avail-and-articulate-programming.html https://klibert.pl/posts/avail-and-articulate-programming.ht... I'm pasting a link because I added on-hover popups explaining parts of the snippet, but here is the sample itself: Module "Hello World" Uses "Avail" Entries "Greet Router" Body Method "Greet Router" is [ socket ::= a client socket; target ::= a socket address from <192, 168, 1, 1> and 80; http_request ::= "GET / HTTP/1.1\n\n"→code points; Connect socket to target; Write http_request to socket; resp_bytes ::= read at most 440 bytes from socket; Print: "Router says: " ++ resp_bytes→string ++ "\n"; ];
- masklinn 8y agoThis looks like the result of a drug-and-alcohol-fueled unplanned pregnancy between COBOL and Ada.
- klibertp 8y agoYeah, plus a bit of APL - it's not visible in this snippet, but Avail uses a lot of strange unicode characters/symbols. The `→` in `resp_bytes→string` is one example, but there are many more symbols used: http://www.availlang.org/about-avail/documentation/unicode-cheat-sheet/index.html http://www.availlang.org/about-avail/documentation/unicode-c...
- markvangulik 8y agoIf you grab the development branch, you can use the modular lexers to make that a little bit clearer. If memory serves, “a socket address from <192, 168, 1, 1> and 80” can now be written “192.168.1.1:80”. Not because that syntax is designed into the language, but because the language is designed to allow an IPv4 lexer to be defined within the language. See distro/src/avail/Avail.avail/IO.avail/Address.avail:149 for the actual Avail code that lexes (produces tokens from module source) IPv4 addresses.
- deleted 8y ago[deleted]