Earlier quoted context omitted.
Crates.io is built this way: Rust serving JSON on the back end, Ember consuming it on the front end.
What kind of database does crates.io use?
It also stores the index via git and S3...
61–70 of 141 posts
Earlier quoted context omitted.
Crates.io is built this way: Rust serving JSON on the back end, Ember consuming it on the front end.
What kind of database does crates.io use?
It also stores the index via git and S3...
Regarding compile time, you can track the passes with `-Z time-passes` and wait for borrowck/lints to get over (or just typeck if you're only worried about types). There also was [this plugin]( http://www.reddit.com/r/rust/comments/2krdbu/rest_easy_a_lin... ), but it's outdated at the moment (I can upgrade it later). Regarding imports, `use foo::bar::*` works.
Regarding compile time, you can track the passes with `-Z time-passes` and wait for borrowck/lints to get over (or just typeck if you're only worried about types). There also was [this plugin]( http://www.reddit.com/r/rust/comments/2krdbu/rest_easy_a_lin... ), but it's outdated at the moment (I can upgrade it later). Regarding imports, `use foo::bar::*` works.
For use, I meant that there are so many packages you just take space just listing them. For basic iron you need: iron::prelude::*, iron::status, staticfile, logger, router, handlebars_iron, and more. And these are all from different crates.
Earlier quoted context omitted.
Refcounting and tracing are two different forms of GC, but you're right in the sense that most people mean tracing. At the same time, we're putting a lot of thought into how to properly add an optional tracing GC. It's important that it doesn't impact the no-GC case, which is still, of course, primary.
I'm glad to know there is ongoing work on a tracing GC. Rust has many strengths aside from lifetimes and ownership (algebraic data types, sane generics, strong module support, very strong type system), so a few features to make it more usable for use in contexts where performance isn't as important as expressivity would be very nice to have.
Earlier quoted context omitted.
Just to add some context, here are the tests which I didn't write, but would in Python/Flask usually: - Proper behaviour if I don't pass a parameter. Not needed, because it's an explicit `Option ` which I have to handle. - Is results list constructed properly / what's the None-vs-empty behaviour. Not needed, `Vec ` is verified at type level and None is not possible. - What happens if various database functions don't…
I've had a similar experience writing web-apps in Scala. The Option type alone handles so many cases which would otherwise require unit-tests in Python or another unityped language.
Regarding compile time, you can track the passes with `-Z time-passes` and wait for borrowck/lints to get over (or just typeck if you're only worried about types). There also was [this plugin]( http://www.reddit.com/r/rust/comments/2krdbu/rest_easy_a_lin... ), but it's outdated at the moment (I can upgrade it later). Regarding imports, `use foo::bar::*` works.
I'd love something similar to be part of Cargo, maybe as an option in the manifest. Like the author, I've learned to guess when the codegen starts, but having this information displayed would be useful.
Earlier quoted context omitted.
I've had a similar experience writing web-apps in Scala. The Option type alone handles so many cases which would otherwise require unit-tests in Python or another unityped language.
I'm a Python/Flask dev who has knowledge of the basics of Scala. Which web framework and ORM would you recommend to develop a (potentially) non-trivial web app?
Earlier quoted context omitted.
That is not strictly true. Look at Snabb switch, written almost entirely in LuaJIT for example https://github.com/SnabbCo/snabbswitch - you need some kind of ffi to mmap device memory, but it is quite possible. (LuaJIT is fast of course which helps for 10Gb ethernet).
That's kinda what I was thinking when I commented, and there are sure to be exceptions. But I don't see anything different with your Snabb switch example. You can probably use Java and JNI for that matter to call mmap, but would you be able to write an implementation of mmap in LuaJIT ?
Earlier quoted context omitted.
Last I checked, a 'rails new' gives you over 40 dependencies off the bat.
Yes, the Rails and Node communities are known for insanity.
The tooling for the web written in JavaScript is excellent, so I was curious, are there any options there are for calling JavaScript from Rust code? I know there is the ffi module for NodeJS that allows you to call Rust from JavaScript, but I was wondering if there is something that works well in the other direction.
What do you mean by "tooling for the web"? If it's preprocessors like LESS (that are written in JS), you could run the JS in V8 to transform the CSS efficiently, but maybe the compiler "binary" (script) is enough. In this case it's the best approach, since performance will be good, and you don't have to reinvent everything.
But if it's something like express.js, it's probably not worth it.
It's surely possible somehow, but in a pretty hacky way and at the cost of high overhead and complexity caused by calling from a static language to a dynamic one.