Tuesday, November 01, 2022
Nushell looks quite interesting, will try it
an introduction: Nushell: Introduction to a new kind of shell
I use Babashka for complex scripting, but shell is just like a repl, you can't beat the repl
how many bundlers do we need? I'll try to avoid products from Vercel for sure: Is Turbopack really 10x Faster than Vite?
tried use mdBook as documentation site for a small project I like its structure is simple, and most importantly it has search feature built-in
I wrote a bash script to grep comments in code and generate markdown files and a toc, and that's it
I also added badboy/mdbook-mermaid: A preprocessor for mdbook to add mermaid support, super cool
funny that just another day I read John Ousterhout's A Philosophy of Software Design, Chapter 15, Write the comments first this tool is perfect for that
he did a se radio episode: Episode 520: John Ousterhout on A Philosophy of Software Design : Software Engineering Radio
a Dockerfile
for pkg
, the trick here is the cache path, without it, pkg
will try to download the base binary everytime
FROM node:16-slim
ARG PKG_CACHE_PATH=/cache/.pkg-cache
RUN npm i -g pkg pkg-fetch && npm cache clean --force
RUN pkg-fetch -n node16 -p macos -a x64 && pkg-fetch -n node16 -p linux -a x64
Thursday, November 03, 2022
trying nushell, I really like it, simple and fast, and it has something like dataframe
not quite ready to use it as login shell yet, just fire it from bash
I think it will be a good replacement for bash scripts
Announcing Grafana Phlare, the open source database for continuous profiling at massive scale
in the discussion someone mentioned pyroscope, and I tried it, also a simple plug and play tool, good for quick server side profiling
Monday, November 07, 2022
ported a script to nushell, I like it so far, and the outcome is easier to read than bash version, some notes:
fallback value for a missing environment variable:
($env | get -i FOO | default 'foo')
cd some-dir; do something
can be done by:
(with-env [PWD $some-dir] { do something })
you can call external command like this ^find ... | lines
regex is just =~
or !~
following with pattern
the parse and path parse commands are very useful
to ignore stderr like bash did with 2>/dev/null
:
(do -i { do something })
-i
means ignore
Tuesday, November 08, 2022
The push for GATs stabilization | Rust Blog
understanding higher-kinded types
there's also a chapter in Programming with Types: Chapter 11. Higher kinded types and beyond
some interesting js reads:
and may give a try on ReactiveX/IxJS, it's rxjs for iterables
Blog Archive
- Older Entries
- 2022 October
- 2022 September
- 2022 August
- 2022 July
- 2022 June
- 2022 May
- 2022 April
- 2022 March
- 2021 December
- 2021 September
- 2021 August
- 2021 June
- 2021 May
- 2021 April
- 2021 March
- 2021 February
- 2021 January
- 2020 December
- 2020 November
- 2020 October
- 2020 September
- 2020 August
- 2019 December
- 2019 November
- 2019 October
- 2019 July
- 2019 May
- 2019 April
- 2019 March
- 2019 February
- 2019 January
- 2018 December
- 2018 November
- 2018 October
- 2018 September
- 2018 August
- 2018 July
- 2018 June
- 2018 May
- 2018 April
- 2018 March
- 2018 February
- 2018 January
- 2017 December
- 2017 November
- 2017 October
- 2017 September
- 2017 August
- 2017 July
- 2017 June
- 2017 May
- 2017 April
- 2017 March
- 2017 February
- 2017 January
- 2016 December
- 2016 November
- 2016 October
- 2016 September
- 2016 August
- 2016 July
- 2016 June
- 2016 May
- 2016 April
- 2016 March
- 2016 February
- 2016 January
- 2015 December
- 2015 November
- 2015 October
- 2015 September
- 2015 August
- 2015 July
- 2015 June
- 2015 May
- 2015 April
- 2015 March
- 2015 February
- 2015 January
- 2014 December
- 2014 November
- 2014 October
- 2014 September
- 2014 August
- 2014 March
- 2014 February
- 2014 January
- 2013 December
- 2013 October
- 2013 July
- 2013 June
- 2013 May
- 2013 March
- 2013 February
- 2013 January
- 2012 December
- 2012 November
- 2012 October
- 2012 September
- 2012 August