<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Disqus - Latest Comments for developit</title><link>http://disqus.com/by/developit/</link><description></description><atom:link href="http://disqus.com/developit/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Mon, 19 Apr 2021 16:29:23 -0000</lastBuildDate><item><title>Re: ESP32 Development board-WT32-SC01</title><link>https://www.seeedstudio.com/ESP32-Development-board-WT32-SC01-p-4735.html#comment-5351238151</link><description>&lt;p&gt;There is an english manual now:&lt;br&gt;&lt;a href="http://www.wireless-tag.com/wp-content/uploads/2021/01/WT32-SC01DataSheetV3.3-2-with-nuts.pdf" rel="nofollow noopener" target="_blank" title="http://www.wireless-tag.com/wp-content/uploads/2021/01/WT32-SC01DataSheetV3.3-2-with-nuts.pdf"&gt;http://www.wireless-tag.com...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Mon, 19 Apr 2021 16:29:23 -0000</pubDate></item><item><title>Re: Real sleep() in JavaScript</title><link>https://jasonformat.com/javascript-sleep/#comment-5289219371</link><description>&lt;p&gt;No - that yields to the event loop for 5000ms. It "pauses" the calling function only, allowing any other code to run (timers, other promises, etc). It also only works for async functions.&lt;/p&gt;&lt;p&gt;To clarify: 99.9% of the time async/await is exactly what you want. This blog post is about implementing global deadlocks in JS - not something you'd ever do in an application, but a low-level technique that can be used to pause Web Workers.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Tue, 02 Mar 2021 18:59:44 -0000</pubDate></item><item><title>Re: Modern Script Loading</title><link>https://jasonformat.com/modern-script-loading/#comment-5035392334</link><description>&lt;p&gt;If you're loading scripts for client side navigation, you can use any mechanism you want to test for modernness. To use module/nomodule, just check for `'noModule' in script`.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Tue, 18 Aug 2020 12:33:54 -0000</pubDate></item><item><title>Re: Rome, a new JavaScript Toolchain</title><link>https://jasonformat.com/rome-javascript-toolchain/#comment-4814674763</link><description>&lt;p&gt;Not like a boilerplate, no. Boilerplates are an awful way to consume tools. When you start with a boilerplate, 100% of the code becomes yours to maintain - you never get updates or improvements, and you're stuck with those decisions forever.&lt;/p&gt;&lt;p&gt;I would say a closer comparison might be to something like Angular CLI, except Rome is an entirely new tool rather than an amalgamation of existing tools.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Fri, 28 Feb 2020 17:30:44 -0000</pubDate></item><item><title>Re: Rome, a new JavaScript Toolchain</title><link>https://jasonformat.com/rome-javascript-toolchain/#comment-4814475471</link><description>&lt;p&gt;It's a from-scratch implementation, and does much more than a bundler does. You can think of Rome as a single tool that does what (Webpack+ESLint+TypeScript+Babel+Jest+Prettier) do.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Fri, 28 Feb 2020 14:51:28 -0000</pubDate></item><item><title>Re: Evaluating JavaScript code via import()</title><link>http://www.2ality.com/2019/10/eval-via-import.html#comment-4640519502</link><description>&lt;p&gt;Just a note - it's better to use a Blob URL for this, to avoid the Base64 conversion. It may also help with bytecode caching (can't confirm).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Fri, 04 Oct 2019 17:26:51 -0000</pubDate></item><item><title>Re: Enabling Modern JavaScript on npm</title><link>https://jasonformat.com/enabling-modern-js-on-npm/#comment-4603612551</link><description>&lt;p&gt;I think this could potentially work, except many bundlers either don't transpile node_modules, or treat package.browser as a hint that code is already transpiled for (legacy) browser support.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Tue, 03 Sep 2019 23:11:44 -0000</pubDate></item><item><title>Re: Modern Script Loading</title><link>https://jasonformat.com/modern-script-loading/#comment-4540251213</link><description>&lt;p&gt;I'm working on a whole post about this! Modules are supported in a bunch of browsers that have varying degrees of roughly ES2017 support: Edge 16, Firefox 60, Chrome 61 and Safari 10.3. This means you still need to transpile very new syntax (class fields and property initializers).&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Mon, 15 Jul 2019 09:05:57 -0000</pubDate></item><item><title>Re: Modern Script Loading</title><link>https://jasonformat.com/modern-script-loading/#comment-4540248696</link><description>&lt;p&gt;Solutions like shimport don't transform new syntax for older browsers, they just polyfill ES Modules via eval. Shimport is great, but it's not a way to load modern syntax in old browsers.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Mon, 15 Jul 2019 09:03:22 -0000</pubDate></item><item><title>Re: Modern Script Loading</title><link>https://jasonformat.com/modern-script-loading/#comment-4540247118</link><description>&lt;p&gt;Preloading via &lt;code&gt;&amp;lt;link rel="preload" href=".." as="script" crossorigin=""&amp;gt;&lt;/code&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Mon, 15 Jul 2019 09:01:45 -0000</pubDate></item><item><title>Re: Modern Script Loading</title><link>https://jasonformat.com/modern-script-loading/#comment-4540246305</link><description>&lt;p&gt;@Wout Mertens Preloading has to be done using static HTML in order to be effective, since the preload scanner only looks at the HTML as it is being tokenized.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Mon, 15 Jul 2019 09:00:57 -0000</pubDate></item><item><title>Re: Modern Script Loading</title><link>https://jasonformat.com/modern-script-loading/#comment-4536086720</link><description>&lt;p&gt;The problem is that Service Workers aren't there to rewrite requests on first load.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Thu, 11 Jul 2019 16:38:21 -0000</pubDate></item><item><title>Re: Enabling Modern JavaScript on npm</title><link>https://jasonformat.com/enabling-modern-js-on-npm/#comment-4498345789</link><description>&lt;p&gt;I'd like to keep conjecture and personal attacks out of this discussion if possible.&lt;/p&gt;&lt;p&gt;Sindre is in a position to effect widespread change on npm package consumption, and as the most prolific author on npm that's his decision to make. Consider the opposite of the complaints lobbied here:  if you were using a bundler or technique that only supported ES Modules, you could argue that Sindre not updating his packages is equally frustrating.  Ultimately, he has the same goal I and many others do: moving the ecosystem past a difficult blockade so it can continue to grow.&lt;/p&gt;&lt;p&gt;His point of leverage is the thousands of modules he maintains. Nobody has stepped up to help him make this push in a way that works for both maintainer and consumer, and eventually packages need to be moved forward. I know this because I have personally offered to do so, but so far I have failed to deliver.  It's exceptionally time-consuming to maintain so many packages even without the added overhead of complex or slow build steps for every publish.  It also makes testing slower and more difficult, since both the original and transpiled source must be tested in order to ensure packages don't break in one format but not another (I've personally had this happen and now test built files as I do source).&lt;/p&gt;&lt;p&gt;Regarding ads: remember that Open Source is not the same as free. Sindre's output is sustainable only because he works full-time on Open Source, and he is only able to do so through sponsorship. He makes it work, but maintenance at that scale is not a burden I would wish on anyone.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Tue, 11 Jun 2019 14:47:42 -0000</pubDate></item><item><title>Re: Enabling Modern JavaScript on npm</title><link>https://jasonformat.com/enabling-modern-js-on-npm/#comment-4484111477</link><description>&lt;p&gt;My guess is that detection will prove extremely difficult and error prone, however I'm super interested in collaborating if you're open to it!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Fri, 31 May 2019 10:49:38 -0000</pubDate></item><item><title>Re: UMD is Dead! Long Live UMD!</title><link>https://jasonformat.com/umd-is-dead-long-live-umd/#comment-4339892905</link><description>&lt;p&gt;Not sure I follow your second point. FWIW this post is about library build target formats, not application code.&lt;/p&gt;&lt;p&gt;I do agree this post is miopic though, and we've since added a dedicated UMD bundle to Preact (about which this was originally written). We still ship ES Modules and CJS/globals by default though. Most folks using UMD directly are copying modules out of node_modules and that process requires a filename anyway. I've been in the habit of adding a `"umd:main"` field to packages, and Microbundle has always done this by default. That seems like the right compromise to make: ship UMD, but don't point to it as the default.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Fri, 15 Feb 2019 21:16:21 -0000</pubDate></item><item><title>Re: Application Holotypes: A Guide to Architecture Decisions</title><link>https://jasonformat.com/application-holotypes/#comment-4339199592</link><description>&lt;p&gt;Think that represents a single grouping? I am tempted to add Salesforce as a holotype, but it's actually more of a platform for building types of apps.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Fri, 15 Feb 2019 12:38:23 -0000</pubDate></item><item><title>Re: Color Cycling with Workers</title><link>https://daverupert.com/2018/09/color-cycling-image-pixels-with-workers/#comment-4087965129</link><description>&lt;p&gt;Two things I notice that seem like they could be low-hanging optimization fruit here:&lt;/p&gt;&lt;p&gt;1. what about only passing the imageData object into the Worker once? The worker sends it back to the main thread, so it knows the pixel values that will be passed down on the next iteration of its loop.&lt;br&gt;2. Passing the ImageData as a &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Transferable" rel="nofollow noopener" target="_blank" title="https://developer.mozilla.org/en-US/docs/Web/API/Transferable"&gt;Transferrable&lt;/a&gt; here would likely result in a considerable speedup.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Mon, 10 Sep 2018 13:42:54 -0000</pubDate></item><item><title>Re: Universal VDOM Components with factory-loader</title><link>https://jasonformat.com/universal-vdom-components-with-factory-loader/#comment-3223371777</link><description>&lt;p&gt;Ah - I totally could have made it clearer, but this doesn't require Webpack at all. You can always just import the factory and call it yourself. Webpack just makes that part automatic.  Still, you're right in a sense - the adoption depending on Webpack to make things easy is not great.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Sat, 25 Mar 2017 16:10:41 -0000</pubDate></item><item><title>Re: Props Down, Events Up</title><link>https://jasonformat.com/props-down-events-up/#comment-3202687415</link><description>&lt;p&gt;Yup, it's just decko.  You can declare those methods/properties however you like though:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;br&gt;// using class property initializer methods:&lt;br&gt;class Child extends Component {  &lt;br&gt;  handleInput = (e) =&amp;gt; {&lt;br&gt;    let text = e.target.value;&lt;br&gt;    this.props.onInput({ text });&lt;br&gt;  };&lt;br&gt;  render({ text }) {&lt;br&gt;    return &amp;lt;input value="{text}" oninput="{this.handleInput}"/&amp;gt;;&lt;br&gt;  }&lt;br&gt;}&lt;br&gt;&lt;br&gt;// or bind in the constructor:&lt;br&gt;class Child extends Component {&lt;br&gt;  constructor(props, context) {&lt;br&gt;    super(props, context);&lt;br&gt;    this.handleInput = this.handleInput.bind(this);&lt;br&gt;  }&lt;br&gt;  handleInput(e) {&lt;br&gt;    let text = e.target.value;&lt;br&gt;    this.props.onInput({ text });&lt;br&gt;  }&lt;br&gt;  render({ text }) {&lt;br&gt;    return &amp;lt;input value="{text}" oninput="{this.handleInput}"/&amp;gt;;&lt;br&gt;  }&lt;br&gt;}&lt;br&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Personally I prefer Decko because it performs better than the alternatives, but class property initializer methods are actually what I end up using most of the time because there's no library needed.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Mon, 13 Mar 2017 18:04:56 -0000</pubDate></item><item><title>Re: Fun hacks for faster content</title><link>http://jakearchibald.com/2016/fun-hacks-faster-content#comment-3038553852</link><description>&lt;p&gt;Perhaps something to do with streaming being more tolerant of packet loss or something? They would delay fully buffered content, but only affect yet-to-be-streamed content.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Tue, 06 Dec 2016 09:56:51 -0000</pubDate></item><item><title>Re: Converting a Node List to an Array – JS Tips – A JS tip per day!</title><link>http://www.jstips.co/en/converting-a-node-list-to-an-array/#comment-3020098008</link><description>&lt;p&gt;Is that with Babel transpiling turned on?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Fri, 25 Nov 2016 13:21:24 -0000</pubDate></item><item><title>Re: Hidden Class - JS MythBusters_</title><link>https://mythbusters.js.org/v8-tips/hidden-class.html#comment-2948501873</link><description>&lt;p&gt;It's worth noting, instantiating a class and assigning properties in a constructor is now slower than a factory method that returns plain Objects of uniform shape.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Thu, 13 Oct 2016 10:37:35 -0000</pubDate></item><item><title>Re: My ES2015 + LESS Webpack Setup</title><link>http://www.jasonformat.com/my-webpack-boilerplate/#comment-2795824006</link><description>&lt;p&gt;Just import your .less files (or an &lt;code&gt;index.less&lt;/code&gt; that imports them all) from JavaScript.&lt;br&gt;For example, you might have this at the top of your &lt;code&gt;src/index.js&lt;/code&gt;:&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;br&gt;import 'less/index.less';&lt;br&gt;&lt;/code&gt;&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Thu, 21 Jul 2016 14:21:06 -0000</pubDate></item><item><title>Re: WTF is JSX</title><link>http://www.jasonformat.com/wtf-is-jsx/#comment-2617010943</link><description>&lt;p&gt;Hmm - concat() is being used to flatten nested arrays. akin to:&lt;br&gt;&lt;/p&gt;&lt;pre&gt;&lt;code&gt;&lt;br&gt;concat( ...[ ['a'], ['b','c'] ] ) == ['a','b','c']&lt;br&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Just using the spread would yield &lt;code&gt;[ ['a'], ['b', 'c'] ]&lt;/code&gt;.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Sun, 10 Apr 2016 22:15:24 -0000</pubDate></item><item><title>Re: Converting a Node List to an Array – JS Tips – A JS tip per day!</title><link>http://www.jstips.co/en/converting-a-node-list-to-an-array/#comment-2500112852</link><description>&lt;p&gt;Great post! Might be worth noting that the Array.apply() approach is quite a bit slower than simply looping over keys: &lt;a href="http://esbench.com/bench/5660cd9745df6895002e01c0" rel="nofollow noopener" target="_blank" title="http://esbench.com/bench/5660cd9745df6895002e01c0"&gt;http://esbench.com/bench/56...&lt;/a&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">developit</dc:creator><pubDate>Sat, 06 Feb 2016 18:03:22 -0000</pubDate></item></channel></rss>