#frontend-tech

2017-06-01
jihchi 11:26:55
twitter
Become a <https://twitter.com/code|@code> expert with these cheat sheets. Win: <https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf> Mac: <https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf> Linux: <https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf> <https://pbs.twimg.com/media/DBLCekkUQAA1vM-.jpg>
alvinyen219 16:01:30
@alvinyen219 has joined the channel
jihchi 22:47:08
GitHub
feather - Simply beautiful open source icons
  • 1
2017-06-02
jihchi 09:05:53
twitter
DevTools Tip: :zap: Before your tab runs out of memory and crashes, DevTools will automatically pause the JavaScript so you can start analysing <https://pbs.twimg.com/media/DBPSPwDXsAMSqYQ.png>
jihchi 09:07:28
twitter
TIL Yarn is fully deterministic **only** if all your teammates are using the **exact** same Yarn version. :flushed: (npm5+ doesn't have that caveat) <https://pbs.twimg.com/media/DBP_widV0AAvICn.jpg>
jihchi: 原文連結:https://yarnpkg.com/blog/2017/05/31/determinism/

看了半天還是無法理解 hoisting 會如何影響 determinism QQ
看起來 yarn.lock 比 npm5 的 package-lock.json 還多了 dependencies 吧
package-lock.json 完全就是 hoist 過的 list of dependencies + versions 而已?
剛看到某個 twitte 寫 yarn.lock lightwight,package-lock.json reliable
我還沒看這篇 yarn determinism,queue 還沒消化完
mrorz 10:15:19
jihchi: 原文連結:https://yarnpkg.com/blog/2017/05/31/determinism/

看了半天還是無法理解 hoisting 會如何影響 determinism QQ
Yarn
One of the claims that Yarn makes is that it makes your package management “deterministic”. But what exactly does this mean? This blog post highlights how bo...
mrorz 10:16:37
看起來 yarn.lock 比 npm5 的 package-lock.json 還多了 dependencies 吧
package-lock.json 完全就是 hoist 過的 list of dependencies + versions 而已?
jihchi 10:17:18
剛看到某個 twitte 寫 yarn.lock lightwight,package-lock.json reliable
jihchi 10:17:54
我還沒看這篇 yarn determinism,queue 還沒消化完
jihchi 18:14:37
twitter
Microsoft language server for OCaml &amp; Reason! <https://github.com/freebroccolo/ocaml-language-server/>
2017-06-03
jihchi 09:58:54
Hacker Noon
This week I attended my first TC-39 meeting. For those unaware, TC-39 is the designator of the ECMA working group that defines the…
yhsiang 14:41:24
twitter
Kotlin with react <http://buff.ly/2qHbz1r>
  • 👍2
2017-06-04
jihchi 13:15:09
twitter
Thanks <https://twitter.com/arunoda|@arunoda> for creating <https://learnnextjs.com>. Short, addresses the main pain points, and so engaging!
jihchi 13:17:05
eBay Tech Berlin
A Tale of Adventure, Ambition and JavaScript Unit Tests
天啊我剛好正有個專案需要 migrate
感謝 @jihchi m(_ _)m
jihchi 13:17:58
twitter
The slides &amp; code examples of my React state management with #Redux &amp; #MobX workshop now available on the interwebs: <https://github.com/infinum/shift-2017>
jihchi 13:27:46
GitHub
slap - Sublime-like terminal-based text editor
這有 vim mode 嗎(慢著
發現打中文會變成問號
試用之後覺得不好用 …
jihchi 13:29:48
javascript.info
Modern JavaScript Tutorial: simple, but detailed explanations with examples and tasks, including: closures, document and events, object oriented programming and more.
jihchi 22:41:27
GitHub
bonsai - Understand the tree of dependencies inside your webpack bundles, and trim away the excess.
2017-06-05
mrorz 10:29:53
天啊我剛好正有個專案需要 migrate
感謝 @jihchi m(_ _)m
mrorz 10:49:10
這有 vim mode 嗎(慢著
mrorz 10:50:06
發現打中文會變成問號
jihchi 11:28:44
試用之後覺得不好用 …
2017-06-06
jihchi 09:03:59
twitter
Chrome 59 shipping to stable means Headless Chrome is now available everywhere! :facepunch: <https://chromereleases.googleblog.com/> Learn it: <https://developers.google.com/web/updates/2017/04/headless-chrome>
What’s New In DevTools (Chrome 59)

* CSS and JS code coverage. Find unused CSS and JS with the new Coverage tab.
* Full-page screenshots. Take a screenshot of the entire page, from the top of the viewport to the bottom.
* Block requests. Manually disable individual requests in the Network panel.
* Step over async await. Step through async functions predictably.
* Unified Command Menu. Execute commands and open files from the newly-unified Command Menu.

https://developers.google.com/web/updates/2017/04/devtools-release-notes
jihchi 09:04:49
twitter
React's API is actually quite significant - This cheat sheet has a number o calls that you may find useful <http://buff.ly/2sy4X5G> #react
jihchi 09:07:47
twitter
:fire::hearts: Best way to start off Monday morning? :hearts::fire: #webpack 3.0.0-RC.0 :white_check_mark: SCOPE HOISTING Profile, Test, Report:bug:, Share, RT RT RT :fire:! #JavaScript <https://pbs.twimg.com/media/DBkPYhYUAAQEoiD.jpg>
jihchi 09:09:24
twitter
Don’t use parseInt to convert to int: &gt; parseInt(0.0000008,10) 8 Why? Coerces to str: &gt; String(0.0000008) '8e-7' <http://speakingjs.com/es5/ch11.html#parseInt>
jihchi 09:10:20
twitter
:sparkles:Wrote a new blog post :sparkles: Locally Scoped CSS Variables: What, How, and Why <https://una.im/local-css-vars/> :blush: Lots of content in that one :blush:
原來可以用 JS 給 CSS variable 賦值!!
> This is similar to JavaScript variables instantiated with the let keyword, which take the scope of their containing block ({}) (aka block scope).

這個部分感覺不太精確,我測試的結果是,custom property 的 scope 是在那個被選中的元素上有效,與 CSS declaration 的 `{ }` 無關。

例如說,如果某個元素套上了個 css,設定 `--foo: red;`
那如果該元素又套上另一些 css property 用到了 `var(--foo)`,那就會吃到 `red`。

http://jsbin.com/raxakicare/edit?html,css,output
不過整篇文讓我學到不少,css custom property 真的完全與過去的 preprocessor variables 強超級無敵多。
👍
jihchi 09:11:34
twitter
:tada: Super excited about this! CRRA now has a CLI. Run: yarn create reason-react-app MyApp More coming very soon! <https://github.com/knowbody/crra> <https://pbs.twimg.com/media/DBk2Gu4WAAAvvRi.jpg>
jihchi 09:14:37
twitter
Reasons to love Reason: <http://buff.ly/2rysJPU> #ReactJS #JavaScript <https://pbs.twimg.com/media/DBiKbxFXgAMBnjD.png>
jihchi 09:16:26
twitter
This is a cool trick for conditional rendering in JSX :sunglasses: <https://pbs.twimg.com/media/DBlYb2GXUAAtCxt.jpg>
挺有創意的
但果可以我還是考慮 syntax 解 lol
通常要用時候更複雜,我現在就都改用 IIFE
對耶這樣就不用 do expression
我之前是用 do expression 沒錯,但是要求比較低的 stage 就放棄。
mrorz 10:08:13
挺有創意的
但果可以我還是考慮 syntax 解 lol
jihchi 10:08:53
通常要用時候更複雜,我現在就都改用 IIFE
mrorz 10:10:30
原來可以用 JS 給 CSS variable 賦值!!
mrorz 10:20:46
> This is similar to JavaScript variables instantiated with the let keyword, which take the scope of their containing block ({}) (aka block scope).

這個部分感覺不太精確,我測試的結果是,custom property 的 scope 是在那個被選中的元素上有效,與 CSS declaration 的 `{ }` 無關。

例如說,如果某個元素套上了個 css,設定 `--foo: red;`
那如果該元素又套上另一些 css property 用到了 `var(--foo)`,那就會吃到 `red`。

http://jsbin.com/raxakicare/edit?html,css,output
mrorz 10:32:46
不過整篇文讓我學到不少,css custom property 真的完全與過去的 preprocessor variables 強超級無敵多。
jihchi 10:33:36
👍
mrorz 10:56:24
對耶這樣就不用 do expression
jihchi 10:57:28
我之前是用 do expression 沒錯,但是要求比較低的 stage 就放棄。
mrorz 13:44:40
Replied to a thread: 2017-06-06 09:03:59
What’s New In DevTools (Chrome 59)

* CSS and JS code coverage. Find unused CSS and JS with the new Coverage tab.
* Full-page screenshots. Take a screenshot of the entire page, from the top of the viewport to the bottom.
* Block requests. Manually disable individual requests in the Network panel.
* Step over async await. Step through async functions predictably.
* Unified Command Menu. Execute commands and open files from the newly-unified Command Menu.

https://developers.google.com/web/updates/2017/04/devtools-release-notes
  • 👍3
  • 💯1
mrorz 13:44:40
twitter
Chrome 59 shipping to stable means Headless Chrome is now available everywhere! :facepunch: <https://chromereleases.googleblog.com/> Learn it: <https://developers.google.com/web/updates/2017/04/headless-chrome>
* CSS and JS code coverage. Find unused CSS and JS with the new Coverage tab. * Full-page screenshots. Take a screenshot of the entire page, from the top of the viewport to the bottom. * Block requests. Manually disable individual requests in the Network panel. * Step over async await. Step through async functions predictably. * Unified Command Menu. Execute commands and open files from the newly-unified Command Menu. <https://developers.google.com/web/updates/2017/04/devtools-release-notes>
wuct 17:42:48
coverage tab 好像不錯
jihchi 17:45:13
` Find unused CSS and JS` 超吸引人
wuct 17:51:11
剛玩了一下,真的很方便,馬上可以看出哪裡要先做 lazy loading
jihchi 17:52:07
👍
jihchi 18:02:02
stable 59
只有我在用 Canary 嗎 xd
我也有用,備用
2017-06-07
Michael Hsu 09:29:26
59 這幾個真實用!
kcliu 10:25:52
只有我在用 Canary 嗎 xd
jihchi 10:52:26
我也有用,備用
jihchi 10:55:55
twitter
I look away for a few weeks and TypeScript &amp; CSS comes to prettier, and now even GraphQL is being merged in <https://github.com/prettier/prettier/pull/2005>
jihchi 10:57:43
twitter
I just published “Classes, Complexity, and Functional Programming” <https://medium.com/p/classes-complexity-and-functional-programming-a8dd86903747>
jihchi 11:00:57
twitter
Should you start using <https://twitter.com/reasonml|@reasonml> today in your project? <https://twitter.com/_chenglou|@_chenglou> answers. Whole Q&amp;A's here <https://www.youtube.com/watch?v=BvHxlVlse-g>
jihchi 11:01:22
twitter
How would a Xenomorph wear a hat? :thinking_face: <https://pbs.twimg.com/media/DBqLbIsU0AAST_B.jpg>
jihchi 17:11:46
yo改
jihchi 19:27:16
https://twitter.com/metrobundler/status/872120701125357568

底下留言戰 webpack: its extremely slow...
twitter
react-native-packager is now Metro Bundler Splitting off from React Native allows us to support the community better <https://github.com/facebook/metro-bundler>
jihchi 19:28:40
https://twitter.com/wsokra/status/872353199818244096

原圖有 typo 喔!用底下留言的圖
twitter
you want to make a #webpack poster...? <https://pbs.twimg.com/media/DBs4YrkXsAEsTOx.png>
jihchi 22:31:22
GitHub
Best-websites-a-programmer-should-visit - :link: Some useful websites for programmers.
jihchi 22:33:11
試的結果是原始內文會被 archive 起來 ..
Jih-Chi Lee
yo改
2017-06-08
jihchi 08:46:50
twitter
Adopting Flow &amp; TypeScript: A comparison between the two on-boarding processes <https://medium.com/the-thinkmill/adopting-flow-typescript-3549a3a36d51>
jihchi 08:47:22
twitter
"ok let's see about this package 404 error message issue..." ARE YOU FUCKING SERIOUS? <https://pbs.twimg.com/media/DBvth3yVwAA6qAH.jpg>
jihchi 08:48:27
https://twitter.com/guybedford/status/872547059429253121

I've enjoyed experimenting with WebAssembly recently. Excited to share what I've learned in this new egghead course.
twitter
I've enjoyed experimenting with WebAssembly recently. Excited to share what I've learned in this new egghead course. <https://egghead.io/courses/introduction-to-webassembly?utm_source=drip&amp;utm_medium=email&amp;utm_content=web-assembly-intro>
jihchi 08:51:39
https://twitter.com/wsokra/status/872416959928860672

A few bugfixes for Scope Hoisting. Seems like webpack 3 is ready...
twitter
A few bugfixes for Scope Hoisting. Seems like webpack 3 is ready... <https://pbs.twimg.com/media/DBtyb2_XgAABz1B.jpg>
jihchi 08:53:08
https://twitter.com/malyw/status/872462329027469315

You can start using ECMAScript modules in Node.js today!
Just "require('@​std/esm')" and that's it.
github.com/standard-thing
twitter
You can start using ECMAScript modules in Node.js today! Just "require('@​std/esm')" and that's it. <https://github.com/standard-things/esm> <https://pbs.twimg.com/media/DBubCjIXUAANELq.jpg>
jihchi 08:54:07
twitter
Async functions are started sync, settled async: <http://exploringjs.com/es2016-es2017/ch_async-functions.html#_async-functions-are-started-synchronously-settled-asynchronously> <https://pbs.twimg.com/media/DBtUClUXcAEqlHD.jpg>
jihchi 08:54:42
twitter
[Updated] An overview of callable entities in JavaScript. <https://pbs.twimg.com/media/DBu18acWsAAD4Nh.jpg>
jihchi 08:55:54
https://twitter.com/thejameskyle/status/872474885775163392

JavaScript’s new #private class fields: What they are, how they work, and why they are the way they are
twitter
JavaScript’s new #private class fields: What they are, how they work, and why they are the way they are <https://medium.com/the-thinkmill/javascripts-new-private-class-fields-93106e37647a>
jihchi 08:56:33
https://twitter.com/jaredcobb/status/872192437350957056

Front end development in a nutshell...

#javascript #angularjs #reactjs #VueJS #backbone #webdev
twitter
Front end development in a nutshell... #javascript #angularjs #reactjs #VueJS #backbone #webdev
jihchi 08:59:20
https://twitter.com/mikeal/status/872578292351508480

We looked at the data, docs are the most important thing, here's how you can improve them in your project.
twitter
We looked at the data, docs are the most important thing, here's how you can improve them in your project. <https://medium.com/@mikeal/docs-docs-docs-1e06d17fa06f>
jihchi 09:02:53
https://twitter.com/masteringvim/status/872536296564166658

太有趣了!竟然 patch 教人如何離開 Vim。讀了才發現,並不是 :q! 這麼簡單⋯
twitter
patch 8.0.0609: some people still don't know how to quit Vim :) <https://github.com/vim/vim/commit/28a8193e3113f676f89fb6312b099d849df881d3>
ralflin 10:21:19
@ralflin has joined the channel
bebeboboha 14:55:13
@bebeboboha has joined the channel
joseph2068 18:02:29
@joseph2068 has joined the channel
chris_wang 18:12:44
@chris_wang has joined the channel
jihchi 19:01:29
twitter
If you're going to teach functional programming, have them start with imperative code. Good stuff from <https://twitter.com/bahmutov|@bahmutov> <https://glebbahmutov.com/blog/how-to-draw-an-owl/>
2017-06-09
jihchi 08:44:08
https://twitter.com/chanezon/status/872568475541159936

github.com/containerd/con… "This means that different users, such as SwarmKit, K8s, Docker and others can use containerd without coordination"
twitter
<https://github.com/containerd/containerd/pull/963> "This means that different users, such as SwarmKit, K8s, Docker and others can use containerd without coordination"
jihchi 08:46:38
https://twitter.com/rvagg/status/872773786948354048

Hot off the compilers, @nodejs 8.1.0 available now @ nodejs.org/en/blog/releas…, new npm & libuv + some sweet fixes
twitter
Hot off the compilers, <https://twitter.com/nodejs|@nodejs> 8.1.0 available now @ <https://nodejs.org/en/blog/release/v8.1.0/>, new npm &amp; libuv + some sweet fixes
jihchi 08:49:26
https://twitter.com/code/status/872934501785022464

It's that time - enjoy the @code May update. Rolling out now, download code.visualstudio.com/download. See what's new: code.visualstudio.com/updates/v1_13
twitter
It's that time - enjoy the <https://twitter.com/code|@code> May update. Rolling out now, download <http://code.visualstudio.com/download>. See what's new: <http://code.visualstudio.com/updates/v1_13> <https://pbs.twimg.com/media/DB1IuogUIAE_vYO.jpg>
jihchi: explorer 裡各種 icon 眼花撩亂 XD
精美~
jihchi 08:52:37
https://twitter.com/mweststrate/status/872872085491679232

Very interesting way of organizing #mobx @reactjs applications: mobdux:
twitter
Very interesting way of organizing #mobx <https://twitter.com/reactjs|@reactjs> applications: mobdux: <https://medium.com/@cameronfletcher92/mobdux-combining-the-good-parts-of-mobx-and-redux-61bac90ee448>
mrorz 11:04:22
jihchi: explorer 裡各種 icon 眼花撩亂 XD
jihchi 12:09:47
精美~
jihchi 19:01:16
Medium
The code has been cracked for a long time now for server-side rendering and code-splitting individually. Until now — bar Next.js — there…
2017-06-10
jihchi 23:59:59
GitHub
awesome-design-systems - :nail_care::skin-tone-2: :hammer_and_pick: A collection of awesome design systems
2017-06-11
jihchi 00:00:52
GitHub
now-ui-kit - Now UI Kit Bootstrap 4 - Designed by Invision. Coded by Creative Tim
jihchi 00:01:52
vscode 的 vim multi-cursor mode 蠻 buggy 的 ..
mrorz 02:08:31
我 vscode 是用 vimStyle
然後沒在用 vim multi-cursor mode
jihchi 16:36:22
我是用 Welcome 頁的 Vim ( https://marketplace.visualstudio.com/items?itemName=vscodevim.vim ),功能蠻多的
marketplace.visualstudio.com
Extension for Visual Studio Code - Vim emulation for Visual Studio Code
2017-06-12
jihchi 08:46:34
https://twitter.com/bobzhang1988/status/873209497287876608

I will be more focused on BuckleScript and @reasonml since next month, lets push a real world functional language into mainstream together!
twitter
I will be more focused on BuckleScript and <https://twitter.com/reasonml|@reasonml> since next month, lets push a real world functional language into mainstream together!
jihchi 08:48:43
https://twitter.com/sebmck/status/873958247304232961

Yarn tip: You can alias a package by using `yarn add fake-name@npm:left-pad`. Now you can use `require("fake-name")` to require left-pad.

Notice: yarn only
twitter
Yarn tip: You can alias a package by using `yarn add fake-name@npm:left-pad`. Now you can use `require("fake-name")` to require left-pad. <https://pbs.twimg.com/media/DCDsCxJV0AAXOiV.jpg>
jihchi 08:49:25
twitter
['a',,'c'] Node: [ 'a', &lt;1 empty item&gt;, 'c' ] Chrome: ["a", undefined × 1, "c"] FF: [ "a", &lt;1 empty slot&gt;, "c" ] Safari: ["a", 2: "c"]
jihchi 08:50:51
twitter
Here's a compelling approach to organizing your React apps: tldr: Hierarchy of specificity. <http://buff.ly/2r66bF3> #reactjs
jihchi 08:51:19
twitter
React encourages you to think in terms of pure functions. That's a good thing. Here's why: <http://buff.ly/2sox9vn> #reactjs
jihchi 08:55:47
twitter
Hey #webpack #javascript: if u haven't used hard-source-webpack-plugin now's the time. These new changes should rly help build speed perf,:fire: <https://twitter.com/zofgames/status/873633577187115008>
twitter
Published hard-source-webpack-plugin v0.4.0 <https://github.com/mzgoddard/hard-source-webpack-plugin/blob/master/CHANGELOG.md#040> with low level resolver cache, default options, and way to replace lvldb
Michael Hsu 21:54:56
twitter
We're excited to announce that ESLint v4.0.0 has been released! <http://eslint.org/blog/2017/06/eslint-v4.0.0-released>
jihchi 23:23:26
GitHub
Probable-Wordlists - Wordlists sorted by probability originally created for password generation and testing
jihchi 23:24:42
GitHub
gun - A realtime, decentralized, offline-first, graph database engine.
jihchi 23:25:14
GitHub
flubber - Tools for smoother shape animations.
jihchi 23:26:32
naver.github.io
Re-usable easy interface JavaScript chart library, based on D3 v4+
2017-06-13
mark 03:28:38
@mark has joined the channel
jihchi 08:52:35
twitter
New ReasonReact version released! <https://reasonml.github.io/reason-react/>
jihchi 08:53:03
https://twitter.com/am_i_tom/status/874351229991886848

#fantasyland 16 is out! Extend: dragon slaying, rebuilding React, weather analysis, and a LOT of sneaky peeking! :) tomharding.me/2017/06/12/fan
twitter
#fantasyland 16 is out! Extend: dragon slaying, rebuilding React, weather analysis, and a LOT of sneaky peeking! :) <http://www.tomharding.me/2017/06/12/fantas-eel-and-specification-16/>
jihchi 08:56:54
https://twitter.com/housecor/status/874261781086130177

#fantasyland 16 is out! Extend: dragon slaying, rebuilding React, weather analysis, and a LOT of sneaky peeking! :) tomharding.me/2017/06/12/fan
twitter
Great short post: React State vs. Redux State: When and Why? <http://buff.ly/2rNQYLM> #reactjs
2017-06-14
jihchi 08:43:34
https://twitter.com/reactjs/status/874766857793712129

We just released React 15.6.0. Enjoy some bug fixes and improvements to warnings. Thanks to all contributors!
twitter
We just released React 15.6.0. Enjoy some bug fixes and improvements to warnings. Thanks to all contributors! <https://facebook.github.io/react/blog/2017/06/13/react-v15.6.0.html>
jihchi 08:47:54
https://twitter.com/_chenglou/status/874752000549937153

I just published “Cool Things Reason Formatter Does” medium.com/p/cool-things-
twitter
I just published “Cool Things Reason Formatter Does” <https://medium.com/p/cool-things-reason-formatter-does-9e1f79e25a82>
jihchi 08:49:12
https://twitter.com/samccone/status/874687075269738496

I just published “Cool Things Reason Formatter Does” medium.com/p/cool-things-
twitter
yarn add chrome-launcher const chrome = await require('chrome-launcher').launch(); await chrome.kill(); <https://github.com/GoogleChrome/lighthouse/tree/master/chrome-launcher> :star2: \o/ :star2:
jihchi 08:51:14
https://twitter.com/thekitze/status/874584471835639808

I just published “Cool Things Reason Formatter Does” medium.com/p/cool-things-
twitter
I just published “:zap: From React to an Electron app ready for production” <https://medium.com/p/%EF%B8%8F-from-react-to-an-electron-app-ready-for-production-a0468ecb1da3>
jihchi 18:46:05
奇怪,我內文應該沒有拷貝錯誤才對⋯⋯
jihchi 18:48:34
https://twitter.com/thelarkinn/status/874802611052064769

🚨🔥How to use #webpack "magic comments"! Thanks @faceyspacey for submitting to our publication. RT!! 😍🔥 #javascript
twitter
:rotating_light::fire:How to use #webpack "magic comments"! Thanks <https://twitter.com/faceyspacey|@faceyspacey> for submitting to our publication. RT!! :heart_eyes::fire: #javascript <https://medium.com/webpack/how-to-use-webpacks-new-magic-comment-feature-with-react-universal-component-ssr-a38fd3e296a>
jihchi 18:49:13
https://twitter.com/bahmutov/status/874868648468467720

“TDD? Waste of time!” by ReactiveConf blog.reactiveconf.com/tdd-waste-of-t… - not sure I agree, but the testing icecream cone looks delicious
twitter
“TDD? Waste of time!” by ReactiveConf <https://blog.reactiveconf.com/tdd-waste-of-time-7bf5a84ce9b6> - not sure I agree, but the testing icecream cone looks delicious
jihchi 18:49:54
https://twitter.com/kurtiskemple/status/874620403452436480

I just published - “Implementing GraphQL at Major League Soccer”
twitter
I just published - “Implementing GraphQL at Major League Soccer” <https://labs.mlssoccer.com/implementing-graphql-at-major-league-soccer-ff0a002b20ca>
jihchi 18:54:27
https://twitter.com/lukeed05/status/874393730609848320

Just published! 🎉 CLI parser that's 2.5x faster than minimist & 20x faster than yargs-parser! Perfect for basic use:
twitter
Just published! :tada: CLI parser that's 2.5x faster than minimist &amp; 20x faster than yargs-parser! Perfect for basic use: <https://github.com/lukeed/mri#comparisons>
2017-06-15
jihchi 08:49:06
https://twitter.com/linclark/status/875018155235708929

That's part 2 of a 3-part series.

Part 1—A crash course in memory management: hacks.mozilla.org/2017/06/a-cras
twitter
That's part 2 of a 3-part series. Part 1—A crash course in memory management: <https://hacks.mozilla.org/2017/06/a-crash-course-in-memory-management/> <https://pbs.twimg.com/media/DCSwUGWW0AAASa9.jpg>
jihchi 08:49:22
https://twitter.com/linclark/status/875018430914670592

Part 2—A cartoon intro to ArrayBuffers and SharedArrayBuffers: hacks.mozilla.org/2017/06/a-cart
twitter
Part 2—A cartoon intro to ArrayBuffers and SharedArrayBuffers: <https://hacks.mozilla.org/2017/06/a-cartoon-intro-to-arraybuffers-and-sharedarraybuffers/> <https://pbs.twimg.com/media/DCSwmY0XkAAeXCR.jpg>
jihchi 08:49:37
https://twitter.com/linclark/status/875018720741085184

Part 3—Avoiding race conditions in SharedArrayBuffers with Atomics: hacks.mozilla.org/2017/06/avoidi
twitter
Part 3—Avoiding race conditions in SharedArrayBuffers with Atomics: <https://hacks.mozilla.org/2017/06/avoiding-race-conditions-in-sharedarraybuffers-with-atomics/> <https://pbs.twimg.com/media/DCSw27-W0AA4M8f.jpg>
jihchi 08:51:12
https://twitter.com/logrocketjs/status/874996023206313984

Recreating the Chrome Console in React using react-virtualized @brian_d_vaughn #ReactJS #Redux
twitter
Recreating the Chrome Console in React using react-virtualized <https://twitter.com/brian_d_vaughn|@brian_d_vaughn> #ReactJS #Redux <https://blog.logrocket.com/recreating-the-chrome-console-in-react-123d6c4aa930>
jihchi 08:52:38
https://twitter.com/thelarkinn/status/875116181056667648

Recreating the Chrome Console in React using react-virtualized @brian_d_vaughn #ReactJS #Redux
twitter
:fire::fire::heart_eyes: #webpack@3.0.0-rc.2 has been released!!! Hot off the presses needing YOUR HELP reporting :bug:s. Getting very close! #JavaScipt RT RT RT :heart_eyes::fire::fire: <https://pbs.twimg.com/media/DCUJhSNVwAEHUCX.jpg>
jihchi 08:54:52
https://twitter.com/ebidel/status/875009383142313984

“Automated testing with Headless Chrome” - developers.google.com/web/updates/20

Karma, Mocha+Chai, Headless, oh my! …and Travis.
twitter
“Automated testing with Headless Chrome” - <https://developers.google.com/web/updates/2017/06/headless-karma-mocha-chai> Karma, Mocha+Chai, Headless, oh my! …and Travis.
jihchi 08:56:08
https://twitter.com/ryanflorence/status/875110435615236096

Just published the "Philosophy" guide for React Router. Read it if routes as components still got you 🤔

reacttraining.com/react-router/w
twitter
Just published the "Philosophy" guide for React Router. Read it if routes as components still got you :thinking_face: <https://reacttraining.com/react-router/web/guides/philosophy>
jihchi 08:58:30
https://twitter.com/postcss/status/875088068377817089

Prettier 1.4 supports CSS by PostCSS. Facebook now uses PostCSS for lint (Stylelint) and format CSS (Prettier).
github.com/prettier/prett
twitter
Prettier 1.4 supports CSS by PostCSS. Facebook now uses PostCSS for lint (Stylelint) and format CSS (Prettier). <https://github.com/prettier/prettier/releases/tag/1.4.0> <https://pbs.twimg.com/media/DCTv9WbWAAAeEZ2.jpg>
Michael Hsu 09:03:27
https://twitter.com/BenLesh/status/875116904595062784
RxJS 6.0.0-alpha.0 has been published as well.
twitter
... and for the crazy brave, (looking at you Paul Taylor): #RxJS 6.0.0-alpha.0 has been published as well. <https://github.com/ReactiveX/rxjs/blob/next/CHANGELOG.md#600-alpha0-2017-06-14>
  • 👏1
jihchi 22:26:09
https://twitter.com/_philpl/status/875281868723286016

styled-components 2.1 is out with (slightly experimental) support for react-primitives 💅🎉 github.com/styled-compone… cc @jongold
twitter
styled-components 2.1 is out with (slightly experimental) support for react-primitives :nail_care::tada: <https://github.com/styled-components/styled-components/releases/tag/v2.1.0> cc <https://twitter.com/jongold|@jongold>
jihchi 22:27:39
https://twitter.com/mweststrate/status/875293153762451456

Fusebox looks so promising and clean. Any real life experiences?
twitter
Fusebox looks so promising and clean. Any real life experiences? <https://www.sitepoint.com/fusebox-faster-webpack-alternative/>
jihchi 22:30:08
https://twitter.com/mikaelbrevik/status/875248913187577856

Fusebox looks so promising and clean. Any real life experiences?
twitter
Cool maze generator written in <https://twitter.com/reasonml|@reasonml> by <https://twitter.com/jaredforsyth|@jaredforsyth>: <http://jaredforsyth.com/reason-maze/#WyJUcmlhbmdsZSIsIkJGUyIsWzE5Niw1MF0sWzcsMTAwXSxbMSwyMF0sMTUsMzAsODIwXQ==> (<https://github.com/jaredly/reason-maze>) <https://pbs.twimg.com/media/DCWCOxHWAAA2-QT.jpg>
jihchi 22:32:11
https://twitter.com/sharifsbeat/status/875332107962376192

Just released Revalidation - A Higher Order Component for Stateless Functional Component Forms in React.
revalidation.oss.25th-floor.com
twitter
Just released Revalidation - A Higher Order Component for Stateless Functional Component Forms in React. <http://revalidation.oss.25th-floor.com/>
yhsiang 23:37:38
Stack Overflow Blog
Do you use tabs or spaces for code indentation?
yhsiang: `p-value < 10^-10`
這 p 值比我看過的任何 paper 裡的都還要小
😂😂😂
yhsiang 23:37:44
雖然我本來就是 space 派 XDD
  • 1
jihchi 23:39:13
GitHub
react - A declarative, efficient, and flexible JavaScript library for building user interfaces.
jihchi 23:39:29
GitHub
node - Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:
jihchi 23:44:03
GitHub
staticrypt - Password protect a static HTML page
2017-06-16
mofas 07:44:36
twitter
Learn about how we greatly improved test performance and developer experience with our recent migration to #jest! <http://abnb.co/3t5c>
jihchi 08:18:56
@mofas 真早
jihchi 08:52:29
twitter
dear god... <https://pbs.twimg.com/media/DCYUgcBUQAArXM3.jpg>
sass @extend ~
jihchi 08:55:14
twitter
React Loadable 4.0 <http://thejameskyle.com/react-loadable-4.html> <https://pbs.twimg.com/media/DCZb7JAXkAMVFzy.jpg>
mrorz 10:41:09
yhsiang: `p-value < 10^-10`
這 p 值比我看過的任何 paper 裡的都還要小
mrorz 10:45:26
sass @extend ~
jihchi 10:46:09
XD
yhsiang 11:29:43
😂😂😂
mofas 16:25:19
原來 Y-combinator 可以再縮寫成這樣 FIX = f => (x => f(y => x(x)(y)))(x => f(y => x(x)(y)))
yhsiang 20:44:51
XD
mofas 22:28:39
twitter
See the number of monthly package downloads through Yarn on our new stats page. :star2::cat2: <https://stats.yarnpkg.com/> <https://twitter.com/sebmck/status/875709367395471360>
twitter
Me and <https://twitter.com/cpojer|@cpojer> made a <https://twitter.com/yarnpkg|@yarnpkg> page that shows yarn download stats! Check it out! :cat2::package: <https://stats.yarnpkg.com/>
2017-06-17
mofas 01:20:16
twitter
Debugging tip: console.log(new Error().stack) to log the current stack. Useful for debugging an unexpected code path. <https://pbs.twimg.com/media/DCcqkMXUMAQdG7X.jpg>
mofas 11:14:30
twitter
:fire::fire:Some folks (this is #angular app) have mentioned their app execution time be 50% faster with #webpack 3.0.0-rc2 OMGGG. 50% cc <https://twitter.com/addyosmani|@addyosmani> <https://twitter.com/olore/status/875799980862210048>
twitter
#webpack 2 vs. webpack 3rc2.. On the bright side, I've seen the execution time from v2-&gt;v3 be up to 50% faster <https://twitter.com/helgevold|@helgevold> <https://twitter.com/TheLarkInn|@TheLarkInn> <https://pbs.twimg.com/media/DCd2r7jUwAEDjJz.jpg>
mofas 11:16:03
但+15k 到底是為啥呢
mofas 11:17:28
照理說 module boilerplate 應該會少一點
mofas 12:46:58
@jihchi 你CRA要不要加一下這個 https://www.npmjs.com/package/babel-plugin-root-import
npm
Babel Plugin to enable relative root-import
mofas 12:47:11
這樣就不需要搞node_module 的hack
mofas:讓我來在各個專案試用看看
建議是用 node 原生的 `NODE_PATH=./src`
babel plugin 我覺得解得更漂亮呀
editor 的 eslint 就要有相對的支援才行
eslint for babel-root-import 感覺不太行
https://github.com/olalonde/eslint-import-resolver-babel-root-import

1. 沒人在管PR,連修 README 都不 merge https://github.com/olalonde/eslint-import-resolver-babel-root-import/issues/5
2. 我實際用下去發現 node modules 的不知為何都 resolve 到
幸好我沒在整linter
最後一個人說他換到 symlink `node_modules` 的做法了 XDDDDD
不過 symlink 解跟我正在用的 babel-plugin-module-resolver 感覺一樣都會撞名吧 @@
就是如果你剛好有個 `graphql` 資料夾又有個 `graphql` package,他會跑去哪裡找東西?
就照 node 的 require 演算法去找
我看到有人說 `NODE_PATH` 有點 deprecate 不建議使用耶
dan 說的 src/node_modules 是把東西擺進 node_modules 嗎
symbolic link 唯一缺點就是 Windows 不支援
symlink 是說把 `ln -s src node_modules/src` 嗎
是在 src/node_modules -> src/
ohohoh
CRA 的 PR 裡面是 src/node_modules -> src/packages ,不過意思一樣
是呢
只是 src/node_modules -> src/ 蠻危險的
為什麼 XD
looped symlink 應該還好?
是沒錯,但總覺得會踩到什麼 XD
人的愚蠢無限。不過我目前還沒踩過
`import wat from 'node_modules/wat;'`
但 jest 不是還沒支援 non-root node_modules 嗎 https://github.com/facebookincubator/create-react-app/issues/607
YES!!!
這個是我最大困擾 ..
也可以在 CRA 出了 official solution 之前,先用 plugin 解掉 path 跟 jest 問題
還有 editor 的 eslint 能夠支援
我這幾個月用的是 babel-plugin-module-resolver + eslint-plugin-import + eslint-import-resolver-babel-module
瀏覽器內的 eslint 與 jest 與也都認得得
唯一的缺憾大概就是 vscode 裡 cmd - click 無法 go to definition
可以來整合你的組合試試
今天有空我來整合 @mrorz 組合試試
我發現我純前端的專案會用 webpack resolve + eslint-import-resolver-webpack
後端則是用 babel 的:https://github.com/cofacts/rumors-api/blob/master/package.json

其實應該都用 babel 的就好
如果可以的話當然是少了 webpack 依賴更好
但多了一個 `babel-plugin-module-resolver` 依賴呀,因為 babel 原生沒有 resolve 功能 XD
我是想說這樣的 stack 以後純 BE 也可以用
我自己是覺得 babel-root-import 的 syntax 可以把 root resolve 與 node_modules 的 resolve 分開,可以避開一些撞名的地雷,讀起來其實也比較不會 confusing
例如:
https://github.com/cofacts/rumors-api/blob/master/test/util/GraphQL.js
其實上頭的 import from ‘graphql/xxx’ 是 `src/graphql` 而不是 graphql node_module 唷 XDDD
蠻合理。CRA 也有一些討論,不讓 import 的檔案來自 src/ 之外,但也有些例外 (e.g. package.json)
所以也可以預設 lookup `src/`
如果 babel-root-import 能整的話我也想整呢 QQ
啊?蝦密意思,沒辦法整進去 CRA 嗎?
有點尷尬.. 現在卡在 Jest 寫死 node_modules 不會 transpile,babel plugin 無解呀 … 有人要捲起袖子嗎 … https://github.com/facebook/jest/pull/2318
嘖嘖,更正,用 babel plugin 跟 node_modules 沒有關係才是 … 讓我擇日再戰
@mrorz 繞了一大圈,其實我就直接改 Jest 跟 Webpack 設定,把 `src/` 加到 resolve.module (webpack) 跟 modulePaths (jest) 就好
editor 就自己裝 plugin 去 resolve 就ㄏㄠ
webpack 的話就 only works for FE projects 囉~
因為是針對 CRA,所以也是 only works for FE
wildjcrt 13:30:16
@wildjcrt has joined the channel
mrorz 15:34:26
mofas:讓我來在各個專案試用看看
jihchi 16:37:57
建議是用 node 原生的 `NODE_PATH=./src`
jihchi 17:35:59
GitHub
After a long discussion in #741 it seems to me that src/node_modules seems like the best solution for absolute imports. It has the following benefits: Doesn't rely on symlinks (they don't work wel...
mofas 18:36:52
GitHub
redux - Predictable state container for JavaScript apps
mofas 18:37:59
babel plugin 我覺得解得更漂亮呀
mofas 18:38:19
built by rollup
jihchi 18:39:25
editor 的 eslint 就要有相對的支援才行
mrorz 19:48:31
eslint for babel-root-import 感覺不太行
https://github.com/olalonde/eslint-import-resolver-babel-root-import

1. 沒人在管PR,連修 README 都不 merge https://github.com/olalonde/eslint-import-resolver-babel-root-import/issues/5
2. 我實際用下去發現 node modules 的不知為何都 resolve 到
GitHub
eslint-import-resolver-babel-root-import - A babel-root-import resolver for eslint-plugin-import
GitHub
This resolver currently does not work. This is because the naming convention has changed. From line 36: p[0] === 'babel-root-import' It's trying to find the plugin settings from the .babelrc file, ...
mofas 19:56:47
幸好我沒在整linter
mrorz 20:02:23
最後一個人說他換到 symlink `node_modules` 的做法了 XDDDDD
mrorz 20:10:58
不過 symlink 解跟我正在用的 babel-plugin-module-resolver 感覺一樣都會撞名吧 @@
就是如果你剛好有個 `graphql` 資料夾又有個 `graphql` package,他會跑去哪裡找東西?
jihchi 20:29:35
就照 node 的 require 演算法去找
mrorz 20:33:23
我看到有人說 `NODE_PATH` 有點 deprecate 不建議使用耶
dan 說的 src/node_modules 是把東西擺進 node_modules 嗎
jihchi 20:33:38
jihchi 20:34:02
symbolic link 唯一缺點就是 Windows 不支援
mrorz 20:34:23
symlink 是說把 `ln -s src node_modules/src` 嗎
jihchi 20:35:00
是在 src/node_modules -> src/
mrorz 20:35:06
ohohoh
jihchi 20:35:35
CRA 的 PR 裡面是 src/node_modules -> src/packages ,不過意思一樣
mrorz 20:35:48
是呢
jihchi 20:36:04
只是 src/node_modules -> src/ 蠻危險的
mrorz 20:36:13
為什麼 XD
mrorz 20:36:30
looped symlink 應該還好?
jihchi 20:36:52
是沒錯,但總覺得會踩到什麼 XD
jihchi 20:37:15
人的愚蠢無限。不過我目前還沒踩過
jihchi 20:37:40
`import wat from 'node_modules/wat;'`
mrorz 20:38:21
但 jest 不是還沒支援 non-root node_modules 嗎 https://github.com/facebookincubator/create-react-app/issues/607
GitHub
Update: @modernserf is working on a PR to this issue. Please don't submit other PRs. Currently, create-react-app allows you to structure your app like this: node_modules/ └─ react/ src/ ├─ __tests_...
jihchi 20:38:56
YES!!!
jihchi 20:39:10
這個是我最大困擾 ..
jihchi 20:45:05
也可以在 CRA 出了 official solution 之前,先用 plugin 解掉 path 跟 jest 問題
jihchi 20:45:34
還有 editor 的 eslint 能夠支援
mrorz 21:42:56
我這幾個月用的是 babel-plugin-module-resolver + eslint-plugin-import + eslint-import-resolver-babel-module
瀏覽器內的 eslint 與 jest 與也都認得得
唯一的缺憾大概就是 vscode 裡 cmd - click 無法 go to definition
jihchi 21:59:41
可以來整合你的組合試試
2017-06-18
mofas 09:56:08
twitter
Gratitude for Invisible Systems, by <https://twitter.com/debcha|@debcha> <https://www.theatlantic.com/technology/archive/2017/05/gratitude-for-invisible-systems/526344/> <https://pbs.twimg.com/media/DCigYC-VYAY0HTn.png>
jihchi 10:47:13
https://twitter.com/dan_abramov/status/876054908755218432

This week’s @reactjs beginner thread. No question is too simple! reddit.com/r/reactjs/comm
twitter
This week’s <https://twitter.com/reactjs|@reactjs> beginner thread. No question is too simple! <https://www.reddit.com/r/reactjs/comments/6hc3fl/beginners_thread_easy_questions_week_of_20170612/>
jihchi 10:49:33
https://twitter.com/acemarke/status/875925804567474176

Redux 3.7.0 is out! Smaller UMD bundle size, and some small util function tweaks: github.com/reactjs/redux/… . Thanks to @timdorr et al!
twitter
Redux 3.7.0 is out! Smaller UMD bundle size, and some small util function tweaks: <https://github.com/reactjs/redux/releases/tag/v3.7.0> . Thanks to <https://twitter.com/timdorr|@timdorr> et al!
mofas 11:23:32
The Practical Dev
Load javascript on demand with the help of Webpack 2
wildjcrt 13:56:35
@wildjcrt has left the channel
2017-06-19
jihchi 09:11:52
twitter
I just published “Choo, architecture &amp; performance” <https://medium.com/p/choo-architecture-performance-f6f0c44e8a6a>
vm6bj6xup6 10:49:21
@vm6bj6xup6 has joined the channel
jihchi 11:03:19
https://github.com/25th-floor/spected
Validation library: 還不錯的 API 設計,簡潔有力,夠彈性。
GitHub
spected - Validation library
jihchi 11:04:22
for example:
```
const validationRules = {
name: [
[ isGreaterThan(5),
`Minimum Name length of 6 is required.`
],
],
random: [
[ isGreaterThan(7), 'Minimum Random length of 8 is required.' ],
[ hasCapitalLetter, 'Random should contain at least one uppercase letter.' ],
]
}
```
input:
```
const inputData = { name: 'abcdef', random: 'z'}
```
output:
```
spected(validationRules, inputData)

{name: true,
random: [
'Minimum Random length of 8 is required.',
'Random should contain at least one uppercase letter.'
]}
```
  • 💯2
yhsiang 13:51:55
@jihchi 用了?
jihchi 13:52:14
@yhsiang 沒,今天剛看到。可能下次會試用看看
jihchi 13:59:30
@yhsiang 你想試試?
yhsiang 14:00:24
目前沒這需求 XD
jihchi 14:00:45
呵呵
mrorz 14:07:14
確實是比 json schema 好寫呢 @@
jihchi 14:09:55
json schema 的 error message 好難 extract 出來 … 我想要每個 field 都顯示各自 error message
Johnson Liang
確實是比 json schema 好寫呢 @@
jihchi: https://github.com/epoberezkin/ajv#validation-errors 我以為有 `dataPath`?
不過我也沒實際開始用 @@
u.3
有 dataPath,但不是問題。error message 你要馬就用內建的訊息,不然就 customize error mesage。一但 customize 之後, dataPath 就長得不一樣,但這還好,改一下就支援。總之 DX 不太好
你想要 generalize error message 丟到 React props 是件麻煩事。
P.S. 我是用 https://github.com/epoberezkin/ajv-errors 來 customize error message
原來如此,眉眉角角真的很多 Orz
是可以用,說不定你沒有這個問題,這是我個人的需求.
對 multiple inputs 就要一個一個寫
mrorz 14:18:55
jihchi: https://github.com/epoberezkin/ajv#validation-errors 我以為有 `dataPath`?
不過我也沒實際開始用 @@
GitHub
ajv - The fastest JSON-Schema Validator. Supports draft-04/06
jihchi 14:19:16
u.3
jihchi 14:21:25
有 dataPath,但不是問題。error message 你要馬就用內建的訊息,不然就 customize error mesage。一但 customize 之後, dataPath 就長得不一樣,但這還好,改一下就支援。總之 DX 不太好
jihchi 14:22:12
你想要 generalize error message 丟到 React props 是件麻煩事。
jihchi 14:23:20
P.S. 我是用 https://github.com/epoberezkin/ajv-errors 來 customize error message
GitHub
ajv-errors - Custom error messages in JSON-Schema for Ajv
mrorz 14:30:45
原來如此,眉眉角角真的很多 Orz
jihchi 14:32:35
是可以用,說不定你沒有這個問題,這是我個人的需求.
jihchi 18:55:48
https://twitter.com/localvoid/status/876728212927262720

I just published “Improving SSR performance in Virtual DOM libraries” medium.com/p/improving-ss
twitter
I just published “Improving SSR performance in Virtual DOM libraries” <https://medium.com/p/improving-ssr-performance-in-virtual-dom-libraries-57232e2ead21>
jihchi 18:57:49
https://twitter.com/brian_d_vaughn/status/876625646239305728

Have you made a cool DevTools theme?

I put together a site to share themes with others. Would you use it? What feature(s) does it need?
twitter
Have you made a cool DevTools theme? I put together a site to share themes with others. Would you use it? What feature(s) does it need?
jihchi 18:58:39
https://twitter.com/aweary/status/876739006456791040

My talk on @reasonml for the web will be live streamed here, starting in 20 minutes: curryon.conf.meetecho.com/room2/
twitter
My talk on <https://twitter.com/reasonml|@reasonml> for the web will be live streamed here, starting in 20 minutes: <http://curryon.conf.meetecho.com/room2/>
mofas 21:59:34
Now I have more confidence that styled-components will dominate css-in-js.
  • 😎1
  • 💅1
jihchi 22:35:10
GitHub
redux-first-router - :medal: seamless redux-first routing -- just dispatch actions
2017-06-20
mofas 08:08:45
twitter
:fire::heart_eyes: You know what's great for Mondays? #webpack 3.0.0 SHIPPED!!! Come get it while its :fire:. RTRT :white_check_mark: Scope Hoisting  <https://medium.com/webpack/webpack-3-official-release-15fd2dd8f07b>
mofas 08:09:08
twitter
#fantasyland 17! Get you some #comonads, #categorytheory, and build you #GameOfLife in ~35 lines of #javascript! <http://www.tomharding.me/2017/06/19/fantas-eel-and-specification-17/>
mofas 08:09:20
twitter
I just published “Mareo: Reason + BuckleScript + Mario” <https://medium.com/p/mareo-reason-bucklescript-mario-205ce4c1cbe5>
jihchi 08:44:31
https://twitter.com/code/status/876855048202051584

Preview your Emmet expansions as you type in @code May update!
twitter
Preview your Emmet expansions as you type in <https://twitter.com/code|@code> May update!
jihchi 08:45:08
https://twitter.com/jaredforsyth/status/876821141813329920

New post: Your first native Reason/OCaml project jaredforsyth.com/2017/06/17/you… #reasonml #OCaml
twitter
New post: Your first native Reason/OCaml project <http://jaredforsyth.com/2017/06/17/your-first-native-reason-ocaml-project/> #reasonml #OCaml
jihchi 08:46:35
https://twitter.com/reasonldn/status/876727612659425280

Why should you care about @reasonml? Become persuaded by the charming @jasim_ab

protoship.io/blog/2017/05/1
twitter
Why should you care about <https://twitter.com/reasonml|@reasonml>? Become persuaded by the charming <https://twitter.com/jasim_ab|@jasim_ab> <https://protoship.io/blog/2017/05/10/an-invitation-to-reasonml.html>
jihchi 10:38:54
對 multiple inputs 就要一個一個寫
jihchi 10:39:24
今天有空我來整合 @mrorz 組合試試
mrorz 10:47:28
我發現我純前端的專案會用 webpack resolve + eslint-import-resolver-webpack
後端則是用 babel 的:https://github.com/cofacts/rumors-api/blob/master/package.json

其實應該都用 babel 的就好
GitHub
rumors-api - GraphQL API server for clients like rumors-site and rumors-line-bot
jihchi 10:48:12
如果可以的話當然是少了 webpack 依賴更好
mrorz 10:48:57
但多了一個 `babel-plugin-module-resolver` 依賴呀,因為 babel 原生沒有 resolve 功能 XD
jihchi 10:50:29
我是想說這樣的 stack 以後純 BE 也可以用
mrorz 10:50:55
我自己是覺得 babel-root-import 的 syntax 可以把 root resolve 與 node_modules 的 resolve 分開,可以避開一些撞名的地雷,讀起來其實也比較不會 confusing
例如:
https://github.com/cofacts/rumors-api/blob/master/test/util/GraphQL.js
其實上頭的 import from ‘graphql/xxx’ 是 `src/graphql` 而不是 graphql node_module 唷 XDDD
GitHub
rumors-api - GraphQL API server for clients like rumors-site and rumors-line-bot
jihchi 10:52:10
蠻合理。CRA 也有一些討論,不讓 import 的檔案來自 src/ 之外,但也有些例外 (e.g. package.json)
jihchi 10:52:31
所以也可以預設 lookup `src/`
mrorz 10:56:26
如果 babel-root-import 能整的話我也想整呢 QQ
jihchi 10:57:08
啊?蝦密意思,沒辦法整進去 CRA 嗎?
mofas 13:01:55
Yarn
One of the core design philosophies of Yarn is to strive for simpleness; a lean CLI without redundant features. That’s why Yarn has resisted adding random bu...
mofas 13:02:01
是 Kay Lee 寫的耶
jihchi 13:10:58
是耶
yhsiang 14:02:28
大大 gsklee !
  • 💯2
mofas 14:16:07
Writing tech blog is not a easy job~
jennyliang 14:39:34
威威
jihchi 16:40:23
有點尷尬.. 現在卡在 Jest 寫死 node_modules 不會 transpile,babel plugin 無解呀 … 有人要捲起袖子嗎 … https://github.com/facebook/jest/pull/2318
GitHub
Summary An attempt to fix the issue raised in #2145, which is blocking facebookincubator/create-react-app#1081. Test plan This PR is incomplete because this test is failing; furthermore, I should i...
jihchi 18:53:34
https://twitter.com/am_i_tom/status/877082578829946880

If you're curious about Reason + JS, @_chenglou's Mario clone is definitely worth a look... medium.com/@chenglou/mare
twitter
If you're curious about Reason + JS, <https://twitter.com/_chenglou|@_chenglou>'s Mario clone is definitely worth a look... <https://medium.com/@chenglou/mareo-reason-bucklescript-mario-205ce4c1cbe5>
jihchi 19:02:54
Connect: behind the front-end experience
https://stripe.com/blog/connect-front-end-experience
stripe.com
We recently released a new and improved version of Connect, our suite of tools designed for platforms and marketplaces. Stripe’s design team works hard to create unique landing pages that tell a story for our major products. For this release, we designed Connect’s landing page to reflect its intricate, cutting-edge capabilities while keeping things light and simple on the surface. In this blog post, we’ll describe how we used several next-generation web technologies to bring Connect to life, and walk through some of the finer technical details (and excitement!) on our front-end journey.
jihchi 22:42:53
嘖嘖,更正,用 babel plugin 跟 node_modules 沒有關係才是 … 讓我擇日再戰
2017-06-21
otaq 03:49:21
@otaq has joined the channel
jihchi 08:40:52
https://twitter.com/rauschma/status/877221031794094081

Facebook’s new language for reactive programming: Reflex.

Talk about it (no site yet?): curry-on.org/2017/sessions/
twitter
Facebook’s new language for reactive programming: Reflex. Talk about it (no site yet?): <http://www.curry-on.org/2017/sessions/reflex-reactive-programming-at-facebook.html>
jihchi 08:41:37
Jih-Chi Lee
https://twitter.com/rauschma/status/877221031794094081

Facebook’s new language for reactive programming: Reflex.

Talk about it (no site yet?): curry-on.org/2017/sessions/
jihchi 08:42:34
twitter
Rules for `this` in JavaScript. <http://2ality.com/2014/05/this.html> <https://pbs.twimg.com/media/DCxMHztWAAA33kd.jpg>
jihchi 08:42:57
https://twitter.com/aweary/status/877248391998308353

My talk "Building web apps with @reasonml" from #curryon has been uploaded!
twitter
My talk "Building web apps with <https://twitter.com/reasonml|@reasonml>" from #curryon has been uploaded! <https://youtu.be/Yflk43afWj4>
jihchi 08:43:52
twitter
lol'd a little here <https://facebook.github.io/reason/faq.html> <https://pbs.twimg.com/media/DCy74dEXYAAfxGL.jpg>
jihchi 15:50:38
curry on conference 好像蠻多不錯的 talk
mofas 17:03:24
其實沒有
mofas 17:03:31
就這兩個talk
mofas 17:03:53
我說說build with reasonReact 和 FP這兩個
mofas 17:04:02
purescript那個也還好而已
jihchi 17:07:35
👍
mofas 22:28:31
GitHub
Contribute to bucklescript-cookbook development by creating an account on GitHub.
mofas 22:28:52
OCaml is better choice
jihchi 22:30:14
PROMISING (握
mofas 22:34:25
Elm/Reason/Purescript 都長得快一樣了, 這種風格比較能夠推行到FE吧
jihchi 22:37:20
syntax 倒是大同小異。有好用的 flow control 就很吸引人。
2017-06-22
mofas 00:16:02
Medium
At Geckoboard, we have regular “innovation” days where we get to work on whatever we want. Recently, I’ve been spending that time working…
jihchi 08:24:13
https://twitter.com/jcreamer898/status/877559686362353664

Containers are how things work
Components are how things look

#react #fluentconf @mxstbr
twitter
Containers are how things work Components are how things look #react #fluentconf <https://twitter.com/mxstbr|@mxstbr>
jihchi 09:51:26
npm run scripts 的各種技巧 & tips

http://elijahmanor.com/talks/npm-scripts/
學到了 `& wait`
還有 `npm-run-all task:*`
npm-check 好像不賴
@mofas 用另一套。我也是用 npm-check
jihchi 12:07:24
@mrorz 繞了一大圈,其實我就直接改 Jest 跟 Webpack 設定,把 `src/` 加到 resolve.module (webpack) 跟 modulePaths (jest) 就好
mofas 12:16:53
jihchi 12:17:56
editor 就自己裝 plugin 去 resolve 就ㄏㄠ
mrorz 13:59:12
webpack 的話就 only works for FE projects 囉~
jihchi 14:00:22
因為是針對 CRA,所以也是 only works for FE
jihchi 19:03:51
https://twitter.com/reactjs/status/877833420822523904

Struggling with passing props too deep? Check out this post by @RubenOostinga with a possible solution!
twitter
Struggling with passing props too deep? Check out this post by <https://twitter.com/RubenOostinga|@RubenOostinga> with a possible solution! <https://twitter.com/rubenoostinga/status/877806234962993152>
twitter
Just wrote a blogpost on a new pattern to write component trees. I think it is very powerful and broadly applicable! <https://medium.com/@RubenOostinga/avoiding-deeply-nested-component-trees-973edb632991>
jihchi 19:04:45
https://twitter.com/ur_friend_james/status/877752407936991232

I just published atom.io/packages/linte… which shows better syntax errors for @reasonml in @AtomEditor
twitter
I just published <https://atom.io/packages/linter-refmt> which shows better syntax errors for <https://twitter.com/reasonml|@reasonml> in <https://twitter.com/AtomEditor|@AtomEditor>
mrorz 19:10:28
學到了 `& wait`
jihchi 19:14:36
還有 `npm-run-all task:*`
mrorz 19:28:15
npm-check 好像不賴
mofas 21:17:50
twitter
Just wrote a blogpost on a new pattern to write component trees. I think it is very powerful and broadly applicable! <https://medium.com/@RubenOostinga/avoiding-deeply-nested-component-trees-973edb632991>
mofas 21:17:57
twitter
Facebook's new reactive FP/OO programming language, Reflex. Announced this week <https://twitter.com/curry_on_conf|@curry_on_conf>! :astonished::heart_eyes: by J. Verlaguet: <https://www.youtube.com/watch?v=AGkSHE15BSs&amp;feature=em-upload_owner>
yhsiang 21:51:31
哦哦哦 出來了
mrorz 22:00:05
FP/OO programming 到底是 FP 還是 OO
yhsiang 22:11:01
mrorz OO and FP merged!
mrorz 22:11:30
FOPO
mrorz 22:11:42
POOF
mrorz 22:11:43
FOOP
yhsiang 22:11:55
真的假的是真的還是假的
mofas 23:34:26
reflex 用很有趣的方式去update immutable nested data
mofas 23:34:49
`!t.pt1.x += 1;`
mofas 23:34:57
拿bang是哪招
mofas 23:37:10
`t.pt1.!x` `t.!pt1.x`
mofas 23:37:19
都不一樣
mofas 23:50:17
the first version of reflex is written in OCaml
mofas 23:50:28
是有多愛 Ocaml呀
2017-06-23
mofas 07:43:26
GitHub
This PR builds on @tomocchino &amp; @sebmarkbage's work on the server renderer in React 16, exposing the server renderer as a Node.js Readable Stream. This allows folks to pipe a renderer out to the ne...
mofas 07:43:32
Streaming rendering!
jihchi 08:24:38
twitter
Dev Tips: DevTools: Capture full sized screenshots :frame_with_picture: without a browser extension: <https://umaar.com/dev-tips/151-screenshot-capture/> - This is in Chrome Stable now!
jihchi 08:28:42
https://twitter.com/mikaelbrevik/status/877963265762086913

Demo site for react-flight is really, really pretty: react-flight.io
twitter
Demo site for react-flight is really, really pretty: <http://www.react-flight.io/>
jihchi 08:30:57
twitter
<https://twitter.com/HoloLens|@HoloLens> check out my project - Super Mario Bros as a life size first person AR experience for Hololens. Full vid: <http://bit.ly/2sqTNCB>
jihchi 13:25:05
@mofas 用另一套。我也是用 npm-check
mofas 14:39:56
他其實OO部分超多, 我不喜歡class
jihchi 14:42:03
有 document 了?
yhsiang 14:42:59
應該是看影片吧
mofas 14:43:31
我有看完影片呀
mofas 23:57:19
twitter
I wrote a <https://twitter.com/reasonml|@reasonml> tutorial for React devs: <https://jamesfriend.com.au/a-first-reason-react-app-for-js-developers>
2017-06-24
jihchi 10:43:57
O...p..
jihchi 11:16:33
https://twitter.com/nzgb/status/878441570067927040

I don't even... haha, feels like a video game in here
twitter
I don't even... haha, feels like a video game in here
2017-06-25
mofas 13:28:32
rxviz.com
Visualize any Rx Observable, and export SVG of the marble diagram.
mofas 13:29:14
twitter
It's kinda hard to take the Unix philosophy "Do one thing and do it well" seriously when the `ls` command has 38 different flags.
mofas 20:42:22
twitter
Reflex: reactive programming language for the backend <https://youtu.be/AGkSHE15BSs>
mofas 20:42:32
中二這麼討厭FB都retweet
mofas 20:43:00
twitter
The mobile web in 2017 <https://pbs.twimg.com/media/DDF0ZvSXYAI3XGc.jpg>
  • 💯1
2017-06-26
jihchi 13:32:45
GitHub
data-driven-motion - Easily animate your data in react
jihchi 14:01:20
有打算使用 Docker + Selenium + ChromeDriver + Chrome headless 的捧油,可以關注這個 issue:
https://github.com/SeleniumHQ/docker-selenium/issues/429
目前可以自己 build ChromeDriver 來 workaround
GitHub
Run node-chrome with --headless rather than XVFB, to reduce resource usage.
2017-06-27
jihchi 06:33:20
Jih-Chi Lee
有打算使用 Docker + Selenium + ChromeDriver + Chrome headless 的捧油,可以關注這個 issue:
https://github.com/SeleniumHQ/docker-selenium/issues/429
目前可以自己 build ChromeDriver 來 workaround
GitHub
Run node-chrome with --headless rather than XVFB, to reduce resource usage.
jihchi 08:33:01
https://twitter.com/housecor/status/879379525444005889

This is awesome: Bundle splitting is super trivial with dynamic imports and Webpack's magic comments feature! Demo:
twitter
This is awesome: Bundle splitting is super trivial with dynamic imports and Webpack's magic comments feature! Demo: <https://github.com/coryhouse/dynamic-import-example>
jihchi 08:38:19
https://twitter.com/una/status/879391841950498817

CSS Cascade Origin Specificity

(Updated Version!)

#devdoodles 010
twitter
CSS Cascade Origin Specificity (Updated Version!) #devdoodles 010 <https://pbs.twimg.com/media/DDQ6EfgXcAE6cTk.jpg>
jihchi 10:15:42
@mofas @mrorz 有關 import
absolute path 的使用,你們覺得當有 conflict 出現時,哪者優先? 例如:
jihchi 10:16:58
`import util from 'util/util'`,當 `src` 跟 `node_modules` 都有 `util/util` ,直覺上你會覺得 resolve 到 `src` 的還是 `node_modules `?
jihchi: node_modules 唷
mrorz 10:20:36
jihchi: node_modules 唷
  • 👍1
mofas 10:43:42
node_modules應該是先啦
  • 👍1
mofas 10:45:19
Dinosaur JS conf
mofas 22:28:19
twitter
Today in "production #functional #javascript": just finished this mighty mapping. <https://pbs.twimg.com/media/DDUegyeXgAEicUg.jpg>
2017-06-28
jihchi 08:43:19
https://twitter.com/thekitze/status/879777868611452928

Prettier formatting @GraphQL inside template literals is everything I needed in my life 😍
twitter
Prettier formatting <https://twitter.com/GraphQL|@GraphQL> inside template literals is everything I needed in my life :heart_eyes:
jihchi 08:44:50
https://twitter.com/vjeux/status/879749429992972288

Prettier 1.5 is live with GraphQL, CSS-in-JS and JSON support!
twitter
Prettier 1.5 is live with GraphQL, CSS-in-JS and JSON support! <https://github.com/prettier/prettier/releases/tag/1.5.0>
jihchi 08:49:40
https://twitter.com/svensauleau/status/879738550882848768

So cool 😎! Optional Chaining just landed in @babeljs. github.com/babel/babel/pu
twitter
So cool :sunglasses:! Optional Chaining just landed in <https://twitter.com/babeljs|@babeljs>. <https://github.com/babel/babel/pull/5813> <https://pbs.twimg.com/media/DDV1dX2XcAIcIG6.jpg>
jihchi 08:52:35
https://twitter.com/thelarkinn/status/879795307864702976

“Brief introduction to scope hoisting in Webpack” by @jeremenichelli thanks for the awesome submission!!! #webpack
twitter
“Brief introduction to scope hoisting in Webpack” by <https://twitter.com/jeremenichelli|@jeremenichelli> thanks for the awesome submission!!! #webpack <https://medium.com/webpack/brief-introduction-to-scope-hoisting-in-webpack-8435084c171f>
mofas 10:01:09
.
jihchi 10:02:09
修改還是會上 slackarchive 的樣子
jihchi 19:19:30
https://twitter.com/angustweets/status/879763524897001473

How we built Uber's high performance web app for riders.
twitter
How we built Uber's high performance web app for riders. <https://eng.uber.com/m-uber/>
jihchi 19:20:04
https://twitter.com/boriscoder/status/879801970978115585

@aemkei
var сonst = "W";
let vаr = "T";
const lеt = "F";
сonst + vаr + lеt // WTF
twitter
<https://twitter.com/aemkei|@aemkei> var сonst = "W"; let vаr = "T"; const lеt = "F"; сonst + vаr + lеt // WTF <https://pbs.twimg.com/media/DDWvOblXUAEE95k.jpg>
2017-06-29
mofas 01:03:06
twitter
New Create React App release! Many bugfixes, a few improvements, and some new documentation. <https://github.com/facebookincubator/create-react-app/releases/tag/v1.0.8> <https://pbs.twimg.com/media/DDbCm2lXUAIG2lF.jpg>
  • 🎉1
  • 👍1
jihchi 08:45:49
https://twitter.com/dan_abramov/status/880106995130486784

Storybook doc is now joined by React Styleguidist which is also supported but works a bit differently. github.com/facebookincuba
twitter
Storybook doc is now joined by React Styleguidist which is also supported but works a bit differently. <https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#getting-started-with-styleguidist> <https://pbs.twimg.com/media/DDbEpA1XkAAt4Mb.jpg>
jihchi 18:44:23
https://twitter.com/addyosmani/status/880229735766175744

create-react-app now warns if JavaScript bundles exceed 500KB. 🔥 work by @dan_abramov on #perfmatters awareness.

github.com/facebookincuba
twitter
create-react-app now warns if JavaScript bundles exceed 500KB. :fire: work by <https://twitter.com/dan_abramov|@dan_abramov> on #perfmatters awareness. <https://github.com/facebookincubator/create-react-app/releases/tag/v1.0.8> <https://pbs.twimg.com/media/DDczQo8UMAAw4t_.jpg>
jihchi 19:32:27
https://www.robinwieruch.de/nextjs-redux-saga/

文章非常簡短扼要。要快速知道整合 redux + redux saga 的眉角可以看看這篇。
robinwieruch.de
Basic steps to use Redux and Redux Saga as side-effect library for asynchronous actions in NextJs - a library for server-rendered React applications...
mofas 23:32:20
看了 SICP 才知道 react invariant error 是怎麼來的
2017-06-30
mofas 00:25:07
twitter
I just published “Leaving for Microsoft” <https://medium.com/p/leaving-for-microsoft-4f386c458693>
mofas 00:26:43
twitter
OH MY GOD WANT ESNext Proposal: The Pipeline Operator <https://github.com/gilbert/es-pipeline-operator> Thanks <https://twitter.com/kentcdodds|@kentcdodds> for clueing me on to this one. <https://pbs.twimg.com/media/DDgDO3SXoAA5abk.jpg>
mofas 00:28:20
這次換偷Elm
jihchi 06:09:33
forward pipeline operator `|>` 我以為大多 functional programming language 都有耶
jihchi 06:11:31
twitter
New Create React App release! Many bugfixes, a few improvements, and some new documentation. <https://github.com/facebookincubator/create-react-app/releases/tag/v1.0.8> <https://pbs.twimg.com/media/DDbCm2lXUAIG2lF.jpg>
GitHub
create-react-app - Create React apps with no build configuration.
jihchi 08:39:01
https://twitter.com/dan_abramov/status/880382232912941056

Why Quip doesn’t have platform-specific engineering teams
twitter
Why Quip doesn’t have platform-specific engineering teams <https://quipblog.com/why-quip-doesnt-have-platform-specific-engineering-teams-8126dca1942d>
jihchi 08:46:00
twitter
Top notch stuff jaba script <https://pbs.twimg.com/media/DDfyaZhVYAA1IH-.jpg>
這個我之前撞過 wwww
也不能說他錯呀 www
很妙。討論串下面就有人說, `[].some(a => a)` 結果 `false`,相對應很剛好 XD
every : 沒有人是 falsy
some:至少有一個是 truthy
感覺應該是 every 取得不好
但「沒有人是 falsy」好像不管怎麼取都很長 orz
我猜在制定這個的時候已經有人吵過了
哈哈哈,可以想像這畫面
結果我去 esdiscuss.org 沒找到相關吵架
mdn 寫:
> every acts like the “for all” quantifier in mathematics. In particular, for an empty array, it returns true. (It is vacuously true that all elements of the empty set satisfy any given condition.)
所以是有數學根據的
@czchen 的講解一樣
有趣的是這段:
> “all cell phones in the room are turned on and turned off”

在房間裡沒有 cell phone 時,即使連矛盾的條件句也是 truthy
So the following still makes sense mathmatically:
```
[].every(() => false)
> true
```
可以把 `every`, `some` 當作 `and` , `or`,`and`, `or` 都是 Monoid
empty list 表示你需要 Monoid 中的 identity element
and 的 identity element 是 true, or 的 identity element 是 false
👏
阿奇要來學 Haskell 嗎?以後遇到這種問題馬上又可以解了。
可以學 Reason/OCaml 嗎?比較用得到
可以先來學Lisp家族呀
SICP裡面都用Scheme
只是學了不知道可以用在哪
學習惹
mrorz 11:02:12
這個我之前撞過 wwww
也不能說他錯呀 www
jihchi 11:04:12
很妙。討論串下面就有人說, `[].some(a => a)` 結果 `false`,相對應很剛好 XD
mrorz 11:04:54
every : 沒有人是 falsy
some:至少有一個是 truthy
mrorz 11:05:03
感覺應該是 every 取得不好
mrorz 11:05:52
但「沒有人是 falsy」好像不管怎麼取都很長 orz
mrorz 11:06:46
我猜在制定這個的時候已經有人吵過了
jihchi 11:07:14
哈哈哈,可以想像這畫面
mrorz 11:23:38
Replied to a thread: 2017-06-30 08:46:00
結果我去 esdiscuss.org 沒找到相關吵架
mrorz 11:23:39
Jih-Chi Lee
結果我去 <http://esdiscuss.org|esdiscuss.org> 沒找到相關吵架
mrorz 11:23:49
mdn 寫:
> every acts like the “for all” quantifier in mathematics. In particular, for an empty array, it returns true. (It is vacuously true that all elements of the empty set satisfy any given condition.)
mrorz 11:23:54
所以是有數學根據的
mrorz 11:24:20
In mathematics and logic, a vacuous truth is a statement that asserts that all members of the empty set have a certain property. For example, the statement "all cell phones in the room are turned off" will be true whenever there are no cell phones in the room. In this case, the statement "all cell phones in the room are turned on" would also be vacuously true, as would the conjunction of the two: "all cell phones in the room are turned on and turned off". More formally, a relatively well-defined usage refers to a conditional statement with a false antecedent. One example of such a statement is "if Uluru is in France, then the Eiffel Tower is in Bolivia". Such statements are considered vacuous because the fact that the antecedent is false prevents using the statement to infer anything about the truth value of the consequent. They are true because a material conditional is defined to be true when the antecedent is false (regardless of whether the conclusion is true). In pure mathematics, vacuously true statements are not generally of interest by themselves, but they frequently arise as the base case of proofs by mathematical induction. This notion has relevance in pure mathematics, as well as in any other field which uses classical logic. Outside of mathematics, statements which can be characterized informally as vacuously true can be misleading. Such statements make reasonable assertions about qualified objects which do not actually exist. For example, a child might tell his or her parent "I ate every vegetable on my plate", when there were no vegetables on the child's plate to begin with.
jihchi 11:25:33
@czchen 的講解一樣
mrorz 11:26:09
有趣的是這段:
> “all cell phones in the room are turned on and turned off”

在房間裡沒有 cell phone 時,即使連矛盾的條件句也是 truthy
mrorz 11:27:30
So the following still makes sense mathmatically:
```
[].every(() => false)
> true
```
czchen 11:38:16
可以把 `every`, `some` 當作 `and` , `or`,`and`, `or` 都是 Monoid
czchen 11:39:27
empty list 表示你需要 Monoid 中的 identity element
czchen 11:39:50
and 的 identity element 是 true, or 的 identity element 是 false
jihchi 11:43:40
👏
czchen 11:46:27
阿奇要來學 Haskell 嗎?以後遇到這種問題馬上又可以解了。
jihchi 11:47:00
可以學 Reason/OCaml 嗎?比較用得到
mofas 14:22:49
可以先來學Lisp家族呀
mofas 14:22:59
SICP裡面都用Scheme
jihchi 14:28:05
只是學了不知道可以用在哪
mofas 17:26:28
看完覺得 阿難道大家不是這樣做嗎