Hacker Newsnew | comments | show | ask | jobs | submit | throwaway54-762's commentslogin

Sure, Java or C will be much faster at any computational work. And I am no node.js fan-boi. But doing actual asynchronous local-file IO in C is non-trivial, and if their server is not CPU bound, there doesn't seem to be anything wrong with using node.js. Could you also use libuv from C? Sure.

-----


"Java or C will be much faster at any computational work"

That is far from clear. I've been using nodejs for some computational work using https://github.com/substack/gamma.js and https://github.com/niggler/bessel and found that the JS version is faster than the straightforward Java implementation.

-----


The OP made too general of a statement because there are certain cases where V8 can preform better than the JVM; however, generally Java does seem to perform better (ignoring startup time).

http://benchmarksgame.alioth.debian.org/u64/benchmark.php?te...

In the linked benchmarks, V8 only has a decided advantage executing regexes.

-----


Heh. Last time I checked v8 regexes were really fast, except their string builder was a disaster... it wrapped every piece of string as a js object (gc and everything).

-----


Sounds familiar to Java's own string concatenation. In Java you use StringBuilder / Buffer to create larger strings from smaller ones; in Node you'd use Buffers, although I never dived too deep into those.

-----


Well, C will be faster anyways... and the JVM is probably faster than v8 more times than not.

-----


im not an expert but arent UDP Socket connections more like an fire and forget scenario which doesnt create alot of waiting ? Id think that game servers have to compute heavier stuff per tick and have to process all the incoming packets anyway so that waiting for IO isnt really an issue ? It might make sense to have the game world updating and sending/recieving packets in different threads though, so is that were nodejs makes sense?

-----


The network stuff is, yeah. But presumably you want your minecraft world to be durable, which means hitting disk. And you don't want your network stuff blocked behind that.

-----


ok makes sense but i wouldnt write every change to the disk anyway. The server state can well be kept inside memory and only be saved once in a while, but nevertheless doing that in a different thread would make sense.

-----


There are a couple projects in this direction (I looked into trying to make a bot at one point). Unfortunately, any names have slipped my memory at this point. But be assured, they exist.

-----


Voxel.js is one: http://voxeljs.com/

-----


In what way is this a minecraft client?

-----


Well it's not technically Minecraft, but obviously heavily inspired. I'm pretty sure I heard about someone hooking it up to the real protocol.

-----


Cool, a distributed minecraft server. But where's the source, or something more technically meaty? "I made a distributed X and here's some screenshots" isn't that interesting alone.

-----


I plan on open sourcing it and trying to foster a community of modding/contributions, but first I would like to clean up the code. Also, we want to figure out our business strategy.

-----


Well, I'm logged in right now and there's no lag with many players. Try it.

-----


I am at work, and don't have minecraft on any machine nearby =).

-----


> In the author's example, the fastest implementation was actually _not_ lock-free, it merely used a better spinlock than std::mutex.

The author is also using gcc 4.6; perhaps different results would be obtained with gcc 4.8 or recent Clang. If you care enough to think about LFDS, measure measure measure =).

-----


Or glibc's pthread_mutex_t implementation. Or hand-written assembly above futex(2). There's no lack of synchronization primitives.

-----


The adverse side-effects do not magically go away; however, the benefits are (supposedly) much greater for a person diagnosed with AD(H)D than recreational users. Thus the net gain (benefits - costs) is positive for some people.

-----


This is how I'd put it. I've been diagnosed with adult ADHD and take a moderate to low dose of Adderall under the direction of my doctor. I can easily forgo taking it for weeks, and do so. These "vacations" without it were advised by my doctor to prevent tolerance buildup, and I suspect to diminish the potential for addiction. My dosage has remained constant and I don't feel a "need" for it, so I guess they work. For many of those with ADHD the drug makes a world of difference, and pushes focus and tendency to move around into the "normal" range. For certain activities the (benefits - costs) equation works out, while for others it does not (which is to say certain activities don't appreciably benefit from the quiet mind--the costs are long term and are more difficult to discern). It's about planning to take it for days where it does help, and being mindful of the health ramifications (staying hydrated, eating normal and healthy meals, monitoring cardiac health with support from a doctor, continuing to consult the doctor, etc.).

My biggest fear beyond addiction is that it will be detrimental to my memory and learning in the long term. It's difficult to know if that is true.

The author clearly abused it. Taking it "to socialize" seems weird to me. I suspect the author did not need it in the first place, and was already in the "normal" range. My mentally disorganized self is much more outgoing that the focused version of me. If it is impacting sleep, the dosage is probably too high or too extended (though many MDs prescribe the XR version since ostensibly it has less potential for abuse).

Some of the alternative pharmaceuticals may work about as well, but Adderall has been around for so long that its risks are fairly well understood--though less so with long term use.

Vyvanse is a means to extract more money from patients via patent protection. It's essentially dexedrine with a lysine attached (new side group=new patent). The lysine gets cleaved in vivo, and it becomes dextroamphetamine. Adderall is a mixture of dextro- and levo- handed salts, so it's a bit more nuanced.

Taking it without doctor supervision is a major risk, and taking more than is prescribed or mixing it with other drugs as the author did compounds the risk. The potential for abuse is real.

-----


It's an extremely hard drug for anybody, ADHD or no. Adderall / Vyvanse is prescription meth[0] (something I've heard from several of my AD(H)D friends). If the pros outweigh the cons for an individual, great; I wish them the best. But while I can't find the research I remember to back this up, it's looking like long-term medication with amphetamines may be ineffective or harmful.

EDIT [0]: Yes, I know that that prescription meth literally exists under the name Desoxyn, that is not what I mean. See https://news.ycombinator.com/item?id=5321949 and https://news.ycombinator.com/item?id=5321935 .

-----


A few years ago, my doctor encouraged me to stop taking Adderall based on the conventional wisdom that it was likely to cause heart disease. I'll always remember what he said, I only prescribe Adderall for depression in my terminal cancer patients, because I'm not worried as much about their long-term heart health

OK, Doc. Let's not refill that prescription, then.

This conventional wisdom has recently been challenged, but I think there is no great consensus on this issue yet.

http://www.dailyrx.com/adhd-medicines-were-not-linked-seriou...

-----


Oh, the possible negatives I had in mind were brain-related: "diminishing returns" due to tolerance or other factors after long-term use, and adverse side-effects of the drug flooding your brain with seratonin and dopamine over long periods of time (obviously similar to that observed in long-term methamphetamine use).

-----


I see. I wasn't a long-term user and was always extremely conservative with my dosage, so I didn't encounter any of those brain-related issues.

Even with the fact that they are in the same family of drugs, comparisons to long-term meth abusers doesn't seem quite right.

-----


Every person is different, and meth is definitely abused in higher proportions more than prescription adderall — I am not contesting that, or attempting to compare adderall users to meth users.

I am trying to highlight the similarities between the drugs themselves.

-----


Prescription "meth" is just that: meth. Methamphetamine is legal in the US and available under prescription (brand name: Desoxyn). It's scheduled just the same as Adderall -- not that scheduling means much; most of it's science-free political posturing.

Adderall/Vyvanse are amphetamines but not methamphetamine.

-----


It's figurative, not literal. I am very much aware of desoxyn and that adderall is actually composed of four amphetamine salts, none of them literally meth. However, the amphetamine family of drugs have very similar effects — meth is very similar to adderall is very similar to vyvanse.

-----


I don't understand the figurative part. Is that like folks who call oxycodone "legal heroin" or "synthetic heroin"? Is it supposed to sound edgy or provide some sort of shock effect against ignorant people? I don't get it.

-----


I don't describe it like that to "sound edgy" or provide "shock effect." It's just pointing out that these drugs are very similar chemically and biologically, and that people should examine their own biases that divorce adderall (medicine!) from meth (evil drug!) in their minds — they are not so different substances.

-----


However small the chemical difference, there is an enormous practical difference.

Meth can produce an intense high. Adderall, not so much.

I don't have any experience with meth so I can't compare Adderall and meth directly. However, I'd compare the extremely limited "high" from Adderall with... what a person with no caffeine tolerance feels when drinking a medium latte from Starbucks. And, like caffeine, you quickly grow accustomed to Adderall and no longer feel a high from it.

So while it's true that they're chemically similar, and that we shouldn't be demonizing anybody in my opinion, I don't think Adderall and meth are very similar in a practical sense.

While Adderall is obviously misused by some, it is seldom abused in the catastrophic ways that meth is.

-----


I think you're naïve.

Experienced amphetamine users are not able to distinguish the effects of amphetamine (Adderall) and methamphetamine (Desoxyn) in double-blind "taste tests". The main difference is that the effective dosage is different.

It's easy to abuse amphetamine in the catastrophic ways that methamphetamine is abused: you crunch it up and snort it instead of taking a slower-releasing pill, and you take higher dosages than you'd take to focus on your homework.

-----


> However small the chemical difference, there is an enormous practical difference. Meth can produce an intense high. Adderall, not so much.

This just isn't true. Adderall is several amphetamines and the drug definitely produces a high. The medical application of the drug is this rush of dopamine and seratonin allows users to focus and ignore distractions.

The high is an amphetamine high, much like meth, actually. You've noticed that tolerance diminishes these effects; so have many meth users.

-----


This just isn't true. Adderall is several amphetamines and the drug definitely produces a high. The medical application of the drug is this rush of dopamine and seratonin allows users to focus and ignore distractions.

There's no rush of serotonin. Amphetamines primarily affect the norepinephrine and dopamine transporters. They can affect serotonin transporters, but only in very high doses. (MDMA, or "pure" Ecstasy, affects primarily serotonin transporters, and has very different effects.)

The ratio of affinity for the dopamine transporter vs. norepinephrine transporter is substantially different between methamphetamine and dextroamphetamine (the principal component of Adderall). While both bind to both, methamphetamine has a stronger relative effect on the dopamine transporter as compared to dextroamphetamine.

The "classic" picture is that the norepinephrine transporter affects dopamine levels in prefrontal cortex and norepinephrine levels throughout the brain, and the dopamine transporter affects dopamine levels in the striatum. Striatal dopamine release is probably important for both the reinforcing effects of the drugs and their effects on motivation. Prefrontal dopamine release is probably important in improving focus. Because dextroamphetamine has a stronger relative effect on the norepinephrine transporter, it causes greater prefrontal dopamine release relative to striatial dopamine release, although both drugs still cause both.

So, the drugs aren't quite the same, and there's a reason Adderall and not methamphetamine is prescribed for ADHD, but you're right that a high enough dose will produce a high in either case. However, the action of the drug that produces the high isn't necessarily the (only) action that has therapeutic actions on ADHD. Atomoxetine (Strattera®), which only affects norepinephrine transporters and is comparatively non-addictive, is also effective against ADHD.

(While I am a neuroscientist, I'm not entirely up to date on the literature here, so take this all with a grain of salt.)

-----


Thanks for going into more depth here. You understand it much more thoroughly than me =).

-----


Your body acclimates itself to just about anything - the weather, sugar, MSG, even frequent shampooing or Chap-Stick usage. That doesn't mean those things are comparable to meth.

Nobody I know feels that Adderall provides much of a high. Anecdotal, sure, but it seems like a heck of a statistical anomaly.

Then again, I don't know anybody that's experimented with unsafe doses of Adderall. I'm sure that at dangerously high doses, the effect isn't unlike meth.

Then again, that's true of just about anything even remotely psychoactive when you talk about large doses. Heck, 500-1000mg of pure caffeine will probably get you meth-like results.

-----


No, large doses of different drugs have very different effects. Massive doses of caffeine will make you anxious, shaky, and give you heart palpitations, but it won't make you have sex all night long or hyperfocus like amphetamine.

The reason large doses of methamphetamine have very similar effects to large doses of amphetamine is not that in large doses, all drugs are similar; it's that methamphetamine is very similar to amphetamine.

-----


> Your body acclimates itself to just about anything - the weather, sugar, MSG, even frequent shampooing or Chap-Stick usage. That doesn't mean those things are comparable to meth.

Yes, of course, tolerance isn't indicative of meth.

> Nobody I know feels that Adderall provides much of a high. Anecdotal, sure, but it seems like a heck of a statistical anomaly.

I would respectively disagree. Yes, typical therapeutic doses of adderall are smaller than typical recreational doses of meth. But that is comparing small apples with bigger apples ;-).

> Then again, I don't know anybody that's experimented with unsafe doses of Adderall. I'm sure that at dangerously high doses, the effect isn't unlike meth.

Or even just at non-dangerously high doses ("normal" meth doses). In other words, if the doses are similar, the effects are similar. You seem to be arguing that because meth is typically consumed at higher doses, it is different.

I agree that typical meth use is very different from typical medical adderall use.

-----


Haha. I'm afraid to look like I'm asking for my own recreational purposes, but what doses would that be?

Again, this is anecdotal and doesn't prove anything, but when I've taken too much Adderall at once I haven't found it very pleasant at all. It wasn't fun and nothing about those dosages made me want to repeat the experience, much less experiment with even higher dosages.

(For me, "too much" would be taking 15mg in a single dose. I know that's not a huge amount in the scheme of things.)

  > I agree that typical meth use is 
  > very different from typical medical adderall use.
I don't mean this rhetorically at all... what do you feel is the reason (or reasons) for this?

-----


  > Haha. I'm afraid to look like I'm asking for my own
  > recreational purposes, but what doses would that be?
GP here (separate work/home accounts). Anecdotally, I get a mild high from 10 mg of dextroamphetamine or adderall, and have experimentally taken as much as 30 mg. But I have zero tolerance; I've taken amphetamines less than ten times in my life.

  > Again, this is anecdotal and doesn't prove anything,
  > but when I've taken too much Adderall at once I haven't
  > found it very pleasant at all. It wasn't fun and nothing 
  > about those dosages made me want to repeat the 
  > experience, much less experiment with even higher 
  > dosages.
  > (For me, "too much" would be taking 15mg in a single 
  > dose. I know that's not a huge amount in the scheme of 
  > things.)
Yeah, at 20-30 mg there are definitely negative side effects; I wouldn't want to do anything social, like the article's author describes, at those doses.

  > > I agree that typical meth use is 
  > > very different from typical medical adderall use.
  >
  > I don't mean this rhetorically at all... what do you 
  > feel is the reason (or reasons) for this?
I think they are introduced to people differently, on average. I think adderall is primarily introduced to people as medicine by some authority figure the person respects (doctor), and they're likely to stick to their prescribed doses. Vs, I think meth is more frequently introduced as a fun energy drug (or advertised as MDMA), with vague dosages, unknown quality and purity, etc. Maybe meth users titrate until they feel good, which means escalating dosages quickly due to tolerance. (I can't speak from personal experience here.)

I think some minority of both adderall and meth users (ab)use the stimulants to try and overcome drowsiness and focus more on their work, like some college students (including article author). I think a fair number of people do this without any bad outcomes (myself included). But a fair number also escalate in response to tolerance, and this kind of use is problematic. Maybe awareness of tolerance, neurobiology, etc, would help? I read a lot of erowid before I ever consumed any drugs, but I also have pretty strong self-control, so I don't know that it would work for everyone.

Anecdotally, I don't even try to use amphetamines for productivity anymore because they don't clear from my system fast enough to avoid interfering with my sleep. I'm more productive for one day (if that), but less productive over a two-day period.

-----


> I don't even try to use amphetamines for productivity anymore because they don't clear from my system fast enough to avoid interfering with my sleep.

Some people have told me that they prefer cocaine to amphetamine specifically for this reason: its metabolic half-life is something like two hours, if I recall. Have you tried using cocaine instead? I'm not sure if the toxic side effects are more or less severe; maybe you know.

(Myself, I stay far, far away from the entire family of stimulants. The most I take is caffeine, and then only in the traditional drink forms, not in pill form.)

-----


I wouldn't want to try and use cocaine to focus. While I've tried it once, I don't like the typical routes of administration, the lack of quality control, and financially, supporting the drug cartels.

The only drug I use regularly is caffeine, also (coffee) =).

-----


Hmm, I think most people who take cocaine just chew coca leaf, which eliminates all three of your concerns. There may not be any people taking cocaine by that route anywhere near you, though.

-----


Yeah, I live in the PNW of the US, not South America. Coca leaves are basically unavailable.

-----


From a former tweaker I know: smoked meth (or even hotrails) is in an entirely different class, but swallowing methamphetamine powder (capped or in a paper "parachute") isn't noticeably different in peak intensity from the 30mg IR adderall pills, but the meth lasts much longer.

Insufflated meth is higher peak than comparable by weight adderall powder (crushed up pills), but just increasing the adderall quantity makes up for that.

-----


> Adderall / Vyvanse is prescription meth (something I've heard from several of my AD(H)D friends).

No, that's Desoxyn[0].

What you may be referring to is that Adderall, methamphetamine, and MDMA have remarkably similar effects, which is true - the active ingredients in all three are metabolized in a similar manner, and the main differences are the means of ingestion, the bioavailability, and set/setting. In methamphetamine, for example, the extra methyl group simply ensures that it can cross the blood-brain barrier more easily, but it doesn't change the actual effect of the drug in itself.

[0]http://www.rxlist.com/desoxyn-drug.htm

-----


> What you may be referring to is that Adderall, methamphetamine, and MDMA have remarkably similar effects, which is true - the active ingredients in all three are metabolized in a similar manner, and the main differences are the means of ingestion, the bioavailability, and set/setting.

Precisely. I'll add a clarifying edit now that two people have interpreted my statement differently than intended..

https://news.ycombinator.com/item?id=5321935

-----


Other than, e.g., Red Hat[0]?

[0]: https://en.wikipedia.org/wiki/Wayland_(display_server_protoc...

-----


A better title might be "visualizing the object-reference graph in Ruby;" debugging memory leaks is a neat side effect. That being said, it's an interesting little project.

-----


This reminded me to make another donation towards py3k support =). Keep on rocking on, pypy.

-----


Same, chrome 25.0.1364.97.

-----


this happens when facebook is "down" or when u set bad timeout /https. Can you trace urls you get ? Https enforcement?

-----


guys, my bad - typo :(

-----


WFM now =)

-----

More

Applications are open for YC Summer 2015

Guidelines | FAQ | Support | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: