[rust-dev] First thoughts on Rust

2012-01-22 Thread Masklinn
I guess this would be the least-bad mailing list for it considering the other one is -commits. With Rust 0.1, I finally decided to actually test Rust (kudos for a perfect compilation under OSX, by the way, no issue whatsoever to report), and have thus encountered interrogations, dislikes, or

Re: [rust-dev] First thoughts on Rust

2012-01-23 Thread Masklinn
On 2012-01-23, at 05:37 , Kevin Cantu wrote: I'm curious though, because I've not used it in depth, what makes NSString so good. What does it do that Haskell's Text and other languages' string types don't do? First-class interaction with grapheme clusters (which it calls composed

Re: [rust-dev] Confusion with regard to error handling

2012-03-19 Thread Masklinn
On 2012-03-19, at 18:28 , Graydon Hoare wrote: The longer answer is that we're familiar with the CL condition system as well as a number of alternatives, and need to spend some time exploring to find what fits the Rust semantics best. I spent quite a while sketching, prototyping and

Re: [rust-dev] hashmap benchmark

2012-04-09 Thread Masklinn
On 2012-04-08, at 23:21 , Niko Matsakis wrote: On 4/8/12 12:15 PM, Stefan Plantikow wrote: Hi, I was thinking about this, too. One of the state-of-the art algorithms seems to be hopscotch hashing, wikipedia has a quite good introduction to it. Even though it has been developed for

[rust-dev] Class UI

2012-04-11 Thread Masklinn
I was reading http://smallcultfollowing.com/babysteps/blog/2012/04/09/rusts-object-system/ today, and saw the description of the classes definition. Next to it, Nicholas notes: I am not fond of the definition of constructors, in particular I can only agree, for a simple reason: the example is

Re: [rust-dev] Why does Rust compile slowly?

2012-10-14 Thread Masklinn
On 2012-10-14, at 19:48 , Yiannis Tsiouris wrote: Hi, The build includes not only all of LLVM, but Clang as well. Sorry if this is something obvious, but why is clang *needed* for Rust? Without looking into the makefiles (so this really is nothing more than a guess): rust calls llvm's

Re: [rust-dev] Why does Rust compile slowly?

2012-10-14 Thread Masklinn
On 2012-10-14, at 21:16 , Patrick Walton wrote: * Rust builds itself three times for bootstrapping. This is unavoidable as long as Rust is bootstrapped. Aren't the second and third builds for sanity-checking purpose? Surely if (when) Rust is mature and distributed as a tarball for

Re: [rust-dev] Announce: rustle, an api search tool

2012-10-20 Thread Masklinn
On 2012-10-19, at 03:05 , Daniel Patterson wrote: I'm announcing an initial version of an API search tool for Rust called Rustle. It is inspired by the api search tool for Haskell called Hoogle (http://www.haskell.org/hoogle). Haskell's community also has Hayoo[0], which is less focused on

Re: [rust-dev] I want to write more docs

2013-04-05 Thread Masklinn
On 2013-04-05, at 23:01 , Valentin Gosu wrote: On 5 April 2013 22:51, Steve Klabnik st...@steveklabnik.com wrote: More on the ffi docs that specifically shows callback examples would be useful. I think working examples for every function and structure described in the docs would be

Re: [rust-dev] I want to write more docs

2013-04-05 Thread Masklinn
On 2013-04-05, at 23:35 , Brian Anderson wrote: On 04/05/2013 02:32 PM, Jack Moffitt wrote: rustfix is high on everybody's list of things we would like to have. it's a sizeable and difficult project though. Since I don't think something that could have ported servo is likely to ever exist,

Re: [rust-dev] Having zip() fail when the two iterators are not the same length

2013-05-05 Thread Masklinn
On 2013-05-05, at 22:19 , Noam Yorav-Raphael wrote: Hello, My name is Noam Yorav-Raphael. I find Rust to be a really exciting language! I have a simple suggestion: the current implementation of zip() returns an iterator which stops whenever one of the two iterators it gets stop. I use

Re: [rust-dev] Having zip() fail when the two iterators are not the same length

2013-05-05 Thread Masklinn
On 5 mai 2013, at 22:51, Daniel Micay danielmi...@gmail.com wrote: On Sun, May 5, 2013 at 4:49 PM, Masklinn maskl...@masklinn.net wrote: Now here's the question, to which I don't have an answer but which will tell you whether your suggestion makes sense ― at least when compared to existing

Re: [rust-dev] Having zip() fail when the two iterators are not the same length

2013-05-05 Thread Masklinn
On 5 mai 2013, at 23:00, Noam Yorav-Raphael noamr...@gmail.com wrote: Indeed you can. But do you think of a useful, common use case? I think it's a useful feature. Common is not really relevant and will depend on your coding style. Starting to count from 0 is indeed very useful, but you can

Re: [rust-dev] Documentation, completeness cross-reference hyperlinks?

2013-05-19 Thread Masklinn
On 2013-05-19, at 15:59 , Masklinn wrote: [8] that would give the documentation code-coloration for free as well, since there is already a Rust lexer in Pygments: http://pygments.org/demo/81135/, though of course Rust support can also be added to Pandoc. And apparently it's already

Re: [rust-dev] Documentation, completeness cross-reference hyperlinks?

2013-05-20 Thread Masklinn
On 2013-05-20, at 07:52 , Jeaye wrote: On 05/19/2013 02:09 PM, Lucian Branescu wrote: I don't see it either, fwiw. Ok, so I'm not crazy. I was wondering the exact same thing. Can we get the original message sent to the list, Masklinn? It has been but it's apparently got caught in some

Re: [rust-dev] Documentation, completeness cross-reference hyperlinks?

2013-05-20 Thread Masklinn
On 2013-05-20, at 07:52 , Jeaye wrote: On 05/19/2013 02:09 PM, Lucian Branescu wrote: I don't see it either, fwiw. Ok, so I'm not crazy. I was wondering the exact same thing. Can we get the original message sent to the list, Masklinn? Yesterday as I was trying to provide more info

Re: [rust-dev] Do-notation?

2013-05-23 Thread Masklinn
On 2013-05-23, at 14:28 , Benjamin Striegel wrote: There's no generalized notation, but a while ago I overloaded the + operator on Option such that it automatically unwraps them, adds the contained elements together (for any two types that implement Add), and returns a wrapped result.

Re: [rust-dev] A case for removing rusti

2013-05-29 Thread Masklinn
On 2013-05-29, at 07:17 , Alex Crichton wrote: In my opinion, rusti gets the job done. Yes, having in-memory compiled state would work a lot better. But I don't know how viable that is. I know for a fact that a big feature plan is to have the compiler only partially compile when applicable,

Re: [rust-dev] rustdoc rewrite and redesign

2013-06-21 Thread Masklinn
On 2013-06-20, at 00:11 , Corey Richardson wrote: On Wed, Jun 19, 2013 at 4:32 PM, Masklinn maskl...@masklinn.net wrote: On 2013-06-19, at 22:01 , Corey Richardson wrote: I am going to rewrite and redesign rustdoc. Current bikeshed: https://github.com/mozilla/rust/wiki/Bikeshed-rustdoc

Re: [rust-dev] rustdoc rewrite and redesign

2013-06-21 Thread Masklinn
On 2013-06-21, at 03:02 , Brian Anderson wrote: On 06/20/2013 04:44 PM, Daniel Micay wrote: On Thu, Jun 20, 2013 at 7:30 PM, Brian Anderson bander...@mozilla.com wrote: Regarding HTML generation, I think we should not lean on pandoc so heavily. rustdoc currently produces a page of markdown

Re: [rust-dev] Redesigning fmt!

2013-07-29 Thread Masklinn
On 2013-07-29, at 11:04 , Huon Wilson wrote: On 29/07/13 18:26, Masklinn wrote: I don't have much to say, but On 2013-07-29, at 06:24 , Alex Crichton wrote: * Any argument can be selected (0-indexed from the start) keyword/named selection is *really* great for longer/more busy patterns

Re: [rust-dev] HTML5 parser

2013-08-14 Thread Masklinn
On 2013-08-14, at 10:15 , Archos wrote: But now, Google has opened-sources Gumbo, a C Library for Parsing HTML5. So it could be used until that somebody builds a parser in pure Rust. https://github.com/google/gumbo-parser That’s cool, but what would it buy us to switch from one C

Re: [rust-dev] Augmented assignment

2013-08-23 Thread Masklinn
On 23 août 2013, at 12:44, Chris Morgan m...@chrismorgan.info wrote: https://github.com/mozilla/rust/issues/5992 (Coming from a Python background I know the concept as augmented assignment; they are also known as assignment operators. Or just +=, ^=, = and the like.) I want augmented

Re: [rust-dev] RFC: Syntax for raw string literals

2013-09-19 Thread Masklinn
On 2013-09-19, at 22:36 , Kevin Ballard wrote: I welcome any comments, criticisms, or suggestions. * C# also has rawstrings, which were not looked at. C#'s rawstrings disable escaping entirely but add a new one: doubling quotes will insert a single quote in the resulting string (similar to

Re: [rust-dev] RFC: Syntax for raw string literals

2013-09-20 Thread Masklinn
On 2013-09-19, at 23:45 , Kevin Ballard wrote: Yes I know, but in my (rather limited) experience with Python, triple-quoted strings are typically used for docstrings. It was just an example anyway. They're also commonly used for multiline strings as single-quoted strings don't require it.

Re: [rust-dev] RFC: Syntax for raw string literals

2013-09-20 Thread Masklinn
On 2013-09-20, at 10:26 , Marijn Haverbeke wrote: If I need to embed both ''' and in a string, I'm out of luck. The chance of that is as remote as can be. I've never seen or heard of it happen. And mind, the issue must happen *in a rawstring* which is even more unlikely. You should note

Re: [rust-dev] Some suggestions of Rust language

2013-09-25 Thread Masklinn
On 2013-09-25, at 17:29 , Patrick Walton wrote: Multiple return values if has a function like this: fn addsub(x : int, y : int) - (int, int) { return (x+y,x-y); } them, this is valid: let (b,c) = addsub(x, y); but this is invalid; let b:int =0; let c:int =0; (b,c) =

Re: [rust-dev] Go 1.1 Function Calls

2013-10-02 Thread Masklinn
On 2013-10-02, at 08:51 , Corey Richardson wrote: Saw this on HN: https://docs.google.com/a/octayn.net/document/d/1bMwCey-gmqZVTpRax-ESeVuZGmjwbocYs1iHplK-cjo/pub I haven't been following the recent closure discussions much, but what Go is doing might be relevant? FWIW, various commenters

Re: [rust-dev] A la python array access

2013-11-20 Thread Masklinn
On 2013-11-20, at 11:16 , Gaetan gae...@xeberon.net wrote: actually that was what I was expected, sorry I'm not very confortable with slices yet. It should not allocate, indeed, there is no reason. Python doesn’t allocate but the way it handle items, it doesn’t really behave like rust's

Re: [rust-dev] Interface around SQL databases

2013-12-11 Thread Masklinn
On 2013-12-11, at 15:24 , Gaetan gae...@xeberon.net wrote: I'll be glad volunteering for this task, however I'm new in rust so I may need to have some mentoring for this... I would be inspired by the python interface: https://pypi.python.org/pypi/MySQL-python/1.2.4 A better inspiration

Re: [rust-dev] Configuration files library for Rust

2014-01-04 Thread Masklinn
On 2014-01-04, at 21:45 , Patrick Walton pwal...@mozilla.com wrote: I would love to have a TOML parser. I've always had a bit of a fondness for the INI format, despite its limitations, and TOML looks like the best of both worlds (the expressivity of JSON and the simplicity and readability of

Re: [rust-dev] Language to replace C

2014-03-04 Thread Masklinn
On 2014-03-04, at 21:37 , John Mija jon...@proinbox.com wrote: El 04/03/14 20:24, Daniel Micay escribió: On 04/03/14 02:43 PM, John Mija wrote: So, why don't use a simple language but safe like Go? Go isn't safe. It has data races. True, but Go includes a built-in data race detector:

Re: [rust-dev] How to find Unicode string length in rustlang

2014-05-28 Thread Masklinn
On 2014-05-28, at 11:10 , Aravinda VK hallimanearav...@gmail.com wrote: Hi, How to find number of characters in a string? Problem 1: define character. Do you mean a glyph? A grapheme cluster? A code point? Composed or decomposed? Problem 2: what use is knowing the length of a string?

Re: [rust-dev] How to find Unicode string length in rustlang

2014-05-29 Thread Masklinn
On 2014-05-29, at 08:37 , Aravinda VK hallimanearav...@gmail.com wrote: I think returning length of string in bytes is just fine. Since I didn't know about the availability of char_len in rust caused this confusion. python 2.7 - Returns length of string in bytes, Python 3 returns number of

Re: [rust-dev] Integer overflow, round -2147483648

2014-06-22 Thread Masklinn
On 2014-06-22, at 23:31 , Daniel Micay danielmi...@gmail.com wrote: On 22/06/14 05:09 PM, Rick Richardson wrote: Apologies if this has been suggested, but would it be possible to have a compiler switch that can add runtime checks and abort on overflow/underflow/carry for debugging purposes,

Re: [rust-dev] C++ to Rust - Is that about right?

2014-07-15 Thread Masklinn
On 2014-07-15, at 13:51 , Steve Klabnik st...@steveklabnik.com wrote: let z = box(std::gc::Gc) Point::good_new(); // this is a GcPoint, with no copy. } Unless that's changed in 0.11, IIRC that should be box(std::gc::GC). Which remains weird and annoying, is there any plan to drop the