Do you think that you look cool in user imageboard, Jow Forums?
Old thread:
Do you think that you look cool in user imageboard, Jow Forums?
Old thread:
I'm a professional Rust developer. AMA
Eonly reminder to use #![feature(nll)].
>trying to look cool
shiggy
First of fearless concurrency. You will never be taken seriously by IRL devs like pic related.
why
What are your pronouns?
haskell!
It solves a lot of tricky lifetime issues.
>rustlets still don't understand that "lifetimes" and borrow-checking are fundamentally braindead concepts
>mindless shilling continues
explain
fellow haskeleler :3
x & 01
This is a bitwise operator performing what is known as a bitmask operation.
Each corresponding pair of bits in the two integers is ANDed together, and the result of the operation determines that bit in the output. Using a constant of 1 has the following effect.
abcd efgh
& 0000 0001
= 0000 000h
Anything ANDed with 0 equals 0, and anything ANDed with 1 is itself. It's as though we've applied a mask to the number so we can examine only the least significant bit in isolation.
x >>= 1
This shifts x to the right by 1. Every bit is moved into the position to its right. This causes the least significant bit to be destroyed and the most significant bit to be set to 0 as a placeholder (this is only guaranteed for unsigned integers)
abcd efgh
>> 0000 0001
= 0abc defg
The loop removes the least significant bit after it has been checked and the next least significant bit is moved into that position to be checked instead.
The loop terminates when the whole integer has become 0 i.e. there are no bits left to check.
> >>=
>2018
>he's still in the denial stage
Even C++, D and Haskell-fags have moved to the bargaining stage.
>>=)
Those three languages have nothing in common (Not even letters)
I'm going to abuse the comma operator and nobody can stop me!
gentoo installer
drawbacks?
True, but they all have been reacting to Rust in one way or another. C++ introduced std::option and been thinking about BC-like semantic, GHC is playing with linear types and D has added @nogc and betterC.
It's not stable so you have to use nightly.
you can overload it in C++
OwO
>they all have been reacting to Rust
No they haven't, std::option is not based on Rust, and adding linear types is nothing to do with Rust. It's because someone wrote a PhD paper on adding linear types to Haskell.
Rust has affine types, not linear types.
I just want to thank the user who introduced me to VS Code last thread. Comfiest text editor I have ever used for a newbie like myself. It just werks.
>electron
>electron
That looks interesting. Can it handle C/C++?
I'm convinced that ConstraintLayout is an elaborate practical joke to make Android developers even more miserable than what they usually are
I got two points off on the simple protected mode operating system I wrote for operating systems class. All it does is capture keystrokes and print them to the screen, but typing the "1" character produces random garbage characters. Only problem is, when I tried to step through it line by line in GDB, it works properly, for some reason. Here's the keyboard interrupt handler, written in assembly:
.global kbd_enter
kbd_enter:
pushf //pushf actually stores the value of the FLAGS register - including the interrupt flag
cli //we clear interrupts so that we're not interrupted during the interrupt handler
push eax //push some registers so we have something to use
push edx
in al, 0x64 //see if the keyboard has anything available...
and al, 0x01
jz _kbd_skip //if it doesn't, skip right to the end.
in al, 0x60 //get the scancode in from the keyboard
and eax, 0x00ff //this sets all but the first word of EAX to zero. where the scancode is
push eax //now send the scancode to the kbd_handler
call kbd_handler
pop eax //clear the stack
_kbd_skip:
mov al, 0x20 //send EOI to the PIC.
out 0x20, al
pop edx //clean the stack
pop eax
popf //restore the flags register - including the interrupt flag which is 1, enabling interrupts
iret //return to the C loop.
and the C function it calls:
//kbd_handler is called by the keyboard interrupt handler in the assembly code.
//this function takes the scancode, converts it into a char, and puts it into the keyboard buffer.
void kbd_handler(unsigned int scancode)
{
//if scancode is zero, or the buffer is full, ignore it.
if (scancode==0||buffer_start>buffer_end) return;
keyboard_buffer[buffer_end]=keyarray[scancode];
buffer_end++;
if (buffer_end>99) buffer_end = 0;
}
any ideas?
what
Oops, I thought you were suggesting that electron was a better text editor than VS Code. My bad, I didn't know exactly what electron was until I googled it.
>refused yet another job offer
keeping my sweet employment virginity for a haskell job.
>they all have been reacting to Rust in one way or another
The only appropriate reaction to Rust is violent vomiting.
>he doesn't notice that his text editor is using > 2GiB of RAM without any files opened
JEJ
>random garbage characters
>doesn't manifest itself in gdb
sounds like an uninitialized variable
Are you that starved for attention that you repost this LARP every second thread?
good work
>Being a ramlet
Look at him, and laugh!
>rustjobs.rs
Still can't hold a candle to
bgr.com
rim.jobs
only happens when you type the character "1", though
other characters are fine
>employment virginity
famesag
no
nope
all me btw
no
might be the two lines
popf
iret
Restoring interrupts before you've returned from the interrupt handler allows the iret instruction to be interrupted by another keyboard interrupt, messing up the stack
Don't know why it would only happen when typing '1' though
I actually got 5 (You)s this thread tho.
>I got only one
tfw when (you)let
>rustjobs.rs
>There are no open rust jobs anywhere in the world.
Utterly BTFO. Rust is completely irrelevant in the real world.
so are you
>n-n-no u
How will he ever recover
>in denial that rust is shit
>angry why somebody would make shit like that
>maybe there's reason this language is so shit
>fuck I wasted actual time with this shit lang
>accepting rustfags are mentally ill
>in denial rust is better than $your_favourite_language
>angry why somebody would use rust and not $your_favourite_language
>maybe there's reason $your_favourite_language is better than rust
>fuck I wasted actual time trying to keep using $your_favourite_language
>accepting people who keep using $your_favourite_language are mentally ill
lol you rustfags suck even at shitposting, just fuck off.
Reminder that the five stages of grief pic implies coming to terms with an abysmal language for lack of a better choice (presumably when you're too dumb to master C or C++).
I see you've moved onto anger now.
>equating writing software in rust with grief
>thinking this says something good about rust
Just how mentally challenged can you get?
>Just how mentally challenged can you get?
mentally challenged enough to favour Rust
>favour
do you not speak English?
>favourre
>flavouire
Ask an employed Rust programmer anything Rust related. On answer 100% contentedness guaranteed.
reminder more businesses use rust in production than haskell
Can you show me examples of non-revolting Rust programmers? Why do they always look so genetically malformed?
What book should i read to learn to program ?
more businesses use php in production than rust
more businesses use rust in production than c++. educate yourselves
>saveur
This is an English board limey, we don't speak none of that Frenchy-flavoured British of yours.
What a fucking creep. He looks like the love child of Jeffrey Dahmer and Ted Bundy.
>uppity rustic nigger trying to talk back
Sure thing m8
Just imagine being his wife and bearing his child
(((You)))
>Ted Bundy
>born to Eleanor Louise Cowell at the Elizabeth Lund Home for Unwed Mothers
you can't make this up
>hurr durr dongle iykwim
What's the best book for C++ if you know Java and Python?
A detailed guide on how to use a modern-design toilet
Don't even try it. Not until you know C reasonably well any way.
>dont even try it unless you know C
no fuck off with your 1980's style of teaching it's not C with classes(tm)
Why?
Otherwise strange things will happen and you will have no idea why or what they mean.
>otherwise blue smoke will pour out of your screen and spooky action at a distances will occur
Or you could just use a debugger and step through to see where your assumptions fuck up horribly and then reason about how to fix it... like a normal person.
Effective C++
>kills your typechecker
Nothin' personnel kid..
>not using dependent types and church encoded natural numbers to make this a simple matter of incrementing a natural number
quick and clean kill sir
What functions should be defined for a priority queue ADT?
You sure that the problem is in handler and not in your output code? And those are not random garbage characters either. Those are 1 3 5 7 etc in ASCII. Notice the pattern?
extract, singleton, union