6 karma · joined Jan 28, 2013 (13y ago) · 12 submissions
comment 4y ago · link · parent
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]));
};comment 12y ago · link · parent
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.
7.
Servo making progress on Acid2(imgur.com ↗)
1 points · by m-r-r · 12y ago · discuss
comment 12y ago · link · parent
comment 13y ago · link · parent
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...
comment 13y ago · link · parent
% 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
fi