#frontend-tech
2017-12-01
jihchi
09:04:41
Burke Knows Words
There are many important questions to ask when you are building an application. Questions like: “Who are the users?”, “What browser will…![]()
jihchi
2017-12-01 10:31:15
快速掃了一下,蠻不錯,React developer 可以考慮裝。
mrorz
2017-12-01 10:33:02
但他會把 props 展開成
```
const {
props: { children },
} = this;
```
lol
```
const {
props: { children },
} = this;
```
lol
jihchi
09:11:51
Type-Safe GraphQL with OCaml (part 1) · Andreas Garnæs
https://andreas.github.io/2017/11/29/type-safe-graphql-with-ocaml-part-1/
https://andreas.github.io/2017/11/29/type-safe-graphql-with-ocaml-part-1/
mrorz
10:30:34
oh 這個我找好久
https://marketplace.visualstudio.com/items?itemName=angryobject.react-pure-to-class-vscode
https://marketplace.visualstudio.com/items?itemName=angryobject.react-pure-to-class-vscode
marketplace.visualstudio.com
Extension for Visual Studio Code - Convert pure react components to class components
jihchi
10:31:15
快速掃了一下,蠻不錯,React developer 可以考慮裝。
wuct
11:01:42
styled component 至少看得出來 component 是在哪裡被 create
wuct
11:01:56
anyway 真的很方便就是了
jihchi
11:02:10
magic~
wuct
11:04:58
coyoneda 能做到一樣的是,而且 coyoneda 其實就是個 functor,所以更 generic
wuct
11:05:19
mofas
11:36:25
If you want, you can use state-monad to do everything. The problem is learning curve.
mofas
11:40:35
Another problem we have in JS is there is no type and macro. It is very verbose and shaky to write functor and monad.
wuct
13:28:53
hmmm
wuct
13:29:10
Coyoneda 應該比 transducer 好學喔
wuct
13:35:53
有 functor 觀念就夠了
wuct
13:37:48
verbose and shaky 這點不用 functor,改用 transducer 也不會改善啊
wuct
13:38:40
js 的確寫起來 verbose and shaky 就是了 🙂
wuct
18:38:37
jsx 真的愈來愈醜
jihchi
18:42:55
有『越來越』醜喔?
2017-12-02
jihchi
23:52:05
GitHub
reactopt - A CLI React performance optimization tool that identifies potential unnecessary re-rendering
yhsiang
2017-12-03 16:28:10
NOTICE: node 7.6+
yhsiang
2017-12-03 16:28:21
後面是用 puppeteer
jihchi
2017-12-03 19:52:57
AWESOME
jihchi
23:52:40
GitHub
superstruct - A simple and composable way to validate data in Javascript.
2017-12-03
yhsiang
16:28:10
NOTICE: node 7.6+
yhsiang
16:28:21
後面是用 puppeteer
jihchi
19:52:57
AWESOME
2017-12-04
jihchi
22:49:26
haltu.github.io
Muuri is a JavaScript library that creates responsive, sortable, filterable and draggable grid layouts.
jihchi
22:49:43
jihchi
22:51:11
我的 Chrome 跑是壞的..
2017-12-05
jihchi
08:36:28
:atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift: Here's my big announcement! My <https://twitter.com/eggheadio|@eggheadio> courses have been published and are totally FREE! “Learn React Fundamentals and Advanced Patterns” <https://blog.kentcdodds.com/learn-react-fundamentals-and-advanced-patterns-eac90341c9db> :atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift::atom_symbol::gift:
jihchi
08:39:32
:heart_eyes::heart_eyes::heart_eyes::heart_eyes: On the 4th day of #webpack #JavaScript Christmas, our team gave to you! :heart::heart::heart::heart::heart::heart::heart: #webpack 4.0.0-alpha.0 :heart::heart::heart::heart::heart::heart::heart: All hands on deck, we'd love as much testing and feedback as possible. Please RT for coverage!!! SO MUCH TO TRY OUT!!!!!! <https://pbs.twimg.com/media/DQOnllZU8AA60Sa.jpg>![]()
jihchi
09:07:56
Curry away in React – Hacker Noon
https://hackernoon.com/curry-away-in-react-7c4ed110c65a
這用法在 render-intensive component 會很慘
https://hackernoon.com/curry-away-in-react-7c4ed110c65a
這用法在 render-intensive component 會很慘
Hacker Noon
So you’re going to build the next-gen eCommerce company selling dog supplies and you’ve decided to use React to build it with coz, you know…![]()
mofas
10:28:37
wuct
17:24:47
`<Fragment>` 不是很好嗎,多出一套 syntax 就為了 support React
wuct
17:25:36
`<Fragment>` 就已經是 `React.createElement(Fragment)` 的縮寫了
wuct
17:25:52
`<>` 等於又再縮寫一次
cjies
17:36:05
支持 `<Fragment>`, `<>` 太短惹…
jihchi
17:36:55
實質上有不同喔.. 一個會多個 wrapper
jihchi
23:11:17
jihchi
23:31:50
2017-12-06
Michael Hsu
09:14:57
:package::rocket: Super excited to announce Parcel: A blazing fast, zero configuration web application bundler! :computer: Github: <https://github.com/parcel-bundler/parcel> :earth_americas: Website: <https://parceljs.org> :memo: Background: <https://medium.com/@devongovett/announcing-parcel-a-blazing-fast-zero-configuration-web-application-bundler-feac43aac0f1> <https://pbs.twimg.com/media/DQS-1-bUQAE7nVb.jpg>![]()
Michael Hsu
09:24:29
Michael Hsu
09:39:19
Medium
Note: This is part of a talk I’m giving at Google’s Mountain View campus on Wednesday, December 6th — come join!![]()
2017-12-07
jihchi
08:43:43
:package: jsvu lets you quickly install or update JavaScript engine binaries with a single command :fire: <https://github.com/GoogleChromeLabs/jsvu> Supported engines: - <https://twitter.com/ChakraCore|@ChakraCore> - JavaScriptCore - <https://twitter.com/SpiderMonkeyJS|@SpiderMonkeyJS> - <https://twitter.com/v8js|@v8js> Perfect in combination with eshost-cli! <https://pbs.twimg.com/media/DQWoSLuXkAAZLwh.png>![]()
jihchi
08:54:42
jihchi
08:56:11
Okay I forgot here on previous photo's I didn't include a11y-friendly stats: So webpack v4, without sideEffects: false lodash-es (one export 'add'): 600 KiB minified d3 (one export 'treemap'): 100 KiB minified w/ `sideEffects: false` lodash-es: ~3 KiB d3: ~1 KiB :heart_eyes: <https://twitter.com/TheLarkInn/status/938188174794223616>
Nice to see <https://twitter.com/jdalton|@jdalton>'s lodash come to life as its intended tiny size!!! That :deciduous_tree:shaking for the win with #webpack 4.0.0-alpha and "'sideEffects': false". This is the promise of ESM modules. <3 Will need to try d3 next and compare, cc <https://twitter.com/mbostock|@mbostock> #JavaScript #AlwaysBetOnWebpack <https://pbs.twimg.com/media/DQUdDGKUEAATCG-.jpg>![]()
itsmisscs
09:11:58
jihchi
10:11:06
Michael Hsu
15:32:39
GitHub
Contribute to reason-react-native-scripts development by creating an account on GitHub.
- 💯1
2017-12-08
mofas
07:04:03
reactjs.org
We’re adopting an RFC (“request for comments”) process for contributing ideas to React. Inspired by Yarn , E![]()
jihchi
08:40:15
Michael Hsu
12:26:03
jihchi
18:40:24
2017-12-09
mofas
10:30:36
最近看完Kent的 advanced react toturial
mofas
10:31:15
覺得介紹方式超OO, 雖然是用FP方式去寫, 但是每一種方法都要給個pattern name
mofas
10:31:45
有沒有這麼煩呀, 不就單純使用abstract或是partial function而已= =
mofas
13:28:25
2017-12-10
mofas
07:55:05
Martian Chronicles
An opinionated guide to modern, modular, component-based approach to handling your presentation logic in Rails that does not depend on any front-end framework. Follow our three-part tutorial to learn the bare minimum of up-to-date front-end techniques by example and finally make sense of it all. Part 1: goodbye Asset Pipeline, code organization, linting.![]()
mofas
07:58:35
Well, I feel Ruby is so obsolete when I read this "latest" article for FE developing.
mofas
07:59:36
You need to do some much configuration to develop in modern way.
mofas
07:59:43
And this is the only part 1
2017-12-11
Michael Hsu
10:47:00
:fire: Finally had the time to finish react-tiny-dom, a minimal implementation of react-dom using react-reconciler APIs: <https://github.com/jiayihu/react-tiny-dom> I think it could very useful to see how to implement a custom renderer in React 16 <https://twitter.com/reactjs|@reactjs> <https://twitter.com/dan_abramov|@dan_abramov> <https://pbs.twimg.com/media/DQrXoCzX0AAqZmd.jpg>![]()
jihchi
18:48:23
2017-12-12
mofas
00:20:52
mofas
00:21:05
竟然有這麼晚整的package了
jihchi
00:28:55
better late than never
jihchi
08:37:27
PSA: Network throttling has been added to headless Chrome 63. Means you can now reliably use it with <https://twitter.com/____lighthouse|@____lighthouse>:bulb::house: for perf testing or Puppeteer 🤹:skin-tone-2:♂️ to automate device emulation in CI! Among 1000s of other use cases :) <https://bugs.chromium.org/p/chromium/issues/detail?id=728451#c10>
jihchi
08:38:21
jihchi
08:39:51
Now, <https://twitter.com/reasonml|@reasonml> is licensed under the MIT license! Thanks to <https://twitter.com/dmwlff|@dmwlff>, FB legal, and <https://twitter.com/fbOpenSource|@fbOpenSource> people (you know who you are) <https://github.com/facebook/reason/commit/e8fb73ec6ff7c3136715a3c628769e3d5906c4f0>
jihchi
08:40:22
mofas
08:58:44
mofas
08:59:01
hardsource become popular those day.
mofas
08:59:11
5k daily download ~
jihchi
09:53:30
stackoverflow.com
In React 16.2, improved support for Fragments has been added. More information can be found on React's blog post here. We are all familiar with the following code: render() { return ( //
Michael Hsu
12:31:12
GitHub
microbundle - Zero-configuration bundler for tiny modules, powered by Rollup.
Michael Hsu
12:31:18
Michael Hsu
12:31:28
各種 zero config
Michael Hsu
12:32:00
GitHub
graphql-yoga - 🧘 Fully-featured GraphQL Server with focus on easy setup, performance & great developer experience
jihchi
14:34:10
https://github.com/andrewdavey/immutable-devtools 無意間發現一個好物!有用 Immutable.js 的好工具
GitHub
immutable-devtools - Chrome Dev Tools custom formatter for Immutable-js values
- 💯2
jihchi
19:10:35
jihchi
19:11:36
<https://twitter.com/kentcdodds|@kentcdodds> PureComponent was really mostly added to enforce that you don't rely on random mutation. To give React the option to bailout rather than force a bailout like sCU. I'd recommend using it everywhere so you have the option to bailout when you do need it.
2017-12-13
jihchi
08:32:58
jihchi
08:36:06
mofas
11:28:59
stateofjs.com
A short survey about current popular JavaScript technologies.
mofas
11:31:21
https://stateofjs.com/2017/other-tools/
VS竟然超越Atom這麼多 lol
VS竟然超越Atom這麼多 lol
stateofjs.com
A short survey about current popular JavaScript technologies.
jihchi
11:31:51
現在周圍幾乎都用 VS Code
mofas
11:31:56
eslint is still dominate on linter ..
jihchi
11:32:35
VS Code launch speed 已經是讓你不覺得慢了
mofas
11:32:56
I believe prettier + flow/ts combination will be the better choice.
mrorz
16:15:00
@mrorz set the channel topic: 前瞻性技術之頻道。
討論紀錄:https://g0v-tw.slackarchive.io/frontend-tech
討論紀錄:https://g0v-tw.slackarchive.io/frontend-tech
mrorz
17:32:46
eslint 是因為他很會整合吧。
像我們就是用 eslint 來呼叫 prettier 然後把 prettier 的 config 存在 eslint 的 config 裡頭。這樣他統計應該是兩者各加一票。
雖然現在 prettier 已經支援 config files 了,但 linter 設定不會一天到晚改,2017 年用了就是用了,最快明年才會改 XDD
像我們就是用 eslint 來呼叫 prettier 然後把 prettier 的 config 存在 eslint 的 config 裡頭。這樣他統計應該是兩者各加一票。
雖然現在 prettier 已經支援 config files 了,但 linter 設定不會一天到晚改,2017 年用了就是用了,最快明年才會改 XDD
mofas
22:25:44
:mega: V8 has native support for JavaScript code coverage. Tools like <https://twitter.com/ChromeDevTools|@ChromeDevTools> and Istanbul can now access V8’s coverage information without instrumenting the code! <https://v8project.blogspot.com/2017/12/javascript-code-coverage.html> <https://pbs.twimg.com/media/DQ6tR7wXUAYP5Ge.png>![]()
- 🎉1
2017-12-14
mofas
08:48:49
jihchi
19:07:48
Facebooks Haxl library for Haskell is great example of why it pays to learn a teensy bit of category theory. Think async/await on steroids. Now the compiler magic that makes this possible has landed in <https://twitter.com/purescript|@purescript>, so you can write Node apps this way! <https://m.youtube.com/watch?v=sT6VJkkhy0o>
2017-12-15
jihchi
08:34:13
jihchi
08:37:08
jihchi
08:39:38
jihchi
09:09:33
https://medium.com/@kevlinhenney/simplicity-before-generality-use-before-reuse-722a8f967eb9
Good article for software engineers
Good article for software engineers
Medium
A common problem in component frameworks, class libraries, foundation services, and other infrastructure code is that many are designed to…![]()
Michael Hsu
09:42:25
Michael Hsu
09:43:12
GitHub
awesome-react-render-props - :sunglasses: Awesome list of React components with render props
mofas
11:09:59
egghead.io
Concise screencast video tutorials that cover the best tools, libraries, and frameworks that modern javascript web developers can use to code more effectively and stay current.
mofas
11:10:06
最近有holiday free course
mofas
11:10:09
想看的快看喔
jihchi
15:31:54
有推哪個嗎?
jihchi
18:47:31
2017-12-16
mofas
03:56:04
YouTube
Category theory for programmers by Bartosz Milewski. Seattle, Summer 2016. Additional material at <https://bartoszmilewski.com/2014/10/28/category-theory-for->...
mofas
09:46:56
egghead.io
Dealing with stateful computations can be a challenge when writing purely functional JavaScript. They can result in undesired variable declaration at best and boilerplate state management code in every function dependent on the state at its worst. In this course we will explore a well know Algebraic Data Type named State, that is built from the ground up to address these :corn:cerns. While this course will be focused around a State implementation provided by a library named crocks, a majority of the techniques we learn here can be used with most of the State implementations in the wild.
mofas
09:47:04
stateMonad in JS..
mofas
09:47:50
2017-12-17
jihchi
10:55:46
jihchi
10:57:11
Author of preact joined Google!
jihchi
15:22:52
lynn
16:11:47
@lynn has joined the channel
2017-12-18
mofas
00:55:39
最近在逛一些網站 發現字體變得很漂亮,
https://github.com/necolas/normalize.css/issues/665
https://github.com/necolas/normalize.css/issues/665
GitHub
It's time to add: font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif This solution is harmless and very useful. It is used by GitHub, Wordpr...
mofas
00:55:54
後來查發現好像是apple的字體
mofas
04:55:02
jihchi
08:38:12
Introducing React Performance Devtool !! A chrome extension to inspect the performance of React components. Github - <https://github.com/nitin42/react-perf-devtool> Chrome extension - <https://chrome.google.com/webstore/detail/react-performance-devtool/fcombecpigkkfcbfaeikoeegkmkjfbfm> cc <https://twitter.com/PKodmad|@PKodmad> Demo :point_down:
jihchi
09:44:52
https://sapper-template.now.sh/blog/what-is-sapper SSR for Svelte
mrorz
10:22:03
不是很能理解 Svelte 跟 Vue 的 vue 檔差在哪裡 lol
mrorz
10:28:18
他要做 observable 與 2-way binding 還是要弄個 runtime 呀 ._.
jihchi
10:34:12
Svelte 產生 Vanilla JavaScript,沒有 runtime
jihchi
10:37:28
不過還是得有些 "code" 來達成 observ. / 2-way binding
mrorz
10:39:46
我對 runtime 的理解是
例如說我們寫了一個 React component
我們定義了 render(),他就會在正確的時間被執行
這對我來說就是 runtime 幫我做的事情
例如說我們寫了一個 React component
我們定義了 render(),他就會在正確的時間被執行
這對我來說就是 runtime 幫我做的事情
mrorz
10:40:15
而 svelve 他的 hello world 範例,編出來長這樣
jihchi
10:42:39
Svelte 就幫你用 native JS / DOM API 去組出這些功能
mrorz
10:42:49
而這個 update (`p`) 在 setState 的時候會被執行
jihchi
10:43:07
React 還需要 lib 多一層 "runtime" 去組出這些功能
mrorz
10:43:31
這就像是在 babel compile 時把 runtime 塞進去不是嗎 Orz
mrorz
10:44:03
看起來是不用 import 一個 “library” 沒錯
mrorz
10:44:11
因為他在 compile 時塞進去惹。
mrorz
10:45:05
然後如果這個 compiler 足夠聰明
複數個 svelve compoent 被 compile 時只會塞 1 份這些 function 的話
複數個 svelve compoent 被 compile 時只會塞 1 份這些 function 的話
mrorz
10:45:20
那看起來就像是自動 import 了一個 library 不是嗎 QQ
jihchi
10:45:28
是喔,沒錯
jihchi
10:46:09
嚴格說起來,就差在你自己 createElement 跟有沒有 lib / compiler 幫你 createElement
mrorz
10:46:27
所以我覺得沒有 runtime 這件事情像是行銷話術
jihchi
10:47:01
Svelte 一個賣點就是,我 compile 出來就是 Vanilla JavaScript,可以用在任何 React / Angular / Vue
mofas
10:47:12
我覺得比較像是inline function的optimization
mofas
10:47:39
你哪一個code compile出來不是vanilla js = =
mofas
10:47:46
只是有沒有reuse function而已
mofas
10:48:08
library就保留原來function然後reuse
mofas
10:48:27
假如svelve夠聰明可以做staging
mofas
10:48:32
或是partial evaluation
mrorz
10:48:34
React runtime 無法被用在其他地方是因為他的 runtime 接管了 DOM,嚴格使用 lifecycle 來處理事情,任何其他對 DOM 的操作,如果沒有做特殊處理(shouldComponentUpdate)的話,會被 react 給覆蓋或弄壞
svelve 之所以可以被重用,是因為他的 “runtime” 直接操作 DOM
svelve 之所以可以被重用,是因為他的 “runtime” 直接操作 DOM
mrorz
10:48:43
而不是因為他「沒有 runtime」
mofas
10:48:46
那其實runtime loading會更小
mrorz
10:48:48
也不是因為他 compile to vanilla
jihchi
10:49:58
我不知道怎麼在 Angular 裡面 import React component 來用..
mrorz
10:50:22
那是因為 Angular 的 runtime 用了 digest loop,不照他的做法來做會壞掉
mrorz
10:50:53
因此 svelte 之所以可以 portable 是因為他「直接操作在 DOM 上」
mrorz
10:51:07
沒有 DOM 之外的其他邏輯
mrorz
10:51:17
我覺得更像是 2018 年的 jQuery UI
mrorz
10:51:29
API 很不錯
mrorz
10:51:39
行銷話術很猛
jihchi
10:51:49
> 我覺得更像是 2018 年的 jQuery UI
這句很不錯
這句很不錯
mofas
10:52:15
叫 Real DOM render 會不會比較酷
mofas
10:52:34
應該是他可以完整判斷data 有沒有變
mofas
10:52:42
根本就不需要用virtual DOM去比對
mofas
10:52:58
這才是他高效的地方ㄅ
mrorz
10:53:11
可能有人用過了吧 lol
例如說 morphdom
例如說 morphdom
mrorz
10:55:18
GitHub
morphdom - Fast and lightweight DOM diffing/patching (no virtual DOM needed)
mrorz
10:55:23
這樣不行,沒有行銷點 (?)
jihchi
10:56:03
沒有包裝好
mrorz
10:56:17
嗯嗯,他是 basic building block
jihchi
10:56:21
Svelte 包裝好,讓你寫起來感覺像 React component
jihchi
10:56:28
還有附加一堆東東
jihchi
10:57:53
看一些 open source project 在推廣,很多 DX 考量都超越 language 本身了 ..
jihchi
10:58:13
Reason 3 就很 JS ..
mrorz
10:58:14
我覺得 svelte 真正做的事情是
「你寫 html 與 component config,我在 babel compile 時幫你接 DOM API 與 2-way binding」
「你寫 html 與 component config,我在 babel compile 時幫你接 DOM API 與 2-way binding」
mrorz
10:59:30
文件裡那些慷慨激昂的「讓我們一起改變 2018 年的前端」不知道是誰想出來的 ._.
mrorz
10:59:36
募資ㄇ
jihchi
11:00:36
XD 哪裡看到啊?
mrorz
2017-12-18 11:01:35
https://svelte.technology/blog/frameworks-without-the-framework
> Wait, this new framework has a runtime? Ugh. Thanks, I’ll pass.
> – front end developers in 2018
> Wait, this new framework has a runtime? Ugh. Thanks, I’ll pass.
> – front end developers in 2018
jihchi
2017-12-18 11:02:56
哪一段啊?
mrorz
2017-12-18 11:08:09
抱歉有點超譯了他的話 QQ
原文一開始是一個設計對白
> Wait, this new framework has a runtime? Ugh. Thanks, I’ll pass.
> – front end developers in 2018
文末則有
> head over to GitHub to help kickstart the next era of front end development.
原文一開始是一個設計對白
> Wait, this new framework has a runtime? Ugh. Thanks, I’ll pass.
> – front end developers in 2018
文末則有
> head over to GitHub to help kickstart the next era of front end development.
jihchi
2017-12-18 11:10:34
有有有,意思有到
jihchi
2017-12-18 11:11:02
「開啟前端開發下一個紀元」 XD
mofas
11:01:17
大大們可以踩雷一下
https://github.com/parcel-bundler/parcel ㄇ
https://github.com/parcel-bundler/parcel ㄇ
GitHub
parcel - :package::rocket: Blazing fast, zero configuration web application bundler
mrorz
11:01:35
https://svelte.technology/blog/frameworks-without-the-framework
> Wait, this new framework has a runtime? Ugh. Thanks, I’ll pass.
> – front end developers in 2018
> Wait, this new framework has a runtime? Ugh. Thanks, I’ll pass.
> – front end developers in 2018
jihchi
11:02:56
哪一段啊?
jihchi
11:03:22
@yhsiang 有玩了一下 https://github.com/yhsiang/reason-parcel-demo
GitHub
reason-parcel-demo - Create ReasonReact project with Parcel in 5 minutes
Michael Hsu
11:03:59
https://twitter.com/thekitze/status/941969671124848640
好久沒用 v2也改成 render prop 了
好久沒用 v2也改成 render prop 了
mrorz
11:08:09
抱歉有點超譯了他的話 QQ
原文一開始是一個設計對白
> Wait, this new framework has a runtime? Ugh. Thanks, I’ll pass.
> – front end developers in 2018
文末則有
> head over to GitHub to help kickstart the next era of front end development.
原文一開始是一個設計對白
> Wait, this new framework has a runtime? Ugh. Thanks, I’ll pass.
> – front end developers in 2018
文末則有
> head over to GitHub to help kickstart the next era of front end development.
jihchi
11:10:34
有有有,意思有到
jihchi
11:11:02
「開啟前端開發下一個紀元」 XD
2017-12-19
mofas
07:40:47
mofas
07:43:01
mofas
07:43:32
:gift: GraphQL.js v0.12.0 is ready just in time for the holidays with a *ton* of exciting new stuff, following the latest draft of the spec, and adding a bunch of new utilities and extended capabilities. :tada: <https://github.com/graphql/graphql-js/releases/tag/v0.12.0> <https://pbs.twimg.com/media/DRW3GjpWsAASZ6H.jpg>![]()
1
mofas
08:43:12
jest-worker看起來很有淺力
mofas
09:16:32
Jest 22 support Puppeteer http://facebook.github.io/jest/docs/en/puppeteer.html
facebook.github.io
With the [Global Setup/Teardown](/jest/docs/en/configuration.html#globalsetup-string) and![]()
mrorz
2017-12-19 10:18:16
Jest 22 以前,這個不能透過 `before()` 與 `after()` 來做嗎
mofas
2017-12-19 10:44:21
Fix: beforeAll 和afterAll 的確也可以async
mofas
2017-12-19 10:49:29
照理說是可以啦.. 可能有啥神奇的bug造成要用這種奇怪的方法
mrorz
2017-12-19 10:50:04
是說 environment 嗎
我也蠻好奇為什麼要做 environment 的 XD
我也蠻好奇為什麼要做 environment 的 XD
mrorz
2017-12-19 10:50:34
像是官方說「我知道你們以前都用奇怪的做法來做 setup / teardown,現在我們提供官方作法囉」這樣 @@
Michael Hsu
2017-12-19 11:17:03
之前用奇怪的方法做+1
mofas
2017-12-19 11:20:00
我看到了 他不想beforeAll裡面再create puppeter
mofas
2017-12-19 11:20:46
為了整個專案只起一個puppeter, 在beforeAll裡面 只做 `await global.__BROWSER__.newPage()`
mrorz
10:18:16
Jest 22 以前,這個不能透過 `before()` 與 `after()` 來做嗎
mofas
10:44:21
Fix: beforeAll 和afterAll 的確也可以async
mofas
10:49:29
照理說是可以啦.. 可能有啥神奇的bug造成要用這種奇怪的方法
mrorz
10:50:04
是說 environment 嗎
我也蠻好奇為什麼要做 environment 的 XD
我也蠻好奇為什麼要做 environment 的 XD
mrorz
10:50:34
像是官方說「我知道你們以前都用奇怪的做法來做 setup / teardown,現在我們提供官方作法囉」這樣 @@
Michael Hsu
11:17:03
之前用奇怪的方法做+1
mofas
11:19:33
GitHub
jest-puppeteer-example - A working example of jest with puppeteer
mofas
11:20:00
我看到了 他不想beforeAll裡面再create puppeter
2017-12-20
mofas
08:37:16
Reason DX還是好差, = = 我再多等幾個月好惹.. 一直回我Unknown Syntax Error 然後就炸惹
jihchi
2017-12-20 09:38:04
native Reason ?
mofas
2017-12-20 09:51:19
Reason 還有分是不是native的喔
jihchi
2017-12-20 09:51:53
我是想問是有 to JS 嗎 (BS)
mofas
2017-12-20 10:17:59
就Reason轉Ocaml這段掛
jihchi
2017-12-20 10:18:15
oh, got it.
yhsiang
2017-12-20 21:25:05
是 ocaml language server 的問題,或者是 vscode plugin 的問題
yhsiang
2017-12-20 21:32:40
unknown syntax error 通常真的是 syntax error 例如少了 ; 或多了 ; XD
yhsiang
2017-12-20 21:32:57
大概撞個半天到一天就會過去了 XD
mofas
08:37:55
是沒人在用pattern match 所以那邊的Syntax error message沒人寫ㄇ- -
jihchi
08:38:40
mofas
09:21:21
Reason 的 recursive function 也有點囉唆, 不完全是 first class function - -
jihchi
09:38:04
native Reason ?
mofas
09:51:19
Reason 還有分是不是native的喔
jihchi
09:51:53
我是想問是有 to JS 嗎 (BS)
mofas
10:17:59
就Reason轉Ocaml這段掛
jihchi
10:18:15
oh, got it.
mofas
10:49:53
Fuck, 連type declaration 也不能recursive..
```
type exp =
| Symbol(string)
| Number(int)
| Plus(exp, exp)
| Multi(exp, exp)
| Lambda(string, exp)
| Application(exp, exp);
type env =
| EmptyEnv
| Env(string, ret, env);
type ret =
| Int(int)
| Error(string)
| Closure(string, exp, env);
```
```
type exp =
| Symbol(string)
| Number(int)
| Plus(exp, exp)
| Multi(exp, exp)
| Lambda(string, exp)
| Application(exp, exp);
type env =
| EmptyEnv
| Env(string, ret, env);
type ret =
| Int(int)
| Error(string)
| Closure(string, exp, env);
```
jihchi
2017-12-20 10:57:31
不確定是不是你要的
mofas
2017-12-20 10:57:52
那個我試過
mofas
2017-12-20 10:57:59
不做用在variants上
jihchi
2017-12-20 11:00:37
`exp` 在哪兒?
mofas
2017-12-20 11:01:03
你要是完整的喔.. 我改一下
jihchi
2017-12-20 11:01:14
喔喔也不用啦
jihchi
2017-12-20 11:01:26
喔喔好
jihchi
2017-12-20 11:01:30
感謝
jihchi
2017-12-20 11:02:01
```
Reason # type env =
| EmptyEnv
| Env(string, env);
type env = EmptyEnv | Env(string, env);
```
Reason # type env =
| EmptyEnv
| Env(string, env);
type env = EmptyEnv | Env(string, env);
```
jihchi
2017-12-20 11:02:11
可以耶
mofas
2017-12-20 11:02:12
應該看得出來再寫 interpreter 😛
mofas
2017-12-20 11:02:30
mofas
2017-12-20 11:02:49
還是online的compiler有bug
jihchi
2017-12-20 11:03:25
我單純 recursive env ~variable~ variant
mofas
2017-12-20 11:04:04
喔 單純的recursive可以
mofas
2017-12-20 11:04:13
但是env 要用ret ret 要用 env
mofas
2017-12-20 11:04:16
就不行
jihchi
2017-12-20 11:13:49
circle 在 rtop 也不行。online compiler 應該是正常
yhsiang
2017-12-20 21:30:15
```
type exp =
| Symbol(string)
| Number(int)
| Plus(exp, exp)
| Multi(exp, exp)
| Lambda(string, exp)
| Application(exp, exp)
and env =
| EmptyEnv
| Env(string, ret, env)
and ret =
| Int(int)
| Error(string)
| Closure(string, exp, env);
```
這樣不是可以?
type exp =
| Symbol(string)
| Number(int)
| Plus(exp, exp)
| Multi(exp, exp)
| Lambda(string, exp)
| Application(exp, exp)
and env =
| EmptyEnv
| Env(string, ret, env)
and ret =
| Int(int)
| Error(string)
| Closure(string, exp, env);
```
這樣不是可以?
mofas
2017-12-20 22:22:00
原來是要這樣 我打 and type
yhsiang
2017-12-20 22:26:46
對,這有點靠杯 ... 我仔細看了 tutorial 才發現 XD
mofas
2017-12-20 22:38:19
感謝大大 我的mini interpreter 終於寫完了
可以支援lambda application囉
可以支援lambda application囉
Michael Hsu
10:56:34
jihchi
10:57:31
不確定是不是你要的
mofas
10:57:52
那個我試過
mofas
10:57:59
不做用在variants上
jihchi
11:00:37
`exp` 在哪兒?
mofas
11:01:03
你要是完整的喔.. 我改一下
jihchi
11:01:14
喔喔也不用啦
jihchi
11:01:26
喔喔好
jihchi
11:01:30
感謝
jihchi
11:02:01
```
Reason # type env =
| EmptyEnv
| Env(string, env);
type env = EmptyEnv | Env(string, env);
```
Reason # type env =
| EmptyEnv
| Env(string, env);
type env = EmptyEnv | Env(string, env);
```
jihchi
11:02:11
可以耶
mofas
11:02:12
應該看得出來再寫 interpreter 😛
mofas
11:02:30
mofas
11:02:49
還是online的compiler有bug
jihchi
11:03:25
我單純 recursive env ~variable~ variant
mofas
11:04:04
喔 單純的recursive可以
mofas
11:04:13
但是env 要用ret ret 要用 env
mofas
11:04:16
就不行
jihchi
11:13:49
circle 在 rtop 也不行。online compiler 應該是正常
Michael Hsu
11:35:46
Michael Hsu
17:34:57
Today we released RxRelayJS, a RxJS lib that introduces Relay types. Relays are similar to Subjects, but stateless (can't call error() or complete()). Inspired by the original Java implementation by <https://twitter.com/JakeWharton|@JakeWharton>. <https://twitter.com/OpenAtMicrosoft|@OpenAtMicrosoft> <https://github.com/microsoft/rxrelayjs>
jihchi
20:17:03
Medium
tl;dr: It is now officially supported :tada:!
jihchi
20:17:10
danilowoz.github.io
React component that uses SVG to create a collection of loaders which simulates the structure of the content that will be loaded, similar to Facebook cards loaders.
yhsiang
21:25:05
是 ocaml language server 的問題,或者是 vscode plugin 的問題
yhsiang
21:30:15
```
type exp =
| Symbol(string)
| Number(int)
| Plus(exp, exp)
| Multi(exp, exp)
| Lambda(string, exp)
| Application(exp, exp)
and env =
| EmptyEnv
| Env(string, ret, env)
and ret =
| Int(int)
| Error(string)
| Closure(string, exp, env);
```
這樣不是可以?
type exp =
| Symbol(string)
| Number(int)
| Plus(exp, exp)
| Multi(exp, exp)
| Lambda(string, exp)
| Application(exp, exp)
and env =
| EmptyEnv
| Env(string, ret, env)
and ret =
| Int(int)
| Error(string)
| Closure(string, exp, env);
```
這樣不是可以?
yhsiang
21:32:40
unknown syntax error 通常真的是 syntax error 例如少了 ; 或多了 ; XD
yhsiang
21:32:57
大概撞個半天到一天就會過去了 XD
mofas
22:22:00
原來是要這樣 我打 and type
yhsiang
22:26:46
對,這有點靠杯 ... 我仔細看了 tutorial 才發現 XD
mofas
22:38:19
感謝大大 我的mini interpreter 終於寫完了
可以支援lambda application囉
可以支援lambda application囉
2017-12-21
mofas
00:09:05
blogs.technet.microsoft.com
Information and announcements from Program Managers, Product Managers, Developers and Testers in the Microsoft Virtualization team.
mofas
00:09:25
Mac pro 再沒進步 下一台可能就要買surface惹
mofas
00:09:43
Apple不知道腦袋哪裡有洞 竟然解散Mac pro team
mrorz
2017-12-21 12:22:08
從來沒用過 mac pro ._.
mofas
2017-12-21 13:04:37
我是說mac probook
mrorz
2017-12-21 13:16:42
probook 聽起來很厲害
mofas
01:41:05
Muzli -Design Inspiration
I couldn’t agree more with one of the world’s most celebrated graphic designers. And, why shouldn’t I? Design is a universal language, and…![]()
jihchi
08:29:38
Hey look, it’s nact! A :sparkles:brand new:sparkles: library that lets you combine <https://twitter.com/nodejs|@nodejs> and actors with first class support for <https://twitter.com/reasonml|@reasonml>, lovingly crafted by @hncthbrt. The site is gorgeous and you should definitely check it out. :unicorn_face::rainbow: <https://nact.io/>
jihchi
08:34:50
<https://twitter.com/parceljs|@parceljs> #Webpack - Compared Parcel(1.2.1) and Webpack(3.5.6) on project (~800 JS files) Run1: Webpack: 6.7 min Parcel: 1 min 6 s Run2: Webpack: 5.65 min Parcel: 2 s Config Details: Webpack - [Babel thread-loader and caching, parallel uglify, no sourcemap] Parcel - [none]
- 💯1
Michael Hsu
2017-12-21 09:39:29
> Parcel - [none] 😳
jihchi
2017-12-21 09:40:13
XD
jihchi
2017-12-21 09:40:54
可以看討論串,裡面有深入點的討論
jihchi
08:36:06
Alright everyone who's writing all these 5cent hype-blogs about <https://twitter.com/parceljs|@parceljs> v #webpack without trying it. Here's what we call _facts_. #JavaScript #OSS Chew on this: ==Alt a11y Text== parcel (no-cache): 7.56s parcel (cache): 2.71s webpack@webpack/webpack#next (no-cache): 973ms <https://pbs.twimg.com/media/DRhcUfbUQAAlxAW.jpg>![]()
- 👍1
jihchi
08:41:39
Michael Hsu
09:39:29
> Parcel - [none] 😳
jihchi
09:40:13
XD
Michael Hsu
09:49:43
https://twitter.com/paul_irish/status/943545583909838849
Safari ❤️ service worker
Safari ❤️ service worker
Michael Hsu
09:59:51
mrorz
12:22:08
從來沒用過 mac pro ._.
mofas
13:04:37
我是說mac probook
mrorz
13:16:42
probook 聽起來很厲害
2017-12-22
jihchi
09:41:14
GitHub
* Add bsb-js dependency * Add ReasonAsset type * Actually add the Reason asset type * Add OCaml file type, add integration test, remote unused imports * use promisify for reading files ...
jihchi
09:41:26
MERGED!
2017-12-23
mofas
23:10:04
這篇開始大混戰了
mofas
23:10:09
Dr boolean 參戰
mofas
23:11:31
我也覺得vjeux沒有搞清楚FP 很多drawback SICP就解釋正確的原因
2017-12-25
jihchi
09:47:50
jihchi
18:49:38
New blog post: Performance lessons from Tinder's Progressive Web App <https://medium.com/@addyosmani/a-tinder-progressive-web-app-performance-case-study-78919d98ece0> ~ built with React 16, Redux, webpack 3 :scissors: JavaScript optimizations (code-splitting & preloading) :iphone: Service Workers for network resilience :hourglass: Performance budgets & more
jihchi
18:52:04
2017-12-28
jihchi
08:37:16
jihchi
22:59:41
2017-12-29
jihchi
08:41:52
:tada: Released my <https://twitter.com/reasonml|@reasonml> game to the google play store: "Gravitron" <https://play.google.com/store/apps/details?id=com.jaredforsyth.gravitron> Also available on desktop web: <http://gravitron.jaredforsyth.com/> and the source is here: <https://github.com/jaredly/gravitron/> <https://pbs.twimg.com/media/DSJ9XU8UEAAVKrS.jpg>![]()
mofas
11:08:14
GitHub
@KtorZ Here is the start of pt3 :)
mofas
11:08:21
New chapter !!!!
mofas
11:10:33
https://www.twitch.tv/jlongster
live now
live now
Michael Hsu
17:11:09
Michael Hsu
17:11:26
昨晚掛掉近 10 個小時
jihchi
17:13:40
Parcel 官網也是掛在 ZEIT
Michael Hsu
17:16:36
好慘喔 發生一次不知道會流失多少用戶
mofas
23:07:42
project 做完就不理他惹
mofas
23:07:44
babeljs.io
Check out Planning for 7.0 for the last updates throughout the 7.0 pre-releases. If something isn’t clear in this post let me know!![]()
2017-12-30
jihchi
10:31:08
GitHub - mweststrate/immer: Create the next immutable state by mutating the current one
https://github.com/mweststrate/immer
https://github.com/mweststrate/immer
mrorz
2018-01-09 11:23:44
Performance 圖表更新了
https://github.com/mweststrate/immer#performance
看起來跟 ImmutableJS 沒有太大差別
而且如果選了 ImmutableJS 又亂 toJS 的話,會無以復加的差⋯⋯
https://github.com/mweststrate/immer#performance
看起來跟 ImmutableJS 沒有太大差別
而且如果選了 ImmutableJS 又亂 toJS 的話,會無以復加的差⋯⋯
jihchi
2018-01-09 11:24:47
似乎可以直接 replace immutable
mrorz
2018-01-09 11:26:15
是呢
但如果 code base 裡已經一堆 `.get()`、`.getIn()`,那或許已經為時已晚⋯⋯
下次開新專案再說吧 XDDD
但如果 code base 裡已經一堆 `.get()`、`.getIn()`,那或許已經為時已晚⋯⋯
下次開新專案再說吧 XDDD
jihchi
2018-01-09 11:27:17
CRA 改預設裝這個?!
mrorz
2018-01-09 11:43:11
唔喔,這倒是個好問題
@yhsiang 覺得如何
@yhsiang 覺得如何
yhsiang
2018-01-09 17:26:18
@mrorz 用 reason 都沒差惹
2017-12-31
jihchi
12:38:04
wildsky
21:39:08
@wildsky has joined the channel