HNHacker News
TopNewBestAskShowJobs

ntoshev

3,065 karma · joined March 12, 2007

nik@t1mr.com

http://www.underengineering.com

[ my public key: https://keybase.io/ntoshev; my proof: https://keybase.io/ntoshev/sigs/-piodh_N3Iz_KHRDy9q8DwzUm8hyzhfGYMQHzguhJhI ]

submissionscomments
ntoshev··on Lessons learned from wikipedia's fundraising banner design
You should point out a counterexample. I guess it would reveal that your definition of optimality is different from "evolutionary fitness", and it shouldn't be.

Note I didn't claim that "evolutionary processes strive for streamlined and optimal solutions". I have no idea how you derived that or why are all these people voting you up and me down (I'd appreciate an explanation btw). I just made a joke that I think contains a kernel of non-trivial truth, although I don't believe it's true if you take it literally as a claim for a universal fact.

Edit: Perhaps I figured out part of the voting - people think I disagree with a popular HNer in an irrelevant way. Amusing.

ntoshev··on Lessons learned from wikipedia's fundraising banner design
Strong AI is overrated: evolution beats intelligent design every time.
ntoshev··on New EC2 Instance Type - The Cluster GPU Instance
Machine learning? Implement pagerank or SVMs on CUDA :)

What is the mapreduce of CUDA going to be?

ntoshev··on This is why sites choose to stay vulnerable to Firesheep
The image proxy won't work: Google's js APIs are throttled per IP to prevent abuse.
ntoshev··on People not liking open source (and it's not Oracle)
Are there incentives to have a lower/higher barrier for someone else to reproduce your findings and build on them?
ntoshev··on Ask HN: The one thing you believe is true, but most people think is untrue?
I don't think he meant things you can prove, more like he is looking for speculations and unique perspectives that may as well be wrong.
ntoshev··on Microsoft releases F# under Apache 2.0 license
Remember this only applies to the F# compiler and not to the .Net runtime which you need to run the compiled code. Microsoft is friendly with Mono currently, but so was Sun with Android.
ntoshev··on Microsoft releases F# under Apache 2.0 license
To run F# you need .Net runtime, which is as closed as it can be. It's like Sun open sourcing the Java compiler but not the JVM.
ntoshev··on Microsoft releases F# under Apache 2.0 license
I think moonlight can't show you any DRMed content; it's still the technology that is at fault.
ntoshev··on If you applied to YC this cycle, please put your email in your profile
Why don't you validate this in software on application time? Just put a big warning on every save and don't allow final submit.
ntoshev··on Ask HN: Preventing SQL injection/XSS in web apps
To prevent SQL injection, use bound SQL variables instead of embedding user input in SQL queries. You will also gain performance.

To prevent xsrf attacks, check referer header before you take action.

ntoshev··on Using the Cython Compiler to write fast Python code
Yup, from the ShedSkin tutorial (http://shedskin.googlecode.com/files/shedskin-tutorial-0.5.h...):

"Shed Skin is an experimental Python-to-C++ compiler designed to speed up the execution of computation-intensive Python programs. It converts programs written in a static subset of Python to C++. The C++ code can be compiled to executable code, which can be run either as a standalone program or as an extension module easily imported and used in a regular Python program."

ntoshev··on Using the Cython Compiler to write fast Python code
No generator support is a big limitation to me: my CPU intensive code uses generators. An alternative to watch is Shed Skin:

http://code.google.com/p/shedskin/

ntoshev··on My Favorite Engineering Interview Question
They were likely trying to help you and wanted to say they don't care whether you write an iterative or recursive solution.
ntoshev··on Offer HN: Advice from PhD on NLP, machine learning, and data monetization
If you like Python, Theano may be useful to you (haven't actually tried it):

http://deeplearning.net/software/theano/

Theano is a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. Theano features:

- tight integration with numpy

- transparent use of a GPU

- symbolic differentiation

- speed and stability optimizations

- dynamic C code generation

- extensive unit-testing and self-verification

ntoshev··on My Favorite Engineering Interview Question
Yeah, I also thought he expected to serve it all from a single disk. Hopefully in real life it gets clear in the discussion.

It's a problem when asking interview questions: there are many ways in which the question may be unclear and the interviewer is mislead that the applicant can't answer. Another problem may be that the interview interferes with the thinking style of the applicant: you try to discuss it with him while he needs time to think by himself, or just the opposite: he thinks better in a discussion and you stay quiet while he sweats in stress.

ntoshev··on Offer HN: Advice from PhD on NLP, machine learning, and data monetization
What are the biggest challenges you meet in terms of missing software infrastructure to support your NLP/ML work? Things you wish someone would implement?
ntoshev··on Django on Google App Engine w/ SQL in near future
I wish they provided an option for the datastore to be even less of an RDBMS, but much faster. I suspect a lot of the current write latency is due to the transactional guarantees they provide. Just give us access to the raw bigtable, please! :)
ntoshev··on 12 Months with MongoDB
Yes, RDBMDSes have built-in cache, but they are not as fast as memcached. So why the difference? I haven't really checked, but you have to populate and invalidate memcached explicitly, and it doesn't honor database isolation (if you invalidate cache after writing an object, some instances may read stale data after you already updated the db, etc). MongoDB's cache may cut corners in a similar way, I'd love to know.
ntoshev··on Ask HN: Why do Hacker News, Reddit, not show the users that voted?
Quora shows who voted up an answer among the people you follow (presumably you value their opinion). Makes a lot of sense in that context.
ntoshev··on Ask HN: Show me your Half Baked project
Rails scaffolding does this for Rails. You need to provide a way to implement custom functionality on these pages though.
ntoshev··on Study Reveals Big Opportunities in the Sharing Economy
If a user is looking for a resource that is not available via the community, the service can offer a commercial alternative.

I have built a first version of a service for sharing physical stuff (yet unreleased) and monetization seems like a no brainer.

ntoshev··on JQuery Mobile Alpha 1 Released
Looks great, but wouldn't it make sense to support Kindle's WebKit-based experimental browser too?
ntoshev··on Ask PG: Lisp vs Python (2010)
You are right of course, but this kind of syntax doesn't help the programmer to cognitively parse the code, which is what I am talking about.
ntoshev··on Ask PG: Lisp vs Python (2010)
There is a language and there is an ecosystem surrounding it (libraries, community, etc). Ignoring the ecosystem, the question "to lisp or not to lisp" pretty much boils down to "syntax or macros" - if you want macros, you go with a lisp, if you want syntax, you go with Python or another modern language.

I used to think macros matter more than syntax, because you can freely define your own micro-languages. I didn't really practice it, because of the practical limitations of the available lisps [1]. Now I think the opposite, that syntax matters more. Syntax helps you parse the code visually and you use lower level parts of your cortex to understand the code [2]. You can build arbitrary DSLs in lisps, but they all have no syntax, so they are of limited cognitive help. I think the real win are modern languages with syntax, that is malleable enough to facilitate the cognitive apparatus of the programmer in most cases, or at least most cases that matter. For example, an obvious DSL is the mathematical notation - Python / Ruby handle it well enough with operator overloading, Lisp actually does worse because of the prefix notation.

It is important to understand that you can approximate the bottom-up style of building abstractions with libraries (instead of DSLs), parameterizing the proper things, with minimal syntax noise. The remaining difference between macros and using higher level functions is mostly in run time optimization.

I guess seasoned lispers learn to "see through" all the brackets and engage the lower-level part of the brain in parsing lisp code. Ironically, something similar happens to Java developers - after enough hours looking at the code they start to ignore the ugly try/catch clauses that can't be properly abstracted away because of language limitatons.

[1] with the exception of one big project in Common Lisp, but I did only a little programming in it, and this was before I fully appreciated macros - but the guy before me used them extensively to build two layers of domain specific languages

[2] L Peter Deutsch talks about this in Coders at Work and this is probably more valuable than what I have to say:

Deutsch: I can tell you why I don’t want to work with Lisp syntax anymore. There are two reasons. Number one, and I alluded to this earlier, is that the older I’ve gotten, the more important it is to me that the density of information per square inch in front of my face is high. The density of information per square inch in infix languages is higher than in Lisp.

Seibel: But almost all languages are, in fact, prefix, except for a small handful of arithmetic operators.

Deutsch: That’s not actually true. In Python, for example, it’s not true for list, tuple, and dictionary construction. That’s done with bracketing. String formatting is done infix.

Seibel: As it is in Common Lisp with FORMAT.

Deutsch: OK, right. But the things that aren’t done infix; the common ones, being loops and conditionals, are not prefix. They’re done by alternating keywords and what it is they apply to. In that respect they are actually more verbose than Lisp. But that brings me to the other half, the other reason why I like Python syntax better, which is that Lisp is lexically pretty monotonous.

Seibel: I think Larry Wall described it as a bowl of oatmeal with fingernail clippings in it.

Deutsch: Well, my description of Perl is something that looks like it came out of the wrong end of a dog. I think Larry Wall has a lot of nerve talking about language design—Perl is an abomination as a language. But let’s not go there. If you look at a piece of Lisp code, in order to extract its meaning there are two things that you have to do that you don’t have to do in a language like Python.

First you have to filter out all those damn parentheses. It’s not intellectual work but your brain does understanding at multiple levels and I think the first thing it does is symbol recognition. So it’s going to recognize all those parenthesis symbols and then you have to filter them out at a higher level.

So you’re making the brain symbol-recognition mechanism do extra work. These days it may be that the arithmetic functions in Lisp are actually spelled with their common names, I mean, you write plus sign and multiply sign and so forth.

Seibel: Yes.

Deutsch: Alright, so the second thing I was going to say you have to do, you don’t actually have to do anymore, which is understanding those things using token recognition rather than symbol recognition, which also happens at a higher level in your brain. Then there’s a third thing, which may seem like a small thing but I don’t think it is. Which is that in an infix world, every operator is next to both of its operands. In a prefix world it isn’t. You have to do more work to see the other operand. You know, these all sound like small things. But to me the biggest one is the density of information per square inch.

Seibel: But the fact that Lisp’s basic syntax, the lexical syntax, is pretty close to the abstract syntax tree of the program does permit the language to support macros. And macros allow you to create syntactic abstraction, which is the best way to compress what you’re looking at.

Deutsch: Yes, it is.

Seibel: In my Lisp book I wrote a chapter about parsing binary files, using ID3 tags in MP3 files as an example. And the nice thing about that is you can use this style of programming where you take the specification—in this case the ID3 spec—put parentheses around it, and then make that be the code you want.

Deutsch: Right.

Seibel: So my description of how to parse an ID3 header is essentially exactly as many tokens as the specification for an ID3 header.

Deutsch: Well, the interesting thing is I did almost exactly the same thing in Python. I had a situation where I had to parse really quite a complex file format. It was one of the more complex music file formats. So in Python I wrote a set of classes that provided both parsing and pretty printing. The correspondence between the class construction and the method name is all done in a common superclass. So this is all done object-oriented; you don’t need a macro facility. It doesn’t look quite as nice as some other way you might do it, but what you get is something that is approximately as readable as the corresponding Lisp macros. There are some things that you can do in a cleaner and more general way in Lisp. I don’t disagree with that. If you look at the code for Ghostscript, Ghostscript is all written in C. But it’s C augmented with hundreds of preprocessor macros. So in effect, in order to write code that’s going to become part of Ghostscript, you have to learn not only C, but you have to learn what amounts to an extended language. So you can do things like that in C; you do them when you have to. It happens in every language. In Python I have my own what amount to little extensions to Python. They’re not syntactic extensions; they’re classes, they’re mixins—many of them are mixins that augment what most people think of as the semantics of the language. You get one set of facilities for doing that in Python, you get a different set in Lisp. Some people like one better, some people like the other better.

ntoshev··on Stop Googling
There is a cultural reason for googling instead of looking at the source: a lot of developers started programming for closed platforms like Windows or Mac OS, where looking at the source was not an option. In the same way, if you are accustomed to heavy frameworks like the ones released by Microsoft / Sun / Oracle, you don't seriously consider writing your own instead of waiting for their next latest-and-greatest tech release that is supposed to solve all your problems.
ntoshev··on The New Sharing Economy
Is anyone interested in working in this space? If so please shoot me an email. I have implemented a prototype of a service for sharing physical stuff.

- it's a Facebook app to utilize the existing trust network

- game elements (gaining karma for sharing)

- built in Python on Google App Engine

ntoshev··on What's wrong with 2006 programming?
I agree you have to make it work with the real and not ideal kernel :) Another thing PHK misses is that single-threaded approach solves the database concurrency problems for free, and people start to use it more - e.g. Stonebraker in his VoltDB.

Polling mincore wouldn't be that bad as it would only happen between the commands and at least the core of the algorithm would be simple: before executing a command, check if it's data are in memory with mincore, if not ask to load them with madvise, and go to the next command.

What does Flash use worker threads for?

ntoshev··on What's wrong with 2006 programming?
Be sure to check PHK's comment (#5)

madvise + mincore syscalls could be used to get the kernel to preload the pages asynchronously.

ntoshev··on Secret Hacker Bookshelf
I upvoted you, but the general problem with these links is that they affect author motivation, whether or not they realize it. This is especially true for subjective listings such as this one, they are simply a brain dump of whatever the list author could think of. That's why you get SICP next to "Head first HTML", and that's why you don't get "Coders at work" at all, even though it's mentioned >800 times on this site, vs much less for other titles on the list.
← PreviousPage 10 of 34Next →