DEV Community

Cover image for We created the Crystal language, ask us anything!
Matías García Isaía for Crystal Language

Posted on with Brian J. Cardiff and Martin Verzilli • Edited on

We created the Crystal language, ask us anything!

Hi there!

I'm Matias Garcia Isaia, and together with Brian Cardiff and Martin Verzilli, we're part of the Crystal Team working at Manas.Tech.

Manas.Tech is a software company from Buenos Aires, Argentina, that develops unconventional tech projects for people around the world. And, after being involved in Crystal's development for a while, I can assure you there are not that many conventional things in developing a programming language!

Crystal is a programming language that aims to be friendly for both humans and computers alike - make developers enjoy writing code, and make code run as efficiently as it can. Statically typed, compiled language with a really heavy type inference to make it feel as scripting - the best of both worlds. And did I say it's open source?

Its first commit has just turned 5, and it has changed from an individual's hobby back then into an amazing language supported by Manas.Tech and an amazing community. To celebrate that, we are doing this AMA. Starting today, at 2PM EST, we'll do our best to share with you everything we know about the project, life, the universe, and everything!

So - don't be shy, ask us anything!

Top comments (106)

Collapse
 
ivobalbaert profile image
ibalbaert

Could you give us some insights, visions and facts of the road of Crystal towards v 1.0 ? Such as:

  • what is the current view on the timeline?
  • what is the state of parallellization?
  • how is the Windows port going, what are the problems?

This is not to be critical, we want Crystal to succeed.

Collapse
 
nditada profile image
Nico

We have spent some time putting together an estimate for what’s pending for a 1.0 release that we could be proud of, an it comes to about 1.400 additional hours. At a pace of 2x the monthly hours we are currently covering with donations (~54hs) that means another extra 14 months which is way longer than what we want. We are trying to rally some other sponsors to shorten that time; it's looking positive for now, but we need a few more weeks to provide another update on that.

Parallelization is one of the main efforts for 1.0. We managed to run the multi-threading sieve of Eratosthenes sample with reasonable results on Linux and poor results in OS X.

Windows port is advancing thanks to the extended community, can't comment much else on that.

Collapse
 
dougeverly profile image
Doug

I wouldn't want Windows support to block 1.0! I think it would be important to get feature complete with 1.0, which, in turn, will expand the interest and base for Windows support.

Thread Thread
 
nditada profile image
Nico

Agreed. It's not blocking 1.0.

Collapse
 
ivobalbaert profile image
ibalbaert

Glad to hear that!

Collapse
 
paulcsmith profile image
Paul Smith • Edited

How important is compilation time to the team? My biggest worry is that speeds will become unbearably slow as a project gets bigger and bigger. What are your thoughts on this. Is it possible to make things faster, maybe via incremental compilation?

I love using Crystal. Thanks for all the hard work!

Collapse
 
mverzilli profile image
Martin Verzilli Crystal Language

It is very important, and one of the reasons we slowed down development. Our main concern is to get to a point where we know whether we'll have to make any breaking changes to the language to keep compilation times at a satisfactory level. That question is quite hard to answer without a formal specification of the language, but then again formal specification of the language is by itself a huge endeavor.

The good news is we haven't explored the solution space, we're confident that we can make it.

About incremental compilation, I'm not sure to what extent that will be possible without some "big change" to the language. Right now the "type inference magic" of Crystal depends on knowing all the source code ahead of time, and that makes it difficult to identify proper compilation units.

Collapse
 
tbodt profile image
tbodt

You could look at what Rust is doing with incremental compilation. They do type inference in a similar way (though less insane) and they've been working on getting incremental compilation for a few years now.

Thread Thread
 
mverzilli profile image
Martin Verzilli Crystal Language

We do a look a lot at Rust, not only regarding incremental compilation. We really like how they organized the community, for example. And given they also use LLVM, we sometimes can leverage some of their findings, tooling or advances, so if there's any member of the Rust team seeing this: thank you for being a source of inspiration :).

Collapse
 
paulcsmith profile image
Paul Smith • Edited

Thanks for the reply. I'm glad to hear it's a priority and that you're being careful about the language :+thumbsup:

Collapse
 
opensas profile image
opensas

I wonder if requiring all public api (input params and return types of every public method) of a file to be typed would allow incremental compilation. In that case, you could add a switch to the compiler to warn you of any typing required to allow incremental compilation. That way, if you want to speed up compilation, you could add the required type. Is it feasible?

Collapse
 
ben profile image
Ben Halpern

I imagine adoption isn't just about the technical details and Crystal has a really slick presence. How do you approach the branding/marketing elements of the whole thing? Like, who's job is this, how often do you meet about these kinds of things, etc.

Collapse
 
mverzilli profile image
Martin Verzilli Crystal Language

Apart from Crystal, at Manas.Tech we've been working on end-to-end projects for the last ~15 years. So we have some Graphics and Interaction designers we're very proud of in the team :). They designed the logo, fonts, branding, website and, yes, they programmed the famous spinning logo from scratch ;).

Collapse
 
watzon profile image
Chris Watson

And they did a spectacular job

Collapse
 
ben profile image
Ben Halpern

What are the most practical applications of crystal at the moment? We're a Ruby/Rails shop that could probably jump in and be comfortable using it quickly, but I don't immediately have a practical use case in mind. What's a good place to start making it a worthwhile environment to jump in to?

Collapse
 
kazzkiq profile image
Claudio Holanda Jr.

I've been using Crystal for microservices/REST APIs in the last two months. It actually fits pretty well with those kinds of applications. The code ended up smaller and more well structured than the Node.js version, and it actually runs 2x-5x faster, depending on the endpoint complexity.

AFAIK there are also some folks working on more complex stuff such as machine-learning and game engines using Crystal, so its probably a good contender for those tasks too.

Collapse
 
sdogruyol profile image
Serdar Dogruyol

You can use Kemal for building APIs and microservices. It's simple and fast. If you've ever used Sinatra before you'll feel right at home :)

P.S: I'm the author of Kemal.

Thread Thread
 
jvarness profile image
Jake Varness

Kemal is awesome! Makes creating services very easy! :) Kudos good sir!

Collapse
 
ben profile image
Ben Halpern

Cool, that could definitely be interesting.

Collapse
 
bcardiff profile image
Brian J. Cardiff Crystal Language

Compilers and command line tools are for sure good fits. But we have also create bots (slack / twilio / telegram), some other microservices and small web apps with some UI.

Comparing to Rails, there is for sure a lot things to cover. ORM and a smooth assets management would be my top 2 things that I would like to see solved / documented and avoid reinventing the wheel in order to start participating more in the web apps market.

Depending on your interest crystal could be good enough for game dev, using c libs in a more friendly way, and data science.

Collapse
 
bcardiff profile image
Brian J. Cardiff Crystal Language

Some things that bugs me a little bit in the language are:

  1. the lack of variance in generics.
  2. that some types can be expressed thanks to macros but not in the grammar (difference / substraction of types)
  3. that / should always be float division (instead of depending on the receiver/argument types).
  4. that the grammar type can't be blend with the language grammar.

So I am pretty happy with the language :-)

From the ecosystem, there are some stories to be improved in dependency management and development tools.

Collapse
 
drujensen profile image
Dru Jensen

Go (GC), Rust (ownership model) and Swift (ARC) have different strategies for handling parallelism and memory management. Node and the Javascript community have been promoting immutability and functional programming.

Can you discuss Crystal's approach to solving this problem and some of the advantages/pitfalls that we may encounter using it?

Collapse
 
bcardiff profile image
Brian J. Cardiff Crystal Language • Edited

I don't see the GC going away. It could change the which GC is used though.
Regarding parallelism, currently, something that could happen is to go something more like Ruby's Guild and do runtime checks. And it would be great to have some built in constructs for some well-known patterns.

Doing runtime would add some overhead to the operations. That is something to try to minimize.

As I see it Crystal's goals is the type safety, type inference and syntax. I am not confident enough to innovate with something like rust ownership model. I still lack the rust experience I would like to compare that.

Collapse
 
niko profile image
Niko 👩🏾‍💻

Could you tell me more about your community, your resources for it look incredibly robust. How did it grow in the many branches it is now ( reddit, chatroom, repo, etc) and how do you manage it? Also in hindsight how would you suggest a newbie go about creating a language and growing a community around a new lang go about it?

Collapse
 
mverzilli profile image
Martin Verzilli Crystal Language

Hey community, if you're reading this:

  1. You're awesome, thank you!
  2. Feel free to chime in.

Honestly, it just sort of happened. I think we never imagined Crystal would make it this far. It started as an experiment to see what compiled Ruby would look like. The next thing we knew there were a few people crazy enough to try it and report issues. One day someone posted it to Reddit and people got interested. Step by step.

From time to time someone from the community says "hey, it'd be cool to have X, would you mind if I do it?" and we're like "Yes, go for it!". Then if the thing picks up steam we link it from the official site. I think that happened with reddit, the chatroom, gitter, etc.

For example, recently a group of crystallers joined forces and created github.com/crystal-lang-tools to tackle all editor support projects under the same umbrella. They let us know and we transferred our Sublime plugin. That's great because we currently have more on our plates than we can manage!

Collapse
 
sdogruyol profile image
Serdar Dogruyol

"a few people crazy enough" that makes big difference :)

Thread Thread
 
mortezakcode profile image
morteza jahangard

selamlar abi , abi senin haberin var mi bunlar ne zaman windows ichin bir shey'ler yapacaklar ? ya ELIXIR teamiyle koshushtuk bize buyuk destek oldular ve baazi ishlerimizi elixir'le yaptik amma bunlara ne kadar email falan atiyorum konushuyorum hich bir shey soylemiyorlar ve belli ki 2025 ancak bunlar windows ichin bir sheyler verir ! windows 10 da kullana bilmiyoruz ve bu beni childiriyor ! benim bildighim kadar sen KEMAL'i yazansin sende luft et bunlardan bir konush sor ne zaman bunlar windows ichin bir shey yapacak ?

Collapse
 
niko profile image
Niko 👩🏾‍💻

Thanks for sharing the organic nature of this sounds super fun. Would you say that Crystal is beginner friendly regarding Open Source Contributions?

Thread Thread
 
sdogruyol profile image
Serdar Dogruyol

It definitely is! We are a small yet really friendly community which is always open for everyone.

Please feel free to join our Gitter channel gitter.im/crystal-lang/crystal :)

Thread Thread
 
niko profile image
Niko 👩🏾‍💻

Thanks Serdar, will do. I've been looking for a friendly Open Source community to get involved with.

Collapse
 
bcardiff profile image
Brian J. Cardiff Crystal Language

I don't think a single person could handle all the community channels and communications.

There are some of us (in the whole community) that are more skilled and eager to share, curate and prepare content.
For a management perspective he have some hooks into Slack to avoid constant querying all the channels. But that is the smallest part.

First we have a website, some docs people and read, then we added the mailing list as a way to users reach us and start conversating (besides from github). But then IRC emerged and @jhass created a service to cross post to Gitter. A Slack was also created, but IRC+Gitter worked better for here.

Some people like to spend and collaborate there a lot in the chat <3
I think that constant conversation & sharing in that channel is important to a community. Yet, is not always easy. Serdar and Matias do great job in the community nowadays #Kudos.

An online playground and a share code service (even a basic one) is agreat resource.

As with any open source project there is a challenge (and joy) in trusting people with who you will be able to delegate and even share resposibilities.

Tips: Start little by little. Do something is useful for you. Be patient.

Collapse
 
sdogruyol profile image
Serdar Dogruyol

Thank you Brian :) I'm just trying my best to share how awesome Crystal is with everyone!

Collapse
 
niko profile image
Niko 👩🏾‍💻

Thanks that's great advice!

Collapse
 
fridgerator profile image
Nick Franken

Has crystal approached any larger companies for support / backing ?

Collapse
 
nditada profile image
Nico

Yes, Manas.Tech, as host of Crystal, is approaching a few companies that are interested in seeing a 1.0 release for support. It's part of our plan to speed up that timeline.

Collapse
 
matiasgarciaisaia profile image
Matías García Isaía Crystal Language

Feel free to share the word if you know of any other one that could be interested in supporting!

Collapse
 
ragmaanir profile image
Ragmaanir
  • How many people are working on crystal? How much time do they spend?
  • What are in your opinion currently the biggest problems with crystal?
  • How can others support the project?
  • What are the next three big obstacles you want to tackle / goals to achieve?
Collapse
 
nditada profile image
Nico

In the Manas.Tech team there are around 5 or 6 devs pretty involved, but their dedication fluctuates. We try to spend at least 2 or 3 times the amount of hours funded by through Bountysource, but some months we accumulate budget in order to have longer sprints. On top of that there are 3 other core team members outside Manas.Tech that spend time depending on their personal circumstances. The same goes for the larger community.

The main non-technical challenge right now is finding a sustainable way to fund (at least partially) the effort to complete 1.0. You can help by spreading the word and/or chipping in.

The main technical goals for 1.0 are multi-threading, better debugging tools, modules and generics.

Collapse
 
vegai profile image
Vesa Kaihlavirta

How many people are there in the core team? What does the core team think about the biggest hurdles before 1.0?

Collapse
 
nditada profile image
Nico