2020幎8æ3é± Weekly Report
ð° Topics
ãäœã
æšãããèšé²ã£ãŠäœã®åœ¹ã«ç«ã€ãã§ããïŒãã®ããæžè©ããiPad Proã§ãã©ãã¯ããããæäœã§ããªãåé¡ã®å¯ŸåŠæ¹æ³ãªã©ãªã¹ã¹ã¡ã§ãã
ãŸããWSL2 + JetBrainsããŒã«ã§Rustã®æ¬æ Œéçºããç°å¢ãæŽããŸããã
Table of Contents
æžããããš
ä»é±ã¯ãããŸããã
å匷ããããš
ãRustãThe book 3ç« ~
3. Common Programming Concepts
å€æ°ãé¢æ°ã¯ä»èšèªãšéãã¯ã»ãããããªããªã楜ããã£ãã§ãã
ã³ã¡ã³ããå¶åŸ¡æ§æã¯å€§äœåãã
èªãã ããš/èŽããããš
äœã æšãããèšé²ã£ãŠäœã®åœ¹ã«ç«ã€ãã§ããïŒ
æèããŠè¡åããããã«èšé²ãå¿
èŠãšãã話ã§ãã
ç§ã倧æ¹åãæèŠã§ãäžéšæ°ããçºèŠããã楜ãããŸããð
å人çã«å°è±¡ã«æ®ã£ãã»ã¯ã·ã§ã³ã®ææ³ã玹ä»ããŸãã
èšé²ããããšã§èšæ¶ã®ç²ŸåºŠãé«ããªã
èšé²ããããšã«ããæ
å ±ãžã®indexã匵ãããã€ã¡ãŒãžã§ãã
ç§ãSlack(times)ã«æããããšãæ
å ±ããªã¢ã«ã¿ã€ã ã«çºä¿¡ããŠããŸããð
èšé²ããããšã¯åãæ¿ããæèããããš
ããã¯å®å
šåæã§ãïŒ
ãããPCã®æäœå
容ãšãã解æããŠèªåã§èšé²ããããã¿ãããªçžè«ãããŸãããç§ãããããšãæèçãªèšé²ã«ãã£ãŠéäžåãäžããããšãäžçªã®æšå³ãªã®ã«..äœãèšã£ãŠããã®ã ããããšãã€ãæã£ãŠããŸããŸãð
ç¡æèãªè¡åã¯èªç±ãããªã
ãã®èãæ¹ã¯ç®ã«ãããã§ãã..ç¡æèè¡åã®æ¹ãèªç±ã ãšæã£ãŠããã®ã§ã
ãããè¡åãããããã«ãããæ°ãåºãã®ãåŸ
ããªããã°ãããªãããèªç±ãããªãã..ãªãã»ã©ã§ãã
ã»ãããŒã§è©±ãããšãæãã€ãã®ã¯ã»ãããŒäžã§ããã¹ã
ããã¯äžäººã«åœãŠã¯ãŸãå
容ã§ã¯ãªãæ°ãããŸã..ã
èšç·Žãããã§ãã人ã ããããèšããè³é«ã®é å..ã
90%ã®æéã¯ã絶察ã«ããããšãã®ç¹°ãè¿ã
æéã«ããŠ1æ¥ããã9ïœ10æéåãããããå¿ããã«æ±ºãŸã£ãŠããã
ã絶察ã«ããããšãã ããå¿ããªããšæã£ãŠãããªãããã¯å¹»æ³ã§ããã
ã絶察ã«ããããšããå¿ããªãæå³
以äžã®éšåãå®å
šã«åæã§ãïŒ
é害ãèµ·ãããªã人ã¯è¡šé¢äžå€§ããããšããã£ãŠãªãããã«èŠãããã©ãå®ã¯åãããšãããŠã..ã«äŒŒãŠããšæããŸããã
ã¿ã¹ã¯ã·ã¥ãŒããŠãŒã¶ãŒã®èšã£ãŠããããšãåç®ã§èŠãŠããŠãããã«ããã®ã¯ãäœãåé¡ãèµ·ãã£ãŠããªããšãããã ããã ããªã®ã§ãæéãåŸãããããªæããšãããããããšãæãéãããããªæãããŸã£ããèŠããŠããªãããã§ããã§ã幎éã®ç¯çŽæéã¯éŠ¬é¹¿ã«ãªããªãã
ãèšé²ã¯æéã®ç¡é§ãªã®ã§ãããŸãããã¿ãããªè©±ã(éå»ã®èªåå«ã)ããèããŸãããã£ãããªãïŒ
倧æµããã¯ããæ¹ã®åé¡ãªæ°ãããŸãã
ç§ãèªèº«ãéçºããŠããããŒã«Togowlã䜿ãããã«ãªã£ãŠãããããããã¡ãªãããå®æãã¯ãããŸããã
èšé²ããã¯ãã®ããšããããããæžããŠãã
ã¿ã¹ã¯ãªã¹ãã§ã¯ãªããŠãããããããã§ãããããšã®ãµãžã§ã¹ããšããèãæ¹ã
èªåã®GTDããŒã¹ã®èãæ¹ãªã®ã§åæã§ããªãéšåã¯ããã€ã€ãé¢çœãèãæ¹ã ãšæããŸããã
é¢åãããããšã«æå³ããã
æåŸã®ã»ã¯ã·ã§ã³ã§ãã
èšèã ããèŠããšä»äºã®ã§ããªã人ã«èŠããŸãããæ¬è³ªãã€ãã©ã¹ãã«ãµããããèšèã ãšæããŸããã
ãªãããæãã®ã..!?
æ¬æžãæåŸãŸã§èªãã°åãããšæããŸãã®ã§æ¯éð
æèµ·ããŠããã¿ãŒããã¯ã¹ã«ç«ã€ãŸã§å®ç§ã«ã«ãŒãã£ã³åããããšãäœæ ã¿ããªãããªãã®ãïŒ
ç§ãæ¯æãèªå®
ããã³äŒç€Ÿã§äœæ¥ãå§ãããŸãã®ã«ãŒãã³ããããŸãã
ããã¹ããŒãéžæããã£ãŠããããšããªãæã
ããããªãã®ããšããã話ã
ã«ãŒãã³ã¯ç²Ÿç¥å®å®å¹æãé«ããæ°ãä¹ããªããšãã§ãäœæ¥ãå§ããããåããããšä¿¡ããŠããŸãã
Announcing TypeScript 4.0 RC | TypeScript
以åã«ã觊ããTypeScript4.0ã«ã€ããŠãRCçãåºãŸããã
çŸæç¹ã§äœ¿ãããæ©èœã¯ä»¥äžã§ãã
- Variadic Tuple Types
- Labeled Tuple Elements
- Class Property Inference from Constructors
/** @deprecated */ Support
æåãLabeled Tuple Elements
ã䜿ããªãObjectã䜿ãã°ããã®ã§ã¯..?ãšæã£ãŠããŸããã
ãããTupleã®äœ¿ãæ¹ãåŠã¶ãã¡ã«ä»¥äžã®çšéã§å¿
èŠãªããšãåãããŸããã
- Tupleã®æã€é åºæ§ããé¢æ°åŒæ°ãéšåé åãè¡šçŸããã®ã«å¿ é ã§ãã
- ååãä»ããããšã§åå²ä»£å ¥ãäžèŠ
- ååãä»ããããšã§å¯èªæ§ãäžãã
æ©äŒãèŠã€ãããç©æ¥µçã«å©çšããŠããããã§ããð
ã³ããçŠã§éèŠæ§ãå¢ãâ瀟å åºå ±âã®å¿åŸ
瀟å ãžã®æ å ±äŒéãã©ããã¹ãã..ãšããAtlassianã®èšäºã§ãã
ã³ããã®ãšãã¯ç€Ÿå
ã§ãçåœæ§ã®æªããæ
å ±ã沢山é£ã³äº€ããŸããã誰ãæªæã¯ãªãã®ã«ã
TOPããã®æ
å ±äŒéãé
ãããšãæ
å ±ã欲ãããªãççãäœãã ããç¹ç°ç¹ãªã®ãããããŸããã
npm v7 Series - Beta Release! And: SemVer-Major Changes in npm v7
npmã®v7ã«ã€ããŠãnpx
ãéæšå¥šã«ãªãnpm exec
ã«ãªãããã§ãã
npx
ã¯ããšããšéåæãã£ãã®ã§å人çã«ã¯æè¿âºïž
Introducing Workspaces to Bitbucket Cloud
Bitbucket Cloudã®Workspacesã«ã€ããŠçŽ¹ä»ãããŠããŸãã
Everyone who has access to your repos in your workspace is now considered a “member” of the Workspace.
ã¢ã«ãŠã³ãã¯Bitbucket Cloudå
šäœã§å
±éã ãã©ãWorkspaceãšããæŠå¿µãå¥éãã..ãšã
Workspaceã«å±ãããªããžããªãžæããã人ã¯Workspaceã®äžå¡ãšã¿ãªãããããã§ãã
ããã¯SlackãMiroã®ã¢ãã«ã«è¿ãå°è±¡ãåããŸããã
We will be slowly rolling out new changes in several phases to build towards this new Workspace model.
ããšããšã¯TeamãšããæŠå¿µã ã£ããã©ãåŸã
ã«Workspaceã®æŠå¿µãžãšç§»è¡ããŠããããã§ãã
ãã°ããã¯Breaking changesããªãã..ãã£ããèŠåŒµã£ãæ¹ãããããã§ããã
Working with code problems in IntelliJ IDEA
2020.2ããå°å ¥ãããProblemsé¢é£ã®æ©èœåŒ·åã«ã€ããŠçŽ¹ä»ãããŠããŸãã
ä»åŸããã«æ¹åããŠããäºå®ãšã®ããšã§æ¥œãã¿ã§ããð
åé¡ãå¶ããã®ã¯éçºãå¶ããšãèšããŸããã
ep.57 Vue 3 Study ããããã Directive ãæ±ããŠã
Custom directiveã«ã€ããŠç¥èããªãã£ãã®ã§å匷ã«ãªããŸããã
ãªãã»ã©.. DOMã«å¯ŸããŠããè¡ãåŠçã«ã¯äŸ¿å©ã§ããã..ã
ä»ãŸã§refã§ããå®è£
ããªãã£ãã®ã§éžæè¢ãå¢ããŸããã
è©Šããããš
ãAtlassianãAtlassian Cloud API
Atlassian Cloud補åã®APIã䜿ãå¿
èŠãåºãŠããã®ã§è©ŠããŠã¿ãŸããã
Bitbucketã§ä»¥äž3ã€ã®ãªãã¬ãŒã·ã§ã³ãèªååããã®ãç®çã
- ãŠãŒã¶ã®ç»é²
- ã°ã«ãŒãã®äœæ
- ã°ã«ãŒããžã®ãŠãŒã¶è¿œå
REST APIã®ããŒãžã調ã¹ããšããv1ã¯deprecatedã«ãªã£ãããv2ã䜿ãããšã®ããšã
äžæ¹ãä»åããããã£ãããšã¯ãŸã v2ã«å¯Ÿå¿ããŠããªãããã§ãã
deprecatedæã®ããäžã«èšè¿°ããããŸãã
Temporary support for limited 1.0 API resources
The 2.0 REST API will rely on the Atlassian Cloud Admin API for user and group management, but those API endpoints are not yet available. Until the Atlassian platform services are fully available in Bitbucket we will continue to support these 1.0 REST endpoints:
ã»/1.0/groups
ã»/1.0/group-privileges
ã»/1.0/invitations
ã»/1.0/users/{accountname}/invitations
ãããã以äžã®APIã䜿ã£ãŠã§ããŸããã
ãŠãŒã¶ç»é²ãšããæŠå¿µã¯ãªãããªããžããªãžãŠãŒã¶ãè¿œå ããéã«æåŸ
ããããšã«ãªããŸãã
ãªãã¬ãŒã·ã§ã³ | é¢é£API |
---|---|
ãªããžããªãžãŠãŒã¶ãæåŸ | POST send an invite |
ã°ã«ãŒãã®äœæ | POST a new group |
ã°ã«ãŒããžã®ãŠãŒã¶è¿œå | PUT new member into a group |
å¥éèªèšŒãééããå¿ èŠããããŸããä»åã¯ã¢ããªãã¹ã¯ãŒãã䜿ããŸããã
BasicèªèšŒã§OKã
ãRustãcargo-edit
Cargoã§ãnpm install
ã®ããã«CLIããcrateããããžã§ã¯ããžè¿œå ã§ããŸãã
ãã..cargo-editã䜿ãã°ã
cargo install cargo-edit
ã§ã€ã³ã¹ããŒã«ããŸãã
å°ãæéãããããŸãã
ã€ã³ã¹ããŒã«ãçµããã°ä»¥äžã®ã³ãã³ãã§crateãè¿œå ã§ããŸãð
cargo add structopt
IntelliJ Rustã䜿ã£ãŠãããšCargo.toml
ã®è£å®ãå¹ãããå¿
é ã§ã¯ãªããšæã£ãŠããŸãã
調ã¹ãããš
iPad Proã®Magic Keyboardã§ãã©ãã¯ããããå¹ããªããªã
ãã©ãã¯ãããã®ãã€ã³ã¿ãç»é¢ã«çŸãããæäœããŠãåå¿ããªãç¶æ
ã§ãã
é±ã«1åãããçºçããŸããã
äžèšãµã€ãã«æžãããŠããæ¹æ³ã§ãªãããŸããã
- USB-C ãMagic Keybaordããå€ã
- iPad ProãMagic Keyboardããå€ã
- ããäžåºŠã€ãã
- Track Padãããã£ãŠãããšç»é¢ã®é ãããã€ã³ã¿ãç»å Žãã
ãJavaScriptãplaceholderã«inå¥ãæå®ã§ããªã
以äžã®ãããªæžãæ¹ãã§ããªããšããåé¡ã§ãã
SQL`select * from hoge where status not in ${"(1, 2)"}`
// SELECT * FROM company WHERE status NOT IN '(1, 2)'
// -> æååãšããŠæ±ãããŠããŸã..
äžèšã®èšäºã¯Javaã«å¯Ÿãããã®ã§ãããprepared statementã«å«ãŸãã?
ã®æ°ãåçã§ãããªãéœåºŠstatementãäœãã®ãæ£æ»æ³ã®ããã§ããã
ãã¿ã§ãããããªæãã«ããŸããã
db.all<Company>(
`SELECT * FROM company WHERE status NOT IN (${statusIds.map(_ => '?').join(',')})`,
...statusIds,
);
}
ãnpmãnpmã³ãã³ããåããªããªã£ã
npm i -g npm
ã«å€±æããããšã«npm
ã³ãã³ããå®è¡ããããšã©ãŒã«..ã
Windowsç°å¢ã§scoopã䜿ã£ãŠãããnodejs-lts
ãã€ã³ã¹ããŒã«ããªãããŠããã¡ã§ããã
$ npm
internal/modules/cjs/loader.js:968
throw err;
^
Error: Cannot find module 'C:\Users\syoum\scoop\apps\nodejs-lts\current\bin\node_modules\npm\bin\npm-cli.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
at Function.Module._load (internal/modules/cjs/loader.js:841:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
確èªãããšããbin
ãã£ã¬ã¯ããªãpersist
é
äžãæããŠããŸããã
nodejs-lts
ãã¢ã³ã€ã³ã¹ããŒã«ããŠãæ¶ããªãããå€ãããªãã®ã§ããã
$ cd C:\Users\syoum\scoop\apps\nodejs-lts\current
$ ll
---------- 1 somebody somegroup 54928 2020-07-22 23:58 CHANGELOG.md
---------- 1 somebody somegroup 81641 2020-07-22 23:58 LICENSE
---------- 1 somebody somegroup 27903 2020-07-22 23:58 README.md
l--------- 1 somebody somegroup 0 2020-08-15 17:13 bin -> C:\Users\syoum\scoop\persist\nodejs-lts\bin
l--------- 1 somebody somegroup 0 2020-08-15 17:13 cache -> C:\Users\syoum\scoop\persist\nodejs-lts\cache
persist
é
äžã®nodejs-lts\bin
ãåé€ãããšããç¡äºåããŸããã
æŽåããããš
ãRustãWSL2ã§ã®Rustéçºç°å¢æ§ç¯
ãã¯ãWindowsã ãšäžå®ãªãããRustã¯WSLã§éçºããããšã«ããŸããã
WSL2ã®ç°å¢æŽåãããŠãããŠããã£ãã§ãã
rustupã®ã€ã³ã¹ããŒã«ã¯å
¬åŒæšå¥šã®ã³ãã³ãã䜿ããŸãã
èšå®ã¯defaultã䜿ãã®ã§ãã®ãŸãŸEnterã
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
以äžã®ããŒã«ãã§ã€ã³ãã€ã³ã¹ããŒã«ãããŸãã
- cargo
- clippy
- rust-docs
- rust-std
- rustc
- rustfmt
cargo-editãå¥éå
¥ããŸããã
å®ã¯Windowsç°å¢ã§ãã«ãã§ããªãã£ããã§ãããã³ã¬ãã
cargo install cargo-edit
ããšã¯å šãŠããããŒã«åããŸããWindowsã§ééããmsvsåšãã®èŠåŽã¯ãªãã ã£ããã ãšãã..ð
ãJetBrainsãWSL2ã§JetBrains Toolboxã䜿ã
Windowsã«ãå°å
¥ããJetBrains ToolboxãWSL2ç°å¢ã«å
¥ããŸããã
ãã®ãããAnsibleããumakeã䜿ã£ãIDEAã€ã³ã¹ããŒã«ã®èšèŒãåé€ããŸããã
å°å ¥ã®çç±ã¯2ã€ã§ãã
- 補åãšããŒãžã§ã³ç®¡çã楜 (ããããã€ã³ããå°ãªã)
- Toolboxã®UIããIDEAã®èµ·åãç°¡åã«ã§ãã
WSLç°å¢ã®ãã£ã¹ããªãã¥ãŒã·ã§ã³ã¯Desktopç°å¢ã䜿ã£ãŠããªããããã©ã³ãã£ãŒåœ¢åŒã®GUIã¯æãã®ã»ã䟿å©ã ã£ããããŸãã
ä»é±ã®ãªãªãŒã¹
Owlelia v0.15.0 ïœ v0.16.0
yyyyMMddHHmmssã®è¿œå
æ¥æã20200815200214
ã®ãããªåœ¢åŒã§åºåããããããã£ãè¿œå ããŸããã
DateTime.validate()ã®è¿œå
æ¥æãããããæååãæ£åœãã©ãããå€æã§ããŸãã
ãã©ãŒãããã ãã§ãªã2020-01-32
ã®ãããªã±ãŒã¹ã匟ããŸãã
Togowl v2.12.0
ãããžã§ã¯ãã»ã¬ã¯ã¿ã®è¡šç€ºé ãããéžæãããé ã«å€æŽ
ã¿ã¹ã¯è¿œå /ç·šéãã€ã¢ãã°ã§è¡šç€ºãããã¿ã¹ã¯ãããžã§ã¯ãã»ã¬ã¯ã¿ã®è¡šç€ºé ããéžæãããåæ°ãå€ãé ãã«å€æŽããŸããã
éžæåæ°ã¯ç«¯æ«/ãã©ãŠã¶æ¯ã«èšé²ããããããã¹ãããšPCã§ã¯è¡šç€ºé ãç°ãªããŸãã
端æ«ã«ãã£ãŠéžæããããããžã§ã¯ãã«åããçããå¯èœæ§ãããããã
ã«ã¬ã³ããŒã®ãºãŒã ã¬ãã«ã现åå
ã«ã¬ã³ããŒã®ãºãŒã ã¬ãã«ãä»ãŸã§ãã现ååããŸããã
ãã£ããã£ãæ®ãå Žåã«æé©ãªãµã€ãºãéžã³ããããªããŸãã
ãã®ä»
éã«Rustã§ããŒã«ã®éçºãã¯ãããŸããã
æ¥é±ã¯Rustã®å€ãã¬ããŒãã«ãªããšæããŸãð¥³