Programming thread -

cecograph

kiwifarms.net
While I see nothing wrong with learning x86 assembly, I think it would be more worthwhile to learn about vectorization and AVX instructions.
If you want to write fast code, you want to know about vector instructions, and that's been true since they were introduced in the x86 line with MMX back in the 90s. You don't have to leave C/C++ to use them, since any language claiming to be a systems language will expose vector instructions through a library (compiler intrinsics).

This is somewhat old-hat though, and if you really care for high-performance computing, you'll be wanting to move to the dedicated vector processors we've had in our graphics hardware since programmable shaders got introduced: so learn something like CUDA.

Any familiarity with assembly is still going to be useful if you're optimising based on what a compiler spits out, and even if it's not x86, knowing at least one assembler will help you read, say, JVM bytecode.
 

omnihitler

kiwifarms.net
My main goal with picking up assembler is debugging, as strange as that might sound. I’ve been running into strange behaviors using googletest that I can’t replicate in production. Googletest’s documentation hasn’t been helpful and neither has GDB. The hope is that I can get a better picture of what’s happening by looking at the generated assembly code.

E: additionally I want to get better insight into what certain C++ STL classes are doing when they exit the stack.
 
  • Informative
Reactions: FuckedUp

ditto

I need love as much as I need salt
kiwifarms.net
And so my problem with Ruby was always: why aren't you using Smalltalk? Alan Kay is smarter than you.
Because I like to run my apps on something other than the dev machine. Smalltalk deployment is a nightmare.
 

Least Concern

Pretend I have a waifu avatar like everyone else
kiwifarms.net
My main goal with picking up assembler is debugging, as strange as that might sound. I’ve been running into strange behaviors using googletest that I can’t replicate in production. Googletest’s documentation hasn’t been helpful and neither has GDB. The hope is that I can get a better picture of what’s happening by looking at the generated assembly code.
Then you're a little off base. Compilers do not (generally, you pedants) generate assembly code. They generate machine code, which is a sequence of de-symbolized direct CPU instructions. While assembly is "closer" to direct CPU instructions than languages like C (which was in its day considered a high-level language), it's still something where you're writing code files with a text editor which must themselves be compiled before execution, and you still have things like macros (functions, kind of) and labels for memory locations (variables, kind of), human-friendly abstractions that are done away with by the compiler when generating machine code.

That being said, assembly is so low-level that it may be of use to you for this goal anyway.
 
  • Like
Reactions: ConcernedAnon

FuckedUp

Trump's half-Chosen
kiwifarms.net
Then you're a little off base. Compilers do not (generally, you pedants) generate assembly code. They generate machine code, which is a sequence of de-symbolized direct CPU instructions. While assembly is "closer" to direct CPU instructions than languages like C (which was in its day considered a high-level language), it's still something where you're writing code files with a text editor which must themselves be compiled before execution, and you still have things like macros (functions, kind of) and labels for memory locations (variables, kind of), human-friendly abstractions that are done away with by the compiler when generating machine code.

That being said, assembly is so low-level that it may be of use to you for this goal anyway.
The three-year-old textbook for one of my college courses last semester said most compilers generate assembly and then use an assembler. Even if they don't, it really doesn't matter because you can easily use a disassembler to regenerate assembly from machine code.

Most assembly instructions correspond one-to-one with machine instructions, with some MIPS assembly instructions being 2-3 machine instructions rolled into one.
 
  • Informative
Reactions: Least Concern

garakfan69

Please be patient, I have idiocy
kiwifarms.net
The three-year-old textbook for one of my college courses last semester said most compilers generate assembly and then use an assembler. Even if they don't, it really doesn't matter because you can easily use a disassembler to regenerate assembly from machine code.
Yeah, with GCC you can just add "-S" to generate assembly code only.
 
With an object, the only option almost all of the time is you pass a valid object or you crash. No interpretation needed.
There's a third option that can't be ignored. Pass a crafted object and pop a reverse shell. Something being passed in often represents a trust boundary and, one way or another, it needs to be explicitly sanitized. A lot of correctness ensuring stuff is no good here. They rely on ensuring correctness through and through and the whole point here is you can't be sure of anything beyond that boundary. Some operating systems do ensure correctness everywhere in one way or another, which has its ups and downs. This is basically how powershell works, though note that's not actually IPC and it doesn't integrate with other software. Windows is still fundamentally pipe based for actual IPC.

My main goal with picking up assembler is debugging
You should be able to compile with debug symbols turned on (-g for g++) and have gdb show you the C++ code even for calls to the STL. Then you can use stepi and disassemble when it gets to something you aren't sure about. I'd just refer to the manuals or look stuff up with google for the assembly as you're going if it's just one piece of debugging you care about. Make sure you try a debugging allocator like dmalloc first. Heap corruption can cause weird inconsistent behaviors.

most compilers generate assembly and then use an assembler
Yeah, even compilers that don't bother to convert it into a text based representation and then call a separate assembler will still have a pass that goes from a sensible representation of each instruction down to the ridiculous hodge podge of something like x86.

Most assembly instructions correspond one-to-one with machine instructions
This is a common misconception. It's true enough for most purposes but the mapping isn't one-to-one for x86. For instance any register to register instruction that uses modrm addressing has two possible encodings, one where you say from register to [memory or register] and the other from [memory or register] to register. On the other side of the mapping, you have things like nop and xchg ax, ax which both assemble to 0x90.

That's splitting hairs shit though and not at all relevant to the discussion. The overall point that assembly and machine code are fairly trivially mapped is true.
 

Yotsubaaa

True & Honest Fan
kiwifarms.net
Preface: still a bit tipsy from New Years celebrating. I'll make sure to double-check that this post isn't too embarrassing tomorrow.)

Hey guys I finally got around to doing some Common Lisp programming! The discussion over here got me all inspired to mess around with some forum analytics sort of stuff. In particular, the sort of thread analysis that they're talking about doing (e.g. finding periods of high post frequency, sorting posts by most Winner/most Informative, and so on) is super super duper easy once we've scraped all of that information off of the webpage and into like objects or something like that.

So I was in the mood to start 2020 on the right foot by coding stuff right out of the gate, and here we go!
https://git.kiwifarms.net/Yotsubaaa/cl-kiwi

Still a bit bare-bones at the moment. There's some more stuff I want to do with it (e.g. the sorting and all that I mentioned above, but also like making some graphs and stuff so you can see what percentage of posts belong to certain users, which I thought would be kind of cool. But I've got the webpage scraper sort of working at this point. So like I can point it towards the first page of this thread and it scrapes+outputs this:
Code:
CL-USER> (map 'vector #'print-post-listing collected-posts)

https://kiwifarms.net/threads/programming-thread.41367/post-3231826
#01 (#3231826): Splendid
Posted: Apr 9, 2018 at 9:24 PM
Edited: NIL
Ratings: (Like 8 Informative 6 Winner 3 Agree 3 Semper Fidelis 3 Disagree 1
          Thunk-Provoking 1 DRINK! 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3231985
#02 (#3231985): _01
Posted: Apr 9, 2018 at 10:05 PM
Edited: NIL
Ratings: (Disagree 6 Agree 2 Islamic Content 1 Like 1 Feels 1 Thunk-Provoking 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3231993
#03 (#3231993): Splendid
Posted: Apr 9, 2018 at 10:08 PM
Edited: NIL
Ratings: (Agree 7 Like 5 Disagree 3 Optimistic 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3232008
#04 (#3232008): Marvin
Posted: Apr 9, 2018 at 10:13 PM
Edited: NIL
Ratings: (Informative 5 Like 2 Agree 1 Disagree 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3232051
#05 (#3232051): Splendid
Posted: Apr 9, 2018 at 10:27 PM
Edited: NIL
Ratings: (Feels 13)

https://kiwifarms.net/threads/programming-thread.41367/post-3232138
#06 (#3232138): Marvin
Posted: Apr 9, 2018 at 10:57 PM
Edited: NIL
Ratings: (Disagree 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3232161
#07 (#3232161): Splendid
Posted: Apr 9, 2018 at 11:06 PM
Edited: Apr 10, 2018 at 12:12 AM
Ratings: (DRINK! 2 Agree 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3232173
#08 (#3232173): AF 802
Posted: Apr 9, 2018 at 11:12 PM
Edited: NIL
Ratings: (Feels 2)

https://kiwifarms.net/threads/programming-thread.41367/post-3232188
#09 (#3232188): Splendid
Posted: Apr 9, 2018 at 11:16 PM
Edited: NIL
Ratings: (Agree 1 Like 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3232234
#10 (#3232234): Marvin
Posted: Apr 9, 2018 at 11:30 PM
Edited: NIL
Ratings: (Informative 3 Winner 2)

https://kiwifarms.net/threads/programming-thread.41367/post-3232246
#11 (#3232246): Splendid
Posted: Apr 9, 2018 at 11:34 PM
Edited: NIL
Ratings: (Feels 3)

https://kiwifarms.net/threads/programming-thread.41367/post-3232249
#12 (#3232249): CrunkLord420
Posted: Apr 9, 2018 at 11:34 PM
Edited: NIL
Ratings: (Informative 6 Like 2)

https://kiwifarms.net/threads/programming-thread.41367/post-3232261
#13 (#3232261): Splendid
Posted: Apr 9, 2018 at 11:39 PM
Edited: NIL
Ratings: (Thunk-Provoking 3 Islamic Content 1 Like 1 Agree 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3232267
#14 (#3232267): AF 802
Posted: Apr 9, 2018 at 11:40 PM
Edited: NIL
Ratings: (Agree 2 Like 1 Winner 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3232275
#15 (#3232275): Marvin
Posted: Apr 9, 2018 at 11:42 PM
Edited: NIL
Ratings: (Like 1 Disagree 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3232314
#16 (#3232314): CrunkLord420
Posted: Apr 9, 2018 at 11:52 PM
Edited: NIL
Ratings: (Informative 3)

https://kiwifarms.net/threads/programming-thread.41367/post-3232332
#17 (#3232332): Marvin
Posted: Apr 9, 2018 at 11:56 PM
Edited: NIL
Ratings: NIL

https://kiwifarms.net/threads/programming-thread.41367/post-3232374
#18 (#3232374): CrunkLord420
Posted: Apr 10, 2018 at 12:04 AM
Edited: NIL
Ratings: (Informative 5 Like 3)

https://kiwifarms.net/threads/programming-thread.41367/post-3232387
#19 (#3232387): Tookie
Posted: Apr 10, 2018 at 12:07 AM
Edited: NIL
Ratings: (Informative 1 Horrifying 1)

https://kiwifarms.net/threads/programming-thread.41367/post-3232406
#20 (#3232406): WW 635
Posted: Apr 10, 2018 at 12:11 AM
Edited: NIL
Ratings: (Agree 12 Deviant 2 Disagree 1)

CL-USER>
I dunno, I thought it was fun and thought I'd share. Happy New Year everybody! 2020!! Yeah! :heart-full: :heart-full:

EDIT: Added some of the more useful functionality now! e.g. for the posts on this page of the thread,
we can sort the posts by most informative:
Code:
CL-USER> (sort-posts-by-most "Informative")
(#<POST #768: Where Do You Find Them?, Dec 26, 2019 at 10:19 PM>
 #<POST #763: omnihitler, Dec 26, 2019 at 5:26 PM>
 #<POST #766: FuckedUp, Dec 26, 2019 at 6:40 PM>
 #<POST #767: garakfan69, Dec 26, 2019 at 6:50 PM>
 #<POST #761: Gorilla Tessellator, Dec 25, 2019 at 9:39 AM>
 #<POST #762: cecograph, Dec 26, 2019 at 9:13 AM>
 #<POST #764: ditto, Dec 26, 2019 at 5:43 PM>
 #<POST #765: Least Concern, Dec 26, 2019 at 6:16 PM>
 #<POST #769: Yotsubaaa, Jan 1, 2020 at 4:45 AM>)
CL-USER>
and then we can filter them to get only those posts between e.g. 5:00pm and 7:00pm on Dec 26, 2019:
Code:
CL-USER> (filter-posts-between "Dec 26, 2019 at 5:00 PM"
                               "Dec 26, 2019 at 7:00 PM")
(#<POST #763: omnihitler, Dec 26, 2019 at 5:26 PM>
 #<POST #766: FuckedUp, Dec 26, 2019 at 6:40 PM>
 #<POST #767: garakfan69, Dec 26, 2019 at 6:50 PM>
 #<POST #764: ditto, Dec 26, 2019 at 5:43 PM>
 #<POST #765: Least Concern, Dec 26, 2019 at 6:16 PM>)
CL-USER>
 
Last edited:

Yotsubaaa

True & Honest Fan
kiwifarms.net
Pardon the double-post, but wanted to show off a little bit more of my programming! I've gotten it to the point where we can start doing some cool things with it.

e.g. For this entire Programming thread, which of us are the most prevalent posters?

Well, we can use the adw-charting library to make a pretty pie chart (admittedly it's not as pretty as I'd like it to be just yet, but it does the trick):
piechart.png


e.g. And what are the ten most Informative posts in the thread, by ratings?
Code:
(let ((rating "Informative"))
  (mapcar (lambda (post)
            (format t
                    "[URL=~a]Post ~4,'0d[/URL], [COLOR=rgb(84, 172, 210)]~a: ~a=~d[/COLOR]~%"
                    (get-post-url post)
                    (get-post-number post)
                    (get-post-author post)
                    rating
                    (getf (get-post-ratings post)
                          (intern (string rating) :keyword))))
          (subseq (sort-posts-by-most rating) 0 10)))
Post 0477, Splendid: Informative=7
Post 0001, Splendid: Informative=6
Post 0012, CrunkLord420: Informative=6
Post 0405, Autocrat: Informative=6
Post 0004, Marvin: Informative=5
Post 0018, CrunkLord420: Informative=5
Post 0447, Marvin: Informative=4
Post 0483, DNJACK: Informative=4
Post 0678, CrunkLord420: Informative=4
Post 0700, cecograph: Informative=4

So it's coming along!

Now these graphs and metrics are all fun, but not so useful yet I guess. One of the other things I want to implement pretty soon though is binned post frequency. The idea the guys floated early in that Wiki Discussion thread (and one I tend to agree with) was that high periods of posting often correspond to useful developments in a timeline for a lolcow/phenomenon. So I think it'll be fun but also informative to make frequency plots for threads here. I imagine those will be a lot of help for efficiently searching and aggregating all of the useful information in each thread into wikis or whatever it is we're planning to do.
 

Shoggoth

kiwifarms.net
Some interesting reading material. Relevant if you're designing high scale systems
Organisations working in disparate domains are independently discovering patterns for building software that look the same. These systems are more robust, more resilient, more flexible and better positioned to meet modern demands.


These changes are happening because application requirements have changed dramatically in recent years. Only a few years ago a large application had tens of servers, seconds of response time, hours of offline maintenance and gigabytes of data. Today applications are deployed on everything from mobile devices to cloud-based clusters running thousands of multi-core processors. Users expect millisecond response times and 100% uptime. Data is measured in Petabytes. Today's demands are simply not met by yesterday’s software architectures.


We believe that a coherent approach to systems architecture is needed, and we believe that all necessary aspects are already recognised individually: we want systems that are Responsive, Resilient, Elastic and Message Driven. We call these Reactive Systems.


Systems built as Reactive Systems are more flexible, loosely-coupled and scalable. This makes them easier to develop and amenable to change. They are significantly more tolerant of failure and when failure does occur they meet it with elegance rather than disaster. Reactive Systems are highly responsive, giving users effective interactive feedback.

Reactive Systems are:

Responsive: The system responds in a timely manner if at all possible. Responsiveness is the cornerstone of usability and utility, but more than that, responsiveness means that problems may be detected quickly and dealt with effectively. Responsive systems focus on providing rapid and consistent response times, establishing reliable upper bounds so they deliver a consistent quality of service. This consistent behaviour in turn simplifies error handling, builds end user confidence, and encourages further interaction.


Resilient: The system stays responsive in the face of failure. This applies not only to highly-available, mission-critical systems — any system that is not resilient will be unresponsive after a failure. Resilience is achieved by replication, containment, isolation and delegation. Failures are contained within each component, isolating components from each other and thereby ensuring that parts of the system can fail and recover without compromising the system as a whole. Recovery of each component is delegated to another (external) component and high-availability is ensured by replication where necessary. The client of a component is not burdened with handling its failures.


Elastic: The system stays responsive under varying workload. Reactive Systems can react to changes in the input rate by increasing or decreasing the resources allocated to service these inputs. This implies designs that have no contention points or central bottlenecks, resulting in the ability to shard or replicate components and distribute inputs among them. Reactive Systems support predictive, as well as Reactive, scaling algorithms by providing relevant live performance measures. They achieve elasticity in a cost-effective way on commodity hardware and software platforms.


Message Driven: Reactive Systems rely on asynchronous message-passing to establish a boundary between components that ensures loose coupling, isolation and location transparency. This boundary also provides the means to delegate failures as messages. Employing explicit message-passing enables load management, elasticity, and flow control by shaping and monitoring the message queues in the system and applying back-pressure when necessary. Location transparent messaging as a means of communication makes it possible for the management of failure to work with the same constructs and semantics across a cluster or within a single host. Non-blocking communication allows recipients to only consume resources while active, leading to less system overhead.


Large systems are composed of smaller ones and therefore depend on the Reactive properties of their constituents. This means that Reactive Systems apply design principles so these properties apply at all levels of scale, making them composable. The largest systems in the world rely upon architectures based on these properties and serve the needs of billions of people daily. It is time to apply these design principles consciously from the start instead of rediscovering them each time.
 

facingafacade

kiwifarms.net
I've been learning Haskell the past week or so and having learned C++ first, I originally thought it made more sense because of the static typing, but the functional nature of Haskell makes thinking about program data flow so much more... perfect? I don't understand why people jump to Python or even Java. I've had to explain to multiple people why they're actually getting that error when they followed everything, or why something is bad organization.
 

Yotsubaaa

True & Honest Fan
kiwifarms.net
I've been learning Haskell the past week or so and having learned C++ first, I originally thought it made more sense because of the static typing, but the functional nature of Haskell makes thinking about program data flow so much more... perfect? I don't understand why people jump to Python or even Java. I've had to explain to multiple people why they're actually getting that error when they followed everything, or why something is bad organization.
Yeah, functional programming is great! (I mean, it's not the panacea that some of the FP evangelists like to claim it is, but it definitely gets you thinking about your code in a useful way!)

Related: I just now coded a function to find the (arithmetic) mean of a given set of n-dimensional numbers/vectors/lists/etc in Common Lisp for an algorithm that I want for the Kiwi Farms analytics stuff. Now, the mean of a list/vector is just a component-wise mean. So if I have a function that computes a 1-dimensional mean, then I should just be able to, like, 'map' that function component-wise across a bunch of lists/vectors, right? And using FP-style higher-order functions like map and reduce, I can write concise code that eloquently conveys that idea!
Code:
(defun mean (&rest values)
  "Return the MEAN (average) of the given VALUES."
  ;; In n-dimensions we just do it component-wise, so have a helper function:
  (flet ((1d-mean (&rest 1d-values)
           (/ (reduce #'+ 1d-values) (length 1d-values))))
    (if (realp (first values))
        (apply #'1d-mean values)
        (apply #'map (type-of (first values)) #'1d-mean values)))))
And sure enough, I can now take mean averages in n-dimensions (lists or vectors!):
Code:
CL-USER> (mean 1 2 3 4)  ; real numbers
5/2

CL-USER> (mean '(-1.0 2.0) '(-3.2 -4.5) '(3.1 2.1) '(1.2 -0.9))  ; 2D lists
(0.025000036 -0.32500002)

CL-USER> (mean #(1 1 1) #(2 0 3))  ; 3D vectors
#(3/2 1/2 2)
 

Shoggoth

kiwifarms.net
Yeah, functional programming is great! (I mean, it's not the panacea that some of the FP evangelists like to claim it is, but it definitely gets you thinking about your code in a useful way!)
Yes it is, and don't let anyone tell you otherwise 😉
Common Lisp
This isn't a knock on you or CL, so please don't take it the wrong way, but after getting used to Clojure's syntax CL looks so... archaic?
It's interesting that map allows you to specify the type you map over, in Clojure it's a lazy-seq by default, and if you want to eagerly map in a type preserving manner you usually just reduce into the `(empty coll)` as a baseline.
Finally, I wonder what the performance implications of apply are in CL and if they're similar to Clojure, I found it's usually a bit taxing where performance counts (still ~1e-7s, and yet)
 
  • Feels
Reactions: Yotsubaaa

Yotsubaaa

True & Honest Fan
kiwifarms.net
Yes it is, and don't let anyone tell you otherwise 😉
ForumPostFactory.buildPost(ForumType.Xenforo2("Kiwi Farms"), PostWriterSingleton.getInstance().write("Nuh uh. :stuck_out_tongue_closed_eyes:"));
Nuh uh. 😝

This isn't a knock on you or CL, so please don't take it the wrong way, but after getting used to Clojure's syntax CL looks so... archaic?
It's the square brackets, isn't it? They look so cool and stylish in Clojure and Racket! (But I like Common Lisp's parentheses everywhere...)

It's interesting that map allows you to specify the type you map over, in Clojure it's a lazy-seq by default, and if you want to eagerly map in a type preserving manner you usually just reduce into the `(empty coll)` as a baseline.
That's the return type that I'm specifying. I figured it looked nicer that way, but I didn't have to do it. I could have just returned everything in a list no matter what, e.g.
Code:
(defun mean (&rest vals)
  (apply #'map 
         'list 
         (lambda (&rest vals) (/ (reduce #'+ vals) (length vals)))
         vals))

(mean #(1 2 3) #(4 5 6))
;=> (5/2 7/2 9/2)
The mapped-over types absolutely have to be sequences, if I'm reading the hyperspec correctly.

Finally, I wonder what the performance implications of apply are in CL and if they're similar to Clojure, I found it's usually a bit taxing where performance counts (still ~1e-7s, and yet)
That's a good question! I admit that I haven't given it thought though (and in fact, arguably I shouldn't be using apply here at all really: mean should perhaps just take a list/vector of lists/vectors, instead of me getting fancy with arbitrarily-many parameters with the &rest specifier).
 

Splendid

Castigat ridendo mores
True & Honest Fan
kiwifarms.net
I don't think the world will ever go fully functional. Multi paradigm languages like C# are the future. The functional paradigm just has some pretty glaring gaps that cannot really be resolved (at least in a lisp. It might be fixable in something more Haskel esque.) Functional is also too hard to introduce new programmers to.
 

garakfan69

Please be patient, I have idiocy
kiwifarms.net
Functional is also too hard to introduce new programmers to.
FP isn't hard. I think most problems people have with FP is that they've learned procedural programming first and are too used to it.
Many CS intro courses also use Scheme as the first language to teach and you'd be surprised how many fresh CS students don't have any prior programming experience.
 

Slav Power

Tag jes.
kiwifarms.net
As a newcomer, which languages should I learn first? I was thinking about learning C++, but it is a big language, and I don't know if I should start with something else before getting to learn C++.
 

Shoggoth

kiwifarms.net
The only Singleton with any right to exist is the Single Malt
1578940959370.png
Pour yourself a glass, sip it, stop and think about the world, your life, and what you've done, and after the fiery liquid has roiled in your mouth a bit , you say to yourself "maybe I don't need a Singleton here".
It's the square brackets, isn't it? They look so cool and stylish in Clojure and Racket! (But I like Common Lisp's parentheses everywhere...)
Consider the following: it's a bad idea that CL overloads parens to mean both grouping and invocation. let-s , cond-s, etc, also have an excessive degree of nesting. Bindings should be a list of even number of elements, not a list of pairs, why do one extra step for the compiler?
Clojure differentiates between grouping (function arguments, bindings, etc) and invoking (functions)
For more, you should really watch Simple Made Easy.
1578941143472.png
That's the return type that I'm specifying. I figured it looked nicer that way, but I didn't have to do it. I could have just returned everything in a list no matter what, e.g.
Yeah I should have been more accurate, it's the aggregated type. The type you're collecting into.
The mapped-over types absolutely have to be sequences, if I'm reading the hyperspec correctly.
Another good thing about Clojure: Interfaces
pretty glaring gaps that cannot really be resolved
Care to elaborate?
Functional is also too hard to introduce new programmers to.
In my experience, it's usually only programmers who are brain damaged by OOP who can't be saved. Everyone else takes to it naturally.
"We need a policy!"
like nah bro, chill, you need a chill monad.
But I won't project my experiences with others on you, it's not fair.
 

Shoggoth

kiwifarms.net
As a newcomer, which languages should I learn first? I was thinking about learning C++, but it is a big language, and I don't know if I should start with something else before getting to learn C++.
If you have the time and you're feeling intellectually curious, start with Scheme. She's old and academic but has a timeless quality and beauty. You can also familiarize yourself with all the programming paradigms using Scheme.
If you want to get going quickly, I'll suggest either Python or Golang. Go for Python if you're more of an explorer / like to experience and experiment, and for Golang more if you like to lay out plans and and stay on your path.
 
Tags
None