HNHacker News
TopNewBestAskShowJobs

such_a_casual

547 karma · joined November 3, 2015

some n00b learning to code
submissionscomments
such_a_casual··on Ask HN: What should I give priority, Lisp, Haskell, or the Dragon Book?
I'm currently learning Common Lisp. After I wrote my first real program with it (not a tutorial), I knew I made the right choice. After hours getting everything to work, when all was said and done, all that was left was this tiny, succinct thing. Was this really everything I was trying to do? Had the answer really been that simple? And I thought to myself, this is what programming is supposed to be, not a bunch of spaghetti code brute forcing one's self through the program, but the search for something concise and beautiful that says something about the problem and solution.

There seems to be a certain personality associated with lisp programmers, which emanates when they speak about the language. So logically I was pretty confident in my choice from day 0. However it wasn't until I actually made a program with it that I was emotionally confident and content with the choice.

In conclusion, I recommend you build a program with Haskell, Lisp, and/or an idea from the dragon book. That experience may give you the best idea of what path will be the most rewarding.

such_a_casual··on CL21 – Common Lisp in the 21st Century
I completely disagree. Remove-if-not is explicit. You know exactly what it does just by reading it. Your suggestion of filter could either mean use this filter to only grab the the things I want or use this filter to filter out the things I don't want. Complaining about the complexity of a name like "remove-if-not" makes absolutely no sense to me. Anyone can read that name and know exactly what it does. You only know what filter means because of your familiarity with it and not because of any inherit simplicity in its name.
such_a_casual··on CL21 – Common Lisp in the 21st Century
Thank you.
such_a_casual··on CL21 – Common Lisp in the 21st Century
> what do you do to learn CL?

The best thing I've done is watch a video on making a reddit clone in Lisp. I couldn't get the libraries to work, but I plan on using other libraries to do the same thing either tomorrow or the next day. It's made me realize that I really need to start walking through other people's code. https://vimeo.com/138249727

Google's LISP koans which is ~30 exercises where you complete the code and make the tests pass. Covers everything from mapcar to multi-threading. https://github.com/google/lisp-koans

I'm currently on Ch. 9/32 of Peter Seigel's "Practical Common Lisp". I find the book to be a much better resource after already being familiar with the topics covered. It does a great job of going into the nuances and gotchas of the language, but because is so much more text than code, it's hard for me to appreciate all of those little details if I'm still trying to grasp the fundamentals of the topic. http://www.gigamonkeys.com/book/

I write all the code I see with a pencil and paper (including all of those koans). I read a block of code and then try to rewrite it from memory.

Currently using vim. Haven't gotten around yet to using a live environment.

  Future resources:
    Paul Graham's "Roots of Lisp"  
    Paul Graham's "On Lisp"  
    Build a Lisp compiler  
    SICP  
    Paradigms of Artificial Intelligence Programming
    Upgrade my editor
Yeah, there's a lot I want to go through. It's gonna take me a few months just to go through all of the resources I have bookmarked so far. And I haven't even started looking for code that I want to read. End goal is to master Lisp.
such_a_casual··on CL21 – Common Lisp in the 21st Century
I am currently learning common lisp. The only thing I've really found lacking is support for basic string operations. I'm sure there is a solid library out there for things like replace(), but it seems silly for everyone to possibly be using separate libraries, or in-house implementations for standard string operations. It creates an unnecessary barrier to code readability. From what I've heard around the grape vine, this is a result of the ANSI standard being released prior to the popularization of these functions in other languages. If the CL specification is ever updated, I am sure that this problem will be solved. I am surprised this github project didn't acknowledge this.

P.S. Changing the name of 'Remove-if-not' makes absolutely no sense to me. Remove-if and Remove-if-not make perfect sense together. Adding a whole new word to memorize "Keep" just makes code less readable. Especially since Keep isn't seen anywhere else in the language. Further-more the redundancy in the names 'remove-if' and 'remove-if-not' make you think about how these functions are actually the same, with only a small caveat. 'remove-if' and 'keep-if' make you think of these functions as different things, as different ideas, very unlispy.

edit: just checked cl-ppcre's documentation and learned that split and replace are covered by that lib. Seeing as cl-ppcre seems to be used so widely, I take back what I said. Lisp is perfect once again.

such_a_casual··on Writing high-performance servers in modern C++
I agree that a more fitting line would have been, "I show how to build a modern C++ high-performance, asynchronous echo server using Facebook's Wangle (which comes out to be only 48 lines of code).

However the TITLE OF THE ARTICLE is "Writing modern C++ servers using Wangle." Furthermore, the author states that he's using that framework almost immediately after the statement you quoted, so I really see nothing to complain about. It would be more of an issue if the author led with a huge introductory paragraph or click-baity title that failed to mention the library she or he is using.

Knowing how many lines it took for the author to implement the server in the Wangle framework is very relevant to the reader.

such_a_casual··on Ask HN: I'm a dull person since software doesn't excite me anymore. What to do?
Read some books, take up some hobbies, life goes on lil homie.
such_a_casual··on Ask HN: Working with a monolithic codebase
If the software is undocumented, then document it as you read it. At the very least make sure that you are documenting your own modifications. In any code base, you are going to need to dedicate the time to learning what that code base is.

Before you do X, you should always ask someone if they are aware whether or not X already exists in the code base.

This is true outside of the work setting. If you are making websites for fun in your spare time, you are likely to spend time learning a framework such as node or django. If you are making games you are going to learn some tool like Unity or an engine like unreal or source.

Imagine if you had a project where you defined 20 different functions for requesting the html of a webpage, each doing something slightly different. Think about what kind of a maintenance nightmare that would be. You are suddenly required to implement a proxy on all requests, but doing so breaks half of your functions. You can't just scrap them, because each has a nuanced use (since you were too lazy to update your existing function(s) to fit your needs).

You would never do that in your own project, but that's exactly what you're doing with this company's code base.

"It means my thoughts must be bent to fit some pre-existing shape, which eliminates the need for my thoughts, and suggests they should be permanently replaced with those of my predecessors."

No, it means your thoughts must bend the pre-existing shape, which eliminates the need to create the shape yourself, since that was already handled by your predecessors.

Your point of view is a lie. Do you program on an OS you wrote yourself from assembly code, in your own programming language, on your own custom built hardware, with no libraries or tooling?

Musicians do not reinvent thousands of years of musical discovery, yet they manage to find immense pleasure and creativity in their work.

If you have done very little programming outside of college, you should see other people's code as a treasure trove of information. Just as musicians find inspiration in other people's songs. My last tip is to revert to pencil and paper when you are having difficulty understanding someone else's code.

such_a_casual··on An Easy Way to Learn Hard Stuff
This is really interesting to me. I used to do the strategy the author illustrates: follow along with tutorials and google when something doesn't work.

It didn't work for me at all. I found myself having gone through many, many tutorials (video and text) only to remember none of it when I came back to the subject months or years later. I never had any understanding because I was always following along and just googling when I ran into snags.

These days I do the complete opposite. I try to learn as much as I can. I never follow along with the learning material. Instead, I go through a section, taking notes, and then try to recreate it all from memory. Rather than focusing on what I need to know right now, I've learned to appreciate all of the little details. I try to do as much as I can with pencils and paper because it's slower, which forces me to spend more time with the information.

Indeed, I am very jealous of the author. It took me years before I learned how I learn. I wish that I was smart enough to use the author's strategy. Instead I found myself not knowing how any of my stuff worked, running into hours of frustration whenever I ran into a problem or a bug that StackOverflow couldn't answer. So if you've used the author's strategy and it didn't work, don't worry! We're not all geniuses! You will find out how you learn if you keep trying different things.

such_a_casual··on Show HN: I've made a tool to generate beautiful gradient background images
Yeah, I thought it was a joke. I'm glad the grandparent pointed out that it could be a browser issue.
such_a_casual··on Why I'm joining the Dart Team
It had nothing to do with Chrome's extension API. The API works perfectly fine. It has to do with the nature of JavaScript where syntax errors are "forgiven" leading to unforgivable bugs that require line by line review unless you use a tool to check your syntax. This was not the first, last, or only syntax caused bug I experienced. It was simply the most frustrating and inexplicable.
such_a_casual··on Why I'm joining the Dart Team
I'm talking about chrome's extension library returning NULL instead of a "tab" object when creating a new tab because of a syntax error in a completely different file.
such_a_casual··on Why I'm joining the Dart Team
The story goes that I have played with many languages, but only used small amounts of js as needed before building an extension for chrome. I have never found a language to be so unfriendly to n00bs. One is absolutely required to learn third party frameworks and libraries just to do anything useful. There is a never-ending list of basic things that are not supported by the language. I have never had to use a third party tool just to check syntax in any other language. I don't see any trade-offs to using javascript at all. It is a language just like most C-based languages with everything chopped out of it. What benefits does javascript have over any other language?

> These days I mostly use Javascript

You don't use javascript, you use a framework for javascript. In fact, because browsers don't fully support EMCA 6, you are probably even using a tool to convert your javascript code.

I absolutely abhor javascript, to the point where I stopped working on my chrome extension (which is < 500 lines at this point) until I figure out how to do it in another language. Which will probably be clojurescript or typescript.

such_a_casual··on Why I'm joining the Dart Team
Is JavaScript the only "language" you've programmed in? Personally, I prefer a language that doesn't require large frameworks and libraries that are here today, gone tomorrow for basic language constructs like name spacing or library references. Personally, I prefer not having "engines" silently fail on something as fundamental as syntax errors, causing bugs that can't be reproduced or tracked down. Want syntax checking? You guessed it! Another Framework/Library/Tool to learn or build! Not horrendus? Good Enough? JavaScript is the language of Satan's incompetent stepchild.
such_a_casual··on Ask HN: What is a good scriptable text editor
> I'm looking for a good text editor that has a simple and quick scripting capability.

Vim and Emacs have neither of these things. They both pose a long and difficult barrier to entry.

However it sounds like you aren't looking for simple and quick. If you are running into limitations on your current editor, then it's time to swallow the pill and dive into one of the behemoths.

I don't know of any text editor that is guaranteed to have less limitations than Sublime Text, but also has a "simple and quick scripting capability".

I would recommend Vim as it's main focus is as a text editor. Emacs tries to do everything, Vim just tries to edit text. Emacs also has a mode that enables Vim key bindings, so if you choose Emacs later, you won't have to start from scratch.

Lastly, Emacs uses a dialect of Lisp for customization. Vim has it's own made up language. So this may be a reason to choose Emacs over Vim.

such_a_casual··on Facebook's “free internet” programme hits a roadblock in India
There is a significant difference between a headline that reads, "Facebook's “free internet” programme is a cover for a land-grab" and "Critics say Facebook's “free internet” programme is a cover for a land-grab". But both titles are sensational click-bait.
such_a_casual··on Magic+
> Our unique combination of humans and software

Oh god, I can't stop laughing.

such_a_casual··on Let artificial intelligence guess your attractiveness and age
> most humans aren't even correctly gendering in me yet

This made me laugh really hard. What a positive twist on the fact that the algorithm is clearly a WIP.

such_a_casual··on Bayes's Theorem: What's the Big Deal?
So let me get this straight, statistics can be misused? I almost stopped reading as soon as I saw the image from the big bang theory. (That show presents nerds the way other people want to see them. Not the way nerds actually are.) It appears that the author of this article is just a journalist:

http://www.johnhorgan.org/

I don't see anything in there about him ever being a scientist, a statistician, or anyone who would actually use this theorem. In fact, he even went to school for journalism.

I really don't understand where this author is coming from when he says things like, "I conveniently decided that Bayes was a passing fad." Why should we care about his opinion on the matter? Is he reporting to us what Bay Theorem is and its significance, or is he giving us his uniformed opinion on the matter?

such_a_casual··on Shut Up, Paul Graham: The Simplified Version
2a) I would even argue that the supply of workers on the market is increased.
such_a_casual··on Shut Up, Paul Graham: The Simplified Version
You lost me at "weed delivery service". Weed delivery service is an amazing experience that is already a thing. It is natural that this service will be monopolized/oligopolized by capitalists given enough time.
such_a_casual··on Dell Computers Has Been Hacked
If you do decide to call back, make sure you check the number online first. There are some phone scams that involve getting people to call back pay-to-talk (I don't know what the proper term is) numbers.
such_a_casual··on Dell Computers Has Been Hacked
While I know very little about 'computer security', I have never been under the impression that Dell is aware such a term exists.

"another dangerous dell root cert dicovered" http://www.pcworld.com/article/3008478/security/and-then-the...

"dell attacks on scada doubled" http://securityaffairs.co/wordpress/35967/hacking/dell-attac...

"in what some experts are calling the biggest data theft in US history." http://www.abc.net.au/news/stories/2011/04/07/3185296.htm

such_a_casual··on Is there any point to the 12 times table?
You're misinterpreting the point entirely. The memorization of a 12 x 12 multiplication table has nothing to do with mathematics passed the multiplication of 12 x 12. It is an everyday use case. Most people use time every single day of their lives. Being able to multiply something by the amount of months in the year or the amount of hours in a day without having to bust out a calculator is something that comes in handy for everyone, even scientists, engineers, and mathematicians.
such_a_casual··on Is there any point to the 12 times table?
lol is he writing on bathroom paper towels?
such_a_casual··on Is there any point to the 12 times table?
Decimals do not cause any problems for computers. Computers are just a bunch of switches of states. The meaning of these states is completely up to us. For example, 4 switches creates 2^4 states (16 states). That means we could have those states represent the numbers 1-16. As far as I'm aware, the only reason we use base 2 numbers in computing (floats) is because there are mathematical shortcuts you can take when doing so. There is nothing forcing a computer to interpret those 16 states as x * 2^y instead of x * 10^y. That is a software choice.
such_a_casual··on Is there any point to the 12 times table?
Seeing as time is a universally applicable measurement (more so than distance, volume, or mass). I hardly see that as a "minor use case". Is there a field which doesn't use time? Quantum computing?
such_a_casual··on Why Are 20-Somethings Retiring?
> It shouldn't be called retirement.

In personal finance it's called, "Financial Independence." Which basically means you aren't necessarily done working for the rest of your life, just that working has become completely optional.

more info: https://www.reddit.com/r/financialindependence

such_a_casual··on Agromafia
Great question:

https://www.fbi.gov/news/pressrel/press-releases/justice-dep...

such_a_casual··on New string formatting in Python
Elegant for who?

Adding a new syntax that doesn't exist in any language.

vs.

Using sensible default parameters.

-----------------

An argument for why my suggestion would be bad: https://www.python.org/dev/peps/pep-0498/#no-use-of-globals-...

← PreviousPage 5 of 11Next →