Great episode, I highly recommend it to all interested in language runtime design.
https://signals-threads.simplecast.com/episodes/memory-manag...
462 karma · joined November 21, 2012
Great episode, I highly recommend it to all interested in language runtime design.
https://signals-threads.simplecast.com/episodes/memory-manag...
Article is from 2014. The "recent" CPUs they are discussing is the Sandy Bridge architecture launched in 2011.
See this discussion about the performance impact of LEA in Sandy Bridge: https://github.com/ocaml/ocaml/issues/6125#issuecomment-4729...
Jane Street's blog explains the reasoning in detail[0]
[0] https://blog.janestreet.com/what-is-gained-and-lost-with-63-...
We’re an independent development team inside The NORDAM Group building a brand new public web service. The aerospace industry we’re modernizing has yet to fully benefit from the data revolution. We pride ourselves on our “startup” approach: we leverage modern technologies and methodologies and we prefer results over tradition. By being a totally separate unit in a large corporation, we benefit from its support and extensive business network, without all the downsides that come with software development at larger companies.
Our product needs to handle information at scale, safely. We deal with items often worth tens of thousands of dollars or more. We do things the right way from the first time - cutting corners is not worth it in our case.
You know Ruby inside and out, both the pretty and the ugly. You can tell when a piece of code will be inefficient just by looking at it and you know how to optimize it. However, you are not married to any programming language and would welcome the opportunity to learn a new one on the job with open arms.
As an early dev hire, you will be in a unique position to work on virtually all aspects of our product and have a strong voice in product and technology strategy. This position is a great opportunity for a smart and ambitious developer to advance their career and have a major impact on a large, important and clean project
Contact me at simon.grondin@outlook.com and I'll put you in touch with the right people.
We’re an independent development team inside The NORDAM Group building a brand new public web service. The aerospace industry we’re modernizing has yet to fully benefit from the data revolution. We pride ourselves on our “startup” approach: we leverage modern technologies and methodologies and we prefer results over tradition. By being a totally separate unit in a large corporation, we benefit from its support and extensive business network, without all the downsides that come with software development at larger companies.
Our product needs to handle information at scale, safely. We deal with items often worth tens of thousands of dollars or more. We do things the right way from the first time - cutting corners is not worth it in our case.
You know Ruby inside and out, both the pretty and the ugly. You can tell when a piece of code will be inefficient just by looking at it and you know how to optimize it. However, you are not married to any programming language and would welcome the opportunity to learn a new one on the job with open arms.
As an early dev hire, you will be in a unique position to work on virtually all aspects of our product and have a strong voice in product and technology strategy. This position is a great opportunity for a smart and ambitious developer to advance their career and have a major impact on a large, important and clean project
Contact me at simon.grondin@outlook.com and I'll put you in touch with the right people.
- A complete paradigm shift. I want something that will force me to rethink how I approach problems. I want to force my brain to develop new pathways, so to speak.
- Something will at least a minimum of documentation and community online. I've had to abandon dreams of learning some really awesome language before (ATS) because there was simply no resources and that would make my progress too slow.
- Something that could be fun to use in a side project. I need to be able to find occasions to use it. I learn best by doing rather than by only reading. If I can't think of an application, then I won't be able to become proficient, so I'd rather learn something else.
- And finally, it has to be something fun that feels like falling in love with programming all over again.
EDIT: I usually don't pick more than 1 technology to REALLY LEARN per year, so I don't make these decisions lightly.
It's something I've been working on for quite a while, because I wanted to answer the question "Why do you like OCaml so much and why should I care?" once and for all. Hope you enjoy it.
Speaking of OCaml, all the traffic going to my blog is going through HARchiver [0], a very high performance proxy and reverse-proxy 100% written in OCaml that gathers datapoints for use with Mashape Analytics [1]. Disclaimer, I work at Mashape.
From a purely numbers perspective, its operations on integers have to use the LEA instruction instead of ADD (for example) because of the 1-bit tag, which slows things down a bit, but the speed at dealing with symblic code as I explained above more than makes up for it.
You can make OS level threads, but they can't be both running at the same time due to the GIL (Global Interpreter Lock). Then why are they even there you might ask? Because it allows you to do a blocking call on a thread and to keep executing other stuff in the main thread. Other languages that have a GIL (and the same restriction) are Javascript (including Node.js), Ruby and Python.
Now, IN PRACTICE, things are a bit different. You're never gonna make your own thread to block on things. You're gonna use Lwt to manage all your concurrency so you can do tons of blocking stuff at the same time and combine the tasks nicely without ending up in a Node.js-style "callback hell".
But still, even with tons of concurrency, you don't have parallelism. It's all you need for 98% of your programs, but if you then need to do heavy number-crunching it won't be enough. This is the exact same situation that happens in Node.js, Python, etc, except that OCaml is massively faster than those languages, so even some CPU-bound work is acceptable because OCaml is really performant.
Currently, there's 2 options if you wanna do CPU-bound work: you can use ctypes to call C code easily (from Lwt_preemptive) and then release the lock from within C with caml_release_runtime_system(), so your C code will be truly parallel (and running in the thread pool automatically managed by Lwt_preemptive), and you can call caml_acquire_runtime_system() before returning the result back to OCaml to get the lock back and merge back with the normal code.
The second option is to do an oldschool fork() and communicate with message-passing. Or have a master that manages workers and communicates with ZMQ, HTTP, TCP, IPC, etc. Or use a library that does it all for you like parmap, Async Parallel, etc etc.
What this "multicore support" means is that you'll be able to have threads in the same process that run in parallel because the GIL is going away. In practice it'll probably be implemented directly into Lwt so you'll be able to do something with Lwt_preemptive and just tell it to run some function in a separate thread and then use >>= to handle its result. It's gonna be simpler than both options I described above.
Again, more technical information is available in my r/ocaml post
in my original post in r/ocaml: https://www.reddit.com/r/ocaml/comments/36ninh/403_scheduled...
in the repost in r/programming: https://www.reddit.com/r/programming/comments/36ppx0/ocaml_4...