Live data from Hacker News

Rust in 2018: easier to use

jvns.ca

301–305 of 305 posts

Re: Rust in 2018: easier to use

#301
post #23

Earlier quoted context omitted.

I used OCaml a few years ago and I thought it was an excellent language. Despite being powerful it was really easy to learn. One thing that put me off in the end was that it didn't support native OS threads (I have the same problem with Racket). Has threading support improved over the years?

I tried it too; after I realized I that every struct had to have unique field names, I gave up. This was too much craziness for me, although I did think the module/functor concepts were very cool.

>I that every struct had to have unique field names

Nope, different structs could have fields named the same.

Re: Rust in 2018: easier to use

#302

Earlier quoted context omitted.

Did you define them exactly the same way? Every aspect has to be identical; extern, no mangle, function name, arguments, lang item. If this happens to be open source, I can take a look at it.

I just whipped this up yesterday to test if I was still having the same issues. Debug fails to build with a linking error "undefined reference to `_Unwind_Resume`". Release build works fine. I'm using rustc 1.25.0-nightly on Ubuntu 17.10 https://gist.github.com/jefftime/d7e96461138b5aa6895550b63ca...

The lang item symbol names need to be prefixed with rust_ like this: https://gist.github.com/steveklabnik/5abd59a8fe7e5abda3db58b...

Re: Rust in 2018: easier to use

#303

Earlier quoted context omitted.

I just whipped this up yesterday to test if I was still having the same issues. Debug fails to build with a linking error "undefined reference to `_Unwind_Resume`". Release build works fine. I'm using rustc 1.25.0-nightly on Ubuntu 17.10 https://gist.github.com/jefftime/d7e96461138b5aa6895550b63ca...

The lang item symbol names need to be prefixed with rust_ like this: https://gist.github.com/steveklabnik/5abd59a8fe7e5abda3db58b...

This didn't fix the compilation errors for me. I can set my own no_mangle pub extern `_Unwind_Resume` function (without declaring it a lang_item) and fix the undefined reference that way, but I'm pretty sure that's not how one's supposed to solve this

Re: Rust in 2018: easier to use

#304

Earlier quoted context omitted.

The lang item symbol names need to be prefixed with rust_ like this: https://gist.github.com/steveklabnik/5abd59a8fe7e5abda3db58b...

This didn't fix the compilation errors for me. I can set my own no_mangle pub extern `_Unwind_Resume` function (without declaring it a lang_item) and fix the undefined reference that way, but I'm pretty sure that's not how one's supposed to solve this

Hm, it compiled for me. Well, it didn't know about the C functions that were being linked in, but it didn't complain about the lang items.

You should file a bug, maybe.

Re: Rust in 2018: easier to use

#305
post #218
post #142

Earlier quoted context omitted.

No builtin utf-8 strings is a good/bad thing is debatable. You don't need to use bucklescript toolchain to write Ocaml, it has a very good package manager, the build-system tooling is getting better, already has great editor support for many years now(merlin). I think the tooling scene is much better than Haskell. Not sure what you mean by "no forward references"?

> Not sure what you mean by "no forward references"? I probably got the name wrong, but it's the ability to use a function before it is defined. In OCaml/ReasonML, you'd have to use the rec keyword and structure your codebase in a particular way to define mutually-recursive functions. It is a small but noticeable papercut, especially since recursion is so common in a functional language.

May be the word I’d “hoisting”
Post reply on HN