Loginsrv: JWT login microservice with back ends like OAuth2, Google, GitHub - <AUTHOR> https://github.com/tarent/loginsrv <comment><USER2> Awesome! Are there any other open source microservices fulfilling similar purposes? I've been looking all over the place. I decided to go with keycloak and keycloak-gatekeeper after failing to find anything less heavy weight.

<comment><USER3> Take a peek at the ORY stack

<comment><USER4> [https://www.ory.sh/](https://www.ory.sh/)

" _Open Source Identity Infrastructure and Services Run User Management, Permission and Role Management, and OAuth 2.0 & OpenID Connect anywhere from your cloud to a Raspberry Pi._"

<comment><USER5> How does it compare to Loginsrv?

<comment><USER4> Sorry, I know nothing about it; just trying to save others websearch time.

</comment></comment></comment></comment></comment><comment><USER6> This is wonderful.

If a passwordless option was available too, i.e. email a TOTP code that is a nonce, and presentation of the TOTP would generate a JWT with the email address as the claim... then this would become my new login manager.

I'm presently using auth0 free plan. Which is nice, but passwordless lock (their JS library) is old, and their docs are not great as to how to update to their other lock library (I've concluded you can't stay passwordless with the main auth0 lock library).

<comment><USER7> Something similar I've wanted before, but auth0 didn't support, is the provision of anonymous tokens. No need for them to persist.

Controlling non logged in user claims / access without having to have special "no token" caveats or endpoints (i.e. any user can have read access to an endpoint, but only if they have a token / have come via your website).

Is anything like this supported anywhere?

<comment><USER8> Can you explain bit more about your use case? You meant to say a just access token but no id token or session?

<comment><USER7> Being able to create an anonymous access token, that in turn has certain restricted claims defined by default.

API keys kind of do the job, but they're basically deprecated through a lot of JWT providers, and you need to support two Auth systems if you're using JWT for logged in users.

Flow is:

* Arrive at website * Generate an access token without any user input (anon user with default read only privileges) * Use the same APIs as logged in users, with restricted access defined in the JWT / Auth provider.

The two sides of it, am I allowed to access this API, coupled with what can I do once accessed seem to be the basic use case for JWT.

I appreciate the response. My terminology is likely a bit off, it's been a while :)

<comment><USER8> Assuming you are using traditional web app and not SPA, I think it's absolutely possible to generate restricted access tokens for anonymous users either using Machine to machine (M2M) client authentication or service account (SA) client authentication basically without any user context. Many Identity as a service providers supports M2M, and platform I am in involved supports both M2M/SA (disclaimer in profile). You can effectively attach an anonymous role to your OAuth client of type M2M/SA and start issuing access tokens. For SPA it could be complicated.

</comment></comment></comment></comment></comment><comment><USER9> I was looking through the examples, it seems like there isn't a way to use this out-of-the-box with an API service that does "/login" and "/signup" by password hash and compare:

\- Htpasswd (Dedicated credentials file)

\- Simple (user/password pairs by configuration)

\- Httpupstream (HTTP API Basic auth configuration)

It mentions "OSIAM" which I'm not familiar with.

Is there a way to use this to "enhance" a basic JWT auth server implementation that does a bcrypt/Argon2 hash or hash comparison on password with these social-sign-on OAuth providers?

Or any similar library, that would be really useful.

</comment><comment><USER10> Looks cool. FYI, the "sign in with google" button breaks the google branding guidelines [0]. You must use the colored G logo and it must be on a white background.

[0] [https://developers.google.com/identity/branding- guidelines](https://developers.google.com/identity/branding-guidelines)

<comment><USER11> Those branding guidelines are formulated vaguely in my opinion: What colors are allowed for certain button states (hover, focus, etc)? Do I really have to use Roboto? etc.

The assets are also not a good foundation to build a customized (yet compliant) button.

I've also seen so many buttons that cannot possibly be compliant without those guidelines, but Google doesn't seem to care, do they?

</comment></comment><comment><USER12> I'm a bit surprised the project is called loginsrv, yet the example buttons say "Sign in with X" instead of "Log in with X". I thought the UX world had more or less consolidated around 'Log in' and 'Sign up', to make the two options as visually distinct at a glance as possible.

<comment><USER13> > I thought the UX world had more or less consolidated around 'Log in' and > 'Sign up', to make the two options as visually distinct at a glance as > possible.

Honest question: what gave you that impression?

</comment></comment><comment><USER14> would always recommend the standard id_token form for any authentication JWTs [https://openid.net/specs/openid-connect- core-1_0.html#IDToke...](https://openid.net/specs/openid-connect- core-1_0.html#IDToken)

</comment><comment><USER15> Nice, this is like an open-source Firebase Authentication. I was wondering whether such a solution existed because, even as Firebase Auth is free for unlimited users, it still is a hosted service whose terms could change at any time.

</comment><comment><USER16> How do Oauth2 providers like Google and Github handle password resets or stale data with JWT tokens? Curious because I was trying to implement JWT for auth, but might switch to sessions now.

<comment><USER17> You basically need to have a revocation list or rely on the expiration time being sufficiently short. JWTs are neat for a lot of things but I don't think they make sense as a replacement for sessions for that reason (where you control the server and the client and you want to authenticate users)

<comment><USER18> Isn't that the point of the refresh tokens? Auth token is short lived, so you get a new one using the refresh token without getting the user involved. But then that gives the auth server a means to deny that request if the user has revoked access?

Or am I misremembering?

<comment><USER19> yeah, that is what refresh tokens are used for and it works well for access tokens with a short ttl. in practice i have seen access tokens with ttl of a few hours. i think it might be done to cut down on the refresh calls? in that case, if you want to deny requests with a revoked token sooner than the potentially few hours it takes for it to expire, you could keep the set of revoked tokens server side.

that feels like a weird place to be in with server side state for stuff that is supposed to be stateless. i guess the revoked set is smaller than the full set of active tokens so maybe that is a win? curious if anyone has experience with this.

<comment><USER18> > in practice i have seen access tokens with ttl of a few hours

The JWT tokens we get for m2m from Maskinporten[1] have a TTL of a couple of minutes.

No refresh tokens though, I guess they figure it doesn't make much difference since the "user" is a machine so no hassle just sending a full request again.

[1]: [https://difi.github.io/felleslosninger/maskinporten_protocol...](https://difi.github.io/felleslosninger/maskinporten_protocol_jwtgrant.html)

</comment></comment></comment></comment></comment><comment><USER20> This looks brilliant. I could see loginsrv as a drop-in replacement for SaaS product offering the same functionality, like Xsolla.

</comment><comment> johnx123-up Will it support LDAP in the near future?

</comment><comment><USER21> How does this compare to AWS Cognito?

<comment><USER22> This is open-source, requires self-hosting, is free... There really isn't anything to compare.

</comment></comment><comment><USER23> yea would be awesome if you could put it in a cloudflare worker

<comment><USER24> [https://teams.cloudflare.com/access](https://teams.cloudflare.com/access) I think is Cloudflare's identity solution. 3$ a user though. haha

</comment></comment><comment><USER25> Mmmm, it's uses JWT. That went out the window, for me.

My checklist: [https://egbert.net/blog/articles/authentication-for- api.html](https://egbert.net/blog/articles/authentication-for-api.html)

<comment><USER26> egberts1, can you please share your reasons for "DO NOT use JWT"? The citation on your blog only links to the wikipedia page [https://en.wikipedia.org/wiki/JSON_Web_Token](https://en.wikipedia.org/wiki/JSON_Web_Token) rather than a resource describing any issues with JWTs specifically.

...I also have to wonder why no CORS. When properly managed (e.g. static- whitelisted allowed origins + allowed credentials from/to dedicated domains) and combined with other best practices around your web SSO framework of choice, it's fine for contexts such as SSO with no back-end sync.

<comment><USER27> I can't speak for egberts1, but Thomas Ptacek(@tptacek) has written a lot on why JWTs should be avoided.

Here's an HN search for his comments on JWTs:

[https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...](https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=author%3Atptacek%20jwt&sort=byDate&type=comment)

Here is one of his comments about JWT:

 _In cryptography, we have a concept of "misuse resistance"._

[https://news.ycombinator.com/item?id=14292223](https://news.ycombinator.com/item?id=14292223))

<comment><USER28> The comment you link to is gold. Thank you.</comment></comment></comment></comment>


Sans Bullshit Sans: leveraging the synergy of ligatures (2015) - <AUTHOR> https://pixelambacht.nl/2015/sans-bullshit-sans/ <comment><USER2> this is great. at the last stupid hackathon in SF I worked on a font for cats with over 7 million ligatures (every fourth letter, it turns what you just typed into "meow.")[1] it was tricky to figure out how to push ranges and named lookups to the limit, and there doesn't seem to be any getting around the speed issue, but there's a lot of underlying font tech to have fun with :)

1\. [https://github.com/jpt/meow](https://github.com/jpt/meow)

</comment><comment><USER3> Love it! Also, "Fun fact: the well known ampersand, &, was originally a ligature for "et", meaning "and" in Latin," completely amazed me. I never knew.

<comment><USER4> The "et" -> "&" lineage is even more visible in certain fonts like this: [https://en.wikipedia.org/wiki/File:Trebuchet_MS_ampersand.sv...](https://en.wikipedia.org/wiki/File:Trebuchet_MS_ampersand.svg) (linked from [https://en.wikipedia.org/wiki/Ampersand](https://en.wikipedia.org/wiki/Ampersand) )

<comment><USER5> The bottom row of this has some more examples: [http://www.shadycharacters.co.uk/wp/wp- content/uploads/2011/...](http://www.shadycharacters.co.uk/wp/wp- content/uploads/2011/06/roman-italic-ampersands.png) (found via Google Image Search for _italic ampersand_ ).

The one in the second column from the left (again, bottom row) is how I write my ampersands by hand.

</comment></comment></comment><comment><USER6> Nice teaching framework: I've painlessly absorbed a little bit of information about how fonts work while going along with the joke.

<comment><AUTHOR> That's what I liked about this as well; not like you'd actually use the font, but in the process, it walks through how ligatures work in modern font formats.

</comment></comment><comment><USER7> Behad Esfahbod is, quite frankly, a font and script genius. When I was delving into understanding LibreOffice's font and layout mess (which is getting better, btw) I kept seeing his name and work in harfbuzz.

The world, I feel, owes this man a great debt and I fear he is one of the great unsung open source heroes we seem to hear so little about!

</comment><comment><USER8> Immediately looked to see whether the substitution language is Turing complete. Luckily, it appears not.

Seems like you could do some very quirky animation using ligatures. For example-- imagine that the ligature for "Im" tilts the "I" toward the "m". Then the ligature for "Imm" tilts the "I" further, and so on, until I type the complete word "Immediately" and the "I" has drifted down below the "y" character.

Repeat this drift for each subsequent letter typed, slowly increasing the amount of displacement for the letters in the ligatures. Then, by the time I've finished typing this comment, all the letters would end up piled up in the corner of this textarea. :)

</comment><comment><USER9> I was experimenting with this concept in 2012, and I think this is still relevant today. I wanted to make a web font with ligatures that replaced popular company names with their actual company logos.

It ended up being way too much work, and it isn't monetizeable due to the copyrighted nature of many logos.

</comment><comment><USER10> Here's a font with programming related ligatures:

[https://github.com/tonsky/FiraCode/blob/master/README.md](https://github.com/tonsky/FiraCode/blob/master/README.md)

<comment><USER11> Started using this in Cursive. Works pretty great for Clojure and other symbol-heavy languages, presumably.

</comment></comment><comment><USER12> Is there a chrome extension that will apply this treatment to current websites so we can see which ones are full of BS?</comment>


How to Find a Online Software Job? - <AUTHOR>

I am newbie ,never did an online job or freelancing . Is that difficult to find first freelancing job? <comment><USER2> It depends, you can sign up to many different freelance job websites such as freelancer, elance or peopleperhour.

If you are looking for a site to post a job with no registration/verification/hassle then take a look at <http://facingworlds.co.uk> it is a free and open job board I found recently, pretty cool for picking up odd dev/design jobs.

<comment><AUTHOR> Cool! i will have a look :) Thanks 7gramroxg! are you into freelancing ?</comment></comment>


Rocky Balboa Speech - "it ain't about how hard you hit..." - <AUTHOR> http://www.youtube.com/watch?v=uASVzkrEKgs

<comment><USER2>
      > This video contains content from mgm, who has
      > blocked it in your country on copyright grounds.</comment>


Ask HN: Where do you find estimated market sizes? - <AUTHOR> "the fitness industry is a 30-Billion market"<p>"Medical Marihuana is a 13-Billion market"<p>... <comment><USER2> Gartner reports and similar places.</comment>


Bay Area Flops in 14,000 Respondent Survey on Public Transit Satisfaction - <AUTHOR> http://survata.com/blog/bay-area-flops-in-14000-respondent-survey-on-public-transit-satisfaction/ <comment><USER2> It's worth noting a key difference between Seattle and San Francisco has to do with gentrification and differences between these areas in terms of where you can work and live. It's much more practical to both live and work in downtown Seattle than it is to both live and work in downtown San Francisco. Because of how San Francisco has avoided building as much new housing downtown as Seattle has, SF has forced lower income workers (that is, most people) outside of the city to live. In short, the residents of Seattle are a lot less dependent on their mass transit to survive, or dependent on it in a much different way than we are here in the SF Bay area.

<comment><USER3> Seattle's public transportation is definitely in better shape especially since the expansion of the light rail and the constant flow of buses between downtown and the east side (Bellevue). Another big reason is just how convenient it is to ride to the airport from downtown. For $2.75 you can go from any station in downtown right to the airport. Compare that to the ridiculousness of getting to the airport from SF first to Milbrae then pay for a transfer to the airport on another line.

<comment><USER4> BART goes directly into the SFO airport. If you are taking a flight from the international terminal, it is a direct walk to the check-in counters. Otherwise you connect to the airtrain which is an escalator ride up from the BART platform.

I've found it extremely convenient getting to/from flights from San Francisco, although I'm lucky to be within walking distance to a BART station from my apartment.

</comment></comment></comment><comment><USER5> One huge problem with this survey is that if you have always lived in the US (outside of NYC and maybe one or two other metros), your expectations are extremely low - so "satisfied" doesn't mean much. You first have to have experienced a city with great public transport to understand what's possible, and what you're not getting.

<comment><USER6> I think this describes me. I'm originally from South Jersey, outside of any big metropolitan area. I'm now living in Palo Alto, and I think Caltrain and VTA are great, but I think that the only reason for that is that I went from _no_ public transit to being able to survive without a car thanks to the train.

Sure, it'd be nice if Caltrain didn't stop running at fricking 10:30 on weekends, but it gets me to work in a reasonable amount of time.

<comment><USER5> _Sure, it 'd be nice if Caltrain didn't stop running at fricking 10:30 on weekends_

And if it didn't keep running into people or breaking down for hours at a time. Visit NYC or London to experience the awesomeness of a good public transit system.

</comment></comment></comment><comment><USER7> Pardon my french, but: no shit. The survey was conducted during the BART strikes. I really doubt people would be terribly enthusiastic about how the system functions in the midst of a cessation of service.

<comment><AUTHOR> Survata co-founder here. You're right, and we mentioned that in the article:

"One obvious caveat is our survey coincided with the BART strike in the Bay Area, and might have reached Bay Area public transportation riders at their most frustrated."

</comment></comment><comment><USER8> I don't think it's fair to say that SF "flops" on public transit. Look at the map. LA, Houston, Dallas, and Philadelphia are public transit flops. San Francisco is merely mediocre.

And (as pointed out), this is during the BART strike. I fully expect SF's transit system will be considered "good" once everything's settled.

<comment><USER9> The entire west side of SF has no train service! It is pretty bad, and the cities you mentioned are even worse.

</comment></comment><comment><USER10> I currently live near D.C. and absolutely hate the public transit here. I could list a laundry list of the problems, but honestly, compared to SF it's like a euphoric utopic vision of perfect public transport gifted by a benevolent god.

D.C. has many similar problems like S.F. (NIMBYism, weird property issues, right of way, long commutes) with the added fun of having to work with three different State level territories (VA, MD and DC) to get anything done.

Honestly the gold standard in the U.S. for public transit is NYC, and I love when I'm living/working there (which are far too short and far between), but let's be honest, NYC's public transit isn't really all that nice. What it _is_ is comprehensive and not ridiculously expensive. At least as comprehensive as any major European city and less than half the price of the D.C. system on most days w/r to fares.

But really you can visit any major European city and find a transit system at least as good as D.C.s...which is the second busiest in the U.S. and 3rd by length. Visit Asia and have all sense of what a good system is blown right out of your mind.

The level of quality in the U.S. mass transit system is really inexcusable. A nearby system, Baltimore's, is so bad that, despite living just a couple hours away for most of my life and having visited the city numerous times, I wasn't even aware the city had a subway system until a couple years ago - it's virtually invisible.

If you consider that D.C. is bottom of the barrel then by European and Asian standards, S.F.'s is just a bad joke.

</comment><comment><USER11> Its not just bart - the whole system sucks. As a daily commuter from alameda to mountain view - it SUCKS:

Bike 2 miles to bart, take either to SF or Millbrea

* If SF; then have to bike to 4th and king to caltrin

* If Millbrea - have to swap trains at balboa park

Take caltrain to mtn view; many times Caltrain says they are "too full" for bikes and wont let me on that morning train.

Get to mountain view, bike 2 miles to office.

Total time: 2.5 hours each way. Total cost: between $20 and $25 per day.

\---

The services don't connect, the trains schedules don't match up well. Bart is filthy. Bart does a piss poor job of supporting bikes, people don't like bikes on bart.

I work from home as much as possible given how bad this is.

<comment><USER12> I've gone from Hayward to Mountain View quite a few times and know all about it, so hats off to you for actually taking public transit for that trip! I'm too lazy, so I'd drive, and it's still about an hour each way in traffic.

</comment></comment><comment><USER13> The difference between NYC and SF was smaller than I expected

</comment><comment><USER14> Well I know the Bay Area's public transit kind of sucks, but I'm not sure why they're called out here over LA.

</comment><comment><USER15> Have definitely been considering moving my East Bay rental down to SV. BART has just not been reliable these past few months, and I've used Caltrain before, and even stayed a few months in East Palo Alto which is cheaper than my current Walnut Creek.

</comment><comment><USER16> Holy cow, how can you live in NYC and _never_ take public transportation?

<comment><USER17> If the survey was composed of people from all over the entire city, it seems a bit more reasonable. NYC is big.

</comment></comment><comment><USER17> I'm disappointed to not see Portland in this survey. I visited recently and thought the public transportation was pretty good. It would have been nice to know what the survey revealed.

</comment><comment><USER18> While not thrilled with the BART strike, it is generally the most reliable of the options in the area. MUNI buses, on the other hand, are frustratingly bad at times.

<comment> mh- I guess that depends on how you define reliability.

If we were tracking it like uptime, what does BART look like after the 2 strikes?

<comment><USER19> Would you rather a fail fast on bart or a service never reliable and will probably be late holding onto your time.

</comment></comment></comment><comment><USER20> why include all respondents who said that they "never" used public transportation?

<comment><USER21> Those would seem to be the most important people to understand why they think transit isn't fitting their needs. It could be that (1) they are wrong and just don't understand the system, or (2) the local transit system actually fails them (doesn't serve close enough, often enough, safe enough, direct enough, late enough, etc.) in a way that can be improved.

</comment></comment><comment><USER22> I want to know how 53 percent of Austinites felt satisfied with the city's public transportation. Outside of the immediate downtown area, it's lackluster at absolute best, and more typically not a viable option for getting where you need to go.</comment>


Sweden leaks details of almost all of its citizens - <AUTHOR> http://www.independent.co.uk/life-style/gadgets-and-tech/news/sweden-hack-details-transport-department-government-police-parliament-opposition-a7860651.html <comment><USER2> Dupe: [https://news.ycombinator.com/item?id=14860950](https://news.ycombinator.com/item?id=14860950)</comment>


Assange displayed signs of torture in courtroom farce - <AUTHOR> https://consortiumnews.com/2019/10/22/assange-displayed-signs-of-torture-in-courtroom-farce/ <comment><USER2> A replay of the White Rose saga?

[https://en.wikipedia.org/wiki/White_Rose](https://en.wikipedia.org/wiki/White_Rose)

<comment><AUTHOR> Our government seems to have figured out how to carry out torture and execution of dissident journalists without actually dropping a guillotine's blade.

</comment></comment><comment><USER3> If you're just skimming HN, the title doesn't do it justice. The "courtroom farce" part makes up the bulk of the article.

tl;dr the magistrate in charge of this court hearing was nakedly taking ongoing instructions from the US embassy, and ignoring procedural irregularities such as the CIA spying on Assange's private legal counsel. Any appearance of "procedure" here is only to lend a thin veneer of legitimacy to extra-legal bullying of Assange by the US.

<comment><USER4> why would the court do that? Clearly many people in the UK think the us is lead by a stupid idiot. They are no one's pawn, at least in general.

</comment></comment><comment><USER5> Enemies of the state shall be extorted, silenced, tortured and murdered slowly if outright assassination isn't a viable option.

</comment><comment><USER6> I wish america had stepped in and extradited Assange. At least he may have been treated humanely.</comment>


Fawlty Towers 'Don't mention the war' episode removed from UKTV - <AUTHOR> https://www.theguardian.com/media/2020/jun/11/fawlty-towers-dont-mention-the-war-episode <comment><USER2> > The original broadcast included a scene in which Major Gowen, a regular > guest at the hotel, uses very strong racist language in relation to an > anecdote about the West Indies cricket team. A decade ago many broadcasters > began editing out this part of the programme, although the racist language > can still be heard on the version hosted by Netflix. > [http://archive.is/ZLIqs](http://archive.is/ZLIqs)

I'm African American and I'd prefer not to be turned into a perpetual victim by people who mean well. Rather than infantilizing censorship, I'd like to have the option to watch to watch this classic episode in its entirety. An embedded disclaimer wouldn't be inappropriate.

Apparently, many Germans find this scene very funny: [https://www.youtube.com/watch?v=yfl6Lu3xQW0](https://www.youtube.com/watch?v=yfl6Lu3xQW0)

<comment><USER3> What an extraordinary coincidence, I watched this episode yesterday on Netflix.

In the show the Major is a running joke as a very old person with a very old worldview. You can immediately know what he's gonna say when he opens he mouth to talk about black people, so I wasn't surprised at all. I was more surprised when in the same episode, Fawlty is startled and confused when he meets a black doctor.

<comment><USER3> EDIT:

> Cleese told The Age newspaper: "If you put nonsense words into the mouth of > someone you want to make fun of, you're not broadcasting their views, you're > making fun of them. The major was an old fossil left over from decades > before. We were not supporting his views, we were making fun of them. If > they can't see that – if people are too stupid to see that – what can one > say?"

[https://www.theguardian.com/culture/2020/jun/12/john- cleese-...](https://www.theguardian.com/culture/2020/jun/12/john-cleese- attacks-stupid-removal-of-fawlty-towers-episode)

</comment></comment></comment><comment><USER4> The URL given doesn't seem to be working (404 error). The correct URL seems to be: [https://www.theguardian.com/media/2020/jun/11/fawlty- towers-...](https://www.theguardian.com/media/2020/jun/11/fawlty-towers-dont- mention-the-war-episode-removed-from-uktv)

Update: The new URL states the episode is being reinstated: [https://www.theguardian.com/culture/2020/jun/12/john- cleese-...](https://www.theguardian.com/culture/2020/jun/12/john-cleese- attacks-stupid-removal-of-fawlty-towers-episode)

</comment><comment><USER5> And the article has been removed from The Guardian.</comment>


Climate Change: what do you want me to say? [video] - <AUTHOR> https://www.ft.com/video/87f604f5-4be7-4225-8bc4-e5b410c35942 <comment><AUTHOR> 9:49 long, English audio but no subtitles.

<comment><USER2> Right down corner, three dots, to switch subtitles on and off. You dont need it, its a sf of what could happen. Its filmed dramaticly so you will be extra scared of the future</comment></comment>


IBM unveils computer fed by 'electronic blood' - <AUTHOR> http://www.bbc.co.uk/news/science-environment-24571219 <comment><USER2> I can't be the only one who thought of Ghost in The Shell while reading this. If anything, this is a way to explain away the presence of white 'blood' in the cyborgs of the series.

I can understand the power issue, but I wonder why 3D chips aren't pursued more. It can't be just the cooling since liquid cooling (as mentioned) is in use. Maybe inefficiencies in power distribution and distance to adjacent junctions? If so, parallel execution should help with some of the delays.

<comment><USER3> I love GitS, but when I see "white blood" I think of Bishop and the other androids from the Alien series.

</comment></comment><comment><USER4> From the end of the article:

"But all of the above will not get electronics down to the energy-efficiency of the brain.

"That will require many more changes, including a move to analogue computation instead of digital.

"It will also involve breakthroughs in new non-Turing models of computation, for example based on an understanding of how the brain processes information."

What exactly does all this mean? How would moving from digital to analogue computation improve energy efficiency? And aren't the whole Turing vs. non- Turing models of the brain still up for serious debate?

<comment><USER5> Analog computing is dramatically more energy-efficient than digital because it needs less hardware. For example, you can store an analog value in a capacitor while storing a digital value requires a multi-bit register that is made of multiple transistors per bit. Analog multiplication can be done with an amplifier while digital multiplication requires thousands of transistors. The tradeoff is that digital computation is exact while analog computation contains noise which may accumulate through the computation.

<comment><USER4> So is there a particular difficulty in overcoming this noise, or is it more just unexplored territory?

<comment><USER6> Definitely not unexplored territory, analog computation came first. Notably, the way you program an (electronic) analog computer is by adjusting it's circuitry.. not exactly the friendliest programming model.

The problem with noise seems to be repeatability. Enough noise, and reliability becomes a huge problem. With same inputs and analog circuit, you want the same answer every time, don't you?

You cannot "overcome this noise" by removing it. The perfection of materials, process and environment required for that would be on the order of an experiment like this: [https://www.simonsfoundation.org/quanta/20131010-neutrino- ex...](https://www.simonsfoundation.org/quanta/20131010-neutrino-experiment- intensifies-effort-to-explain-matter-antimatter-asymmetry/)

We overcame the noise via digitization. In fact, there is obviously still noise in our current digital computers, since the components within them are fundamentally analog, but digital circuits quantize the analog signals, interpreting the 1's and 0's, despite their analog nature. (this is simplified and I know next to nothing about digital circuit design)

<comment><USER7> I think the main potential in analogue computing is to create complex networks of feedback loops where different regions of stability correspond to different machine states. I've seen models of neural network memory where the interconnection of neurons works like a combination of a symmetric linear transform and an amplifier followed by vector normalisation. The transform maps the sensory input into a reduced dimensional space (where each dimension corresponds to a possible memory). The reduced vector is amplified via the neural response function, and then it's transformed back to the sensory input vector space through an inverse to the original transform. That creates a feedback loop where (because of how the neural response function works) whatever the input is, the system converges to a vector that corresponds to exactly one of the memory vectors. It basically picks out and amplifies the closest memory to the sensory input.

That kind of system is a huge simplification, but similar things could be done with analogue computing. In particular, I think probabilistic computing could be done by setting up network feedback loops corresponding to underlying Bayesian networks, where stable points correspond to highest likelihood parameterisations. (I may actually do some work in this direction next year, because it's pretty cool stuff.)

</comment></comment></comment></comment></comment><comment><USER8> Could you imagine the graphics that are possible with a one petaflop computer? Simulation status right?

I'm praying we (humanity) don't nuke ourselves to death during some stupid WWIII type situation before we get there

<comment><USER9> Carmack said we need 5 petaflops for truly realistic graphics.

But I'm not even sure if he considered 4k+ resolutions, 120+ FPS and 3D when he said that, because all of those may play a role too in the future if we want "Matrix-like" graphics in our virtual reality goggles or holodecks. So we might need orders of magnitude more powerful hardware than that still.

<comment><USER10> If you can track the eye with low enough latency you only need to render high res in the tiny fovea region, low res everywhere else.

</comment></comment></comment><comment><USER11> Sweet, I attended a talk about this this spring in our university. The one big question was about the enormous energy density in these cubes. It must some way or another get into them, which seemed quite impossible to do. But, I for one hope this leads to some big leaps in performance that were previously not within reach for the foreseeable future.

</comment><comment><USER12> Is it just me, or is this article written by someone who is clueless? I read the whole thing, and wasn't able to extract a single piece of genuine information.

Either someone is gaming HN to make artificial up votes, or I need to find a different forum.

<comment><USER13> This article was not written for any one who has even an average understanding of the subject. It is there to give the most simple, general over view of an interesting development. It is not supposed to be anything more than that. It is there for shelf stackers, van drivers, policemen, accountants, solicitors, carpenters, mechanics, in fact, any one but people with any clue to start with. People with a clue are doing themselves down by reading it in the first place. They should already know all about it, and not be blind sided by a BBC piece.

No, the person who wrote it is not clueless, they have written it for the clueless.

And that, is absolutely NOT a value judgement on the "clueless".

The vast majority of people very understandably do not have any clue about this niche science. Why on earth should they? After all, does being a whiz with Java or something suddenly mean this should even begin to have any understanding of this? Why should it? So why should a brick layer have any idea at all? All the average "clueless" want is a very, very basic over view, such that they can essentially say, "oh wow, that's cool. Oi Dave, look at this". And if they are even slightly inspired, they would go off and drill down to the proper scientific detail else where, using something revolutionary like Google.

If you want any more than that, then I'm sorry, its not the remit of the BBC. And no body even close to knowing the basics of this sort stuff would be getting their information from the BBC. Like I have said, they will already be very clued up, right? And one in the middle will not even read the article fully. They will get enough information to go to a more thorough source.

I get really frustrated with people who seem clueless themselves about what the BBC is there for, and who articles like this are aimed at. It is always easy for some expert to slag off BBC articles, in the way you have, when they were never ever written to stand up to peer review or some such high standard. I imagine an "expert" could easily pick holes in literally every single article the BBC has ever published.

What is really depressing is that you have obviously read enough to be interested. But instead of being interested enough to search for more information, you come here to lay in to the author. Is it really that much easier to complain than research? Does the BBC have to spoon feed every one, on every subject, at every level? No. Its a broadcaster, not a collection of all the worlds best universities. The let you peek in, the rest is up to you.

</comment></comment><comment><USER9> While this may be a huge improvement in computer power/space occupied compared to today's classical computers, since nature tends to "compute" stuff so much more efficiently than our PC's, it still feels like a pretty transitional phase to me versus quantum computers.

We need to learn how to compute at the sub-atomic level with mind-blowing efficiency (trillions of trillions more operations for insignificant power consumption). Once we learn how to do that, we'll be the masters of our galaxy, or potentially even the universe.

</comment><comment><USER14>
      The art of liquid cooling has been demonstrated by Aquasar
      and put to work inside the German supercomputer SuperMUC
      which - *perversely* - harnesses warm water to cool its
      circuits.

How is it perverse to cool hot circuits with warm water?

<comment><USER5> The efficiency of cooling is proportional to delta t, so it's much better (for the computer) to cool a computer with cold water. But how did you produce that cold water? Probably with some energy-intensive refrigeration process. Thus AFAIK it's more efficient overall to use a higher inlet temperature (presumably with a higher flow rate).

</comment></comment><comment><USER15> "Their vision is that by 2060, a one petaflop computer that would fill half a football field today, will fit on your desktop."

Will it be able to run Crysis?

But seriously, I'd be even more interested in how these computers will be programmed. Any wild speculations?

<comment><USER16> Abstraction will be the answer. We will need very, very high level domain specific "programming languages".

Problem is: I feel like we are abstracting software slower than computers are getting faster. Is Javascript really that much more abstract than machine code (assembly)? I think not. In the long run, what we do now are baby steps.

We are still telling computers exactly what to do. Every step needs to be spelled out. And we're doing it by text files...

<comment><USER17> Think about the huge amount of computing power currently used to run gmail on millions of web browsers, servers, and apps. It could be viewed as one big computer program that just happens to run different parts on different devices. The benefit of separating it into parts is that it gives the program close proximity to different data. A massively parallel system would have to divide data into chunks that are separated by latency and bandwidth limitations in a similar way. The language abstractions are less important than the unavoidable physical limitations. Surely the event driven approach of Javascript is a good solution to this latency problem?

</comment></comment></comment><comment><USER18> More info here: [http://www.research.ibm.com/cognitive- computing/neurosynapti...](http://www.research.ibm.com/cognitive- computing/neurosynaptic-chips.shtml)

</comment><comment><USER19> wow that looks insanely close to what I remember from Terminator.

Compare yourself: [http://imm.io/1iQis](http://imm.io/1iQis)

</comment><comment><USER20> Does anyone know much about the practicalities of the chemistry behind this? I've almost finished looking at redox at high school.</comment>


CEOs beware: Your astronomical salaries may soon cost you customers - <AUTHOR> http://www.washingtonpost.com/news/wonkblog/wp/2015/10/15/ceos-beware-your-astronomical-salaries-may-soon-cost-you-customers/ <comment><USER2> Much of this can be accounted for by the simple fact that the companies have gotten bigger. Top CEOs are in charge of _more people_ than ever before. Walmart has 1.4 million employees; if their CEO makes $35 million that's $25 per employee per year - a penny or so per hour per employee.

If a good CEO's decisions can make the average employee _more productive_ (or less _unproductive_ ) by even few cents per hour of employment, he's worth that magnitude of salary when working for a company that big.

If we highlight the CEO-to-employee multiple, companies could game the metric by splitting into smaller companies that are _slightly less efficient_. For instance, there could be separate regional chains called "Walmart West" and "Walmart East", each with their own CEO who gets paid half as much for doing half as much work. They could even both hire the same guy and have him work both jobs at once, thereby reducing to a previously-solved problem! Or they could actually hire two distinct CEOS, which benefits the employees not at all - in fact, the employee situation might be made _worse_ in various ways by the change - but at least the multiple would officially look smaller so: yay?

<comment><USER3> Headcount isn't really relevant. My dad was a director (mid level manager) of a government org with something like 1,500 direct reports. He probably made the equivalent of $120k today. I think the salary differential between that gig and a line manager was 30-40%. I manage a big IT organization, manage a huge budget, 50 engineers. I make less than 5x the lowest paid employee. My boss's boss maybe 40% more than me.

The corruption of governance and a sense of entitlement fuels CEO salaries. End of the day, the CEO of WalMart doesn't deliver $35M of value. His decisions have big impact, but there are dozens of people who can make those decisions, and many could do so for far less.

<comment><AUTHOR> Curious what you think about why boards aren't incentivized to reign in CEO salaries. Is it because they all sit on each other boards?

<comment><USER3> It's a small club, so there isn't an incentive to make waves.

Marissa Mayer is on the Walmart board. H. Lee Scott, former Walmart CEO is on the Yahoo board. Why would Mayer want to make a stink about the Walmart guy's salary, an awkward conversation that would probably lead to a similar awkward conversation when she wants a raise at Yahoo.

The boards that I've seen (at a smaller scale) that work are ones where there is a diversity of interests. The minority political party member making a stink about the majority in a town board. Or the company board where a representative of labor controls a key committee.

</comment></comment></comment></comment><comment><USER4> Last year, Tim Cook's salary plus bonus was $9 million. But his total compensation was $65 million.[1] So what? Why should I care? That's up to the Apple board to work out with him.

I'm still buying Macbooks and iPhones and iWhatevers for as long as I think they're superior to the competition.

[1] [http://www.bloomberg.com/news/articles/2015-04-17/tim- cook-s...](http://www.bloomberg.com/news/articles/2015-04-17/tim- cook-s-65-million-pay-is-best-deal-among-top-paid-u-s-ceos)

</comment><comment><USER5> Yet another clickbait headline.

Further down in the article, it says: "Of course, people tend to show more moral gumption in surveys than they do in real life. In part this is because we are dealing with hypotheticals (who isn't against child labor, in principle?). But also, people don't usually ponder issues of inequality while they're buying their milk and groceries."

<comment><USER6> RE value of polls, there's this quote I love:

"[A]s of 2010, only 34% of people polled strongly supported letting homosexuals serve in the military, but half again as many — a full 51% — expressed that level of support for letting 'gays and lesbians' serve in the military. Ever since reading that I've worried about how many important decisions are being made by the 17% of people who support gays and lesbians but not homosexuals."

[http://slatestarcodex.com/2015/04/15/trouble-walking-down- th...](http://slatestarcodex.com/2015/04/15/trouble-walking-down-the-hallway/)

<comment><USER7> There's a similar gulf between people who support "more government assistance for people on low incomes" (popular) and people who support "more welfare" (unpopular).

I think certain words are given negative/positive associations by the media and those overtones have a lot more impact if you're only spending 4 seconds per question than if you're really thinking about it.

<comment><USER8> >There's a similar gulf between people who support "more government assistance for people on low incomes" (popular) and people who support "more welfare" (unpopular).

Those are not the same thing, though. Someone with a low income has a job, presumably.

<comment><USER7> Actually it was "government assistance for the poor" \- _not_ low incomes - that rated highly on polls, which presumably includes people without jobs. My mistake.

</comment></comment></comment></comment></comment><comment><USER9> I always take $1 as a CEO to show my commitment to taking out all my money with stock options and dividends.

<comment><USER10> Not sure if that's sarcasm or not and I know that usually appears only in the news about CEO's who get millions that way anyway, but the CEO's of (usually smaller) companies that have the same compensation plan often just get nothing ($1) when they didn't perform because there simply was no profit (so no dividends) and no-one would buy (parts of) shares because they are down (if the company is publicly trading that is quite a bit more complex). So that seems a far more fair way of compensating and paying out millions for the risk.

</comment></comment><comment><USER11> Im really curious why this matters to so many people. It only matters if you own part of the company and if this is the case, you most likely took part in the decision making process that gave the ceo this dalary.

<comment><USER12> Because humans are values-driven, and humans make decisions based on their values.

Buying from a company that does not reflect their values is contradictory. The way to reconcile the conflict is with saving money ( and justifying that saved money as a future donation ) OR not shopping at the store that does not match their values.

I for one will never shop at Walmart - no matter how cheap it is.

</comment></comment><comment><USER13> Won't they just be creating a new company to siphon the money trough ?

</comment><comment><USER14> What if every employee has a decent salary (70k+) and the ratio is still very high?</comment>


San Diego: join us for SD Hacker News meetup #24 (Fri 12/23) - <AUTHOR> http://anyvite.com/oeroiupezb

<comment><USER2> Thanks for posting this, Trey. Looking forward to seeing everyone at the meetup on Friday. Please RSVP if you're coming!

SDHN wiki: [http://cses.ucsd.edu/wiki/index.php/San_Diego_Hacker_News_Me...](http://cses.ucsd.edu/wiki/index.php/San_Diego_Hacker_News_Meetup)

SDHN mailing list (low traffic, mainly for event announcements): <http://groups.google.com/group/sd-hackernews>

Other tech/biz meetups & events in San Diego: <http://www.sdtechscene.org/></comment>


How I discovered my unfair advantage. Hint: it's not tech nor money - <AUTHOR> https://medium.com/@julienbrault/from-zero-to-a-million-the-day-i-discovered-my-unfair-advantage-1b0c637c91e6#.c3em2kzhb <comment><USER3> >However, I think I've found my unfair advantage; it's my ability to tell stories.

Given that your thesis is 7 paragraphs in, you might want to rewrite this story a bit, I almost gave up reading what your unfair advantage was - <USER2> was a lot of time spent in the article talking about things your reader may not be familiar with, and really those are not details we need before you tell the story of what your advantage is.

If your advantage truly is telling stories, make sure to tell me a story :)

</comment><comment><USER4> You should replace 'unfair' with 'competitive'. I have many competitive advantages, but I don't consider decades of sacrifice and hard work that contributed to these advantages 'unfair'.</comment>


Ask HN: What to do with underutilized VPS? - <AUTHOR>

Hey HN: I've got a pretty decent VPS sitting here and I barely use it each month. What should I do with it? <comment><USER2> You could donate some bandwidth to the Tor network. <http://www.torproject.org/>

</comment><comment><USER3> Check your AUP but you could run Folding@Home on there.</comment>


Ask HN: What are the tax advantages of incorporating vs. an LLC? - <AUTHOR> I've often heard that it's advantageous to incorporate your company as a Delaware Corporation instead of an LLC if you are expecting to invest heavily in growth for a number of years. Based on corporate and llc/individual tax rates, I don't really see the advantage. I was wondering if someone could explain why this is the case. Thanks! <comment><USER2> Partnerships, S-Corps, LLCs are pass-through entities - meaning profits are treated as self-employed/contractor income, and excluded from corporate taxes (though you can elect to have an LLC taxed as a corporation, which may be advantageous in certain situations). However, pass-through income is subject to self-employment taxes, which currently sit at about 15%.

S-Corp - if your business is earning a lot of profit it can make sense to pay yourself a salary and the remainder of profit as a distribution, which is not subject to the 15% self-employment tax: [https://turbotax.intuit.com/tax- tools/tax-tips/Small-Busines...](https://turbotax.intuit.com/tax-tools/tax- tips/Small-Business-Taxes/How-an-S-Corp-Can-Reduce-Your-Self-Employment- Taxes/INF22938.html)

C-Corp - For a company you founded a QSBS or Qualified Small Business Stock can be excluded (in whole or in part) from capital gain taxes. So, as your company grows year after year, and it's valuation rises year over year, this can save a lot of money when selling: [http://www.lexology.com/library/detail.aspx?g=dde20f35-2d5e-...](http://www.lexology.com/library/detail.aspx?g=dde20f35-2d5e-4a7a-a195-9e848265fd8c)

<comment><AUTHOR> (though you can elect to have an LLC taxed as a corporation, which may be advantageous in certain situations)

This is really the crux of what I was trying to understand...thank you for catching that. Can you expand on this as to why it is advantageous to be taxed as a corporation? Tax rates for corporations all are higher than personal tax rates. I assume the 15% self-employment tax is the difference, or is there more?

<comment><USER3> It is a conversation best taken up with an accountant.

If the organization is set up as an LLC, with a tax status as a partnership taxation, the activity of the organization is going to show up on the investor's taxes.

Investors generally are not interested in seeing new tax items show up on their tax return, because of an investment. The tax details arrive on a form to the investor called a "K-1". Look up "IRS K-1" for background.

Investors generally prefer capital gains, upon sale of the stock. And simple dividends, and perhaps interest income. Not a three-page list of items flowing from the startup's own activity scattered all over the investors tax return.

Some investors, such as university endowments, and the like, also do not want the pass-through tax items from partnership tax treatment, and cannot make use of them either, since they are arms of the tax-exempt university, thus demand instead investments in C-Corp status entities.

As for location of incorporation, many huge, and many smaller organizations incorporate in their home state. It's an entirely separate question and topic, not to be conflated with tax filing status.

<comment><USER4> One more thing,

With pass through entities (eg LLC, K-1), you can accidentally pass on tax liabilities without disbursements. So your investors may be on the hook for taxes without receiving income.

If you are ever planning on seeking investors, do yourself a favor and skip straight to C-corp.

</comment></comment></comment></comment><comment><USER5> To me, the reason to form a Delaware C Corporation is to facilitate investment from the type of investors who normally invest in Delaware C Corporations, such as the well known investors from Silicon Valley. A Delaware C Corporation structures a company for a particular life cycle and a particular financial structure that is attractive to particular types of investors...including founders with particular goals.

Roughly speaking, those investors are seeking returns via compounded growth in the value of their equity over a period of several years.

Likewise, an LLC may also be attractive to a different particular classes of founders and investors. In general these will be investors who are seeking return on equity via periodic cash flows. Structuring an LLC as a pass through tax vehicle facilitates returns via cash flow at the expense of compounding equity growth.

To me, tax strategy is a bit of a red herring. A higher tax on a more money often is better than a lower rate on less money for the same reasons that less equity in a big company is often worth more than more equity in a small one.

Of course, in the end it all depends on the company and the founder's objectives.

Good luck.

</comment><comment><USER6> A c corporation also gives you the ability to claim QSBS. Qualified small business stock. If u are a c corp (not s corp) and under 50 million in assets and some other conditions... all (used to be less but I believe it is now 100% permanently) issued stock can now be free of federal long term capital gains if u hold on to it for more than 5 years. I am not a lawyer but if you have goals to grow the business you should consider this as it can save u a lot of money in the future.

</comment><comment><USER7> Delaware is a relatively expensive place to incorporate.

The advantages of Delaware corporations are (1) convenience, (2) privacy, and (3) a legal ecosystem that meets the need of big public companies.

If you want to form a corporation in New York, for instance, you have to form a board of directors, have an annual board meeting, etc. It is a lot of bother and paperwork and most states make you do it. Not Delaware. You don't need to have a board of directors or file very much paperwork at all to be incorporated in Delaware.

Since there is no board of directors, their names are not on the public record, in fact nobody's name is on the public record. You have to have some agent that will accept documents in your name in case a process server shows up. If you fail to respond in court, they can shut down your company and take its assets, but they can't do anything to you because they don't know who you are.

Finally a lot of big companies are there because there are laws that are good for management and lots of lawyers and other corporate services people who serve Delaware corporations. Unlike most states, the bar is not transferable from other states to Delaware.

</comment><comment><USER8> IANAL and I am not an accountant. The short answer is that a corporation (assuming C-Corp) is subject to double taxation. Meaning that you pay personal taxes and corporate taxes. With an LLC (or S-Corp) you only pay personal taxes.

The second part of your question, why an LLC over a Corporation. Well, a corporation has shareholders, where a LLC has members. Two completely different structures. Shareholders own stock which is easily (or easier to) transferable.

Finally, Delaware is preferable because it has specific courts for handling business law. The judges tend to be well-versed and the laws are "business friendly".

The decision really comes down to what you intend to do with the business (if you plan to raise funds through equity you will need to sell shares which, for basic purposes, require a corporation), who is going to be involved in the business, and what your long-term goals. You should consult with an attorney or accountant prior to making a decision.

</comment><comment><USER9> "Based on corporate and llc/individual tax rates, I don't really see the advantage."

Yes, correct. Incorporating in Delaware is not so much about saving taxes. Delaware is considered to be friendly towards corporations and the legal system actually understands the challenges a business goes through. For example, Delaware has a Court of chancery that focusses specifically on business law and uses judges instead of juries [0]. Things like that.

[0] [http://www.bizfilings.com/learn/incorporate-delaware- nevada....](http://www.bizfilings.com/learn/incorporate-delaware-nevada.aspx)

</comment><comment><USER10> I spoke to a lawyer and the recommendation I got was to go with a Delaware LLC.

The lawyer stated that the business law is more concrete and predictable in Delaware. If you have to go to court, it is going to be easier on your company.

If you plan on raising funding for your startup, go with a C corp instead as it is easier to deal with things. You can always convert an LLC to a C corp but that is more hassle later.

If you do not plan on taking funding, and you want a lower accountant bill, go with the LLC. The pass through income on your schedule C is a lot cheaper to deal with.</comment>


Show HN: GroWrk – Flexible home workstations for distributed teams - <AUTHOR> https://growrk.com/ <comment><USER2> I'm not sure this adds up. Lets use the $69 standing desk as an example. Most companies depreciate assets over 3 years, so if we take that $69/month for 3 years, you spend almost $2500 for a standing desk. And you can get a decent one for a third that cost. So you could re-outfit every remote workers office every year for those prices.

<comment><AUTHOR> Thanks! Our subscription is meant to be flexible, what we offer is precisely what you describe. We can provide brand new desks and ergonomic chairs every year for as long as needed ensuring that employees always have a great place to work from. When the employee is no longer with the company we take the furniture back, minimizing waste.

</comment></comment><comment><USER3> Interesting idea but most of the situations I've worked from home it was with stuff scrounged from the main office or.... just from what I have at home.

I don't naturally just have room for my employer to outfit me... although I guess that could be nice.

<comment><AUTHOR> Thanks! Our solution is being developed with remote first companies in mind. If your employer already sends you a laptop and backpack, why not add a proper workspace for optimal performance too.</comment></comment>


Terminal latency (2017) - <AUTHOR> https://danluu.com/term-latency/ <comment><USER2> As a keyboard player, I can tell you that anything over 10ms latency noticeably degrades the experience. 100ms of keypress-to-sound latency makes the instrument unplayable.

Your ears will detect very small latencies; offset something just by 1-2ms, and you get an echo feel; 50ms will be off-beat.

(Organ players have to deal with that kind of latency on their instrument[1], but it's a hard skill to learn, and limits the music that can be performed on the instrument. Say, following a drummer is out of the question.)

Why people tolerate huge amounts of unnecessary latency is beyond me. And _everything_ is laggy these days.

Except MIDI/audio setups, that is. And even in that scene, Android got a low- latency API only last year.

I say, the decade of 2020 will be not about increasing _performance_ , but decreasing the goddamn _latency_ down to unnoticeable levels. Or I really hope so.

[1][https://music.stackexchange.com/questions/30454/how-does- a-p...](https://music.stackexchange.com/questions/30454/how-does-a-pipe- organist-deal-with-latency-or-delay)

<comment><USER3> "As a keyboard player, I can tell you that anything over 10ms latency noticeably degrades the experience."

Which explains why unless I missed some new development, there's no way professional music can be played live on any Android based product. By music I mean music, not triggering prerecorded loops, a thing which could be done on a 50+ years old Mellotron as well. I'm 100% sure Java is to blame: low latency and virtual machines don't mix well.

<comment><USER4> > I'm 100% sure Java is to blame

I shouldn't but I will anyway: People who are 100% sure of things are generally wrong and this case is no exception.

I'm being facetious here but what if I told you that nearly all machines are virtual machines? Your CPU doesn't really execute instructions, it _interprets_ them by first translating them to microcode.

There's nothing inherent to the idea of not coding directly on the lowest level possible which forces your programs to have bad performance. Zero-cost abstractions really do exist.

I mean, Erlang uses a virtual machine called BEAM, erlang programs sit at a remarkably high level of abstraction, and it's not like erlang systems are known for their chronically high latency.

The Android Runtime also compiles applications before running them [1]. The instructions being run are native code in elf files [2].

Certainly Android has had latency issues, and I'm no fan of Java, but that was more of an architectural thing than a Java-Is-Such-A-Bad-Tool-Lol thing.

[1] [https://source.android.com/devices/tech/dalvik](https://source.android.com/devices/tech/dalvik) [2] [https://stackoverflow.com/questions/26254538/difference- betw...](https://stackoverflow.com/questions/26254538/difference-between- dexopt-and-dex2oat/26263071#26263071)

<comment><USER5> > I'm being facetious here but what if I told you that nearly all machines are > virtual machines? Your CPU doesn't really execute instructions, it > interprets them by first translating them to microcode.

Well that's not true.

<comment><USER6> [https://en.wikipedia.org/wiki/Microcode](https://en.wikipedia.org/wiki/Microcode)

</comment></comment></comment></comment></comment><comment><USER7> libvte is a major offender here. It's used in several popular terminal emulators, and it's deliberately capped at approximately 40fps[0], which means on a 60Hz display you'll sometimes get an additional frame of latency, and not even predictably because the timing is so uneven.

Set your keyboard autorepeat to 60Hz, hold down a key in a libvte-based terminal, and watch how bad it is. Now try again with xterm and see what it's supposed to be like. I can only assume the slow update is some misguided attempt at power saving.

[0] [https://github.com/GNOME/vte/blob/master/src/vte.cc#L10547](https://github.com/GNOME/vte/blob/master/src/vte.cc#L10547)

<comment><USER8> People keep knocking xterm but honestly it still is probably the best and most complete terminal emulator.

<comment><USER9> It also has the awesome Secure Keyboard feature, which I haven't yet seen anywhere else.

<comment><USER10> MacOS Terminal.app

</comment></comment></comment></comment><comment><USER11> Too bad they didn't measure xterm. That one has always felt the best to me on a native Linux system by a large margin.

Also Microsft's default WSL terminal (ubuntu.exe if you happen to be running Ubuntu WSL) is a lot faster than anything else I tried on Windows. I suppose that's what you get for using a low level UI API that's optimized for performance. Its input latency is lower than any other app on Windows.

Back in December I did a Windows terminal review at: [https://nickjanetakis.com/blog/conemu-vs-hyper-vs- terminus-v...](https://nickjanetakis.com/blog/conemu-vs-hyper-vs-terminus-vs- mobaxterm-terminator-vs-ubuntu-wsl)

There's no scientific measurements on input latency but input latency is something I pay a lot of attention to, especially considering all you do is type into a terminal. It is the most important thing IMO. The TL;DR is the default WSL terminal is a lot better than anything else for low latency, but WSLtty is what I use personally due to it being more configurable while still being OK'ish for latency. Hyper and Terminus were the 2 worst performing terminals in both input latency and having UI bugs that made the terminal unusable for day to day usage (both Electron apps).

<comment><USER12> Did you do any modifications to the WSL default? It's by far the slowest program on my work computer, like multiple seconds of typing latency at times. It's disgusting to use. Hyper is a bit better but it's obvious Windows wasn't designed by people who care about minor details like typing latency.

<comment><USER11> Nope. I just launched ubuntu.exe running Ubuntu 18.04 WSL on Windows 10 Pro latest stable release and it was the fastest terminal I ever used besides xterm on native Linux.

I do have Windows defender disabled. I'm not sure if it scans every key press though, but it will bring WSL's output to a grinding halt.

I use WSL / wsltty / tmux / terminal Vim (in WSL) as my primary dev environment. It's really solid, even with 1.5mb to 5mb markdown files. Vim uses about 8mb of RAM and a few % of CPU when typing. VSCode used 800MB of RAM and 50%+ of my CPU to open and idle in the same markdown file with 65%+ CPU load when typing.

</comment></comment></comment><comment><USER13> (2017)

Previous discussion: [https://news.ycombinator.com/item?id=14798211](https://news.ycombinator.com/item?id=14798211)

<comment><USER14> I'd love to see a followup study. GPU based terminal emulators (alacritty, kitty) have evolved a lot over the last two years.

<comment><USER8> My personal experience with GPU accelerated GUIs is that latency is always worse.

Drawing text is something that the cpu is pretty good at and the GPU just means more back and forth over the buss, more driver coupling, more weird libraries.

<comment><USER15> I think you're right about GPU tending to have worse latency, but I think it's because that's the way the swap chain is set up and the use of blocking present calls. I've been studying this and am pretty sure I know how to make low latency on Windows work, mostly it's following the advice in [1]. If you do it right, then on modern hardware, DirectFlip kicks in and that saves you an additional frame that would ordinarily be eaten by the compositor. I plan to measure this at some point in the not too distant future, or would be happy to mentor somebody interested in taking it on.

[1]: [https://devblogs.microsoft.com/directx/dxgi-flip- model/](https://devblogs.microsoft.com/directx/dxgi-flip-model/)

</comment></comment></comment></comment><comment><USER16> It would be interesting to see an updated test. Since this report, multiple apps have undergone speed overhauls. The latest version of Hyper, for example, dropped DOM rendering in favor of Canvas/WebGL.

That being said, there is a major difference in perceived speed working with terminals over a GUI like in macOS versus something with fewer layers. I hooked up a Raspberry Pi to do some vim editing using Raspbian Stretch Lite and it felt like editing on a supercomputer (right up until I needed to compile something).

<comment><USER17> The only time I ever noticed a difference in input lag was when I had to fumble my way through the UEFI console.

I had no idea what I was doing, but the speed was eerie.

<comment><USER18> This is common for anything that emulates text terminal on highres-ish graphical mode using common denominator VGA/VESA interfaces without any HW acceleration whatsoever (and also often with banked framebuffer).

By the way, on 4k monitor you can discern that grub2 draws its menu from bottom up as it takes second or so.

Linux FB console is significantly faster but still scrolling (ie. fullscreen redraw) is noticeably CPU intensive.

</comment></comment></comment><comment><USER19> iPhone 6s Touch Screen had ~40ms end to end latency, it was good but wished it was better.*

The iPhone XS had about 40 as well, but the iPhone XR had 60ms+ and in some case closing in to 80ms. ( It was 60ms + 10+ from Display if I remember correctly )

I know it is a hard to sell "figure", but I wish Apple could find a way to market this, and improve on it. The Apple Pencil 2 and Pro Motion, are still no where close to real time. It still feels lag, or Jank.

Note: I try to Google for the source but unfortunately nothing came up.

Edit: The only thing I got was this Chinese Site with a Table of input latency. [http://bbs.nga.cn/read.php?tid=16347225&page=1](http://bbs.nga.cn/read.php?tid=16347225&page=1)

<comment><USER20> "I know it is a hard to sell "figure", but I wish Apple could find a way to market this"

Blackberry did that with the Playbook pitting it against iPads. They showed it was more responsive by having a video game, a browser, and other stuff running with no lag. Apple could similarly highlight faster response time.

</comment></comment><comment><USER21> As mentioned, this is somewhat out of date. iTerm2 has gotten a GPU renderer since then, which should reduce the latency. Unfortunately I can't get typometer to work. I guess it's because it's not requesting the right permissions on macOS 10.14.

<comment><USER22> If you have an iPhone, [http://isitsnappy.com/](http://isitsnappy.com/) is very easy to test with

</comment></comment><comment><USER23> Throw in things like text/syntax highlighting, autocomplete, search etc., and 100ms latency will be a dream (speaking as oh-my-zsh user).

Also: fancy fonts and ligatures

<comment><USER24> Is zsh slower than bash or ksh on terminals?

<comment><USER25> I think op is mostly referring to how zsh users often load it up with extensions to do fancy completions, and fancy prompts requiring special fonts and doing lots of things like showing current git branch. It can add some latency!

<comment><USER23> You've just described my situation :)

</comment></comment></comment></comment><comment><USER26> I spend lots of time on remote servers and VPS with ssh via Tor. So I'm used to ~500 msec latency.

But hitting VirtualBox VMs via VRDP via Tor, that can bring me to tears. Installing Debian, say, is fine. Then you try to login.

        debian login: uuuss
        debian login: usssss
        debian login: uuus

And if you get to password, it's far worse, because you can't see what you've typed. So I'd set user as "x" and its password as "z". And once I'd logged in, do:

        setterm -repeat off
        setterm -repeat off >> /etc/issue

But then there's the joy of using GUIs. Mouse pointers with ~500 msec or more latency are crazy making.

<comment><USER27> This is where mosh ([https://mosh.org/](https://mosh.org/)) really helps

<comment><USER26> Thanks.

Except that Tor doesn't route UDP :(

Could do mosh via tinc via Tor, though. I'll try it.

</comment></comment></comment><comment><USER9> Considering its simplicity, I wonder why st fared so poorly. Also, I'm surprised that eshell did well on the latency part, since it sometimes feels laggy (which could be due to its reimplementation of basic Unix tools in elisp).

<comment><USER28> > Considering its simplicity, I wonder why st fared so poorly.

I don't understand why in earth you would expect simple solutions to be fast. Most very fast software need some level of complexity in order to special-case for the fast platform primitives. See for instance glibc which is _not simple_ when compared to musl but also rolls over it in benchmarks, because it uses many state of the art algorithms and many architecture-specific optimizations.

<comment><USER29> I think he means that st is simple regarding its features not its implementation (which I know nothing about).

</comment></comment></comment><comment><USER30> I am curious how hn would construct a program which tried to minimize the latency of "simplest" test possible. Lets say -- press the space bar and the pixel at top right of screen turns green.

I used to use nasm on a dos machine - where it was possible to write a rather straightforward assembly program that would take a keypress and update a pixel -- but I am not sure how abstract/layered graphics stacks are on operating systems these days -- IE -- what is the simplest/low latency method to tell a computer to flip an pixel? SDL?

<comment><USER11> A few months ago I asked the MS devs why their default WSL terminal felt incredibly responsive and they replied with a ton of details.

You can read the thread here: [https://github.com/Microsoft/console/issues/327](https://github.com/Microsoft/console/issues/327)

<comment><USER31> While the reply is great I feel it is missing the point a bit. The reason it feels so fast is IMO because everything else is so slow. Look at the numbers in below link (near the bottom). Windows 10 is _extremely slow_. Linux is often twice as fast with the same hardware and the same software. Why they still haven't fixed it is beyond me.

EDIT. Doh, forgot the link.

[http://isitsnappy.com/](http://isitsnappy.com/)

<comment><USER11> > Linux is often twice as fast with the same hardware and the same software. > Why they still haven't fixed it is beyond me.

Linux is no different. Gnome terminal has a ton of input latency compared to xterm. It's like night and day. A lot of graphical apps in Linux have added input latency just like Windows. It's due to layers of UI abstractions and frameworks (the same as Windows but different UI toolkits of course).

That links just shows that VSCode and Atom are both horrendously bad for input latency on any OS.

</comment></comment></comment></comment><comment><USER32> Can confirm that latency on iTerm2 is awful. I tried it for a while at the behest of a colleague and switched back to Terminal.app because I couldn't bear the lag.

<comment><USER33> How long ago did you test that? I recall trying out iTerm2 some time ago and being appalled at the latency as well, but fairly recently I reconsidered it and found it to be more than quick enough for my needs.

<comment><USER32> At least a year ago, but my recollection is that it was context-dependent too. Like, sometimes it was fine, and other times it wasn't, but it wasn't really clear to me what caused the problem (wasn't obvious things like low memory or having a giant scrollback).

</comment></comment></comment><comment><USER34> I've used KDE's Konsole for 20+ years. How would I got about testing its latency??

<comment><USER34> oh, I guess they were using [https://github.com/pavelfatin/typometer](https://github.com/pavelfatin/typometer) ?

<comment><USER34> Looks like around 31ms: [https://i.imgur.com/qHblAg1.png](https://i.imgur.com/qHblAg1.png) Good enough for me I guess.

</comment></comment></comment><comment><USER24> Why is xterm not included? It's probably the most popular terminal on Linux. It's also noticeably laggy.

I'm surprised that eshell performance is so good. Maybe because it supports less features than a standard terminal? I use Emacs and Elisp everyday and both are dog slow. It's unfortunate that they still haven't managed to replace the interpreter and bytecode compiler with a faster scheme compiler after all this time.

As an aside, GNU projects seem broken in their management. Every project seems to be run by some get off my lawn egomaniac. (ex RMS, Ulrich Drepper)

<comment><USER35> > Why is xterm not included?

Because it doesn't run on a Mac. It was tested elsewhere though and found to be among the quickest, so maybe your configuration is suboptimal.

> Every project seems to be run by some get off my lawn egomaniac. (ex RMS, > Ulrich Drepper)

The list of projects currently run by that list of people comprises "emacs and nothing else." Drepper left glibc maintainership many years ago and RMS has not been actively involved in anything other than emacs for a similar duration (aside from crippling gcc backend splitting).

<comment><USER36> Doesn't X11 ship with macOS (i.e. to run "legacy" Unix apps)? I could've sworn I've used xterm before on it.

<comment><USER37> It doesn't ship on it anymore. It used to a number of years ago.</comment></comment></comment></comment>


You Don't Need Math Skills To Be A Good Developer - What About A Great One - <AUTHOR> http://www.skorks.com/2010/03/you-dont-need-math-skills-to-be-a-good-developer-but-you-do-need-them-to-be-a-great-one/ <comment><USER3> It's definitely the case that once you have a hammer, you begin to see the nails.

A developer I know (a very good one, but without much of a math background) showed me a network routing problem he had. The problem: he was trying to organize a distributed system to process data and pass it to the end user. After spending a week or two doing it by hand, he wrote a python script which played around with parameters automatically (for a fixed topology).

(See [http://www.sce.carleton.ca/faculty/chinneck/po/Chapter10.pdf...](http://www.sce.carleton.ca/faculty/chinneck/po/Chapter10.pdffor) an example of the type of problem.)

I showed him how to set it up as an LP problem and use glpk to solve it, which imposed no restrictions on topology. He immediately resolved to learn LP. He told me that since then, he used LP to solve several problems he would not otherwise know how to solve (or at least would have solved mainly by fiddling/guess/check).

<comment><USER4> on the flip side, I work with a bunch of math nerds (machine learning experts and what not) and they often write terrible abstractions and apis. There are a lot of skills that are important in software dev, but I feel we often act as if the math skills are more important than the rest, and I'm not sure that they are in general. Having them is definitely a plus.

Also, math is a very broad field, and a lot of it is specific to certain problem domains. I'm just rambling, not sure if I have a real point ;)

<comment><USER5> > [math nerds] often write terrible abstractions [...]

Category theory to the rescue!

<comment><USER4> ha, I think this is how we got into this mess ;)

<comment><USER5> Actually computer guys may write brilliant software--but most of them have historically been weak in coming up with good abstractions.

In the last years mathematical abstractions have become more popular. Think of functional programming and other declarative languages.

One early example of the same thing have been regular expressions and grammars.

<comment><USER4> functional only helps when you don't have to deal with things outside of your programs memory space. Functional starts looking the same once you start grabbing stuff from databases, calling rest services, pushing stuff to files, etc

<comment><USER5> You can get a good (simplified) overview of XMonad at this site ([http://cgi.cse.unsw.edu.au/~dons/blog/2007/05/01#xmonad_part...](http://cgi.cse.unsw.edu.au/~dons/blog/2007/05/01#xmonad_part1_model)). They show how to deal with lots a very side-effect happy domain, and still have a nice and clean design.

<comment><USER4> this isn't an example of pure functional gluing together a bunch of external data sources and sinks.

<comment><USER5> Why not? Especially the emphasis on data structures is quite exemplary in my opinion.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER6> Basic mathematical structures are the most useful for programming. Learn about sets, relations, logic, graphs, first class functions, infinite sequences and other basics and you'll be able to solve algorithmic problems much more quickly.

Most programmers think in objects and arrays/lists. While this may result in the most efficient program it's not the most efficient use of your time. Many problems can be modeled much more concisely and easily with structures that are used in math.

Here's a challenge for HN: write an AI for Dawson's chess [1] that can determine whether a position is a winning position or a losing position.

[1] <http://www.madras.fife.sch.uk/maths/games/dawsonschess.html>

<comment><USER6> No takers? It's not a lot of work. With a little bit of thinking it's 1 line of Python code, or maybe 10 lines of C/C#/Java because they don't have concise support for math structures.

<comment><USER7> no. I really have better things to do with my time, like building real products and make $$.

I did these stuff of things back in college, ACM contests and all. Time to grow up and build real things.

<comment><USER8> Wow, you're no fun. Flexing muscles makes them stronger, you know. And sitting in a chair grows your bottom disproportionately.

Buddha preaches balance.

</comment></comment></comment></comment><comment><USER9> (copied from the comment I left on the post)

I think a lot of programmers were turned off to math by boring classes that focused way too much time on how to calculate rather than applying it. This typically happened early in their life and was unfortunately followed by reinforcement in later classes that _that_ is all math is.

The biggest leap I took in math was when I started unlearning this math brokenness due to a great math teacher in middle school. Had this not happened, I doubt I would have been excited about the math.

On my blog, I've been trying to show very cool applications of slightly advanced math such as explaining how the Xbox Live TrueSkill algorithm uses some basic statistics to rank and match people. It's a beautiful application of "statistical machine learning." In addition, I tried to show how the Advanced Encryption Standard (AES) uses some really neat finite field algebra.

The hardest part is overcoming people's fear. This fear has been reinforced so much that you really have to go out of your way to break through the fearful blank stare people get when anything math related is mentioned. I'm just trying to take baby steps now; it's really hard.

Math is simple language that has been refined for centuries. It's sad that so much fear is associated with it. Leslie Lamport's interview on Channel9 goes into this more.

<comment><USER10> I'll link to your TrueSkill post for those who haven't read it (it's excellent): <http://www.moserware.com/2010/03/computing-your-skill.html>

Although I already knew and understood TrueSkill before your post, it helped solidify my understanding. I hope you write more articles like that in the future :)

<comment><USER9> Thanks for the kind words! I try to write posts that would have helped me understand a topic. I've found that I can get to a hand-wavy understanding of a topic in a reasonable amount of time and then an actual understanding that I can communicate to others in an unreasonable amount of time :)

Sometimes it takes a month, but the TrueSkill one took about six months.

I've learned that deeply understanding a topic (especially one that has non- trivial math involved) doesn't cause a net loss in the amount of "math fog" in my head, it just moves it to a different place (often one that I never new existed before).

As a schoolboy, it was tempting to think that one day I'd "arrive" in math. I just don't think that's realistic. At best, I've just learned to be comfortable wandering around in the perpetual fog.

</comment></comment></comment><comment><USER11> I've been out there doing web apps and the like, and I always tried to get better and learn more. Eventually I picked up books with enough math in them to make me fear them, and that was when a sneaking itchy feeling I had about my math incompetence became a full force rash. It was clear it was going to hold me back from the developer I wanted to be.

I went back to school. Now I'm knee-deep in 400 level mathematics and while realizations of utility aren't daily, it is definitely a regular occurance where I see something and think, "ah, so there's a useful way to approach problem x." The other thing is even if some specific technique of MATH 4XX isn't useful, the thought process might be. I've noticed that my approach to problems has been tweaked in a mostly subtle but advantageous way.

Of course it's true. Most of the database fetch print store work wouldn't benefit from this work, but I don't want to do that anymore. Hopefully it proves to be worth the trouble professionally, even though personally it's definitely beneficial.

<comment><USER12> I came to programming from a mathematics background, and I find it helps me on a regular basis, especially set theory when trying to understand more complex SQL Queries.

Of course, I started with a bachelor's in mathematics and then moved into programming professionally. I am currently working on my masters, so I see things differently from some of my colleagues that got traditional CS degrees or were entirely self taught.

</comment></comment><comment><USER13> For programmers wishing to learn to do applied math:

I'm very sorry to tell you, the solution is obvious and you've thought of it already: hard graft. Pick a project, work at it, read text books and watch video lectures as you come across unfamiliar territory. Solve lots of problems. Rinse, lather repeat.

(Yes, I've been through that journey, and I can slowly see myself coming out the other side. Took me about 2 years so far, it's still the beginning but it's not scary anymore.)

Tips:

\- You ARE smart enough. It's _this hard_ for almost everybody else, too. Our brains were designed to gather fruit.

\- Find other people to physically sit and work through problems with. (This is really where college shines).

\- Read some meta-math books. Like How to Prove It and How to Solve It.

\- Use Gershenfeld's "The Nature of Mathematical Modelling" as a guide. Do all problems. Find other sources on each topic, use those to help you.

\- Get on MIT OCW and do 18.085 and 18.086. Do all the problems. If you haven't had linear algebra, calculus, or diff EQs, do those courses too (this will take a while if you have to do all of it from scratch).

\- If you want to use (rather than invent) basic stats/ML, all you need is probability, simple linear algebra, simple calculus, and convex optimization (free book from Boyd). For many applications, you need substantially less.

\- Spend time in a technical library. Just browse. Find a book that's interesting and in which the first two chapters seem comprehensible (though probably not obvious). Take it home and do all problems.

\- Read Peter Szekeres "Modern Mathematical Physics". This book more than any other made me realize math is fascinating rather than scary.

\- It sounds stupid, but I learn better (and enjoy it more) when I let myself get genuinely excited about the material. Even the Intermediate Value Theorem is seriously cool when you really think about it.

Remember: there's a lot to learn. You're trying to teach yourself what people spend years paying $50k/year to (barely) learn from lifelong teachers. It's _always_ hard. But it can also be fun, once you're not totally lost.

</comment><comment><USER14> For me, it wasn't math itself that scared me, it was actually doing calculations by hand. Even though we have calculators and software, we still expect kids to do complicated things like long division and solving equations, and even calculus by hand. (Maybe it's a holdover of the Protestant work ethic.)

If I'd known about things like Gödel's Theorem or mathematical logic as a teenager, I would have seen the big picture.

<comment><USER15> It is very true that serious users of mathematics (engineers, scientists, even mathematicians themselves) don't really rely on their ability to do calculations by hand; indeed, a lot of them suck at it. Doing it by hand while learning the subject matter gives you a much more visceral experience of what's actually happening, though, even if you use a tool to do it for you most of the time.

<comment><USER16> Very true. I became a math major in college because it was the only technical discipline where I didn't have to deal with numbers. I calculate the standard deviation the same way everyone else does, I plug the numbers into Excel, but I know what's going on under the hood and I have a better understanding of what the result means. For example, the standard deviation of the sample versus the standard deviation of the mean came up the other day.

<comment><USER17> I wish I could get people to believe me when I tell them math is not about numbers and that computer science isn't about computers.

<comment><USER18> There's a well-known quote that says "computer science is no more about computers than astronomy is about telescopes". Often attributed to Dijkstra, but I don't know if there's a reliable source.

</comment></comment></comment></comment></comment><comment><USER19> If I didn't know better, I'd swear you read my mind. I've been moderately successful being a developer for the past 12 years without using much math. But, like you, as I've started to delve into search and recommendation features for my CRUD apps, I have come to realize that my math skills stink. Anxiously awaiting your next blog post about how you've solved this quandary. :)

</comment><comment><USER20> I suppose it also depends why you want to be a "good" developer and a "great" one.

To me, developing software is largely a means to get to a goal. I enjoy it, but only in the same way I enjoy cooking. I personally have no desire to "cook" in a factory for thousands of people. I only enjoy the creativity of creating meals, learning some cooking techniques, and of course eating it. The actual problem of 'how to create the meal' is not interesting in the same way when it scales up to thousands of orders.

In the same way, I personally have no desire to delve into creating search algorithms, complicated physics engines, or complex business logic. I would want to do the creative thinking to move those projects, but not the actual logic and development themselves.

<comment><USER21> Regarding cooking: You will never go much beyond a set of frustrating, memorized axioms unless you understand food science and chemistry. I feel as though it works the same way with programming.

<comment><USER22> You don't need to know the details of a Maillard reaction to know how to saute. This is the difference between a visceral pursuit like cooking and an intellectual one like programming. Most of the people cooking great meals at well-respected restaurants have never read McGee (and probably don't read English very well at all) and would have no problem cooking a better meal than any recent CIA grad.

</comment></comment></comment><comment><USER23> As a math major, I definitely agree with you. There are a lot of problems that seem to be intimidating or unintuitive but when you try to formalize and generalize them a bit, they may be reduced to problems that have been elegantly solved by great mathematicians. You might still be able to scratch your head for a long time and come up with your solutions but chances are that your own solutions are going to be messy, inefficient and ugly.

</comment><comment><USER24> I've always felt that if you're a programmer and you're hiding from the so- called "mathy" parts of you're doing, whether it's universal things like algorithms or specific things like machine learning, instead of being given a cute title like "developer" and forming a false dichotomy between that and the idea of a "computer scientist", you should be given the title of "sloppy".

Admittedly, you might be able to get by mindlessly plugging in values into someone else's function without ever having to bat an eye. But when something breaks, you're going to be absolutely _screwed_.

"Programming is one of the most difficult branches of applied mathematics; the poorer mathematicians had better remain pure mathematicians."

-Edsger Dijkstra

</comment><comment><USER25> I think developers need to treat math like any other framework - <USER2> practicing. When I was an undergrad and then a graduate student I was always doing math. Now that I work in the business world, not so much (although I do use my statistical analysis skills often). My math skills have degrade some because of it.

As an aside, the picture at the end of the article gave me flashbacks to when I tore my ACL doing backrolls on the wakeboard...ouch!

</comment><comment><USER26> But just in case you want to work on your math skills anyway, a plug for a great free website to do that...

<http://www.khanacademy.org/>

</comment><comment><USER27> Statistics and probability (up to an undergraduate level) are necessary if you want to work in machine learning. Category theory is nice (but not necessary) if you want to understand the underpinnings of Haskell.

What I think really makes math generally useful, though, is that, at its root, mathematics is a formalization and generalization of problem solving. _That_ is what formal systems and computability theory, for example, are actually about: how, in general, problems are solved.

<comment><USER28> What I also find useful is getting practices with bottom up approach. In math the way ideas are developed and presented are first with the low level definitions and axioms, and then from there using logic those ideas are combined to prove more complicated theorems which can be used to solve other problems more easily. Similar to how programs can be built starting off with the low level details and then building abstractions on top of those to make dealing with other problems more easily. This skill in and of itself is useful regardless of the type of application one develops and how much actual math a problem needs.

</comment></comment><comment><USER29> im of the mind that programming resides in the logic field, and not mathematics. i am a decent dev with practically no formal math background, and I get around pretty well.

<comment><USER30> Logic is a subset of mathematics.

<comment><USER29> that's an opinion. So lawyers are mathematicians?</comment></comment></comment>


Things Sure Are Quiet At MySpace News - <AUTHOR> http://www.techcrunch.com/2007/05/14/things-sure-are-quiet-at-myspace-news/ <comment><AUTHOR> Interesting contrast to News.YC.

Honestly, you would think they would have at least two users: the guy who created the project & Tom. One of them needs to start spamming the site to make it seem alive.</comment>


Efficient String Concatenation in Python - <AUTHOR> http://www.skymind.com/~ocrow/python_string/ <comment><USER2> This write-up is outdated.

Better data can be found via a search engine.

My own testing (<https://gist.github.com/TimZehta/5435216>) reveals:

Loops: 1,000,000

method1, 0.297 seconds, 11296 KB method3, 0.568 seconds, 17084 KB method4, 0.366 seconds, 66732 KB method5, 0.483 seconds, 20840 KB method6, 0.251 seconds, 15600 KB

Sorry for the enigmatic names (started with code form linked article), but I've run out of time.</comment>


Show HN: ImpromptuDo.com the real time location based activity partner finder - <AUTHOR>

http://impromptudo.com is a small project I've been working on. Just a webapp for now but I think it qualifies as an MVP. Also has a mobile version at the same url or http://m.impromptudo.com. Right now it pulls in data from meetup.com for upcoming meetups in several populous cities so it's not just an empty map. You can also click on the map to put up your own post. Trying to stay away from making it all social networky, there are plenty of those already.<p>Finally, I'm not a designer, as you can see. <comment><USER2> the idea of "click here to see what you could get into right nowish" is immensely appealing to me. if it could go out and aggregate all the event thingies out there and show me whats geographically and temporally close, that would get regular use from me. throw in scrapers for local venue websites and it gets awesome.

i dont kmow about posting up my current status. i dont see myself ever doing that, so naturally, i presume no one else would (and i could obviously be wrong there). but im telling you, if you could make the kayak.com of finding out whats up in your hood, you would have a hit. maybe start it off localized to one major city like dc or bmore and take it from there?

hell if you dont do that i just might! "whatsupbmore.com" <\- id buy that for a dollar.

not to yank your idea in a different direction, this is just what popped into my head, apply salt, etc.

<comment><AUTHOR> Thanks for the feedback. I'm trying to walk a thin line here, I'd like it to be easy for strangers to meet up and kill some time but also have enough information to avoid the creep factor. Target demographic would be people who use meetup.com to find like minded individuals to do things together, only more of an "impromptu" event. They are outgoing and already willing to meet with strangers.

I don't want to add a whole new social network layer and wish there were a good way to let people provide a link to their online identity, like thier facebook profile, meetup profile etc. But it's a pretty big hurdle to get someone to know what a link to their facebook profile is never mind copy and paste it somewhere.

Doesn't foursquare cover that ground though? Events and things nearby right now?

<comment><USER3> I think you could be the Padmapper (<http://padmapper.com>) for events. It wins out because of its intuitive interface and nifty features integrated into the map.

</comment></comment></comment><comment><USER4> Just tried the site with my iphone 4. It guessed my location correctly and pointed out French lessons that are happening nearby right now. Cool!

I'd like it if there was a way to list events happening 'today' and also 'this week' in my area.

I'm not sure if the ability to post my own event is relevant to me, since I doubt any HN types would happen to be on your site for that one hour I was free for lunch.

I think this is a similar problem for location-specific services like <http://messageparty.net/> as well. How do you hit that critical mass where there are enough people online to make a spontaneous connection?

</comment><comment><AUTHOR> clickable:

<http://impromptudo.com>

<http://m.impromptudo.com></comment>


What Writers Can Teach Programmers - <AUTHOR> https://hackernoon.com/how-to-solve-programmers-block-18363c040656 <comment><USER2> Unclosable pop up</comment>