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

I rarely have to do anything as low-level as rust would demand. More often than not I find myself using Python, but I had the same feelings when I started looking into rust a few weeks ago. It was exciting seeing the full pattern-matching, especially.

I have a desire to get some experience in the area, but the problem is what to make. Does anyone have any ideas for some smallish libraries that would benefit the community? I'm certainly not a networking or concurrency expert, so it's difficult to come up with ideas.




What kind of areas are you interested/experienced in? What would you like to learn? I'm sure there are tons of gaps out there that you could help fill. Maybe the folks on irc.mozilla.org #rust might be able to give you some ideas.


Thanks. I'll definitely try out irc for some ideas. My general projects are small automation tasks for myself as well as small web-based apps for myself and friends. That's part of why coming up with ideas for something like rust are a little tricky.

The only promising thought I've had is maybe implementing some sort of template preprocessor that I can find a way to work into an existing rust framework.


you might also like ocaml as a higher-level language with a lot of the same features.


Yes. Rust borrows quite a few things from the ML family of languages (and things unique to Haskell like "deriving"). OCaml has the advantage of offering very good performance while not having to deal with the borrow checker, but it doesn't have the momentum behind Rust (the community is quite small, and the number of libraries isn't that large). That said, it is a very nice language to work with, and offers a number of features absent from Rust, such as a great module system, structural typing, first-class laziness...


  > OCaml has the advantage of offering very good performance
  > while not having to deal with the borrow checker
My understanding was that OCaml had no support for parallelism -- so a single core is all you get. Is that not the case?


OCaml does have concurrency and parallelism support, but it has a GIL so their effectiveness is somewhat limited unless you go multiprocess.

I believe there are serious efforts towards removing the GIL these days.


No. It does support parallelism and concurrency.

The biggest issue is that the runtime still has a global lock, but it is in the process of being removed.


That's true, though through Lwt (and Core.Async) it has good support for concurrency. However, the work on the parallel runtime seems to progressing at a steady pace, so parallelism is coming.


Ah. Thanks for the info!


> but it doesn't have the momentum behind Rust (the community is quite small, and the number of libraries isn't that large)

How come, given the amount of use it gets in the industry and academia versus Rust that still hasn't reached 1.0?


That's a good question. I think F# and Haskell have stolen a fair amount of OCaml's thunder. Meanwhile, Rust caters to everybody who is tired of C/C++ (putting D in the same position as OCaml, I guess?), while having nice enough constructs that people coming from high-level languages get interested in it. By contrast, OCaml doesn't have the "shiny new" feeling of Rust (also suffers from other issues, such as its standard library/libraries, and the tooling, and the "mlis are documentation" attitude that is fairly prevalent in the community). I'd say with more polish and a lot of marketing, it could easily gain more market share (even though some things have gotten much better since opam).

Sometimes, working in OCaml feels like flying a starship equipped with XVIIIth century cannons. The awesomeness of many of its features is in stark contrast to the gaping holes of its ecosystem (no good INI parsing library in 2014? no usable pure OCaml regexp library?).


Does OCaml still doesn't compile 1.0 + 2.0 or has that changed?

Small stuff like this really bother some people and they fly off to Pythonland never to be seen again.


I guess it depends on the nature of the work being done.

Personally I never used Python for anything other than glorified shell scripts and Websphere installations (after Jacl got replaced by Jython).

For everything else I prefer languages with type inference and availability of native compilers (AOT/JIT) in their toolchains.

How good is PyPy for production code nowadays?


> How good is PyPy for production code nowadays?

Unless you are using CPython extensions, PyPy is usable as a drop-in replacement that's significantly faster in almost all cases. In order to notice any significant speed gain, the JIT needs a chance to "warm up" though, so on short running applications or on web applications for the first couple of requests PyPy can be slower than CPython.


> Does OCaml still doesn't compile 1.0 + 2.0 or has that changed?

I'm not quite sure what you mean? In any case, the compilation speed isn't really an issue (especially since we're talking about Rust, which last time I used it wasn't exactly fast).


He's probably referring to the fact that you have to use different arithmetic operators for int and float in OCaml, so it would have to be 1.0 +. 2.0


Ah, that makes sense. It's still the case, but I guess it may be going away once implicits are released.


I think he's talking about the fact that OCaml has separate operators for floating point (i.e. in his example, you'd use 1.0 +. 2.0).


Yep, that's <float><int><float> and doesn't typecheck since you missed it too, my point is made :)


Yeah. Honestly it's a quirk, but I prefer quirks going this way than the other way (like universal compare). That said, all languages have warts. And that's the best kind of warts, the one that is explicit and happens at compile-time.


Good point. And to be honest, OCaml was the first language I used to have insanely fast compile times - and a REPL!


I think most ML implementations still have poor support for unicode, and this is a killer feature for me.


I've been thinking about implementing fastcgi so that I could play with simple rust webapps. Haven't had time to start on it though, so if that sounds interesting you'd have at least one immediate user.


Instead of FastCGI just speak HTTP. And for those there are libraries already.


Or 0MQ to talk to Mongrel2.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: