HNHacker News
TopNewBestAskShowJobs

such_a_casual

547 karma · joined November 3, 2015

some n00b learning to code
submissionscomments
such_a_casual··on Playing action video games may be bad for your brain – loss of grey matter
I'll take my chances clickbait.
such_a_casual··on Cal State will no longer require math and English placement exams
They will always have the cream of the crop. It's not comparable to a Cal state.
such_a_casual··on Cal State will no longer require math and English placement exams
> The implicit message here seems to be, "let everyone pass through the system regardless of how qualified they actually are, but we'll have to lower the bar to keep grades and graduation rates high."

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.

such_a_casual··on Disney acquires own streaming facilities, will pull Netflix content
I'll make an argument that has nothing to do with the quality of disney's entertainment or disney's ability to give value to your child in the form of happiness/lessons.

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.

such_a_casual··on Disney acquires own streaming facilities, will pull Netflix content
The cost of software (which is essentially just information) vs what people will pay for is fucking mindblowing.
such_a_casual··on Dijkstra was right – recursion should not be difficult
"This article is aimed to introduce and explain a number of topics and ideas that will help you when practicing recursive problems."

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.

such_a_casual··on Internet Draft: Let 'localhost' be localhost
Did you think of that on your own? God I feel dumb. (I like being made to feel dumb) I googled it and didn't get that answer. I guess remembering ST can be a street or saint is a good rule.
such_a_casual··on Internet Draft: Let 'localhost' be localhost
You're amazing. I hope you're given more power than you already have.
such_a_casual··on Hy – A Lisp-flavored Python
I don't know what that is (tried googling it), but it doesn't look like it's doing the same thing as let.
such_a_casual··on Javascript Arrays and Functional Programming
The blog post has tremendous value to the right audience, no doubt about that. But it's worse than worthless for its actual target audience because the article makes those people feel like they're supposed to get it, and they probably feel shitty when they don't (I did). Even though they shouldn't. No one expects you to read that blog post and get it if you've never used Map or Reduce before. It's misleading and disheartening to the target audience. It's a pretty easy fix. Just change who you're talking to.
such_a_casual··on Javascript Arrays and Functional Programming
I'm sorry to say that I completely agree. As a "here's how you do X in javascript" this is a great post. However, the conclusion clearly shows that this post was not aimed at people who already know how to use map and reduce: "Functional programming is a great tool and will drastically improve your productivity...."

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.

such_a_casual··on Hy – A Lisp-flavored Python

    (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.
such_a_casual··on Hy – A Lisp-flavored Python
And it's pretty trivial to roll your own.
such_a_casual··on Woops - Lisp IDE using LTK
It's like comparing the Empire State Building gift shop to the Empire State Building.
such_a_casual··on Woops - Lisp IDE using LTK
I feel like comparing Racket to Common Lisp is an insult to all of the people who worked on Common Lisp. I don't think the makers of Racket would have the hubris to compare their work to that of the authors of Common Lisp.
such_a_casual··on Hy – A Lisp-flavored Python
Prefix notation is a problem because nothing beats the familiarity of:

    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 clearer
such_a_casual··on GNU Ring 1.0 released
Each version works a little less. It's great! God forbid I can find the chatbox, I might use it!
such_a_casual··on Is it possible to have Lisp-like Macros in a language without s-expressions?
Perl 6 has macros:

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.

such_a_casual··on Is it possible to have Lisp-like Macros in a language without s-expressions?
No they don't. A macro just takes code and returns code.
such_a_casual··on Is it possible to have Lisp-like Macros in a language without s-expressions?
Lisp macros do not rely on S-expressions. They rely on the fact that arguments are not evaluated, the code is passed in raw to the function, and then the code is replaced by the result of the function. If macros existed in Python for example, you could do this (sorry if my python isn't 100% correct. haven't used it in a while):

  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.

such_a_casual··on iPhone Bugs Are Too Valuable to Report to Apple
> It isn't forced on you in any way at all.

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.

such_a_casual··on Kill sticky headers (2013)
Honestly, this is an issue with having absolutely terrible browsers. This sort of thing should be easy to do without having to know javascript. The user just has so little power with the user interface they're given for interacting with the internet. Obviously, this will change over time, but the transition period is very frustrating.
such_a_casual··on An Ikea Bowl Has Been Setting Things on Fire
fucking parabolas man
such_a_casual··on D-Expressions: Lisp Power, Dylan Style (1999) [pdf]
It's pretty trivial to add macros to any language. The only thing that separates a macro from a regular function is time. In a normal function, the parameters are evaluated before being sent to the function. In a macro, the function is called before the parameters are evaluated. What separates lisp from other languages when it comes to macros is that the language is very simple and provides lots of tools for operating on the same data structure that you write your code in.

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.

such_a_casual··on I supported legalizing all drugs, then the opioid epidemic happened
Only children think that making X against the rules makes X go away. Regulation and first world health care (ie free health care) are some steps you can take to address the problem. Making addicts criminals shows irresponsibly poor leadership.
such_a_casual··on Show HN: Superset of Lisp and Lua Programming Language, a la JSX
Just in case anyone interested in Lisp reads this, Lisp (short for Common Lisp) is not a functional language. You can write imperative programs. You can write object oriented programs. You can write functional programs. You can write programs that are all 3 at the same time. Lisp is designed to handle whatever you can think up. Not sure what this guy is talking about. Especially since python forces you to constantly create temporary throw away variables without being able to be explicit about their scope.
such_a_casual··on Legal marijuana is taking a bite out of drug cartels' profits
That would all be done by machines.
such_a_casual··on Legal marijuana is taking a bite out of drug cartels' profits
There's 450 grams in a pound. 225/450 = $0.50/gram.

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.

such_a_casual··on Legal marijuana is taking a bite out of drug cartels' profits
The true price of weed is like $1/gram.
such_a_casual··on Legal marijuana is taking a bite out of drug cartels' profits
It's about quality control. You have more certainty about soil, air, water, light, insects, animals, etc. So the scientific method is more effective.

On a side note: outdoor plants grow much larger, and as such have much larger yields.

Page 1 of 11Next →