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 Gripes with RSS after one week
btw, https://vimium.github.io/ would let u use vim navigation on any web page
onetom··on Why your REPL experience sucks
If the Elixir REPL is like a Ruby, Python or Node.js "REPL", then we are not talking about about the same kind of REPL in this context.

I suspect, that the Elixir REPL is more like the Erlang REPL, which might be the same kind as LISP REPLs, but I have no direct experience, I just saw Erlang REPL usage from John Hughes videos.

onetom··on Why your REPL experience sucks
Have a look at Fred0verflow's videos, for example:

* https://www.youtube.com/watch?v=St0_jsPnGAw - analyze some SO HTTP API responses * https://www.youtube.com/watch?v=TaazvSJvBaw - transducers from the ground up

I think they are great, crystal-clear examples of REPL-based development.

onetom··on Why your REPL experience sucks
I have a shortcut, which reloads all modified files, then re-evaluates the previously evaluated expression, within the context of the same namespace it was evaluated in previously.

This way I can be in any file, modify any `def` of `defn` and see its effect on the expression I'm working on.

After modified something, I might jump to its unit test or jump to some definition of some adjacent vars, where i see a point which I want to probe (with a function like this: `(defn ? [x] (pprint x) x)`).

Then I have 2 modified files, and my cursor is in a 3rd file and the expression I'm iterating on is in a 4th; doesn't matter, I can just keep hitting the same shortcut (Cmd-Ctrl-Enter) to see the effects of my changes on the "expression-under-test".

It's an extremely convenient workflow, which is also easy to teach to ppl!

Downside is that you can't have namespaces, which have side-effects WHEN they are loaded.

To deal with that problem, I'm using `redelay`, `rmap`, `meta-merge` & `defonce`, eg:

    (ns service
     (:require
       [meta-merge.core :refer [meta-merge]]
       [gini.rmap :as rmap :refer [rmap ref] :rename {ref $}]
       [redelay.core :as redelay])

    (def kit
      (merge {:cfg {:db/uri "..."}}
             (rmap {:db (connect (:db/uri ($ :cfg)))})))

    (defonce service-ref
      (redelay/state
        :start (rmap/valuate! 
                 (meta-merge service/kit 
                             {:cfg  {:param 'override}
                              :some 'special-component}))))

    (defn service [] (deref service-ref))

    (comment
      (.close service-ref)
      (-> (service) (some-operation x y z))
      )
More info on this topic is here: https://functionalbytes.nl/clojure/rmap/2020/07/04/rmap-2-up...
onetom··on What’s so great about functional programming anyway?
omg, so much negativity here...

you should read the previous articles from the author, eg. https://jrsinclair.com/articles/2022/javascript-function-com...

then

https://jrsinclair.com/articles/2022/what-if-the-team-hates-...

it would address some of the concerns and critiques ppl had on this topic here.

onetom··on Show HN: Restfox – Open source lightweight alternative to Postman
Well... that's called programming, no? :)
onetom··on Ask HN: Does anyone else think SQL needs help?
SQL was meant to be a hosted language from the get-go though, so any kind of macro-like feature was expected to be done in the host language.

Of course it's a bit painful and error prone, given SQL is a textual language, but as HoneySQL (https://github.com/seancorfield/honeysql) shows, you can represent SQL statements as data and generate them programmatically in a safe manner. I think it's compatible with https://babashka.org/ so you don't need a full Java environment to use it.

onetom··on Ask HN: Does anyone else think SQL needs help?
SQL is great, but you do have to dig deeper and use more of its features, like many other comments mentioned, like WITH & VIEWs.

On the other hand, maybe the time is ripe for you to "graduate" to using Datalog via other kind of databases, like Datomic, XTDB (fka Crux) and the likes (DataScript, Datalevin, etc)

Of course knowing Datalog won't help you with your SQL issues, but you can look into changing jobs, if you like what you see or maybe do some ETL job to spill over some data into the mentioned DBs and see whether querying it with Datalog is any better.

onetom··on Ask HN: Does anyone else think SQL needs help?
I happened to be in charge of organizing the translation of one of Celko's books to Hungarian. I even translated some chapters myself and proof-read the other chapters. It was indeed an eye-opening exercise! My background at that time was DBase, FoxPro and reading the Postgres docs. It was great to read don't recommendations about how to use the toolkit of SQL to answer real-world questions.
onetom··on Ask HN: Does anyone else think SQL needs help?
I have just learned about the RETURNING close of INSERT just a few months ago for example and I'm programming since 1983... and I've learnt it from someone, who is 20 years older than me...
onetom··on Atkinson Hyperlegible Font
Their paid (120 USD) Monolisa Plus variant does have the regular g, though.
onetom··on Programming Fonts
I also bought Comic Code just ~2 months ago.

Used Fantasque Mono before it. I was quite happy with that, but compared to Comic Code, it just feels soul-less... If you don't have the money though, it's a great alternative.

Otherwise I would highly recommend the Ubuntu fonts, because they are very well hinted at smaller sizes and look great without antialiasing too, just like Envy Code R!

onetom··on Programming Fonts
Envy Code R is pretty will hinted between the 10-16px range. i used it without antialiasing any it's great on lower resolutions. u can still pack a lot of code onto a (sub)FullHD screen readably.
onetom··on Programming Fonts
I'm 45 and I was excited to use them at first, but then as I was changing editors/terminal emulators, coding fonts, I couldn't always had them anyway, so I'm not attached to the idea.

I also prefer the lack of them, exactly because they apply to strings and comments too, where they are often undesired.

I write Clojure code most of the time, so maybe that's a deciding factor too...

onetom··on Programming Fonts
i would also consider the use of font styles syntax highlighting... I saw such a thing in Turbo Pascal 5.5 for the first time and the only thing they did was the use of bolding for language keywords, like in this book: http://bitsavers.informatik.uni-stuttgart.de/pdf/borland/tur... then in Delphi 1.0: https://winworldpc.com/screenshot/c38bc3b1-c3a1-2a2d-6211-c3... and in upcoming versions, it started to use italic for comments, but still no colors, yet we called it syntax highlighting. but my memories might be inaccurate :)
onetom··on Straight.el: next-gen, purely functional package manager for the Emacs hacker
After stumbling upon straight via Doom Emacs, I finally felt confident enough to built my own, from-scratch configuration, without worrying about the kind of constant issues my colleagues were experiencing on their Doom or Spacemacs setups every few months or sometimes every few weeks.

I knew very little about Emacs (27.1) at that time, yet it was an effortless endeavor to grow my own config: https://github.com/onetom/onetomacs

I had literally zero hiccups with packages, though I haven't even froze them, while kept upgrading every few weeks with straight-pull-all.

I think the other big contributor to my pleasant experience was that I've vetted and studied every package, before I've added it to my config and tried to figure out what would it offer compared to built-in functionality.

I'm programming for 40 years by now and primarily in Clojure for the past ~7 years (using IntelliJ/Cursive), so I guess that helped a lot too...

onetom··on Straight.el: next-gen, purely functional package manager for the Emacs hacker
that's not doom for sure, because I'm also getting those branch rename prompts on my from-scratch straight.el based config too.

it could be the built-in vc.el too, because I can imagine straight depending on that, but I haven't checked.

onetom··on Straight.el: next-gen, purely functional package manager for the Emacs hacker
I think Ansible is a little bit of an overkill for this purpose, but also, it's fundamentally a non-reproducible system-configuration-management tool, just like Emacs' built-in use-package system.

Straight.el carries over the idea of reproducible builds from the Nix package manager and applies it to the specifics of the Emacs ecosystem.

So the whole point is to get away from the reproducibility issues of Ansible, use-package and the likes.

onetom··on Ask HN: Feel bad about working in crypto, what to do?
And you sound like a robot, giving the same canned response to others' comments.

I suspect, your definition "crypto" is not the same as the definition of OP.

Can you elaborate more, why do you think it's a fad?

Have you tried to write, deploy or at least use any Ethereum contacts? Do you know how Merkle trees work or at least what are they useful for? How about elliptic curves?

I worked on this off-chain technology a few years ago: https://github.com/enumatech/sprites/tree/master/examples/pa...

onetom··on Keep Your Experiments Separate
That is something you would do after you made your experiment. The point of the article’s advice is to avoid feature interaction.
onetom··on Keep Your Experiments Separate
As I understood, fork was just meant conceptually, not as a GitHub/GitLab fork. A git branch is a fork in the timeline of a codebase.

The point of the article is avoiding feature interaction. Try to implement a feature first on top of a smaller feature set first, just so you can learn about the problem domain and the solution space. After that, integrating such a feature on top of a more complete application should be significantly easier.

onetom··on Keep Your Experiments Separate
Both the author and Eric Evans are extremely experienced programmers.

Forking is to be understood conceptually, not as a terminology of any specific version control system. As in a git branch represents a fork in the time-line of the evolution of a code-base. It just happens to be that fork also means something more specific in case of the GitHub/GitLab online services.

onetom··on Tell HN: Bitwarden does not export attachments in backups
It’s not something which you simply forget to think about. There must be a lot of features, which are more important, as in being requested for.
onetom··on Tell HN: Bitwarden does not export attachments in backups
Well, you can just get BLOBs out of an SQLite DB with SELECT. Also: https://www.sqlite.org/fasterthanfs.html

Not that performance or file size would matter in this case, BUT what using SQLite would allow is to use a single format for persisting all aspects of the password database, with immediate, programmatic, random access to all fields, including attachments.

But I also agree, that for this specific use-case, even SQLite is a bit of an overkill probably.

Finally, there is always https://www.passwordstore.org/ :)

onetom··on Tell HN: Bitwarden does not export attachments in backups
Except a bug is an unintentional problem with something, which exists. The backup feature not saving attachments is a missing feature. You need to write more code to support it, NOT simply modify existing code, which was already meant to provide this feature, but because of some mistakes it doesn’t.
onetom··on Apple unveils all-new MacBook Air, supercharged by the new M2 chip
I'm using 256GB machines for Clojure development in IntelliJ since 2017 and I never run out of disk space. I have 36GB of photos and 10GB of iPhone backups on iCloud Drive though.

The trick is not to mix your personal stuff, like movies, photos and music with your work stuff. Also make sure you regularly clean up the older versions of the software you use, including Docker layer caches, brew / nix packages, JetBrains IDEs, browser caches, etc. If you are not doing audio/video work, then removing iMovie and GarageBand frees up 4.5GB. Similarly Keynote/Numbers/Pages 2GB.

onetom··on Apple unveils all-new MacBook Air, supercharged by the new M2 chip
I'm using IntelliJ IDEA 2022.2 EAP (Ultimate Edition) Build #IU-222.2680.4, built on May 25, 2022 Runtime version: 17.0.3+7-b463.3 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

and it's freaking buttery smooth. notice the "aarch64" part!

onetom··on Apple unveils all-new MacBook Air, supercharged by the new M2 chip
Because you are most likely running the Intel version, not the Apple Silicon one! Check it in the Activity Monitor. There should be a "Kind" column on the CPU or Memory tabs. If not, you can turn on that column via a right click on the headers.
onetom··on Apple unveils all-new MacBook Air, supercharged by the new M2 chip
Because ppl use Docker, even when it's not really that necessary... I'm using Nix for the past few years and it has obviated the need for Docker. I have simple shell.nix files, which are activated via direnv and that's it; 0 runtime overhead, no need to install various java/node/python/ruby version managers.

What actually feasts on memory is the various chat apps and project management and knowledge-base management software, in-browser email clients, github pages, JetBrains IDEs.

You should keep these closed, whenever u can and then 8GB is enough comfortably. You will still receive Slack notifications on your phone, then u can fire up Slack to reply or have a discussion. Same with Notion or Logseq. You don't need to have a gmail tab open all the time either. The built-in Mail.app might just be enough for you too, which might eat slightly less memory. You can use Sublime Text or Emacs for editing, instead of VS Code or WebStorm. Install a browser-tab suspender extension. Download technical docs and read them via Dash (or whatever open-source equivalent it has). Have you looked into how much memory does a github.com page eats?

onetom··on Apple unveils all-new MacBook Air, supercharged by the new M2 chip
No matter how I squint, those 2 statements are logically equivalent, while "both harm the environment" is also true, but you "harm" the environment too, in that sense, no?
← PreviousPage 3 of 8Next →