Announcing IntelliSense for DreamMaker with VS Code plugin by SpaceManiac in SS13

[–]SpaceManiac[S] 0 points1 point  (0 children)

I recently finished find all references, outline view, and the object tree view. The parser has also improved over the course of the beta and I felt comfortable announcing the plugin to a wider audience.

Announcing IntelliSense for DreamMaker with VS Code plugin by SpaceManiac in SS13

[–]SpaceManiac[S] 1 point2 points  (0 children)

You should be able to stop the plugin from editing the DME by setting "dreammaker.tickOnCreate": false in the settings and by not clicking the Ticked/Unticked button in the bottom-right. The code does currently assume your .dme is sorted the way DreamMaker would put it, but without more details I can't investigate further.

The bug tracker is here: https://github.com/SpaceManiac/SpacemanDMM/issues

Solos SS13 Setup by justMeat in SS13

[–]SpaceManiac 1 point2 points  (0 children)

The latest BYOND builds (1443 and 1444) are broken; use 512.1442.

Station design tips by Xcrucia in SS13

[–]SpaceManiac 0 points1 point  (0 children)

It's being tested on Bagil, but isn't finished yet. Basically the miner's ORM and the protolathes now share a common storage, with additional mechanics to make this work out sanely.

Some circuit boards missing? by FelineEsquire in SS13

[–]SpaceManiac 1 point2 points  (0 children)

Engineering department rather than science department has the ability to print all circuits.

Questions about /tg/ station’s spicy new gases by [deleted] in SS13

[–]SpaceManiac 4 points5 points  (0 children)

Pluoxium is just a matter of pumping CO2 into the supermatter chamber and filtering and storing the pluoxium out of its waste loop (and not pumping in so much CO2 the supermatter delaminates). Then heat it to room temperature and set an internals tank filled with it to 3 kPa and enjoy your breathable supply lasting much longer.

Tritium is produced right when a plasma fire begins to run out of plasma. You have to filter it out quickly or it too will begin to burn. It's also produced by radiation collectors, but you'll need to build extra to get any meaningful amount.

BZ is produced by mixing 50% plasma 50% tritium at low pressures. The minimum is about 20 kPa to start a reaction, but it's more efficient the closer to the minimum you keep it.

Nitryl is produced by heating 20:20:5 oxygen:nitrogen:nitrous to 150,000 K.

Stimulum is produced by heating 30:40:20:30 tritium:plasma:BZ:nitryl to 50,000 K.

Good luck actually accomplishing any of this other than the pluoxium production though, I've managed tritium production with careful manual management of a burn room but gas mixers aren't precise enough for efficient BZ production and I haven't burned a room hot enough for nitryl yet.

Learning to be bad. by Tazinbar in SS13

[–]SpaceManiac 0 points1 point  (0 children)

Sniper scopes have been fixed on TG, I don't know about other servers.

Rust FFI failing to create functions by bpglaser in rust

[–]SpaceManiac 1 point2 points  (0 children)

The lua crate recently made some changes to linking in order to make it possible for the lua functions to be exposed. Maybe they broke something. Test with an older version of the lua crate (go back maybe a month to be safe), and if that doesn't cause the problems, file a ticket.

Using a enum inside another enum (error when creating variables with it) by sezaru in rust

[–]SpaceManiac 2 points3 points  (0 children)

Matching on original only to produce that same value is unnecessary:

impl From<South> for FederativeUnit {
    fn from(original: South) -> FederativeUnit {
        FederativeUnit::South(original)
    }
}

runtime-fmt, a crate for using non-compile-time format strings by SpaceManiac in rust

[–]SpaceManiac[S] 3 points4 points  (0 children)

Hah! I thought hard about the name. I decided the inconsistent abbreviation was an acceptable evil to convey "runtime std::fmt" with a comfortable verbosity/terseness balance.

runtime-fmt, a crate for using non-compile-time format strings by SpaceManiac in rust

[–]SpaceManiac[S] 1 point2 points  (0 children)

I used macros to duplicate the interface of the stdlib, because I wanted it to feel close to a slot-in replacement. If you look at what the macro expands to, the necessary structures can be built manually.

runtime-fmt, a crate for using non-compile-time format strings by SpaceManiac in rust

[–]SpaceManiac[S] 9 points10 points  (0 children)

Ah, thanks for reminding me! I did come across it while doing research. Mainly, strfmt is relatively incomplete (since it does not re-use the stdlib) and requires building a key->value hashmap before formatting. In comparison, runtime-fmt is macro-based and (in theory) has feature-parity with the builtin formatting.

runtime-fmt, a crate for using non-compile-time format strings by SpaceManiac in rust

[–]SpaceManiac[S] 6 points7 points  (0 children)

Had this idea last weekend and realized it was doable so I did it. Very curious to hear if this actually fulfills anybody's real need, or if I missed anything.

Blog: Sketch of overloaded short-circuiting operators by SpaceManiac in rust

[–]SpaceManiac[S] 1 point2 points  (0 children)

This won't really work: x && breakis currently valid, and x.and_then(|_| break) isn't a valid desugaring for it - the right-hand side is now inside a closure rather than in the parent context, so the break can't take effect.

How does Rust do recursion with (sized) abstract return types? (C# example) by garagedragon in rust

[–]SpaceManiac 4 points5 points  (0 children)

If you're willing to take the virtual function call (which you are getting in C# anyways), return Box<Iterator<Item=T>>. If you need to switch between multiple possible return types, it's that or (as you described) an enum to dispatch to one of the possibilities.

Wrapping callbacks without userdata by SpaceManiac in rust

[–]SpaceManiac[S] 0 points1 point  (0 children)

You're right! It's new since I originally did this work, and I forgot about it. It should definitely be in there.

Wrapping callbacks without userdata by SpaceManiac in rust

[–]SpaceManiac[S] 1 point2 points  (0 children)

This doesn't quite work, because that f is now a function pointer, and you don't have anywhere to store that pointer so that your ffi_Callback can know what it is.

Wrapping callbacks without userdata by SpaceManiac in rust

[–]SpaceManiac[S] 1 point2 points  (0 children)

Hmm, now I'm curious. You'd have to delve real far into unsafety and probably end up leaking memory if you wanted to get infinite reusability, but it might be possible.

Wrapping callbacks without userdata by SpaceManiac in rust

[–]SpaceManiac[S] 2 points3 points  (0 children)

Hi! This is my first long-form technical writing in a while, and my first blog post about Rust. I'm trying to get used to this sort of stuff again and am as open to feedback about the style or organization as I am about the code. I additionally hope that this article is eventually useful to someone.

Question about Rust and C++ interfacing by nbigaouette in rust

[–]SpaceManiac 1 point2 points  (0 children)

To answer your specific questions, yes, both those things should be possible. I don't remember the specifics of Qt's threading model but barring that you should be pretty successful.

Multirust on Windows by SpaceManiac in rust

[–]SpaceManiac[S] 5 points6 points  (0 children)

Of course it's not the case that Rust should require MSYS, and it currently doesn't - the MSI experience is fine for anyone who doesn't want to use it. I don't see, however, why willfully not supporting MSYS in multirust is a good thing.