HNHacker News
TopNewBestAskShowJobs

nawgszy

429 karma · joined April 20, 2017

submissionscomments
nawgszy··on I’m Peter Roberts, immigration attorney who does work for YC and startups. AMA
I am a Canadian citizen in California on a TN visa. I have been working on a project that I would like to post as a website and monetize, but has no relation to my TN visa, of course. Is this possible to do without having a green card?
nawgszy··on Spiral: Self-tuning services via real-time machine learning
Not OP / GP; from what I understand, this isn't an API generated by ML, it's a cache manager. "Computing correct responses to requests" refers to deciding whether or not it should read it from some caching layer and whether or not it should be cached in the future, and it does this by optimizing some parameters. The difference is something like it decides whether or not to use the API or the cache to load an image or some content, rather than saying "this request should return a response with these properties". Hopefully I'm right and this makes sense.
nawgszy··on Cryptocurrency is driving innovation in the financial sector
>that can offer transactions per second that exceed any financial system today

>that make SWIFT innovations seem trivial by comparison

Listen, those two phrases alone are gigantic signs of your bias. Even if they were true, the way you phrase it just screams "I own a significant amount of Bitcoin"

Add to that a sentence about

>a whole host of breathtakingly innovative developments

and, oh boy, do I ever think you are biased.

There is actually a pretty clear value prop for Bitcoin: you can exchange something approximating money for services which are undesirable or risky to do so with your traditional money. But needing to build an entirely new layer which, if I'm understanding right, has some significant impact on the semantics of how your transactions end up on the blockchain, just in order to be able to do a completely unimpressive level of throughput, is hilariously far from "breathtaking innovation" that makes traditional financial "innovations seem trivial".

nawgszy··on YAML: probably not so great after all (2017)
What is a DIF?
nawgszy··on Behind the Tech with John Carmack: 5k Immersive Video
Look at this [0]

It's an interpolation thing; it's much easier for your brain to do the tracking of an object when it smoothly moves around, instead of it having to do interp / extrapolation, and this should demonstrate why

Can I ask why you think it sounds like a placebo? I don't really see why there's any logic behind 144hz being the ceiling of how well your eyes can see, and 144hz -> 240hz is a big jump

[0]: https://www.youtube.com/watch?v=pUvx81C4bgs

nawgszy··on Verizon to end some sale of phone-location data
It's absolutely mind-boggling that they are allowed to sell phone location data in the first place without any real consent from their customers.

That's why it must really say something about these companies - Verizon especially - that them voluntarily stopping such a practice makes me imagine they have nefarious motives in mind.

Either that, or they just think net neutrality's death is going to be so much more profitable than this that it's not worth the man-hours anymore.

nawgszy··on U.S. Supreme Court will hear Apple's appeal of App Store class-action lawsuit
>Apple has a 100% marketshare in the distribution of iOS apps

Right, and Steam has a 100% marketshare in the distribution of apps available on Steam.

Now, obviously there's wrinkles here and I'm not trying to be disingenuous and claim that these are identical scenarios. But you see how this quickly gets subtle, yes?

nawgszy··on Ask HN: Government contracting
Not going to lie, thought this was someone from Cisco Webex posting a how-to on govt contracting.

Alas.

nawgszy··on California moves to declare coffee safe from cancer risk
So, I'm uneducated in this matter. Let me do a bit of googling, because your comment implies two things

>Acrylamide is known to cause cancer

>Coffee apparently contains (significant) amounts of acrylamide

The first thing I come across, as usual, is Wikipedia [1]. The summary says:

>As of 2018 it is still not clear whether acrylamide consumption affects people's risk of developing cancer.

It provides two sources [2][3], from the Cancer Research UK and the US National Cancer Institute. The abstract of [2] implies that animal studies show some interaction with DNA, but fairly conclusively says:

>[E]vidence from human studies has shown that, for most cancer types, there is no link between acrylamide and cancer risk. Some studies have suggested a higher risk of womb cancer, but the evidence is weak and inconsistent, so we can’t be sure if this link is real.

The other source [3] is a bit of a more informal FAQ style, and poses the question "Is there an association between acrylamide and cancer?" Again, I see the implication of animal studies possibly showing real links between cancer and the substance, yet

>a large number of epidemiologic studies (both case-control and cohort studies) in humans have found no consistent evidence that dietary acrylamide exposure is associated with the risk of any type of cancer

Can you explain your comment, and especially the last sentence you provide? My search was extremely cursory, but I would be fairly confident that if it's too strong a claim to say this substance doesn't cause cancer, I could at least conclude that saying

>[T]he state is proposing a rule contrary to its own scientific conclusion

is patently false.

Sources:

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

[2]: http://www.cancerresearchuk.org/about-cancer/causes-of-cance...

[3]: https://www.cancer.gov/about-cancer/causes-prevention/risk/d...

nawgszy··on Office 365 is being completely rewritten in JavaScript
How on earth am I the one who needs to "[s]how some initiative" when some guy literally just says "JS is a flaming pile of trash" and gives no justification?

It was an ad hominem and I asked him to expound on it.

nawgszy··on Javascript utility libraries to know in 2018
Hopefully I can explain your downvotes a bit. The JavaScript ecosystem is in an entirely different place now. ES6 has made it feasible to write cleaner, more concise code, and Webpack has allowed library consumers to "naively" import a whole library but the algorithm known as 'tree-shaking' will remove any unused code, which can be especially valuable when a library has a few purposes which are somewhat orthogonal, and each requires has its own large codebase, aka Moment.
nawgszy··on Office 365 is being completely rewritten in JavaScript
>it's just not a terribly good or fast one

From everything I've seen, its performance sits just below Java (4x slower, perhaps) on some standard algorithms or tasks, and significantly faster than languages like Ruby, Python, etc.. I never see hate for those languages like for JS, so I'll disregard that.

>not terribly good

This one never has made sense. What is it missing that makes you hate it so? I think it has rather robust asynchronous handling, 'everything is an object' has lots of nice implications when paired with functionality like Object.keys / .assign, ... So what are the issues you see that make it 'bad'?

nawgszy··on Office 365 is being completely rewritten in JavaScript
>good, far more suitable languages

Can you give a simple analysis on what weaknesses JS has that other languages would avoid with no pitfalls of their own?

nawgszy··on Office 365 is being completely rewritten in JavaScript
>even worse language

What's wrong with JS, exactly, that isn't made up for by its advantages?

I see these 'kool-aid' / 'JS is cancer' comments all the time, but they don't come with any real details.

I feel like you've probably never really used JS, if I'm being honest.

nawgszy··on What if JavaScript wins?
I am amused by a lot of the hyperbole used against JS, as if it somehow is hard to use or drastically restricts the problems you can solve.

At this point, I'm not even sure if a single comment in this thread that poses itself as obviously anti-JS has a valid knock on the language, just high-level, hand-wavy reasoning about why it is so poor.

nawgszy··on Machine learning driven AWS EC2 scheduler
It's broken for me too, on Chrome and a 2017 MBP
nawgszy··on IBM Plex – A new typeface
Doesn't that just mean your browser window didn't have focus? I can scroll on apps in the background with scroll wheel but not arrow keys, etc.. That's just an OS thing
nawgszy··on Update on Async Rendering
Is it possible to shill for an open source library which, as far as I can tell, has no monetization path?
nawgszy··on Collection of Useful CSS Snippets
>Having 10kb tooltip library for doing this automatically is a bit of an overkill for me

Of course, but I hardly see how that's comparable to writing a React class "ToolTip" which is smart enough to know where the side of the screen is, and comes with the ability to use JS.

nawgszy··on JavaScript Promises Discussion: Make Them Monadic? (2013)
But how could they "be a LOT better"?

I see this being said, but from what I've seen async handling is generally not very graceful; with that said, Promises are a very simple but powerful API that seem to handle the problem fairly elegantly.

That is why I'm surprised. I just don't know what the alternative is supposed to be! Can you point me to a language and a library that you would say does a better job of handling asynchronicity than Promises?

nawgszy··on JavaScript Promises Discussion: Make Them Monadic? (2013)
Yeah, exactly. Say you have an API request that is persisting a chunk of data to the database, like a few dependent data items.

This way, you write the API request to just be a simple function invocation of the class you instantiated:

  (req, res, next) => {
    apiHandler = new APIHandler(args);

    apiHandler.saveData(req.body)
    .then(
      // success
      () => res.status(200).json(apiHandler.getResponse()),
      // error
      () => res.status(400|500).json(apiHandler.getErrorResponse())
  )
I mean, it's just a pattern, and I wouldn't necessarily say I use it all the time; it's especially valuable for workers, where you have a series of functions you want to execute where some of them are going to be asynchronous.

If you're just making simple create / update / get requests, it's less valuable, and you can just return a Promise from somewhere. Hopefully that gave you an idea of my motivations

nawgszy··on JavaScript Promises Discussion: Make Them Monadic? (2013)
I'm not sure what you're getting at, can you expand?

I work a lot with databases, so say you're trying to write an object and its children in some sort of one-to-many relationship to the DB.

You can write a Promise chain like

  startTransaction()
  .then(() => writeParent())
  .then((children) =>
    Promise.all(children.map((child) =>
      writeChild(child)
    ))
  )
  .then(
    // handle success
    endTransaction(),
    // handle error
    cancelTransaction()
  )
What exactly about that isn't "proper error handling"? Can you expand a bit on how this would be handled differently by you, or perhaps what paradigm you're programming in where Promise.all executes a bunch of items that can't all have the same success and error handler?
nawgszy··on JavaScript Promises Discussion: Make Them Monadic? (2013)
I am surprised to see so much venom against Promises expressed here. I am young, but I began coding (as a profession) just when Angular 1 was popular and I remember callback hell was a real thing.

A few years later, I use Promises a lot, and they work really well. The way errors bubble is logical and easily controlled, it's almost impossible to throw an unhandled promise exception, doing 'parallel' tasks is easy with ```Promise.all([])```, and there's pretty limited complexity with the way a Promise always returns a Promise.

I find the simplest way to use them is to define a class that has a few data properties you'd like to track.

  class Handler {
    constructor() {
      // shared variables can be set / reset here
      this.defineInitialState();
    }

    executeAction() {
      return (
        this.promiseFn()
        .then(() => this.anotherPromise())
        .then((passedArgument) => this.promiseExpectingArgument())
        .then(
          // success case
          () => this.successHandler(),
          (err) => this.errorHandler()
        )
      );
    }
  }
It's modular and you know what to expect (it's always a promise!). Sure, it's imperfect, but I think its weakly opinionated simplicity is a good tradeoff. After all, it makes no distinction of whether any of the functions in that chain were synchronous or not, and that's a nice thing to know. It also makes testing with dummy sync functions in place of actually asynchronous ones a 0-effort integration.

I don't know about this async / await keyword stuff, and if you have to wrap it in a try/catch block, that's unfortunate but also seems like it's not the end of the world. After all, isn't the Go language constantly requiring you to say "if err != nil <your code>"? Explicit error handling isn't even a bad thing.

Anyways, this is just my opinion, it's fair to have your own, and maybe other languages handle asynchronicity more gracefully, but from what I've seen this is a clean way to wrap async OR sync code in a context that makes it always behave predictably and readably.

nawgszy··on Uber Sales Reach $7.5B in 2017
Not really a surprise. Lyft is their only real competition in the States, I don't have any idea about the global state of things but I imagine they are likewise entrenched with their first mover's advantage.

The real question, I thought, is: are losses per sale decreasing? If not, and if we need to see a significant price increase per ride before things can get better, I sort of wonder if the only thing the taxi industry needed to do to prevent this all from happening was develop a ride-hailing app which tracked your car and gave you the price ahead of time.

nawgszy··on Amazon will launch its own delivery service to compete with FedEx, UPS
>at market

Ah yes, the calling card of people that think systematic exploitation of workers in a global economy where only the top few are gaining wealth is fine because "free market rules" matter in a world full of regulatory capture and industries with too high of a barrier to entry to foster true competition.

nawgszy··on It’s About Time for Time Series Databases
Completely unrelated question, but how on earth is 'clickhouse.yandex' a valid web address?
nawgszy··on Why is setState asynchronous?
You can also ignore React's built-in 'state' object and just store stuff directly in variables using MobX, which will force update components for you.

That said, it is best used as you describe it: a store that holds all the application state and manages API requests, and then any time it updates, any components observing this store will be forceUpdated

nawgszy··on Analysts See Oil Demand Peaking by 2030 as Electric Vehicles Boom
That's some pretty incredible confirmation bias in action
nawgszy··on Your company can increase voter turnout: make Election Day a company holiday
I'm not sure I understand the implication. Can you be a bit more explicit?
nawgszy··on Leap: An Online Community for Women
In the hope you wouldn't reply, perhaps?
← PreviousPage 3 of 5Next →