HNHacker News
TopNewBestAskShowJobs

onetom

255 karma · joined October 26, 2009

[ my public key: https://keybase.io/onetom; my proof: https://keybase.io/onetom/sigs/uy9zkyX7ZPfhmaA2RIGTwrDaU0M4zUFBXYVe_UUq4ME ]
submissionscomments
onetom··on Choose Boring Technology (2015)
Is Clojure a boring technology yet? :)
onetom··on Choose Boring Technology (2015)
Recommended "literature":

1. 10 Things I Regret About Node.js - Ryan Dahl - JSConf EU (https://www.youtube.com/watch?v=M3BM9TB-8yA)

2. Brendan Eich: JavaScript, Firefox, Mozilla, and Brave | Lex Fridman Podcast #160 (https://youtu.be/krB0enBeSiE)

onetom··on Github1s – One second to read GitHub code with VS Code
> ...it's honestly minimal.

then you compare it to something, which is even more "careless" with memory. what does this question has to do with honesty? it's objectively very wasteful. period.

compared to what, though? well, for one, compared to the amount of data it's working with.

onetom··on Why Clojure? (2018)
You can get quite close to "AST editing"-like experience if you just use the expand/shrink selection feature of a JetBrains IDE. It supports most mainstream languages.

You just select a syntactic unit with opt-up/down, then u either type over it, copy/cut/past or press left or right to go to the beginning or the end of the selection, hence using the selection as an intermediate step achieving AST-level navigation.

And of course you can teach Emacs to behave similarly, using the Expand Region (https://wikemacs.org/wiki/Expand_region) + some hacks, but I agree, that smartparens also solves this problem quite well.

UPDATE: also use avy-jump for emacs or acejump for intellij: https://plugins.jetbrains.com/plugin/7086-acejump these in combination with expand/shrink-region operations are a significant productivity boost, which is easy to learn and teach.

onetom··on IntelliJ Idea 2020.3.1 Is Out with Apple Silicon Support
It's important to compare it to a solution with similar capabilities, like VS Code + some LSP server and you will see that both memory and cpu consumption-wise it's almost the same weight class nowadays...
onetom··on IntelliJ Idea 2020.3.1 Is Out with Apple Silicon Support
If you are utilizing the JVM via Clojure, the situation is not that bad. A lot of Clojure's and Java stdlib's features are now available pre-compiled with GraalVM as a native executable via https://github.com/babashka/babashka, which provides you with instant process start

So the Java ecosystem is kinda living its renaissance now :)

But overall I very much share your sentiment.

Also worth noting that if you really want to slim a JVM runtime down, from a typical ~300MB size to ~50MB, it's not very complicated using `jlink`: https://medium.com/de-bijenkorf-techblog/creating-the-smalle...

It's still 50 times more than what I consider sane, but still... ;)

onetom··on IntelliJ Idea 2020.3.1 Is Out with Apple Silicon Support
Java is indeed feels like Assembly, compared to other JVM languages, but in large part because of its typed and object oriented nature. I have a very different experience with the JVM ecosystem when using Clojure.

It definitely doesn't "require 800 lines to talk to a REST API" if you use this HTTP server/client lib, written in pure Clojure: https://http-kit.github.io

I'm primarily developing Clojure software, using IntelliJ and I mostly use the keyboard for it.

Cmd-E for recent file or Tool window (Clojure Deps) switching. This is what I use the most.

Cmd-Shift-A for the Action Menu, which I use for Window Split Down/Right or Run tests and a couple of REPL commands, like copy the last result to the clipboard or open it in a browser. Opt-Tab to switch between splits. I don't switch between tabs, because I limited the max number of tabs to 1.

Cmd-, - Preferences

Cmd-; - Project structure

Cmd-Shift-O - Open files

Cmd-Shift-F - Search Files recursively in the whole project

Cmd-1 to focus and turn the Project file structure on and off, Cmd-Shift-Left/Right to resize it, Shift-Esc to close it (or any other tool window).

Cmd-9 for version control. Cmd-Shift-]/[ for moving between tabs. Ctrl-V for VCS operations menu, like (1 or just Enter) commit, (7) branch, (8) push.

Reassigned F12 to Cmd-2 to focus/show/hide the Terminal. Esc to switch the focus back to the Editors (which is buggy for years now and registers the Esc key in the terminal, but it's just a slight annoyance)

Cmd-Opt-R to run Clojure REPLs. Ctrl-Enter to eval top-level form or Ctrl-Shift-Enter to eval sexp before caret in the REPL. Cmd-Shift-J/K to barf/slurp, Cmd-' to raise and Cmd-(/[/{ to wrap sexp. Cmd-Shift-Up/Down to move an expression backward/forward within its containing expression. Cmd-/ to comment. Alt-Up/Down for Expand/Shrink selection by syntactical units. Refactoring with Ctrl-T.

Everything else is just opt/shift/ctrl/cmd + cursor keys, space, tab, shift-tab, enter or fuzzy search by simply typing the name of something in a popup list, dialog box or tool window.

These shortcuts cover ~80% of my time using IntelliJ, but I use another 10-20 keybindings, like folding an file structure navigation, which cover 95% of the use-cases.

It's also important to add that my CapsLock acts as both Ctrl and Esc and I'm using the SpaceFn layout via Karabiner Elements (as implemented by the jeebak complex modification). This makes a tremendous difference in convenience when using anything really from the keyboard primarily.

onetom··on AWS CloudShell
I have tried this setup recently (with XQuartz) but it had abysmal performance compared to a Tiger VNC session with a Linux server and a macOS client. I couldn't figure out why. I remember it was working better decades ago over 10Mbit/s connections, running on 80486 machines... Maybe between 2 Linux machines running the same Xorg versions would work better?
onetom··on Purpose-First Programming
I can't decide if you are making fun of diagram drawing or endorsing it, but here is my take on it.

I often start programming by "drawing" sequence diagrams, by typing up PlantUML descriptions (https://plantuml.com/sequence-diagram). This is especially useful, if the purpose of the program is to communicate with many other programs.

A sequence diagram allows to establish a language around the purpose of the program. Having it described textually allows extremely cheap (within minutes) iteration on names, algorithms and the architecture.

Showing all these aspects concisely at once makes it possible to develop a consistent, yet concise naming scheme, which can greatly reduce misunderstandings.

You can discover disconnects of interactions, the data flow or ordering errors by simply following the arrows with your finger/pointer and reading it out loud.

The other tool I found extremely useful is the C4 Lightweight Software Architecture Description Method (which can also be "drawn" pretty well with PlantUML: https://crashedmind.github.io/PlantUMLHitchhikersGuide/C4/C4... )

onetom··on Dev Fonts
I did use proportional fonts with REBOL, Ruby, CoffeeScript and JavaScript. Tried it with tab-indented Clojure code too.

However, 1-2 space indented code becomes just too ambiguous when rendered with proportional fonts, because the spaces are way too thin. I wish editors would render em or en-sized spaces instead, at least for the line-leading spaces. That way we would get the same indentation as intended with monospaced fonts, but still save horizontal space, while maintaining readability...

onetom··on Raspberry Pi 400 Desktop PC
When I was around 7 years old, our family was manufacturing ZX81, ZX Spectrum and Enterprise foil-keyboards, because the factory ones were just shit and died within a year or two.

they were all the same design. 3 layers of plastic foil. 1 for horizontal wires, 1 for vertical wires to create a matrix and a 3rd sheet of foil between them with holes, so the horizontal and vertical wires can contact when pressed.

before that, when I was around 6 years old, I remember my father was sticking round aluminum foil stickers on his finger and type directly on a keyboard made out of a PCB with a key matrix.

The keys were the shape of 2 combs facing each other and you had to short them by touching them with the alu stickers on his finger.

It was an AirComp II computer, iirc. I can't find any references to it online now...

onetom··on Keyboard-Only Web Browser
I'm 43 years old and my joints started to ache, including the ones in my fingers and my elbows.

Vimium really helps a lot, although I've started using it before my issues appeared and it was really comfortable.

I'm also using the SpaceFn layout with Karabiner Elements ("Personal rules (@jeebak)" from https://ke-complex-modifications.pqrs.org/?q=SpaceFn)

onetom··on Dasel: Query/update data structs from the cmdline. Supports JSON,YAML,TOML,XML
Only if it would support EDN (https://github.com/edn-format/edn) too... :) Although I was satisfied with Jet (https://github.com/borkdude/jet) so far.
onetom··on Emacs Prelude 1.0
it sounded like you're are actually describing this package manager: https://github.com/raxod502/straight.el
onetom··on Emacs-Helm development is now stalled
There is something about the multi cursors in ST and also in JetBrains IDEs, which just makes them more intuitive than whatever I tried in Emacs so far. Maybe it just can't be combined with evil mode reasonably?... Does anyone have a recommendation how to emulate the ST multicursor more closely in Emacs?
onetom··on Launch HN: GitDuck (YC S20) – Zoom for developers with real-time code sharing
We were trying to do Clojure pair programming in IntelliJ+Cursive and vim-iced over Tuple.app/Screen.so/Zoom/macOS-VNC-over-ZeroTier during the past few weeks.

Here are a few conclusions:

Having multiple, independent mouse cursors in one screen is and extremely useful feature.

Consistent low-latency is much more important than temporary low-quality video.

To conserve bandwidth, we hardly ever use the video-call capabilities; low-latency, crisp and wide-frequency-band audio is more than enough.

The screen sharing codec should be optimized for text, with sharp edges. I don't want to see glow or other jpeg artifacts around my letters...

Any of the mentioned programs can provide audio and video call capabilities; that's not a differentiating factor. I wouldn't mind using a separate program for just that, since it's a negligible initial inconvenience, when we are having pairing sessions for hours on end.

Instead of wasting your money on re-implementing such features in your own software, just blog about what existing solution would recommend for audio/video/chat. It's MUCH CHEAPER, than giving in to the NIH syndrome...

I would rather like to see you focus on more important aspects of developer collaboration, for example terminal and "network" sharing. After all we are writing that code not so we can talk about it, but to run it! For example, since we are programming in Clojure, we must see the same REPL window(s) too, not just the source code. We are constantly running the code we just wrote (and its tests) in those REPLs. Currently, the least painful way to do this is sharing the whole screen :(

I haven't given up on other solutions, like Emacs in tmux or in a headless xvnc server with small resolution, 8bit colors only and tiny fonts. Viewers would just magnify it to full-screen. Characters would look pixelated, but still sharp, if the magnification factor is integer. It's a pity that open-source vnc solutions are a lot slower and macOS' built-in one and they don't support server-side resizing to the viewer's window size and things like that...

onetom··on Launch HN: GitDuck (YC S20) – Zoom for developers with real-time code sharing
that works quite well, especially between macOSes, but only down to 1Mbyte/s bandwidth, if u r sharing a FullHD.

below that bandwidth, the latency is getting into the annoyingly high territory. and of course I'm taking about using it in approved quality mode.

it nicely handles HiDPI resolutions too, but unfortunately the built-in macOS vnc viewer can only scale down the screen, not up.

another issue is that zerotier doesn't work in China, but that's more of a social than technical issue unfortunately...

what I found is that Tuple.app makes a more useful compromise between latency and image quality. on low bandwidth your image might look like a balls of random pixels on first glance, but on a second look you can surprisingly still read it. meanwhile latency remains below 0.5s, so you can keep thinking together with your pairing partner.

screen.so over low bandwidth keeps the image quality significantly higher than just-above-unreadable, but then you are experiencing jittery 1-6 second screen update frequency.

onetom··on The evidence which suggests that Covid-19 is not a naturally evolved virus [pdf]
maybe to be safe and minimize the consequence of accidents?

maybe you can still arrive to the same conclusion, regardless of suppressing or amplifying a trait?

onetom··on Ask HN: My GitHub account got suspended without any notice
Many commenters were so focused on offerring some git repo hosting alternatives, while it was clearly stated in the post that @yg's main use-case was PR review.

What would you recommend to replace that feature?

https://docs.gitea.io/en-us/ doesn't say much about PRs/Issues unfortunately, but I found this GH-issue which suggest the Gitea do have a review system since 2018 autumn, which seems to be on par with Github's interface: https://github.com/go-gitea/gitea/pull/3748

Can anyone confirm this, who used both Github and Gitea PR review features?

onetom··on M60 – Open-Source USB&BLE, Hot-Swappable Mechanical Keyboard Powered by Python
A split space-bar version could make it a lot more versatile, without a lot of drawbacks, imho. You could use the 2 halves as layer keys when held or one as space, the other as backspace, or if one half is pressed, then the other half could mean backspace or enter.

There is also the SpaceFn layout, which works with just one space, I know: https://geekhack.org/index.php?topic=51069.0

but it feels like it could be a lot better with split spaces.

onetom··on Hyperapp – A tiny framework for building web interfaces
what else is missing other than docs? in hope you won't remove the current state, just because you don't consider it released yet :)
onetom··on Hyperapp – A tiny framework for building web interfaces
the tutorial is great this way. it's gradually introducing concepts and shows what's possible with very few building blocks. at the end, it would be nice to mention that at the cost of some extra code and learning a few more functions/concepts, you can gradually make application code either more concise with @hyperapp/html or having a different aesthetic or more familiarity - similar to JSX - with htm or the hyperapp-tailored variant of it, hyper-lit.

but please keep the current didactic of piecemeal introduction of concepts, providing clear reasons for their existence!

onetom··on Hyperapp – A tiny framework for building web interfaces
Svelte is more declarative. Svelte is also a compiler, which generates very efficient code for keeping the dependent parts of the DOM up-to-date when the app state changes, effectively moving the vDOM diffing cost from runtime to compile-time.
onetom··on Hyperapp – A tiny framework for building web interfaces
I can highly recommend you watching this talk: https://github.com/matthiasn/talk-transcripts/blob/master/Hi...

It explains very well why is something being easy shouldn't be the main metric, when choosing some technology.

In this case you are advocating to pull in webpack (28MB, 348 packages from 210 contributors), @babel/core (12MB, 54 packages from 60 contributors), typescript (53MB, 11 packages, 4 contributors), to just mention the most obvious and necessary dependencies, not even mentioning the different plugins for integrating them with each other, test frameworks, linters, IDEs (syntax highlighting and auto-formatting) and of course the mountains of type definition boiler-plate.

100MB+ of dependencies which are all a responsibility to learn, teach, configure and upgrade.

Versus this ~12000 bytes: https://unpkg.com/hyperapp

It's like 6 pages of code on a 2K iMac monitor and none of the above...

I'm not saying that there are circumstances when you might want to put up with all that cost, but have you consciously considered, whether it really worth the overhead? What's missing from hyperapp, which is only present in the 100MB+ deps? Maybe `htm` (1MB, 11 packages, 4 contributors) is a better compromise between bloat and ease of development?

And if you are willing to take on the extra dependencies, wouldn't ClojureScript provide a lot lot lot more benefits? It's also based on the super mature Google Closure Compiler, which supports extremely sophisticated optimization techniques and DCE... Just to mention some recent optimization surprise: https://twitter.com/roman01la/status/1277148232276234240

onetom··on Hyperapp – A tiny framework for building web interfaces
ah, and the article also mentioned https://github.com/developit/htm which pretty much provides what JSX does, just in a lot less complex way (at the cost of a little run-time)
onetom··on Hyperapp – A tiny framework for building web interfaces
If you keep your components small, then using this `h` function instead of JSX doesn't make a lot of difference from readability perspective.

Also, don't forget that `h` is just a function, so nothing prevents you from creating your convenience functions, which allow more concise/readable code, eg:

const div = (...args) => h("div", ...args) const span = (...args) => h("span", ...args)

(or something along those lines)

I've experimented with this approach before (in ClojureScript) and you can get pretty far with it:

https://github.com/enumatech/cljs-abi-viewer/blob/state-chan...

In fact the Hoplon (https://hoplon.io/) framework as already doing this many years ago, even just using the DOM directly.

onetom··on Learning to Cartoonize Using White-Box Cartoon Representations
...

Between day and night, between black and white

There is more, there is more than gray

Between the question and the answer

There's the silence of the sea

Between the cradle and the grave

There is the someone that is me

Between yesterday and tomorrow

There is more, there is more than a day

...

— https://www.streetdirectory.com/lyricadvisor/song/ceeoup/bet...

onetom··on Adventures in booting Linux on Raspberry Pi 4
I got into learning Linux by building a remote booting network. I was already doing that using Novell Netware and boot EPROMs or floppy disks, booting DOS over IPX. I kept building remote booting networks, then I discovered https://ltsp.org/ which made it a lot easier. I could easily switch declaratively between configs, like rootfs on local disk or nfs. I kinda miss those times...
onetom··on The Power of Language Degeneration
The writing has also reminded me the https://dotsies.org/ font. Change being presented gradually is actually a lot easier to adapt to.
onetom··on The Power of Language Degeneration
I don't see how is it degeneration. It's just a different encoding format...

Towards the end it looked very much like how you would transcribe English speech as Hungarian. I could read it fluently around maybe 50-70% speed.

Japanese does the same (for words they borrowed from English), so I could actually understand lots of things in Japan which were written using katakana, just after a month, without actively learning it. I might have spent 2 hours in total memorizing the katakana and hiragana symbols.

Dutch also became substantially decodable for me just after a day or two and after learning a few trivial transformation rules between spelling and speech.

← PreviousPage 5 of 8Next →