Let's play a game, Sup Forumsents

Let's play a game, Sup Forumsents.

>pic related.

I dare you.

How about no dumb nigger

pussy

what does that do when it goes off? delete evertything on your ssd?

well it says it will remove root so yes.

Gonna warn you, there's no 'no-preserve-root' after rm -rf. Like playing roulette with fake bullets.

Oh I guess I should add that first then.

I think that's the point of having the "Click" being echoed. The double pipe will execute the echo when the rm -rf command fails.

It will always click, though.

This.

installs gentoo

That's some weird syntax

not a programmer but shouldnt you do something like this?

# studio.io
exec randomnumber_generator
if number>100
do remove_everything && print "Bang."
if number

dafaq did I just read

it is a bash script you dumb nigger

if your random goes from 0 to 600. also what the fuck even is that

Calm down turbofaggots, I'm not a programmer, it's pseudocode to show the concept behind it.

>if your random goes from 0 to 600.
Limit it or modify it to better simulate a 6 shots revolver, 1/6 possibility of bang.

This is hilarious. Did you read some code fragment once and decide you know programming now?

>#studio.io

>random number from 0 to infinity
>almost 0% chance to not get "shot"
>"russian roulette"

what the fuck are you thinking?

Because you are trying to complicate this, I nominate you go first.

or use the modulo if it's a completely random number
besides it's already fucking readable sh

ITT: autists making too big of a deal out of some dumb image

>it's pseudocode to show the concept behind it.
For what purpose, when there's already actual code that implements it? And it's in two lines, so there's no need to reduce it to pseudocode for readability or anything. There's literally nothing that needs to be added to the OP.

And that's not even mentioning how wrong your pseudocode is.

//Rousian roulette v2
# studio.io
exec random_picker
list (1,2,3,4,5,6)
if random_picker(6)
do remove_everything
print "Bang."
else
print "Click."
(((return))) 0;
}

I released a new version and taken into account the advice of the userbase.

the $ [ ] didnt work for me. fixed.
[ $((RANDOM % 6)) = 0 ] && :>/dev/sda || echo Click

OP's won't print "Bang."

Much better, now write unit tests

I mean you'd see the lack of "click" and then check your root for files. It's not a big flaw. The lack of "--no-preserve-root" is a much bigger problem, but that's already been mentioned.

Alternatively, rm -rf ~ could be used

execute random_picker
create a list
if random_picker with argument 6 returns true
remove_everything
print
else
print
((()))

Thanks for triggering all these spergs.

>using gay rm with --no-preserve-root

>print
>else
>print
>((()))

Issue ignored from git, reverting changes.

Feels like I'm a programmer to be honest.

># studio.io
is this a new programming lang?

play safe kids
[ $[ $RANDOM % 6 ] == 0 ] && echo "You Die" || echo "You live"

I don't use bash much, but couldn't you:
[ $[ $RANDOM % 6 ] ] && echo "You Live" || echo "You die"

[ ] don't work that way

Can't you use an int as the condition?

[ is just a program. it returns 1 if the arguments are per the rules. and it returns 0 if there's just one argument

If you're referring to $[ ], it's ancient bash syntax, nobody uses it. It does the same thing as $(( ))

so
$[ $RANDOM % 6 ] && echo "You Live" || echo "You die"

>not a programmer

No, no you're not.

(( RANDOM % 6 ))

$[] doesn't return but rather expands
so it ends up as, say
5 && echo || echo
and you can't execute 5.

doesnt work

you forgot the space retard

I don't get it.

Fuck it, I don't want to understand bash anymore. I've tried in the past.

newfag get out

It's really not hard.

[ - old bourne shell
[[ - from ksh/bash, a better [
(( - C style

how's it hard
there are commands and macros like $ or $(()) or ``
commands can output text and also have a return code
simple

wtf is this programming language that cares about space character?

[ is a program.
[5 isn't
that's why i use test most of the time

Almost all of them.

>intmain()

It's unreadable.

would you like
if [ $((RANDOM % 6)) = 0 ]
then
rm -rf /
else
echo Click
fi

more?

Just one equal sign? All of bash's macros are unreadable, you have to always remember what each little sign is, it's really terrible. I once used some macros of last command substitution or creating multiple numbered files, then I try it again one month later and can't because I get one little symbol wrong. Fuck it.

your code doesnt work bro, it always gives click

If some sjw git tranny can be a programmer because she changed some comments making reference to gender in code can be a programmer, I can be a programmer too.

Deal with it.

is English your first language?

It's my last.

kill yourself, you fucking retard

>being this angery
:^)

Works on my machine. You got lucky :^)

2 times :) but I have backups anyways, would have just lost 2h of restring my machine..