> Imagine having to constantly fight similar urges all the time
I don't have to imagine, I have a child who survived a TBI that included damage to the hypothalamus. He's never satiated, always wants food. Even with strict diet controls and a locked pantry and a refrigerator with a lock and chain around it... he still manages to get food.
You've hit on one of my pet peives with JSON as a transport... likewise with PascalCase from java and .net projects. I tried using snake_case once to placate some PHP, and other guys, but in the end it would have been better to just use camelCase from the beginning as it wound up pretty alien in every environment.
I disagree: code should be correct before it is clear. And because it's so easy to mess up a for loop (for me at least), I choose list comprehensions where reasonable.
> you're just being a jerk to the next dev that has to read your code
That's not very charitable to either party. You're assuming that the motive of the author is to be a jerk, and you're assuming that the reader won't understand. If I had a dev on my team who couldn't read a list comprehension, I'd (a) wonder how they were hired, and then (b) teach them.
I've written a fair share of Haskell, and I still get tripped up by list comprehensions in python - even my own. It's not that it's impossible to understand, and when there's only one predicate, I think it's fine:
for row in [[i*j for i in range(1, 8)] for j in some_list if j % 2 == 0]:
some_op(row)
vs
for j in some_list:
if j % 2 == 0:
row = [ i * j for i in range(1,8) ]
some_op(row)
I would compare it to sentences and paragraphs. The former feels like a run-on sentence, while the latter is more obvious, cause it has one predicate per line. Also, list comprehensions are a bit like yoda-speak - it introduces the verb before the subject. You have to untangle the order of operations, rather than having the order read top-down and left-right.
Though definitely need to do something about that second line.
Haskell list comprehensions are a bit easier to parse because they have symbolic delimiters, the fact that Haskell is naturally more terse, and because you can always check the type of the list
> Once you scratch a little bit the surface, you will see the extraordinary power of its persistent data structures.
I've heard this repeatedly, yet in the examples I've read (for web servers and for web ui work with cljs), they're using atoms with `swap!` to provide "current state".
Could you provide an example of using persistent data structures in a web app? Or am I mis-understanding?
You're compare-and-swapping out persistent values with an atom (it holds a succession of immutable values over time). It's not an example of people shirking persistent data structures for mutation.
Yes, I understand that. I guess my original question would have been better put: can the notion of "current state" be avoided with persistent data structures, and if so, how?
I'm a hardcore imperativist right now, so don't take this as authoritative, but here's my understanding of how that works:
Think of your data as one reality in the set of all possible realities. None of them exist or don't exist, they'll just receive human attention or they won't. Instead of an inbox with an ID and a current state, you just store events that happened and a user might say show me the end state of the timeline that started at event d79se5k. They might also ask you for the timeline starting at a different point.
There's no "current state". You're just ready to answer questions about hypothetical realities. And while some realities are more likely to be computed (and cached) that's only because they correspond to some key facts that a human is going to look up.
Put another way, imagine a soup of unrelated facts. Your code is a way to project those facts into different mathematic spaces. You never just say "what's the current state" you have to actually write out specifically what you mean as a query.
Sorry for the vagueness. I'm just putting out there my fuzzy understanding until someone else can write something better. :)
I'm really interested this approach, and I think a lot of data should be immutable. Sadly, a lot of people are treating immutability as a religion these days, which causes problems when computation is better suited to imperative structures.
> So the solution is to provide drugs that somehow deaden random neurons in somewhat random parts of the brain, and hope they don't cause massive side effects down the line?
The author didn't share a diagnosis, nor did he or she share the specific medication(s) that helped. Given that, how can you conclude that the drugs "deadened neurons"?
I share your skepticism of modern psychiatric medicine, and yet I think you might be missing some understanding and/or empathy for the patient. He or she is describing schizophrenia and major depressive disorder [1], and while often found together, either one can be utterly debilitating. It would not surprise me if the patient had the same concerns as you and I, but was so desperate, so hopeless that they were willing to take the risk.
[1] not a doctor, therapist, counselor or anything close
I am a physician. The few studies comparing long term antipsychotic use in schizophrenia have found that people do better with low/no medication. They are more functional, have fewer relapses and better quality of life. This is still a controversial view in psychiatry but the tide may be turning. Thomas Insel, the head of the NIMH, has stated
"antipsychotic medication, which seemed so important in the early phase of psychosis, appeared to worsen prospects for recovery over the long-term" in reference to these studies.
> The author didn't share a diagnosis, nor did he or she share the specific medication(s) that helped. Given that, how can you conclude that the drugs "deadened neurons"?
You mistake me for talking about the author. I was making commentary about the broad umbrella of psychiatric medicines.
Both I and my wife have taken those drugs, and the feeling in my body was that they deadened a part of ourselves. In my wife's words, "I still wanted to kill my self, but didnt have the will to do it." That's the deadening; feelings were 'grayer', tastes were bland, colors were muted.
> It would not surprise me if the patient had the same concerns as you and I, but was so desperate, so hopeless that they were willing to take the risk.
And I'm perfectly OK with someone with informed consent taking substances. And I consider making use of wikipedia and Erowid as part of that consent, as well as doctors in your stead. I'm also not OK with doctors covering up, glossing over, or blatantly lying about problems that can arise. And from what I've seen, the psychoactive drugs can cause all sorts of side effects, some short lived; others permanent.
My wife and I have had this discussion; Under what conditions would it be OK to forcefully administer psychiatric medicines? Our discussions seem to show no good way to handle this, as it goes from the men in lab coats prior to the 60s, to the abuse of patients ending in the 80s, to simple imprisonment now.
> My wife and I have had this discussion; Under what conditions would it be OK to forcefully administer psychiatric medicines?
That's a significant interference with a person's human rights, so it should be done as a measure of last resort, after all other options have been tried, and with a bunch of checks and measures built in. The person should pose an immediate risk of significant harm to themselves or to other people, and the person should lack capacity to make the choice. The people making the choice should be senior, experienced, and well trained.
And after it's happened there should be some kind of case review to see if it can be avoided in future.
For example, if the person became distressed to the point they are rapidly tranquilised the case review would look at behaviours of other people that created the distress.
There are other things they can do to help compliance with treatment, like doctor-administered injections instead of pills. The thing is that even when people agree to treatment, they might forget their medicine and then be off in a psychotic episode and too detached from reality to take it.
I know this entirely too well because my mother was violently murdered by someone off their meds and the doctors managed to decide that nobody was at risk in spite of her telling them she feared for her life.
So I'd be more inclined to say that doctors have good reason to make sure people stay on their meds and to change treatments to ones where compliance can be better enforced whenever necessary.
In so not to edit posts and context, our talks were about the current shoveling of the mentally ill in the prison system instead of treatment.
There was a recent reddit article in /r/news that talked about a Hawaiian prison that screaming, throwing feces, and other illness had taken over as the makeup of the prison. In general, we have collectively decided that there will be no/little support for the mentally ill, and that the jails and prisons will be the tool to stop them.
With the side effects as they are, how ethical is it to imprison them? They are ill, and we do not generally charge people if a legitimate illness causes a crime (no mens rea). And with the side effects, how ethical is it to force (by court) the drugs that 'cure' them?
`In response to “Please describe the first time you witnessed misconduct by another employee but took no action,” 46 percent (532) advised they had witnessed misconduct by another employee, but concealed what they knew.`
If we can trust the survey results, methodology, etc, the minority of which you speak is 46%.
I'm specifically making a distinction between the bad actors — people who commit an overtly abusive act — and the "thin blue line", which is cops who are aware of the abuses, but conceal or misrepresent what they've seen.
The 46% you cite numbers among the latter. For all you know, though, the people those 46% are talking about having seen committing "misconduct" are the same folks over and over.
I'm not downplaying police abuses, and I'm not excusing the people who don't speak up and call it out when it occurs, but I think it remains useful to make a distinction between them.
Part of the value of making the distinction, IMO, is that the "accomplices", as you call them, are probably an easier and more effective place to attack the problem. Get people who aren't bad actors to speak out about (or even against) the bad actors, and the latter will have to modify their behavior, or will leave the force one way or another.
One would need to know what the misconduct consisted of, in order to judge what this means. Is the misconduct accepting free coffee at the 7-11, or is it beating a prisoner?
> When I started this project in January, gdb failed on every program I tried it on. delve didn’t work on OS X, and print-statement-debugging was too slow and limited. What's a developer to do? Make my own debugger, of course.
It seems like he tried to use delve and it wasn't portable at the time. Sure he could have worked on making delve portable instead, but he probably learned a lot more poking around the internals himself.
> I'm pretty sure the side effects would be utterly intolerable even at half of that dose.
I'm absolutely sure. My son takes methylphenidate for traumatic narcolepsy and hyperphagia. At ~60 kg with a 30mg dose, he's got tremors, sweats, chattering teeth, etc.
I can only assume that the researchers have reason to study using these higher doses in mice, but 1mg/kg and 10mg/kg was the first thing that caught my eye. Neurological degeneration seems entirely plausible when you're frying a brain with speed (so to speak).
I haven't found a satisfactory solution to having communicating containers across multiple hosts. There seems to be quite a few solutions in the making (libswarm, geard, etc). How are other people solving this (in production, beyond two or three hosts)?
I simply expose ports (or do --net=host) and communicate between hosts in the normal fashion. Unless you don't trust your host I don't see the problem with that.
I don't have to imagine, I have a child who survived a TBI that included damage to the hypothalamus. He's never satiated, always wants food. Even with strict diet controls and a locked pantry and a refrigerator with a lock and chain around it... he still manages to get food.
It's a living nightmare.