<elvishjerricco>
samueldr: I understand that set -e isn't inherited by certain things now. But what continues to baffle me is that I can't set it at all within those things
<elvishjerricco>
Agh
<elvishjerricco>
So dumb
<elvishjerricco>
Guess `|| return 1` is gonna be it
<elvishjerricco>
TIL never EVER rely on -e
<elvishjerricco>
I'm just gonna use a different language
<cole-h>
RiiR? ;))))
<elvishjerricco>
Any suggestions for a language to execute shell commands without a bunch of boiler plate code?
<infinisil>
elvishjerricco: bqv and others have said some good things about execline
<samueldr>
elvishjerricco: from my link, and quote, "explains" that latter bit, there is no way to re-enable it and they decided to not allow it for compatibility
<elvishjerricco>
samueldr: Yea I glossed over that bit
<samueldr>
I just use ruby whenever I need to, since the boilerplate is quite minimal, and not even required
<samueldr>
I have grown tired of bash
aleph- has joined #nixos-chat
<elvishjerricco>
Haskell has been my goto. But some of the basics lack lightweight libraries for scripting purposes
<samueldr>
I end up making a small boilerplatey bit to print exec'd commands like "set -x" and that's it
<bqv>
Can confirm, I do say good things about execline
<samueldr>
require "shellwords"; def run(*cmd); puts " $ " + cmd.shelljoin; system(*cmd); end # though I forget the bit about return values
<samueldr>
what's more ergonomic with a real programming language is manipulating file contents though
<elvishjerricco>
But I'm sure that has little to do with how nice it is to use
<samueldr>
every time I've tried to look at execline I was faced with that impenetrable examples-free website
<samueldr>
it's like they try REALLY HARD not to present any example
<elvishjerricco>
Yea i was looking for some...
<elvishjerricco>
The only example they give doesn't seem to match the grammar they define above?? `foreground { sleep 1 } echo blah`
<elvishjerricco>
`foreground` is either an external or a builtin, but then what follows is an arglist, not an options
<infinisil>
I also just looked through the website, and yup, also disappointed by no examples
<infinisil>
The concept seems interesting
<bqv>
infinisil: you have my nixus port as a demo :p
<infinisil>
Hehe yeah just looked at that
<bqv>
the interesting thing is i find myself using execline stuff more and more during normal shell stuff because it's just so much more convenient
<bqv>
this morning i was tempted to just alias cd to execline-cd
<cole-h>
What's the difference
<bqv>
execline-cd does chainloading and is a convenient way to drop into an execline scope
<bqv>
posix-cd changes the parent shell's cwd
<bqv>
e.g. i can cd /tmp and `execline-cd /home/cole-h touch hello` and i will end up in directory /tmp but i will have made the file /home/cole-h/hello
<cole-h>
I see
<bqv>
ends up being like a "with-current-directory" function, for those of you more emacs inclined
<cole-h>
That's what I was imagining, OK.
<bqv>
(as for the latter part, some keywords collide outside execline scopes (like cd!) so `execline-cd .` is a cheap way i use to ensure i'm in one if i want to use `if` or something
<bqv>
)
<elvishjerricco>
This seems... like more to learn than I want to get into right now :P I can see the appeal though.
<bqv>
another useful example might be a situation where some program/service requires an absolute path to a binary for something to execute, and you need a conditional. you *could* do `bash -c "thing1 && thing2"`, or you could do `if thing` '' thing2` with execline and skip the unnecessary layer
<samueldr>
AFAIUI this limits an execline to ARG_MAX maximum tokens?
<bqv>
that value, in any modern linux, is over a million
<samueldr>
ridiculous
<bqv>
though, i think there is some other limiting factor somewhere so i do try and keep things modular
<samueldr>
how can I implement anything in such limited constraints?
<cole-h>
Heh
<cransom>
'this is not web scale'
<bqv>
lmao
<elvishjerricco>
Guess I'll just do my stuff in Haskell tonight. *sigh* I have to write a whole import statement and use a bunch of annoying apis in System.Process
<cole-h>
:D
<samueldr>
see, there's this thing that would have been useful on execline's website... explaining that this is "one big command" and that parts of it have the "prog..." argument that ends up basically being "execing" into the those at the end (or other conditions)
<cole-h>
elvishjerricco: What *are* you writing? Just out of curiosity
<bqv>
elvishjerricco: if you do want to do it in execline, you can ping me and use me as a dictionary, i'll be up a good few hours and i respond well to pings
<elvishjerricco>
cole-h: Just a script to automate the testing of some OTHER Thing
<samueldr>
now that I know about the fact that it's really "one process which execs into the next part" I grok better how it's supposed to work, but it seems to not be explained
<cole-h>
elvishjerricco: Ah, the legendary art of Yak Shaving
<elvishjerricco>
samueldr: I think that's well explained in the grammar page of the site. But the grammar is terribly described there
<samueldr>
serious question: how is that well explained if terribly described? :)
<samueldr>
yes, it's part of that page, but nowhere is it "pictured"
<elvishjerricco>
samueldr: Oh I just meant the idea of one process that repeatedly chainloads :P
<samueldr>
even the first "straightfowrard" example is definitely not straighforward since it doesn't look like anything useful without the grammar stating that basic fact beforehand :/
<elvishjerricco>
samueldr: That one example doesn't even parse with the grammar on that page lol
<elvishjerricco>
At least not in the grammar syntax I've seen used by everyone else in the world
<infinisil>
I guess I might consider using execline for scripting, it's probably better than bash at least in theory
<elvishjerricco>
Ok, time for a food break
rajivr has joined #nixos-chat
<bqv>
,locate fakepty
<{^_^}>
Couldn't find in any packages
<bqv>
,locate faketty
<{^_^}>
Couldn't find in any packages
<bqv>
,locate bin pty
<{^_^}>
Found in packages: haskellPackages.vk-posix-pty
<bqv>
ffs
<bqv>
i'm sure that's a thing, somewhere
<bqv>
there's a way to create a fake pty without using screen/tmux or something
<bqv>
i used it long ago, but the code is long deleted
* cole-h
wishes git:// inputs would keep the .git intact
<cole-h>
(Since elevator=noop doesn't work anymore)
<cole-h>
(I think some people have said it doesn't matter, I've read in other places that it does, etc... so I'm just reporting back with what I found)
<elvishjerricco>
cole-h: I thought I heard somewhere that ZFS sets the scheduler correctly on its own... or something... I haven't researched the topic at all :P
<cole-h>
elvishjerricco: If it has control of the disk
<cole-h>
I've partitioned mine, with sda1 being boot, sda2 being swap, and sda3 being ZFS
<elvishjerricco>
Oh I see
<cole-h>
Before that change, my scheduler was `mq-deadline`, but now it's `none`
<cole-h>
So it does change the scheduler. Now, if that helps anything? Who knows :D
<elvishjerricco>
cole-h: How do you check that? I'm guessing LUKS would also not get the automatic treatment from ZFS?
<cole-h>
I checked it with `udevadm info -a --name /dev/sda3 | rg scheduler`
<cole-h>
But I think the scheduler is for the whole block device, so you can also check with `cat /sys/block/sda/queue/scheduler`
<elvishjerricco>
Hm ok. Gotta go check some disks :P
<cole-h>
(I dunno about LUKS, never used it before)
<elvishjerricco>
cole-h: I used the /sys/block command and got `[mq-deadline] kyber none` What are these words? :P
<cole-h>
The schedulers
<cole-h>
lol
<elvishjerricco>
Why are there three?
<cole-h>
From what I've read/remember reading/remember remembering, you want it to be none. But I was also linked to a comment from behlendorf (a main dude of ZFS I guess) recently, that made it sound not really important?
<cole-h>
idk, I think those are the 3 default schedulers in the kernel?
<elvishjerricco>
cole-h: Oh, wait, is that indicating that mq-deadline is the one in use?
<cole-h>
yeah
<cole-h>
And the others are "available"
<elvishjerricco>
Got it. Ok so I want that to be none for ZFS.
<elvishjerricco>
Though
<elvishjerricco>
Doing the same command for the luks volume instead of the physical disk said `none`
<cole-h>
(Nothing that I've seen, yet, unfortunately)
<samueldr>
curious about what hardware there will be for the tracking
<samueldr>
I'm getting frustrated at mice
<samueldr>
it seems everything is a downgrade or the same
<cole-h>
I like Logitech's G903, but it's also kinda expensive
<samueldr>
like logitech's latest mx anywhere, which *DOESN'T SUPPORT MIDDLE CLICKING*
<samueldr>
meh, 130$ is the target price range, but I'm not looking into the gamer section :)
<samueldr>
I'm also scared at needing software for mice
<samueldr>
since no one makes software for linux, that's another variable in the equation
<samueldr>
I have a neat logitech bluetooth keyboard... which saves no settings (other than pairings) so if you want to switch some settings you need software for it
<samueldr>
which doesn't exist on many platforms including the target mobile devices :|
<cole-h>
I used the software exactly once (in a Windows VM) to change my DPI... That's still once more than you'd like, I guess.
<samueldr>
it's like no one at logitech uses the hardware they make
<samueldr>
oh, it's a bit more subtle than that... most of the time the main issue comes from having weird electrons, or having hard to build js-side deps
<samueldr>
but AFAIK electron itself, the runtime, works just fine
<samueldr>
$ nix-shell -p electron --run electron
<abathur>
hmm
<samueldr>
I think the side-eye is waranted though, as it becomes quite a hard topic to solve, because many electron apps are not simple sample apps
<cole-h>
Ahhh, finally
<abathur>
assuming two electron apps with the same electron runtime, can Nix de-duplicate the runtime, or does it get baked into both outputs?
<cole-h>
I finally got around to using .gitattributes to change the language stats on my nixos-config (since I have my weechat config stored in it...) :D
<bqv>
aleph-: hey, it was you toying with pleroma, right? i'm wondering if i should keep any of my derivations in my repo in case anyone wants something to start from, or just nuke them?
<bqv>
or maybe have a bit bucket dir, for stuff that i don't care about but people might want to look at
<johanot>
so proud of my company that I have to "brag" here. :) finally on the contribution list: https://opencollective.com/dbc <3
<Valodim>
etu: whoa. that's pretty nice
<Valodim>
johanot: 👍️
__monty__ has joined #nixos-chat
<johanot>
etu Valodim I'm curious, which zfs things in htop? :)
<cole-h>
Yeah, wrong cole :D I was talking about the ZFS scheduler yesterday
<cole-h>
lovesegfault: That is true -- but only when ZFS has control of the whole disk, IIRC. I know for a fact my scheduler was not `none` before that change.
<cole-h>
lovesegfault: I've partitioned my disk -- sda1 -> boot, sda2 -> swap, sda3 -> zfs
<lovesegfault>
colemickens: Oops, my autocomplete got trigger happy. Indeed it was aimed at cole-h
<eyJhb>
I should really put my /nix onto my mSATA SSD (but it is slower than my current one)
<manveru>
does zfs still need ECC? i'm planning to build a new box and use it this time...
<eyJhb>
manveru: not really
<eyJhb>
But adisbladis , etu might have some more
<eyJhb>
,mrworldwide
<{^_^}>
adisbladis
<eyJhb>
:D
<adisbladis>
Huh?
<adisbladis>
I was summoned?
<adisbladis>
manveru: ZFS never _needed_ ECC
<adisbladis>
God I'm tired of that meme :P
<manveru>
:)
<adisbladis>
Of course it's better if you have ECC, but that's applicable to any file system
<adisbladis>
The main point is that ZFS won't protect you from memory corruption
<adisbladis>
It will still have the same on-disk checksumming guarantees
<manveru>
cool
<manveru>
that's all i ask for... ECC is of questionable utility for me anyway
<leons>
manveru: I'd say ECC is never of questionable utility, except when you can risk your OS kernel wreaking havoc and overwriting all of your files ^^ it's all just a single bitflip away :D
<leons>
(although very unlikely + sometimes worth taking when long-term reliability doesn't matter)
<leons>
I do run ZFS without ECC because of budget reasons though and it's really unlikely that something will go wrong this terribly
<leons>
Oh and running ZFS without ECC is only "worse" in the way that _if_ there actually is a bitflip in memory while writing data & checksum, and hence those deviate, ZFS will refuse to read that file back if no intact copies exist. Whereas on other filesystems you'll be potentially reading garbage
<leons>
adisbladis: fact check please :P
<adisbladis>
Umm, makes sense but I don't exactly know
<leons>
That appears to be the general ZFS spirit so it's probably fine ^^
<cole-h>
heh
<danderson>
I use ECC in all my NASen since a scare about 10 years ago where a bad stick of ram started corrupting my ext4
<danderson>
a single bitflip can do way more damage than just borking one file. It can damage a block near the root of the FS, and make a large chunk of it inaccessible
<adisbladis>
The key takeaway is use ZFS no matter what RAM you have ^_^
<cole-h>
um
<adisbladis>
ECC and ZFS are orthogonal
<cole-h>
since when has `head -1 dir/*` had a header for every file in the dir?!
<danderson>
ZFS will be better at detecting the bitflip, but bitflips are still real bad.
<danderson>
ECC will reduce the probability of an undetected bitflip, which is very valuable.
<adisbladis>
danderson: Indeed. I'm not arguing against ECC. :)
<danderson>
but ECC is valuable no matter what filesystem you're using
<danderson>
"don't randomly flip bits in my data" is a valuable property of computers in general :P
<__monty__>
cole-h: Doesn't that always happen for multiple files? I use it to create concatenated pastes with embedded filenames : )
<cole-h>
__monty__: wtf maybe I've just never used `head` on a wildcard before
<cole-h>
Because I've never ever seen `==> filename <==` before
<__monty__>
Yep. (I actually use tail because it's easier to specify "all the lines")
<leons>
Also bitflips in a video file are bad, bitflips in an executable / running program are worse, bitflips in the loaded kernel code in RAM insanely dangerous. Hence ECC helps also when not dealing with files
galagora has joined #nixos-chat
<eyJhb>
adisbladis: Do you enjoy the alias?
<elvishjerricco>
manveru: Agreed with others; ZFS never needed ECC anymore than any other FS. And it's nice that in some cases, ZFS will actually save you from bitflips, unlike non-checksummed file systems.
galagora has quit [Remote host closed the connection]
rajivr has quit [Quit: Connection closed for inactivity]
cjpbirkbeck has joined #nixos-chat
<__monty__>
Anyone have an url to the parser combinators in nix? Google is failing me.
<cole-h>
__monty__: wdym?
<danderson>
My take: ZFS doesn't need ECC more than other filesystems, but IMO for a *storage server* ECC is a must-have.
<danderson>
a machine purpose-built for keeping bytes safe should take out as much corruption insurance as it can :)
<__monty__>
cole-h: I remember seeing parser combinators implemented in nix. (Though this might've been in a dream.)
<__monty__>
I need to do some parsing so I want to steal ideas^W^Wtake inspiration from that project, if it exists that is.
<__monty__>
Thank you. I've been conditioned to dislike github's search (by github) so I didn't think to try. Google seriously failed me in this though, even when using the project's name.
<cole-h>
GitHub's search is pretty crap. It just worked out this time :P
<__monty__>
Hmm, impressed enough to be reluctant to rewrite a bad version of this now >.<
<drakonis>
hmm
<drakonis>
android 11 is finally here
<joepie91>
did you mean: android 11 will finally be here in 4 years when the manufacturers catch up
<joepie91>
:P
<drakonis>
i'm getting a pixel tho
<drakonis>
if its available anyways
<drakonis>
i wonder when google's going to finish including tasker into android's baseline
<samueldr>
joepie91: you seem a bit web-savvy... I hit some kind of wall yesterday doing something that's basically a thing since HTML 4... and surprised me quite a bit... seemingly <button type="submit" name="something" value="somevalue">[...]</button> doesn't send the name/value pair as form data, and couldn't seem to find much information about that... clues?
<samueldr>
(I haven't tried reducing the example yet)
<joepie91>
samueldr: it should
<samueldr>
I know!
<joepie91>
my first suspicion would be some JS interfering with it
<joepie91>
eg. someone's homegrown "make a HTTP request" thing that incorrectly serializes a form
<samueldr>
there's no specific JS plugged at that location, and only jQuery ambient
<samueldr>
my first suspicion is maybe GET isn't a form data?
<joepie91>
how are you determining that it isn't sending it?
<samueldr>
but that kind of wouldn't make sense
<joepie91>
oh, GET. hm.
<samueldr>
isn't in the query string
<samueldr>
I got so frustrated that I dropped the idea instead of investigating :)
<joepie91>
samueldr: I'd suggest reducing it to a simple repro case, because this sounds like something else is going on
<joepie91>
not immediately sure what
<samueldr>
yeah
<joepie91>
but many production things are built on submit button behaviour
<samueldr>
yeap
<joepie91>
so it seems like something that is unlikely to break unnoticed
<samueldr>
all search results were hopelessly useless, all assuming mounds of JS or "fixing" with
<drakonis>
a flexible moose
<drakonis>
hmmm
<samueldr>
I was just asking in case you had a specific clue about what is *seemingly* (but shouldn't be) a dark corner of the spec :)
<joepie91>
samueldr: I'm not aware of any such dark corners
<adisbladis>
eyJhb: Yeah :D It's a badge I wear with honour
<samueldr>
:/ it was js, joepie91, should have looked more carefully at the selector in use by the (probably highly useless) code that basically does what a form does already
<joepie91>
samueldr: ha, called it :D
<joepie91>
"it's not JS, it can't be JS... it was JS"
<samueldr>
I looked, that was my first thing in mind too
<samueldr>
though I was already highly frustrated with something else initially so it clouded my judgement
<joepie91>
heh
<joepie91>
oh well, solved now :)
<drakonis>
hmm
__monty__ has quit [Quit: leaving]
parsley936 has quit [Remote host closed the connection]
W1lkins has joined #nixos-chat
viric has quit [Ping timeout: 256 seconds]
kalbasit_ has joined #nixos-chat
viric has joined #nixos-chat
disasm has quit [Ping timeout: 240 seconds]
disasm has joined #nixos-chat
<ldlework>
Anyone know how unity-hub is supposed to work from nixpkgs?
<ldlework>
It installs unity-hub, but, you can't create any projects as it fails with some error about there being no appimage env