[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
C
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 94
Thread images: 28
File: 2015-12-13_16-13-50.png (83 KB, 1729x949) Image search: [Google]
2015-12-13_16-13-50.png
83 KB, 1729x949
friendly reminder that you don't need gnu/linux to do your fizzbuzz tier project in C.
>>
File: ss (2015-12-13 at 04.19.49).png (45 KB, 1196x655) Image search: [Google]
ss (2015-12-13 at 04.19.49).png
45 KB, 1196x655
>>51837513
This is not new information.
Also, your function has a return type of int yet does not return anything.
You're also using printf when you're not printing formatted data.
There's no need to run an ide for such a simple program.
>>
>>51837571
>There's no need to run an ide for such a simple program
so what? it's not like computers care if they are used or not.
>>
>>51837603
It just seems cumbersome when you're clearly not even making use of any of the features the IDE offers over a simpler text editor + a compiler. Especially since you've created a whole new project with one file.
>>
>>51837611
>cumbersome
1 click to open VS, 1 click to open my project, ctrl+f5 to compile&execute. I think you got autism bro
>>
>>51837513
You installed a 5gb ide to write four lines of code.

Please die
>>
>>51837749
>5GB
yeah I forgot this is 1995 and people have to pay by the minute to download on dialup.
>>
>>51837777
Your ide is literally larger than than my operating system.
>inb4 1995 os or some other idiocy
I don't drive 18 wheeler semi to the grocery store, why are you using one?
>>
File: 2015-12-13_16-50-24.png (100 KB, 1724x947) Image search: [Google]
2015-12-13_16-50-24.png
100 KB, 1724x947
>>51837818
how retarded can you be, does your mom charge you for each additional byte that you use on your hard disk?
>>
>>51837849
while as a for loop
>>
>>51837849
>or some other idiocy
>charge for additional bytes
It's as if you can write but cannot read...

The point is that it doesn't take such a ridiculous level of overhead to due something so incredibly basic.
Sure you *can use visual studio to do that and it will work perfectly fine for that purpose, but you could accomplish the same with far less overhead even on a windows system.
Also you're supporting the use of the windows c compiler which has been notorious for flagrantly ignoring standard C specifications
>>
> what is code:blocks
>>
>>51837849
>i=i++
>not i++
>>
>>51837849
this is actually pure comedy
>>
>>51837956
>i++
>not i += 1
>>
>>51837945
>overhead
there is no overhead retard, my pc is on so it doesn't matter if I use 5GB extra hard disk space or 100MB additional RAM. If you want to play the overhead game I can load up borland turbo C on my msdos 6.22 box and I'll use 1000 less resources than your bloated OS of choice.
>>
>>51837969
who cares, the compiler optimizes all that shit anyways
>>
>>51837969
>not i -=-1
>>
>>51837849
Please stop posting, you are giving legit Visual Studio users a bad name. While you are at it, try reading those fancy tooltips Visual Studio is showing you.
>>
>>51837983
I hope you're joking
>>
>>51837571
am noob, what is this progrm pls
>>
>>51837987
not slide to operator
>>
>>51838014
looks to be (neo)vi(m)
>>
>>51837987
-=- looks like a new operator kek
>>
>>51837571
cmder with vim and gcc
>>
ITT CS freshman thinks he is hot shit for not going to his local Loonix install party, proceeds to shit out dubious code with a pretty good IDE.
No OP, just because your IDE of choice is good doesn't mean that you shouldn't think about what you are writing, but you'll notice soon enough in your first exams anyway :^)
>>
>>51837571
>puts
why they just did not name that function puta()
puta("ur mom");
>>
>>51837971
Be my guest, but you're missing the point and I don't know why I even bothered arguing with you.
You didn't start this thread with the intention of discussing but rather ranting.
Though I would ask why you are attacking "my bloated os" of choice as a way of defending your bloated ide on what is arguably the most bloated of modern os's.
>>
>>51838036
Is cmder good? I remember it having shitty support for powershell, is that still the case?
>>
>>51838051
because you don't have a point, driving an 18wheel truck to the grocery store uses more resources and is a waste, using additional hard disk space or RAM doesn't change jack shit so it's only your autism speaking.
>>
>>51837513
>logged in as fanboimsft
troll/shill confirmed
>>
>>51838061
i wouldn't know, i don't really use powershell. it's definitely really good though, especially with msysgit.
>>
>>51838040
>implying I'm a CS student
kek
>>
>>51837513
Daily reminder you don't need to purchase an IDE for hundreds of dollars.
>>
>>51838088
windows 10 is free and so is visual studio community 2015 ;^)
>>
File: 1280396308101.jpg (25 KB, 276x276) Image search: [Google]
1280396308101.jpg
25 KB, 276x276
>>51838103
>Windows 10 is free
>>
>>51838080
The point stands, your code is looking horrible, horrible, horrible and it's a freaking equivalent of hello world. How do your serious fuckups look like?
For the good of any person who might be forced to work with you or maintain your code, I really hope you are not employed anywhere where you are allowed to "code".

>>51838067
Thanks senpai, looking into it.
>>
File: x.png (11 KB, 233x150) Image search: [Google]
x.png
11 KB, 233x150
>>51838103
But it isn't libre
>>
File: 5Y6RdS9r_400x400.jpg (25 KB, 400x400) Image search: [Google]
5Y6RdS9r_400x400.jpg
25 KB, 400x400
>windows
>memesoft visual studio
Is it the famous spillover from /v/ I've been hearing so much about?
>>
>>51838113
stop bullying, I don't have plans to work as a code monkey, I'm just doing this for fun.
>>
should i learn C? is that what most gui apps are built in? i just tried to learn how to create a window in a program and im currently on arch and i tried to do <windows.h> but apparently thats only found on windows...what are most things programmed in
>>
>>51838139
I don't think it's /v/, it's /r/pcmasterrace
>>
>>51838169
yeah arch linux doesn't have a GUI so you are gonna be hard pressed to find windows.h
the closest thing you're gunna get to windows is tmux or GNU screen.
>>
>>51838169
C is not used for GUI applications.
windows stuff is mostly C# or C++
Linux stuff is C++ or I don't know but not C.
but C is easy to learn and then you can move to C++ easily so learn it
>>
File: screenFetch-2015-12-07_22-22-04.png (3 MB, 3840x1080) Image search: [Google]
screenFetch-2015-12-07_22-22-04.png
3 MB, 3840x1080
>>51838139
>>51838190
I'm also a gnu/linux user, enjoy my lfs desktop
>>
>>51837571
>using three applications where one will do
>>
>>51838263
>implying that one application doesn't load up the three being used as well as a dozen others that don't need to be used
>implying those 3 applications don't open up in a fraction of the time that the one does.
>>
>>51837513
>installing a 50 GB IDE to make a simple fizzbuzz
topkek
>>
>>51837849
>>51837513
> implying you need C for fizzbuzz

I would rather write the code in C# then.
Or Python.

If it's only about logic.
>>
File: tiny compiler.png (15 KB, 367x474) Image search: [Google]
tiny compiler.png
15 KB, 367x474
>>51837818
>>
>>51837513
Been there, done that.
Good luck printing more than 5 lines a second on your shitty terminal. It's disgustingly slow, common UNIX emulators are at least 1000 times more efficient.
>>
File: ok.png (92 KB, 694x732) Image search: [Google]
ok.png
92 KB, 694x732
>>51837513
>>
>>51837513
You do if you want to use anything newer than C89.
>>
>>51838214
The fuck are you talking about? Linux is written in C.
>>
File: icametolaughatyou.jpg (32 KB, 640x480) Image search: [Google]
icametolaughatyou.jpg
32 KB, 640x480
>>51837636
>open VS
>wait
>click project
>wait

>open vim
>type
>compile without even opening vim
>>
>>51837983
what is idiomatic code, idiot.
>>
>>51838552
That's why windows users are so dumb.
>I used Linux 15 years ago! How could it change?
It changed. A lot. Framebuffers are not an issue now. Dmesg shows for me in 0,01s and it prints out 3488 lines.
Linux users at least address bugs and flows of the newest versions of OS in discussions like that.
>>
>>51839063
windows doesn't even change code unless there's a profit to be made or they're forced to do it.
>>
File: 2015-12-13_18-58-32.webm (153 KB, 978x514) Image search: [Google]
2015-12-13_18-58-32.webm
153 KB, 978x514
>>51838552
>Good luck printing more than 5 lines a second on your shitty terminal
10000 lines in 2 seconds, that's only 1000 times faster than your claim freetard
>>
>>51837777
well honestly if you just write C ... and also only such a primitive code.. just use tcc.
>>
>>51837571
I am guessing instead of int OP,should use void and what should he use instead of printf? I thought that was the standard output function in C ?
>>
>>51839259
He should return something.

And no, printf isn't actually the standard output function in C. printf is specifically for printing formatted strings - it just so happens that this feature is so useful that it more or less is the only output function used.
Here's a properly written version of OP's code:
int main() {
while(1) {
puts("Sup loonix fags?\n");
}
return 0;
}
>>
File: Cmder_2015-12-13_19-19-45.png (112 KB, 898x488) Image search: [Google]
Cmder_2015-12-13_19-19-45.png
112 KB, 898x488
can I join the cool kids club?
>>
>>51839324
>for(;;)
>not goto
>>
>>51839277
you are missing 8 spaces tabs
>>
>>51839357
I use Emacs, it uses 0-space tabs and then adds visual whitespace to compensate. I just translated that to 3-space indents when copying it here.
>>
>>51837513
Everyone knows this.
What the fuck is your point?
>>
File: 1421848019318.webm (999 KB, 1020x800) Image search: [Google]
1421848019318.webm
999 KB, 1020x800
>>
>not using /**/ for indentation
>>
File: ss+(2015-12-13+at+07.26.37).jpg (65 KB, 771x780) Image search: [Google]
ss+(2015-12-13+at+07.26.37).jpg
65 KB, 771x780
>>51839324
Get on my level.
>>
File: 2015-12-13_19-31-07.png (63 KB, 1285x944) Image search: [Google]
2015-12-13_19-31-07.png
63 KB, 1285x944
>>51839392
nearly there
>>
File: ss+(2015-12-13+at+07.32.38).jpg (186 KB, 1376x784) Image search: [Google]
ss+(2015-12-13+at+07.32.38).jpg
186 KB, 1376x784
>>51839425
>using cmd.exe
found the kek
>>
File: face.gif (89 KB, 256x256) Image search: [Google]
face.gif
89 KB, 256x256
>>51838063
>>Trying to defend your autism this hard
>>
>>51838217
Got souce on the wallpaper? It looks pretty nice along with the rest of your config :^)
>>Not sarcastic smiley face
>>
>>51838990
He's talking about GUI applications
>>
File: 1450010883.png (465 KB, 627x1020) Image search: [Google]
1450010883.png
465 KB, 627x1020
>>51837849
#include <stdio.h>
#include <stdlib.h>

int rnum(int range)
{
int max = RAND_MAX - (RAND_MAX % range) - 1;

while(1) {
int i = rand();

if (i <= max)
return i % range + 1;
}
}

int main(void)
{
int i;

for (i = 0; i <= 10000; i++)
printf("\e[38;5;%dmOP SURE IS A FAG\n\e[0m", rnum(256));
return 0;
}
>>
>>51837571
for( ; ; ) takes more operations than while(1)
>>
File: 1448137331965.png (240 KB, 432x429) Image search: [Google]
1448137331965.png
240 KB, 432x429
>>51837513
Can you be autistic on r/pcmasterrace? You sound like the retard that always is amazed by the most mundane shit
>>
File: opisafag.png (149 KB, 1366x768) Image search: [Google]
opisafag.png
149 KB, 1366x768
>>51839576
yay mom, i can do it to!
>>
File: kek.webm (807 KB, 642x388) Image search: [Google]
kek.webm
807 KB, 642x388
>>51839152
You're right. It's only 100 times slower than on Linux.

Good riddance
>>
File: 1448303815315.jpg (373 KB, 1920x1200) Image search: [Google]
1448303815315.jpg
373 KB, 1920x1200
>>51839558
thanks Anon ;^)

it's openbox+compton with lfs systemd current dev book as a base.
>>
>>51839581
> people really believe that
>>
File: 1429177114622.jpg (12 KB, 258x245) Image search: [Google]
1429177114622.jpg
12 KB, 258x245
>>51839644
very impressive, maybe now you linuxfags can start to work on some proper gpu drivers
>>
You are all luddites.
>>
File: Wrongguy.gif (2 MB, 359x253) Image search: [Google]
Wrongguy.gif
2 MB, 359x253
>>51839684
Right after you winfags work on having your privacy violated even more
>>
File: labview fizzbuzz because.png (61 KB, 2425x1299) Image search: [Google]
labview fizzbuzz because.png
61 KB, 2425x1299
r8 my fizzbuzz /g/
>>
#include<stdio.h>
int main(void) {
printf ("This thread is cancer\n");
return main();
}
>>
>>51837571
>There's no need to run an ide for such a simple program.
Communist love.
>>
File: 1398163624724.png (230 KB, 455x443) Image search: [Google]
1398163624724.png
230 KB, 455x443
>>51839684
at least my drivers conceived by unpaid neckbeards don't destroy my gpu by turning off the fan
>>
>>51837513
Is it at least (unofficially) POSIX compliant?
If not, into the trash it goes.
>>
>>51839684
Do you really think an OS can have decent GPU drivers when the foundation is already an abomination?
The thousands of dollars you spend on hardware are only to compensate for the clusterfuck of horrible hacks that Windows is.
>>
>>51839754
That'll give you a stack overflow and crash you idiot
>>
>>51838263
UNIX
PHILOSOPHY

DUMBASS
>>
File: screenFetch-2015-12-13_21-16-53.png (2 MB, 1920x1080) Image search: [Google]
screenFetch-2015-12-13_21-16-53.png
2 MB, 1920x1080
>>51839644
OP here, I just tested it and it's actually way faster on ganoo :/
Thread replies: 94
Thread images: 28

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.