547 karma · joined November 3, 2015
This is how highschool was for me. I dropped out of a highschool with a 98% graduation rate. In that situation, no one cared if people were learning or even about what's best for the society or economy. For the school it's about building a system that gives them the desired numbers. Second anecdotal: Education has been giving girls better grades. There is a college in California that is famous for their animal science and veterinary programs. Girls don't want to work with big animals. So the school simply does not have enough people interested in big animals. They tried lowering the GPA requirement just so they could let enough boys into the program. This caused their school ranking to fall, and they immediately reversed the decision.
Schools are playing politics. Favoring girls in education has led to problems across the board as people just assume girls will want to do the same jobs at the same rate.
All anecdotal for sure. Definitely nothing conclusive. Just thought I'd add my 2 cents.
Being a human being is a social experience. If all of a kid's friends watch disney movies and have disney toys, there is an opportunity to connect with his friends. There is also the opportunity to feel excluded, to miss out on experiences and discussions with his friends. I remember quite fondly how excited me and my friends would get talking and arguing about Star Wars and Indiana Jones in the sandbox.
I know I'm not supposed to shit talk the article. I know someone spent a lot of time making it for me and others. However, we've gotta move forward as a community. We have to raise the bar. We have to stop this nonsense.
There is an issue here greater than recursion. I know that's bold of me to say, but I'm serious. Programmers need STOP fucking telling people that they can explain something that requires practice to understand. You cannot learn multiplication from reading a blog post. It has to be drilled into you over and over again. And only after it's been drilled into you what numbers are, what addition and subtraction are, and what carrying and borrowing mean. You learn this over the course of YEARS not 5 minutes reading some shitpost on the internet. Recursion is just like math. It has to be drilled into you. I had zero understanding of this for YEARS. And then I picked up a book that drills recursion into you. Only after writing function after function (functions essentially identical to one another in structure), was I able to understand the IMPORTANCE of recursion. Not by thinking about it, or reasoning about it, by actually doing it, over and over again. Recursion can be explained in 10 seconds. I'll do it right now. Recursion is when a set of instructions starts over from step 1. Or for us programmers, a function which calls itself. Bam. all you need to know about recursion. Guess what. It's not enough to understand what multiplication is, you actually have to be able to use it. You actually have to be able to use recursion. Explaining why multiplication is important is frankly retarded. This post is frankly retarded. STOP pretending that you can explain in 5 minutes what took you months and years to understand. STOP. All you do is make people like me think they're dumb for not getting it. I'M SMARTER THAN YOU! But it took me months of ACTUALLY WRITING RECURSIVE FUNCTIONS to realize HOW FUCKING DUMB YOU ALL ARE. Stop fucking telling people you can teach them calculus in 5 minutes. Stop telling them that all it takes is this one clear explanation. It doesn't! It takes actual work. Fuck the guy who wrote that post. You have no idea how many years I wasted thinking blog posts like this were how to learn. If you don't get why recursion is a big deal, do yourself a favor and forget everything you read in that post, grab a pencil, some paper, and a copy of the Little Lisper. Email me in 6 months when you're finished, so that you can thank me for being the only one to tell you the truth about recursion.
It's like someone showing you multiplication and saying. See look how useful it is! See look how simple and easy it is to understand! I still don't know multiplication, or even addition for that matter.
Map and reduce are things you build up to by doing recursive functions over and over again. They are not something you learn from reading an article. Just like you can't read an article and suddenly know how to solve problems with long division.
(defun udpate ()
(let ((pos (find-char-pos)))
(move-char pos))
(print (stats))
(rotate enemies))
(defun udpate ()
(set 'pos (find-char-pos))
(move-char pos)
(print (stats))
(rotate enemies))
I now have to keep this 'pos symbol in my head for the rest of the function (in another language, forever in this case), whereas in the first example I can just forget about the variable after the next line. It doesn't exist anymore. It makes code clearer and much easier to refactor since I can immediately see everywhere that the variable is used. x = 10
But prefix notation is superior. You don't have to invent an order of operations out of thin air. All your functions take several arguments, not just 2. So + is now sum, - is difference, / quotient, > greater than order, etc. They aren't special. they're just like everything else.It'll never be as familiar, but it's smarter and makes writing code easier. For example
"hello " + name + ", welcome to the " + place +"."
+ "hello " name ", welcome to the " place "."
The reality is you want functions that work on many things, not just 2, even when you're doing math. 1 + height + x + floor-height
+ 1 height x floor-height
infix notation does nothing to make code clearerCopied from: https://perl6advent.wordpress.com/2012/12/23/day-23-macros/
macro checkpoint {
my $i = ++(state $n);
quasi { say "CHECKPOINT $i"; }
}
checkpoint;
for ^5 { checkpoint; }
checkpoint;
No "homoiconicity". Just two operators: "macro" which will make a macro instead of a normal function, and "quasi" which says the stuff in here is code that shouldn't be evaluated. In lisp these two operators could be "defmacro" and "quote".Lisp has a lot of features that other languages haven't implemented. We could spend all day asking why other languages haven't implemented them yet. And it's unfortunate, because just adding the feature for macros would allow you to add a lot of those other features. Indeed, macros are such a big deal that they are probably the sole defining reason that lispers can add features from other languages so easily.
However, we need to stop pretending that code substitution is some magical, genius feature that can only exist in the utopian environment of a common lisp system. It's a simple idea that's been used since before I was born. Macros in lisp are nice because you have so much access to the language, as well as (perhaps more so than any popular language) really smart tools for manipulating the data structure your code is written in. If you have to code code, if you have to write code that manipulates other code, it's nice if that other code is in an easy to understand data structure. And even easier if you already have a bunch of functions, classes, variables, etc given to you by the language for changing that data structure. Which lisp does, and that's what makes lisp lisp.
defmacro exists (code list):
for x in ,list:
if ,code:
return True
return False
exists(x > 10, [1 5 333]) => t
Macros are great in Lisp, because lisp makes it easy to code your code. It does this by treating your file of code like you might think of an array or a list or another data structure in another language. This data structure is really simple and is called a list. Lisp provides a bunch of help to make it easy to work with lists, just like Python provides a bunch of help for working with strings, lists, and tuples by giving you functions and variables for manipulating, printing, and debugging these things. Because the code you write is a list and lisp provides a bunch of help for dealing with lists, it's as easy to manipulate a list of code as it is to manipulate a list of songs or emails or zombies like you're probably already accustomed to doing.In other words, macros are awesome and you could easily put them in another language. Lisp isn't great because of macros, it's great because of how well (mind blowingly well) macros play with with all of the other parts of lisp. Macros are empowered by the rest of the langauge, and the rest of the language is empowered by macros. And this is really the theme of lisp, it's not one feature that makes the language impressive, it's how the features seem to amplify one another.
Uhm, what universe do you live in exactly? Because the universe where I live, I have Apple or Android. Saying that apple's bullshit isn't forced on millions of users is like saying the Republican party's bullshit isn't pushed on millions of citizens. I mean argument aside, let's not do Apple's job for them and paint the world as capitalistic utopia where consumers have all the power and make all the decisions. Consumers do not make 99% of the decisions related to their phone, including the decision to have one.
Of course you can add macros to any language, that doesn't mean they'll be anything like Lisp macros, because you're still writing code that has many different ways of expressing function calls. Importing a file? Oh, don't call a function. Instead write this special syntax which will call that function for you. Declaring or setting a variable? Same shit. What if you wanted to do something really fancy like create a class, oh yeah, there's a special way of saying that too. So now when you go to automate this stuff, you've gotta teach your computer all the special different ways to write everything. Lisp isn't lisp because it has macros. Lisp isn't lisp because it's simple. Lisp isn't lisp because it has a lot of really smart ways of doing basic things that we take for granted (like explicit vs implicit scope on local variables). Lisp is lisp because it has them all.
You can add the same extensibility that lisp has, macros, reader macros, operate on symbols, closures, whatever. You can do some of the really smart things that lisp does like explicitly scoping your variables or multiple dispatch. You can even have a really simple language, with a really simple syntax. But it's not Lisp's individual features that make it what it is, it's how these features interact with one another to give you something that's truly hard to replicate.
Yes, of course you can replace a block of code with another, but how easily? For example, yesterday I was thinking about a variable that represents the result of evaluating the previous form. So instead of having to read a method chain backwards: (wax (buff (rinse (soap car)))) it could read forward: (soap car) (rinse ?) (buff ?) (wax ?) Now whether or not this is a good or bad idea is completely fucking irrelevent. The point is that it's an idea, and until an idea is tested, we have no idea how bad or good it is. In lisp, in 5 minutes, I can write a macro that wraps around a block of code and implements this idea so I can actually play around with it in the real world instead of just in my head. You literally just take a bunch of forms in, put a let statement around the whole block, and then put a call to set the variable around each individual form (If you're not familiar with lisp. a form is kind of like a line of code, it's usually a function call but it can be a value as well). In lisp I can have very abstract programming ideas and then immediately implement them, without having to fight through the language to do so (ie without having to write a parser).
It's cool when other languages take stuff from lisp, it makes it easier to write lisp like code when I have to use other languages, but I've read a lot of articles on "Lisp macros in X Language" and none of them seem to understand that you can't just implement macros, you have to make the structure that code is written "first class". You have to give the programmer the tools they need to operate on a piece of code as naturally as they would a string, a number, or an array.
But that number and mine is nonsense. I was being generous in order not to shock anyone. Look up the price to grow crops like corn, cotton, etc. It's < $500/acre. Per acre. When cannabis is grown like every other crop it becomes dirt cheap. Great cannabis does not need to be grown indoors. Great weed is grown outdoors on the west coast all the time.
On a side note: outdoor plants grow much larger, and as such have much larger yields.