Show newer

@gudenau
yeah, you're right, metadata is inside the text section.

this looks like a useful series of blog posts that covers the format: red-gate.com/simple-talk/blogs

you've probably also already found the same information elsewhere, so *shrug*

@gudenau
I honestly have no idea. the most i've "messed with" .NET is using mono to use applications. *shrug*

@gudenau
looks like the bytecode is just contained in the .text section, with a flag somewhere marking it as MSIL.

If you want to view a textual representation of the IL, there's ILSpy (and many others, I'm sure)

Summary of Stein's Gate (in ttrpg terms):

Player: "Okabe tries to create a Phone controlled Microwave!"

DM: "Alright, roll for it."

Player: *rolls a one* "uhhh"

DM: "Well, roll and hope you don't confirm a critical failure."

Player: *rolls a one* "shit"

DM: "Alright. Everything it microwaves turns into goop. As a side-note, it's now a time machine."

Player: "wait, what? That sounds cool!"

DM: *grins evilly*

Why'd I decide to type this all out on my phone? >_>

Show thread

Note: this is an example based on, but not equal to the case I actually developed it for. The focus is the technique, not the specific trait implemented.

Also: I like markdown, it's a shame that it doesn't actually work here.

Show thread

and then I could implement TryFrom roughly like thus using the byteorder crate:

```rust
impl<'a, Endian> TryFrom<&'a [u8]> for Wrappedu16<Endian>
where Endian: byteorder::ByteOrder {
fn try_from(src: &'a [u8]) -> Result<Self, !> {
Ok(Endian::read_u16(src)) // panics, unfortunately
}
}
```

It's not perfect by any means, but I think it's pretty neat!

Show thread

What about newtype wrappers? I could create `LEu16` and `BEu16` and implement for these separately. However, this is mildly annoying.

However, what if we tied some extra data to a single wrapper? e.g. you deserialized a Wrappedu16<BigEndian>.

Of course Rust doesn't like unused template parameters, so PhantomData comes to the rescue:

```rust
struct Wrappedu16<Endian>(u16, PhantomData<Endian>)
```

Show thread

Been playing around with PhantomData in rust. Example usage in Rust's documentation deals with unsafe code and referemces, but what follows is an example in deserialization that doesn't touch unsafe code at all.

Say I wanted to implement something like `TryFrom<&[u8]>` for u16. There's an issue here: is the u16 in little endian or in big endian order? The obvious (but dirty) answer is to pick an endian and swap when necessary.

Kitlith boosted

@scanlime
Yeah, I guess that's the thing about that, there's no real way to do webtorrent with "here's new data that is coming out *now*"

Might be interesting to do some sort of streaming transcoding process though, where the video is available shortly after being uploaded, where transcoding is still in progress. That also sounds like hell, though.

@scanlime
Is there any way to live stream on peertube? livestream + using comments (or livestream chat) to give commands ala Twitch Plays would be one possible approach. Otherwise... idk, making a gif that lasts until the screen stops changing after the command was sent or smth.

bad joke, astronomical cloud 

@scanlime
but wouldn't that be ooort, ala oooexe for out-of-order execution? Though I guess that could mean it's a nonfunctional re-toot...

ik, ik, that's not the joke you were going for.

Kitlith boosted

@scanlime@kitty.town @qrs @scanlime@social.coop

Alternatively: "eh? I thought they already followed me. Why am I being re-followed? Oh, different instance."

Kitlith boosted

those four words she wants to hear

that’s right, “all prices include tax”

Kitlith boosted

Friendly reminder: In a world where so many people are cruel for the sake of it, the most punk thing you can do is to be kind without expecting anything in return.

@scanlime
Sure, except then that icon isn't there for people only working with peertube. *shrug*

tbh I think I was more confused because it had LIVE in the title.

@scanlime
Guess that's what I get for following scanlime at the peertube instance as well as scanlime's mastodon.

Show older
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!