Looking for a new programming language to learn

Discussion in 'Computer Programming, Emulation, and Game Modding' started by Minnow, Sep 4, 2017.

  1. Minnow
    OP

    Minnow GBAtemp Fan

    Member
    4
    Oct 5, 2015
    Canada
    I'll get to the point: I want to learn another programming language well. Right now I would say I'm pretty good at: C and Python, although I've used Java and C++ quite a bit as well.

    I was thinking of trying Rust or D, but wasn't entirely sure. Maybe a functional language like Haskell? I really don't know.

    Hit me up with a language (and why), folks.
     
  2. DarkOrb

    DarkOrb GBAtemp Regular

    Member
    5
    Oct 11, 2013
    Germany
    Machine Code. :D
     
    migles likes this.
  3. gnmmarechal

    gnmmarechal GBAtemp Guru

    Member
    14
    GBAtemp Patron
    gnmmarechal is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 13, 2014
    Portugal
    https://gs2012.xyz
    Dunno, depends on what you want to do. Programming languages aren't that different from each other once you learn a couple of them, but some are more fit for a certain purpose.
     
  4. Hayato213

    Hayato213 GBAtemp Guru

    Member
    12
    Dec 26, 2015
    United States
    Try High Level Assembly
     
    migles likes this.
  5. Minnow
    OP

    Minnow GBAtemp Fan

    Member
    4
    Oct 5, 2015
    Canada
    I'm more of a low-level programmer, but I want to learn something different. If I'm completely honest I want to learn a functional language. Can you recommend any?
     
  6. Rusb

    Rusb GBAtemp Regular

    Member
    5
    Apr 17, 2014
    I would go with x86 inline assembly and x86 assembly.

    Why?
    The most obvious reason: Optimization.
    Yes, the compiler does a good job optimizing code but it's not always magic. Learning machine code can be helpful for:

    -Understanding at a low level how things work.
    -Introducing you to OS/microsystems development
    -Speedup programs
    -RE, is not only useful for hacking purposes (modding etc...) but sometimes you have to debug things that doesn't have debug symbols nor you have the source... have fun.

    And obviously, the most important part. SIMD.

    The "normal code optimizations" are done quite well by te compiler, but the compiler usually don't use SIMD. So if you learn to use that instructions (Trust me, is not easy because the documentation in some cases are a little... (hello arm))
    you can speedup things to run loooot faster with SIMD, there are restrictions to the use of that instructions but you can learn them on the go.

    (Note that there are macros for use SIMD without assembly)

    Haskell is a good PL to learn, different and pretty fast.


    P.D. Just don't try to build ALL in assembly, use C/C++, you can create symbols in a .s (assembly code) and then compile it and use the symbols (functions, etc...) directly on the c/c++ code.
    Also, inline asm is a good way to program, but remember, portability will not be possible to other archs. So you would like to have two types of functions, the assembly one and code one, use IFDEF or something like that
     
    Last edited by Rusb, Sep 4, 2017
  7. Minnow
    OP

    Minnow GBAtemp Fan

    Member
    4
    Oct 5, 2015
    Canada
    Thanks, appreciate the response.
     
  8. Luglige

    Luglige hiatus

    Member
    5
    Jan 24, 2016
    Antarctica
    under your bed
    https://en.wikipedia.org/wiki/LOLCODE
    Now this is the stuff.
     
    Tomato Hentai and Catsinabucket like this.
  9. gnmmarechal

    gnmmarechal GBAtemp Guru

    Member
    14
    GBAtemp Patron
    gnmmarechal is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 13, 2014
    Portugal
    https://gs2012.xyz
  10. Luglige

    Luglige hiatus

    Member
    5
    Jan 24, 2016
    Antarctica
    under your bed
  11. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    19
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Mar 17, 2010
    Norway
    Alola
    C#? It's quite similar to Java in many ways so it should be a breeze to learn.
    I find it really quick to code in, which is why I like it so much.
     
  12. jt_1258

    jt_1258 Human?

    Member
    9
    Aug 21, 2016
    United States
    Somewhere
    have you ever considered brainfuck
     
  13. tbb043

    tbb043 Member

    Member
    8
    Jan 30, 2008
    United States
    COBOL
     
  14. FAST6191

    FAST6191 Techromancer

    pip Reporter
    24
    Nov 21, 2005
    United Kingdom
    "Rust or D ... Haskell"
    Don't do it. It sounds like you have already made it so no great need to pick either an academic language or one that failed to launch (Rust and D certainly have their fans and if you are needing to get into "safe" programming then there are worse choices). I try always to pick a language that people know and use, and by similar token I would considerably rather have an obfuscation contest than watch someone try to do something in an esotetric language.

    Personally I would double down on what you already know -- bit hazy on crypto and security? Sort that out. Don't know how to make awesome GUIs? Any of those languages do well for it. Don't know your 3d APIs? Well now, I am not sure about python but the rest can speak to directX or opengl well enough. You say you have done a bit of C++ and I will believe it, however a bit of C++ is enough to hang you if you have to use it in anger. There is some really subtle stuff it brings to the table and if you are mainly a C kind of guy it definitely will have things to trip you up. Assembly is not without its uses, especially if you want to go low level, debugging, hacking and such but it is increasingly sidelined (2011 or so was it when compiler intrinsics were introduced and basically bumped inline assembly into history) as it is really hard to use with a lot of modern security.

    That said I might float the idea of avisynth if you are mainly looking for something fun
    http://avisynth.nl/index.php/Main_Page
    It is an amazing video editor but being script based not so many consider it. Said scripts make it hellishly powerful though, and being scripts are inherently self documenting, reusable and adaptable at any level you like. People tell me open source can't compete with adobe, apple and sony offerings and to that I say pah, until we start needing the crazy 3d modelling and tracking stuff (though even there you are not without options) I will go toe to toe with you using avisynth.
     
    gnmmarechal and Minnow like this.
  15. wolfmankurd

    wolfmankurd GBAtemp Regular

    Member
    3
    Jul 20, 2013
    Verilog, get yourself a cheap FPGA/CPLD like the MAX II from Altera as cheap as 10 bucks for board + programmer. Download Quartus II web (for free) get the version that supports MAX II / EPM240 devices and enter a new world.
    If you can't be bothered to learn a HDL but want to broaden your horizon learn a more functional programming language maybe Haskell, or a lisp, maybe both with Clojure? Both have excellent free online books which are considered the definitive beginner text.

    Finally no "what language should I learn" discussion would be complete without mentioning Rust, they have a great community and documentation too.

    Personally I'd recommend all programmers experience a Lisp, functionally programming (like Haskell) and Clojure is a good way to do both. I also recommend Rust as a "language of the future"(TM).

    Why? Well I wont lie to you and say your first job will have you banging out sythenesisable logic or even have you write some Haskell. But knowing about this programming paradigms **will** make you a better programmer and improve your C and Python (if you want them to be your home languages). If you wrestle with Rusts compiler for 6 months you will definitely learn a thing or two about what makes safe concurrent code and how to write explicit code making your intention clear to other programmers and of course the compiler. It compiles down to comparable speed as C/C++.

    Other than Rust every language I've mentioned is functional, while HDLs tend to be imperative you can't really think of what they produce as imperative on a larger scale (what happens inside a clocked block is imperative but the interactions are functional -- i.e. combination logic in general is functional). In a way with HDLs you think functionally, write imperatively and make something that runs functionally...
     
    Last edited by wolfmankurd, Sep 4, 2017
    Minnow likes this.
  16. catlover007

    catlover007 Developer

    pip Developer
    8
    Oct 23, 2015
    Germany
    do you know Nim(https://nim-lang.org/)?
    It has a Python like syntax but is statically typed and compiles to C or C++ code, so you have interop with other C or C++ libraries is pretty easy.

    EDIT: it also features meta programming(macros, ...) like e.g. lisp and a garbage collector
     
    Last edited by catlover007, Sep 4, 2017
    wolfmankurd likes this.
  17. Termer

    Termer Fullstack developer

    Member
    2
    Apr 26, 2017
    United States
    The nearest computer
    Try learning JavaScript. As a low-level coder, I'm sure this will a be fun project, considering how high-level it is. Also try TypeScript, a variant of JS with slightly stricter rules.
     
  18. Luglige

    Luglige hiatus

    Member
    5
    Jan 24, 2016
    Antarctica
    under your bed
    omg stop.
     
    jt_1258 likes this.
  19. gnmmarechal

    gnmmarechal GBAtemp Guru

    Member
    14
    GBAtemp Patron
    gnmmarechal is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    Jul 13, 2014
    Portugal
    https://gs2012.xyz
    How come you don't say that to whitespace
     
  20. Luglige

    Luglige hiatus

    Member
    5
    Jan 24, 2016
    Antarctica
    under your bed
    cause no care.
     
Quick Reply
Draft saved Draft deleted
Loading...