Readit News logoReadit News
JoshuaScript commented on How porting to TypeScript solved our API woes   executeprogram.com/blog/p... · Posted by u/mrbbk
cameronfraser · 6 years ago
How does one deal with remote data in typescript? I really like typescript, but not having any guarantees on the returned data is kind of frustrating.
JoshuaScript · 6 years ago
https://quicktype.io/ is a nice solution

Deleted Comment

Deleted Comment

Deleted Comment

Deleted Comment

JoshuaScript commented on Programming language ray tracing benchmarks project   github.com/niofis/raybenc... · Posted by u/jblindsay
JoshuaScript · 7 years ago
You should see a performance boost in the Haskell implementation by compiling with GHC's LLVM backend[0]. Another Haskell ray tracer ran 30 % faster than the native codegen this way[1].

[0]https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler...

[1]http://blog.llvm.org/2010/05/glasgow-haskell-compiler-and-ll...

JoshuaScript commented on Would you still pick Elixir in 2019?   github.com/dwyl/learn-eli... · Posted by u/kristerv
jondubois · 7 years ago
There are plenty of great, battle-tested frameworks and libraries in Node.js which help to leverage multiple cores but they just don't get as much hype.
JoshuaScript · 7 years ago
Are you mainly talking about clustering?
JoshuaScript commented on Ask HN: What technologies did you learn in 2018?    · Posted by u/vchernobyl
sam0x17 · 7 years ago
Gladly. I authored the gcf.cr tool (https://github.com/sam0x17/gcf.cr) to replace a number of lambda functions with crystal-based cloud functions for two startups I write code for. I also replaced our rather bloated rails app with a lean SPA (in vanilla js plus jquery, because I can't stand react) backed by a crystal-based API server. I also do a lot of image processing in crystal (I need to make some of it open source but haven't got around to it), and Google Cloud Functions has been fantastic for that.

As far as the language itself goes, I have tried Rust, Nim, Go, and D, and I find crystal vastly preferable to all of them, probably because I have a ruby and C/C++ background. I just wish windows support and parallelism would get finished already as I have some cross-platform desktop app aspirations that I would love to fulfill in crystal rather than something horrible and ugly like Electron/node.

I am also working on a crystal-like language (with a crystal-based LALR(1) compiler) called Nojs (or just No) that compiles to javascript and has restrictions that make static analysis easy enough that you can include exactly the code needed and nothing more (e.g. don't include unreachable code) for whatever web page you are on, instead of importing entire libraries everywhere. This is really great because the dynamic nature of js normally makes this impossible as it is impossible to tell whether you are about to eval something into existence, etc, or call a method based directly off the value of a string... I am also using crystal-style require statements as I am not a fan of Node.js's module setup -- I'd rather have a global namespace to pollute and monkey-patch when I want to, with the option of using modules like in crystal/ruby, and the ability to require anywhere and have it literally import the required code at that point in the file. I don't have it on a public github yet but stay tuned.

JoshuaScript · 7 years ago
I'm curious if there's anything in particular you prefer in Crystal over Nim. I'm considering both right now.

u/JoshuaScript

KarmaCake day52April 13, 2018View Original