[ / / / / / / / / / / / / / ] [ dir / arepa / fur / hisrol / loomis / s8s / sw / vg / vore ][Options][ watchlist ]

/tech/ - Technology

You can now write text to your AI-generated image at https://aiproto.com It is currently free to use for Proto members.
Name
Email
Subject
Comment *
File
Select/drop/paste files here
Password (Randomized for file and post deletion; you may also set your own.)
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Expand all images

[–]

 No.932610>>932613 >>932614 >>932727 >>933184 [Watch Thread][Show All Posts]

I've been trying to learn Rust as my first programming language for the past month or two(i have some experience in java and C) but I just can't get into it. How can I motivate myself to actually learn a language and what are the best resources for beginners? Every time I try to get into it I find myself getting distracted and i'm dumb as fuck with programming concepts, i need to find somewhere where i can learn them.

>tfw brainlet

 No.932611

Start with Java or C#. Preferably Java 10. After that learn something that has manual memory management like D/Nim/Rust. Try to stay away from C/C++ though.


 No.932613>>932623

>>932610 (OP)

Unironically learn a scripting language first. Stop listening to neckbeards who start crying about it, you need to be able to understand what the fuck you're doing before you can start writing C programs. Autists usually have hard time imagining themselves in someone else's shoes, thus they tell you to use the hardcore shit right away because they think everyone can understand it on the same level as they do.

There's kind of 2 different parts you need to learn about programming. The first is how to write code that does the things you want to do, and the second is to understand the actual data that you're interacting with and how it's transformed from one form to another. You need more and more of the latter when you go into low level languages like C, but with high level languages like scripting languages you can focus on just the first part, i.e. writing the systems of your program.

When you think you understand how to write programs and make them do things, then think about whether you want to learn a lower level language.


 No.932614>>932623 >>932727

>>932610 (OP)

What do you want to do? The answer depends on which of these groups describes you best.

> Just glue some shit together and be done with it

Learn shell scripting and Python (in that order), maybe Awk and Perl if you also want to transform text. A good guide for learning Shell scripting:

https://developer.apple.com/library/archive/documentation/OpenSource/Conceptual/ShellScripting/Introduction/Introduction.html

Yes, it's from Apple, but it applies to all Unix-like systems. For Awk there is the original Awk book, you can find a PDF of it easily. I don't know about Python, I just followed the official guide.

> Want to actually make things

Learn C. It's a small language, so it's really easy to work through it. It is also full of pitfalls, so it teaches you to code defensively and be on your guard rather than relying on the garbage collector and having it tank your performance because you keep allocating new objects like an idiot. Good books are K&R C and Expert C programming. From there on you can go into more complicated languages.

> Learn computer science and programming concepts

Read SICP. It's a very long book, but it's pleasant to read. You should do the exercises as well because it's a textbook. It's available freely, I recommend the newer LaTeX typeset version because it has nicer typography:

https://sicpebook.wordpress.com/ebook/

You can also watch the recorded lectures:

https://sicpebook.wordpress.com/ebook/

>>932610 (OP)

> Every time I try to get into it I find myself getting distracted

This is a problem I don't know how to deal with. Personally I would recommend to start with the first option because it gives you some useful skills you can use right away, not something that will pay off six gorillion hours later. Start with the shell, that's going to be your most useful tool on your toolbelt, it's like the duct tape of scripting. If you were to learn only one language, I would recommend shell scripting to be it. Python would be my second pick, it has a nice syntax and does a lot of things magically, but its greatest strength is the massive number of libraries. Whatever you want to do, chances are there is a Python library for it, so you can glue a script together and run it.


 No.932616

"Programming" alone is useless.

Get into mathematics or physics, then you would have some application.


 No.932623>>932625 >>932653 >>932722

>>932613

>You need more and more of the latter when you go into low level languages like C, but with high level languages like scripting languages you can focus on just the first part, i.e. writing the systems of your program.

You can "focus on just the first part" with any language, but C sucks so much that you can't. The problem isn't that C is low level, it's that it's broken and full of bullshit.

>>932614

>Learn C. It's a small language, so it's really easy to work through it.

C is not a small language. It's much less useful than smaller languages and a large part of the library sucks so much that you're better off pretending it doesn't exist. It's so much less useful than larger languages, even UNIX languages like PHP and C++, that they're probably 10 to 1000 times more productive, depending on the program. I think the problem is that you consider size to be just language features and not every language rule. C's rules don't add anything to the programmer's productivity but they make compilers more bloated and programs more complicated because you have to code around them.

>It is also full of pitfalls, so it teaches you to code defensively and be on your guard rather than relying on the garbage collector and having it tank your performance because you keep allocating new objects like an idiot.

Freeing memory has nothing at all to do with the pitfalls of C. It's like saying JavaScript and PHP sucking has something to do with garbage collection. If you have to allocate new objects with garbage collection, you have to do it with C malloc too.

   > There's nothing wrong with C as it was originally 
> designed,
> ...

bullshite.

Since when is it acceptable for a language to
incorporate two entirely diverse concepts such as setf
and cadr into the same operator (=),
...

And what can you say about a language which is largely used
for processing strings (how much time does Unix spend
comparing characters to zero and adding one to pointers?)
but which has no string data type? Can't decide if an array
is an aggregate or an address? Doesn't know if strings are
constants or variables? Allows them as initializers
sometimes but not others?

(I realize this does not really address the original topic,
but who really cares. "There's nothing wrong with C as it
was originally designed" is a dangerously positive sweeping
statement to be found in a message posted to this list.)

I feel compelled to submit the following piece of C code:

switch (x)
default:
if (prime(x))
case 2: case 3: case 5: case 7:
process_prime(x);
else
case 4: case 6: case 8: case 9: case 10:
process_composite(x);

This can be found in Harbison and Steele's "C: A Reference
Manual" (page 216 in the second edition). They then remark:

This is, frankly, the most bizarre switch statement we
have ever seen that still has pretenses to being
purposeful.

In every other programming language the notion of a case
dispatch is supported through some rigidly authoritarian
construct whose syntax and semantics can be grasped by the
most primitive programming chimpanzee. But in C this highly
structured notion becomes a thing of sharp edges and lose
screws, sort of the programming language equivalent of a
closet full of tangled wire hangers.


 No.932625


 No.932653>>932727

>>932623

Steve is that you? Where did C touch you this time?


 No.932722

>>932623

>something about PHP being more productive

How does a hypertext preprocessor apply to C, C++, Java, or any other language not specific to hypertext? It doesn't.

>garbage collection

No garbage collection in C.

> = is setf and cadr

Wrong.

>some switch statement complaint

Anyone who uses an if conditional within a switch statement doesn't know how their language works. That's a really poor example of anything.


 No.932727>>932728

>>932610 (OP)

>Every time I try to get into it I find myself getting distracted

That's why you should follow >>932614 's advice and read SICP. You will be using Scheme which is a very simplistic language so that you can focus less on the language and more on the actual programming aspect.

I would also advise against learning Rust. It's almost as big of a mess as C++.

>>932653

How many times do you have to be told that hating C doesn't mean you like Rust. It's easy to see how much C brain damage is still in Rust. Instead of starting over with a clean slate and desigining a good language, they just took a concoction of C and C++ and tried to add bandages to try and fix the language. It just turns out to be a mess you have to carefully navigate through.


 No.932728>>932741

>>932727

>starting over with a clean slate and desigining a good language

That's a funny way to spell Jai


 No.932741

>>932728

>Jai

Isn't that C++ like, but with some compile time evaluation.


 No.932749

Well, programming, CS and mathematics is cerebral shit, and being a lukewarm nu-male will get you nowhere. Go workout and get a pump going, get your temperature way up there, scalding hot, every single day. Play a sport, even if you're practicing drills on your own, and workout. I'm smartest and most creative when most intense, aggressive, 'hot', and bold. This shit is cold as fuck. You need to balance the mind with body. The best solution isn't the most narrow-minded, just fucking do it.

Drink some hotsauce. I make a hot and sour tea of spices, vinegar, hotsauce and herbs (herbs ain't spicy but I want the micro phyto nutrients).


 No.933184>>933190

File (hide): 0006cac682108de⋯.jpg (143.49 KB, 1000x447, 1000:447, 15.jpg) (h) (u)

>>932610 (OP)

Look into my eyes and repeat after me. Don't look at them, just at me.

> learn

< learn

> python

< python

It has easy to master syntax, has fantastic support and is actually used by professionals.

Repeat after me again:

> nobody

< nobody

> uses

< uses

> C

< C

You've learnt enough, leave this board until you've learned python.


 No.933190>>933281

>>933184

>nobody uses

If you want to go there then Javascript is much more popular than Python.


 No.933281>>933283

>>933190

JS is popular, but teaches you less than python does and lots of its lessons don't carry over. Array mapping, promises and arrow notation don't exist out of JS, and that's assuming you're learning ES6


 No.933283>>933300

>>933281

Promises are a thing in Rust and C++


 No.933289

I've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming languageI've been trying to learn Rust as my first programming language


 No.933293

It depends on what you want to achieve. Generally spoken, I would suggest you start with C. It's 'outdated' but a very good fundament for many other languages and rather easy to learn. You can go very low-level in C, even ASM-inlines are possible. C does not forgive mistakes. If you make an error, e.g. a buffer-overlow, your program will crash. That's the way you learn to write clean and beautiful code.

Learn to love the pointer :)


 No.933300

>>933283

The more you know I guess. Either way, JS has a bunch of autism that other languages don't.




[Return][Go to top][Catalog][Screencap][Nerve Center][Cancer][Update] ( Scroll to new posts) ( Auto) 5
19 replies | 1 images | Page ???
[Post a Reply]
[ / / / / / / / / / / / / / ] [ dir / arepa / fur / hisrol / loomis / s8s / sw / vg / vore ][ watchlist ]