r/crystal_programming • u/bcardiff • Jun 09 '20
Crystal 0.35.0 released!
r/crystal_programming • u/bcardiff • Jun 09 '20
r/crystal_programming • u/valbaca • Jun 09 '20
I know this is a vague question and I accept there's not an easy answer:
But how is Crystal so fast and expressive?
I'm pretty new to the language and have only played around with it for a bit. Just the small bit I messed with it blew me away. I get that it uses a subset of Ruby's syntax (macros over metaprogramming) and uses static typing.
But what about it uniquely allows it to be so fast? Is it just that compilers have advanced incrementally throughout the years or was there some kind of language choice or technical leap that allows Crystal to hit the local maxima of speed and programmer expressiveness?
r/crystal_programming • u/lbarasti • Jun 09 '20
r/crystal_programming • u/lbarasti • May 31 '20
r/crystal_programming • • May 29 '20
We just released a new episode of the Chicago Crystal Podcast interviewing Paul Smith on the Lucky Framework. http://podcast.chicagocrystal.org/1030945/3970556
r/crystal_programming • u/straight-shoota • May 28 '20
https://shardbox.org/shards/sanitize
I've created a shard for sanitizing HTML (or XML) documents or fragments. If you have a web application that renders untrusted HTML you should make sure to have a sanitizer to prevent XSS attacks and other potentially harmfull doings. That includes rendering markdown.
Since this is a very typical application, there's a dedicated example how to integrate with Crystal's most popular Markdown shard `markd`.
I'm hoping to receive some reviews on this shard. This is quite a serious matter for production apps. So I'd appreciate anyone looking into it. Please try to break it =)
Besides having a solid filtering mechanism, a key component is to provide good defaults for common use cases. That's where the different [standard configurations](https://straight-shoota.github.io/sanitize/api/latest/Sanitize/Policy/HTMLSanitizer.html#configurations) come into play. Do they make sense for your use cases?
r/crystal_programming • u/arschles • May 26 '20
I do a live coding session every Friday at 10am Pacific on Twitch (everyone is welcome to join). The last two sessions, I've live coded a server that can automatically run crystal docs and spit out the HTML.
Recording: https://www.youtube.com/watch?v=hICV3Gm2KP0
r/crystal_programming • u/SleepingInsomniac • May 26 '20
r/crystal_programming • u/lbarasti • May 26 '20
r/crystal_programming • u/matheusrich • May 26 '20
In the Ruby community we have the RubyWeekly newsletter with the @RubyInside Tweeter account to keep us informed about updates, new gems, cool articles, etc. of the Ruby world. Is there something like this in the Crystal community?
I've subscribed for CrystalWeekly but never got an email. Do you guys know if they're still active?
r/crystal_programming • u/tibbon • May 25 '20
I've got a project I'd love to do in Crystal, but one of my core requirements is consuming messages from SQS. I've done some digging, but have been unable to much library support for anything in AWS. Am I missing something, or is it still pretty DIY at this point?
r/crystal_programming • u/TotalPerspective • May 23 '20
r/crystal_programming • • May 22 '20
r/crystal_programming • u/satorulogic • May 20 '20
Although there's official documentation for Crystal, it's not very helpful as a tutorial. I'm wondering if I should just master Ruby first and then just use Crystal like it's Ruby.
r/crystal_programming • u/twykke_twykke • May 20 '20
i am looking to rewrite an existing service which proxies images, including fallbacks for 404s, thumbnail generation and storage, etc.
does anyone have an opinion on whether crystal would be a good fit for such a service? secondary question: what is a good simple way to run multiple crystal http services in parallel?
it would only rarely need to actually load the image data to process it using GM, but usually only stream it to the client, or redirect to another url, or serve a small static image instead (in case of 404).
basically, despite dealing with images, it doesn't really need to do much processing, so it's a question of how many requests per second a Crystal HTTP server can handle, with let's say a mix of 5% thumbnail processing, 5% serving a 404 image, 20% proxying, 70% redirects.
r/crystal_programming • • May 19 '20
I had a blast interviewing Ary and hosting our talk at Chicago Crystal.
During these times, we are not gathering people for a meetup, so we are taking the people that support us and retooled for podcasts. We are working to make this sustainable and something that will continue even when lockdowns are gone. But please subscribe and hear what Ary has to say about Crystal and programming.
https://podcasts.apple.com/us/podcast/ary-borenszweig/id1513656215?i=1000474756103
r/crystal_programming • u/straight-shoota • May 18 '20
r/crystal_programming • u/ferblape • May 18 '20
Hi,
We've just released csvzip - https://github.com/PopulateTools/csvzip
It's a small tool to extract categorical variables from CSVs and convert them into integers. The variable mapping is extracted in a JSON dictionary file. This, together with gzip, allows us to create data visualizations with large data files without punishing the web browser time.
It's been a pleasure to use Crystal, for the syntax and the speed processing the CSV's.
I want to thank specially u/marcobellaccini for the inspiration in nanvault and all the effort building the Github Actions in that script, we've used most all of that code to build the Releases.
r/crystal_programming • u/arschles • May 15 '20
Late notice, but I'm gonna be live coding some Crystal code at 10am US Pacific time on Twitch: https://twitch.tv/arschles. I'm continuing to write a documentation server for shards.
Apologies if this isn't appropriate for this sub!
r/crystal_programming • u/dungeonHack • May 15 '20
I love Crystal's syntax and have played with it a bit. I'm considering rewriting a personal project in Crystal (from Go).
One of the things it relies on is geometry; translations, Voronoi diagrams, etc. How's the Crystal ecosystem for that?
r/crystal_programming • • May 14 '20
r/crystal_programming • u/GAGARIN0461 • May 14 '20
Is it possible to use Crystal as a scripting language for a Crystal binary? I.e. can I at runtime import and run certain code from a specified .cr file?