547 karma · joined Nov 3, 2015 (11y ago) · 354 submissions
comment 9y ago · link · parent
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.
comment 9y ago · link · parent
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.
comment 9y ago · link · parent
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.
comment 9y ago · link · parent
comment 9y ago · link · parent
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.
comment 9y ago · link · parent
(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.16.
2 points · by such_a_casual · 9y ago · 6 comments
comment 9y ago · link · parent
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 clearercomment 9y ago · link · parent
Copied 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.
comment 9y ago · link · parent
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.
comment 9y ago · link · parent
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.
comment 9y ago · link · parent