Better HN
topnewbestaskshowjobs
Log inSign up

frognibble

612 karma · joined May 9, 2009 (17y ago) · 154 submissions

Hi, I was going through my deceased sister's computer and found this account. Just want to let you know that she's in a happier place.
Submissions

comment 16y ago · link · parent

The RIAA's goal is to scare people away from sharing. The goal is not to make money from lawsuits.

comment 16y ago · link · parent

It's interesting to compare this example with the somewhat similar example written with node.js: http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/

comment 16y ago · link · parent

The reasons for not using exceptions are covered here: http://golang.org/doc/go_lang_faq.html#exceptions

comment 16y ago · link · parent

At most, you need to track a couple of booleans per socket, one for read and one for write.

Depending on what you are doing, you might not even need to track these booleans. For example, on the read side you can ignore read events when you are not interested in reading. When you switch back to read interest, you can read the socket to see if data arrived while you ignored events. A similar strategy can be used on the write side.

comment 16y ago · link · parent

The blog post does not say if the epoll code uses level triggering or edge triggering. It would be interesting to see the results for both modes. The smaller number of system calls required for edge triggering might make a difference in performance.

comment 16y ago · link · parent

Software engineer is the generic title for a number of levels: software engineer II, software engineer III, senior software engineer, staff software engineer, senior staff software engineer, and so on.

I heard that the job titles for engineers above a certain level are shared publicly with in the company.

comment 16y ago · link · parent

Econtalk is my favorite podcast. For those who might be put off by economics, here are a couple of interviews that readers here on HN might find interesting:

Paul Graham on Start-ups, Innovation, and Creativity http://www.econtalk.org/archives/_featuring/paul_graham/

Paul Buchheit on Google, Friendfeed, and Start-ups http://www.econtalk.org/archives/2009/09/buchheit_on_goo.htm...

comment 16y ago · link · parent

I find it odd that one of the core businesses is a type of user (business users) while the other seven are products.

comment 16y ago · link · parent

The goal of this trick is to reduce the memory required when the argument to the count function is a lazy sequence. When iterating through a lazy sequence, the items in the sequence are realized and retained by the sequence.

The code clears the stack slot for the count method argument. If the object referenced by the argument is not referenced elsewhere, then the object is eligible for gc during the execution of the count method. In the case where the argument is a lazy sequence, this changes the memory requirement from the entire realized sequence to a single item in the sequence.

This trick is employed everywhere in the Clojure implementation where a lazy sequence might be retained. It's not specific to the count function.

comment 16y ago · link · parent

Because Servlet 3.0 does not dictate how an application suspends or resumes request handling, I wouldn't say that Servlet 3.0 introduces event based request handling (other than the first invocation of the handler as in Servlet 1.0).

I guess one can claim that any suspend and resume logic in the application is a form of eventing, but it's different from node.js in that it's not pervasive through the application. It's also different from node.js in that the server infrastructure is not involved in the "events".

comment 16y ago · link · parent

Threaded does not imply one thread per connection. As an example, Java Servlet 3.0 allows a request handler to suspend and resume execution of a request handler on a thread. This feature allows the application to relinquish the thread for the occasional long operation and use blocking threaded code for most other code. Threaded applications written in this style can support a large number of concurrent connections with modest resource use and no callback spaghetti.

Models like Java Servlet 3.0 allow threaded servers to handle a large number of concurrent connections. Are there other reasons why threaded servlets are slow or not scalable?

Most web applications don't have a large number of concurrent connections because they application request handlers do not block for a long time. The resource use for thread stacks is very modest for these applications even without a suspend & resume feature.

comment 16y ago · link · parent

I keep hearing assertions that threaded can be slow or does not scale. Can somebody describe the reasons here or point to a good document on the subject?

I often see "scalable" and "fast" used interchangeably in these discussions. These are different concepts. Is the contention that threading is not as scalable as evented, not as fast as evented, or both?

comment 16y ago · link · parent

Here's the previous discussion on Paul Tyma's presentation: http://news.ycombinator.com/item?id=1546711

comment 16y ago · link · parent

The code handles concurrency the same way that redis handles concurrency. It's single threaded.

comment 16y ago · link · parent

Javascript might not even be the best language for the browser. The browser programming model was set in stone years before significant applications were built in the browser. If we had a choice about the browser programming model, then it seems likely that better programming models would have emerged based on the experience.

comment 16y ago · link · parent

F.lux adjusts the color of your computer's monitor to match the time of day. It's warm at night and like sunlight during the day.

I've been using F.lux for a couple of months on OS X. The orange color at night looked a odd to me at first, but now I don't notice it.

F.lux can help you sleep better: http://www.stereopsis.com/flux/research.html

comment 16y ago · link · parent

I'd like to see the code used in the benchmarks before drawing conclusions from this work. Programming Java NIO is tricky. It's possible to make some mistakes and still have things "work". One example mistake is setting the write op on the selection key when there's nothing to write on the socket channel. This bug will cause the typical select loop to consume 100% of a core. The code stil works, but is much slower.

comment 16y ago · link · parent

I think it depends on what you are doing. If the app has a single logical thread of execution, then sequential code is easier to understand than a series of callbacks. If the app executes steps in parallel with forks and joins, then a state machine implemented with callbacks can be easier to understand.

The typical web app falls in to the former category: validate input, read from cache, maybe read from database, maybe write to database, generate response.

comment 16y ago · link · parent

I suspect that Google used email addresses because they already have tools for managing that namespace.

comment 16y ago · link · parent

Perhaps you meant to say that the framework used in this example is not ready. I didn't see anything about Clojure the language that makes the example complicated.

As far as the framework is concerned, the example shows how to build a production deployment of the application. The author is not showing a toy teaser application. There are a lot of details there, but these are things that you would want to know if you actually want to run a production server.

comment 16y ago · link · parent

The email address is not displayed on the profile page.

A user can customize his or her profile URL with an email address. The settings page clearly states that the email address is publicly discoverable if the email address is used in the profile URL.

comment 16y ago · link · parent

There are a few usable libraries for building web apps in Clojure (Compojure is an example). These libraries are not as comprehensive as libraries in other languages and the communities are small as you noted. That said, I wouldn't describe the experience as painful. Some of the libraries are pleasant to use.

I agree with your comment regarding Clojure's concurrency constructs. I am building my web app to run on more than one machine. I have not yet had a need to use any of the concurrency constructs.

comment 16y ago · link · parent

It looks like it has all the basic photo editing features in addition to the gimmicky features like stickers. It seems useful to me if you don't have Photoshop (and you are using Picasaweb).
123456