Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've been able to use Racket to build an option trading application (https://github.com/evdubs/renegade-way). The included GUI and Plot libraries have been really nice to use.

With Racket, I miss having real threads and rich "batteries included" data structures as you'd find in Java and C#.



What do you mean by "real" threads? The Thread documentation says nothing about being real or unreal. https://docs.racket-lang.org/reference/eval-model.html#%28pa...


> Threads run concurrently, in the sense that one thread can preempt another without its cooperation, but threads currently all run on the same processor (i.e., the same underlying operating system process and thread).

By real threads, I mean the ability to spawn a thread in Racket that corresponds to a new underlying operating system thread for that Racket process. Just like you get when you spawn a thread in Java.


Racket places might be what you seek:

https://docs.racket-lang.org/reference/places.html


I want to share data structures built for handling concurrency between threads. I'm less interested in having to "share memory" by message passing between places. Plus, places are more clunky to use compared to Racket's `thread`.


Racket can spawn 'real' threads through the Chez low level API. The new database connection package does just that, for example.


Which data structures do you miss most?


Sorted data structures :)

[Balancing] Binary Search Trees as a standard that is available in many languages; B-Trees if memory locality is important; Skip Lists if there is data structure sharing between real threads and something like a Concurrent Balancing Binary Search Tree would have too much lock contention.

I have looked over the `data-red-black` library; I wish its interface was richer with `map`, `filter`, retrieving a range of values, partitioning/sliding over key-value pairs, and all the other generic sequence operations that hopefully Rhombus can enable for different underlying data structures.


Skip Lists: https://docs.racket-lang.org/data/skip-list.html

These functional red/black-trees have `map` and `filter`: https://docs.racket-lang.org/functional-data-structures/Red-...

AVL-trees: https://docs.racket-lang.org/avl/index.html

I would be surprised if someone hasn't made a B-tree implementation already.

As bonus: Another red/black-tree implementation (imperative): https://github.com/soegaard/little-helper/blob/master/planet...


evdubs how can this be run?



not really are there any scripts to install all this !




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: