6 karma · joined January 28, 2013
Here is my implementation of the 'zip' function in modern JavaScript. It is similar to the Vlang version, but it is generic over the number of arrays :
const zip = (...arrays) => {
const length = Math.min(...arrays.map((array) => array.length));
return Array.from({ length }, (_, i) => arrays.map((array) => array[i]));
};Do you mean Chrome supports Promises like Firefox does? Last time I checked, the Chrome APIs were using callbacks for all asynchronous operations.
If you have difficulty learning French, I suggest learning another language with a similar "structure", such as Esperanto.
I'm a French native speaker, and I'm currently learning Esperanto. I find the two languages very similar in their way of constructing sentences, but the later one if a lot easier to learn: conjugation and agreement, in particular, are much simpler, and the absence of suppletion (a verb and its derivative always share the same root) helps greatly for memorizing the vocabulary.
For others proprietary softwares, breaking the compatibility with old versions is hardly conceivable: If Photoshop or AutoCAD where suddenly unable to use read and write the terabytes of data created by their users, those users would probably throw their PC through the window and never buy again a proprietary software...
% cd ~/Dev/W3/m-r-r.github.io
% alias -g :blog="$PWD"
% jekyll build -d /tmp/out/ && cd /tmp/out
% ./index.html
% cd :blog
% pwd
/home/m-r-r/Dev/W3/m-r-r.github.io
% alias -g
:blog='/home/m-r-r/Dev/W3/m-r-r.github.io'
:dev='/home/m-r-r/Dev'
:c='/home/m-r-r/Dev/C'
:python='/home/m-r-r/Dev/Python'
:vim='/home/m-r-r/.vim'
In addition, this method works with any shell command: % pwd
/tmp/out
% make -C :blog publish
% git clone git://git.complang.org/ragel.git `echo :c`/ragel
% vim `echo :vim`/templates/\*.rl
On the other side, the aliases are not saved at exit unless you write a function
to do it: % tail -n 15 ~/.zshrc
function aliases {
(
alias -L -r
alias -L -g
alias -L -s
) | uniq
}
function save-aliases {
aliases > ~/.zsh_aliases
}
if [ -f ~/.zsh_aliases ]; then
. ~/.zsh_aliases
fiIt depends of the font and the font size: sometimes, 1.3 is too much.