Hacker News new | past | comments | ask | show | jobs | submit | JadeNB's favorites login

Rewriting these for jj users. I'm prefering long option names and full command names for clarity here, but all the commands have shortened aliases and all the option names have single-letter alternatives. `@` means "the current revision", `x+` means "the revision just after `x`", `x-` means "the revision just before `x`".

2. "Accidentally committed something to master that should have been on a brand new branch".

This doesn't really have an analogue. Branches ("bookmarks") only move when you tell them to. If you make a new commit on top of master, it doesn't point master to it, it just lives one past the tip of master. But let's say you accidentally moved master to include the new commit you shouldn't have:

    # set master to the previous commit (and reaffirm that
    # you're okay moving a bookmark backward)
    $ jj bookmark set master --allow-backwards --revision @- 

    # there is no step two, you're still editing the change you already were
3. Move a commit from one branch to another.

    # move the revision one-past-master on to our desired bookmark
    $ jj rebase --revision master+ --destination name-of-the-correct-bookmark

    # there is also no step two; technically we're not updating the bookmark
    # to point to the new commit yet, but this isn't something you'd do as rote
    # habit in jujutsu anyway
4. Fuck this noise, I give up:

    # list all the operations I've performed against the repo
    $ jj op log

    # restore to some previous known-good state
    $ jj op restore {id}
Bonus content, translated from the article:

> Oh shit, I committed and immediately realized I need to make one small change!

    # move the current edits into the previous revision
    $ jj squash
> Oh shit, I need to change the message on my last commit!

    # re-describe the previous revision
    $ jj describe --revision @-
> Oh shit, I tried to run a diff but nothing happened?!

    # there is no staging area, all your changes are part of the repo and there is no
    # staging area pseudo-commit; please understand that this still works elegantly
    # with "patch-add" workflows and does not imply that large change sets can't be
    # easily broken up into small commits
> Oh shit, I need to undo a commit from like 5 commits ago!

    # find the commit
    $ jj log

    # back it out
    $ jj backout {id}
> Oh shit, I need to undo my changes to a file!

    # find the commit
    $ jj log

    # restore the paths provided to their contents in the given revision
    $ jj restore --from {id} [paths...]
And finally there are a few things that are super easy/obvious in jujutsu that are far more annoying in git.

> Oh shit, I committed and many commits later realized I need to make one small change!

    # moves the changes in the current working copy into the revision provided
    $ jj squash --into {id}
> Oh shit, I committed and many commits later realized I need to make extensive changes!

    # sets your working copy to the commit provided; later commits will be
    # auto-rebased on top live as you make modifications
    $ jj edit {id}
> Oh shit, I need to reorder two commits!

    # does what it says on the tin
    $ jj rebase --revision {a} --insert-before {b}
> Oh shit, I haven't committed anything in hours but I need something from an interim change from like thirty minutes ago

    # look in the "obsolete log" for earlier iterations of the current revision
    $ jj obslog

    # restore the contents
    $ jj restore --from {id} [paths...]
> Oh shit, I made a bunch of changes but want them to be in multiple commits (e.g., patch-add workflow)

    # choose the parts to move out; you'll end up with two revisions, one with each half
    $ jj split
> Oh shit, I need to break out a change from my current work into a new branch off master

    # choose the parts to move out; you'll end up with two revisions, one with each half
    $ jj split

    # move the stuff I pulled out onto master
    $ jj rebase --revision @- --destination master

    # optional: name it; most of the time you wouldn't bother
    $ jj bookmark create new-name --revision master+
> Oh shit, I need to make three sequential changes but roll them out one-by-one. I also might need to make fixes to previous ones before later ones are rolled out.

    # author a new change on top of master and name it a
    $ jj new master
    …
    $ jj bookmark create a

    # author a new change on top of a and name it b
    $ jj new
    …
    $ jj bookmark create b

    # author a new change on top of b and name it c
    $ jj new
    …
    $ jj bookmark create c

    # edit a; nothing else is necessary to ensure b and c remain as descendants of
    # revision a
    jj edit a
    …

    # author a new change as part of b; nothing else is necessary to ensure c remains
    # up to date on top of b
    $ jj new --insert-before c
    …

    # point c at the new change
    $ jj bookmark set b

Are there alternative git command lines that keep the beautiful internals, but implement a more elegant and intuitive set of commands to manage it?

At your service, sir: The Mongol Conquests: The Military Operations of Genghis Khan and Sube'etei [0]

Also, about Subotai: Genghis Khan’s Greatest General: Subotai the Valiant [1]

And, finally Timur: Tamerlane: The Earth Shaker [2], Tamerlane: Sword of Islam, Conqueror of the World [3].

[0] https://www.amazon.com/Mongol-Conquests-Military-Operations-... [1] https://www.amazon.com/Genghis-Khans-Greatest-General-Subota... [2] https://www.amazon.com/Tamerlane-Earth-Shaker-Harold-Lamb-eb... [3] https://www.amazon.com/Tamerlane-Sword-Islam-Conqueror-World...


Nice! Similar to Brett Terpstra's Bunch[1] which has a GUI-less approach.

[1]: https://bunchapp.co/


Looks good but any plans to make it open source?

Similar open source solutions exist like:

- https://pairdrop.net/

- https://wormhole.app/

- https://www.snapdrop.net/

How does this compare?


Been asking myself the same question for months.

So Egan's stories are basically a mathy whodunit -- start from first (fictional) principles and eventually solve some universe-scale question or crisis. His characters are basically walking textbooks meant for info dumping / FAQing the derivations.

In that light, some similar stories I've found are...

    - Dragon's Egg (Robert Forward)
    - Of Ants and Dinosaurs (Liu Cixin, 3 body problem author)
    - The Andromeda Strain (Crichton, more medsci than math)
    - Schilds Ladder, Diaspora (other Egan stuff)
The first two are especially similar to Egan's stuff in that the only real character is the civilization / setting not the people.

I've also tried some of the more common hard scifi recommendations like Reynolds and Stephenson, but I personally don't enjoy the dialogue / scenes meant for character development. I guess it's because the stories usually take a human-scale perspective instead of taking a what-if to its reality-bending extreme like Egan does.


One of the things that greatly improved my csv workflow is duckdb. It’s a small binary that allows querying csv with sql.

> Of course, designers may not like the way this looks and we want to create a great looking custom switch.

The general UI rule is use a switch when toggling has an immediate impact (similar to pressing a light switch) vs a checkbox when there's a submission step before it has an impact (similar to ticking a paper form then mailing it). See:

https://www.nngroup.com/articles/toggle-switch-guidelines/.

It made sense after learning this but I didn't find the difference that intuitive before. A lot of UIs get it wrong (e.g. switches in forms, checkboxes for settings that immediately change something) but it only bugs me now I know which one to use. It's not only for cosmetics though.


I haven't been using it too much yet but I am really impressed by paperless-ngx so far. It just works(TM) and the auto-tagging functionality is surprisingly good, even with just a few documents in it.

Does anyone have a good scanner recommendation though? I am eyeing the Brother ADS-1700W since it seems to be recommended often, but I would really like to use the "scan to webhook" feature (it's 2023 after all) instead of SMTP or whatever else are the options I would have with the Brother.


Along with shattered pixel dungeon, this is one of the only worthwile games on Android I've found. They don't call home, they don't push ads, they don't spy on you, they're just good games, well implemented and open source.

There is also LibreTube that comes with SponsorBlock

https://libretube.dev/


Hi, Nota creator here. A high-level comment:

After developing the initial prototype you see in the webpage, I've since gone back to the drawing board. I'm working on developing a firmer foundation for issues like:

- How do you interleave content and computation? See: https://arxiv.org/abs/2310.04368

- How do different syntaxes make different document tasks easy, hard, or impossible? See: https://github.com/cognitive-engineering-lab/doclang-benchma...

I still very much believe in the high-level philosophy, but Nota will look very different within ~6 months. In the meantime, the single coolest development in the document language space is Typst, which I encourage you to check out: https://typst.app/

Also: the next version of Nota will be written 99% in Rust :-)


Apparently there's more to this. They're blocking the usb port to get the user to set up over wifi first, not because it's non functional. Why does a printer need to be set up over wifi? Because certain models are tied to hp ink's subscription service and sold at a discount.

https://news.ycombinator.com/item?id=37007036


SumatraPDF is among the OSS PDF tools I use.

Since Adobe is pushing a more aggressive stance for monetization of Acrobat, I am trying to replace selected PDF workflows with OSS. Here are some of the tools I use.

    qpdf
        removing passwords, unlocking PDFs, conversion
        install in WSL with apt-get install qpdf
        remove password with qpdf --decrypt --password="" input.pdf output.pdf
    PDF4QT - Open Source PDF Editing
        Deleting, Sorting, Extracting Pages
        Currently, no choco release available, must be installed manually from PDF4QT/releases
    Inkscape, LibreOffice Draw
        editing PDFs, adding text
    Mupdf
        Command line tool and Python package for parsing, filling forms, adding text
    SumatraPDF
        Viewing of PDFs
    pdfplumber
        Awesome python package to extract tables from PDFs into data pipelines. Use with Jupyter Lab

There was a thread about alternatives on HN [1]. The top mentioned ones were: Porkbun, Namecheap, Dynadot, Cloudflare, Nearlyfreespeech, Gandi.

I've used Porkbun, Namecheap, and Gandi. Namecheap is my preferred. Porkbun is fine, Gandi I would prefer to not use again. I haven't tried Dynadot or Cloudflare's domains (but I love Cloudflare's DNS).

[1]: https://news.ycombinator.com/item?id=37099102


My favorite prime number generator is

    ┬─┬───────────────────────────────────┬──── ────┬
    │ │ ┬─┬ ────┬─┬────────────────────── ┼───┬ ┬───┼
    │ │ └─┤ ────┼─┼───────────────────┬── ┼───┼ │ ┬ │
    │ │   │ ┬───┼─┼───────────────────┼── ┼─┬─┼ │ ┼ │
    │ │   │ │ ─ ┼─┼─┬─────┬──── ──────┼─┬ │ ├─┘ └─┤ │
    │ │   │ │ ┬ └─┤ │ ┬─┬ ┼─┬─┬ ──┬───┼─┼ ├─┘     ├─┘
    │ │   │ └─┤   └─┤ └─┤ │ ├─┘ ──┼─┬─┼─┼ │       │
    │ │   │   │     │   │ ├─┘   ┬─┼─┼─┼─┼ │       │
    │ │   │   │     │   ├─┘     └─┤ │ ├─┘ │       │
    │ │   │   │     └───┤         │ ├─┘   │       │
    │ │   │   │         │         ├─┘     │       │
    │ │   │   │         ├─────────┘       │       │
    │ │   │   ├─────────┘                 │       │
    │ │   └───┤                           │       │
    │ │       ├───────────────────────────┘       │
    │ ├───────┘                                   │
    └─┤                                           │
      └───────────────────────────────────────────┘
which graphically depicts the 167-bit lambda term

    λ 1 (1 ((λ 1 1) (λ λ λ 1 (λ λ 1) ((λ 4 4 1 ((λ 1 1) (λ 2 (1 1)))) (λ λ λ λ 1 3 (2 (6 4))))) (λ λ λ 4 (1 3)))) (λ λ 1 (λ λ 2) 2)
which generates the characteristic sequence of primes [1] [2].

[1] https://tromp.github.io/cl/cl.html

[2] https://github.com/tromp/AIT/blob/master/characteristic_sequ...


Time to share my recipe for dry roasted pressure cooked brown rice.

I make this using a stainless steel stovetop pressure cooker. I do not recommend aluminum.

The ingredients are two cups brown rice (long or short grain as you wish), two cups of water or a little less (yes, the rice:water ratio is just 1:1), and half a teaspoon of salt or less. You can scale this up or down easily.

Put the rice in the pressure cooker without the lid. Turn the heat on. You can use high heat for the first minute or two, but then turn it down so the the rice does not burn.

Every minute or so, pick up the pan and swirl the rice around so it heats and browns evenly. It will take about ten minutes to be nicely roasted.

Now here is where this relates to the article and discussion. As the rice browns, a few of the grains will pop just like popcorn. You can leave them in the pan or pick them out for a crunchy snack!

When the rice is nicely browned, add the salt and swirl it in, then slowly pour in the water and give it one more swirl.

Put on the lid and let the pressure come up to high (the second ring on my Perfect pressure cooker). Turn the heat way down at this point to maintain the pressure, and keep an eye on it.

Set a 20 minute timer and release the pressure when it is done. Use a steel spatula to gently mix the rice and scrape the crispy bits off the bottom of the pan.

Enjoy!


> I think a major pro of browsers serving content in a limited markup language ..... is that a variety of applications can realistically work with rendering them.

I couldn't help but think of Gemini[0,1] and the number of applications already built for it[2] precisely because of the limited language. Gemini is an exciting space for lovers of a safer and lightweight internet.

It becomes clear that when rendering (and feature-bloat) are reduced, development begins to thrive. The Lagrange browser[3] is a great example of rendering not being an issue which gives developers time to build a great browser. For anyone curious, check it out to see what I mean: portable versions are available on Windows and Linux (appImage).

I have to admit that textual-markdown (OP) has me feeling the same way. I've been using command line browsers (on/off) for decades (since DOS). I don't know if I've ever seen a text-based browser look so beautiful. Wish the author the motivation and passion to keep this project going. I think it has great potential.

[0] https://gemini.circumlunar.space/

[1] https://en.wikipedia.org/wiki/Gemini_(protocol)

[2] https://gemini.circumlunar.space/software/

[3] https://github.com/skyjake/lagrange


IME Obsidian.md has become almost an OS for markdown files; it's extraordinarily capable and ergonomic. Highly recommend checking it out before building your own; then even if you still want to DIY, I expect you'll come away inspired.

This is my obligatory old-guy post that Space Cadet was one of three tables in the package "Full Tilt Pinball" released by Maxis (along with Skulduggery and Dragon's Keep) which came in its entirety for free with the puzzle game Marble Drop, which was apparently only ever liked by me. So if you want the full set of tables and can 64-bit-ify the installer, the Marble Drop CD might be easy to come by.

I wonder if any of these leaked keys were used to sign the base android installers for the phones themselves?

If so, this might be a way to get new versions of AOSP onto Samsung phones that are bootloader-locked and have no current support by Samsung. Can anyone anyone experienced with Android+Samsung comment here?



ms-windows-store://pdp/?ProductId=9n4wgh0z6vhq

https://apps.microsoft.com/store/detail/hevc-video-extension...


Another cool website that I came across a few days ago is https://vdo.ninja/ (create reusable invite option) which also uses the HTML camera APIs to connect your mobile phone to OBS. Both the audio and video quality I get from my phone is at par or sometimes even superior to my laptop's webcam. This video tutorial(1) explains the setup really well.

Kudos to whoever made this free site and also the modern browser tech for making this possible.

(1) https://www.youtube.com/watch?v=ArVDKf2QK1s


I guess this is a good place to share my open source large format laser cutter design for sewing projects. It’s cheap to make, works pretty well, and the whole gantry assembly slides right off leaving just a sheet of plywood with low profile 3D printed rails on the sides. So I throw my rug over it and it becomes my floor when not in use. Important because the laser cutter can cut a full 60” wide piece of fabric two yards long. It’s basically 5 foot by 6 foot, and I don’t have space in my apartment for a dedicated machine that takes up all that space. But since this doubles as my floor it works great! Also includes a raspberry pi camera on the laser head which serves as a pattern scanner. I really want to finish my video on this thing, I’ve just been busy. But please take a look and considering building it! If you have any questions open a GitHub issue and I will do everything I can to help. I think it’s a great starting point (designed in three weeks) and I’d LOVE for other people to reproduce it and extend the design! The machine has a few hiccups but I use it all the time for my sewing projects and it is SO nice to get all the cutting done repeatably and automatically. You can even scan existing clothes often without disassembly and turn those in to digital patterns!

https://github.com/tlalexander/large_format_laser_cutter


A lot of people always go crazy when someone asks this question and instantly praise Total Commander. Link can be found here: https://www.ghisler.com/

You may also like this other speech by the same author (Herb Wilf) that I love too (on an unrelated topic):

Epsilon Sandwiches https://www2.math.upenn.edu/~wilf/website/MAASpeech

In fact everything by Wilf that I've read is lovely: the paper "Recounting the rationals" (https://www2.math.upenn.edu/~wilf/website/recounting.pdf with Neil Calkin), and the book generatingfunctionology https://www2.math.upenn.edu/~wilf/DownldGF.html


The 13" is substantially different from the 14"/16" though. It's a carryover of the previous design (bigger bezels, no notch) and has the lower tier processor with 4+4 performance and efficiency CPU core split. The 14" and 16" have a 8+2 CPU cores instead.

EDIT: other differences include mini-LED backlight, 120 hz refresh rate, 2x the base RAM, 4x the maximum RAM, function keys (instead of touch bar), support for 3 external displays (instead of 1), HDMI, SD card slot, magsafe, and faster charging

Much more of a choice to make than "do I want a fan or not" if you include the 14" and 16". That's pretty accurate between the Air and 13" Pro though.


If you're new to Krazy Kat, I highly recommend reading it! I put a bunch of Krazy Kat comics that are in the public domain online here: https://joel.franusic.com/krazy_kat/

I tried MacOS recently for about a month and was shocked at how bad scrolling was with my Logitech MX Vertical mouse. The third-party app Mos solved it pretty much perfectly. Every once in a while scrolling would stop working altogether until I rebooted. Never figured it out, but it was maddening. https://mos.caldis.me/

Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: