922 karma · joined October 26, 2014
The user still receives a page of HTML and CSS, and then JavaScript is loaded.
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!
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.
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...
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.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!
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!
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.
It sounds like an amazing place to work!