4 ms·
I've been enjoying learning some new niche languages over the past year, Nim and V, using my favorite types of hobby projects to do so. I started learning Nim
by yardshop 5y ago
I've been enjoying learning some new niche languages over the past year, Nim and V, using my favorite types of hobby projects to do so.
I started learning Nim a few years ago, and came back to it last year after seeing it had improved in a number of areas. I started working on a practical utility, a self-contained document uploader system that could be customized for certain departments at work. Eg, take a Word document, convert it to PDF, upload to a specific location on our company website. Not truly a hobby project, but no one asked me for it, just playing with an idea I came up with based on frequent help desk tickets I get. I guess one of my hobbies is inventing programs that someone might find useful, without having an actual target audience. 8]
Since then I have written a handful of graphics programs in Nim which are more in my hobby area. I wrote a nice version of the Reaction Diffusion simulation that generates fascinating tile patterns and naturalistic forms. I also plan to make a version of Pickover popcorn.
More recently I started working with the V programming language and have been playing with the Mandelbrot example they provide. I added a 256-color palette, higher iteration options for more detailed images, and am working on a system to create a catalog of favorite points and images. It will also save and load simple text files describing a particular point and zoom level that people could share in a chat or text message. This kind of thing has all been done before, but these are just exercises in fundamental aspects of the language to help me learn the basics and determine if it's worth pursuing it further.
I am playing with these languages particularly because they make smallish executable programs that can be easily distributed. I'm working up to developing simple GUI CRUDs with them to see how practical the process is. I'm still looking for something that will replace what I used to do with Delphi.
- ihateolives 5y agoIf you used to use Delphi then why not use freepascal and Lazarus? Seems like an ideal match for your needs.
- yardshop 5y agoI started with them a couple times, and will try again. The first time, after several years of working with Python, I missed the dynamic data structures like lists and dictionaries. Open arrays work pretty well, but Pascal still requires a lot of overhead to set things up compared to `d = {}`. The next time I got a bit further with it, but I remember everything being just slightly different enough that I had to dig for examples and documentation to do simple things I used to do easily in Delphi. I think I got some of my old graphics programs working but there was enough friction that I lost interest and moved on. But its worth giving it another shot since I have a lot of old Pascal code I'd like to play with again, and knowing about these difficulties going in I might do a better job next time. What I like about Nim is the terse syntax similar to Python, and the more dynamic data structures like sequence, but also the typing similar to Pascal and the compiling to executable thanks to C. I like the V language too for its batteries-included nature, but haven't gotten far enough with it yet to tell if I will stick with it. The docs are a good start, but they only have Discord for a community and that is hard to work with.