Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Vulkan vs Rust

Name: Anonymous 2015-09-15 8:37

Vulkan. You know what it is. But why isn't it out yet?

Oh, what do you know, it's because Rust programmers are complaining it's difficult to interface with their FFI because of Rust's lack of unions, so these SJWs are bitching about it to try to change Vulkan's data structures to be less optimized in order to favour Rust.

Rust is fucking garbage and these rustcucks are fucking up what could be a good API.

https://www.khronos.org/message_boards/showthread.php/9649-Official-Vulkan-Feedback-API-for-High-efficiency-Graphics-and-Compute-on-GPUs?p=38243&viewfull=1#post38243

Name: Anonymous 2015-09-19 18:29

>>40
It makes FizzBuzz more extensible, buddy. Sometimes you want a Bazz or a Bizz. That inheritance dude can really flourish.

Name: Anonymous 2015-09-19 18:32

>>41
Yes, well, we have polymorphism for that.

Name: Anonymous 2015-09-19 22:44

>>35
After defining a function ('magical') to consume the values, which were computed as booleans depending on the variant, rustc produced this which is better than I feared:

callq makefoo@PLT
cmpl $1, %eax
sete %bpl
callq makebar@PLT
cmpl $1, %eax
setne %bl
movzbl %bpl, %edi
callq magical@PLT
movzbl %bl, %edi
addq $8, %rsp
popq %rbx
popq %rbp
jmp magical@PLT


I'm confident passing on the actual data in the variant would be efficient too but I don't want to read what the optimizer has to say about that, not after seeing the optimized output for calling printf!().

Name: Anonymous 2015-09-19 22:48

>>37
If that was true inheritance would already be in Rust, and it would look like C++. You might want to look into it, and the proposed solutions before making up nonsense like this.

Name: Anonymous 2015-09-21 6:52

>>44
What purpose would inheritance solve in Rust that isn't already covered by structs, enums and traits?

Name: Anonymous 2015-09-21 17:18

>>45
You're just going to post a question to a thread on page 2 and not bump it?

The big issue is keeping space conserved without blowing up the code or blowing the performance. A canonical, Servo-relevant example: https://gist.github.com/jdm/9900569

This post gives some short summaries on efficient solutions: https://internals.rust-lang.org/t/summary-of-efficient-inheritance-rfcs/494

This post gives a lot of detail on some proposed solutions: https://aturon.github.io/blog/2015/09/18/reuse/

There are so many proposals because people don't want to see it all go to shit like C++. If C unions were that pressing we would see more proposals for it too, but I haven't found any. The only use of unions in Rust would be to interface with C. Variant types are covered by enums and type punning can be done with mem::transmute.

Name: Anonymous 2015-09-21 17:24

>>46
What the fuck is "page 2"?

Name: Anonymous 2015-09-21 17:28

>>47
What the fuck is "page 2"?

Something that goes "fuck" whenever a pedant is around. It's a fucking pedant detector.Made you haver.

Name: Anonymous 2015-09-22 5:33

>>46
Only shit posting on the front page. And you saw it, didn't you?

Thanks for the links.

Name: RUST IS SHIT BABY GARBAGE 2015-09-24 16:44

RUST IS SHIT BABY GARBAGE!

Name: Anonymous 2015-09-24 18:31

>>50
Rust or bust, bud.

Name: Anonymous 2015-09-24 20:53

>>49
And you saw it, didn't you?

I did, but only because I was wondering what happened to the thread.

Name: Anonymous 2015-09-24 22:18

Swift goes the other way, using structs:

Named C unions now import as structs with fields corresponding to each field of the union. By using a struct Swift presumably preserves the ability to use a union to project a different view on the same underlying bits but I have yet to verify that Swift really does make the struct's fields use the same underlying storage.
http://www.russbishop.net/swift-2-1

It's a good idea but it wouldn't go over well in Rust.

Name: Anonymous 2015-09-25 0:03

When the union's inspiration through the workers' blood shall run,
There can be no power greater anywhere beneath the sun;
Yet what force on earth is weaker than the feeble strength of one,
But the union makes us strong.

CHORUS:
Solidarity forever,
Solidarity forever,
Solidarity forever,
For the union makes us strong.

Is there aught we hold in common with the greedy parasite,
Who would lash us into serfdom and would crush us with his might?
Is there anything left to us but to organize and fight?
For the union makes us strong.

Chorus

It is we who plowed the prairies; built the cities where they trade;
Dug the mines and built the workshops, endless miles of railroad laid;
Now we stand outcast and starving midst the wonders we have made;
But the union makes us strong.

Chorus

All the world that's owned by idle drones is ours and ours alone.
We have laid the wide foundations; built it skyward stone by stone.
It is ours, not to slave in, but to master and to own.
While the union makes us strong.

Chorus

They have taken untold millions that they never toiled to earn,
But without our brain and muscle not a single wheel can turn.
We can break their haughty power, gain our freedom when we learn
That the union makes us strong.

Chorus

In our hands is placed a power greater than their hoarded gold,
Greater than the might of armies, multiplied a thousand-fold.
We can bring to birth a new world from the ashes of the old
For the union makes us strong.

Name: Anonymous 2015-09-25 0:47

Ironically, C doesn't actually have unions either.

Name: Anonymous 2015-09-25 2:28

>>51
If you use Rust, you're either gay, or a feminists, or both.

Name: Anonymous 2015-09-25 3:36

>>56
saniv the hamster

Name: Anonymous 2015-09-25 4:19

>>56
Why are you so afraid of gays and feminists?

Name: Anonymous 2015-09-25 9:59

If you use Rust, you're either gay, or a feminists, or both.

The radio said "No, >>56. You are a feminists."

And then >>56 was gay.

Name: Anonymous 2015-09-26 5:47

>>58
Have you ever read the Good Book before? Particularily, the part about Sodom and Gomorrah?

Name: Anonymous 2015-09-26 5:50

Isn't that the one about how using your penis privilege against others is wrong?

Name: Anonymous 2015-09-26 17:30

>>59
The radio crackered,
Here, FTFY.

Name: Anonymous 2015-09-28 15:11

Rust is bad for systems programming and I don't mean ``bad'' in the Michael Jackson sense.

Name: Anonymous 2015-09-28 16:19

the great thing about rust is it has this complicated "region" type system which ensures correctness... there is no proof or even a formal model of the type system but why would you want that?

Name: Anonymous 2015-09-28 16:37

>>63
Shamone!

Name: Anonymous 2016-07-12 18:52

Thou shalt honor and respect my dubs

Name: Anonymous 2016-07-13 7:13

>>66
Respect!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List