Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

Learning a new programming language

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
124 posts
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

Which language would you recommend that I learn?

Poll ended at Thu Feb 25, 2021 3:19 pm

Golang
3
9%
Rust
11
32%
C
15
44%
Other
5
15%
Would not recommend learning a new language
0
No votes
 
Total votes: 34
Your vote has been cast.

Author
Message
zah21
n00b
n00b
Posts: 27
Joined: Fri Jan 15, 2021 10:38 am

Learning a new programming language

  • Quote

Post by zah21 » Tue Jan 26, 2021 3:19 pm

Hi guys,

I'm considering learning a new programming language this year. I'm proficient with Python & I've also coded data structures from scratch in C++ so a bit familiar with that as well.

Anyway, I've researched a bit about the languages that are worth learning and here are the choices that I came up with: Go Lang, Rust & good old C.

Let me know which one would you recommend.

Thanks.
Top
Ant P.
Watchman
Watchman
Posts: 6920
Joined: Sat Apr 18, 2009 7:18 pm
Contact:
Contact Ant P.
Website

  • Quote

Post by Ant P. » Tue Jan 26, 2021 5:17 pm

Raku
Top
Irre
Guru
Guru
Posts: 434
Joined: Sat Nov 09, 2013 10:03 am
Location: Stockholm

  • Quote

Post by Irre » Tue Jan 26, 2021 5:39 pm

I am very old (73). I have programmed, in order: Algol, Fortran, PL/1, Assembler, Rexx, C/C++

The only language I really liked was: Rexx
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Jan 26, 2021 7:45 pm

zah21,

Choose a language that is popular is the problem field you want to work in.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
apiaio
Guru
Guru
Posts: 443
Joined: Thu Dec 04, 2008 1:49 pm

  • Quote

Post by apiaio » Tue Jan 26, 2021 7:48 pm

I am not so old as Irre. Only 66 :) .
I have programmed, in order: Algol, Fortran,Cobol, Assembler 8008 ... Macroassembler PDP11M, Pascal.
Nowadays LAMP, JS, SQL as hobby. I have never been professional programmer.

@zah21 - doesn't matter which language you will start learning. All of them are similar. Next year will appear
another language.

Edit:
And yes. NeddySeagoon is right.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56082
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Tue Jan 26, 2021 8:24 pm

Its time to roll out the Gentoo Old Timers.
That was created in response to Gentoo Young Ones.

I'm 67 and learned Algol, BASIC, FORTRAN and a smattering of different, mostly 8 bit assemblers. 6800, 6502. Z80 ...
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
The Doctor
Bodhisattva
Bodhisattva
User avatar
Posts: 2678
Joined: Tue Jul 27, 2010 10:56 pm

  • Quote

Post by The Doctor » Wed Jan 27, 2021 2:44 am

If you are learning for fun I recommend Haskell because it is so different. (I (also (think (lisp (might (be (fun.))))))) But the parenthesis are a bit much. Both of these languages are actually fairly popular among their users.

Learning more of the same is just boring and brings negative transfer to your programming in both languages.
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4692
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Wed Jan 27, 2021 10:32 am

Learn awk and perform magic on the command line. ;)
awk is the last language I learnt. It's been quite useful for myself.

Next I'll get into go maybe... or rust. Hard to decide.
..: Zucca :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
Irre
Guru
Guru
Posts: 434
Joined: Sat Nov 09, 2013 10:03 am
Location: Stockholm

  • Quote

Post by Irre » Wed Jan 27, 2021 11:19 am

A language I never learned was APL (Another Programming Language!). It was very compact, but impossible (for me) to understand.
Top
C5ace
Guru
Guru
Posts: 517
Joined: Mon Dec 23, 2013 12:44 am
Location: Brisbane, Australia

  • Quote

Post by C5ace » Wed Jan 27, 2021 11:41 am

Learn C and get an understand of assembler. You can then code anything you want.
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as perl, python, C++, C#, Rust and the likes.
Top
xahodo
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 82
Joined: Thu May 17, 2007 12:36 pm
Location: Gouda, the Netherlands

  • Quote

Post by xahodo » Wed Jan 27, 2021 4:57 pm

Well, I have a bunch of questions, before I can provide an answer:
  • Which architectures do you intend to target?
  • Which OSs do you plan to target?
  • What do you want to achieve with your software?
Rust is actually quite fun to learn (but the borrow checker can give you hell), but it doesn't support that many platforms (yet). There's also the issue that they don't have that much stuff going for them when you want to program a gui or game.
On the other hand, bash scripting is nice to learn so you can create your own ebuilds and have a bit of fun with the console doing stuff.
Or, if you're a masochist, brainfuck is most certainly an option. :)
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Thu Jan 28, 2021 3:55 am

Irre wrote:I am very old (73). ...
Ouch. I read that and said to myself, wow that's old. Then I realized, me too.

I wouldn't recommend random learning of another programming language. Learn what you need to be productive, marketable.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
Muso
Veteran
Veteran
User avatar
Posts: 1052
Joined: Tue Oct 22, 2002 7:45 am
Location: The Holy city of Honolulu
Contact:
Contact Muso
Website

  • Quote

Post by Muso » Thu Jan 28, 2021 6:35 am

Go

The speed (nearly) of C with the ease of Python.
"You can lead a horticulture but you can't make her think" ~ Dorothy Parker
2021 is the year of the Linux Desktop!
Top
psycho
Guru
Guru
User avatar
Posts: 553
Joined: Fri Jun 22, 2007 1:40 am
Location: New Zealand

  • Quote

Post by psycho » Thu Jan 28, 2021 7:55 am

This short article gives some good reasons to learn C. TLDR version:

1) It's low-level enough that it makes you more aware of what your code is actually doing (e.g. with memory etc.), with potential benefits to the way you think about programming, even in other languages.
2) It's so old and yet still so widely used that it's one of the languages most likely to be used to illustrate programming concepts (e.g. other languages will often show off their features next to C equivalents).
3) It's still the language that most of the basic stuff is written in (Linux and other kernels, most of the GNU tools, etc.).
Top
Banana
Administrator
Administrator
User avatar
Posts: 2385
Joined: Fri May 21, 2004 12:02 pm
Location: Germany
Contact:
Contact Banana
Website

  • Quote

Post by Banana » Thu Jan 28, 2021 8:12 am

I choose my language which fits the "problem" I want to solve. I find it easier to have a problem/task to work with then just learning it by a book. General books about a language still help but learning by doing works better for myself.

I recommend haskell and smalltalk to be added to the list.
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Thu Jan 28, 2021 12:49 pm

I'll second the vote for Smalltalk if you just want to learn more about programming. The pure OO mindset is well worth acquiring IMHO.
Greybeard
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Thu Jan 28, 2021 6:35 pm

I like learning new things that are very different from what I already know.
You know, you can have 3 hammers, but you could do the same job with just one hammer most of the time, so you can replace 2 of those with a saw and a drill to make your toolbox much more versatile.

If you already know OOP, how 'bout checking out FP? Haskel, erlang, lisp? AFAIR lisp in particular allows programmers to develop very advance software in a very short time. Which results in a situation where every user has his own implementation of X solving 90% of the general problem, and it's a different 90% than all the other implementations :lol:
I've tried erlang and it was pretty convenient with it's actor model, great for building distributed, asynchronous systems.

Shell is a powerful tool too, it has some quirks, but it does a pretty good job when you want to process a data stream.
Both of these languages are actually fairly popular among their users.
a bowl of water is wet inside :lol:
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Thu Jan 28, 2021 8:43 pm

psycho wrote:learn C
Do you know of any resources that address modern "best practices" that avoid the "bad parts" of the language? I only seem to come across them in bits and pieces, and I'd rather not learn it incorrectly. For a lot of it, I suppose a quick reference guide of "Do use / Don't use" and "Do / Don't do" would probably be fine. I need to get back to K&R.
Quis separabit? Quo animo?
Top
The Doctor
Bodhisattva
Bodhisattva
User avatar
Posts: 2678
Joined: Tue Jul 27, 2010 10:56 pm

  • Quote

Post by The Doctor » Fri Jan 29, 2021 9:04 am

The thing about best practices is I don't think any such thing exists. I've had several professors fundamentally disagree about what best practices are. It seems to me that the real best practices are to adopt a maintainable style for yourself and stick to it.

Just my 2 cents.
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Top
C5ace
Guru
Guru
Posts: 517
Joined: Mon Dec 23, 2013 12:44 am
Location: Brisbane, Australia

  • Quote

Post by C5ace » Fri Jan 29, 2021 10:16 am

pjp wrote:
psycho wrote:learn C
Do you know of any resources that address modern "best practices" that avoid the "bad parts" of the language? I only seem to come across them in bits and pieces, and I'd rather not learn it incorrectly. For a lot of it, I suppose a quick reference guide of "Do use / Don't use" and "Do / Don't do" would probably be fine. I need to get back to K&R.
MISRA-C
https://andrewbanks.com/wp-content/uplo ... dard_C.pdf
plus many more.
Observation after 30 years working with computers:
All software has known and unknown bugs and vulnerabilities. Especially software written in complex, unstable and object oriented languages such as perl, python, C++, C#, Rust and the likes.
Top
zah21
n00b
n00b
Posts: 27
Joined: Fri Jan 15, 2021 10:38 am

  • Quote

Post by zah21 » Fri Jan 29, 2021 3:19 pm

Hello guys,

Looks like the star of the show is C & Rust. That's good, I've just bought books from Humble Bundle few months ago covering those languages :P

Go is also not that bad, I mean it has concurrency builtin and language is kind of similar to Python.

It's hard to decide right now, may be I'll do a coin toss & decide later :)
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Fri Jan 29, 2021 5:38 pm

The Doctor wrote:The thing about best practices is I don't think any such thing exists. I've had several professors fundamentally disagree about what best practices are. It seems to me that the real best practices are to adopt a maintainable style for yourself and stick to it.

Just my 2 cents.
Yeah, I wasn't sure how to put it other than that. I'm referring to the parts that are known as "don't do" (incorrect use of scanf being the most obvious). I guess I should try to put together a list as I come across them. Also, I've read about some professors who teach Bad Things, so there's that (I can't recall specifics, but they fell into the category of the stuff I was hoping to find in a quick reference format).


@C5ace: Thanks. Firefox doesn't render it, so I'll have to find a reader. I think at some point I'd seen a reference to the JPL, but it seemed a bit unapproachable at the time. Will work some more on the K&R this afternoon.
Quis separabit? Quo animo?
Top
Hu
Administrator
Administrator
Posts: 24386
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Fri Jan 29, 2021 6:30 pm

I've read claims that Rust is good because it makes it hard to write certain types of bugs, and improves the review process by confining certain bug types to areas that are easier to recognize. I can't get over how incredibly bad their install/bootstrap process is, so I've never been able to take the language seriously. This may be an overgeneralization, but my perspective is that if they can't even care about having a good install process, something that everyone has to deal with and where bad practice is blatantly obvious, how can I expect them to care about doing a good job elsewhere, on the parts where I can't readily evaluate how well or poorly it was done?
Top
pjp
Administrator
Administrator
User avatar
Posts: 20668
Joined: Tue Apr 16, 2002 10:35 pm

  • Quote

Post by pjp » Fri Jan 29, 2021 6:46 pm

Not being a developer, what has turned me off of rust has been the community "PR" efforts (I'll leave it at that). I still decided to give it a look, and here's what I found:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
I can't take anything seriously that recommends that approach.
Generating a new project

Let’s write a small application with our new Rust development environment. To start, we’ll use Cargo to make a new project for us. In your terminal of choice run:

cargo new hello-rust

This will generate a new directory called hello-rust with the following files:
Seriously? For "Hello, world!"?

There was some awkward / confusing syntax too, but I suppose I'd eventually figure out that. I've read / heard that there is a somewhat steep learning curve even for experienced developers. But the first 3 issues are significantly off-putting (and that excludes other issues I've read about, so I've decided for now that it isn't for me).
Quis separabit? Quo animo?
Top
psycho
Guru
Guru
User avatar
Posts: 553
Joined: Fri Jun 22, 2007 1:40 am
Location: New Zealand

  • Quote

Post by psycho » Fri Jan 29, 2021 9:16 pm

Code: Select all

fn main() {
  println!("hello world");
}
That's literally all there is to it (well, and rustc hello.rc && ./hello). I feel as though if a language gets any simpler than that it's making too many assumptions where I'd rather tell it explicitly what to do...but that's probably just an irrational feeling. I think my first hello world was something like

Code: Select all

10 PRINT "HELLO WORLD"
(followed by "RUN") on an Apple II (no lowercase in those days). As a result I probably just feel like adding a few brackets makes it a superior language :D
Top
Post Reply
  • Print view

124 posts
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic