Hacker News new | past | comments | ask | show | jobs | submit | racketeer's comments login

I went to an SFPHP meetup the other day. Sounds like it's coming very soon.


Couldn't you just use one of these things, but instead of batteries plug right into the wall?


This is what continuations are for.


Given that your handle has "racket" in it, I'll assume that you're a call/cc kinda guy.

Even if you're not, others may enjoy this argument against call/cc by Oleg:

http://okmij.org/ftp/continuations/against-callcc.html

Delimited continuations are a huge improvement over undelimited ones, but still, by themselves, any kind of continuations feel like (to me) the GOTOs of functional programming.

More recently, people are doing work with "effect handlers". See Eff & it's research papers, for example:

http://math.andrej.com/eff/

This model is safer, faster, easier, and more composable than general purpose undelimited continuations.


Continuations don't help with the problem that the visual structure of callback-oriented programs doesn't reflect the order of execution. As a heavy JS programmer, that's the most compelling point for me in this post.


> the visual structure of callback-oriented programs doesn't reflect the order of execution.

One of my bosses made this assertion about Object Oriented code that followed the Law of Demeter and other OO best practices. I don't think he's entirely the best OO person, or entirely on the right track. However, I would venture to say that all programming paradigms hit a point where visualizing the flow of control gets exhausting. If it's not a twisty maze of little methods, all looking the same, then it's a twisty maze of callbacks...


Callback-oriented code is different. With by-the-book OOP code you're still executing one line at a time. You might be teleporting in space, which has its own problems, but your code still reflects the order of execution.

With callback-oriented code you're teleporting in space and time.

They can both make it hard to trace the path of execution. At least with OOP code you have a sensible stack trace, though. ;)


True about the stack trace, but teleporting around in space is still the same kind of difficulty. You're taking a whole and scattering it around.


I think he was referring to features like call/cc. They are very similar to C#'s await in that you write regular looking code and the language does the heavy lifting of figuring out what the real continuation is supposed to be.


Actually, they do. C#'s await (and any similar scheme based on ES6 generators) is a feature that can be built using continuations.


So are Java/C#/everything-else exceptions. And, for that matter, pretty much every control flow construct imaginable.

OTOH, I think that the big problem with continuations is that it gets very difficult to build efficient implementations of them (and this tends to impact not just efficiency of code that uses continuation, but usually efficiency of any code in a language which supports them), and it is much more efficient to implement specialized weaker (but good enough for most key use cases) forms of the most important applications of continuations.


Supporting call/cc and dynamic-wind has a significant performance impact in some languages, even for code that does not use the features.

Supporting coroutine.create+coroutine.clone, shift+reset, or setcontext+getcontext+makecontext+swapcontext seems to have no performance impact on code that does not use the features.


In fact, Eric Lippert, when first introducing that feature on his blog started with a five-part series about continuations and only in the end got around to explaining what that was all about. It was a very nice read.


Locus Energy - Solar Monitoring startup in San Francisco. ?Looking for developers. Come learn about solar power, the grid, virtual irradiance (huh?) and build really fun/weird things for data scientists to help make solar power more affordable for homeowners. We're currently trying to staff up so there are a few positions available. Front end / back end / full stack... whatever you are, we'd love to hear from you. hr_tech@locusenergy.com


This is what I've always used http://www.steripen.com/


There appears to be a modification to this phone. - Steve Jobs' head is where the apple bite is. Maybe that caused it?


http://www.mod-gadget.com/tribute-stevejobs-iphone-4s-for-st...

I do agree that the bite looks like a head, but it doesn't look the same as the one in the link above, especially when you take into account the missing "Steve Jobs" and "1955-2011".

I'd put it down to a freakish break line causing fragmentation around the bite. Backplate looks identical to mine (minus the damage).


That's a good point. Is that a stick affixed to the glass, or did some shop actually disassemble the phone?



We're back up. Turns out hackernews can send quite a bit of traffic.


Your logic fails when taken to the extreme. Child labor is used to manufacture clothes in some depoliticized districts around the world. Should we sit back and say, "Hey those guys need money and should be able to get a job and work for it just like us!" Or should we change our manufacturing/distribution methods to encourage more american produced goods?


I think child labor is better than the family starving.

For a lot of human history, we've had kids doing work. It's not great, and parents usually agree! One of the first things that families do, when they escape poverty, is to pull their kids out of jobs and put them in schools. And the money that the child earned can help a family feed themselves and be raised out of poverty. It's a negative feedback loop.


yes? http://nominetwork.org/

There is a large spectrum of scaryness out there. child labor making bags is better than ... the alternative.


I'm confused.. the alternative to child labor is human trafficking?


you've got it the other way around.

Sometimes, child labor is the alternative to human trafficking.


That's like praising child porn because the alternative is sometimes raping children.


Two things. First, I think both of your options are horrible, and specifically selected to be offensive. I'm not aware of any aid organization that makes kids do porn instead of be raped. You can keep that link to yourself.

Second, a kid having to work in a factory is way way better than having to be a slave. Keep in mind, these kids would be working back on the farm with their family, but their family can't afford to feed them, so they send them off. Their families are usually lied to about what their kids are going to do. My western sensibilities find this awful.

So i'm a bit curious at this point. It seems you're advocating, since the kids can't have a perfect life, they might as well be raped?


I think both of your options are horrible,

I can say much the same about your options. Granted, child slavery is worse than child labor. However child labor is still not acceptable. And if a company like, say, Nike was to use that as an excuse for having their shoes made by child labor, I'd find that unacceptable.

...and specifically selected to be offensive.

Of course. That was the point. Your argument is of the form, "We should accept A because if we don't then some people will suffer B, which is much worse." I just substituted a different pair of A and B with a relationship that is just as clear as the relationship between the things that you were describing.

The logical form of the argument is unchanged. Yet your immediate response is that both are unacceptable.


See how our emotions get in the way when parsing the above?

That's one of the fundamental issues with the entire topic - emotions ranked are above evidence based policy.

Strangely enough poor uneducated immigrants are easily net positive for society, and so are educated ones.

I recommend reading "The Economic Consequences of Immigration" for a good picture of the benefits and costs.


wikileaks is gonna be jealous


flash is terrible for blind people. to be public sector compliant you essentially need to be able to tab through elements. you need html of some version.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: