[racket] Is racket suitable for such a project?
On Tue, Feb 18, 2014 at 05:44:36PM +0100, Tomasz Rola wrote:
> On Mon, 10 Feb 2014, Yuhao Dong wrote:
>
> > Hi,
> >
> > I'm trying to decide between Racket and Go on writing my onion-routing
> > system inspired by Tor. Basically, a network server, involving lots of
> > long-lived connections that often pass large amounts of data. The thing
> > needs to be super scalable; I often find that these servers, although
> > network servers, often become CPU-bound doing encryption and
> > encapsulation of protocols, so I do have experience that this is not
> > "premature optimization"!
> >
>
> [... many faults of Go-choice ...]
> [... many faults of Racket-choice ...]
>
> > Are there solutions to these problems? These aren't showstoppers by any
> > means, but could finally end my endless dilemma between the two langs :)
>
> For the reasons you wrote above, I wouldn't choose any of them.
>
> If you know C and or C++ very well, you could do this project in them.
> However, since this is networked code, there is a lot of stuff to
> remember, or you may later find many embarrasing security holes in your
> code. Besides, using certain C++ constructs (incorrectly or maybe even
> correctly sometimes) may lower your performance a lot.
>
> Of other languages mentioned by others, Erlang is perhaps a good choice
> but I don't know it at all, so I cannot comment. Ada doesn't look bad but
> I understand you may have either to go opensource or pay for
> Windows-capable compiler. In exchange you can proudly use "military-grade"
> language :-).
>
> Myself, I would also consider OCaml, mostly because I learn it myself and
> it may be the right middle ground - good compiler, high level, can do
> prototypes (AFAIK). I'm not sure how good it is wrt security holes in
> generated code.
>
> Java is out of the picture for me, because I know it well enough to
> dislike. Python is out, because while it looks good, I want to replace it
> with OCaml, so I wouldn't have a reason to write excess code. Haskell is
> out, because it feels too much like putting strangely shaped shoe on
> straight foot (and is not easy to optimize).
>
> All of the above is just MHO, so if you feel otherwise, don't bother about
> me, I am very subjective when it comes to choosing a language.
I'd stick one other language into the mix -- Modula 3. It's an
elegant systems language its main flaw it its Pascal-like syntax.
See its Wikipedia page for details and links. Ask questions on the
developer's mailing list.
The implementation team is currently getting it to run multicore; it
already runs single-core with software-managed multithreading.
But it does have a stop-the-world garbage collector. That's only a
problem if you use the garbage-collected heap and have tught real-time
constraints. There's also a non-collected heap (explicit allocatino
and freeing) in case garbage collection is too rich. I think there
are other non-default garbage collectors, but I'm really not sure.
It has a new code generator that generates C code in case you need
ultra-portability.
And, just in case there's confusion, it is *not* *at* *all* the same
language as Modula or Modula 2.
By the way, the languages I use if I want reliability and early bug
detection are Modula 3 and OCaml.
I use Scheme occasionally when I want to play with coding notation
a lot.
-- hendrik
>
> Regards,
> Tomasz Rola
>
> --
> ** A C programmer asked whether computer had Buddha's nature. **
> ** As the answer, master did "rm -rif" on the programmer's home **
> ** directory. And then the C programmer became enlightened... **
> ** **
> ** Tomasz Rola mailto:tomasz_rola at bigfoot.com **
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users