While I'm picking up Rust, I really like the "rustlings" project that lets you exercise various parts of the language locally, instead of in a browser, so I can use the tools that I like. https://github.com/rust-lang/rustlings
Ask HN: What is the coding exercise you use to explore a new language?
31–40 of 73 posts
Re: Ask HN: What is the coding exercise you use to explore a new language?
#32To wit: https://littlegreenviper.com/series/swiftwater/
That series is almost abandoned, now, but it was instrumental, in my discovering how to write Swift.
This was one I wrote up, as I was exploring the SPM: https://littlegreenviper.com/series/spm/
Learning Bluetooth: https://littlegreenviper.com/series/bluetooth/
Writing a simple streaming server: https://littlegreenviper.com/series/streaming/
This was one that I wrote up, as I was learning CSS: https://littlegreenviper.com/series/stylist/
Re: Ask HN: What is the coding exercise you use to explore a new language?
#33I commonly build a name generator based on travesties or Markov chains. I can write a simple version of it in a few minutes in a familiar language, but it exercises file IO, some simple data structures, string operations, and some randomization. Gives me a good first general idea of what it will be like to work with a new language.
That's very helpful, close to what I was envisioning. Thank you.
It can also be fun, if your sense of humor responds to funny names, and if you choose the right inputs.
Re: Ask HN: What is the coding exercise you use to explore a new language?
#34IRC? That’s sounds familiar. :P
Re: Ask HN: What is the coding exercise you use to explore a new language?
#35I port L0pht’s hphack.c to every language I’m learning. It covers sockets, string handling, and byte handling.
Re: Ask HN: What is the coding exercise you use to explore a new language?
#36I write an L3 order book implementation, because I usually do quant trading.
Others might want to start with a simple REST webservice, a todo list, a CRUD application, solutions for Project Euler exercises, etc.
Re: Ask HN: What is the coding exercise you use to explore a new language?
#37I write a bittorrent node. It goes over many topics I'm interested in: potrntially low-level networking, storage, bits and bytes fiddling, concurrency. The protocol is shockingly simple, and the end result is both easily testable and actually useful.
Re: Ask HN: What is the coding exercise you use to explore a new language?
#38Re: Ask HN: What is the coding exercise you use to explore a new language?
#39Re: Ask HN: What is the coding exercise you use to explore a new language?
#40I like it because it’s kind of small, but tests several aspects of working in the language.
* the program needs support for several numeric types: integers, floats and rationals. * several basic math algorithms are needed, which will either test the std lib, how to use the package manager, or other language constructs as I pipeline implement them * how easy is it to write/run tests
Here’s one version in Rust, which links to clojure, cl versions. Want to try it with Julia next due to the built-in support for rationals.