|
Subjunctive posted:People often find it off-putting to be in groups where they feel little commonality. The tweet you quote is describing the poster's feeling, not telling anyone else they need to do something differently. Kathryn Long @StarKat99 May 15 posted:I'm glad you're aware of it but I think you need to get some specific plans to improve out there sooner rather than later the longer it goes unaddressed, the harder it will be to fix. And I know I'm not the only one that is going to wait and see until there's some definitive efforts of outreach and not just promises and plans
|
# ¿ May 18, 2015 22:45 |
|
|
# ¿ Apr 29, 2024 13:11 |
|
VikingofRock posted:Definitely keep posting here, I'm learning a lot from thinking about the issues that you are presenting and people's responses to them. Also the Rust IRC is a fantastic resource. If you post a question here and no one answers it, you should ask IRC (and then post their response here so we can learn from it too). I definitely like having some activity in this thread, and these are great little discussions/examples to look at.
|
# ¿ Mar 28, 2016 00:45 |
|
I'm trying to install rust nightly on a new VM. The download from static.rust-lang.org is going incredibly slowly - about 0.1% per five minutes. Is there a mirror? If so, how do I specify the mirror for the rustup script? e: Just tried again and it is fixed now. taqueso fucked around with this message at 06:00 on Apr 3, 2016 |
# ¿ Apr 2, 2016 21:07 |
|
Is there a nice way to initialize an array with values from the concatenation of two constant arrays or slices of constant arrays? I'd like to do something like this: code:
code:
e: #rust says that it isn't possible yet taqueso fucked around with this message at 18:58 on Jun 6, 2016 |
# ¿ Jun 6, 2016 17:46 |
|
I'd like to be able to create byte literals using a different notation than the standard, for 'drawing' in an array of bytes. This is to allow creation of bitmap fonts in the code. I'd like to be able to do something roughly like this:Rust code:
Rust code:
|
# ¿ Jul 9, 2016 00:56 |
|
Jsor posted:I don't think this is macro-able, but this is practically the example for compiler plugins in the book (they use Roman Numerals, but it's the same idea of parsing identifiers to make numbers). Thanks for pointing that out, it does seem like a good fit and the right place to do this. And if I understand this right, I would make a plugin library that will function like any other lib within the standard cargo dependency system? Rust is too cool.
|
# ¿ Jul 9, 2016 01:19 |
|
I wrote it too. It was really easy, since that example was almost perfect. https://github.com/jdeeny/drawbytes This needs to follow the Chip8 defacto standard for the fonts, so it needs to be the most significant bits ('left justified'). I was mulling over how to make it a little more configurable, maybe an optional format string, like 'u8L' or 'u32R'. e: I had to add plugin = true to the lib section of the plugin's Cargo.toml taqueso fucked around with this message at 03:54 on Jul 9, 2016 |
# ¿ Jul 9, 2016 02:35 |
|
Rust code:
e: I found get and get_mut in the docs, so I can use code:
taqueso fucked around with this message at 06:45 on Jul 12, 2016 |
# ¿ Jul 12, 2016 05:19 |
|
QuantumNinja posted:I'd write it more like: I don't want to panic inside my library for a minor error like this. I'm trying to pass the results all the way out to the API boundary so the calling app can see & handle the errors. I considered using Option here, but didn't use it for 2 reasons - I read somewhere that it was bad form to use None to indicate an error condition, and also so I don't have to convert the Option to a Result in the calling functions. This is pretty analogous to std's use of None when popping from a collection, so it is mostly for the second reason. The library is pretty functional now, I'll try to post the code later today.
|
# ¿ Jul 28, 2016 16:29 |
|
Here's the library: https://github.com/jdeeny/rust-chip8 And here's the SDL2 emulator application: https://github.com/jdeeny/vipchip The emulator app is pretty bare. cargo run examples/computer.hex will run it. It will run code from a file filled with hex data like you get from Octo or a binary file. Escape to exit. A few weeks ago I had everything working to about the same point as this, but that time it was all one monolithic app with no tests. This is the result of trying to split it into the UI and a library to handle the core chip8 simulation task. I've gone round in circles on more than a few design decisions in the library. I used locks on the state data that I thought the UI would want to have fast access to, and channels for the other stuff. Honestly, I just wanted to try both. It sure seems like locks will be faster, but it intrudes on the code everywhere. Curious about a more ergonomic way to do this. I started with the Operations as classes implementing a trait, but there was a ton of boilerplate so I switched to Enums. I found out about default implementations, so maybe I should switch back. I really don't like how the enums have un-named data. Especially now that I have some operations with flags, it is really ugly. Can I do Src/SrcKind and Dest/DestKind in a better way? Maybe I need a macro. Known problem: SimulatorTask needs a run function that will execute instructions autonomously, without the other thread stepping it. Right now it is sort of pointless.
|
# ¿ Jul 29, 2016 01:56 |
|
Jsor posted:Is the untyped Arena dead? I seem to only be able to get TypedArena on nightly. Looked for the change in github - I think it got moved to the any-arena crate https://github.com/rust-lang/rust/commit/e2ccc4f744b93f89666fe4c8828905297bb76178#diff-d83049850151ade6fa9c57a0545754ad https://crates.io/crates/any-arena
|
# ¿ Aug 18, 2016 15:53 |
|
I wanted a case-insensitive equivalent of tag_s! from nom, so I wrote this one. Is this efficient? Can it be done in a better way? https://github.com/jdeeny/nom/commit/ef00efa647f77cfd4486c7db50ea2819c81f639d Rust code:
taqueso fucked around with this message at 16:56 on Aug 18, 2016 |
# ¿ Aug 18, 2016 15:56 |
|
sarehu posted:I went to a Rust meetup a couple days ago. Seven people showed. Where was your meetup? I don't think you can do redundant typing inside the match pattern. At least, I couldn't make it happen the other day.
|
# ¿ Aug 19, 2016 15:27 |
|
Looks like they have a bay area meetup once a month or so: https://air.mozilla.org/bay-area-rust-meetup-july-2016/
|
# ¿ Aug 22, 2016 23:05 |
|
gonadic io posted:Or even better I could make a macro that's invoked like: Awhile back I made a thing to allow binary literals to be entered as XX_XXX_XX to allow 'drawing' sprites for a Chip8 emulator. You need to use a compiler plugin rather than a macro to do that kind of stuff. Here is the response to my post: https://forums.somethingawful.com/showthread.php?threadid=3694683&pagenumber=6&perpage=40#post461902966
|
# ¿ Mar 23, 2017 01:07 |
|
Yes, it is Scientology, but you aren't invited.
|
# ¿ Jun 29, 2017 21:03 |
|
xtal posted:That's dumb as hell Do you have any reasoning behind that hot take?
|
# ¿ Jul 18, 2017 16:27 |
|
I guess I don't know much about macros! I love that the quiz has a nice explanation for each Q.
|
# ¿ Nov 29, 2018 19:30 |
|
It matches normal ranges. (..)
|
# ¿ Dec 9, 2018 09:14 |
|
netcat posted:If I want to cross compile rust (to ARM), is https://github.com/rust-embedded/cross what I want or are there other/better approaches? That's what you want. Install and enable docker, run 'cargo install cross' and then 'cross <cargo command like build> --target <target>'. It's fairly magical, I was very impressed with how well it worked. Except, I had to use the version from this PR: https://github.com/rust-embedded/cross/pull/251 Because without it, it doesn't support SELinux. :/ e: so the install command is 'cargo install --git https://github.com/cyplo/cross/ --branch selinux-support cross' taqueso fucked around with this message at 18:20 on Jun 13, 2019 |
# ¿ Jun 13, 2019 18:17 |
|
I'm experiencing semantic satiation for 'borrowed' now, thanks.
|
# ¿ Jul 13, 2019 00:50 |
|
giogadi posted:What's the rule/guideline for keeping a cargo package's dependencies up-to-date? For example, if a library I want to use is pulling in a super old version of another dependency, is that how things should be or is it expected for maintainers to periodically go through and bump up the required versions of the dependencies in their library? That's basically how it works, as far as I know. The maintainer is supposed to update occasionally, and use semantic versioning so some updating happens automatically. I guess if you see that and think it is important that the library move to a newer version you would make a PR to update it or fork it.
|
# ¿ Jul 27, 2019 02:27 |
|
Mirconium posted:If you want to do linear algebra there are 2 major libraries, like 5 minor unsupported ones, and they all have overlapping features, yet each one is also missing important stuff. nalgebra has a bunch of types named poo poo like "Matrix2" "Matrix3" "Matrix4" etc, so I'm not particularly optimistic about the fundamental design choices. ndarray cannot invert a matrix without linking to BLAS or LAPAK. I had a chance to use nalgebra yesterday and remembered this post. Despite rust not yet landing const generics, the library uses the typenum crate to provide type-level numbers. The basic Vector type is, for example, Vector<N, D: Dim>, generic over type and dimension.
|
# ¿ Sep 13, 2019 22:53 |
|
Did they fix cross working with selinux finally? I've been running off a PR from a year ago that never seems to land. Other than that, the tool is top notch and provides the easiest cross compiles I've ever done.
|
# ¿ Oct 8, 2019 15:44 |
|
|
# ¿ Apr 29, 2024 13:11 |
|
It is really good at "if it compiles it works" assuming you have the right logic.
|
# ¿ Dec 4, 2019 17:29 |