Hexd wrote:
Melancholy wrote:
Backlash wrote:
I'm kinda interested as to what else this "2lewd" is gonna entail.
2lewd is Lewd rewritten in crystal.
Thats cool. Why did you decide on Crystal? also how far is it from being useable and what the reason on a rewrite? seems like lewd has almost everything needed and looks hella sexy
I chose crystal, because honestly it's my favourite langauge. My favourite langauge used to be ruby, because i just liked the syntax and the community and the expressiveness/productivity. Crystal is just on a whole new level. It's ruby but faster, safer (really helps productivity), cleaned up with no need for backwards-compatibility and the community on IRC is just awesome. I basically convinced senpai to let me rewrite lewd in crystal, and he agreed to help too.
Crystal definitely isn't exactly production ready, mostly because breaking changes occur in every major release (0.15.x -> 0.16.x). THis and the pace of releases make it hard for teams to handle keeping up with the langauge. But for small projects, with small teams it's more than stable enough, and there's quite a few shards (crystal's version of gems (which is ruby's nickname for libraries)). Another point is that it's not yet working on windows, but thats isn't a problem for either me or senpai ebcause senpai runs osx and I run linux.
Me and senpai wanted to rewrite lewd for two reasons: performance and maintainability. To be honest, php is kinda shit. Crystal, being a compiled langauge can serve pages in about 1ms with no caching, while the current PHP lewd takes about 150-400ms per page. And thats with caching. Unfortunately due to the architecture of php it's quite slow, although we're running php7 which is a great improvement. Although performance was the initial motivating factor, I like to think that maintainability is the main reason. After writing all the code of a site yourself, you really get to know how it works and how to fix it or add new features quick. Plus mybb is old and has a lot of features we truly don't need, which we can cut out to help with performance. New techniques such as JSON Web Tokens also decrease the number of database queries needed to serve a request. Also postgres is love, postgres is life. Also rewriting templates from scratch helps to remove messiness.
So, there's lots of reasons why we are trying to rewrite, and why crystal is a good langauge to rewrite in. It's not 100% we'll ever complete the project, but we'll for sure try. It's for sure interesting to me!