Live data from Hacker News

Rust in 2018: easier to use

jvns.ca

191–200 of 305 posts

Re: Rust in 2018: easier to use

#191
post #73
post #53

Earlier quoted context omitted.

I think there's some merit to the statement nonetheless - e.g. Qt is native to C++ and its API designed around C++ language features and semantics in many ways. There has been success in writing bindings for languages that can emulate those semantics without too much pain (e.g. PyQt), but Rust is not one of them. Inside the Rust community, there's been a lot of debate about what an idiomatic Rust API for a GUI toolki…

Servo guys have the potential to make something amazing (i.e. a sane electron type library). But I'm not sure how much they care about that. Other then that there is nothing serious going on.

> a sane electron type library

There's no version of that concept that's sane at this time, though. Wrapping full-fidelity APIs the browser engine has access to in a lossy abstraction layer of shoddy web platform APIs isn't a practice Servo can improve upon. It takes improving those APIs.

Re: Rust in 2018: easier to use

#192
post #12

This is going to sound weird, but I would like to see a garbage-collected Rust. Take away the borrow checker, and you still have a modern language with UTF-8 support out-of-the-box, algebraic data types, pattern matching, a focus on performance, and great tooling (cargo + rustup = OCaml almost fits the bill (Rust is inspired by OCaml after all), but the tooling around it is lacking to put it mildly.

F# sounds like it fits the bill. ADT, pattern matching, performant, great tooling (multiple amazing IDEs, a REPL, etc.), and a huge ecosystem of software packages to use with it (all of .NET). It's my favorite general purpose programming language (can be used for frontend programming, server, mobile apps, etc.).

Re: Rust in 2018: easier to use

#193
post #12

This is going to sound weird, but I would like to see a garbage-collected Rust. Take away the borrow checker, and you still have a modern language with UTF-8 support out-of-the-box, algebraic data types, pattern matching, a focus on performance, and great tooling (cargo + rustup = OCaml almost fits the bill (Rust is inspired by OCaml after all), but the tooling around it is lacking to put it mildly.

F# sounds like it fits the bill. ADT, pattern matching, performant, great tooling (multiple amazing IDEs, a REPL, etc.), and a huge ecosystem of software packages to use with it (all of .NET). It's my favorite general purpose programming language (can be used for frontend programming, server, mobile apps, etc.).

Do you have a good learning guide and a development guide (setting up ide, vim, tools etc)? I want to jump start into f#

Re: Rust in 2018: easier to use

#194
post #169
post #154

Earlier quoted context omitted.

Thanks for the reply! Mostly wondering how people ship stuff if there are different variants of std libs? Say you write your code entirely using one std lib and then try to share it (the code that is) with somebody who uses a different std lib, then the onus of learning the new std lib is entirely on him, right? How does that work for teams then? I know that Jane Street is a big user and so they have considerable inf…

The standard stdlib has all useful data structures, mostly the differences are in providing more convenient functions and monadic interfaces that you might have to write yourself, if you didn't use the alternate libraries. There is nothing to "learn" about using another stdlib since most signatures are the same. And they can use a different stdlib if they want. The migration from standard stdlib to alternate ones is…

Excellent. Thanks for the detailed answer - that really helps. To be honest, I want to use OCaml for writing some toy compilers to begin with, and I'm sure that that'll require only the core language, but I would like to use it for more serious projects after that!

I'll start off with "Real world OCaml" and see how it goes!

Re: Rust in 2018: easier to use

#195

Earlier quoted context omitted.

In that case it's no different from Rust, Rust has a GC option (ref counting). It's limited and opt-in then you still carry the cognitive burden of memory management, you have to think when to use it. But if you need that level of control, you'll need to think about memory anyway. And in my experience, it's way easier to reason about allocations in Rust that it is in Java (automatic type erasure if you want to use ge…

UWP has ref counting, garbage collection (via C#), and stack allocation. It does native compilation to boot, unfortunately it isn’t quite universal.

Isn't it universal windows? :)

Re: Rust in 2018: easier to use

#196
post #100

Earlier quoted context omitted.

Thanks for the link. I thought it was a small effort to show around the language features. Like a live(runnable code) version of the Rust programming language book. Very useful for someone trying learn the language feature by feature. What I'm writing about is a how-to style wiki. For example, How to do things with Rust: How to read from stdin? How to read and write from a text file? How to make a REST API call from…

The Rust Cookbook has made a start on this too! https://rust-lang-nursery.github.io/rust-cookbook/

[deleted]

Re: Rust in 2018: easier to use

#197
post #174

Earlier quoted context omitted.

And is built on an improved COM, thus requiring first class support for it, by any language targeting UWP.

Ya, that’s right. But I think this is only C++ and C# at the moment.

JavaScript on Chackra's engine, VB.NET, C# and C++. F# support is still to be done, due to how .NET Native handles MSIL.

Borland was in the process of doing it for Delphi and C++ Builder, but I don't know the current state. Originally they were only replicating the Metro UI, back on Windows 8.

Re: Rust in 2018: easier to use

#198

Earlier quoted context omitted.

If the project has only one main author, I would be. Even more so if they are on and off and not paid for it. Heck, TextMate and somewhat Sublime Text had such issues with 1 single dev, and those are projects that actually make them money...

That's not a fair comparison as they weren't open source so it was impossible for the community to help contribute (and the community did want to contribute when it looked like development had stalled). Where as limn is open source so if it does prove worthwhile but development stalls it would be trivially easy for any number of other developers fork the git repo and carry on the work.

> it would be trivially easy for any number of other developers fork the git repo and carry on the work.

Expecting that is wishful thinking. The fact of the matter is making something like that is an insane amount of tedious work and 99% of the time it is started up by people playing around with the concepts and abandoned once the initial fun problems are tackled. Something I am sure will happen with limn.

Re: Rust in 2018: easier to use

#199

Earlier quoted context omitted.

F# sounds like it fits the bill. ADT, pattern matching, performant, great tooling (multiple amazing IDEs, a REPL, etc.), and a huge ecosystem of software packages to use with it (all of .NET). It's my favorite general purpose programming language (can be used for frontend programming, server, mobile apps, etc.).

Do you have a good learning guide and a development guide (setting up ide, vim, tools etc)? I want to jump start into f#

For learning the language, there is no better guide than F# for fun and profit. Start here[1], then maybe check out this series[2] and this one[3]. If you want to learn about monads and such, go through this series[4]. Look through this[5] page for other good stuff.

Unfortunately, the fsharp.org site is kind of out of date. I think that's mostly a function (heh) of the MS F# docs becoming much better (can be found here[6]). These instructions for getting a dev environment set up are pretty good[7]. If you hunt around, you can also find blog posts which may be a little more comprehensive[8][9][10].

[1] https://fsharpforfunandprofit.com/why-use-fsharp/

[2] https://fsharpforfunandprofit.com/series/designing-with-type...

[3] https://fsharpforfunandprofit.com/series/thinking-functional...

[4] https://fsharpforfunandprofit.com/series/map-and-bind-and-ap...

[5] https://fsharpforfunandprofit.com/site-contents/

[6] https://docs.microsoft.com/en-us/dotnet/fsharp/

[7] https://docs.microsoft.com/en-us/dotnet/fsharp/get-started/

[8] https://atlemann.github.io/fsharp/2018/01/13/fsharp-on-ubunt...

[9] http://www.prigrammer.com/?p=363

[10] https://medium.com/@edgarsanchezg/four-easy-steps-for-instal...

Re: Rust in 2018: easier to use

#200

Earlier quoted context omitted.

Do you have a good learning guide and a development guide (setting up ide, vim, tools etc)? I want to jump start into f#

For learning the language, there is no better guide than F# for fun and profit. Start here[1], then maybe check out this series[2] and this one[3]. If you want to learn about monads and such, go through this series[4]. Look through this[5] page for other good stuff. Unfortunately, the fsharp.org site is kind of out of date. I think that's mostly a function (heh) of the MS F# docs becoming much better (can be found he…

Also a weekly roundup of F# news can be found here[1].

[1] https://sergeytihon.com/tag/newsf-weekly/

Post reply on HN