HNHacker News
TopNewBestAskShowJobs

drostie

4,724 karma · joined January 19, 2012

Hi, my name is Chris Drost. I'm an application developer at U.S. Engineering Company in Kansas City, MO. If you're a talented software engineer in the KC region, hit me up -- we may be hiring.

I am @crdrost on Twitter and Facebook. I almost never check my Facebook.

I have an M.Sc. in Applied Physics from the TU Delft in the Netherlands. I am from Ithaca, NY originally.

You should listen to more Troubled Hubble.

    Don't you forget the, the image in your retina
    To foresee the future, and find a use for
    Them telling me, everything, 
      that would happen to me anyway.

    If it isn't science, it doesn't exist;
    We make our own problems and blame them on
    Birds and bees, but we ain't seen nothin' yet:
    and don't you ever forget it.
Also, more Glaze.

    Every night I wake up,
    Thinking there's something missing in my heart:
        a canvas for the art.
    Every day I hear the sound of whirring fans,
    But nothing more:
        another scene yet to be scored.
    
    You're the empress, I'm the king:
        together we will rule this world
    You'll paint the scene, I'll write the melody:
        we will rule this world.
Maybe also some '90s stuff.

    And of course you can't become, 
    If you only say what you would have done:
    So I missed a million miles of fun.
Email me by my HN username @zoho.com or my twitter handle @gmail.com.
submissionscomments
drostie··on Why not just a simple spreadsheet of salaries?
I was hired for $65k or so after a 6-month job search left me financially drained. There was the promise that typical raises could go into the 10% or more per year region, with a possible promotion to a Senior Software Engineer position, but after a sister company had a poor year of growth and a lawsuit hit my company this past year, I'm at-or-under $70k. It's awful, especially when given that I work 44-48 hours per week and given that my domain knowledge is incredibly broad and I know my specialities inside-and-out, and have a Master's. I was really expecting an appropriate pay raise recently because my work helped my company sign a new client who's something like 100x their size, their "chump change" is, like, double everything the startup makes.

Part of the reason that I'm staying is because I'm in a tremendous amount of debt and therefore I've become extremely paranoid and risk-averse. Part of the reason is that said debt has me working a second job and I am in a largely-dysfunctional relationship besides, so I have very little energy outside of this job. Part of the reason is that I have gained 80 pounds and no longer fit into any nice clothes for a job interview, with very little chance of me getting anything nice any time soon.

Man, that paragraph makes me sound like such a downer. I promise that I'm really happy and easygoing most of the time! That's just the more-sober reality of why I find it a huge struggle to jump onto some new thing.

drostie··on Arxiv Sanity Preserver
I'd offer but I have other commitments this afternoon; I hope you find someone who can help!
drostie··on Show HN: A multi-syntax programming language with bidirectional grammars
Awesome! This has long been a dream of mine, but I never solved the problem of creating a better syntax than BNF grammars etc.

I don't know if we have the same goals, but my end-goal was to have some treelike serialization (JSON/XML) but a canonical editor which would display in whatever you were most familiar with (Lisp, Python, Haskell, C-ish). The limitation would be that you'd have to store metadata-ish stuff on the tree to handle custom indentations that don't follow some canonical style guide.

drostie··on What Makes Software Good?
Side note: the images in the middle of the article are Masahiro Mori's 1969 "Fancy Cups", and solve the problem of "you've all put down your drinks and now nobody remembers whose was whose" with tactile feedback -- without giving everyone a different style of cup. Right now I and my girlfriend have been doing the same by collecting a bunch of individual mason jars from different flea markets, ensuring that none of them look 100% alike, to try to replicate the same effect on a budget.

As for the article content, I am in general somewhat skeptical of these highly-cerebral approaches of "what can we learn from that?" -- it is very hard to remember those maxims when you are setting out on a new project, even if they are taped up on your desk! A simpler maxim which would save a lot of effort is "You only have to solve the immediate problem in front of you -- stop trying to anticipate the next one," and perhaps another is "Don't start that project until you spend a whole shower/bath thinking up some perspectives on different ways to solve this problem." As Alan Kay says, the right perspective is worth 80 points of IQ. Maybe one more is "design top-down: create a non-working prototype of what you want the end user to be able to do if they could magically will some functions to exist, then fill in those functions' type signatures and some stubs, then fill in those functions' bodies."

So for example I bolted one idea on top of an existing infrastructure this past December. The preceding infrastructure was really good for what it did -- categorizing books statistically by content -- and this would look at the categories of the book and then perform some action with it. This works great for the 90% of the use-cases we care about and we have humans filter the remaining 10%, making them 10x more efficient -- great! Except for the setup, which is painfully expensive, because now we have to set up these category rules etc. for anyone who wants our custom-action service, which turns out to put 2 layers of indirection between "here is this book" and "here is the action I want to take on it." Some client says "well I want to filter out the books containing this phrase", now we have to define some new categories, some appropriate rules to filter into those categories, and then set up new rules to act on the assignment of this category -- not fun, and the many-to-many table joining categories to actions is just annoying to deal with.

Instead I should have implemented (and am now implementing) a little microlanguage where you can just read what causes the action in one TEXT field in the database, and decouple these two systems completely. Then it becomes easy to ask someone, "hey, could you specify those rules? Here's a widget to test against with validators..." and they can see it for themselves. Now they can build a bunch of these in some text or Excel or whatever document they're using, and just send them to me, and all I have to do is change curly-quotes to straight-quotes.

drostie··on Life at Low Reynolds Number (1976) [pdf]
This was the subject of one of the lectures I took in Biophysics at the TU Delft in the Netherlands, great to see this talked about. A lot of our intuitions about motion is based on the old swimming idea of "I'll kick a vortex of water backwards and it will propel me forwards!" and that simply doesn't work if you can't exceed this critical force of the fluid, which is what you need to do to make vortices and transfer out of a laminar regime. Instead you have to essentially "crawl along" the fluid around you, rather than "swimming" in the normal sense.

Another lecture which was memorable dealt with the sheer variety of different situations and biomechanisms which you can rule out using the Second Law of Thermodynamics. The bottom line is that when you're at thermal equilibrium then everything must jitter thermally by the same amount, which is what excludes "Brownian ratchets" [1] from working: if you peek inside at the spring and asymmetrical "teeth" inside an actual ratchet, then you realize that the work extracted actually comes from heat-transfer to the spring, which is being implicitly assumed to be at 0 temperature in the naive "oh, you get energy out of nothing!" argument. It's a very simple 2nd-law argument to make, but really hard to poke around inside and figure out what's going on internally.

[1] https://en.wikipedia.org/wiki/Brownian_ratchet

drostie··on Dsxyliea
It's testimony to the power of the effect, though, that the two times Matt uses (sic) [when decoding "rscheearch" as "research" and "researcher"] he uses it incorrectly. Possibly some copy-editor has fixed both inconsistently or something, but I think he just didn't unscramble the word manually.

The proper misspelling is probably "researchch".

drostie··on Get an unbiased opinion on if you should get out of bed
I like to think it's that the sound of rain is so relaxing that I am just in a state of pure comfort and that's why I don't want to get out of bed.

I also have a folder of rain sounds collected off of archive.org and some other places, for when I want to get deep work like programming done. I feel much better at creative tasks when I'm relaxed by rain sounds.

drostie··on If you hate telemarketers, you’ll love this robot designed to waste their time
Needs more "I'm interested -- could you tell me more?" type things.
drostie··on How Google’s Web Crawler Bypasses Paywalls
Unfortunately, yes. The law legally protects anything which you might use to gain unauthorized access; that includes e.g. a password field. (That is, it is indeed breaking into a system if you type in the correct password, say by reading it on a post-it on someone's monitor, but you are not supposed to know that password.) This sort of thing makes the entire business of law complicated and impossible to automate.

Then again, lots of sci-fi dystopias are dreams of an automated law that somehow destroys the fabric of society, so...

drostie··on The Daily Mail Stole My Visualization Twice
Unfortunately that would not work in this case: in this case they created an unauthorized copy of the work on their own server for the purposes of redistribution; therefore they had full control over the HTTP headers.
drostie··on How Meditation Changes the Brain and Body
This is more traditional meditation; mindfulness is something which is also practiced in a sort of everyday life, but here's a 5-minute guide to meditating.

So the first thing you need that's often sadly overlooked is a special place which you make for meditation. This can be as simple as "I am going to set an exercise mat in the middle of the carpet in my living room." Keep the space to be relatively clean. Cleaning is itself a great way to dedicate your mind to wholesomeness and order.

Once you've cleaned a space and imbued it with symbolic power, "here is where I am going to meditate", you sit there. Sit however you like the first several times. There is a special way to sit involving a "Zafu" (a pillow that when compressed is still 4-6 inches wide) that you may want to research, where you sit on the edge of it with much weight resting on your knees, and your feet are in a position that neither restricts blood flow nor pinches nerves. The cushion angles your hips forwards, which keeps your back straight. But if you don't have the disposable income to get the cusion for this, just sit down however feels comfortable. Place your hands wherever feels most natural for you to be able to breathe deeply.

Once you have a comfortable seat in that place, it helps to have a little speech to focus your attention and remind yourself what you are doing and why. One Buddhist pre-meditation speech I heard says (with a bit of misremembering and translation error doubtless thrown in): "I am here to end my confusion and distraction. If ending confusion is more important to me right now than everything else, I will succeed. If it is not more important than something, I won't. I am not here to learn some new ideology, but just to pay attention to my own mind: I want to awaken to the causes of my distraction so that I can learn how they work and restrict their power over me."

Now, have something repetitive that you can come constantly back to. Distraction works like alcohol works: if you ingest a little, it subtly compromises your mind in just the sort of way that makes it more likely to ingest more. So this is why the space is clean and you are sitting with good posture without pain, so that you remove the most common distractions of mess, sleep, discomfort.

Many people use the rhythm of deep breaths as the repetitive thing they can come back to. If you are a more visual person, you might want to instead put an object of religious veneration, be it a cross or a Buddha or what-have-you. Someone whose peacefulness you can study is good.

I once helped develop a more "active" picture for a friend who had grown up with either ADD or ADHD, I don't remember which. She said she needed something more like a wholesome movie. We tried to structure it so that it could still be repetitive. Then a week later neither of us could remember what we had done the week before, so we created a new one but as a mnemonic we structured it around 5 elements. It looked something like this:

    Dwell on each of these for 10-15 minutes as a way to eliminate
    distractions. If you find yourself thinking about something else,
    allow yourself to think about it for a little, then return to the
    element you're on.

    1. (Air) You are walking through a forest, and the wind is blowing
       through the trees, blowing through your hair, removing any 
       impurity or distraction that is an obstacle to your growth. You 
       settle on a direction where these winds of change are at your
       back, letting them push you wherever they need you. 
    2. (Fire) There is the smell of smoke, then a feeling of heat
       behind you, then light, and you find yourself running, running
       through this forest which lights up, needing to take swift, 
       dynamic action to dodge the flames and keep ahead of the blaze,
       to get to safety.
    3. (Water) The fire opens up into a clearing with a river. There are
       some scared animals: a fox, some bunnies, a squirrel. You are 
       holding them to your chest to reassure them, and then you lay on
       your back in the river, rafting them safely downstream. Your
       compassion brings a calm, soothing rain which starts to fall, 
       extinguishing the blaze into steam.
    4. (Earth) You get up and set the animals free as the river bends
       near a rock face, and walk along the side of the hill. You find a 
       trail that goes up it. You feel these smooth, ancient, unmoving 
       stones beside you as you ascend this cliff. You feel calm and 
       relaxed with these stones that never need to be anything other 
       than what they are.
    5. (Void) The trail opens up to a landing. You sit down on the
       landing with this solid rock beneath you and look up at the night
       sky. You see the valley in front of you, even more mountain behind
       you, and are struck by how big this place is and how small we are.
The bottom line is that anything works, if it's not too complicated and allows you to say "hey, I am thinking too much about this other person who insulted me the other day, I'm just going to come back to this thing I'm supposed to be focusing on and focus on that instead."
drostie··on Why I No Longer Use MVC Frameworks
Searching through the comments here, only one of them mentions SAM, which is the point of the article. Some nuanced thought about what's going on here is therefore warranted. So let's start with old-school Smalltalk's MVC: this was a message-passing system consisting of three types of concurrent processes:

    * models maintain a list of "subscribers" that they regularly send certain 
      messages to, in response to the messages that they receive from the outside 
      world. This can as always involve the internal state that each process 
      maintains.
    * views subscribe to models and then present a graphical description of the 
      messages they receive. 
    * controllers listen to user-interface events from the view, and use it to send
      messages to models.
These have transformed mightily in the intervening years; a model these days often refers to some form of schema for data structures which are returned by services; controllers often query those services and provide them to the view; views may define their own service-queries. Often there is no clear notion of subscription except possibly subscribing to events from the GUI, which is the responsibility of the controller; the controller basically handles everything which isn't either the structuring of data or the organization of the display components.

SAM appears to be coming from the latter developments and is concerned with an associated explosion: Every view and interaction more or less gets its own service on the back-end, providing a sprawling codebase which resists refactors; they also get their own controllers which maintain them.

In the SAM idea, the model now reprises its earlier notion of managing subscribers and containing business logic: however it is now "dumbed down" from its potentially-very-general Smalltalk definition: the model is instead meant to hold and maintain a single data-structure. (Can there be multiple concurrent models?) The model apparently only receives requests for an all-at-once update, but it may decide to transform its state `new_state = f(old_state, proposed_state)`. Presumably then it again tells its subscribers about the new state if it is not identical to the old state. (Each view is expected to compute the diff itself, probably?)

A "state" in SAM appears to be identified with a "view": a "state-representation" is a function from a model to a DOM. Your GUI consists of a bunch of these, and hypothetically we can diff the DOM trees to better understand what needs to change on an update of the related model properties; the "view" is basically just a bunch of representations of the underlying state with some "actions." These "actions" are not actually parallel processes at all but do take the classical responsibility of the "controller", routing user-interface events to messages to send to the model. The apparent point here is that they should correspondingly be very "dumb" controllers: they just create a transformed version of the data that they received from the model and then send it back to the model as a "nomination" for a possible change.

Finally there appears to be a strange next-action callback which may be part of every "view update." (It's not clear where this lives -- in the "action"?) I am not entirely sure why this exists, but it may be that the algebra of actions without this callback is merely an applicative functor, not a full monad. The essential idea here is that the function apparently can compute a follow-up action if such needs to happen.

If I'm understanding this correctly, then a simple app which seems relatively hard to structure this way would contain:

    * a counter stored in a database,
    * a button which should ideally increment that counter,
    * a display showing the current value of the counter,
    * a notification window telling you when your click has updated the counter.
I'm using a counter since it's got a nice algebra for dealing with coincident updates; if someone else updates the counter then your update commutes with theirs, saving the client-side complexity.

Without a framework, we would simply define two endpoints: GET /count (or so) gets the current count; POST /increment will increment the current counter and will say "Success! The current count is now: ____", telling you what you changed the count to.

Here it seems like you need three models. First we have the server-side model of what's going on:

    server model Counter:
        private count, Subscribers
        message increment(intended_count): 
            if intended_count == count + 1:
                count += 1
                Subscribers.notifyAll()
                return ('success', count)
            else:
                return ('failure', count)
        message count():
            return count
The requirement that we only nominate new versions of the underlying data-structure means that we cannot just define the appropriate increment service which always succeeds, but must instead tell the client that the request has failed sometimes. Then there are two models on the client side: one holds a list of outstanding requests to increment (updated by actions, retrying any failures) and the other one holds the currently-cached value of the server-side data (because we need to update this by both the former client-model's update events as well as by some automatic process). You would probably condense these in practice into one model, however they are different concerns. The former model, however, is absolutely required, as it provides a way for the "notification window view" to appear and disappear when one of the requests has succeeded.

This seems unnecessarily complicated given the simple solution in terms of two API endpoints -- however it does indeed fulfill its desire for lower API bloat and some separation of concerns.

drostie··on Too many people have peed in the pool
Well, maybe. I would instead say that the rapid churn of social networks is a "reincarnation"-type solution to the problem. Fry's leaving of Twitter is precisely the answer to the problem.

To see why, let's focus on what the problem actually is: we're social animals who crave authentic connection with others, not just to hear but to be heard. We can't just be passive consumers of news but wish to comment on it and be heard and replied to and have meaningful discussion. The problem is that a voting bloc systematically muffles some peoples' speech, ostracising them from the community due to their disagreement -- but then the community becomes an echochamber and fails to satisfy our needs for diversity.

One solution to this has been randomization -- think Omegle etc. -- which works but encourages a different sort of inauthenticity due to anonymity. Another has been the Reddit/LiveJournal model: make it easy to spawn new communities when old ones die out. It's a lot less clear why, say, LiveJournal has mostly died, but probably it was a little too egotistical and people therefore as they grew up got bored with just sharing their own viewpoints without some sort of cohesive blogging narrative, and it just died.

Somewhere there's some room for a solution which batches together communities of 50 people more-or-less randomly with some form of self-selection, and encourages them to talk about some sort of topic-of-the-day that would be relevant to all of their interests. In the meantime our solution is to join a social network and have fun until our community gets too large and we cannot get the attention we crave, at which point we'll swap to another and repeat the process again.

drostie··on A Tiny Startup Racing Google to Build a Quantum Computing Chip
Good luck to them, and here's hoping that they can make some progress.

In case this leads to the usual "what's so hard about quantum computing that these big companies are struggling with it, and how can a small company possibly hope to beat Google?" let me try to explain.

Quantum computers seem to do some stuff more efficiently than any classical computer can. Exact proofs are hard to come by. (The classes are BQP and BPP, with a straightforward proof that BPP is in BQP. We now have a bunch of oracles Q Such that BQP^Q /= BPP^Q, but that's not necessarily a proof because of course we now have oracles A and B such that P^A = NP^A but P^B /= NP^B. So we have "some evidence" that quantum computers can do things faster than classical computers, but it's not hard proof yet.) Those parenthesized concerns aside, quantum computers seem to be more efficient than classical ones at some tasks.

We call by the name "interference" this property which crucially dictates how quantum computers do stuff differently. Essentially, instead of using probabilities with real numbers between 0 and 1, quantum mechanics uses scaled rotation matrices, which we call "amplitudes" and often represent as complex numbers. We bound the scale factor between 0 and 1 and interpret its square as a probability, which yields the same result as multiplying the complex number by its complex conjugate, or multiplying the matrix by its transpose: these are all mathematically equivalent. In this framework, if the qubit |0> produces an amplitude-pattern f(z) on some screen (hence you'll see |f(z)|^2 as the pattern) and |1> evolves to g(z), then the "quantum superposition" a|0> + b |1> (where a, b are complex numbers) evolves to produce the pattern |a f(z) + b g(z)|^2, which might show some sort of "wavy interference pattern" wherever the original patterns |f(z)|^2 and |g(z)|^2 overlap.

These interference effects can also be seen over multi-bit quantum states like the system a|00> + b|11>. In such a circumstance we call those two parts "entangled", and we can prove that there is no precise quantum description which "separates" the two quantum-bits. However physicists have proven a crucial theorem in quantum mechanics: when you look at one of those entangled-parts in isolation, it behaves according to classical probability laws. This is derivable purely from the mathematics of these complex amplitudes and we usually call it "tracing out" the rest of the system, if you want a convenient jargon term.

What entangles a system with a quantum-bit? Anything which interacts differently based on whether the quantum-bit is 0 or 1. The intersection of these two concerns -- the universality of entanglement and the classicalness that entanglement creates -- is the thing which makes quantum computing complicated. The very interference effects which make quantum computing powerful disappear the moment that "anything else" entangles with our precious quantum bits: and this includes any part of the external world (so the quantum state needs to be well isolated from anything that is not its logic), but also the computer itself (the complicated "quantum gates" that we need to implement to guide the state in whatever direction it's going). If any of those things entangle passively with the quantum state, the parts that we can measure stop showing interference effects and start acting like classical probabilistic mixtures.

This problem in general is called "decoherence" and it is the hard problem in the "DiVincenzo Criteria", which are the 5 joint concerns of quantum computation. So there are basically 4 other things that you basically are not allowed to compromise to kill decoherence: (a) a qubit-centric system of states |00...0>, |00...1>, ... |11...1>, which (b) can be initialized to a known starting state |00...0>, and then (c) its qubits can be manipulated by a set of universal quantum gates, which then (d) are measured to be either 0 or 1.

So that's where somebody who has a really bright insight about solving this "decoherence" problem could really leap light-years ahead of a bunch of highly-paid engineers and scientists who lack the crucial insight.

drostie··on Spotify's Spam War
The insane thing here is that Spotify could just change the incentive structure and then it wouldn't have to take drastic action.

"You will gain 0.00x cents per listen, up to a maximum of 100 listens/day for any individual user" and "Your songs must all sound like distinct pieces, as judged by our testing team" seem jointly sufficient to rule out the two biggest forms of abuse here: sure, let someone stream 30-second clips of silence; after 50 minutes stop paying for it. Multiple silent clips are a violation only because they both sound the same.

drostie··on The Wrong Abstraction
Yes. In theory there is a programming paradigm which fixes this, called "aspect oriented programming." I haven't seen a really accessible aspect-oriented system however.
drostie··on Habits of cell phone usage and sperm quality
Speaking as a physicist who knows QM, this is almost-correct.

More precisely, the chemical effects of microwave photons are restricted to being the sort of effects that routinely happen within your body all the time due to the thermal jiggle of atoms. Obviously this is not "nothing", because your body does a lot of cool stuff with all of that jiggling.

Obviously, chemical effects can also happen due to accumulated electric potential, as when a metal fork causes sparks in a microwave, but cell phones only have one hundredth or thousandth of that much power going through them at any given time, and the most visible effects of this in the human body seem to be negligible. (These effects do exist -- witness what tasers do to people, or what a 9V battery feels like on the tongue -- but nobody really reports these feelings when holding a transmitting cell phone near their tongue.)

So the possibilities are certainly there but it does seem like if cell phones caused the calamities that are sometimes attributed to them, it would probably change our understanding of one of these two spaces.

drostie··on Habits of cell phone usage and sperm quality
Please note that they were not able to prove that having your cell phone near your groin correlated with abnormal sperm. Rather, they found a correlation with being very chatty and being chatty while charging.

Correlations, of course, are also not causation. For example, there is no control in this study which rules out an effect like "some men have less testosterone, and this causes them to both be more glued to their phones (using while charging), more social on their phones (talking for over an hour a day), and to have a higher incidence of abnormal sperm." It's sort of like a headline: "If you're shorter, you may be a better parent: a study found an inverse correlation between height and how much time you spend with your kids." You'd be tempted to disbelieve me until I tell you that on average, women are shorter and also spend more time with their kids. If in this case we know the causes, how much more difficult is it when we don't to isolate the confounding variables?

drostie··on A Beginner’s Guide to Kerning Like a Designer
The question presented is not whether it makes a stylistic difference visible to those in-the-know but rather whether it makes a motivational difference visible in the actions of the mud-people. Those are two very different questions.
drostie··on Where the Sugar Babies Are
Well the phrase "trophy wife" doesn't exist on this web page and I would say that the expression itself is not sexist (because you could also have a "trophy husband" and everyone would understand what it means), but of course the practice's prevalence suggests a cultural sexism where the expression doesn't.

The term "sugar baby" comes idiomatically from the opposite of the terms "sugar daddy, sugar mama" as the person who is the target of the affections of the latter. Obviously, "sugar baby" is not a sexist expression because it is not gendered. As for what it means, to be clear: Alice is Bob's sugar-baby (conversely, Bob is Alice's sugar-daddy) if Bob is an affluent older person who is both dating the younger Alice and is gifting her with financially-expensive gifts. The gifts could be as immaterial as "I have this car I never drive, you can use it as if it were your own" or as material as "I will pay off your student loan debts." Usually, if Alice has her own professional career and is providing well for herself, then we'd not call it a sugar-baby relationship even if the gifts are expensive and one-way. Furthermore if she is taking care of the household and/or kids, that would tend to mollify the judgment. The essence of the judgment is the belief that if the sugar-parent were not providing the gifts to the sugar-baby then the relationship would not persist; the very terms themselves suggest that the relationship is too uncomfortably invoking a parent-child dynamic in a romantic context.

A stay-at-home wife is generally not a "sugar baby" since they are married and not dating; you could potentially extend the term to cover married couples but even so, if there are no expensive gifts or they're of comparable ages you wouldn't normally say that he's her sugar-daddy.

drostie··on Ultra-fine particles emitted by commercial desktop 3D printers [pdf]
I wonder if this could be solved temporarily by simply placing the 3D printer in a clear plastic trash bag -- or would that lead to overheating?
drostie··on Why use www?
It's not magic -- it's some form of crude error.

So first off what this does is, it expands to the expression:

    '-o /dev/null' '-o /dev/null '
Even if we remove the latter space by just using `{,}` instead of `{,\ }` curl still returns for me an error code 23 -- CURLE_WRITE_ERROR.

curl seems to interpret `'-o /wtf'` as a command to write to the file ` /wtf`, so this only makes sense if you have a directory called ` ` in the folder you're running from.

You can therefore do this correctly with:

    -o/dev/null{,}
and that correctly writes the contents to /dev/null without issuing a curl write error.
drostie··on Annoyances of API Design
It wasn't too hard to track down the quote; it is:

http://library.fora.tv/2009/10/08/Next_Decade_Technologies_C...

He wasn't even saying that the // should be a single /, he was saying that the : at the end of the protocol identifier is already sufficient. He wanted something more like:

    http:news.ycombinator.com/
drostie··on Political Speech Generator
Yes. If you read the paper, that's entirely what they're doing: each sentence should be a verbatim quote from an actual congressional proceeding. If there's a flaw here it's that the lambda=0.5 parameter that I used above keeps it within a single speech for too long.
drostie··on Political Speech Generator
The stuff that you're quoting is not the stuff that the `demo.py` script generates, but "latent dirichlet allocation" (whereas this project appears to generate based on a different alternate algorithm, the sentence-based one).

The sentence-based one has a major flaw: it mostly "settles into" a given speech from its training set for a few paragraphs, then transitions to a paragraph from another speech whenever the statements become sufficiently generic.

Another bug: it can sometimes lapse into an infinite loop. Here's the tail end of one of my runs:

    accordingly , the committee rose ; and the speaker pro tempore ( mrs. drake ) 
    having assumed the chair , mr. gilchrest , acting chairman of the committee of
    jurisdiction would ask the counsel to explain it ; and if it is a drafting 
    error , then that could be corrected .
    if it is not a drafting error , then that could be corrected .
    if it is not a drafting error , then that could be corrected .
    if it is not a drafting error , then that could be corrected .
    if it is not a drafting error , then that could be corrected .
    if it is not a drafting error , then that could be corrected .
    if it is not a drafting error , then that could be corrected .
    if it is not a drafting error , then that could be corrected .
    if it is not a drafting error , then that could be corrected .
    if it is not a drafting error , then that could be corrected .
    [... continues for many, many more lines before ending ...]
drostie··on Political Speech Generator
Here was the first one I got, cleaned up a bit into paragraphs (the ones you get from this script are one-line-per-sentence, all-lowercase, and have odd spaces before punctuation marks). It was rather longwinded and rambling; shorter ones like you see around are a little more persuasive because they don't show the decoherence of the Markov chain's context:

---

Mr. Speaker, I rise in opposition of H.R. 525 and the association health plans it creates. There are 44 million Americans who are uninsured in this country and this bill will not even affect 1 percent of them. Not 1 percent. CBO found that only 360,000 uninsured Americans would join AHPs. This bill in fact hurts those who enroll in the plans and will even cause healthcare costs to go up for many other Americans. There has to be a better way to help 44 million uninsured Americans. AHPs will not be accountable to state health regulations. This will leave consumers who enroll in these plans without protection or a right to appeal if their cancer or diabetes treatment or medicines are denied. We can not let that happen again.

Members in this body are faced with a choice: representing consumers and small businesses, or big oil companies. We should not leave the American people in the integrity of this institution. Perception, as we all know, four hurricanes ravaged my home state of Florida and some of the Gulf coast. Three of them literally destroyed parts of the district that I am privileged to represent.

It will not lower their energy prices and it puts in place weak price gouging standards. It also does little to promote additional refining capacity, while gutting important environmental safeguards and creating additional corporate tax breaks. Waiving environmental protections and offering federal tax breaks to oil companies will not entice them to build new oil refineries. While more refineries would certainly help produce more gasoline, oil companies have had the opportunity and financial capability for years to increase their refining capacity. Environmental regulations are not stopping them. Rather, the inability to build profitable refineries has led oil company executives away from constructing or resurrecting them.

An alternative to this bill is being offered by Mr. Stupak of Michigan and others. The Stupak bill would strengthen the hands of the Federal Trade Commission and its willingness and ability and resources to enforce the price gouging remedies that we give the FTC.

The attorneys general of our states are elected by our constituents, they know the conditions in their states better than we do, they have the resources and the discretion under the substitute to decide whether or not it is in the best interest of both the plan and participants to enhance the independent advice market, and we urge congress to adopt this approach.

AARP urges you to stand with us in opposition to these critical provisions in H.R. 2830 in order to provide protections for older workers that are necessary, reasonable and fair, and to ensure that the case is moved along as expeditiously as possible to ensure that workplace hazards are addressed in as timely a manner as possible, thus improving worker safety and health.

OSHA, as is almost every other federal agency, is already required by law to pay attorneys' fees and costs in any proceeding in which it does not win, regardless of why it lost and notwithstanding the fact that the position of the agency was substantially justified. In effect, unless the agency can guarantee that it will win every case it brings, H.R. 742 punishes the OSHA for trying to enforce the law. It also occurs to me that there is a question of the constitutional rights of workers here, that since OSHA is given rather exclusive jurisdiction to protect the rights of our own citizens through regulation.

That is wrong. We should not do it to people serving in Iraq and Afghanistan. They have made tremendous sacrifices on behalf of their country and have served longer deployments than expected.This bill provides important new benefits for our troops and their families need desperately. It includes additional funds for health care services, mental health for veterans, active duty servicemembers and their families, and financial assistance to help members of the national guard and reservist forces lose income when they leave their civilian jobs for active duty. The people of this country.

I just think we have struck the wrong balance. We need to sunset this bill again for a shorter period of time, and I hope my colleagues will oppose this bill so we might do this effort in a bipartisan manner.

Mr. Chairman, I rise today to express my concern about the current state of our nation's budget woes. I've been running the family ranch for several years and I know what it means to work within a budget. You may have to count your pennies, but you spend your money where it matters most. We can do that without increasing taxes. First off -- our nation's taxpayers deserve an honest budget that gives an account of all future spending. If this administration wants to privatize social security.

Mr. Speaker, I reserve the balance of my time to read the resolution that I believe ought to be before us, Mr. Speaker. The record shows otherwise. It is economics, not regulations, that have led to the shortfall in capacity.

drostie··on Political Speech Generator
And especially in this case, you have to install a few extra packages to make it work, then download the data set and (if you're on Linux) adjust the path to that data set so that it doesn't use backslashes.
drostie··on Why are submarines demagnetized?
Correct. The magnetic signatures seen are the permanent magnetic moments embedded in the steel of the ships, which are picked up by passive magnetic-anomaly detectors. These have to be removed by randomization in a normal all-at-once degaussing process.

It is hypothetically possible to have an active-detection process too, but presumably that would take the form of emitting a pulse of electromagnetic radiation and looking for its echoes, in other words it's just another form of vision. The standard problem applies: find a frequency at which water is mostly transparent. Unfortunately the absorption spectrum for water is https://en.wikipedia.org/wiki/Electromagnetic_absorption_by_... , it has a minimum in the visible range.

In addition to being one of the more stunning confirmations of evolution (of course our eyes are only sensitive to the least-absorbed wavelengths of light in water -- our ancestors evolved eyes in the ocean! there weren't many other useful wavelengths down there!) this has the nasty property that it's unlikely that we'd be able to detect a sub this way with any better approach than shining a bright laser or spotlight or what have you, and watching what's reflected back with our own eyes.

drostie··on Some of the most popular games get the least respect from game enthusiasts
So much this. The last game of Monopoly I played with my girlfriend, she was in the lead. She eventually started on the "well, it costs this much, but you don't have to pay if you don't want to..."

No. The game is, just kill me and win. Stop trying to prolong it.

drostie··on Ask HN: How do prolific programmers go about their daily lives?
Three tips come to mind:

1. Get enough sleep. You've only written three paragraphs and there are already a lot of suggestions that you need more ("I don't feel as productive as others", "I just drop dead in bed" when well-rested people usually take 15-30 to fall asleep, "I felt like I was inches away from becoming part of the zombie horde.")

Coding pretty intensively uses your short-term memory: "I need to take this query which I prepared above and execute it on those variables, wait, this key from the database gets renamed to that on the front-end, okay, test it... dictionary does not have the right key on line 189? What's over there? Oh, I forgot to do this critical preprocessing step, jump back to my code, 3 lines before, add the function call, test again -- what the crap is that, switch back to editor, aha, missed a semicolon here...". Each of those actions requires you to not be overwhelmed by the number of details you have to remember, whether it's where your tool for testing is located, or what the preprocessing function was called, or what have you.

When you're even a little sleep-deprived, your short-term memory decreases dramatically -- if most normal humans can only juggle 7 balls (7 big details or crucial tasks occupying their memory), missing a few hours of sleep brings it down to 4 or 3. So of course everything looks two times bigger.

Sleep deprivation also causes you to lean on substances like sugar and caffeine, and those substances tend to cause procrastination "I'll browse Reddit until this kicks in" -- until their effects wear off and leave you right back where you started with a bunch of nothing done. You can mitigate this somewhat by giving yourself a short task to do before the caffeine kicks in, even if it's an asinine one like "write down what you want to do today." Speaking of the which...

2. Write shit down, set alarms, otherwise use harebrained tools.

Those 7 balls that you can juggle need to incorporate just about everything that is happening in both personal and professional life -- not just code. If those things are in the mix, then you're not as effective. Just like how you should set an alarm for "time to start brushing my teeth and getting ready to go to bed" so that you can get enough sleep, you can set an alarm for "at this time I need to stop everything and call the couch company to send someone to fix the couch at home." Write those things down somewhere, set an alarm to look at that list and do the things on it.

3. Kill context-switches. Either lie your ass off about them or say "no" up front or be honest -- whatever is necessary to kill them.

Take your hands, open them in front of you, spread out your fingers, interleave them. That is 8 work tasks spread out over some distance L. Maybe it's 8 hours of the day working on two projects, Right and Left. One gets concluded at 4pm, the other at 5pm. We'll assume you got started at 8am and ignore an hour for lunch.

Now separate your hands and collapse your fingers. Put your right hand above your left hand, touching. Still 8 fingers in a row, but now you notice that your Left project is released at 12pm before lunch, while your Right project is still released at 5pm after. You just improved your average time-to-completion by 2 hours with no stress, and no improvement in efficiency: you just rushed one project out, then focused on the other.

Now interleave your fingers again and remember how each of those switches between projects feels. You've got 7 in there, yes? Each one doesn't feel good, does it? Because you've got to stop juggling one set of balls, put it all down, and slowly start juggling this other set of balls. Each context switch eats up mental energy. (It also eats up time -- if you need 15 minutes to really get up to speed, then the 7 context switches eat up almost 2 extra hours of your day. So there is an undisclosed efficiency gain here.)

If management forces on you to be working on the two things at once with constant status updates, strongly consider lying your butt off. (Of course, first show your boss the trick with the fingers, it usually convinces them.) Because if management is asking you to do worse work slower so that they can be polite to two of their separate clients, then management has failed. They're supposed to buffer you from all of that crap.

If you can't lie and you can't convince your management, try a firm "no." Just say "I'm on this high-stakes Project Left right now, I can't take on Project Right right now, maybe when Project Left is over I can. Fortunately I think Project Left will be done by end-of-day today, possibly before, so if you really can't find someone else, I may be able to start Project Right today." A "no" always goes better with a nice timetable that suggests that the task will still get accomplished in a timely manner.

Similarly, ignore those "trends" when you're coding. Trends are another project with another context switch. Don't interleave it with anything else.

← PreviousPage 10 of 34Next →