3 ms·
I'm looking forward to playing with cool languages like Rust, Nim, and Elm. But when I read stuff like this I remember why I love using Go every day. Generating
by simi_ 12y ago
I'm looking forward to playing with cool languages like Rust, Nim, and Elm. But when I read stuff like this I remember why I love using Go every day. Generating binaries for multiple platforms is braindead easy, as is building from source on any system with Go installed.
That aside, really great work OP! I quite like the CSV format and had 2 ideas based on my experience with it that I'd love to get an opinion on:
1. markdown compiler plugin to expand 
2. barebones, imgur-like website for quick CSV file[s] upload, maybe also a public gallery to showcase interesting data (obviously all uploads marked public/unlisted/private)
- burntsushi 12y ago> But when I read stuff like this I remember why I love using Go every day. Me too! I wrote a window manager in Go[1] that I've been using for years now. I love that it takes <30 seconds to download and compile the whole thing. No C dependencies (compile or runtime) at all. With that said, doing it with Rust should be almost as easy. There's no `cargo install` command, but I think it's only a matter of time. :-) Your ideas seem cool, by the way! Sharing CSV data would be especially nice. [1] - https://github.com/BurntSushi/wingo https://github.com/BurntSushi/wingo
- simi_ 12y agoThanks for your support, I'll start working on the idea then. I just checked your Gh repos, your productivity is astonishing. Chapeaux! Also, cute handle. I suspect the problem with CSV will be working around the myriad of broken implementations and making sense of malformed data.
- burntsushi 12y ago> I suspect the problem with CSV will be working around the myriad of broken implementations and making sense of malformed data. Indeed. My CSV parser (and Python's) is pretty interesting in that regard. There are very few things that actually cause a parse error. You can see here[1] that the only two errors occur if there are unequal length records (which can be disabled by enabling the "flexible" option) and invalid UTF-8 data (which can be avoiding by reading everything into plain byte strings). That means that any arbitrary data gets parsed into something. There are various mechanisms in the CSV parser's state machine that make decisions for you. Mostly, I used the same types of decisions that Python makes. For example: >>> import csv >>> from StringIO import StringIO >>> list(csv.reader(StringIO('a, "b,c'))) [['a', ' "b', 'c']] >>> list(csv.reader(StringIO('a,"b,c'))) [['a', 'b,c']] Whaaaa? Yeah, if our CSV parsers were conformant with the spec, then both of these examples should fail. But they succeed and result in slightly different interpretations based on whether a space character precedes the quote. Therefore, "good" CSV parsers tend to implement a superset of RFC 4180 when parsing, but usually implement it strictly when writing. (My CSV parser ends up with the same parse as Python here, because it seemed like a good decision to follow its lead since it is used ubiquitously.) [1] - http://burntsushi.net/rustdoc/csv/enum.ParseErrorKind.html http://burntsushi.net/rustdoc/csv/enum.ParseErrorKind.html
- steveklabnik 12y ago> There's no `cargo install` command, but I think it's only a matter of time. :-) https://github.com/rust-lang/cargo/pull/1318 https://github.com/rust-lang/cargo/pull/1318
- stupidcar 12y agoI have never used Rust before, but I was able to install it and compile XSV on OS X in about 5 minutes. So maybe cross-compilation isn't straightforward yet, but building from source definitely is.
- timClicks 12y agoFWIW one of the reasons that I have been heavily looking at Nim for the last few weeks is its ease of generating static binaries.