HNHacker News
TopNewBestAskShowJobs

cpbotha

882 karma · joined May 21, 2012

General profile: http://charlbotha.com/ Personal blog: https://cpbotha.net/

[ my public key: https://keybase.io/cpbotha; my proof: https://keybase.io/cpbotha/sigs/mzMn3i5hvqucynFjfzB-ky5GDTgoo10CrNyrC_Poy60 ]

submissionscomments
cpbotha··on Ask HN: How do you encrypt your laptops?
I find it interesting that nobody yet has mentioned TCG Opal with any of the latest popular consumer self-encrypting SSDs such as the Samsung EVOs and PROs.

You get full speed disk access and SSD friendly encryption (the disk is always encrypted anyways) and a relatively elegant way to install an unencrypted boot loader (PBA) that prompts you for your password.

There's a great open source Linux-based system for managing all of this (see my writeup https://vxlabs.com/2015/02/11/use-the-hardware-based-full-di... ) and I hear recent windows has built in support.

cpbotha··on How to Make C++ Code Run 90x Faster
Author of blog post compared random insertion / random deletion speed with vectors and lists of up to 100k elements, based on a talk by Bjarne Stroustroup: https://youtu.be/YQs6IC-vgmo

The surprising result is that vectors are MUCH (almost two orders of magnitude) faster at this than lists, altough your CS background would make you expect a result in the opposite direction.

From Bjarne's talk (very interesting) we see that for example finding a single element in the middle of a vector by linear search, and then having to move the subsequent 50k elements forward by one position, is still MUCH faster than finding that element in the linked list and performing the minor pointer surgery to remove it.

The reason is that the linked list traversal is accessing memory all over the show, while the linear and predictable vector traversal and memory copy is superbly handled by modern caching architectures, and hence so much faster.

cpbotha··on State of Bootstrap 4 vs. Foundation
The link is indeed down.

Here's the Google Cache version for your reading pleasure: http://webcache.googleusercontent.com/search?q=cache:http://...

cpbotha··on Strokes: Let's pretend D3 was written in ClojureScript
Probably the most important innovation of d3 is the idea of the DOM - data join. Mike Bostock, handsome father of d3.js and maker of all that is pure and wonderful (I have the good fortune to spend lots of work time using d3), mentioned this himself during his reddit AMA, see https://www.reddit.com/r/dataisbeautiful/comments/3k3if4/hi_...

In short, you get some data, you join it with a selection of wholly or partially non-existent DOM, and then you work with the enter (new), update (existing) and exit (not required for the new data) selection. This is an extremely powerful metaphor for representing data and performing dynamic data updates using arbitrary mixes of SVG (or any other DOM) elements. (oh, based on this mechanism, you can build really beautiful visual transitions)

Here's a short introduction to the join idea in d3: https://bost.ocks.org/mike/join/

BTW, programming in d3.js already feels a whole lot like programming in a functional language.

cpbotha··on Remember the Milk 2.0
Both you and comment parent might find this interesting: A few years back a friend and I designed a web-app that had as its core difference the ability to automatically schedule all of your tasks (based on estimated workunits / pomodori and deadlines) around all of your existing appointments and free time. At its core, it could answer the question: "What should I be working on now?" -- but it could do this in about 1 second (that's how long the solver took) for the coming 3 months. You could redo this analysis every time anything changed, and it would present you with a new 3 month planning. We didn't get any further than (working!) prototype with 30 beta testers.

If you're interested, here's an extremely short write-up of what happened: http://timescapers.com/2016/02/07/timescapers-and-timerank-r...

cpbotha··on Why I Still Use Python for High Performance Scientific Computing
You could send an email to the work address on my personal website (see HN profile). I can't promise that I'll be able to answer everything. :)
cpbotha··on Why I Still Use Python for High Performance Scientific Computing
I have first-hand experience with a BI-ish system, squarely targeted at the enterprise and doing quite well there, that we wrote using Django and a whole list of open source components.

We did run into some resistance initially, because our stack is almost the opposite in every way of what our enterprise colleagues are used to. However, our development velocity, especially around analytical features and just in general, has made a most gratifying impact.

(I have to add that the 5-man dev team we have working on this is stellar. It's hard to determine scientifically what the interaction is between team quality and the choice of a Python-oriented software stack. See Paul Graham's essays for more discussion on that point.)

In terms of support: There are many highly professional often boutique software agencies that can support Django systems, if you're not around. To my mind this is even better than the normal commercial support you get from a different vendor for each different component in your commercial enterprise system.

cpbotha··on Why I Still Use Python for High Performance Scientific Computing
The large number of high quality scientific and computational libraries that are easily available for Python (most things are a "conda install" or "pip install" away) plus the Jupyter (literate programming) notebook (although that now supports other languages) currently make a very compelling case for using Python instead of Haskell and most other functional languages.
cpbotha··on Show HN: Open-source Telegram bot for music sharing
Inspiring example, thank you!

I had a look at the source to your aiotg package for writing such Telegram bots. IIUC, you run a single Python process using asyncio, and that uses coroutines to handle all requests (in and out).

What is your experience w.r.t. scalability in practice, for example with your music bot? (iow have you run into any issues with large numbers of users interacting with the bot?)

cpbotha··on RESTful APIs R.I.P.
So the author proposes to replace REST with "JSON-pure APIs": Just stuff all of your data (errors, warnings, data, domain-specific stuff; he really does not propose any structure) into JSON, and then send and receive that via anything.

With this, we would lose the discoverability of a good REST API (see https://en.wikipedia.org/wiki/HATEOAS ), which would be a huge price to pay.

Other than that, this reminds me a bit of:

"Hey man, this relational stuff is really hard! There must be a better way..."

"I know a better way! Let's rather just stick all of our data into these JSON objects..."

cpbotha··on Quikly Jump to Your Favorite Directories with HyperJump Shell Script
Similar to the tool written about here, FASD is also awesome! https://github.com/clvv/fasd

It remembers where you go and which files you open. These days I just do "z gn" (for example) and it'll go to the project directory I've most recently been working in containing the letters "gn". ("zz gn" gives me a list, sorted in order of probability)

cpbotha··on Ask HN: Why aren't recipes written as timelines?
Gracipe was made by two students from my Data Vis course at the TU Delft: http://www.gracipe.com/ (it only started during my course, their app is far more extensive now)

They parse and show recipes as icon-oriented graphical timelines.

cpbotha··on Notes on my full-time testing of 7 Dropbox alternatives
cyphertite looks more like a backup solution than a syncing solution. Does it also do syncing?
cpbotha··on Notes on my full-time testing of 7 Dropbox alternatives
Yes, unison does require that you have matching versions on both ends of the synchronisation.

Fortunately, installing unison can be done quite easily without root access. On my synology, I simply downloaded the arch linux arm packages and extracted the 2.48.3 binaries from there. Because the packages in Ubuntu 14.04 are outdated, I extracted the binaries from the arm linux x86_64 packages for my laptops. For MacOS, there are downloadable 2.48 binaries that also work out of the box.

cpbotha··on Why I killed my standing desk
I bought that desk in 2013 and have been using it ever since, would not be able to go back to a normal desk.

The secret is definitely that it should be adjustable, that is you should be able to vary between sitting and standing. I switch about 4 to 5 times per day.

It's glaringly obvious that you're not supposed to stand and work the whole day. I don't understand how the author of the linked post (and many other "standing desks suck" articles) didn't realize this.

cpbotha··on Dell’s Linux PC sequel still just works, but adds 4K screen and rough edges
On Ubuntu this problem is caused by the gpu-manager that keeps on rewriting xorg.conf incorrectly for the Optimus NVIDIA / Intel setup.

I analyse the problem and present a hacky work-around in this post: http://vxlabs.com/2015/02/05/solving-the-ubuntu-14-04-nvidia...

cpbotha··on Show HN: Quiver – The Programmer's Notebook
Emacs org-mode with babel is definitely the bee's knees.

I can intersperse org-mode markup (much richer than markdown) with syntax-highlighted and executable code snippets. I can export all of this to my wordpress blog or to great-looking LaTeX documents, or even to presentations using org-reveal.

Here's an example of an exported org-mode file with math and graphics: http://vxlabs.com/2014/06/16/level-sets-the-practical-10-min...

Here's a simpler example with just Python snippets embedded: http://vxlabs.com/2014/11/12/getting-django-rest-framework-t...

cpbotha··on Hello Firefox! Mozilla's browser gets built-in WebRTC video chat
Thanks, your mozilla wiki link answers my group video calling question: Loop / Hello is primarily meant for 1-to-1 video calling.

Although this is an awesome development, group video would have made it a killer application.

(for now, you can use https://opentokrtc.com/ to try out OpenTok's group video calling support)

cpbotha··on Poll: Did you “drop Dropbox”?
I dropped Dropbox when the Snowden era began.

Since then I've been searching for a suitable replacement:

btsync (broke git index files) -> unison via star topoogy (no history) -> syncthing (0.9.17 - very promising, but too memory hungry for my synology ds213j) -> synology cloudstation (simply broken, conflict files everywhere) -> seafile via seacloud.cc (promising, but keeps on eating 100% CPU core) -> btsync 1.3.109 (1.4.83 is ridiculously broken) with ntp everywhere in the hope that my git index problem won't come back.

(blog post will hopefully happen soon)

cpbotha··on The $50 Kitkat Android phone
Here's Vodacom's (in South Africa) $50 Android KitKat phone: http://www.techcentral.co.za/vodacom-smart-kicka-review/5018... -- it's at the very least prettier. :P

(This smartphone at this price-point is actually an extremely big deal for the gigantic emerging African market.)

cpbotha··on My Synology NAS has been hacked by ransomware calling itself Synolocker
Open the Control Panel, then select Security (under "Connectivity"), then the "Auto Block" tab and check "Enable auto block".

Kiddies will scan, this blocks their IP numbers after N (by default 5) failed attempts to connect to a number of services, including SSH. My synology has blocked large parts of the internet over the past few months. :)

(only my SSH port is open to the outside so that my laptops can synchronize with my Synology via unison over SSH when I'm on the road.)

cpbotha··on Dear Google, it's not me. It's definitely you.
Maybe he should have hosted his page on Google Sites?
cpbotha··on Papers – Desktop app for finding, organizing, citing academic research
I remember that OSX colleagues used to be quite enthusiastic about Papers. As a Linux and sometimes Windows user, I used to use Mendeley quite intensively, until I rediscovered Zotero, which is open source, and for my use case much better than the competition.

Zotero is cross-platform; it enables me to sync my papers in whichever way I choose and its bibliographic data extraction and PDF downloading work much better that that of Mendeley, because it does this from your computer, not via their servers, meaning you have access to all the fulltexts that your institution has access to.

I've used Zotero to write a bunch of papers, book chapters and part of a book. It's very solid.

cpbotha··on Ask HN: What do you use to organize your knowledge?
Obsessive note-taking lab-journalling knowledge organizer here.

* For years simplenote, first using RespohNotes under Wine, then writing https://github.com/cpbotha/nvpy - a cross-platform and open source simplenote client in Python with tikinter. Currently looking for a new maintainer, because:

* Currently in an in-between phase editing Gollum wiki markdown pages with emacs 24 (sometimes I also use gollum to access and edit), all synced with unison, and using Google Keep on my phone.

* Currently working on hobby project, which will be the non-linear super visual (spatial perception and memory FTW!) cross-platform (large displays!!) note- and file-organizing interface I've been dreaming about for months now.

cpbotha··on Ask HN: What does your home office look like?
Here's part of my current home office: http://imgur.com/ERUHALo

* Motorized adjustable standing desk from the Ikea (Linak legs; whole thing was under €600), in standing mode. Yes, fixed standing desks are not going to work, you need to be able to alternate between standing and sitting throughout the day.

* On the left, Synology DS213j, TP-Link TD-W8970 ADSL2+ Modem router and Meissner 750VA UPS to keep my internet connection going during Eskom (South African electricity supplier) power outages / load shedding (tested, works a treat! with laptops charged, I can continue accessing internet for a few hours of no power. Telkom exchanges have their own power supplies)

* Cheap laptop with IPS display (see http://wp.me/p1dVx9-6k ) connected to Samsung external LCD. You're seeing Emacs on the left with Zenburn theme, and Intellij IDEA 13 on the right with Darcula IDE + Solarized Dark editor themes, everything still on Ubuntu 12.04.

* My corner is indeed quite cluttered, but comfortable to work in. :)

cpbotha··on Introducing StandDesk [video]
For a few years Ikea has been selling a _relatively_ cheap motorized adjustable standing desk with Linak legs: http://www.ikea.com/nl/nl/catalog/products/90088946/ -- this also only has the two legs and no stabilizer. (I'm not sure what the StandDesk patent could possibly be for, it looks identical to the Ikea version)

I bought mine in The Netherlands for EUR 560 and I love it to bits. The more affordable adjustable standing desks, the better!

cpbotha··on A JSON field type for Django
There are a number of existing jsonfield implementations. This one, probably the best of the lot, DOES make use of the PostgreSQL JSON field: https://github.com/bradjasper/django-jsonfield/blob/master/j...

It looks like your app does more in terms of casting data that comes from the field. Is this the major improvement?

cpbotha··on Developer and Power Users Tool List for Windows
Are you sure about that?

It's hard to find benchmarks, but things seem to point in the direction of fastcopy still being faster.

See e.g. http://www.sepago.de/e/helge/2011/05/17/fastcopy-free-file-c... (robocopy comparison at the end)

Would be great to see benchmarks of course! :)

cpbotha··on Developer and Power Users Tool List for Windows
FastCopy does everything TeraCopy does, but faster and better: http://ipmsg.org/tools/fastcopy.html.en

(this is the only tool I miss when working on Linux)

cpbotha··on Impress.js
A good reason for using a non-linear tool such as this, is that you're able to layout your points (slides) on an infinite canvas, and make use of that specific layout to better explain how each point fits into the whole structure.

For example, I've used impress.js to fan out from a central idea along different lines of work, each line being punctuated with different slides. The cool thing is, you can make a virtual overview slide that shows the whole clickable canvas.

I've also used the layout to embed images resulting from intermediate algorithm stages directly inside those stages in the diagram.

Besides that, and the flashiness which is definitely nice to have, your presentations are in an open format that's not locked to a specific vendor. (this is coming from someone with more than 10 years of academic presentations in powerpoint, which I now have trouble re-using due to almost 100% Linux everywhere. LibreOffice Impress 4.1 can display them, but much is lost in the conversion :)

← PreviousPage 2 of 3Next →