4 ms·
I did the licensing server for Lunar (https://lunar.fyi/ https://lunar.fyi/) in Crystal. It’s been a joy to work with it! The standard library for working with
by alin23 5y ago
I did the licensing server for Lunar (https://lunar.fyi/ https://lunar.fyi/) in Crystal.
It’s been a joy to work with it! The standard library for working with strings, JSON, YAML and XML is top notch. Type safe and extremely fast, very important characteristics for a licensing server that is queried hundreds of times a second.
I used the super simple Kemal HTTP server library which I like for APIs where most of the logic happens on the backend.
I have 8 years of experience as a Python developer and 5 as a Swift developer but after all that time I still like the terseness and type inference of Crystal.
- bingo-bongo 5y agoCrystal is great! After ~10 years with Ruby, I decided to try out Crystal for my latest weird hobby project (a modern style bbs) and I have enjoyed it so much! Considering the relatively short lifespan of Crystal, I was positively surpriced how good the documentation was and how fast, easy and stable the language it already is :)
- ushakov 5y agoi love Crystal too! one downside for me is the development speed, compile time is definitely noticeable if you come from an interpreted language
- sundarurfriend 5y agoDid you know Ruby before learning Crystal? I've been looking into it on and off, but it seems the documentation is mostly written as an "on top of Ruby docs" thing, as in it seems to assume you mostly already know the Ruby way of doing things and mentions only where things are different. That makes it harder to figure things out in the language, having to search the Crystal docs and then Ruby docs and figure out which one applies where. (I mean this for the very basic syntax and semantics of the language, nothing fancy yet.)
- alin23 5y agoI didn’t know Ruby, and yes, some things had to be figured out through old Ruby knowledge. But that wasn’t as much of a barrier. Every language that gets a little creative will have these features that you probably never saw, have no idea what to do with them and when is a best practice to use them. Things like fibers, or the ways to do iteration without a for-loop, or the do…end closure syntax. They’re new and weird for non-Ruby devs, but they have their advantages, and you just have to try and use them a few times and they’ll become as common as your previous language.
- mathverse 5y agoCan I ask 2 questions? 1) Would you consider open sourcing the licensing server in Crystal? 2) What's your revenue with Lunar? :) Thanks!
- alin23 5y ago1. Yes, I’ve been working on generalizing the Lunar specific code for open sourcing it next month. Still WIP because I’m still getting busy with new monitor edge cases. Last month I’ve also found out about Keygen (https://keygen.sh/ https://keygen.sh/) which has a really nice offering, and I would have probably chosen it instead of building my own solution if I’d known about it. I’m concerned about uptime with my own solution, I don’t have the means to provide enough redundancy in case of a network or data center failure. 2. I’m earning about $3.5k per month on Lunar Pro licenses (on average, some months can be 5-6k, some 2k). Doing quality macOS apps is a nice market to be in. You get to do tools for your own usage and also share them with others for some side revenue. I’ve also created The low-tech guys (https://lowtechguys.com/ https://lowtechguys.com/) and each new app published there is also bringing about $200-$600 per month. Little by little, I’m hoping to get to a continuous revenue of $8k per month so I can build a home for my family and have more time to pursue my other hobbies (woodworking: https://reddit.com/r/DIY/comments/t1l4rk/_/hyhvjix/?context=1 https://reddit.com/r/DIY/comments/t1l4rk/_/hyhvjix/?context=...) and (instrumental music: https://soundcloud.app.goo.gl/Dv8AT2JgNWrzFtLa8 https://soundcloud.app.goo.gl/Dv8AT2JgNWrzFtLa8)
- mathverse 5y agoYou sir are a big inspiration to me! As someone also born in EE I can very much appreciate your courage and dedication doing a side gig like this. I would say 3500 a month is even a median salary for an IT position in WE. From your resume I take it you still work full time? I wonder if that's even worth it at this point unless you make a lot more from your FTE position. Anyway props!
- alin23 5y agoThank you for the kind words! I haven’t updated my resume for a while because I don’t have a job anymore and I’m serious about not having to get hired ever again. I’ve written about how I quit my job in March last year and started turning Lunar into a revenue generating project here: https://alinpanaitiu.com/blog/journey-to-ddc-on-m1-macs/ https://alinpanaitiu.com/blog/journey-to-ddc-on-m1-macs/ There’s a lot more info in the article that you might not be interested in though. For the 1 year anniversary of this decision I’m writing another article with everything I tried with Lunar and other apps in the last year. That might be more relevant because I’ll share user stats, real numbers on revenue, trial and error with paid advertising etc. Yes, $3.5k sounds pretty good for Eastern Europe, but the truth is that prices have also skyrocketed. I’ve been trying to get away from my current matchbox sized rented apartment and build a house with my wife. I’ve reached the conclusion that I need like $200k in savings to do it and I’m nowhere near that.
- packetlost 5y agoI recently tried out Crystal (on a project that went nowhere very quickly) and liked what I got out of it. However, I feel the language is very complex in terms of operators and language constructs and found myself quickly completely forgetting language features even exist. There's a balance somewhere of "neatly fitting in your head" and "too simple" and Crystal firmly falls in the former for me.
- alin23 5y agoYes, the language is definitely much more complex than I expected. I’m still getting the hang of some syntax choices like the `with … yield` and the myriad ways of using closures: https://crystal-lang.org/reference/1.3/syntax_and_semantics/blocks_and_procs.html#with-yield https://crystal-lang.org/reference/1.3/syntax_and_semantics/... But I really miss some of Crystal’s features in other languages I work with: 1. Being able to declare union types when ingesting some not-so-normalized data alias UserID = String | Int32 | UUID 2. Macros and meta-programming For example here I have a `storedprop` macro which I can use to define propertied that get saved automatically to a YAML config when they are changed: https://f.lunar.fyi/uRW69B/settings.cr https://f.lunar.fyi/uRW69B/settings.cr class Settings include YAML::Serializable storedprop host : String = "ddcutil-server.local" storedprop port : UInt16 = 3485 end The good thing is you’re not really required to learn this stuff if you don’t want. But they surely can make the language fit to your style better if you invest the time to understand them.