HNHacker News
TopNewBestAskShowJobs

scottmf

922 karma · joined October 26, 2014

https://twitter.com/scottinallcaps
submissionscomments
scottmf··on Copying objects in JavaScript
Yes
scottmf··on SimpleSSR: Server-Side Rendering at Scale
The “deal with it” is aimed at developers, not users. The entire point of my comment is there is no difference in the end result when you have SSR.

The user still receives a page of HTML and CSS, and then JavaScript is loaded.

scottmf··on SimpleSSR: Server-Side Rendering at Scale
TTFB with SSR. Not a shell. It seems from some responses that I wasn’t clear enough, my apologies.
scottmf··on SimpleSSR: Server-Side Rendering at Scale
You missed the entire point of my comment.
scottmf··on Show HN: A note-taking web app that won't ever betray you
A frozen banana that won’t make you sick and kill you!
scottmf··on Texans say voting machines changing straight-ticket choices
It’s like this in many other areas including healthcare access/cost, environmental policy, drug policy, etc.
scottmf··on SimpleSSR: Server-Side Rendering at Scale
Also probably shouldn’t put RoR as the first item in your list of full-stack frameworks if your title says “at scale”
scottmf··on SimpleSSR: Server-Side Rendering at Scale
10mb of JS — Examples?
scottmf··on SimpleSSR: Server-Side Rendering at Scale
React SSR is not a problem, and I can get quicker TTFB than I ever remember getting with even a simple RoR app (300+ms yikes).

I can also work faster with the React ecosystem (and find it much more enjoyable) than RoR and SSR makes the end result the same anyway.

People like component-based frameworks and modern JavaScript (and its supersets). Things are different now. Deal with it!

scottmf··on TypeScript support added to Create React App
As much as I want to love it, I’ve found it far too restrictive, which makes it difficult to play around with and learn (although error messages have recently improved).

And while I like that JSX is built-in, I don’t like that it’s so different. And having to use <div> ReasonReact.stringToElement("Blah") </div> (The spaces are required) everywhere instead of <div>Blah<div> makes it feel like a poor imitation of JSX and isn’t fun at all. But maybe they’ve fixed some of that.

Someone else said Reason is “better”. The type system might be more sound but TS is far more flexible and forgiving, and doesn’t have ugly and off-putting syntax for promises/async and interop.

scottmf··on Problems with infinite scroll
You just use history.replaceState
scottmf··on Show HN: Callbaxx.js – A utility library to bring callbacks to synchronous code
But what's the point of writing callbacks if you're not going to endlessly nest them?

E.g., I can tell the nested math example[1] is good code because of how deeply indented it becomes.

1. https://github.com/scf4/callbaxx/blob/master/examples/nested...

scottmf··on Show HN: Callbaxx.js – A utility library to bring callbacks to synchronous code
That's a fantastic idea.

What about a babel plugin to transform all code into fetches to a proprietary REST API? By doing all of the work for them, we'd ensure reliability with common operations like + and /, which obviously means we eliminate the need for tests! This would allow devs to move and break things even faster, while we/I collect $10–$20 per 10,000 API calls.

E.g.,

  // Regular code
  console.log(3 + 2);

  // Transpiled code
  console.log(await fetch('http://fetchify.io/add/3/2'));

  // Regular code

  const isFive = (x === 5);

  // Transpiled code
  const isFive = await fetch(`http://fetchify.io/equality/strict/${x}/5`)
    .then(body => body.text());
Some of this is almost too easy to understand though, therefore it's pretty amateurish and we're not doing proper programming. What about something like:

  // Regular code
  const thirty = 5 * 6;

  // Transpiled code
  let $$_tmp1;
  const thirty = (
    $$_tmp1 = await fetch(`http://fetchify.io/multiply/5/6`),
    $$_tmp1 = await $$_tmp1.text(),
    $$_tmp1 = parseInt($$_tmp1, 10), $$_tmp1
  );
Even some seasoned developers aren't aware of this syntax, so it's perfect.
scottmf··on Show HN: Callbaxx.js – A utility library to bring callbacks to synchronous code
Hi! That's definitely an interesting experiment, but it's rather antithetical to the project.

In fact, it might even be broken by future versions of the library.

See issue #7 [1] for a look at why this might not be a good idea.

Thanks anyway!

1. https://github.com/scf4/callbaxx/issues/7

scottmf··on Show HN: Callbaxx.js – A utility library to bring callbacks to synchronous code
I haven't seen that library, but a HN comment chain from last July[1] (nailer's reply in particular) almost certainly planted the seed for this.

1. https://news.ycombinator.com/item?id=14871580

scottmf··on Show HN: Callbaxx.js – A utility library to bring callbacks to synchronous code
Typical arrogant sixer :)
scottmf··on MacOS Marzipan
Seems like it works in Chrome. Not at all standard afaik.
scottmf··on Better Promises in JavaScript
You might find this library interesting https://github.com/scf4/callbaxx
scottmf··on TypeScript at Google
So... ReasonML?
scottmf··on Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
The code would fail to run on older devices without transpiling wnyway.
scottmf··on Show HN: I'm 12, learning JS, and wrote Wolfram's cellular automaton in Node
Hey looks good :)! Just a few things you might not know about:

Google String.prototype.padEnd. It’s built in to JS and should be able to replace your zero fill function.

And instead of mutating the ruleSet array you should be able to use Array.prototype.map like this:

const ruleSet = zeroFill(8, rules.toString(2)) .split('') .reverse() .map(item => parseInt(item, 10));

And you can clone arrays like this, instead of using loops:

const oldArr = [...arr];

Also arrays are still mutable even if you assign them to const variables.

I’d offer more help but I’m on mobile. Sorry for the poor formatting. Hope this helps anyway. Good luck!

scottmf··on [dead]
This story is flagged to death every time it’s posted.

Pretty fucking shocking when the President of the United States threatens to regulate Google results (because he doesn’t like his own) and HN has nothing to say about it.

Maybe they’ll put up a black bar for his impeachment.

scottmf··on [dead]
This story will never make it on HN
scottmf··on Show HN: Nion, declarative API data management library built on Redux
I've been waiting for something like Apollo for Rest APIs. Looks interesting!
scottmf··on BuzzFeed News Asks Readers to Chip in with Donations
And Sullivan was wrong. Take a read of the “Veracity” section of that article.
scottmf··on BuzzFeed News Asks Readers to Chip in with Donations
Irony, but thanks.
scottmf··on Ecuador will hand over Julian Assange to the UK
Yeah, Assange is no hero. His communications with Trump Jr and the leaked Wikileaks chats make that clear—as well as his meetings with people like Nigel Farage and Dana Rohrabacher. Assange has had a very clear agenda for some time now.
scottmf··on No Joke: The Onion Faces Layoffs by Univision, Says Report
There's a great episode of This American Life from 2008 with a behind-the-scenes look at how the staff comes up with headlines: https://www.thisamericanlife.org/348/tough-room

It sounds like an amazing place to work!

scottmf··on Ask HN: What you wish you'd known before getting into JavaScript?
If you’re reading something which suggests you use CoffeeScript, it’s probably terribly outdated.
scottmf··on The NSA’s Hidden Spy Hubs in Eight U.S. Cities
Of course it wouldn’t. Greenwald is effectively a Kremlin puppet and he’ll never admit he was conned.
← PreviousPage 4 of 15Next →