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

Nice test. I tested it with llama.cpp and the 20b model. He got the answer correct at first try on my side. The internal/thinking dialogue is fun to read - it could be my own inner dialogue ;)

``` > "Bobs dad has five daughters, Lala, Lele, Lili, Lolo and ??? <|channel|>analysis<|message|>The question: "Bobs dad has five daughters, Lala, Lele, Lili, Lolo and ???". It's a common riddle. The answer is Bob? Actually "Bob's dad has five daughters: Lala, Lele, Lili, Lolo and..." The riddle is to trick: it's "Bob" himself is a daughter? Wait Bob's dad has five daughters: Lala, Lele, Lili, Lolo, and Bob? But Bob is a name often male. But the riddle says Bob's dad. So Bob is a person who has a dad, and that dad has five daughters. But Bob could be the fifth daughter? That would be weird: Bob is likely the name of the fifth daughter. So answer: Bob. But sometimes the answer is "Lulu" or "Bob's sister"? Let's think. The riddle is a trick: It's "Bobs dad has five d aughters: Lala, Lele, Lili, Lolo, and ... Bob." Because the riddle begins with "Bobs dad has five daughters" implying Bob is one of the daughters. So the missing daughter is Bob. So answer: "Bob".

Thus answer: Bob. But sometimes the riddle goes "Bob's dad has five daughters, Lala, Lele, Lili, Lolo, and ... Who is the fifth?" The answer: Bob (the name of the person speaking, "Bobs"). But in riddle it's "Bobs dad has five daughters , Lala, Lele, Lili, Lolo and ???". The missing name is "Bob." So answer: Bob.

Thus the answer: Bob. Or maybe it's "Boba"? But no.

Hence answer: Bob.

We'll answer accordingly.<|start|>assistant<|channel|>final<|message|>The missing daughter is *Bob*. The riddle starts with “Bob’s dad …” so Bob himself is the fifth daughter. ```


I'm not yet familiar with zfs and couldn't find it in the release note: Does expansion only works with disk of the same size? Or is adding are bigger/smaller disks possible or do all disk need to have the same size?


You can use different sized disks, but RAID-Z will truncate the space it uses to the lowest common denominator. If you increase the lowest common denominator, RAID-Z should auto-expand to use the additional space. All parity RAID technologies truncate members to the lowest common denominator, rather than just ZFS.


Is it definitely the LCD? Given drive of size 15 and 20 the LCD would be 1, no? I had assumed it would just use the size of the smallest drive on every drive (so 15+20->15+15=30). When I first read your comment I was thinking of GCF but even that would be fairly inefficient (GCF(15,20) = 5, so 15+20->5+5=10).


That's not entirely true, Unraid has mechanisms for unbalanced disks, but they come at a high cost in terms of usability by standard workloads.


Unraid is not a RAID technology:

> Unraid saves data to individual drives rather than spreading single files out over multiple drives

https://en.wikipedia.org/wiki/Unraid#Software-defined_NAS

At least, it is not one in the sense of the original RAID paper that coined the term:

https://web.mit.edu/6.033/2015/wwwdocs/papers/Patterson88.pd...


As far as I understand, ZFS doesn't work at all with disks of differing sizes (in the same array). So if you try it, it just finds the size of the smallest disk, and uses that for all disks. So if you put an 8TB drive in an array with a bunch of 10TB drives, they'll all be treated as 8TB drives, and the extra 2TB will be ignored on those disks.

However, if you replace the smallest disk with a new, larger drive, and resilver, then it'll now use the new smallest disk as the baseline, and use that extra space on the other drives.

(Someone please correct me if I'm wrong.)


> As far as I understand, ZFS doesn't work at all with disks of differing sizes (in the same array).

This might be misleading, however, it may only be my understanding of word "array".

You can use 2x10TB mirrors as vdev0, and 6x12TB in RAIDZ2 as vdev1 in the same pool/array. You can also stack as many unevenly sized disks as you want in a pool. The actual problem is when you want a different drive topology within a pool or vdev, or you want to mismatch, say, 3 oddly sized drives to create some synthetic redundancy level (2x4TB and 1x8TB to achieve two copies on two disks) like btrfs does/tries to do.


This is the case with any parity based raid, they just hide it or lie to you in various ways. If you have two 6TB dives and two 12TB drives in a single raid-6 array, it is physically impossible to have two drive parity once you exceed 12TB of written capacity. BTRFS and bcachefs can’t magically create more space where none exists on your 6TB drives. They resort to dropping to mirror protection for the excess capacity which you could also do manually with ZFS by giving it partitions instead of the whole drive.


IIRC, you could always replace drives in a raidset with larger devices. When the last drive is replaced, then the new space is recognized.

This new operation seems somewhat more sophisticated.


You need to buy the same exact drive with the same capacity and speed. Your raidz vdev be as small and as slow as your smallest and slowest drive.

btrfs and the new bcachefs can do RAID with mixed drives, but I can’t trust either of them with my data yet.


It doesn't have to be the same exact drive. Mixing drives from different manufacturers (with the same capacity) is often used to prevent correlated failure. ZFS is not using the whole disk, so different disks can be mixed, because the disk often have varying capacity.


You can run raid-z across partitions to utilize the full drive just like synology does with their “hybrid raid” - you just shouldn’t.


> You need to buy the same exact drive

AFAIK you can add larger and faster drives, you will just not get any benefits from it.


You can get read speed benefits with faster drives, but your writes will be limited by your slowest.


Just have backups. I used btrfs and zfs for different purposes. Never had any lost data or downtime with btrfs since 2016. I only use raid 0 and raid 1 and compression. Btrfs does not havr a hungry ram requirement.


Neither does zfs, that’s a widely repeated red herring from people trying to do dedup in the very early days, and people who misunderstood how it used ram to do caching.


Tbh the idea of keeping backups defeats the purpose of using RAIDZ (especially RAIDZ3). I don’t want to buy an LTO drive, so if I backup, it’s either buying more HDDs or S3 Glacier ($$$). I like RAIDZ so I don’t have to buy so many drives. I guess it protects you if your house burns down, but how many people do offsite backups for their personal files? And dormant, unpowered HDDs die a lot faster than live, powered HDDs.


Yes, seriously handling your data is expensive. I am talking about buying new hardrives.


Very cool. Thanks for sharing! I added `-x overlay` too, to get rid of all the docker overlay mounts.


> How does this actually work? Finding it hard to believe someone bought domains for all combinations of those unit conversions

dns.toys runs a (custom) DNS resolver. The example dig commands are asking this resolver. They are not using your configured (public) resolver. The custom resolver can return whatever it wants depending on the request. You could also ask the resolver what the IP (A-record) of e.g. "google.com" is and it could answer with whatever it wants.

Therefore, they actually just use one domain: dns.toys.


Looks nice. Good to see that there are still native apps in development! Looks a lot like Joplin - which I like.

But: I couldn't find anything about syncing my notes or mobile clients / other ways to access my notes. Even in the "vision" document. That's a must have functionality _for me_. Probably not important for everyone... therefore, good luck with your project :)


Hi there! I wrote in the above comment that it's planned. We'll support arbitrary folder (switch from DB), develop our mobile up (switch from QWidgets to Qt Quick), and develop our own built-in sync option.

Currently, you can change the database location to your synced folder (Dropbox, etc...) in the settings, but some users reported data conflicts while others said it works fine. You can try this but I'll wait till we officially switch from DB.


But what software are large corps use then? I work at a fairly large coorp (>650000 employees) and they are indeed using Github Enterprise (and some other solutions like Bitbucket data center). I'm would be quite surprised if they really only use software like Github for public things.


Azure DevOps is in a weird zombie state where everyone knows Github is getting all the development attention (and presumably most of the workforce now) but Microsoft is keeping it on just enough life support to keep companies "happy enough" and are still refusing to call it "dead". (They continue to point to the development roadmap, which is still actively maintained, but to some like me read very much like "bare minimum maintenance feature set". It also doesn't help that of the few open repositories for checking in on AzDO development, such as their community proposals repo, which are themselves hosted on Github, hah, it is very transparent most haven't seen active commits since 2019 or 2020.)

Bitbucket has a lot of Jira-integration and a lot of large corps are in Jira for the long haul now and "might as well get the synergy of Bitbucket".

Plus, don't underestimate the sunk cost fallacy factor keeping a lot of large corporations locked into things like Perforce and ClearCase.


I worked at a company circa 2010 with around 2000 engineers that used git + gerrit + Jenkins + JIRA.

Worked at another company circa 2015 with around 80k employees (not sure how many engineers) that used git + cgit + Jenkins + JIRA.


With my last four employers, two used subversion, one used git (just git -- not github or the like) and my current one uses whatever Azure Devops is using.


gitlab is what my company uses


No Datacenter edition (aka on-premise) disqualifies bb pipelines for a lot of premium/enterprise use-cases.


What the difference in just deleting the whole directory and recreating it with `mkdir`. Or just do an `rm -rf dir/*`?


Hidden directories, links within dir... (usually, you want a "nofollow" default for destructive operations)


Nice collection of quite useful tools. Some of these can be easily replicated by using a more modern shell (bash, zsh) like mispipe, others are just shortcuts (e.g. ifne, chronic).

But what immediately stood out to me is `vidir`. I really like the idea of editing file names with an editor. Using loops and regex in a shell for mass renaming can be a mess. It should be way easier with `vim`. This tool made me install moreutils.


On most POSIX systems you can use fc(1) to edit a command in your $EDITOR. In vi(1) and friends you can then use "%!ls" to replace the contents of the buffer with directory listing and edit the commands you want.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/f...

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/v...


> you can then use "%!ls" to replace the contents of the buffer with directory listing and edit the commands you want.

I often used :r !ls for that, thanks for the tip + it's shorter


Note that in general this is not a one-to-one replacement. `%!cmd` sends the current buffer contents to `cmd`’s stdin and replaces the buffer with `cmd`’s output. In the case of ‘ls’ this works since it doesn’t take anything on stdin


In Emacs, you can do this by invoking shell-command-on-region, by default bound to C-u M-| - iirc if no region is active it replaces the buffer, but I rarely use it that way so I might be wrong about that. At worst, C-x h C-u M-| gets you there.


huh! I've been working on posix systems for 20 years and I didn't know that...


You just improved my life. Thank you.


Check out renameutils[1], which has the advantage over vidir of doing sanity checks before renaming.

Also, this can be done in emacs using wdired.

[1] - http://www.nongnu.org/renameutils/


The ranger file manager also has this built in.


Was about to point this out, but it's good to know if you ssh in a box which doesn't have Python installed.

Edit: Or use a more portable terminal FM, nnn pops to my mind


MMV is reasonably powerful, but straightforward, can produce & consume rename listings, and is included in a lot of distros.: https://git.deb.at/w/pkg/mmv.git


See writable dired-mode in emacs. Here's a short demo: https://youtu.be/8l4YVttibiI


I use Emacs shell-mode for most of my terminals, which allows navigating and editing the buffer just like any other file. I'll often make several copies of a command, then use a macro to alter each one; after checking that they look right, pressing Enter will send them all to the shell.


I always tried to use the shell with emacs (eshell, multi-term) but it didn't render correctly curses and all the fancy stuffs like emojis. Out of curiosity, how do you manage that?


Check out emacs-libvterm. I’ve replaced all terminal emulators with it. All the benefits of an Emacs buffer and no issues with curses or lag.


When I used Emacs, Eshell was perhaps my favorite feature. I loved how modern it felt in many ways; why shouldn’t you be able to just `cd` into a remote location (TRAMP+SSH under the hood), or invoke Elisp commands like Magit straight from the shell. It could however be quite slow, and choked on some common escape codes (e.g. the progress bars emitted by the modern Ubuntu `apt` command.)

Regarding curses, I found that there was two solutions. The first is to automatically spawn curses apps in a proper terminal emulator, you just have to setup the `visual-commands` variable properly. The second alternative is to replace curses apps with Emacs apps, e.g. htop to helm-top. Personally, I ended up going the second route after a while, as I realized that there are actually very few curses apps that are important to me, and that Emacs apps are better integrated if you use Emacs for everything else.

If you rely on a lot of curses apps, a “real” terminal like emacs-libvterm may however suit you better. Renders curses apps and emojis as well as any other terminal I’ve used. It’s also much faster than ansi-term and friends at rendering.


I use a separate terminal (st) for curses-like things. They work in Emacs ansi-term, but since that doesn't offer the same navigation/editing interface as normal Emacs buffers I don't find it compelling enough to use.

Eshell is interesting, but I can't use the bashisms I'm used to, and I can't copy commands back-and-forth between the prompt and a standalone script.

shell-mode lives in-between these two extremes: it runs a normal shell, but Emacs manages the buffer. I don't know about ansi-term or eshell (or alternatives mentioned by others), but shell-mode handles emoji fine, as well as progress bars and colour codes; I think it defaults to TERM=dumb, so many programs won't output colour, etc. unless you override it to something like TERM=xterm-256.


Usually with ansi-term instead, if I'm honest. Also look into emojify-mode if your system doesn't handle emoji fonts well or at all.


Belatedly to add - look into the eshell-visual-* lists, to configure commands, subcommands (like "git log"), and I think some other traits, such that matching commands get their own ansi-term buffer.



It's one of the reasons I like using the nnn file manager. It has a batch rename feature with exactly that functionality.


+1 for the powerful yet minimalistic nnn where concise help is only a question mark away and the default mnemonics make sense. Wonderful piece of software.


Honestly one of the most well maintained projects I’ve ever used. The author has a coherent “philosophy” and vision of how the program should work and does a good job of preventing feature/scope creep. Don’t see that too often


There are Vim plugins that let you rename files and directories within Vim, such as https://github.com/qpkorr/vim-renamer.

Also if you happen to use fern[0] you can mark off multiple files and directories, hit a hotkey and now you can edit their paths in a Vim buffer.

[0]: https://github.com/lambdalisue/fern.vim


I've known about `moreutils` for years, but the only two I ended up actively using myself are `vidir` and `vipe`.

Outside of `moreutils`, one of the utilities I always install on all my machines is `atool`, which is just so much nicer and more intuitive than trying to remember the command-line options needed to handle the various tar.*, rar, zip, 7zip, lzip, etc. archive formats from the command line.


you might also be interested in vimv and vimcp

https://github.com/thameera/vimv

https://github.com/danieldugas/vimcp


I used vidir yesterday for something that would have been more annoying with other tools - if you swap the numbers at the beginning of the line, then you'll safely swap the file contents. Useful if your TV episodes are named the wrong thing...


Emacs has dired for that reason. Imagine ls that you can edit.


> vidir

I just use ranger for that.


It probably honers your $EDITOR env variable which often defaults to `nano`. You can change it to anything you want including `vi[m]` :)


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

Search: