HNHacker News
TopNewBestAskShowJobs

tonsky

113 karma · joined April 25, 2014

https://tonsky.me/ https://mastodon.online/@nikitonsky
submissionscomments
tonsky··on Hardest problem in computer science: centering things
They did center everything correctly for decades, do you think it was a mistake? https://grumpy.website/938
tonsky··on Hardest problem in computer science: centering things
You align by the space between cap-height and baseline. Always. It always looks good. Even for lowercase. You don’t need to think further. That’s it. That’s the solution
tonsky··on Hardest problem in computer science: centering things
Or you can just ditch flex-direction... It’s not like it serves any great purpose
tonsky··on Hardest problem in computer science: centering things
That’s what ChatGPT told me
tonsky··on Hardest problem in computer science: centering things
That’s not true though. You don’t need different styles for text on different platfroms. They all work the same
tonsky··on What every software developer must know about Unicode in 2023
Good luck https://mastodon.online/@alexeyten@mas.to/111166351426290784
tonsky··on What every software developer must know about Unicode in 2023
Hi, author here. In case you really want to know: no, it’s custom-made and works exactly as intended. There are two main reasons:

1. Fun. Modern internet is boring, most blog posts are just black text on white background. Hard to remember where you read what. And you can’t really have fun without breaking some expectations.

2. Sense of community. Internet is a lonely place, and I don’t necessarily like that. I like the feeling of “right now, someone else reading the same thing as I do”. It’s human presence transferred over the network.

I understand not everybody might like it. Some people just like when things are “normal” and everything is the same. Others might not like feeling of human presence. For those, I’m not hiding my content, reader mode is one click away, I make sure it works very well.

As for “unexpectedly ended up on HN”, it’s not at all unexpected. Practically every one of my general topic articles ends up here. It’s so predictable I rely on HN to be my comment section.

tonsky··on What every software developer must know about Unicode in 2023
oops :) fixed, thanks!
tonsky··on Grumpy Website
Thank you! I think it’s the only way it makes sense
tonsky··on FiraCode: Free monospaced font with programming ligatures
(creator here) Thanks! I’m glad you are enjoying it!
tonsky··on Managing State with Signals
Clojure only uses earmuffs for dynamic vars
tonsky··on Managing State with Signals
What do you mean by “actually worked”?
tonsky··on Managing State with Signals
Well, it’s mentioned in a sense that “Reactive UIs never became mainstream” :( Would be interesting to understand why
tonsky··on Managing State with Signals
It predates it by a few years https://github.com/tonsky/tonsky.github.io/commit/fd5e59a837...
tonsky··on Managing State with Signals
https://github.com/hyperfiddle/electric ?
tonsky··on Ask HN: AI-generated spam pull requests?
I got one too https://github.com/tonsky/FiraCode/pull/1518
tonsky··on Adventures in REPL Implementation
That’s why most features in my plugin are optional: you choose what you need or like and ignore everything else
tonsky··on Humble Decomposition
That’s because Humble UI have to work with JWM/Skija and I didn’t want to do conversion from Java Point to Clojure Point every time. I needed _base_ librariers to return Points/Rects that are already directly accessible from Clojure
tonsky··on Humble Decomposition
There are Skija and JWM which are pure Java (and I want them to stay that way, to be used from other JVM-based languages)
tonsky··on Thoughts on Clojure UI framework
JWM (a window library that I plan to use) shows a fully initialized window in 600-700 ms on M1 mac for me. That’s without Clojure, but with JVM overhead

https://github.com/humbleui/jwm

tonsky··on Thoughts on Clojure UI framework
It should. I plan more traditional packaging (exe/app) too, but jar will probably be the first option before that
tonsky··on Thoughts on Clojure UI framework
I am pretty sure it can be worked around or even emulated in Clojure with minimal effort if needed
tonsky··on Thoughts on Clojure UI framework
thank you!
tonsky··on Thoughts on Clojure UI framework
Maybe Wikipedia article should be fixed then:

> Recent versions of Qt use the native style APIs of the different platforms, on platforms that have a native widget set, to query metrics and draw most controls, and do not suffer from such issues as often

https://en.wikipedia.org/wiki/Qt_(software)

tonsky··on Thoughts on Clojure UI framework
I find encapsulation more of a disadvantage than advantage. I want access to internals when I need to. Passing lambdas is not data-oriented, and it does not help to prevent tangled data dependencies
tonsky··on Thoughts on Clojure UI framework
thank you!
tonsky··on Thoughts on Clojure UI framework
I dunno, it takes around 3 seconds to finish launching on M1 mac. Sublime Text is ready under 0.5 seconds
tonsky··on Thoughts on Clojure UI framework
Live reload gets you most of the way for UI programming, yes.

REPL is the secret sauce for writing any time of program, not only UI. It lets you explore, play, test, inspect and break things very quickly and without losing context before you find the final shape of your code.

I can’t live without it, but it’s hard to explain the benefits to the people who have never experienced it. You have to try it to really be convinced

Here is a tiny demo of how I usually use it to build a program https://tonsky.me/blog/interactive-development/

tonsky··on Let’s fix font size
font metrics are fractional at most sizes. You can optimize font for one particular size, but for any other, there will be gaps
tonsky··on Let’s fix font size
Fira Code has it!
← PreviousPage 2 of 5Next →