7 ms·
Awk driven IoT
- DroidX86 9y agoThis is awesome!
- deleted 9y ago[deleted]
- bcook 9y agoWhy, exactly?
- Annatar 9y agoBecause it's using a 41 year old language which has ultra low memory requirements, no dependencies and runs like a bandit, on internet of things. (And can be compiled to machine code by using Awka.) In Bryan Cantrill's (paraphrased) words: "let there be an orgy of AWK one-liners!" (Or even better, entire applications written in AWK, since the language is perfect for dynamically generating web applications.)
- Blackthorn 9y agoTo give the parent the benefit of the doubt, I think the point he was making was less "this isn't awesome" and more "explain why you think it's awesome, don't just place your upvote in the form of a comment".
- bcook 9y agoThank you. I expected that my addition of "exactly" would help, but honestly, my post was rather lazy.
- deleted 9y ago[deleted]
- technofiend 9y agoAwk is pretty awesome - certainly one of my first loves. As I often do when it comes up in an HN thread if anyone has the artwork or is willing to scan said artwork of the infamous Bell Labs T-shirt I would be eternally grateful. It emphasizes the one weak point of AWK which is debugging. The shirt shows a gangly bird parachuting out of an airplane and reads "Awk bailing out near line 1" The original as referenced here - ftp://minnie.tuhs.org/UnixArchive/Documentation/Books/Life_with_Unix.pdf - is no longer available as "The Independent UNIX Bookstore" no longer exists.
- coliveira 9y agogawk has a debugger: https://www.gnu.org/software/gawk/manual/html_node/Debugger.html https://www.gnu.org/software/gawk/manual/html_node/Debugger....
- quirkot 9y agoThis is going to be a Awk-world
- hilti 9y agoAwesome project! There's a company who developed a cute product around this type of technology. It's a bestselling toy in Germany. https://tonies.de https://tonies.de
- _pmf_ 9y ago> It's a bestselling toy in Germany. German here; never heard of it, but looks amazing for my daughter. Thanks for mentioning this!
- adrianN 9y agoTape cassettes are a dime a dozen whereas you pay 15€ for a story tonie. Inserting a cassette and pressing play is also not too difficult for a child.
- hilti 9y agoThat's true and I was really concerned about that pricing, too. What I like about the Tonie: I need to travel a lot business wise and can use their app to record e.g. sounds of a city, songs I play on my guitar etc. and deliver them to my kids Tonie. Because it's connected to the home WiFi.
- hilti 9y agoMy kids love it and highly recommend it. I never heard of it before until last XMAS.
- Aissen 9y agoWow, op here, I had never heard about tonies ! It seems to be exactly the same concept, awesome ! It seems good ideas happen at the same time :-)
- gingerlime 9y agoReally cool project. I'm already using mpd on my rpi to play music (controlled with the iPhone mPod app). Would be cool to let my 3.5yr old boy play some songs he likes... But at his age, I need to think of a more advanced physical controller or remote (any suggestions?)
- netsharc 9y agoAmazon Dash is a one-button solution, if he can't press buttons yet you just need to hack it so another action triggers the "button press" event.
- azinman2 9y agoThey have like a 4 second latency, which would be tough for a child.
- gingerlime 9y agoBut how can he choose different tunes? Hope to find some kind of controller that's fun for him to use. ... and of course he can press a button :)
- netsharc 9y agoHave several dash buttons? Like in the article where each figure plays a different tune. Otherwise you'd have to macgyver a toy with giant buttons, build a Bluetooth device onto it that sends a different signal for each button.
- kronos29296 9y agoAwesome project in an awkward language. There I sed it.
- Jhsto 9y agoPlease don't submit puns which can be found in other comments already. In general, you should only comment if it brings something new to the discussion.
- ktta 9y ago>In general, you should only comment if it brings something new to the discussion. This has been said already, so should you be commenting this?
- Jhsto 9y agoYou are right, it would not make sense to reply now. But at the time of my reply, the user account was 44 days old and the comment was at the top of the submission. I presumed the user among other people were not aware of HN guidelines.
- ktta 9y agoMy comment was intended to say that just like your comment might be new to them, their comment will be new to many. So there's no need to police them. Everyone who signs up shouldn't have to look through all the popular comments of the past and then decide if they can comment or not. If it is annoying to you, downvote it. The fact that it was at the top should tell you that it is appreciated by many, so that comment isn't as well known as you might think.
- nprescott 9y agoI'm reminded of two other surprising uses of Awk -- "Awk for AI"[0] and "awk-raycaster"[1] I really like Awk as a language because it integrates so well with shell pipelines and it is incredibly small, while remaining high-level enough to be practical, which I think this project demonstrates quite well. [0]: https://web.archive.org/web/20140926113347/http://www.wra1th.plus.com:80/awk/awkfri.txt https://web.archive.org/web/20140926113347/http://www.wra1th... [1]: https://github.com/TheMozg/awk-raycaster https://github.com/TheMozg/awk-raycaster
- tannhaeuser 9y agoAwk is already well-known in embedded systems, eg. busybox implements a lot of POSIX using awk IMO. Also, awk syntax is clearly the predecessor of JavaScript. The following is both awk and JavaScript: function f(x) { my_array[1] = "whatever" my_array["a string"] = "something else" if (x in my_array) return my_array[x] } It's all there: the "in" operator, no need for semicolon as statement terminator, the "function" keyword, untypedness, regular expression constants, C-like curly braces, etc.
- chubot 9y agoYeah Awk and JavaScript have surprisingly similar syntax. But the semantics are very different. Here are some things I found when studying Awk a bit more: - Awk has no local variables! There is no "var". Believe it or not, people fake locals with unused function parameters. - Awk has no dict literals like d={}. And no function literals like f = function(x) { return x; } - Awk dicts can't be nested. You can't have something like: {key1: {key2: 123}} (using JS syntax) - Awk CAN accept dicts as parameters, but it CAN'T return them. "return d" is invalid. - Awk can't take functions as parameters OR return them. That is, no higher order functions. The latter three facts are basically consequences of the fact that Awk has no garbage collection. It has a strict stack discipline and no nested compound data structures.
- tannhaeuser 9y agoYes, and another difference is the use of 1-based string indexes, as opposed to 0-based string indexes in JavaScript. Even though I started with C many years ago (where 0-based string indexes are there for a reason, unlike in Java and JavaScript IMHO), I found 1-based string index semantics to allow much more compact and idiomatic expressions for typical string massaging tasks.
- stephengillie 9y agoAdd in dollar signs before the variables and you very nearly have valid Powershell as well. >It's all there: the "in" operator, no need for semicolon as statement terminator, the "function" keyword, untypedness, regular expression constants, C-like curly braces, etc At some point, these polyglots must merge. It makes no sense to have arbitrary particles be the only distinction between languages.
- staticvar 9y agoLove it! I worked on a research project where we built a lot of CLIs to pull data form a sensor, send it over a Unix Pipe to a push CLI for a database. It offers some fun flexibility and really fast implementations. http://openpipekit.github.io/ http://openpipekit.github.io/
- srean 9y agoThe article mentions mawk which is one of the faster awks I know of. Then there is awka that compiles awk script to C. Do you know of other speed demons apart from these. I think cleaning up the language by removing some of the one-off constructs and making it more regular (npi) could make faster implementations possible. An embeddable/extendable awk that exploits simd and multicore could potentially lift a lot of weight. I wish awk had more mind share than it does these days.
- js2 9y agoSomewhat gratuitous use of awk. It could be bash driven IoT: ... | while read -r line; do file= case "$line" in *"03 52 c1 1a"*) echo "file1 "; file="file1.mp3" ;; esac if test -n "$file"; then mpg321 -q "$file" & fi done
- thisrod 9y agoI've been using AWK for decades, but the NFC avatars are new to me. Has anyone started a business where you send in some photos, or sit for a sculptor, then they 3D print a set of NFC caricatures for you? I imagine it would be fairly easy to do, especially if the sculpture tutor at your local art school was willing to help with hiring.
- fundabulousrIII 9y agoNow really do an inet aware interface with (g)awk: https://www.gnu.org/software/gawk/manual/gawkinet/html_node/ https://www.gnu.org/software/gawk/manual/gawkinet/html_node/.