dzsekijo's comments

dzsekijo | 1 year ago | on: What Is Vim?

I've set up myself once to learn Helix. First there was Kakoune that sounded exciting with its new modal model, but what had me wanting to really give Helix a go, beyond being exciting, was that it advertised itself "batteries included". It promised to deliver all the cool things programmers' editors do recently.

But then I stopped abruptly when realized Helix misses a key feature of Vim: swap files. I can just start editing and have not have to worry about losing my work, may whichever of computer panic, computer running off charge, environment (desktop env or tmux) crash, etc. occur.

So edit semantics is cool, but fundamentals like recovery should be got right before being a serious contender.

(I did a quick search to see if there is any news on this front, but what I found is all about "recovery hooks for panic", which is far more less than what's needed - it's about an emergency saving of the work if something goes awry with the editor. I need to be protected from loss if something goes awry with the environment too...)

dzsekijo | 1 year ago | on: File over App: A Philosophy for Digital Longevity

In my previous workplace I used to use Workflowy to keep my to-do list in. I had a script that generated OPML from data pulled from Bugzilla / GH Issues / Jira, which then I could paste into Workflowy and from that on, update it interactively in their web UI. The Workflowy data was daily synced to Dropbox (as OPML) which in turn was synced to my local machine, so I had all the data at hand in usable format even offline.

(OK, OPML is not utterly human friendly as such; actually when I needed to access it locally, I parsed it and used it in an interactive programming environment.)

This was a nice hybrid workflow.

dzsekijo | 1 year ago | on: Class methods are Ruby's useEffect

The post says "Most of our Ruby code reads like English, but that’s not the case when we combine multiple DateTimeFns class methods", and to illustrate this, gives the following agreeably ugly example:

  DateTimeFns.add_minutes(DateTimeFns.add_hours(DateTime.current, 1), 1)
Sure thing, but the syntax can be improved without restorting to refactor into instance methods:

  DateTime.current.then {
   DateTimeFns.add_hours(_1, 1)
  }.then {
    DateTimeFns.add_minutes(_1, 1)
  }

dzsekijo | 2 years ago | on: Rocky strikes back at Red Hat

Well, but then Red Hat's T&C may be a violation of GPL.

Red Hat bases its model on dwelling in the grey zone.

So if Rocky aspires to be a Red Hat clone... they can adopt this bit, too :)

dzsekijo | 2 years ago | on: I wish JSON5 was more popular

I don't see why to stick to being a JavaScript subset. Yes, in the olden days it was practical with JSON that there is no need to write a dedicated parser, just pass the data to eval(). Nowadays you should not pass anything to eval, apart from metaprogramming purposes (in which case the input is fully in control of the code).

dzsekijo | 2 years ago | on: I wish JSON5 was more popular

What I miss from JSON5 is a dedicated date/time type (TOML eg. does have it!). I understand that this would be a step beyond mere syntax sugaring, but I'd still prefer this trade off.

dzsekijo | 3 years ago | on: macOS Subsystem for Linux

I use Xhyve to spawn a Linux VM on Mac. For what I need it works well, so I haven't looked for alternatives. How that compares to Qemu?

dzsekijo | 3 years ago | on: Firefox is losing users fast

It's anecdotical, but I did use to have the common nitpicks with Firefox, the slight but annoying incompatibility with that what where the net is evolving these days, and weird performance chokes.

Then in the last few months... I noticed I do not notice these anymore. Using Firefox is pleasant and decent both on desktop and mobile now. They got their shit together, or my browsing habits have changed? Dunno... needs more time to decide.

Anyways, the deal maker for me is that still Firefox is the only browser that allows to export data from it in a tolerable manner. Sync data is accessible via the "About Sync" extension, and the ability to share multiple tabs on Android is golden. (As of Brave: Brave sync is great, but a third-party client or extension to explore its data does not yet exist [at least, it's hard to search for it, because "Brave sync extension" will bring up ways to sync your extensions in Brave, not extensions that interact with Brave sync].)

dzsekijo | 3 years ago | on: Why Ruby Is More Readable Than Python

What I enjoy about Ruby over Python the most is not intricacies of the OO implementation or delicacies of metaprogramming, but a good support for functional style. In ruby, statements are expression-like, they have a return value. Also, with Ruby it's easy to break down code to consecutive pure blocks.

Condiser the following task: take /proc/kallsyms in Linux, that lists symbols in kernel, in an '<address> <type> <name>' format, like:

  0000000000000000 A fixed_percpu_data
  0000000000000000 A __per_cpu_start
  0000000000001000 A cpu_debug_store
  0000000000002000 A irq_stack_backing_store
  0000000000006000 A cpu_tss_rw
  000000000000b000 A gdt_page
  ...
let's make stats on it -- how much of each type is present? Wanna get the result ordered by number of occurrence.

In Ruby:

  # ruby -rset -e '$<.readlines.to_set.classify { |l| l.split[1] }.transform_values(&:size).sort_by { |_,v| v }.to_h.tap { pp _1 }' /proc/kallsyms 
  {"V"=>1,
   "w"=>2,
   "a"=>14,
   "R"=>98,
   "W"=>154,
   "A"=>328,
   "B"=>655,
   "D"=>2910,
   "b"=>3097,
   "T"=>22289,
   "d"=>34424,
   "r"=>49904,
   "t"=>55346}
Of this method call chain, first and last are impure (as they do I/O), the intermediate ones are pure.

In Python you'll have to grind through it procedurally. (Unless you use reach out to some advanced libs... https://gist.github.com/richardbann/5b363096de6b3de2e8178cce...)

dzsekijo | 5 years ago | on: IBM Is Destroying Red Hat and Red Hatters Are Leaving

I'm also in RH. Our team is on Google Chat for some years now. Ironically, I preferred IRC as I could run my own instance of Weechat continuosly on a server and logged all conversations, so could extract information from history by grep et al. The hist search UI in gchat is much more cumbersome.
page 1