frontend-tech

Month: 2017-09

2017-09-01

jihchi 16:32:45
https://github.com/Thinkmill/jest-in-case

GitHub

Thinkmill/jest-in-case

jest-in-case - Jest utility for creating variations of the same test

我覺得不行,我覺得用 forEach 就搞定惹
Oh 這個有用,讓 mocha 支援 snapshot testing
但需要踩踩雷
XD 結果是 snapshot 有用,case 無用
支援 snapshot 要做的工比 case 多很多吧 XD?
用 Jest !?
snap-shot-it 是 for mocha 的吧

2017-09-04

2017-09-05

jihchi 09:03:40
https://twitter.com/fbjest/status/904728388971225089

twitter

Jest 21 is out. Check out the *massive* changelog: <https://github.com/facebook/jest/blob/master/CHANGELOG.md#jest-2100>

Michael Hsu 2017-09-05 09:14:11
哇 好長,這次還沒有整理的文章?
原 Twitte 串裡面有提到兩三個 highlight :p
👍 1
jihchi 10:03:50
https://prometheus.io/blog/2017/09/04/promcon-2017-recap/

prometheus.io

PromCon 2017 Recap | Prometheus

An open-source monitoring system with a dimensional data model, flexible query language, efficient time series database and modern alerting approach.

jihchi 10:05:26
https://github.com/sapegin/jest-cheat-sheet

GitHub

sapegin/jest-cheat-sheet

jest-cheat-sheet - Jest cheat sheet

jihchi 17:28:50
https://github.com/diegohaz/styled-tools

GitHub

diegohaz/styled-tools

styled-tools - Useful interpolated functions for styled-components :nail_care:

mofas 20:58:57
https://twitter.com/dan_abramov/status/904776510334164992
這本就Daniel Friedman 寫的
上禮拜剛看完
大家有興趣也可以看一下
第九章有推導y combinator
還蠻精彩的

twitter

From “The Little Schemer” <https://pbs.twimg.com/media/DI5pb6lUwAI3kVR.jpg>

👍 1
jihchi 21:07:08

<https://twitter.com/dan_abramov/status/904776510334164992> 這本就Daniel Friedman 寫的 上禮拜剛看完 大家有興趣也可以看一下 第九章有推導y combinator 還蠻精彩的

<https://www.google.com.tw/search?q=The+Little+Schemer&amp;oq=The+Little+Schemer&amp;aqs=chrome..69i57j69i64.230j0j7&amp;sourceid=chrome&amp;ie=UTF-8>

2017-09-06

jihchi 08:12:31
https://twitter.com/ebidel/status/905214738593746944

> As of today, JS modules supported in Chrome! <script type=module>
chromestatus.com/feature/536569

twitter

As of today, JS modules supported in Chrome! &lt;script type=module&gt; <https://www.chromestatus.com/feature/5365692190687232>

jihchi 08:59:55
https://twitter.com/mylesborins/status/905158276375031812

🎉🎉🎉🎉

Happy @nodejs LTS release day

$ nvm install v6.11.3

Snapshots Re-Enabled Edition!!!

nodejs.org/en/blog/releas

:tada:🎉🎉🎉

twitter

:tada::tada::tada::tada: Happy <https://twitter.com/nodejs|@nodejs> LTS release day $ nvm install v6.11.3 Snapshots Re-Enabled Edition!!! <https://nodejs.org/en/blog/release/v6.11.3/> :tada::tada::tada::tada:

jihchi 09:03:47
https://twitter.com/chromiumdev/status/900326769387032577

Introducing Rendertron: the headless Chrome server rendering solution for indexing & static crawlers

github.com/GoogleChrome/r

twitter

Introducing Rendertron: the headless Chrome server rendering solution for indexing &amp; static crawlers <https://github.com/GoogleChrome/rendertron> <https://pbs.twimg.com/media/DH6JQK7XYAA2sYS.jpg>

看來官方 docker 裡沒有任何中文字體,該寫個 dockerfile 重包一發 XD
yes
jihchi 09:06:18
https://twitter.com/chromedevtools/status/902662330240057344

Now in Canary: Capture screenshots of specific HTML nodes

twitter

Now in Canary: Capture screenshots of specific HTML nodes

jihchi 09:37:54
Release v1.0.0 · yarnpkg/yarn · GitHub
https://github.com/yarnpkg/yarn/releases/tag/v1.0.0

**This is pre-release**

GitHub

yarnpkg/yarn

yarn - :package::cat2: Fast, reliable, and secure dependency management.

jihchi 10:19:28
https://tomdale.net/2017/09/compilers-are-the-new-frameworks/

tomdale.net

Compilers are the New Frameworks

My current "investment thesis" is that what we call web frameworks are transforming from runtime libraries into optimizing compilers. When it comes to eking performance out of hand-authored JavaScript and accompanying runtime libraries, we've reached the point of diminishing returns.

jihchi 18:49:54
https://twitter.com/malyw/status/905250772148822016

This just happened!
Chome 61 shipped ECMAScript modules enabled by default!🎊

Article: hospodarets.com/native-ecmascr
Test: hospodarets.com/es-modules-tes

twitter

This just happened! Chome 61 shipped ECMAScript modules enabled by default!:confetti_ball: Article: <https://hospodarets.com/native-ecmascript-modules-the-first-overview> Test: <https://hospodarets.com/es-modules-test/> <https://pbs.twimg.com/media/DJAYTlKWsAANk49.jpg>

2017-09-07

jihchi 09:03:29
https://twitter.com/chromedevtools/status/905482940687245312

Also in Canary: Section Screenshots. Enable Inspect Mode -> Hold Cmd (Mac) or Ctrl (Win, Linux) -> Click & Drag & Release -> :camera_with_flash: -> :star2:✨

twitter

Also in Canary: Section Screenshots. Enable Inspect Mode -&gt; Hold Cmd (Mac) or Ctrl (Win, Linux) -&gt; Click &amp; Drag &amp; Release -&gt; :camera_with_flash: -&gt; :star2::sparkles:

jihchi 09:06:00
https://twitter.com/paf31/status/905545295236173824

It's #ReadABookDay apparently, so why not read the PureScript book? It's free and available online. leanpub.com/purescript/read

twitter

It's #ReadABookDay apparently, so why not read the PureScript book? It's free and available online. <http://leanpub.com/purescript/read>

mofas 09:24:06
https://code.facebook.com/posts/1537144479682247

Facebook Code

Finding inter-procedural bugs at scale with Infer static analyzer

Inter-procedural analysis can be deployed to large and rapidly changing codebases that consist of millions of lines of code and undergo thousands of modifications per day.

jihchi 09:48:55
https://medium.com/conduit-analytics/graphql-fragments-components-30021a83fc12

Medium

When fragments and React components join forces – Conduit – Medium

React components and GraphQL fragments make for cleaner code. The first in Conduit’s technical series on using GraphQL in production.

rae 15:37:26
@rae has joined the channel

2017-09-08

jihchi 09:02:12
https://twitter.com/yarnpkg/status/905807975583027200

Yarn 1.0 is here! It comes with workspaces, auto-merging lock files and selective version resolutions. ⛴️📦🐈

code.facebook.com/posts/27451853

twitter

Yarn 1.0 is here! It comes with workspaces, auto-merging lock files and selective version resolutions. :ferry::package::cat2: <https://code.facebook.com/posts/274518539716230>

jihchi 09:02:41
https://twitter.com/reasonml/status/905925499137949701

Better Reason support for Sublime Text users! github.com/reasonml-edito

Autocompletion, diagnosis, type hint, etc.

twitter

Better Reason support for Sublime Text users! <https://github.com/reasonml-editor/sublime-reason#installation-sublime-text-3> Autocompletion, diagnosis, type hint, etc.

jihchi 09:14:42
https://twitter.com/thejameskyle/status/905921542906712064

Async-await footgun pointed out to me last night by @bassjacob: Always `return await` or if you wrap with try-catch it won't be caught

twitter

Async-await footgun pointed out to me last night by <https://twitter.com/bassjacob|@bassjacob>: Always `return await` or if you wrap with try-catch it won't be caught <https://pbs.twimg.com/media/DJJ61nkUEAAwZI2.jpg>

重點應該不是 `return`
而是只有 `await` 遇到 rejected promise 才會 throw 吧⋯⋯
> We discussed `return` implicitly awaiting promises but decided against because it's hard to opt out and returning rejected promises has uses
所以現在第 13 行的 `main()` 呼叫會回傳一個 rejected promise。然後出現 unhandled promise rejection
yep
我是覺得 await 才會把 rejected promise 轉成 throw 還算單純
不過 return 時自動 await 也是一個有趣的思維
mofas 10:35:14
https://www.nginx.com/products/nginx-unit/

NGINX

NGINX Unit

A new, lightweight, open source application server from NGINX designed to meet the demands of today's dynamic and distributed applications.

可以丟掉 pm2 直接用 nginx unit 的意思ㄇ
mofas 10:35:18
這東西酷酷的
Michael Hsu 17:58:38
macros
https://twitter.com/kentcdodds/status/906058860493922305

twitter

If you're curious what babel-macros is, check this thread out: <https://github.com/facebookincubator/create-react-app/issues/2730>

2017-09-09

mofas 10:40:30
https://twitter.com/reasonml/status/906287081332252673

twitter

<http://Messenger.com> is now 50% converted to Reason! <https://reasonml.github.io/community/blog/#messengercom-now-50-converted-to-reason>

1

2017-09-10

mrorz 09:48:24
咦,沒人貼
https://facebook.github.io/react/blog/2017/09/08/dom-attributes-in-react-16.html

facebook.github.io

DOM Attributes in React 16 - React Blog

In the past, React used to ignore unknown DOM attributes. If you wrote JSX with an attribute that React doesn't recognize, React would just skip it. For example, this:

2017-09-11

jihchi 09:27:58
https://twitter.com/mikeal/status/906941746919071744

Re-thinking the Node.js ecosystem for modern JavaScript. medium.com/@mikeal/modern

twitter

Re-thinking the Node.js ecosystem for modern JavaScript. <https://medium.com/@mikeal/modern-modules-d99b6867b8f1>

2017-09-12

jihchi 09:09:08
https://twitter.com/kentcdodds/status/907258340304084994

I blogged something on the babel blog!
babeljs.io/blog/2017/09/1
"Zero-config code transformations with babel-macros :fishing_pole_and_fish:"

Enjoy and share!

twitter

I blogged something on the babel blog! <https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros> "Zero-config code transformations with babel-macros :fishing_pole_and_fish:" Enjoy and share!

SKY 17:18:02
@sky has joined the channel
jihchi 19:28:13
https://twitter.com/wsokra/status/907565441681428480

#webpack Logbook week 22 - 23

Details about the new plugin system

API, performance, typing => very technical post

twitter

#webpack Logbook week 22 - 23 Details about the new plugin system API, performance, typing =&gt; very technical post <https://medium.com/webpack/the-new-plugin-system-week-22-23-c24e3b22e95>

2017-09-13

mofas 05:21:05
https://twitter.com/atomeditor/status/907656864984309760

twitter

Introducing Atom IDE: <http://blog.atom.io/2017/09/12/announcing-atom-ide.html> <https://pbs.twimg.com/media/DJilEA6UQAA_6nd.jpg>

mofas 05:21:14
https://twitter.com/kentcdodds/status/907258340304084994

twitter

I blogged something on the babel blog! <https://babeljs.io/blog/2017/09/11/zero-config-with-babel-macros> "Zero-config code transformations with babel-macros :fishing_pole_and_fish:" Enjoy and share!

mofas 05:24:32
https://twitter.com/tkh44/status/907695279926689793

So useful

twitter

babel-plugin-sitrep Just add `// sitrep` above your fn and the plugin will log vars and return value. <https://github.com/tkh44/babel-plugin-sitrep> <https://pbs.twimg.com/media/DJjHh6_UEAAFnBx.jpg>

jihchi 10:40:42
https://twitter.com/mylesborins/status/907629749559812096

🎉🎉🎉🎉

Happy @nodejs Current Release Day
Special ESModules edition
--experimental-modules

$ nvm install 8.5.0

nodejs.org/en/blog/releas

:tada:🎉🎉🎉

twitter

:tada::tada::tada::tada: Happy <https://twitter.com/nodejs|@nodejs> Current Release Day Special ESModules edition --experimental-modules $ nvm install 8.5.0 <https://nodejs.org/en/blog/release/v8.5.0/> :tada::tada::tada::tada:

mofas 22:29:52
https://twitter.com/sublimehq/status/907956818994851840

twitter

Sublime Text 3.0 is out! - <https://www.sublimetext.com/blog/articles/sublime-text-3-point-0>

mofas 23:18:19
速度爆快呀!!

2017-09-14

mrorz 01:23:07
sublimetext 本來就比 atom 與 vs code 快呀 xd
jihchi 07:42:41
可⋯可惡,速度與功能性,我選擇了功能性!
mofas 10:19:53
結果我9成的時間都是在用emacs
我現在改用 VSCode + Vim
👏 3
mofas 10:21:18
@jihchi 你可以跟我講一次 appier-create-react-app 裡面有啥嗎
css-modules 跟 absolute path
沒了
還有 react-hot-loader
react-hot-loader 不是 create-react-app 內建的嗎
我怎麼印象中還有 redux-duck 以及 immutable-js?
CRA 預設 hot reload 是靠 webpack HMR
好喔好喔
雖然我不清楚差別 XD
redux-duck & immutable.js 不需要動到 config,是出廠預設幫你安裝,但不是必要
最大差別在 React 的 state persistence
Michael Hsu 2017-09-14 11:04:12
請問一下
上次聽你們也有用 react-app-rewired
? 哪個做法比較好呢
看情況。
rewired 是為了 transition 使用。
有時候讓 legacy project 可以先用 customized CRA,配上 rewired。
Michael Hsu 2017-09-14 11:10:17
那你們怎麼決定要把哪些拉進
fork 版的 CRA
像有些不同專案沒用 redux 用 apollo 怎辦
主要是考量要不要改到 wepback / babel / etc. 這些 tools config
redux, immutable 這類都是 package,不用改 config 也能支援
除非你想用像是 lodash 配上 babel plugin 做些額外優化功能,那才會動到 CRA
Ideally,我個人是覺得盡量用原生 CRA 就好。慢慢的有其他替代方案,就可以淘汰掉客製 CRA
eg. css-modules v.s. styled-components
最近你貼的 macro 就很 promising
Michael Hsu 2017-09-14 11:14:51
對啊 有了 macro 就方便多了
有點想偷跑放在客製 CRA,不過 macro 的 packages 現在比較少,我們目前需要的地方還不多,所以還沒偷跑
Michael Hsu 2017-09-14 11:16:31
偷跑也不錯
像css modules 支援討論串超長
等了好久
嗯,其實裝下去也沒差,弄個怪獸 CRA 也不是不行。要看你的需求。目前 css-modules 是普遍接受的解法,就放進去。
@jihchi 有支援.less 和plain .css嗎?
@mofas less 不支援,要用 rewired 加。plain CSS 要用 global 去寫,src 裡面預設開 css-modules
cf199218 14:58:49
@cf199218 has joined the channel
jihchi 22:03:46
https://twitter.com/dan_abramov/status/908320023529357312

React 16 RC3 is out. It is very close to what the final version will be like. Last chance to report issues! github.com/facebook/react

twitter

React 16 RC3 is out. It is very close to what the final version will be like. Last chance to report issues! <https://github.com/facebook/react/issues/10294#issuecomment-329479679> <https://pbs.twimg.com/media/DJsAPSIXgAAzzkq.jpg>

2017-09-15

jihchi 08:59:51
https://twitter.com/suchipi/status/908381181623771136

Just published Prettier 1.7.0: JSX tweaks, Pragma support, TypeScript and CSS fixes, and more!

twitter

Just published Prettier 1.7.0: JSX tweaks, Pragma support, TypeScript and CSS fixes, and more! <https://github.com/prettier/prettier/releases/tag/1.7.0>

jihchi 09:01:04
https://twitter.com/iamdevloper/status/908335750797766656

twitter

1/3 of US bandwidth is used by Netflix... the rest is used by `rm -rf node_modules &amp;&amp; npm install`

jihchi 09:28:22
https://twitter.com/chromiumdev/status/908363533766860800

ES6 modules have landed in Chrome 61 @DasSurma shows how to make the split between old & new browsers⚡Supercharged: goo.gl/zCpmqJ

twitter

ES6 modules have landed in Chrome 61 <https://twitter.com/DasSurma|@DasSurma> shows how to make the split between old &amp; new browsers:zap:Supercharged: <http://goo.gl/zCpmqJ>

jihchi 19:40:11
https://twitter.com/leogcrespo/status/908330825044951040

Created github.com/leoasis/graphq…, a babel-macro to precompile gql calls. It supports interpolation! Feedback welcome @kentcdodds @stubailo

twitter

Created <https://github.com/leoasis/graphql-tag.macro>, a babel-macro to precompile gql calls. It supports interpolation! Feedback welcome <https://twitter.com/kentcdodds|@kentcdodds> <https://twitter.com/stubailo|@stubailo>

jihchi 19:43:48
https://twitter.com/kosamari/status/859958929484337152

HTTP what? : I drew what HTTP is & how HTTP1.x and HTTP2 are different:sparkles:

(tweetzine, drawsplainer, codedoodles…I don't know what to call it)

twitter

HTTP what? : I drew what HTTP is &amp; how HTTP1.x and HTTP2 are different:sparkles: (tweetzine, drawsplainer, codedoodles…I don't know what to call it) <https://pbs.twimg.com/media/C-8t5rGWsAAFHwF.jpg>

<https://pbs.twimg.com/media/C-8t64sXYAEf7GG.jpg>

<https://pbs.twimg.com/media/C-8t70YXoAEShUL.jpg>

ggm 19:49:51
圖好厲害!

2017-09-16

mofas 01:29:07
https://twitter.com/burkeholland/status/908743236826669056

twitter

React Snippets For <https://twitter.com/code|@code> has been updated with better React-ness. Special thanks to <https://twitter.com/dan_abramov|@dan_abramov> for reviewing. <http://cda.ms/19>

mofas 01:29:40
我怎覺得 Editor 有當年Browser 大戰的感覺
mofas 01:30:02
ST vs Atom vs VSCODE

2017-09-17

mofas 08:56:24
https://twitter.com/code/status/909175370741563392

twitter

New release of the <https://twitter.com/Docker|@Docker> extension for <https://twitter.com/code|@code> published. Adds explorer support, a new language service, and more. <https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker>

1
mofas 08:58:40
https://twitter.com/vladholubiev/status/908984943950401536

twitter

Something new is coming in <https://twitter.com/babeljs|@babeljs> 7 :fire: <https://pbs.twimg.com/media/DJ1c-76XUAACypj.jpg>

😍 2

2017-09-18

mofas 07:24:45
阿 想問一個跟前端無關的問題, 請問現在大家mongodb client 都用哪個呀..
mofas 07:24:54
我之前用mongorobo
mofas 07:25:00
現在有更好的方案了嗎
mofas 07:25:06
三個多月沒碰惹...
mofas 07:25:22
robomongo 才對
jihchi 08:22:21
RoboMongo 被收購之後改名 Robo 3T。就用這個啊,新版也支援 mongo 3 一些新功能。不然就用原生 mongo shell
mofas 09:17:02
他有兩個 Robo 3T 就原本的robomongo, 另外有出付費版 robo studio
mofas 09:19:32
另外有人用了free的 Zeit now嗎?
mofas 09:19:43
想把學校專案host在那邊
Michael Hsu 09:26:29
zeit now.sh 不錯啊
Michael Hsu 09:31:20
每個帳號是 3 個 instance quota
但是你可以先by project 申請 team 再 deploy 到該 team
也就是額度其實沒限制
mrorz 09:38:46
now 我沒用過耶,因為 URL 要錢
因為 cofacts 要 URL 所以我把他跟 DB 那些都通通塞在同一個 linode 裡
就沒用 now 了
mrorz 09:39:06
now 感覺就是要搭配 next.js 呀 XD
mofas 09:47:57
mofas 竟然已經被用掉了= =
mofas 09:50:38
那另外再問一下
mofas 09:50:48
有免費的mongodb host嗎?
mofas 09:51:02
五年前我是用mongoHQ
jihchi 09:52:18
@mofas 怎麼不用 VPS ?
mrorz 09:52:42
MongoHQ 現在叫 mLab 的樣子
mrorz 09:52:44
繼續用呀
mrorz 09:52:52
我也沒用過其他的了
mrorz 09:53:06
是說是學生的話別忘記領 github student pack
mrorz 09:53:14
應該有 digitalocean 的 coupon
mrorz 09:53:32
可以用滿久的
我的還多到被 expire Orzzzz
mofas 09:53:53
@mrorz 是啥
DigitalOcean: $50 in platform credit for new users
咦,也才 10 months
但有 sendgrid
如果你的 project 還要寄信的話
剛好一年
Cool, 我想寄信!
還有 stripe 免手續費
如果你的 project 剛好想要收錢的話(慢著
怎麼可能收錢= =
還有 transifex 一年免費
如果你的 project 要
i18n 的話
不需要
AWS 的那個優惠看不太懂
但你總會需要 s3 那些的
也可以玩玩 lambda
> Student Developer Pack members receive up to $110 in bonus AWS credits for a total of $75-$150

一個 range 的 credit 是怎麼回事 orz
嚇死人 我才不用AWS勒
之前忘記取消被收了20美
害我很不爽
我大學的時候也是呀 www
後來都有記得開 billing alert
一朝被 aws 咬,十年怕 ec2
學費啦學費
小弟學費現在很貴惹 不想自繳了
@mrorz 你可以跟我講一下sendgrid的寄email服務嗎?
我看他沒有綁github呀
我也沒親自用過,我是看這裡有
https://education.github.com/pack
> Student plan 15K free emails/month (normally limited to 200 free emails/day) while you’re a student
喔 找到了, 在最下面點進去那一頁有connect to github account
感謝
寄信我這裡也有個自用 mail service... 有需要可以找我
mofas 09:54:01
要怎麼領
mofas 09:54:07
@jihchi VPS是啥 lol
jihchi 09:54:36
@mofas 就是 linode, GCP, AWS 這類... 不過你要免費的齁
mofas 09:54:38
一個月五塊超貴的好ㄇ, 請考慮一下學生
mofas 09:54:57
一定要 FREEEEEE
jihchi 09:55:06
@mofas 你需要玩玩嗎?我手上有台 VPS 沒在用
jihchi 09:55:12
已經是年繳了,給你玩
mofas 09:55:14
可以呀
mofas 09:55:22
反正就host智障project
jihchi 09:55:49
好啊
mofas 10:14:15
Now 的DX真好
mofas 10:14:21
已經deployed上去惹 lol
mrorz 10:26:50
恭喜恭喜
不過 PaaS 的雷都是發生在後面的階段 lol
mofas 10:30:32
剛說完就雷惹
mofas 10:30:53
想跑 compiled 後的index.js 就出現 Error: EACCES: permission denied
mofas 10:31:12
不錄了不錄了
mofas 10:45:03
有學生身份真爽 假如大家有需要美國學生身份的話 請跟我說 😛
mofas 12:25:03
https://medium.com/@bfil/just-enough-functional-programming-a0c4fd09c8f7?source=userActivityShare-9a43ce6fbe46-1505708698

Medium

Just Enough Functional Programming – Bruno Filippone – Medium

I absolutely love functional programming. It does help in a lot of ways, but you should keep in mind that you can still end up with a…

2017-09-19

mofas 06:05:42
最近react patent 越吵越高潮啦
https://twitter.com/dan_abramov/status/909878289929515010

twitter

BREAKING: Comey says React patents no longer under FBI investigation

mofas 08:47:01
https://twitter.com/AndrewDelPrete/status/909904525695213568

twitter

Still digging <https://twitter.com/code|@code> ext 'vscode-exports-autocomplete'. It saves me a substantial amount of time and helps avoid loss of focus.

可以支援剪下貼上真的超威
雖然我這裡好像沒辦法試出來 XD
2
mofas 08:47:20
VS太威了
jihchi 09:16:24
Déjà Fu : A Concurrency Testing Library for Haskell
https://www.barrucadu.co.uk/publications/YCS-2016-503.pdf
jihchi 10:33:49
https://github.com/facebookincubator/create-react-app/issues/2206 正在討論 vendor 跟 app 分開

GitHub

Split vendor and app into separate files · Issue #2206 · facebookincubator/create-react-app

NOT AN ISSUE but a feature request. imo, it would be beneficial for splitting the js bundle into app and vendor files. My app code keeps changing but vendor dependencies rarely change. splitting i...

mofas 10:46:08
有autoDll
mofas 10:46:09
https://github.com/asfktz/autodll-webpack-plugin

GitHub

asfktz/autodll-webpack-plugin

autodll-webpack-plugin - Webpack's DllPlugin without the boilerplate

mofas 10:46:14
有人踩了嗎
沒耶,3 秒 hot reload 對我來說夠快惹
我300ms就受不了了
但我更討厭 cache invalidation XD
node_module應該不常改, 外加他有自動invalidation
mofas 11:04:35
話說有沒有人整VS Code for React developing呀?
那只有debugger, 我說的是VS Code 你用來開發會用到的所有plugin, 像是syntax highlight, snippet, exports-autocomplete,
atom有個plugin 會把你editor config都存起來, 然後你可以share, 所以每個新人來不用再從新裝一遍
Michael Hsu 2017-09-19 11:14:00
我都用 sync 到 gist 那套做備份
有點像是Nucilde 的概念.. (不知道有沒有打錯)
但是Nuclide不知道死去哪惹
Michael Hsu 2017-09-19 11:14:26
react 開發的話 應該要裝
sublime babel css in js 才會顏色正常
Michael Hsu 2017-09-19 11:15:10
但是目前碰到無解的是 css in js
無法 intellisense
vscode settings sync
現在VS Code第一個做language server protocol
Michael Hsu 2017-09-19 11:15:30
所以要寫 css 我只好打開 atom
照理應該做得出Nuclide的效果惹
template string 裡的 syntax highlight 可以用 template literal editor
vscode-template-literal-editor
Michael Hsu 2017-09-19 11:16:31
@mrorz 看你有用 styled-jsx
你有碰到這個狀況嗎
Michael Hsu 2017-09-19 11:16:33
喔喔
styled-jsx 應該有 package
Michael Hsu 2017-09-19 11:16:48
我好像有看到那個
但是就不是很方便
欸欸 你們還有再開會嗎 不開會tech stack 會stackoverflow喔
Michael Hsu 2017-09-19 11:17:28
styled-component 也有出套件
但有 bug
@mofas 有開過呀
我們現在有導入 rxjs
styled-jsx 我的確是用 vscode-styled-jsx
styled component 的話就要問 @kcliu@yhsiang
我 styled-jsx 用一用發現我的用法都是
styled-component 是我留下來的legacy (遮臉)
Michael Hsu 2017-09-19 11:20:12
你們 bundle size 不都hen 嚴格
導入 rxjs 會不會太大?
1. 開一個 compoent
2. 在 render 裡頭立刻再開一個 <style jsx={` .root {...}`} />
幾乎很少用到其他 selector 來選更深的元素,因為更深的元素我又會想開另一個 component
到頭來就會變成,乾脆用 styled component 不是就好了嗎 (扶額
Michael Hsu 2017-09-19 11:21:36
@mofas 有建議更好的好選擇嗎
我一段時間沒追了, 但是styled-component 除了perf 不太好之外, 他活得還不錯..
glamorous 也沒幹掉他
其實我覺得 css-in-js 大概就是 styled-component 吧,強制把 style 拆小其實還不錯

要嚴守 css 的話那就原本的 css modules

其他 solution 我覺得都在中間,是可以嘗試沒錯,不過如果你原本就在 styled-component 或 css modules 陣營的話,從這兩端跳到中間的 solution 我覺得都不太值得
styled-component 的 perf 是?
styled-component 有run time overhead
production 的時候他不是會抽 stylesheet 嗎?
Michael Hsu 2017-09-19 11:24:36
不會
基本上你感覺不出來.. 他做法是js 動態生成css stylesheet lol
Michael Hsu 2017-09-19 11:25:10
你們試過 emotion 了嗎
Michael Hsu 2017-09-19 11:26:00
https://github.com/emotion-js/emotion
api 跟 sc 一樣 效能優化
也出了macros
但是用的人不多, 所以support有點少..
styled-component 有100k download/per week
他只有 1k - -
Michael Hsu 2017-09-19 11:28:07
恩 我的專案也都還是 sc
Michael Hsu 2017-09-19 11:28:22
emotion 觀望中
重看了 https://medium.com/seek-blog/a-unified-styling-language-d0c208de2660
才發現會抽 style 的是其他套的 css-in-js QQ
他是說 `This is generating real CSS, not inline styles.`
嗯,確實沒說是抽成 stylesheet QQ
jihchi 18:54:08
https://twitter.com/ryanflorence/status/909980722668101633

Watch the black square:

twitter

Watch the black square: <https://twitter.com/acdlite/status/909926793536094209>

twitter

Ever wonder what "async rendering" means? Here's a demo of how to coordinate an async React tree with non-React work <https://gist.github.com/acdlite/f31becd03e2f5feb9b4b22267a58bc1f>

block main thread 是指 vdom diff 會 block main thread 嗎
我以為是 dom insertion 才會 block,而 react 應該碰不到 dom insertion 的效能 @@
block 有 calculation 都會吧.. diff, rendering, ..., rendering 就包含 diff, DOM operation ?

2017-09-20

jihchi 09:02:02
https://twitter.com/captbaritone/status/910163720160124928

twitter

After more than a year of idle tinkering, the Winamp equalizer window is finally live on <https://jordaneldredge.com/projects/winamp2-js/>!

😂 1
jihchi 09:02:45
https://twitter.com/mhaagens/status/910193469582450688

twitter

<https://twitter.com/mweststrate|@mweststrate> <https://twitter.com/TheLarkInn|@TheLarkInn> <https://twitter.com/dan_abramov|@dan_abramov> HMR heaven with #mobxstatetree, #Webpack and #reacthotloader :fire::tada:

jihchi 09:03:01
https://twitter.com/mxstbr/status/910227817891336192

twitter

:tada: Excited to announce production-ready <https://twitter.com/stylelint|@stylelint> support for :nail_care: styled-components! :clap: Great work <https://twitter.com/emilgoldsmith|@emilgoldsmith>! <https://medium.com/styled-components/announcing-production-ready-linting-for-styled-components-58adcdc4a97>

jihchi 09:32:07
https://blog.acolyer.org/2017/09/19/to-type-or-not-to-type-quantifying-detectable-bugs-in-javascript/

the morning paper

To type or not to type: quantifying detectable bugs in JavaScript

To type or not to type: quantifying detectable bugs in JavaScript Gao et al., ICSE 2017 This is a terrific piece of work with immediate practical applications for many project teams. Is it worth the extra effort to add static type annotations to a JavaScript project? Should I use Facebook&rsquo;s Flow or Microsoft&rsquo;s TypeScript if so? Will they really catch bugs that would otherwise have made it to master? TL;DR: both Flow and TypeScript are pretty good, and conservatively either of them can prevent about 15% of the bugs that end up in committed code. &ldquo;That&rsquo;s shocking. If you could make a change to the way we do development that would reduce the number of bugs being checked in by 10% or more overnight, that&rsquo;s a no-brainer. Unless it doubles development time or something, we&rsquo;d do it.&rdquo; &ndash; engineering manager at Microsoft. (It&rsquo;s amusing to me that this quote comes from a manager at the company where they actually develop TypeScript! You&rsquo;d think if anyone would know about the benefits&hellip;. Big companies eh). Let&rsquo;s dig in. The flame wars Static vs dynamic typing is always one of those topics that attracts passionately held positions. In the static typing camp we have the benefits of catching bugs earlier in the development cycle, eliminating altogether some classes of bugs in deployed systems, improved things like code-assist and other tool support, and enabling compiler optimisations. In the dynamic typing camp we have cleaner looking code, and greater flexibility and code malleability. JavaScript is dynamically typed. Three companies have viewed static typing as important enough to invest in static type systems for JavaScript: first Google released Closure, then Microsoft published TypeScript, and most recently Facebook announced Flow. Shedding some light through empirical data Inspired by previous studies in other areas, the authors study historical bugs in real world JavaScript projects in GitHub. The fact that long-running JavaScript projects have extensive version histories, coupled with the existing of static type systems that support gradual typing and can be applied to JavaScript programs with few modifications, enables us to under-approximately quantify the beneficial impact of static type systems on code quality. In other words, if the developers had been taking advantage of TypeScript or Flow at the time, would the bug have made it past the type checker? If not, it&rsquo;s reasonable to assume it would never have been committed into the repository in the first place. Here&rsquo;s an example of a trivial bug that type annotations can detect: Through this process, we end up with an under-estimation of the total benefits that might be available through static type checking. In the Venn diagram below, we see on the left the universe of bugs that can potentially be detected by a statically checked type system. Type checking may help catch some of these faster during development. On the right we see bugs that have made it into public repositories. Only a subset of these have clearly linked fixes / patches. This study looks at the intersection of type-system detectable bugs and those that have public fixes. We consider public bugs because they are observable in software repository histories. Public bugs are more likely to be errors understanding the specification because they are usually tested and reviewed, and, in the case of field bugs, deployed. Thus, this experiment under-approximates static type systems&rsquo; positive impact on software quality, especially when one considers all their other potential benefits on documentation, program performance, code completion, and code navigation. Finding bugs to study The goal is to find a corpus of bugs to study that is representative of the overall class, and large enough to support statistical significance. Finding representative bugs is addressed by uniform sampling. The authors sample commits that are linked to a GitHub issue from a snapshot of all publicly available JavaScript projects on GitHub. Each is then manually assessed to determine whether or not it really is an attempt to fix a bug (as opposed to a feature enhancement, refactoring, etc.). For the commits that pass this filter, the parent provides the code containing the bug. To report results that generalize to the population of public bugs, we used the standard sample size computation to determine the number of bugs needed to achieve a specified confidence interval. On 19/08/2015, there were 3,910,969 closed bug reports in JavaScript projects on GitHub. We use this number to approximate the population. We set the confidence level and confidence interval to be 95% and 5%, respectively. The result shows that a sample of 384 bugs is sufficient for the experiment, which we rounded to 400 for convenience. At the end of the sampling process, the bug pool contained bugs from 398 different projects (two projects happened to have 2 bugs each in the corpus). Most of these bug fixing commits ended up being quite small: about 48% of them touched only 5 or fewer lines of code, with a median of 6. Bug assessment process To figure out how many of these bugs could have been detected by TypeScript and Flow, we need some rules for how far we&rsquo;re prepared to go in adding type annotations, and long long we&rsquo;re prepared to spend on it. A preliminary study on a smaller sample of 78 bugs showed that for almost 90% a conclusion could be reached within 10 minutes, so the maximum time an author was allowed to spend annotating a bug was set at 10 minutes. Each bug is assessed both with TypeScript (2.0) and with Flow (0.30). To reduce learning effects (knowledge gained from annotating with one system speeding annotation with the other), the type system to try first is chosen at random. The process is then to read the bug report and the fix and spend up to the allotted ten minutes adding type annotations. Sometimes the tools can detect the bug without needing any annotations to be added at all. Other times the report will make it clear that the bug is not type related &ndash; for example a misunderstanding of the intended application functionality. In this case the bug is marked as type-system undetectable. We are not experts in type systems nor any project in our corpus. To combat this, we have striven to be conservative: we annotate variables whose types are difficult to infer with any. Then we type check the resulting program. We ignore type errors that we consider unrelated to this goal. We repeat this process until we confirm that b is ts-detectable because ts throws an error within the patched region and the added annotations are consistent (Section II), or we deem b is not ts-detectable, or we exceed the time budget M. Details of the approach used to gradually add type annotations are provided in section III.D. Does typing help to detect public bugs? Of the 400 public bugs we assessed, Flow successfully detects 59 of them, and TypeScript 58. We, however, could not always decide whether a bug is ts-detectable within 10 minutes, leaving 18 unknown. The main obstacles we encountered during the assessment include complicated module dependencies, the lack of annotated interfaces for some modules, tangled fixes that prevented us from isolating the region of interest, and the general difficulty of program comprehension. The 18 unknown bugs are then investigated to conclusion, at which point the score is 60 each for TypeScript and Flow. Running the binomial test on the results shows that, at the confidence level of 95%, the true percentage of detectable bugs for Flow and TypeScript falls into [11.5%, 18.5%] with mean 15%. Flow and TypeScript largely detect the same bugs: Which is better: Flow or TypeScript? The bugs that the two systems can detect largely overlap, with just 3 bugs that are only detected by TypeScript, and 3 that are only detectable by Flow. All…

jihchi 10:35:14
@mofas https://gitlab.com/gnachman/iterm2/issues/6050 https://www.iterm2.com/downloads.html Upgrade to 3.1.1 !

GitLab

Please disable 'Perform DNS lookups to check if URLs are valid?' by default (#6050) · Issues · George Nachman / iterm2

Thanks for filing an issue! Please answer the questions below so I can help you. * iTerm2 version: 3.0.15 * OS version: 10.12.6 * does not seem necessary: Attach ~/Library/Preferences/com.googlecode.iterm2.plist...

iterm2.com

Downloads - iTerm2 - Mac OS Terminal Replacement

iTerm2 is a replacement for Terminal and the successor to iTerm

mofas 10:55:35
已uddate..
mofas 10:57:01
extremely serious leak. lol
🚨 2
jihchi 18:56:09
https://twitter.com/siuying/status/910343894365347842

twitter

對於用 GraphQL 的用家來說,如果 Facebook 沒為其發明拿專利,反而專利蟑螂拿了,那才是最可怕吧 <https://twitter.com/ruanyf/status/910317438817910784>

twitter

FB对GraphQL拥有专利,有人质疑,是否可以放心使用该技术? 这跟React还不同,因为它只是一份规格,还不是软件。这意味着,任何GraphQL的实现都侵犯FB的专利,除非有授权。Gitlab已经声明,将暂停部署GraphQL。<https://github.com/facebook/graphql/issues/351>

2017-09-21

mofas 10:46:11
https://twitter.com/code/status/910620246477639680

twitter

Don't forget about <https://twitter.com/code|@code> shortcut 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/DKMsRVyUIAAOnXe.jpg>

jihchi 18:52:30
https://twitter.com/jasnell/status/910679453554008064

twitter

PSA: Node.js 8.6.0 is scheduled for release next Tuesday (26/9). Most significant change is the removal of the N-API cli flag.

2017-09-22

mofas 02:52:58
https://speakerdeck.com/robbiemccorkell/mixing-reasonml-into-your-react-apps

Speaker Deck

Mixing ReasonML into your React apps

ReasonML is a super interesting language and toolset but not all of us have the luxury of a brand new greenfield project to use it in. In this talk I'll explore some of the methods Bucklescript provides to mix ReasonML together with the Javascript in your projects. I'll also explore some ideas on the best areas in your project to get started converting JS to Reason, and the benefits you'll gain from doing so.

jihchi 08:57:23
https://twitter.com/ngx_vbart/status/910643130554290176

If somebody is still wondering why we created yet another application server, here's a wonderful demo of NGINX Unit:

twitter

If somebody is still wondering why we created yet another application server, here's a wonderful demo of NGINX Unit: <https://www.youtube.com/watch?v=I4IWEz2lBWU>

jihchi 08:58:44
https://twitter.com/wu_ct/status/910914616540012545

I've shared about Recompose in the Front-end Developers Taiwan meetup today and here is the slide. #react #recompose

twitter

I've shared about Recompose in the Front-end Developers Taiwan meetup today and here is the slide. #react #recompose <https://speakerdeck.com/wuct/simplify-your-react-component-with-recompose>

💯 2
jihchi 09:03:14
https://twitter.com/mattpodwysocki/status/910925018598699009

twitter

Good wrapup of the Dojo world and state of JS from SitePen and how Reactive architectures via Observables are common <https://www.sitepen.com/blog/2017/01/25/state-of-javascript-2017/>

jihchi 09:06:01
https://twitter.com/jaredforsyth/status/910870746150338561

twitter

wowww this is *really* cool and useful, especially for those just learning React <https://twitter.com/james_k_nelson/status/910806625342038016>

twitter

I've added two new #reactjs lifecycle simulators. Now you can step through prop and state updates. <https://reactarmory.com/guides/lifecycle-simulators#State-updates>

jihchi 09:11:21
https://twitter.com/kentcdodds/status/910864672957489153

This is terrific! If you're not quite comfortable with the JavaScript all the kids are writing these days, see:

twitter

This is terrific! If you're not quite comfortable with the JavaScript all the kids are writing these days, see: <https://github.com/mbeaudru/modern-js-cheatsheet>

jihchi 09:12:36
https://twitter.com/anvaka/status/910921384926134273

Announcing ridiculously fast path finding library for graphs.

youtube.com/watch?v=hGeZuI… - video
anvaka.github.io/ngraph.path.de… - live

twitter

Announcing ridiculously fast path finding library for graphs. <https://www.youtube.com/watch?v=hGeZuIEV6KU> - video <https://anvaka.github.io/ngraph.path.demo/> - live

mofas 13:05:22
someone want to share HOC recently?
Michael Hsu 13:36:18
mixin 不是被拔了?
Michael Hsu 13:40:40
喔沒事 
mixin => hoc => Function as Child Components

2017-09-23

jihchi 07:18:06
> We'll include the license updates with React 16's release next week.
mofas 07:53:34
哎呀 大家都看到了
mofas 07:53:49
這樣很多人就沒得嘴了
mofas 07:54:32
The bad news is graphql is not included.
mofas 07:54:54
Maybe spec is more complex..
jihchi 22:17:03
好期待 GraphQL 的結果喔~~

2017-09-24

mofas 04:29:49
先看看zeit好惹
支持支持
這樣就可以開票給你修 XDDD
欸欸 快給我. 投他們履歷要寫對他們產品feedback,
我對 next 好像沒發啥 issue 就是了 XD
還是你可以讀一下這個 next.js 專案,覺得任何不順眼的地方可以問我,我可以告訴你這是我自己的問題還是 next.js 的限制
https://github.com/cofacts/rumors-site
mofas 04:30:32
想投zeit internship
Michael Hsu 15:03:24
zeit 好猛
mofas 23:50:22
@jihchi react-script-appier Module not found: Can't resolve 'react-router-redux'
讓我檢查檢查
`yarn add classnames history immutable react-redux react-router-dom react-router-redux@next redux redux-duck redux-thunk`
抱歉, init 常常 merge master 之後就被遺漏這些 deps
mofas 23:54:07
redux 系列的都沒進dep

2017-09-25

mofas 00:02:02
哇 所有dep都沒進 全部要一個一個檢查
🙇 1
jihchi 08:23:36
https://twitter.com/madbyk/status/912026167066152960

Just released @yarnpkg v1.1.0 now. It comes with a big performance gain on Node 8.5 and with a DNS cache. Give it a try!

twitter

Just released <https://twitter.com/yarnpkg|@yarnpkg> v1.1.0 now. It comes with a big performance gain on Node 8.5 and with a DNS cache. Give it a try!

jihchi 09:04:17
https://twitter.com/jusrin00/status/912088247026831367

twitter

using PureScript without Bower is easy -- you can get psc-package and use it to set a package set and add deps <https://github.com/purescript/psc-package> <https://pbs.twimg.com/media/DKhizQ5WsAE-q2g.jpg>

jihchi 09:07:52
https://twitter.com/rauchg/status/912038524739833858

twitter

Hyper 2.0 Canary just got much better :rocket: <https://github.com/zeit/hyper/releases/tag/2.0.3> <https://pbs.twimg.com/media/DKg2GedW4AIGYJg.png>

mofas 09:49:11
https://twitter.com/yarnpkg/status/912131516016267264

twitter

Yarn 1.1.0 is up to 35% faster. <https://twitter.com/madbyk/status/912026167066152960>

twitter

Just released <https://twitter.com/yarnpkg|@yarnpkg> v1.1.0 now. It comes with a big performance gain on Node 8.5 and with a DNS cache. Give it a try!

mofas 09:49:15
blazing fast.
mofas 10:43:26
想請教一下大家, 請問 git pull 有可以always overwrite remote if conflicited的指令嗎?
`git pull -X ours`

2017-09-26

jihchi 09:03:42
https://twitter.com/ebidel/status/912369751849963522

twitter

Try Puppeteer: <https://try-puppeteer.appspot.com/>. Online playground to tinker w/ headless Chrome using Puppeteer’s Node API. <https://github.com/GoogleChrome/puppeteer> <https://pbs.twimg.com/media/DKljc8FVAAAw5Gr.png>

jihchi 09:04:41
https://twitter.com/am_i_tom/status/912387430203969536

twitter

Gonna re-retweet because this is *brilliant* and you should all read it <https://twitter.com/Lowert/status/912367658997338112>

twitter

Wrote a blog post on type-level parsing in #purescript <http://kcsongor.github.io/purescript-safe-printf/>

jihchi 09:09:07
https://twitter.com/xander76/status/912458594322386944

twitter

I wrote an article all about the React 16 changes to server-side rendering: arrays, perf, streaming, and more! <https://medium.com/@aickin/whats-new-with-server-side-rendering-in-react-16-9b0d78585d67?source=linkShare-1dcba27e6a5c-1506381942>

jihchi 09:43:03
https://code.tutsplus.com/tutorials/6-things-that-make-yarn-the-best-javascript-package-manager--cms-29465

Code Envato Tuts+

6 Things That Make Yarn the Best JavaScript Package Manager

Yarn is an open-source npm client that was developed at Facebook and improves on many aspects of the standard npm client. In this tutorial, I'll focus on the top six features that make Yarn...

mofas 10:42:14
Untitled
mofas 10:42:29
@jihchi
jihchi 10:42:42
有喔
jihchi 10:42:45
老蘇有問我
mofas 10:42:56
你們登的進去嗎
mofas 10:43:14
我有留red hat的帳密嗎?
mofas 10:44:02
還是你們要重新創世 XD
jihchi 10:44:51
我不太清楚這是什麼耶 XD
jihchi 10:45:20
老蘇問我我以為是 @yhsiang
mofas 10:46:06
就是公司部落格
mofas 10:46:14
是架在redhat上...
mrorz 10:56:49
oh不
我在上面有兩個 project QAQ
jihchi 10:59:09
竟然沒有人生可以選
yhsiang 10:59:51
我下午處理這個
mrorz 11:01:19
openshift v3 free account 好像只能有一個 project
mrorz 11:01:26
只好申請兩個帳號(炸
yhsiang 11:04:04
@mrorz 你可以付錢就好啦
mrorz 11:04:33
選 openshift 就是要貪小便宜呀 w
mrorz 11:04:49
不然我寧願通通塞 linode 呢
jihchi 11:14:18
塞,都塞
jihchi 17:55:56
https://twitter.com/addyosmani/status/912556308649304064

twitter

JavaScript's dynamic import() is shipping in Chrome! Lazy-load ES modules when a user needs them :fire: <https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/ut-Mr0jt5X8> <https://pbs.twimg.com/media/DKoLTtrU8AAuZzO.jpg>

yhsiang 18:12:56
https://blog.openshift.com/migrating-wordpress-openshift-3/ 看來要放棄 openshift 了

OpenShift Blog

Migrating Wordpress to OpenShift Online 3 Paid Tier – OpenShift Blog

Migrate an existing WordPress site from OpenShift Online 2 to the new version of OpenShift Online 3 using the Pro tier.

yhsiang 18:13:11
starter 只有 1G,開給 mysql 就滿了 ..
yhsiang 18:13:16
而且最低一定要開 1G
mrorz 18:17:31
塊陶啊
mofas 23:14:48
http://web.stanford.edu/class/cs145/
聽說是門好課, 今天才第一天上課.. 我都開學一個月了..
👍 2

2017-09-27

mofas 01:32:03
https://twitter.com/leeb/status/912725069125763072

twitter

We’re relicensing the GraphQL spec under the Open Web Foundation Agreement v1.0 and GraphQL.js &amp; Relay under MIT. :tada: <https://medium.com/@leeb/relicensing-the-graphql-specification-e7d07a52301b>

3
mofas 01:32:22
GraphQL 是 MIT了 爽爽用ㄅ
mofas 03:55:57
https://facebook.github.io/react/blog/2017/09/26/react-v16.0.html

facebook.github.io

React v16.0 - React Blog

We're excited to announce the release of React v16.0! Among the changes are some long-standing feature requests, including fragments, error boundaries, portals, support for custom DOM attributes, improved server-side rendering, and reduced file size.

btw React 16 拿掉 patent grant,其實會有疑慮呢。

GraphQL 的 OWFa 考量到 spec 有 patent 問題,因此有 patent grant 段落。但 MIT 是自由軟體用的,預設沒 patent 所以也沒有在 license 裡提到 patent。所以可能反而比原本的 BSD + patent 還有問題。

https://medium.com/@dwalsh.sdlr/reacts-new-mit-license-the-circus-enters-it-s-third-ring-2f1bf989a67f

文章下頭的 comments 有提到到兩個可能性:

1. (陰謀論) Facebook 把 license 改成更開放的 MIT 可以讓社群風向轉向、大家以為沒 patent 就繼續用,這樣一來 Facebook 就能更容易用 patent 告人。
2. (性善說) Facebook 手上的 patent 沒有 cover 到 React v16 implementation,所以不需要 grant。理由是,Facebook 其實是有把其他 patent 相關 project 改到有 patent grant 的 Apache v2 的,因此 React v16 改成 MIT 或許是因為 patent 根本沒 cover 到。
既然 react v16 對 SSR 有新 support,next.js 也會需要更上唷
https://github.com/zeit/next.js/issues/3000
👏 1
mofas 04:19:58
https://twitter.com/sebmck/status/912768707168018433

twitter

I'm making the switch to VSCode

mofas 11:18:21
https://blog.kentcdodds.com/automation-without-config-412ab5e47229

kentcdodds

Tools without config :hammer_and_wrench::package: – kentcdodds

TL;DR/Spoiler alert: I’m working on a tool at PayPal called paypal-scripts and a personal one called kcd-scripts. You should try it too!

mofas 11:18:57
appier-script 比paypal-script 還早勒
mrorz 11:24:54
btw React 16 拿掉 patent grant,其實會有疑慮呢。

GraphQL 的 OWFa 考量到 spec 有 patent 問題,因此有 patent grant 段落。但 MIT 是自由軟體用的,預設沒 patent 所以也沒有在 license 裡提到 patent。所以可能反而比原本的 BSD + patent 還有問題。

https://medium.com/@dwalsh.sdlr/reacts-new-mit-license-the-circus-enters-it-s-third-ring-2f1bf989a67f

文章下頭的 comments 有提到到兩個可能性:

1. (陰謀論) Facebook 把 license 改成更開放的 MIT 可以讓社群風向轉向、大家以為沒 patent 就繼續用,這樣一來 Facebook 就能更容易用 patent 告人。
2. (性善說) Facebook 手上的 patent 沒有 cover 到 React v16 implementation,所以不需要 grant。理由是,Facebook 其實是有把其他 patent 相關 project 改到有 patent grant 的 Apache v2 的,因此 React v16 改成 MIT 或許是因為 patent 根本沒 cover 到。

Medium

React’s New MIT License: The Circus Enters Its Third Ring :admission_tickets:

I’m not one to spread fear. I actually defended Facebook’s/React’s BSD + Patents. And I held off writing this post in hopes that Facebook…

😱 2

2017-09-29

mofas 01:50:50
https://github.com/zeit/styled-jsx/pull/288

GitHub

styled-jsx v2 by giuseppeg · Pull Request #288 · zeit/styled-jsx

Premise My initial intention was to implement support for dynamic styles but along the way I had to implement a few related changes which made the scope of the PR grow a bit. This's why I think tha...

mofas 01:51:03
styled-jsx: 林北二代比emotion還快
😂 1
mofas 02:21:33
Where the strange loop begin
mofas 02:21:33
https://github.com/quchen/articles/blob/master/loeb-moeb.md

GitHub

quchen/articles

Miscellaneous articles. The readme is the table of contents.

mofas 02:21:45
話說strange loop快開始了
mofas 02:23:37
想不到距離st. louis 不到300公里還是沒能去看 = =
mofas 03:44:03
https://twitter.com/jlongster/status/913484880595574784

twitter

Slides for "My History With Papers" are here: <http://jlongster.com/s/my-history-with-papers.pdf> #PWLConf

mofas 03:46:58
看一看 發現有學長的論文..
Jerry 06:24:49
@jerry has joined the channel
jihchi 08:09:30
https://twitter.com/suchipi/status/913086818660184065

twitter

Just released Prettier 1.7.1 with a bunch of fixes, including a lot of CSS lowercasing fixes: <https://github.com/prettier/prettier/blob/master/CHANGELOG.md#171> <https://pbs.twimg.com/media/DKvvmXLUEAA7AMX.jpg>

jihchi 08:12:42
https://twitter.com/ruanyf/status/913541419041644544

twitter

面向对象编程(OOP)完全是模拟真实世界。顶层对象除了发命令,什么都不干,脏活累活都是底层对象完成的。#今日金句

jihchi 08:26:51
https://twitter.com/wesbos/status/913421431609991168

twitter

:fire: Node 8.6.0 brings support for Object Spread! Goodbye Object.assign() <https://pbs.twimg.com/media/DK0f8VPUEAA_fLv.jpg>

👍 1
jihchi 08:27:51
https://twitter.com/chantastic/status/913438799161548801

twitter

<http://reactcheatsheet.com> is up-to-date with v16 APIs. categories map better to sections in the new docs <https://pbs.twimg.com/media/DK0vOfSVAAAm4mS.png>

mrorz 15:14:41
我怎麼點都會變成顯示 http://facebook.github.io/immutable-js/docs/#/ 這頁
jihchi 15:46:56
jihchi 15:47:08
等等,不行
jihchi 15:47:35
壞了
mrorz 17:52:58
好ㄅ
https://github.com/facebook/immutable-js/issues/1205

GitHub

Broken Online Documentation · Issue #1205 · facebook/immutable-js

What happened <http://facebook.github.io/immutable-js/docs/> 's links are all broken How to reproduce Open <http://facebook.github.io/immutable-js/docs/> Click any links on the right hand side. e.g. C...

🎉 1
jihchi 19:22:09
https://twitter.com/mxstbr/status/913641386720800768

twitter

An official <https://twitter.com/Microsoft|@Microsoft> <https://twitter.com/typescriptlang|@typescriptlang> plugin for styled-components :scream::scream::scream: Get that IntelliSense and error reporting in VSCode, Sublime Text and Atom! :tada: :point_right:<https://github.com/Microsoft/typescript-styled-plugin> <https://twitter.com/mattbierner/status/913558441532071936>

twitter

Get styled components intellisense and error reporting with <https://github.com/Microsoft/typescript-styled-plugin> Supports <https://twitter.com/code|@code>, <https://twitter.com/sublimehq|@sublimehq>, and <https://twitter.com/AtomEditor|@AtomEditor>

jihchi 19:47:43
https://twitter.com/wesmharris/status/913649710413565952

twitter

A guide to a painless #React 16 upgrade: Step 1: Upgrade from React 15 End. Everything still just woks

我以為是
1. Wait for 16.0.X fix
2. Upgrade from React 15
TODO List 可以直上 16
jihchi 19:52:51
https://twitter.com/dan_abramov/status/913730763169914882

twitter

Minor neat fix in React 16: “Highlight Updates” in React DevTools now works as expected and skips PureComponents that bailed out.

2017-09-30

jihchi 08:11:18
https://twitter.com/reactjs/status/913797391307833344

twitter

Today we are excited to announce a new website: <http://reactjs.org> And we'd like to thank a few people who helped make it possible:

🚀 1
jihchi 08:17:00
https://twitter.com/ponyfoo/status/913845223381446656

twitter

:heart_eyes: Lightweight, responsive, modern drag &amp; drop library :label: #code :arrow_right_hook: <https://shopify.github.io/draggable/> <https://pbs.twimg.com/media/DK6hYqjUEAAvX5s.png>

好像還在 beta
如何與 vdom-based render lib 合作仍然未知,需要 try try 看
另外,跟 native drag/drop event 一樣,automated testing 的做法未知 @@
jihchi 08:54:21
https://spin.atomicobject.com/2017/09/29/point-free-notation/

Atomic Spin

When &amp; How Point-Free Notation Can Make Your Code More Readable

Sometimes, providing names for tangential arguments can cloud mathematical concepts. Point-free notation can help remove those distractions.

jihchi 09:16:53
https://thehftguy.com/2016/10/03/haproxy-vs-nginx-why-you-should-never-use-nginx-for-load-balancing/

講一大串結果是批 nginx free edition 的 status 很兩光(完整功能要 1900鎂 nginx plus)

The HFT Guy

HAProxy vs nginx: Why you should NEVER use nginx for load balancing!

Load balancers are the point of entrance to the datacenter. They are on the critical path to access anything and everything. That give them some interesting characteristics. First, they are the most important thing to monitor in an infrastructure. Second, they are in a unique position to give insights not only about themselves but also about every service that they are backing. There are two popular open-source software load balancers: HAProxy and nginx. Let&rsquo;s see how they compare in this regard. Enable monitoring on the load balancers The title is self explanatory. It should be systematic for everything going to production. Install something new Enable stats and monitoring stuff Enable logs Enabling nginx status page Edit /etc/nginx/nginx.conf: server { listen 0.0.0.0:6644; access_log off; allow 127.0.0.0/8; allow 10.0.0.0/8; deny all; location / { stub_status on; } } Enabling HAProxy stats page Edit /etc/haproxy/haproxy.cfg: listen stats 0.0.0.0:6427 mode http maxconn 10 no log acl network_allowed src 127.0.0.0/8 acl network_allowed src 10.0.0.0/8 tcp-request connection reject if !network_allowed stats enable stats uri / Collecting metrics from the load balancer There are standard monitoring solutions: datadog, signalfx, prometheus, graphite&hellip; [2] These tools gather metrics from applications, servers and infrastructure. They allow to explore the metrics, graph them and send alerts. Integrating the load balancers into our monitoring system is critical. We need to know about active clients, requests/s, error rate, etc&hellip; Needless to say, the monitoring capabilities will be limited by what information is measured and provided by the load balancer. [2] Sorted by order of awesomeness. Leftmost is better. Metrics available from nginx nginx provide only 7 different metrics. Nginx only gives the sum, over all sites. It is NOT possible to get any number per site nor per application. Active connections: The current number of active client connections including Waiting connections. accepts: The total number of accepted client connections. handled: The total number of handled connections. Generally, the parameter value is the same as accepts unless some resource limits have been reached (for example, the worker_connections limit). requests: The total number of client requests. Reading: The current number of connections where nginx is reading the request header. Writing: The current number of connections where nginx is writing the response back to the client. Waiting: The current number of idle client connections waiting for a request. Source: Metrics available from haproxy HAProxy provide 61 different metrics. The numbers are given globally, per frontend and per backend (whichever makes sense). They are available on a human readable web page and in a raw CSV format. 0. pxname [LFBS]: proxy name 1. svname [LFBS]: service name (FRONTEND for frontend, BACKEND for backend, any name for server/listener) 2. qcur [..BS]: current queued requests. For the backend this reports the number queued without a server assigned. 3. qmax [..BS]: max value of qcur 4. scur [LFBS]: current sessions 5. smax [LFBS]: max sessions 6. slim [LFBS]: configured session limit 7. stot [LFBS]: cumulative number of connections 8. bin [LFBS]: bytes in 9. bout [LFBS]: bytes out [...] 32. type [LFBS]: (0=frontend, 1=backend, 2=server, 3=socket/listener) 33. rate [.FBS]: number of sessions per second over last elapsed second 34. rate_lim [.F..]: configured limit on new sessions per second 35. rate_max [.FBS]: max number of new sessions per second 36. check_status [...S]: status of last health check, one of: 37. check_code [...S]: layer5-7 code, if available 38. check_duration [...S]: time in ms took to finish last health check 39. hrsp_1xx [.FBS]: http responses with 1xx code 40. hrsp_2xx [.FBS]: http responses with 2xx code 41. hrsp_3xx [.FBS]: http responses with 3xx code 42. hrsp_4xx [.FBS]: http responses with 4xx code 43. hrsp_5xx [.FBS]: http responses with 5xx code 44. hrsp_other [.FBS]: http responses with other codes (protocol error) [...] Source: Monitoring the load balancer The aforementioned metrics are used to generate a status on the running systems. First, we&rsquo;ll see what kind of status page is provided out-of-the-box by each load balancer. Then we&rsquo;ll dive into third-party monitoring solutions. nginx status page The 7 nginx metrics are displayed on a human readable web page, accessible at 127.0.0.1:6644/ Nginx Status Page No kidding. This is what nginx considers a &ldquo;status page&ldquo;. WTF?! It doesn&rsquo;t display what applications are load balanced. It doesn&rsquo;t display what servers are online (is there anything even running???). There is nothing to see on that page and it won&rsquo;t help to debug any issue, ever. HAProxy stats page For comparison, let&rsquo;s see the HAProxy monitoring page, accessible at 127.0.0.1:6427 HAProxy Stats Page Here we can see which servers are up or down, how much bandwidth is used, how many clients are connected and much more. That&rsquo;s what monitoring is meant to be. As an experienced sysadmin once told me: &ldquo;This page is the most important thing in the universe.&rdquo; [1] Whenever something goes wonky. First, you open in a browser to see how bad it&rsquo;s broken. Second, you open the HAProxy stats page to find what is broken. At this point, you&rsquo;ve spot the source of the issue 90% of the time. [0] This is especially true in environments where there is limited monitoring available, or worse, no monitoring tools at all. The status page is always here ready to help (and if it&rsquo;s not, it&rsquo;s only a few config lines away). Integrating nginx with monitoring systems All we can get are the 7 metrics from the web status page, of which only the requests/s is noteworthy. It&rsquo;s not exposed in an API friendly format and it&rsquo;s impossible to get numbers per site. The only hack we can do is parse the raw text, hopping no spacing will change in future versions. Given that nginx doesn&rsquo;t expose any useful information, none of the existing monitoring tools can integrate with it. When there is nothing to get, there is nothing to display and nothing to alert on. Note: Some monitoring tools actually pretend to support nginx integrations. It means that they parse the text and extract the request/s number. That&rsquo;s all they can get. Integrating HAProxy with monitoring systems In additional to the nice human readable monitoring page, all the HAProxy metrics are available in a CSV format. Tools can (and do) take advantage of it. For instance, this is the default HAProxy dashboard provided by Datadog: Datadog pre-made dashboard for HAProxy Source: A Datadog agent installed on the host gathers the HAProxy metrics periodically. The metrics can be graphed, the graphs can be arranged into dashboards (this one is an example), and last but not least we can configure automatic alerts. The HAProxy stats page gives the current status (at the time the page is generated) whereas the monitoring solution saves the history and allows for debugging back in time. Why does nginx have no monitoring? All monitoring capabilities are missing from nginx on purpose. They are not and will never be available for free. Period. If you are already locked-in by nginx and you need a decent monitoring page and a JSON API for integrating, you will have to pay for the &ldquo;Nginx Plus&rdquo; edition. The price starts at $1900 per server per year. See: Conclusion: Avoid nginx at all costs Load balancers are critical points of transit and the single most important things to monitor in an infrastructure. Nginx stripped all monitoring features for the sake of money, while pretending to be open-source. Being left entirely blind on our operations is not acceptable. Stay away from nginx. Use HAProxy instead.

mrorz 10:02:30
我以為是
1. Wait for 16.0.X fix
2. Upgrade from React 15
mofas 10:15:15
哭哭 nginx 這麼貴
jihchi 10:16:35
捨棄一些 advance & enterprise 功能
free 就夠用 XD
mofas 10:22:27
突然覺得同學很廢.... 某會議來學校開了三場 Docker Introduction 竟然都爆滿.. 是有沒有這麼弱呀- - 到現在還不會用docker
mrorz 10:23:03
同學又沒有工作經驗 XD
yhsiang 10:47:09
應該是你太強
mrorz 10:56:17
找一個跟你一樣強的人做朋友
mrorz 10:56:39
沒有的話
找一個聰明的人教他 (?
jihchi 10:59:39
學生時期就研究這個也是數一數二領先了吧
mrorz 11:00:19
CS 領域競爭激烈
不得不然
ggm 11:01:55
不過說不定去參加的都不是同學(指 CS 領域的)?
mofas 11:46:15
我是不覺得本學校music school, law school, MBA會想學docker啦
mofas 11:50:10
誰去問一下NTU碩班的會不會docker好惹
mrorz 12:04:08
一定有不少人會,但不是每個人都會吧
mrorz 12:04:32
如果心不在 devops 的應該就很少碰
mrorz 12:04:38
不是每個人都喜歡 ops @@
mrorz 12:05:02
像我只願意弄一弄 ansible 讓我未來搬家可以順利些
但不一定會想要 dockerize
所以進公司才學 docker
ggm 12:47:57
不過像是 AWS 每次辦的 workshop / summit 都有一些非技術的人去(縱使都是技術會議)
ggm 12:50:01
看看 AWS 的商業佈局之類的
ggm 12:53:18
Azure / GCP 也是,Azure 的 2B 做得更深,學校銀行大公司新創都有,所以每次這種會議都蠻多非技術人參加
ggm 12:54:35
同理 .. 風氣可能會向下延伸到學生圈 所以應該也是有些非技術的人(吧)哈哈