What are you working on, Sup Forums?
Previous thread:
What are you working on, Sup Forums?
Previous thread:
Lisp is the most powerful programming language.
second for java is unironically good
Python is the most powerful programming language.
; Exercise 1.12
; Compute the nth level of Pascals triangle
( defun construct-row ( col row prevrow )
( cond
( ( = col 1 ) ( list 1 ) )
( ( = col row ) ( cons 1 ( construct-row ( - col 1 ) row prevrow ) ) )
( T
( cons
( + ( car prevrow ) ( car ( cdr prevrow ) ) )
( construct-row ( - col 1 ) row ( cdr prevrow ) ) ) ) ) )
; In this function, n is the row number
( defun pascal ( n )
( cond
( ( = n 1 ) ( list 1 ) )
( T ( construct-row n n ( pascal ( - n 1 ) ) ) ) ) )
This but ironically
This but ironically
This but ironically
unironically this
OOP is unironically garbage.
This but ironically.
...
unreadable with the spacing
OOP can only have originally been a practical joke by Alan Kay. He must have had no idea it would be taken so seriously by the industry.
Python is awful.
Python2 vs Python3 still hasn't been sorted out.
Package management is painful to say the least. (Ever tried using Python on a machine you don't have root access for?)
In the 'data science' space it's pretty much a meme. Want decent charts or dashboards? Go to R. Want to get some decent performance out of big data, go to Scala.
It's great in quick and dirty scripting but shell is far better.
As far as full stack, Java shits on it for performance.
I really don't know it's appeal other than being 'easy'. But once you advance beyond the basics you lose most of the real power tools in programming and you get some language that like shell scripting is great for getting simple things done quickly but terrible for getting more advanced things done efficiently.
Objects are just codata, what's the problem?
WOT IF IN THE FUTURE WE ALL GET TURNED INTO OOP CLASSES
then what are metaobjects
(defun construct-row (col row prevrow)
(cond
((= col 1) (list 1))
((= col row) (cons 1 (construct-row (- col 1) row prevrow)))
(T
(cons
(+ (car prevrow) (car (cdr prevrow)))
(construct-row (- col 1) row (cdr prevrow))))))
; In this function, n is the row number
(defun pascal (n)
(cond
((= n 1) (list 1))
(T (construct-row n n (pascal (- n 1))))))
Do not use K&R bracket spacing in LISP.
YE FECKING WOT CHARLTON FC??
Vague terminology that suggests an application of objects rather than a separate feature.
would metaobjects be codata too
If they're objects, I guess so.
FP >> OOP
What's the result of that bitshift, user?
>no users
lmaooo
look @ the top of its usage
Not a bitshift. It means "is very much greater than".
Are you 50 years old? Q1 2017 the entire python community transitioned to python 3. Python 2 is for legacy work.
For data science package management you can use Anaconda.
R is just older hence why there's the industry demand but, for newer machine learning libraries you are better off using Python. Python can even do front end web development.
Fighting over which programming language is better is trivial, every decent programmer needs to have C, C++, Java and javascript under their belt, regardless of what field they get into.
Scala's good but again has limited to applications in the data science field. You have the latest libraries and the greatest support with Python.
It's 2018 faggot, the future is now.
Since when does Common Lisp accept quoted symbols as function designators.
>he thinks popularity is a measure of a language's power
I refuse to use inferior technology even if it is newer.
Hasn't it always?
>2 namespaces
>symbol lookup
CL is laughable.
Agreed. Scheme is the superior Lisp.
You've been forcing this meme for a while now and it hasn't stuck. Maybe it's just not as funny as you think it is, kid.
wait, what, I always thought it was #'some-symbol or (function some-symbol)
wtf, im having a berenstein bear moment
Just built a linux kernel module that monitors processes for system calls and intercepts them.
What do I have to modify in Bitcoin's source code to fork my own memecoin for a group of friends?
OOP is the only forced meme here.
Scheme is unstadardized garbage.
>has different MAPs for different sequences
>20 gorillion implementations for (none useful (lisp curse))
>hyegenic macros
you can use this instead
forknote.net
* (funcall #'+ 3 4)
7
* (funcall '+ 3 4)
7
* (funcall #'(lambda (x) x) 6)
6
* (funcall '(lambda (x) x) 6)
debugger invoked on a TYPE-ERROR in thread
>python 2 is for legacy work
There is a huge amount of legacy code still in operation and a lot coming through the pipeline.
Python is a victim of it's own success here.
>anaconda
In other words, someone had to invent a decent package manager for Python. Thanks for proving my point.
>r is older
The reason R is still around is because it works. Probably this is the timeless LISP influence in the language which means that it's so adaptable and expandable. As opposed to Python which has only started to swell because of so many 'generalist programmers' are now trying to fashion themselves as data scientists further watering down the profession.
>new packages in python
The problem with both Python and R is scalability. Neither language scales well to big data and whatever development is still going into R and Python will be meaningless in a couple of years anyway.
>fighting over a programming language is trivial
>you need to master these
In my professional experience, masters in one language are rare. Masters in 2 or more languages are pretty much unheard of.
You need to pick a language and stick with it otherwise you'll be a pretty shit programmer who only knows the basics.
>scala is good
>limited applications in data science
Scala and JVM languages like Clojure are the future of data science whether you want to admit it or not.
Python is just a bump in the road now that most people will abandon sooner or later because it doesn't have the statistical pedigree nor the DV stuff of R but it doesn't easily allow scalability to big data like the JVM does.
It's just a middle of the road language that people are going to because it's the only language they know and it's easy.
>the future is now
If you cared about the future you'd be looking at what is coming. It's all about the cloud and big data, Python doesn't cater for either of those particularly well.
But good luck relearning programming in a few years when Python is irrelevant once again.
huh?
also, HOW THE FUCK CAN A SYMBOL BE A FUNCTION
(FUNCTION SYMBOL) IS A FUNCTION, (QUOTE SYMBOL) ISN'T!!!
OOP can be implemented in C using pointers, heap memory and structs.
OOP languages just cover this up so that it doesn't confuse brainlets.
Just trying to help you, son.
>OOP can be implemented in C
It's a shit ton of work keeping a virtual method table by hand though.
Anybody who uses (QUOTE FUNCTION) to desginate a function is retarded
#' is the canonical way to do it
Liskov substitution becomes a massive pain in the goddamn fucking butt though. It's not just not to confuse brainlets, it saves developers a massive amount of work, user.
This kind of weak typing reminds of JavaScript.
Racket > Scheme
If you learn how macros in Racket work, I doubt you will ever complain about hygienic macros again. Hygiene in Racket solves a ton of problems prevelent in CL, making it much easier to write macros that work as desired. Hygiene is very easy to bypass in Racket, but most of the common cases where you'd want to bypass it are covered by other metaprogramming features that work better than the unhygienic solution would. I may have time to elaborate further if you have any doubts
>blaming Alan Kay for modern "OOP", despite it having almost nothing to do with his ideas
You should blame Bjarne, who was emulating Simula, and Gosling, who was aiming to create a C++ for dummies.
"Can do" doesn't mean much, user. You "can do" pretty much anything in any Turing-complete programming language, especially C. That completely misses the point though.
Don't feed the troll.
So can functional programming. Anything can be implemented in C, user. What's your point?
" In my professional experience, masters in one language are rare. Masters in 2 or more languages are pretty much unheard of.
You need to pick a language and stick with it otherwise you'll be a pretty shit programmer who only knows the basics. "
Where does making up or lack of language specific knowledge with general design knowledge fit into the discussion?
Being able to design and implement good solutions should generally beat out abusing language specific features only a "master" would know. On most problems you just need a good enough understanding rather than mastery to achieve a sufficient or preferable solution.
>Python is just a bump in the road now that most people will abandon
that's fine, it's a prototyping language, it served its purpose
>So can functional programming. Anything can be implemented in C, user. What's your point?
My point was that there's nothing wrong with OOP, its automating work that has to be done to be implemented in C
>t-t-tro-troll! troll!
Nice counter-argument. Please tell me more about how C++/Java/C# are just like Smalltalk.
>its automating work
So you really just want a good metaprogramming system?
Most powerful as in "most Turing-complete"? Or did you mean to say most expressive?
What a den of mediocrity. Do you people even make software or do you just dick around all day arguing about the definition of OOP? Even the Web Design script kiddies make things.
What's better, mastery of one language, or slight knowledge in multiple?
Personally I enjoy using Java which is what I consider that to be.
>i work in a startup
Got it.
Could not agree more.
But the problem with prototyping in meme languages like this, is that often it's just a waste of time as some features aren't easily transferred. So you find yourself looking either to translate something that isn't simple or just rebuilding a section because the idea doesn't work.
You only need to master C, everything flows naturally from that.
>My point was that there's nothing wrong with OOP
>its automating work that has to be done to be implemented in C
>automating work that has to be done
C++/Java-tier dynamic dispatch is dumbed-down shit.
How is this weakly typed?
Are you or ?
If latter, I called you troll for a reason and I'm not engaging you in a pointless argument because you have no interest in pursuing truth.
If former, I didn't call you a troll and they're not like Smalltalk. I did tell you to stop feeding trolls though.
The most powerful in the world
If you're a brainlet, yeah.
I'm taking a class on C and we just covered pointers. I'm gonna go the extra mile and write the code for my assignment using generic functions. Thankfully the assignment is on prime numbers, I've dealt with plenty of primes from projecteuler.net
Most people here make a lot of things, but development tends to be a lengthy process. We're not about to post random out of context snippets from codebases unless we have specific questions or think we did something concise and neat.
Otherwise yes, it's mostly just shitposting over semantics.
/wdg/ has more actual "content" because everything in webdev can be boiled down to nothing. I can much more easily share js or ruby snippets that have implicated context than I can sharing a function snippet from a C codebase, because the exact purpose of that C codebase is unclear until you view the other parts. In webdev there are very clear purposes to most functions.
We take it in shifts. Some do work while other shitpost about OOP.
>What a den of mediocrity.
Were you really expecting anything else?
In class yesterday my professor said he talked to Dennis Richie at a conference and he said that the only thing he regrets about C is using = for assignment and == for equivalence when he could have used := for assignment and = for equivalence
What's a generic function?
Design knowledge isn't just for startups. It's also very important for refactoring existing code bases be they large or small.
I'm just saying language mastery isn't necessarily as important as being able to model and solve the problem within constraints. A programmer that can design well but only has average knowledge of the chosen language is a good hire versus a programmer who has a "mastery" level of knowledge in the language but pushes out overly complex designs taking advantage of its features. Finding someone with a middle ground between the two is like digging in the backyard and randomly finding a diamond.
I assume he's talking about using function pointers which is a really dumb idea if you don't need to because it wastes memory
Just from looking at your post, it is clear that the current solution is visually more striking, and therefore clearer, than the alternative. The alternative makes mathematically more sense though.
Oh wait no, I forgot, you can define a generic function with an #include statement
Smalltalk or C++, it doesn't matter. The OOP joke needs to end. Functional programming is better in every way except brainlet mindshare.
Probably good as an educational exersise. It's not like memory is tight on a modern pc.
How can you have good design knowledge but you don't really get how a language works?
Those design features are why some languages have been adopted in some areas while others have not. Companies that are still dabbling haven't found something that gets the jobs done quickly and efficiently.
See
>gets the jobs done quickly and efficiently.
Sounds more lika a programmer issue than a languafe issue.
What's your guys' alumni?
One usually comes with the other.
Shit programmers can't design, good programmers can. Good programmers tend to have enough experience and depth in their skills that they'll admit they know one thing well and leave the other tasks to people who know their thing well.
no name state school
>Good programmers tend to have enough experience and depth in their skills that they'll admit they know one thing well and leave the other tasks to people who know their thing well.
But nowadays everyone wants "full stack developers".
Just sent a grad application to Trinity College Dublin
Backend is the only tricky part of full stack development.
Can you give some practical examples of these vague concepts of "deep language mastery." Because it honestly sounds to me like you're micro-optimizing. Isn't it far more important to know algorithms, solutions, and API than to know some esoteric language functionality?
Granted there's a VAST difference between, say, someone who has worked with, say, Graphic Libraries and shaders for 30 years than someone who is experienced, but only has a shaky 5 years or so under their belt, but it doesn't seem like that kind of "mastery" has anything to do with programming languages themselves which are in most cases just slim abstraction layers on top of a fairly common tool belt (with a few different families of tool belts).
It's like. Sure a master painter probably has a most-iconic medium (say, oils or watercolor), perhaps you could even call them masters of that medium, but I'd be hard-pressed to call them master artists if they couldn't paint in virtually any medium because their artistic mastery (like our coding mastery) transcends medium.
Depends on the language, to some extent. If you're using C++ then you better understand the language thoroughly because it has lots of esoteric quirks that will bite you if you're not aware of them.
>What are you working on?
Made some shadow in openGL. I plan on using Cascaded shadow maps(CSM) since my shadow mapping implementation can't go to far.
>example
See pic related.
I'm not talking about domain specific knowledge like this, I'm talking just general understanding of a language. If to use the natural language example, it'd be like the difference between able to say 'how are you' and being able to have a conversation about the nature of reality.
There probably is some truth in this, someone who is 'that' talented could probably be competent or passable at many similar fields but there would be only one that people care about.
>unnecessary consing to print hello world
>overloading operators = deep level mastery
You could teach this shit in ten minutes
Equating a programming language to a natural language was precisely what I feared you were doing. Frankly, it displays insufficient mastery of both. Natural languages are hundreds of thousands of words, averaging a half dozen different meanings and a thousand different connotations, combined with a shared cultural and literary history, dynamic and changing grammar, and all the other things that make communication such a ridiculously efficient method of compressing, molding, and out-right creating information.
Programming "languages" are maybe a hundred to a thousand regex replacements away from a common formal logic language.
AESTHETIC
Nice. I've never made shadows before.
Memory is the least of the problems with generic functions.
I have no idea what a generic prime number related function would be, since they're on natural numbers?
Maybe prime number related functions that take a definition of zero, increment, and decrement?
>takes a metaphor literally
It could be anything which could be mastered. The entire point I'm trying to make here is that it takes a long time to master something and to do something well.
As hard as it is to believe there is a reason why newly minted CS graduates aren't engineering leads in software companies.
Anyway, I guess you can persist with your polyglot programming. Hopefully you don't waste too much time.