#cve-rs: Blazingly πŸ”₯ fast πŸš€ memory vulnerabilities, written in 100% safe Rust. πŸ¦€

1 messages Β· Page 2 of 1

sonic tusk
#

This is everywhere

foggy badger
#

it's hitting every corner of rust

frank pier
sonic tusk
#

LMAO

frank pier
#

a scraper got us

foggy badger
#

ty laund for this /gen

frank pier
#

oh right custom filters

#

anyways here's a screenshot

#

HAHAHAHAHA WHAT

sonic tusk
#

LOL

zinc folio
#

my body wake up at 4:20 and that's the first thing I see :ferrisClueless:

sinful fjord
glossy hatch
foggy badger
glossy hatch
sinful fjord
foggy badger
#

github reposter

sinful fjord
#

Can you send it as plaintext pretty pls

foggy badger
#

send what?

sinful fjord
#

the filter(s)

foggy badger
sinful fjord
#

ΓΆ

foggy badger
sinful fjord
#

*yoink*

#

that was incredibly painless

#

woah

frank pier
#

πŸ₯³ πŸŽ‰

sonic tusk
#

how is it still going up lmfao

#

i was just gonna share that

#

we might actually hit 1k

glossy hatch
#

I'm confident that I'll wake up tomorrow and we'll be beyond that

foggy badger
#

It'll be the main rust cultural product for like 2 days!

#

though it's hard to estimate, we are from a pretty biased perspective

sonic tusk
#

my brain when we get multiple seconds of prime time

frank pier
#

hey i think we've got a pretty slick logo

#

if y'all are okay with it i can add it to the readme

#

@sonic tusk @glossy hatch thoughts on this?

sonic tusk
#

hellll yeah

frank pier
#

rendered output

#

hmm lemme add a gradient to the background

#

yessssss

#

no i think i like the black background more

#

@glossy hatch any comments on this? i think brightshard is fine with the logo

#

(sorry for double ping but i'm excited to get this out :P)

glossy hatch
#

damn

glossy hatch
frank pier
#

:D

sonic tusk
#

approbd

foggy badger
sonic tusk
frank pier
#

or allow us to access the crates.io site or smth

sonic tusk
#

we have more stars than updoots

#

i didnt even know that was possible

frank pier
#

oh have we forgotten to celebrate 900 stars

#

we're gonna break 1k

sonic tusk
#

should we swap out that link

foggy badger
#

isn't the link only in one comment?

frank pier
#

yeah in like src/lifetime_expansion.rs

sonic tusk
#

and the help message in the cli and i think also the explanation

frank pier
#

mhm

#

but if the rust team/reddit mods/everyone agrees that the github issue isn't for casual discussion then people won't discuss it

#

at least, the majority of people won't

sonic tusk
#

yeah but that's clearly not everyone

#

kinda think we should swap it out for an internet archive link

foggy badger
#

chill with that

frank pier
#

if you think that's the right decision go for it

foggy badger
#

I don't think the comments are from the repo though tbh

frank pier
#

more of them are just discussing stuff

foggy badger
#

it's from discussions around the repository

#

not the repository

frank pier
#

i mean

#

yea

#

ig

sonic tusk
#

maybe

foggy badger
#

which would be the argument for us keeping them in there

sonic tusk
#

also there's already a safe transmute crate??? bruh

foggy badger
#

but it's fine to caution

frank pier
#

but it didn't exploit the bug to the level that we did

sonic tusk
#

didn't know it was a thing

#

dang

foggy badger
#

i mean it's been a thing for almost 10 years

sonic tusk
#

o well

frank pier
#

it's more of a gimmick than anything

#

the exploit

#

i doubt there would be any legitimate uses for it in code and it's near impossible to accidentally stumble upon

sonic tusk
#

the legit use is me being able to say my code is 100% safe kek

frank pier
#

lol

sonic tusk
#

so close

#

WOOOOOO

#

still more stars than updoots

#

it's existed for four days

#

and we already hit 1k stars

sonic tusk
#

spey rackin up folowers

narrow imp
#

time to make a pull request to fix a typo or something to be part of the illustrious new namtao prodigy project

sonic tusk
#

ill add a typo for you

narrow imp
#

pog

glossy hatch
glossy hatch
#

a double borrow with the lifetimes &'a &'b, and single borrow, with the lifetime &'b.

I'd use the same phrase shape for both:

a double borrow with the lifetimes &'a &'b, and a single borrow with the lifetime &'b.

narrow imp
#

I made my contribution :)

#

If I had any actual time I totally would love to extend this further into nonsense

#

Makes me wonder if you could do FFI with this...

glossy hatch
#

oh god

foggy badger
#

yknow it's getting pretty concerning seeing the CI being queued for 11 hours

narrow imp
#

It's fine

#

Anyways I wonder if you could do FFI interactions outside of unsafe blocks from this

#

Pass a value to the overflowed buffer, sick the C program on it and get UB nonsense :)

#

Then change the value again in safe rust. Check again with C, or even modify with C. Then check with safe rust...

#

The possibilities are derpy

glossy hatch
#

CI has to be fixed

molten cave
#

it was posted in another server I'm in

#

also jeez 1k stars

#

woops forgot to censor a pfp

lethal crane
#

I think all the code in cve-rs should be licensed in an extremely restrictive license

#

that way it's illegal to implement the CVEs in your own code

#

/j

sinful fjord
#

Toby has solved bugs, everyone!
Yipee

molten cave
#

Hackers hate them! Learn how they wiped out all software vulnerabilities with one simple trick

lethal crane
#

it's so obvious

terse minnow
#

Rust doesn't want me to implement Into<Box<T>> πŸ˜”

terse minnow
#

Guys I've invented the most powerful rng

sinful fjord
#

Lmfao

terse minnow
sonic tusk
#

buj what the actual fuck did you do 🀣

terse minnow
#

Ye you have to manually deallocate Refs

terse minnow
sonic tusk
#

are you sure the ref won't deallocate when it drops?

terse minnow
#

Yes

sonic tusk
#

why?

#

I know it's transmuted but still

terse minnow
#

Because there is no handler for dropping a ref

#

Address is stored as a usize

sonic tusk
#

im still confused

#

OH

terse minnow
#

Not anymore :)

sonic tusk
#

OHHHHHHHHHHHHHHHHHHHHH

#

DUDE

#

🀣

terse minnow
#

I think a test for a feature that essentially replicates C-style pointers having memory leaks is perfect

sonic tusk
#

this is amazing

#

I wasn't following that it was a box before

#

so the pointer gets dropped but the memory allocation is never deallocated

#

me code reviewing a PR on a meme repo:

terse minnow
#

Lol

sonic tusk
#

NO WAY LOL

frank pier
#

if i'm pestering you too much let me know lol

glossy hatch
#

Dude it's not stopping πŸ’€πŸ’€πŸ’€

glossy hatch
#

I'll look at cve-rs properly in a few hours

frank pier
#

aight, no worries πŸ‘

terse minnow
sonic tusk
#

lmao

#

fellow contributors

sonic tusk
#

I didn't even know about the variance stuff

foggy badger
#

logarithmic?

terse minnow
#

This is a 100 deg angle

sonic tusk
#

it's finally starting to slow

#

holy crap

terse minnow
#

Ye cuz we're running out of Reddit Rust users

#

But the capitalist economy demands infinite growth, so I propose cve-rs t-shirts and a subscription service

foggy badger
#

just wait for a video by some ytber that upsets everybody

sonic tusk
#

wait can you see my reviews on your pr?

#

my roommate can't for some reason

terse minnow
terse minnow
#

Wherever it is, I can't find it

#

we already had a crate published on crates.io before which used this bug to transmute in safe code, see #25860 (comment).

this issue is a priority to fix for the types team and has been so for years now. there is a reason for why it is not yet fixed. fixing it relies on where-bounds on binders which are blocked on the next-generation trait solver. we are actively working on this and cannot fix the unsoundness before it's done.

#

It's staying for a while

glossy hatch
#

ye

terse minnow
#

Hoi Spey

foggy badger
#

a given

glossy hatch
frank pier
terse minnow
#

(it's a lie)

frank pier
#

hm? no it's legit $1/yr

terse minnow
#

The lower price is just for the first year I think

frank pier
#

no if it does that then it'd say "renews at" like this

terse minnow
#

huh

frank pier
#

retail seems to be "this is what our competitors are offering" or whatever

glossy hatch
#

Apparently the domain cve.rs is taken and under construction??

terse minnow
#

🀷

glossy hatch
#
Domain name: cve.rs
Domain status: Active https://www.rnids.rs/en/domain-name-status-codes#Active
Registration date: 06.11.2021 02:17:20
Modification date: 30.10.2023 21:32:30
Expiration date: 06.11.2024 02:17:20
Confirmed: 16.11.2021 01:11:22
Registrar: Mainstream Public Cloud Services d.o.o.


Registrant: Individual

Administrative contact: Individual
#

huh :v

keen radish
#

i mean

#

technically

#

CVE is a trademark by MITRE

terse minnow
#

Makes sense

frank pier
#

some of them are actually used for stuff

sonic tusk
#

I can't ugh

glossy hatch
#

le phone iacte

terse minnow
#

nikita

sonic tusk
#

figured it out

#

should be able to see my reviews now?

terse minnow
#

Yes

sonic tusk
#

yippee

#

why doesn't it just post the comments automatically

#

the finish button is really hard to find

glossy hatch
terse minnow
#

🀷

glossy hatch
#

idk feels intuitive enough to me

sonic tusk
#

I'd left the code view

#

and it's only in the code view

#

cause i didnt see it while i was still in the code view

terse minnow
#

I think PhantomData should be Rc actually

sonic tusk
#

what

#

why

terse minnow
#

Guarantees Send

terse minnow
sonic tusk
#

oh wait shoot yeah because you can't unsafe impl

#

ooohhhh

terse minnow
#

No, it's not Rc

#

It's Arc

sonic tusk
#

arc

#

yeah

#

document this

glossy hatch
#

but Arc uses unsafe, no?

sonic tusk
#

i think virtually all of them do...

glossy hatch
#

I think Box::new doesn't use unsafe

sonic tusk
#

is box send?

glossy hatch
#

idk

terse minnow
#

Only if T is Send

sonic tusk
#

arc, mutex, rwlock

terse minnow
#

Arc is always Send and Sync

sonic tusk
#

i think those are your 3 options

#

didn't know rust had so many, dang

terse minnow
#

A barrier enables multiple threads to synchronize the beginning of some computation.

#

Cool ig

sonic tusk
#

yeah id never even heard of that one

#

is there a reason we're leaving old issues open?

#

or just haven't taken the time to close them

terse minnow
#

🀷

frank pier
#

Β―_(ツ)_/Β―

sonic tusk
#

gonna go close em lol

frank pier
#

y'all can close some of them if you want

#

yea

sonic tusk
frank pier
#

now i'm not one to extrapolate, but......

sonic tusk
#

ayooooooo

#

tris we comin for u

terse minnow
#

:)

#

destroit

frank pier
#

we got as many stars in 1 week as noboilerplate got in 6 months 😭

sonic tusk
#

big funny energy is actually insanely powerful

frank pier
#

i mean

#

would this be considered as a viral github repo

#

or is it like too small

#

it hasn't completely taken over rust discussion yet

#

keyword being yet

glossy hatch
sonic tusk
#

I think it kinda did... primeogen covered it, it was #1 on the subreddit, and now a yt vid

frank pier
sonic tusk
#

tru

glossy hatch
#

It can be scoped :p

frank pier
#

if we get someone like fireship to cover this in like a code report or whatever we could 100% consider it viral

sonic tusk
#

lmao

glossy hatch
#

But like even in the relatively new languages sphere it's quite viral

#

I saw it shared in the Zig discord

sonic tusk
#

LOL

frank pier
#

lmao oh snap

sonic tusk
#

actually insane

glossy hatch
#

sadge

#

but well

sonic tusk
#

zig devs, not rust devs

#

understandable

#

how big is a c short

#

u8? u16?

#

i think u16

frank pier
#

i16

sonic tusk
#

thx

frank pier
#

unsigned short is u16

sonic tusk
#

ye

frank pier
#

but yeah seems like some people are tired of it already...

sonic tusk
#

it is unsigned i just forgor to say that PaimonDerp

frank pier
#

lol fair

lethal crane
sinful fjord
#

I am the first :3

lethal crane
#

who are you?

#

are you new here?

sinful fjord
terse minnow
#

We need some politician to join this server fr /j

sinful fjord
#

Where are you Toby

terse minnow
#

Casenc at Toby's fr

sinful fjord
#

I'm in their walls :3

terse minnow
lethal crane
#

I don't have walls

sinful fjord
#

Then whose house is this

sonic tusk
#

hey why am i hearing weird noises from the walls

sinful fjord
#

Damn it, wrong house

#

Did my GPS get it wrong? Why am I in the wrong continent?
I thought it was built in Rust

#

Wait...
*squints*

Special thanks to cve-rs!
Damn it

glossy hatch
#

SO...

do we really do this

#

imo the authors field should stay unchanged

sinful fjord
#

(You should add Toby :3 )

glossy hatch
#

We can choose for it to mean the original creators of the project, or the current maintainers, I usually opt for the former because it makes sense to distinguish "author" from "maintainer" (and "contributor")

#

(kinda wish there was a maintainers field in that regard)

#

On a different note, @sonic tusk I think it'd be cool if you made a PR of the docs branch so we can leave comments there

#

So turns out, on WASM it still doesn't segfault.

#

Like 0 is literally a valid address

#

So anyways I made it segfault sunglas

narrow imp
glossy hatch
#

lmao

#

I finally have a legitimate case for not_alloc again

sonic tusk
#

he'll eat the code otherwise

#

:c

sonic tusk
#

and vscodium is already open to bs not cve-rs and i gotta pull and then find more things to complain about so it sounds really hard to do

#

:c

glossy hatch
sonic tusk
#

id say let me finish this ide driver first but that's what I've been stuck on for the past multiple weeks

#

(remember when i said id have disk reading maybe done by the end of the week like 4+ weeks ago? aged like fine milk)

#

oh wait actually we redid segfault to use transmute right? gotta rewrite that whole section

#

also spey what did you do to make it work in wasm

glossy hatch
#

dead simple but it's funny lmao

sinful fjord
glossy hatch
#

lmao

sinful fjord
#

Would it warp around to being in bounds

glossy hatch
#

(I can't, since that's not the type of an address)

glossy hatch
glossy hatch
#

cve-rs be like

sinful fjord
glossy hatch
#

Make it your fav gif :p

#

(the white one hurts my eyes spey)

sonic tusk
#

NOOO

#

KITTY IS NOT FOOD

#

😭

sonic tusk
frank pier
sinful fjord
#

...Spey I have an original idea now πŸ‘€

glossy hatch
#

πŸ‘€

sinful fjord
#

safely transmute an u128

#

into a usize

#

is it useful? no it'll just truncate

#

but

#

it would be funny

frank pier
glossy hatch
#

;compile

fn main() {
    println!("{}", u128::MAX as usize);
}
fiery minnowBOT
#
Program Output
18446744073709551615
glossy hatch
#

idk it's already pretty safe :v

sinful fjord
#

I forgor

#

I even did that when I was emulating a basic cpu

#

How did I forger

sonic tusk
#

transmute that to a string trolled

frank pier
#

can the compiler bot use crates

sinful fjord
#

is there a non-utf8 string

frank pier
sonic tusk
#

no

frank pier
#

or &[u8]

glossy hatch
sonic tusk
#

you can have raw bytes

sonic tusk
glossy hatch
#

I'm gonna release 0.6, any last edits?

sonic tusk
#

because you apparently have to sleep when you read from disks...

frank pier
sonic tusk
#

do i have to use interrupts

#

ugh

glossy hatch
#

Oh wait, the CI!

frank pier
#

yeah if you rely on cpu cycles you'll get inaccurate measurements due to pipelining and branch prediction

sonic tusk
#

:/

frank pier
sinful fjord
sonic tusk
#

o

#

what's an alu?

frank pier
#

also spey have you published a new version yet

sonic tusk
#

i think you explained this before and i forgor

frank pier
glossy hatch
frank pier
#

thing that does calculations in a cpu/gpu

sinful fjord
#

Airthmetico-logic unit

glossy hatch
#

so I'll do that rn

sinful fjord
#

It's the bit that does the math

sonic tusk
#

okie

frank pier
sinful fjord
sonic tusk
frank pier
coral crypt
sonic tusk
sonic tusk
#

and using interrupts pushes it into 64 bit

#

and then it no likie

coral crypt
sonic tusk
#

no

#

64 bit is turned on but not active

coral crypt
#

ahh ffs I forget which one it is

sonic tusk
#

i skip 32 bit mode lol

coral crypt
#

Ahhh

#

that's a funny state.

sonic tusk
#

yeah lmao

#

so im writing my own disk driver

coral crypt
#

GLHF

frank pier
#

what filesystem?

#

do a custom one

#

for maximum customer retention

sonic tusk
#

and now im trying to do timing... osdev wiki says to read from i/o a certain number of times because that uses like 10ns each time but idk how up to date that is

coral crypt
sonic tusk
#

there isn't one

frank pier
#

yes there is

coral crypt
#

are you just writing to the disk sequentially?

sonic tusk
#

yeah

#

lol

frank pier
#

otherwise you wouldn't be able to write any files

coral crypt
#

Oh god

sonic tusk
#

i put 0xdeadbeef in between each file

frank pier
#

a very rudimentary one

#

but still a filesystem

#

or wait

coral crypt
frank pier
#

is a filesystem a narrower definition

sonic tusk
#

also might wanna change channels

coral crypt
#

Yeah

glossy hatch
#

do you realize
that we have more stars on the repo than messages in here

sonic tusk
#

bro what the actual hell 3dlmao

sinful fjord
#

quick

#

someone make a spambot

#

I'll start

#

AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

sonic tusk
narrow imp
#

Aaaa

#

Use haskell instead

sinful fjord
#

(I am consuming much haskell content)

glossy hatch
#
spam :: [Integer]
spam = [1..]
#

(Just like Haskell, I'm too lazy to actually do it trollface)

narrow imp
#

So true bestie

glossy hatch
#

Funny that the only test that works is the one that tests if the task failed successfully

#

πŸ—Ώ

#

well that sucks

frank pier
#

just remove debug = false in the cargo.toml

#

right?

glossy hatch
#

no lol

#

I just had to specify "" instead of --debug in the yaml

frank pier
#

i see

glossy hatch
#

Anyways it works now pandyay

frank pier
#

nice!

#

can you set up something to run cargo test

glossy hatch
frank pier
#

oh

#

nice!

glossy hatch
#

Wrote a lil release note :p

frank pier
#

:D

glossy hatch
sonic tusk
#

🀣

#

the fucking turtle emoji dude

sinful fjord
#

they're so right πŸ˜”
when is the RIIR happening for cve-rs

glossy hatch
#

best interaction ever

sinful fjord
#

the rocket emoji lmao

limber salmon
#

2k stars1!!!!11!!!11!!!!!

sonic tusk
#

almost there

frank pier
#

noooo it's falling off!!

glossy hatch
#

It's following the path of my osu! rank progression trollface

sinful fjord
#

but

#

max 100 at a time

#

And it's 3am (don't have the brain to send multiple requests)

#

If somebody smarter could do that, that'd be sick

limber salmon
sonic tusk
#

we should start a gofundme

#

or allow funding to the project and give to them

terse minnow
#

Ferris plushie gofundme :)

frank pier
#

gimme a bit

sonic tusk
#

beautiful

sonic tusk
#

so you can apparently get llvm errors in rust

#

I guess it generated invalid LLVM bytecode

narrow imp
#

wild

sonic tusk
#

i found another way to implement transmute

#

IT'S FASTER LMAO

#

(benchmarked old code) ok hm not faster for larger sets

#

*let's see if i can cook *loading

sonic tusk
#

WE ICE'D BABYYYYY

#

ruhroh

limber salmon
#

let him cook

terse minnow
narrow imp
#

Sick

#

Fixing rust by exploding it

terse minnow
sonic tusk
#

im going to bed, will look at it more tomorrow

#

I need a pointer type I can get the data back from

#

like Box

#

but ideally not on the heap for performance

terse minnow
#

Ref<T> :)

#

Oh wait, that uses transmute πŸ€”

sonic tusk
#

yea lol

coral crypt
sonic tusk
#

what's funny about these LLVM errors is that I believe they're LLVM's type system picking up that shit ain't right, even when rust's fails to

#

like even it knows what I'm doing is absolute crap kek

lethal crane
sonic tusk
#

that screenshot is from me running the old code

#

so the old code was much worse for smol types and a bit better for big types

lethal crane
#

Ah I see

#

kills you

sonic tusk
#

what did i even do toby 😭

lethal crane
#

Wow

#

For that question I'm revoking your cereal privileges until Saturday

sonic tusk
#

THAT'S EVEN WORSE 😭

#

YOU'RE SO MEAN TOBY 😭😭

terse minnow
sonic tusk
#

:c

#

hehehe he didn't get my 13th gold

lethal crane
lethal crane
sonic tusk
#

:c

lethal crane
#

They gone transmuted the crab into a cat

terse minnow
lethal crane
#

No

terse minnow
sonic tusk
#

why

terse minnow
#

catssssssss

sonic tusk
#

transmuting refs instead of types just beat std

#

downside: cannot return a type, must return a reference
upside: we're faster than stdtrolled

terse minnow
#

Lol

#

I mean, can we not make it return a type with that?

#

Like, there are containers like Option<T>

#

Transmute &mut Option<T> into &mut Option<Y> and call .take().unwrap()

sonic tusk
#

ill have to experiment

sonic tusk
#

was just luck but still funny to beat std lol

terse minnow
#

🀷

sonic tusk
#
Gnuplot not found, using plotters backend
cve_rs transmute f32 -> i32
                        time:   [426.52 ps 427.74 ps 429.01 ps]
                        change: [-4.0439% -3.8022% -3.5494%] (p = 0.00 < 0.05)
                        Performance has improved.

cve_rs transmute_old f32 -> i32
                        time:   [15.899 ns 15.913 ns 15.926 ns]
Found 2 outliers among 100 measurements (2.00%)
  2 (2.00%) low mild

cve_rs transmute_ref f32 -> i32
                        time:   [428.21 ps 428.91 ps 429.59 ps]
                        change: [-0.6503% -0.4648% -0.2801%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

std transmute f32 -> i32
                        time:   [428.43 ps 429.07 ps 429.66 ps]
                        change: [-0.5139% -0.3491% -0.1758%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild

cve_rs transmute [f64; 1024] -> [u8; 8192]
                        time:   [1.0530 Β΅s 1.0552 Β΅s 1.0575 Β΅s]
                        change: [-23.689% -23.525% -23.361%] (p = 0.00 < 0.05)
                        Performance has improved.

cve_rs transmute_old [f64; 1024] -> [u8; 8192]
                        time:   [1.5666 Β΅s 1.5718 Β΅s 1.5768 Β΅s]

cve_rs transmute_ref [f64; 1024] -> [u8; 8192]
                        time:   [1.3709 Β΅s 1.3738 Β΅s 1.3766 Β΅s]
                        change: [-0.8230% -0.5580% -0.2983%] (p = 0.00 < 0.05)
                        Change within noise threshold.

std transmute [f64; 1024] -> [u8; 8192]
                        time:   [1.3717 Β΅s 1.3748 Β΅s 1.3778 Β΅s]
                        change: [-1.1822% -0.9016% -0.6312%] (p = 0.00 < 0.05)
                        Change within noise threshold.
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high mild
#

on the bigger dataset I'd say that's pretty reliably faster than std's transmute

#

that's fucking incredible

#

it's 2:33 am so ill document and push this tomorrow if spey and creative are ok with it

#

and then we can advertise speed too :3

#

(for the record in case I didn't clarify already this uses a completely different soundness hole in rust, meaning we have 2 "cve"s now)

lethal crane
lethal crane
#

they bounce off of my silli littl brain uwu

glossy hatch
#

Oh you mean compared to the previous implementation

glossy hatch
#

I can't even

#

We achieved the impossible

lethal crane
#

"cpu-meltingly fast"

glossy hatch
#

This warrants a blog post

#

"How we wrote a blazingly fast and safe implementation of transmute"

terse minnow
#

"Blazingier fasterer: Beating Rust's transmute"

glossy hatch
#

Blazinglier πŸ”₯πŸ”₯ fasterer πŸš€πŸš€

#

Amazing

lethal crane
foggy badger
#

no

glossy hatch
#

It's unsafe

lethal crane
#

oh extern

#

derp

foggy badger
#

I'm so confused by how the transmute is faster though

lethal crane
#

spite

#

and power of will

limber salmon
glossy hatch
#

Yeah safe

glossy hatch
limber salmon
#

unsafe != not safe

glossy hatch
#

...that's exactly what we mean though

#

It doesn't use unsafe

#

If you want to be pedantic, I'd say that unsafe != unsafe

#

In our code, nothing is unsafe but pretty much everything is unsafe

sonic tusk
#

You'd think it'd have like no overhead.

foggy badger
#

I think it'd be funny if you break character to ask why this is faster in the code itself lmao

#

or hmmm

#

"We don't know why it is faster, however we have not ruled out satanic interference"

sonic tusk
#

I filtered issues by unsound and just went digging lmao

terse minnow
#

We love bugs

sonic tusk
#

there's a few more that give 'static lifetimes but this in particular lets us transmute quite easily

terse minnow
#

I love dropping bangers

sonic tusk
#

oh damn ur right

#

lmao

terse minnow
#

Thing is

#

I added free and new

#

Issue is

#

free is C and new is C++

glossy hatch
#

rename new to alloc

terse minnow
#

malloc

#

Actually, I'll just add both

#

πŸ‘

glossy hatch
#

hm

#

idk :v

terse minnow
#

Thanks, Rust

sonic tusk
#

yw <3

#

welp nvm on that then

terse minnow
#

How is this allowed?

sonic tusk
#

lmfao

terse minnow
#

Ig explicit lifetimes aren't needed in this particular place

#

OH well

sonic tusk
#

I want to implement Into<T> for T and AsRef<T> for T using transmute

#

would be really funny

terse minnow
#

Lol

#

When your types feel a bit transgender

sonic tusk
#

LMFAO

#

I wanted to make a trait called trans that's implemented for everything and just casts the value

#

actually I'm going to

terse minnow
#

Then implement trait Right which unimplements Trans

sonic tusk
#
pub trait Trans {
    fn transition<T>(self) -> T;
}
impl<T> Trans for T {
    fn transition<T2>(self) -> T2 {
        transmute(self)
    }
}
sonic tusk
#
pub trait Trans {
    fn transition<T>(self) -> T;
}
impl<T> Trans for T {
    fn transition<T2>(self) -> T2 {
        transmute(self)
    }
}
pub trait RightWing: !Trans {}

if only negative trait bounds were supported πŸ˜”

glossy hatch
#

lmao

terse minnow
#

No inclusivity for right-wingers, conservatists and fascists

#

We are too woke for that

sonic tusk
#

avg rust programmer

terse minnow
#

fr

foggy badger
#

oh and are we gonna keep the previous impl for transmute somewhere?

#

(i liked it quite a lot)

sonic tusk
#

I also like it

glossy hatch
#

It's in the commit history if anything :v

sonic tusk
#

I was thinking about moving it to lifetime_expansion?

glossy hatch
#

nah

sonic tusk
#

so we have all the lifetime_expansion bugs in there and all the transmute bugs in transmute

foggy badger
#

hmm

#

so if one of them gets fixed you can easily move over

terse minnow
#

slow_transmute
transmute
blazingler_fasterer_transmute

sonic tusk
#

yeah that too

sonic tusk
#

would be even better if we had a third exploit for transmute

glossy hatch
#

if it's transmute then I don't get why

terse minnow
#

I call this shit which one is the right file versioning system

sonic tusk
#

the current transmute fn

glossy hatch
#

yeah I don't get why

sonic tusk
#

just to keep it

#

for people to see that bug

glossy hatch
#

why could it not be in transmute.rs

terse minnow
#

Commit to backwards compatibility

sonic tusk
#

it could be pepeshrug

#

could name it transmute_old ig

#

I was just grouping it with the exploit it used

glossy hatch
#

I think it'd even make the funny more concise by having slow_transmute, transmute and blazinglier_fasterer_transmute in the same file xD

sonic tusk
#

yeah if we do those 3 they'd be in the same file

#

lmao

foggy badger
#

probably the best

sonic tusk
#

we can do that

#

ok

#

kind of want to find a third implementation

foggy badger
#

maximize the funny and the education

terse minnow
#

The very first one?

glossy hatch
terse minnow
#

I think there were 3

sonic tusk
#

ohhhh

#

stack spamming wasn't reliable tho

#

right?

#

it broke

glossy hatch
#

ye

#

aight then slow_unreliable_transmute

#

;p

sonic tusk
#

sure lmao

terse minnow
#

discord_developer_transmute

glossy hatch
sonic tusk
#

electron_transmute

terse minnow
#

That's just an insult to Electron

sonic tusk
#

which I find so funny

sonic tusk
glossy hatch
#

yes

terse minnow
#

At least it doesn't lag

sonic tusk
#

what are you talking about πŸ’€

terse minnow
#

Discord is a laggy mess

sonic tusk
#

all electron apps perform so badly

#

for me

#

especially discord but also things like vscodium

terse minnow
#

Take any Electron app

sonic tusk
#

mattermost is awful

terse minnow
#

Discord performs worse than all of them

sonic tusk
#

probably just cause its doing the most tbh

#

but yeah it is bad

terse minnow
#

(Except vscode with shit ton of plugs, but eh)

#

(Mostly on startup)

sonic tusk
#

I don't have that many and vscodium is way slower than it needs to be

#

I can feel it

terse minnow
#

Weird

#

I mean

#

JavaScript

sonic tusk
#

especially compared to zed

#

like holy shit it's night and day

terse minnow
#

Zed is chad

sonic tusk
#

once they support more platforms nooooo

glossy hatch
#

I can feel it too and I have 16 GB of RAM with a Ryzen 9 CPU

terse minnow
#

I wish I knew how to do editors properly

#

So I could finish e

sonic tusk
terse minnow
#

...or at least bring it to usable state

glossy hatch
#

Dude I've been getting "50 MB for a hello world is nothing" kind of braindead takes on Twitter lately

sonic tusk
glossy hatch
#

Do people even know what a megabyte is anymore

terse minnow
#

I wanted to make a video where I was making hello world more and more complex

sonic tusk
#

I used to think it wasn't that bad either

#

until I made my os

#

and now my entire bootloader is less than 30kib

#

like all the stages

#

and now I'm aware

terse minnow
#

It became so bad I had to fix shit for like 6 hours

sonic tusk
#

especially after having to go and figure out what was adding more space to the bootstrapper

terse minnow
#

I had tools which were hard to link

#

I had tools which straight up didn't work

#

I had tools which didn't work with each other

#

In fact, at the end I added a thing that would manually patch some file in node_modules to fix module loading for some random package

sonic tusk
terse minnow
#

It was that fucked

sonic tusk
#

idk how anyone uses js

terse minnow
#

Would be a good video ngl

sonic tusk
#

it's madness

terse minnow
#

Basically I made a react electron typescript es module hello world with (broken) localization

sonic tusk
#

too many js terms in one sentence for me to understand

terse minnow
#

I'll say

#

There were many files

sonic tusk
#

that's another thing i find crazy about js

#

how fucking complicated it is

terse minnow
#

Also it used babel and webpack and probably some other shit

sonic tusk
#

like you're not even running on the cpu and yet it's SO FUCKING COMPLICATED

terse minnow
#

Oh fuck I forgot to add tailwind into this

sonic tusk
#

because everything's trying and failing to fix core issues ig

#

okie well anyways i need to actually get out of bed

terse minnow
#

Imo tailwind is fucking ridiculous

sonic tusk
#

so im gonna head out but ill read other msgs later

terse minnow
#

Sure, it's find for like

#

Tiny fixes in css

#

But holy shit if it's overused it becomes 500 times worse than css files

glossy hatch
#

btw @sonic tusk did you stop watching Computer Enhance

sonic tusk
#

ah shit

#

school picked up

#

there's too many things i can give my time to 😭

terse minnow
#

πŸ˜”

sonic tusk
#

yeah ill start watching again

terse minnow
#

I remember when I tried using next.js

#

Basically I

#

Created the project

#

Looked at it

#

Never looked at it again afterwards

#

The file structure was already too overwhelming for me

#

Like

#

This web server thing has more files than a tiny operating system example

#

And I'm not talking about node_modules

#

It's all the files that stare at you right in the face

#

I remember starting my own thing back in the day just so I can have the very basic thing I want, and while the way I delivered it was... a bit too edgy

#

But eh, we all were kids

#

The point still stands - those huge frameworks are too overwhelming to work with

#

And it gets worse when you need to add some server-side stuff

#

A lot of those frameworks just don't have server-side in mind

#

Meanwhile the thing I made had this integration right out of the box because the whole point of it was to just render an html page

#

For most stuff all I need is to just give somebody an html file

glossy hatch
#

Given that it'll have stuff like allocators in it, I'd want to do it in C instead of Rust just to learn stuff

terse minnow
#

Hoi

glossy hatch
#

Hello

terse minnow
glossy hatch
#

Nah there's just been a lot of discussion lol

frank pier
#

i see

terse minnow
#

It's unimportant

#

||It's JavaScript||

frank pier
#

i saw brightspark llvm error and ice

#

that was wild

glossy hatch
#

cuz I ain't using SDL like handmadepenguin recommends >:v

terse minnow
#

SDLless

#

Just rewrite SDL in Rust smh /j

frank pier
#

everything will be oxidised

frank pier
glossy hatch
terse minnow
#

Guys, let's write a custom windowing protocol

glossy hatch
#

I'd love to work on lokinit again especially if there's one more guy interested hehe

#

(it's not complete but the basics work on X11)

terse minnow
#

I just wish wayland-client wasn't as fucked

lethal crane
#

I'm only interested if I'm given discrete tasks to fulfill πŸ˜”

frank pier
terse minnow
#

It's a static member of a class

glossy hatch
frank pier
#

depending on how small it is

glossy hatch
#

No dependencies

terse minnow
frank pier
glossy hatch
#

* that aren't ours sunglas

terse minnow
#

Dependencies are small

#

syntax because macos sucks

frank pier
#

are there plans for web support?

glossy hatch
#

Currently lokinit has one dependency on Linux: loki-linux, which I just made to separate our bindings from the main lib

terse minnow
glossy hatch
#

But honestly I kinda changed my opinion

keen radish
#

what... would windowing on the web do?

terse minnow
keen radish
#

except like, spawn a canvas

glossy hatch
#

that's exactly what it would do

keen radish
#

wait answered myself thats exactly it isnt it

frank pier
#

yeah obviously a lot of stuff will be restricted

keen radish
terse minnow
#

Yes

frank pier
#

but stuff like winit makes a canvas on web

terse minnow
#

That's also what winit does

glossy hatch
#

winit works on wasm too, it can handle mouse and keyboard events and everything

frank pier
#

winit is so heavy though

glossy hatch
#

YES

frank pier
#

i want my 20kb wasm bundle

glossy hatch
#

AAAAAAAAAAAAA

terse minnow
#

I hope me sending a Discord invite won't instaban me here

#

Ok no automod, good

glossy hatch
#

I'm sorry laund I know you disagree but I have to relate to thinking it doesn't have to be this heavy lmao

terse minnow
#

We do technically depend on dynlinked libraries

glossy hatch
#

Yeah but that's fine since that's how it has to work on the OS

keen radish
frank pier
#

the problem with web is that the way to render frames is completely different

#

instead of synchronously thread::sleep'ing a frame you have to pass control back to the render thread and wait for requestAnimationFrame() to call a function

#

an idiomatic solution would be to make everything async

#

but that introduces the need to include an async runtime

#

which is OVERHEAD AAAA PANIC

terse minnow
#

Smack an event queue πŸ‘

sonic tusk
sonic tusk
keen radish
#

just include a nostd async runtime meant for embedded, they are usually very small

keen radish
terse minnow
#

Optional async amr? :blurrytroll:

sonic tusk
#

2k games stars

foggy badger
#

Do we have enough juice for 3!

glossy hatch
#

We're getting stars BLAZINGLY FAST πŸš€πŸš€πŸš€

foggy badger
sonic tusk
#

I prefer this view:

#

aka: it's only been five days

#

we're definitely hitting 3k at some point

terse minnow
#

How's Tris doin'?

sonic tusk
#

oh also slope went back up

foggy badger
#

idk what align timeline does tbh

#

also primeagen once again boosting us

sonic tusk
#

it counts # of days instead of showing the calendar date

#

see it shows 5 days not 17-22

#

which just gives a scale of how fast this happened lmao

glossy hatch
#

literally went from 13 to 1k in a day

#

heck, from 15 to 1.5k in a day

sonic tusk
#

LMAO WHAT

frank pier
frank pier
#

ig it went on primagen's stream and it went from there

glossy hatch
#

It pretty much immediately caught on

#

And then the Primeagen

frank pier
#

ah yea

sonic tusk
frank pier
sonic tusk
#

only happens with the new transmute D:

#

second run used old transmute

frank pier
#

seems like a string-specific thing due to the realloc

sinful fjord
#

:0

sonic tusk
frank pier
#

????

sonic tusk
#

idfk dude

#

wait nvm

#

what

#

i swear it was passing before

#

ill work on it tonight idk

lethal crane
foggy badger
#

Top 3 for this month on r/reddit

#

Top 30 of this year

lethal crane
#

Top 0 of tomorrow

foggy badger
#

so true

#

oh the prophecy is true, this is log

lethal crane
#

Yea it would be

glossy hatch
#

We're doing something Javascript dreams of being able to do

#

We're defining undefined

lethal crane
#

(undefined is defined as a member of globalThis

frank pier
#

@sonic tusk what do the tests fail with?

#

like the error msg

sonic tusk
#

I'm gonna work on it later

glossy hatch
coral crypt
#

Damn was just about to link that

glossy hatch
#

We got a few seconds of prime lmfao

sonic tusk
#

hehehe

#

prime time

coral crypt
#

I think he talked about it for a bit more one one his twitch streams

#

though I can't look through his vods cause they're sub only

sonic tusk
#

to steal spey's phrasing he was STEAMING over the code in one stream

#

trying to figure it out

#

then the next was this

coral crypt
#

Lol

#

did you manage to break Prime's brain with the unholy evil that is whatever the fuck it does? (I literally don't even know myself)

sonic tusk
#

yes lmao

#

he gave up

coral crypt
#

I wanna see that clip now lol

foggy badger
#

it was not all that interesting

frank pier
#

haha i don't think he saw the transmute though 😭

#

the other yt vid posted in the rust subreddit also forwent (forgoed?) explaining the transmute

sonic tusk
#

no one wants to explain the transmute

frank pier
#

it's a trend at this point

#

also brightshard have you figured out the issue of the transmute bug

foggy badger
#

the coolest part ffs

sonic tusk
#

ive done

#

nothing

#

lmao

#

I guess I can just push what i have

#

let you guys look at it

frank pier
#

ehhhh not to main lol

#

another branch or just post a patch file in this discord thread

#

but yeah i'm down for looking at whatever you've written so far

sonic tusk
#

oh that's what i meant, other branch

frank pier
#

πŸ‘

sonic tusk
#

i aint overriding our very precious, widely-used, stable code with this

frank pier
#

lol

#

Rust is designed to be memory safe. It does not permit null pointers, dangling pointers, or data races.

sonic tusk
frank pier
#

unfortunately there are no, like, news articles about cve-rs (yet!) so it's unlikely that the wiki page will change due to our revelation

glossy hatch
#

I don't want the wiki page to change tbh lmao

frank pier
#

never said i wanted it to

#

just thought it was funny that the rust wiki page is only very technically inaccurate

limber salmon
foggy badger
#

in two separate streams

limber salmon
foggy badger
#

yeah a bit funky

sonic tusk
# frank pier > Rust is designed to be memory safe. It does not permit null pointers, dangling...

Everyone's familiar with C, and everyone knows C++.
Similarly, everyone knows about Rust. But have you heard of Rust++?

Rust++ aims to improve the Rust programming language, just like C++ definitely improved the C programming language. You see, Rust is an amazing language, but it has its flaws. For example, you cannot take any actions that might break memory safety in safe Rust. This is very limiting to safe Rust developers.

Rust++ removes these boundaries from the Rust language. Powered by cve-rs, it allows dangling references, null pointers, segmentation faults, buffer overflows, and all the other brilliant features that C and C++ have but Rust does not.

#

future project idea trolld

#

we remake std and core with cve-rs

#

automatically extend the lifetimes of references to 'static

#

implement Into<T> for T

limber salmon
#

i

#

honestly

#

no

sonic tusk
sonic tusk
#

nonono

#

C++ improved on C

#

similarly

limber salmon
sonic tusk
#

Rust++ is improving on Rust

limber salmon
#

lmao

lethal crane
glossy hatch
#

This week in Rust

lethal crane
limber salmon