As more people, money, and attention move to the internet, those who own, build, and use online spaces are increasingly having to reckon with bad actors in their midst.
By the term bad actor, we refer to those who seek to do harm against others on various platforms and beyond, often covertly and usually through exploiting weak points in how they are designed or operated.
The effects of bad actors online are not isolated to our computers or small communities of tech enthusiasts, but are felt in the greater society. News headlines frequently feature the names of large technology companies who have either failed to stop bad actors or acted in bad faith themselves. …
Kiwix is a software project that lets you view several popular websites like Wikipedia, TED, and StackOverflow without having to connect to the internet. This is possible through the availability of ZIM files that are essentially compressed versions of these websites at a moment in time (visit this link to see the kinds of content you can download).
The desktop version of Kiwix can be downloaded for Windows, macOS, and Linux and basically serves as a browser for viewing ZIM files. There also exist ports for iOS and Android. However, the latest release of the desktop app is version 0.9 …
UPDATE: The latest version of Karabiner-Elements
I only used these Karabiner and Seil to do two things:
So this might not be super useful if you are a power user.
Be sure to checkout these projects, and even donate some money to the hardworking developer of Karabiner.
It seems like development has halted on Karabiner, but a different project, Karabiner-Elements has popped, which supports Sierra, but doesn’t have the GUI and all of the features (yet) as Karabiner. …
We’re finally going to put add and subtract to rest, but transition into a discussion on polymorphism by defining NumericFn2 type in terms of the more general type CurriedFn2:
declare type CurriedFn2<T1, T2, R> =
& ((t1: T1, t2: T2) => R)
& ((t1: T1, ...rest: Array<void>) => (t2: T2) => R)
declare type NumericFn2 = CurriedFn2<number, number, number>
this is how the library definition in flow-typed has it defined.
This technique uses polymorphism to define a type which, when provided with other types T1, T2, and R produces a concrete type. …
At the end of the last post, this is how we had defined add and subtract:
declare type NumericFn2 =
& ((x: number, y: number) => number)
& ((x: number) => ((y: number) => number))
declare var subtract: NumericFn2;
declare var add: NumericFn2;
We had some simple tests that seemed to pass:
add(1)(1) == 'a'; // error
But if we try this:
subtract(1, 'a'); // no error
we don’t get an error! What might be going on? Check this out:
subtract(1, 'a')(1) == 1; // no errors
subtract(1, 'a')(1); // error: number cannot be compared to string
So it seems that subtract(1, ‘a’) is assumed to match the same case as subtract(1), since where the ‘a’ is just assumed to be a superfluous extra argument. …
Ramda provides simple mathematical functions like add and subtract, which do what you might expect, but are (like all functions in Ramda) curried:
// number -> number -> number
const two = add(1, 1);
// number -> number
const addOne = add(1);
const three = addOne(2);
Thus, add needs two function declarations to account for both kinds of calls:
declare function add(x: number, y: number): number;
declare function add(x: number) : (y: number) => number;
// test.js …
Last week, my goals were modest: get Neovim installed, then get some plugins for it. I didn’t set any goals for this week, but still managed to add a little bit to my configuration.
Someone posted a quote from this post of Vim koans. Definitely had a good laugh with these.
I browsed through Hacker News for Vim-related content and found this post from Doug Black: A Good Vimrc. I took some of his settings and put them into my nvim.init
It turns out that some of his settings are not necessary in Neovim, as they are set as defaults.
I started watching the videos on Vimcasts. …
I’ve been a longtime user of Vim emulation in text editors like Sublime Text, Atom, and IntelliJ IDEA, but haven’t gone so far as to use Vim itself for work. With the recent stable release of Neovim 0.1.x, and its promise of a faster, leaner implementation of the storied editor, I decided it might be time to move beyond being a Vim poser and try to become a competent and confident user.
My hope is that these posts will be helpful for people like me who are relatively experienced at using Vim-modes in other editors and want to start their journey with Neovim. In other words, this is not the story of an experienced Vim user making the move to Neovim; I’m starting from scratch, with almost no previous knowledge of Vim, .vimrcs …