Want to learn to program

Show me de whey brudduhs

Other urls found in this thread:

web-artanis.com/scheme.html
mitpress.mit.edu/sicp/full-text/book/book.html
charlespetzold.com/code/
norvig.com/21-days.html
g.sicp.me/books/
eloquentjavascript.net/
pellesc.de/index.php?page=download&lang=en&version=8.00
twitter.com/NSFWRedditVideo

Questions belong in the sticky.

No.

>>>Holla Forums

Dis is de wey >>>733048
May you find your wey, me brudda

How the fuck does this belong in the question sticky? I'm not asking for tech support brudduh I want a discussion about language bloat

there's no way around the standard library bloat. even in C, try reading and writing to the terminal without the standard library.

Maybe, bruddah, you should have formatted your OP like a proper tread, asking a proper question rather dan shitposting a meme, me brudda. Far be it from me to denigrate de ugandan knuckles but you should have done it de propah wey.

Literally how? Downloading GCC+standard lib is 750MB

fuck off retard

still unforgivable

You're too ignorant at this stage to even form an opinion about what is bloat. If you're not just shitposting to waste our time, you're making up excuses for yourself to avoid learning something new.

You do understand you have wasted your life, right?

Stop posting for today. Go outside. Talk to real human beings. Get over yourself.

Imagine being this angry over nothing.

You're an idiot if you think a large development environment is bloat. The compiler and the standard library are you workshop and construction material. Have you ever seen a craftsman working in a tiny shed? No, the workshop is large and has a big collection of tools and materials for various purpose. What you manufacture at the workshop is what should be small and lean, not the place you build it at.

If size is a problem you can get it way below 1GB. Compile everything without debug symbols, get the smaller libs/compilers, etc. Even gcc/g++ are below 1GB I think, unless you decide to install the whole GCC but then that's on (you).

You do understand everyone on Holla Forums wasted their lives with computers, right? Also OP wasn't "extra racist", whatever that means. This isn't reddit, we don't pretend biology doesn't exist.

...

do you do either of those often, smartass?

Hi StephenLynx

you do not know de wei

/* gcc -nostdlib -nodefaultlibs -fno-asynchronous-unwind-tables -no-pie print.c strip -R .note* -R .comment* a.out */#define EXIT asm("movq $60, %rax"); \ asm("movq $0, %rdi"); \ asm("syscall");void print(const char* s){ static int l = 0; while(s[l] != '\0') l++; asm("movq $1, %rax"); asm("movq $1, %rdi"); asm("movq %0, %%rsi" : : "g" (s) ); asm("movq %0, %%rdx" : : "m" (l) ); asm("syscall");}int _start(void){ char* string = "So now we can print without C lib?\n"; print(string); EXIT;}

but it is fun!

programs don't have to suck balls.
first step: annoyed about size.
second step: do something about it.

MinGW : 300 MB
Cygwin (including my home directory) : 700 MB
Java : 600 MB (JDK), 400MB (Eclipse)

The only thing that comes close is Java. I have never installed C#.

Then again, I've downloaded and installed Modelica but never brought myself to code anything useful in it. Don't remember how large it was.

My reply:

I don't even bother downloading any game if its over 10 GBs with some VERY RARE exceptions like game I know will at least give me a solid experience like GTA V. But game size is definitely a deal breaker for me

Just keep in mind that implementation is not thread safe.
You can save a line by doing
int l;for (l = 0; s[l]; l++);
I'm also not sure why you are using static there. The only thing I'm seeing it doing for x86_64 is adding an extra 3 bytes for every instruction which references it.

Are you storing your compiler on a 100 floppy disks or something wtf? If storage space is such a big deal to you go to a computer dump and pick up a free 60GiB HDD.

yeah better download visual studio which is around 50gb amrite? XD

From what I remember about static keyword the value of "l" will persist between calls to print(). Meaning that next call with shorter string will give you garbage.

Yep, he should have actually separated the declaration and the assignment of the static variable for it to work. I think the reason he was trying to do that was so that it doesn't have to allocate memory for the local variable by just storing it at a single address. The problem with thinking like this is that the local variable doesn't even need to be allocated as it's just being put on the stack.

Best to wait for user to reply with his thoughts behind his code.

Oh yeah, so fucking complicated.

he won't show up because he accidentally meltdowned his intel CPU with his shit "suckless" code and now he has to reinstall gentoo and reconfigure his anime desktop

...

Why do programs do this? If i really wanted that functionality i'd write a script for it.

that's sweet, i don't want to shit on it, but it's not C if it's assembly.

I've looked at what the solutions to this is, which boils down the making syscalls in assembly, but does the syscall qualify as a standard library? or are we just taking as a given that syscalls are the end of the tunnel?

writing to the terminal without a syscall is probably not going to be fun because the whole idea of the console depends on the kernel, maybe writing to the screen outside of a syscall is something that would have to happen inside a VM or something. It seems like something like writing to the harddrive would be some that could be done without a syscall, fuck you kernel I want to do what the syscall does, run it as root and have the processor execute it fuck off, but somehow I don't think it's that easy. I think it's going to boil down to drivers, and not having any without the syscall.

GCC is called the GNU Compiler Collection for reasons you tard it's not just C.

No shit sherlock, who said it was just C?

Install Guile (avoid parts of the sjw community)
Learn scheme:
>web-artanis.com/scheme.html
>mitpress.mit.edu/sicp/full-text/book/book.html
Then learn about hardware:
>charlespetzold.com/code/
Learn to be patient:
norvig.com/21-days.html
Then learn C:
>g.sicp.me/books/
Good luck user.

This tbh

You don't need an fully fledged IDE just to write hello worlds and FizzBuzz. Install Bash for Windows 10 and use Vim instead.

I went with static to get the variable in memory, because I was afraid I couldn't trust the compiler :P

You are right though, the final program is 144 bytes shorter if I use register int l asm("rdx") = 0; and remove the assembly line that loads rdx from the static variable.

The compiler produce the same code whether I use a for loop or the while loop, but I would actually prefer yours if I was a compiler.

Remember, it's a reply on a board, not production code :P

...

you're lost at sea, user.
get a programming tutorial. start filling a directory with 1.ext, 2.ext, 3.ext. start running programs from the tutorial, your variations on that, stuff that just occurred that you can do with what you know so far, etc.
mastery requires commitment.
if you don't want to put 10 years into programming, then what do you even want to do? Why did you want to learn to program in the first place?
Maybe you'd be more satisfied with Zachtronics games on Steam.
Maybe what you really want is eloquentjavascript.net/ , a copy of Twine, and a friend to copyedit your CYOA cocksucking fantasies.

I know. this board is filled with a bunch of little bratty gen-x fags

It is too big of a commitment for you. Give up.

...

I feel you OP. I've been programming a long time, and work as a programmer now, but the complexity of modern programming still feels overwhelming sometimes. To some extent being a programmer requires being comfortable with working with a lot of different systems that you don't really understand.

If you are looking for something simple I would suggest C/C++ with gcc/g++. As far as I know, gcc is a single monolithic executable that compiles your program into an executable. Compared with newer languages, this is actually very simple. And once you internalize the fact that in C/C++, #include is literally just including a text file, it gets even simpler.

Python is superficially simple if you can ignore the fact that what's going on under the hood is incredible complex.

Lisp may be an option, personally I don't like Lisp-like syntax.

I have a hobby language that should be very simple (it will be self-hosted so it will be written in itself) but it will probably be years, if ever, before I release it.

Python is high level EXACTLY because it shouldn't matter what it does in the background. Which is still about as complex as the shit C++ does. Also, moderately big C and C++ programs will require autotools or other automated build systems, and that's where nightmare begins.

Yeah it's not bloated at all.

Just fucking write a Makefile collection (avoid recursive Makes).

Forget about these fags and their bloat. This is what a real C compiler + software suite should be:

Pelles C: pellesc.de/index.php?page=download&lang=en&version=8.00
Size: 9.55 MB

And this is a fully fledged IDE, it even has a fucking image editor so you can make your own icons. All of the people who claim that it's reasonable to have a 1GB download or even a 500GB download are a bunch of niggers. Even what I would consider a bloated C/C++ compiler + software suite, Open Watcom, is only fucking 80MB. And that's for like 40 diffrent C compilers, C++ compilers, and Fortran compilers, as well as an IDE, Image Editor, and a bunch of other weird tools that I couldn't figure out. It came with a version of vi that was called "Open Watcom vi". And yet it was under 1GB unlike nigger shit like GlibC. Don't listen to them OP, you are right.

meant to reply to OP, that link doesn't make sense I know

I mean me replying to makes no sense, not my download link fuck shit

#include void entry(void){ HANDLE std_handle = GetStdHandle(STD_OUTPUT_HANDLE); DWORD ncwr = 0; WriteConsoleA(std_handle,"Hello, World!\n",14,&ncwr,NULL); ExitProcess(0);}

...

That looks incredible. Does this even come with standard C libraries?