Hacker Newsnew | past | comments | ask | show | jobs | submit | more wonger_'s commentslogin

I rebound ctrl+j/k to scroll about a third or fourth of the screen (~20 lines?) as an alternative to ctrl+d.

I've been using { and } more as well. Mostly to navigate paragraphs of prose, but sometimes for code too.


Yeah, I did the same for shift+j.

When I experimented with scrolling, I found it hard not to lose understanding where I just scrolled from. What helped immensely was defining a top and bottom margin and using vim-smoothie.


Brief video demo: https://xcancel.com/spencerc99/status/1818721711858368890

See also the author's broader work in "computing-infused objects": https://spencer.place/creation/computing-infused-objects


And if you want to overhaul everything obsolete about the terminal and the shell, there's still more room for improvement: https://arcan-fe.com/2022/04/02/the-day-of-a-new-command-lin...


Can you point to a code sample using lenses?


This is a very simple example in svelte [1]

This is very detailed introduction and documetation of a lense-based architecture in react. [2] At the first glance it looks kind of overwhelming but it contains lots of examples.

This is a case study of many rather complex components. [3] The codinsteade is rather quick and dirty hacked together and at the first glance not really readable but thats kind of the point: even complex components can simply be composed locally from many small parts of requiring some global controller managing the state and keeping it consistent.

1: https://svelte.dev/playground/ea842faa235540bba43d7970ecf8ce...

2: https://github.com/calmm-js/documentation/blob/master/introd...

3. https://github.com/laszlokorte/svatom?tab=readme-ov-file


For font size that increases with screen size, you can use some clamp() math, like:

  --step-0: clamp(1.125rem, 1.0739rem + 0.2273vw, 1.25rem);
Taken from https://utopia.fyi/type/calculator?c=360,18,1.2,1240,20,1.25...


Good Enough did something similar: https://guestbook.goodenough.us/


I enjoy mundane lil blogs like receipt from the bookshop: https://katieclapham.substack.com/

And Jennifer Mills news: https://jennifermillsnews.org/


Thanks for these two! Receipt is right up my alley, being a lover of bookstores in general.


Aka "crowdsourcing a stack ranking of xkcds," or just the page title, "which one is the best xkcd?" Found a lot of gems I've never seen before


Could you elaborate on the part about calculating cells and merges?


As you know, grid and grid-like layouts work with cells. The height and width of these cells are integers. So, when you have something like this:

    +-----+-------+
    |     | Lorem |
    |     |-------|
    |     | Ipsum |
    |     |-------|
    | foo | Dolor |
    |     |-------|
    |     | Sit   |
    |     |-------|
    |     | Amet  |
    +-----+-------+
You have basically six cells. Five of them (lorem, ipsum, dolor, sit, amet) are 1x1, and the other one (foo) is 1x5.

What I do is, I draw the UI I imagine on a paper, add a grid where the smallest UI elements (labels, buttons, fields) their own, suitable $WIDTHx1 cells.

Some cells like "foo" needs to span mutliple cells (like this 1x5) to look and place correctly. At the end, you have a "spreadsheet like view" with some cells "merged and centered" in spreadsheet software parlance.

As the last step, I note the dimensions of the cells I need to realize the UI on the paper, and write the code reflecting that.


Not sure if this is standard for programming competitions, but I'm not a fan of this rule:

> During the qualification stage, the proctoring system must record the entire process of completing the problems. The recording must include video materials showing the participant, their computer screen, and the surrounding area.

> After completing the qualification stage, the participant must upload the recording to a convenient platform (for example, cloud storage or YouTube).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: