<Tjowers>
One has more availability it's where you're bank goes through the Federal Reserve -- or more generally a Real-Time-Gross-Settlement System
<Tjowers>
More than two ways sorry!
<Tjowers>
These are most common I think
<Tjowers>
Generally there's two services offered: Real Time Settlement and Periodic Netbalance
<Tjowers>
One is in real-time the other is batched periodically
<Yaniel>
that is not relevant to the consensus question
<Yaniel>
if you read the International section, it's basically a hierarchical distributed thing
<Yaniel>
AFAIK if a transfer happens within a single bank that's the end of that, if it happens across banks under one of the seven central banks, that overseeing central bank and all banks under it have to agree that the transaction happened
<Tjowers>
Right we've lost where we were -- the idea is that current currency exchanges are flawed, why try to match the standard's that blockchain promises with decentralization, why worry about that, when there's already so much more room for improvement in centralized systems -- this is what I'm beginning to come to conclude -- so consistency via
<Tjowers>
chronological GUUID?
<Tjowers>
Right? It's doable with a some concept of a central system
<Yaniel>
if your transfer crosses into the jurisdiction of another central bank, all banks up to your central bank, all central banks and all banks down from the recipients central bank would have to agree
<Yaniel>
what even is a chronological GUUID
<Tjowers>
A globally unique identifier based on time
<Tjowers>
As in, given this UUID and this UUID you can distinguish order
<Tjowers>
Could be just appending a timestamp to a SHA
<Yaniel>
well you have the recipient and the sender and, the time in UTC and the amount transfered
<Tjowers>
Solid
<Tjowers>
Would this be considered a centralized bank? National banks need to get FDIC approval which requires 1 million in assets -- but would it be a bank?
<Yaniel>
just take those as-is
<Tjowers>
Think -- currency is the exchange of value
<Yaniel>
no need for hashing (and thus no risk of collisions)
<Tjowers>
If I offer you my cat, and I ask for your dog, are we making a transaction?
<Tjowers>
Is a transaction defined at some threshold of value?
<Tjowers>
Then how is value defined?
<Yaniel>
you are a bit too high for this I think
<Tjowers>
Lmao
<Yaniel>
high on abstraction levels at least
<Tjowers>
I just want to make sure no legal argument can take it down
<Yaniel>
then talk to a lawyer
<Yaniel>
if you offer me your cat and I take it that would be a transaction by most definitions I think
<Tjowers>
The only thing that prevents a cryptocurrency from being used is whether or not the store up the street will take it and give you a gallon of milk
<Yaniel>
what is relevant for the topic of banks & consensus is that if you offer your cat to someone else after that, they need to know that you don't actually have a cat
<Tjowers>
Right -- Good thinking
drakonis has quit [Ping timeout: 248 seconds]
<Yaniel>
so if you are askign something from them in return they would be getting ripped off
<Tjowers>
Right so the idea of credit in digital currencies
<Yaniel>
whether you received something from me is unimportant there
<Yaniel>
or actually it's not
<Yaniel>
if did actually get another cat from me in return, offering *that* cat to someone else would be perfectly fine
<Tjowers>
As long as there is "Consideration"
<Yaniel>
the other person just needs to be able to ascertain that you have what you claim to have
<Tjowers>
Ok I'm going to do some research
<Yaniel>
good, I'm going to sleep
<Tjowers>
Lmao goodnight!
<Yaniel>
o/
Yaniel has left #nixos-chat ["WeeChat 2.7-dev"]
Synthetica has quit [Quit: Connection closed for inactivity]
ravndal has quit [Ping timeout: 268 seconds]
drakonis1 has joined #nixos-chat
wildtrees has quit [Quit: Leaving]
* colemickens
is over python
ravndal has joined #nixos-chat
endformationage has quit [Quit: WeeChat 2.6]
fuzen has quit [Ping timeout: 246 seconds]
fuzen has joined #nixos-chat
drakonis1 has quit [Quit: WeeChat 2.6]
<ashkitten>
what's the advantage of a bump allocator vs stack allocation?
<ashkitten>
since they're essentially the same thing, right?
fuzen has quit [Ping timeout: 268 seconds]
Tjowers has quit [Remote host closed the connection]
Synthetica has joined #nixos-chat
__monty__ has joined #nixos-chat
evanjs has quit [Read error: Connection reset by peer]
evanjs has joined #nixos-chat
waleee-cl has joined #nixos-chat
avn has quit [Read error: Connection reset by peer]
<elvishjerricco>
ashkitten: I might be misunderstanding your question, but an allocation with a bump allocator can outlive the stack frame it was allocated during.
<elvishjerricco>
Apparently read is just deliberately not supposed to be used with a pipe
<cransom>
i can `read bar <<<foo` ... weird.
<elvishjerricco>
Yea that works. `read <<<$(some command)` works
<elvishjerricco>
That’s some junk
<ajs124>
read test < <(echo "hello world") should also work
<ajs124>
bash is such a beautiful language
<eyJhb>
ajs124: why are we messing with Bash?
<ajs124>
reminds me of this script I wrote that parsed and reexecuted itself. I think someone rewrote it, because that's "bad design" and "not very maintainable". Pff, some people just don't appreciate art.
<elvishjerricco>
ajs124: Yea that worked too
<elvishjerricco>
eyJhb: I was trying to figure out why I couldn’t pipe into `read`
<eyJhb>
Ah
<eyJhb>
are you doing anything fun with it elvishjerricco ?
<elvishjerricco>
eyJhb: Just trying to send a terabyte of data to a server :P
<eyJhb>
elvishjerricco: with read??? :p
<__monty__>
ajs124: My tmux setup scripts call themselves. My irc client's invoked in one of these. I have tmux-fork bombed myself. And I've gotten myself banned from irc networks because of this >.<
<elvishjerricco>
Using zfs send. I want it to be resumable, and I’m having fun playing with pv and zfs receive -s. Making a script to automatically get the resume token and the estimated size of the send so pv can show an ETA
<elvishjerricco>
Overengineering, sure. But also just havin fun :P
<eyJhb>
elvishjerricco: rsync??
<elvishjerricco>
eyJhb: rsync would be horrendously slow for this task
<elvishjerricco>
tons of small files
<elvishjerricco>
resuming would be a nightmare perf wise
<infinisil>
Yeah zfs send/recv is the way to go!
<ajs124>
__monty__: oh no. That's why I recently switched from a kinda janky IRC setup (xmpp bridge) to an extremly questionable one (matrix bridge). That way, if I get banned, I can at least blame somebody elses nodejs code.
drakonis has quit [Ping timeout: 272 seconds]
<elvishjerricco>
I’m already rate limiting this to keep it from annoying other users of these networks, and it’s gonna take about a week with zfs send
<eyJhb>
elvishjerricco: why all those small files?
<elvishjerricco>
eyJhb: It’s an apple sparse image. Literally a disk image where every 4k block is a file
<infinisil>
elvishjerricco: How do you do rate-limiting?
<elvishjerricco>
infinisil: `pv -L 1.5M` will limit to 1.5MB/s
<infinisil>
Oh nice
<ajs124>
elvishjerricco: instead of rate limiting, you could just run that tcp flow with something like LEDBAT.
<cransom>
piping through mbuffer is also nice and has rate limiting
<elvishjerricco>
ajs124: I don’t know what that means :P
<infinisil>
elvishjerricco: I wouldn't mind seeing what you come up with in the end
<gchristensen>
LEDBAT is also good for getting around crypto
<elvishjerricco>
cransom: Yea I’ve got mbuffer on the other side for a memory buffer. I prefer pv’s visual output though, and I don’t think mbuffer can show an ETA
<pie_[bnc]>
elvishjerricco: poke me when you made your thing :P i want to look at it
<__monty__>
gchristensen: Getting around crypto?
<elvishjerricco>
pie_[bnc], infinisil: It WILL be ugly lol
<elvishjerricco>
But will do
<eyJhb>
elvishjerricco: what is your speed?
<infinisil>
Eventually I'll develop my own zfs backup/sync tool, so I'll have to implement something like this too then :)
<{^_^}>
#72060 (by lopsided98, 12 weeks ago, open): sanoid: add package, NixOS module and test
<pie_[bnc]>
infinisil: I Have Ideas (tm)
<elvishjerricco>
eyJhb: I’m going over the internet between two homes that only get like 6MB/s down or up
<gchristensen>
__monty__: typically any sturdy object you can swing is good for getting around crypto
<elvishjerricco>
in practice that is
<pie_[bnc]>
infinisil: i hope i took some notes though because i dont remember what they were...
<ajs124>
__monty__: You probably don't, sadly. I'm not sure Linux lets you switch the TCP congestion control algorithm for a single application/socket trivially.
<infinisil>
pie_[bnc]: I have ideas too, I even wrote a proposal for it for a potential bachelors thesis :)
<__monty__>
gchristensen: A rubber hose code breaking?
<pie_[bnc]>
infinisil: i dont remember you sending me that
<infinisil>
Yeah I didn't, I think
<pie_[bnc]>
:P send plox
<__monty__>
*Ah
<__monty__>
ajs124: Does macOS?
<ajs124>
__monty__: actually, apparently that does exist. Hm. I should hack up some helper program that LD_PRELOADs a wrapper that does that.
<pie_[bnc]>
infinisil: also maybe talk to edef if you ever ever want to actually do that, im about 80% sure youll have some overlapping interests about that
<ajs124>
Being able to have something as background traffic is probably handy every now and then.
<eyJhb>
I would prop have dine something like 2-3, but if it is unstable, thne it makes sense
<__monty__>
ajs124: Wiki seems to suggest bittorrent makes use of LEDBAT. So it seems like it's certainly possible in code? Unless that's just a custom UDP transport.
<elvishjerricco>
eyJhb: I actually came up with 1.5 by deciding I wanted it to take 1 week and determining the appropriate rate
<eyJhb>
elvishjerricco: I would have given up on that task
<eyJhb>
How far is the distance between the homes? :p
<elvishjerricco>
eyJhb: Not far but I don’t wanna take this disk offline to move it elsewhere, since it’s a part of my backup strategy. Wanna keep the time machines and znapzends going
<infinisil>
pie_[bnc]: I also wrote a bash prototype of this somewhere, and I started with a haskell version of it too (though I kind of got stuck coding a good zfs library for haskell)
<elvishjerricco>
infinisil: A good zfs lib for haskell would be amazing
<ajs124>
__monty__: yeah, bittorrent is over UDP as far as I remember
<infinisil>
elvishjerricco: If I were to write one it would use the CLI, not actual C library bindings
<elvishjerricco>
infinisil: Oh for sure. The library would be a pain in the ass
<infinisil>
elvishjerricco: Because this allows using it for remote machines too, and tbh interacting with a C library is awful
<elvishjerricco>
And you wanna be able to connect to ssh hosts and manage them as well
<elvishjerricco>
yea
<infinisil>
:D
<eyJhb>
elvishjerricco: get the other disk to it! :D
<elvishjerricco>
eyJhb: That disk is no more, unfortunately. The machine died, and the local backup disk is now the only existing copy (long story), so I’m trying to copy it to the remote backup location
<eyJhb>
elvishjerricco: meant take the remote disk and shove it into the backup server :p But I might have misunderstood how remote it is
<elvishjerricco>
eyJhb: Oh it’s not far. It’s just that I don’t want the local backup disk to be unavailable locally for any amount of time because there are still machines using it
<eyJhb>
But can't you transfer it locally without taking it down (LAN), and then tranfer it to the remote?
<__monty__>
ajs124: Is there a negative consequence to using LEDBAT for all TCP traffic?
<eyJhb>
elvishjerricco: sorry for trying to solve a problem that doesn't need solving, just curious :D
<elvishjerricco>
eyJhb: Not sure what you mean by “transfer it locally”
<ajs124>
__monty__: yes. Your traffic will be drowned out by anyone else on the same (bottlenecked) link.
<ajs124>
If you don't care about that, then probably no?
<eyJhb>
elvishjerricco: over LAN, if the backup server that shouldn't be down is at "home", then taking a disk to it, transfer to it using LAN (so you get that sweet sweet gigabit connection), and then take it to the location where it should go
<eyJhb>
Then there is zero downtime, and you get the files faster
<elvishjerricco>
eyJhb: So you’re suggesting moving the remote disks to the local location and doing the copy there?
<elvishjerricco>
to clarify: I’m copy data from local to remote
<eyJhb>
elvishjerricco: yeah pretty much, if there isn't that big of a distance
<eyJhb>
(YOU) LOCAL ----WWW----> Remote
<eyJhb>
WWW => WAN, whatever :p
<elvishjerricco>
eyJhb: Wait, why is WWW involved in you’re suggesting moving the remote server to the local network?
<eyJhb>
That was your current setup, right?
<elvishjerricco>
eyJhb: Yea
<elvishjerricco>
I’m currently trying to do it over the internet
<pie_[bnc]>
ZFS is a PITA because they dont f***ing provide a public api <elvishjerricco> infinisil: A good zfs lib for haskell would be amazing
<elvishjerricco>
eyJhb: There’s one pedantic theoretical problem, which is “you don’t want to risk breaking the remote backup system while moving it to and from the local place”. But the actual reason I don’t want to do that is that the remote server is physically very heavy and I’d have to go up or down 4 flights of stairs each way :P
<pie_[bnc]>
the situation AFAIU has been improving however, because they started working on exposing some stuff
<elvishjerricco>
pie_[bnc]: There is libzfs but I dunno if it’s stable or anything
<infinisil>
pie_[bnc]: I think they do?
<eyJhb>
Yeah, so take remote disk to you (local) and then copy it there using either LAN so you get gigabit or directly attached to the server
<eyJhb>
And then move it again to the remote location
<pie_[bnc]>
theres a python library - ah yeah, libzfs is it - that implements _SOME_ functionality
<eyJhb>
elvishjerricco: don't you have a single 1 TB disk to spare? :D
<infinisil>
Pretty sure there's a C library
<pie_[bnc]>
this is one of my frustrations with zfs
<pie_[bnc]>
the C library is what im talking about as being pretty limited IIRC
<elvishjerricco>
eyJhb: That would be the simple solution :P
<pie_[bnc]>
i guess i should have made a gist when i was still researching this or something
<elvishjerricco>
I do not have any spare disks unfortunately
<pie_[bnc]>
note that zfstui is only for looking at info, it doesnt let you poke anything yet
<pie_[bnc]>
that link is a fork of the original using py libzfs, whereas the original uses the cli tools
<pie_[bnc]>
the python library is not actively extended because its specifically used for one of the NAS projects
<pie_[bnc]>
but PRs welcome
<pie_[bnc]>
IIRC
<pie_[bnc]>
i thin the python library might in fact be generating bindings to the c library though
<pie_[bnc]>
cant remember
<pie_[bnc]>
convince the zfs people to make a properlt machine readable cli instead of having to parse stuff out :P though theyve basically locked themselves into the output format alread specifically because now they have to expect people to be parsing that <elvishjerricco> And you wanna be able to connect to ssh hosts and manage them as well
<elvishjerricco>
infinisil, pie_[bnc]: ^ Here’s my ugly script
<pie_[bnc]>
infinisil: my ideas involved a DSL for specifying...I dont remember what. which is the problem. :P though it didnt really crystallize to begin with
<pie_[bnc]>
infinisil: probably stuff about backup schemes and idk
<pie_[bnc]>
probably because linux style CLIs are hard
<elvishjerricco>
It needs to be run as root, and assumes you’ve started the send manually once before
<pie_[bnc]>
im not sure.
<elvishjerricco>
with receive -s
<infinisil>
pie_[bnc]: Neat
<pie_[bnc]>
elvishjerricco: can you add a short comment explaining what this is so that when i look at the tab again in 6 months i know what it is? :D
<pie_[bnc]>
infinisil: oh hey i added nix expression. does it even work.
<elvishjerricco>
pie_[bnc]: Done :)
<pie_[bnc]>
yay
<pie_[bnc]>
\o/ :3
<pie_[bnc]>
infinisil: wow you got it fancy two-column and everything. why are all my friends so OP
<infinisil>
lol
<elvishjerricco>
I’m only like 90% confident that my script took less time to write than I saved by avoiding rsync :P
<pie_[bnc]>
wow thats really high confidence actually
<elvishjerricco>
I am 100% confident I spent more time writing this script than resuming manually would have taken lol
<elvishjerricco>
I doubt i'll even need to resume once
<infinisil>
pie_[bnc]: elvishjerricco: Idea: How about a joint effort between us three to create a good zfs library for Haskell?
<elvishjerricco>
infinisil: I'm thinking a good ZFS backup tool would use receive -s, and probe the destination to see if it has a receive token to resume before continuing normal operation.
<elvishjerricco>
infinisil: Sounds fun
<infinisil>
Yeah that's something I'd want it to do
<pie_[bnc]>
infinisil: so who's going to write the c library
<eyJhb>
*not it*
<infinisil>
pie_[bnc]: No, CLI based
<pie_[bnc]>
or somene else gets to parse the damn CLI ouput, because no matter how practical it is i still think its dum :(
<pie_[bnc]>
but then what do you put in the rest of it
<pie_[bnc]>
what is the part of the library that isnt parsing zfs tools xD
<infinisil>
I've used it a couple times already, and it's been pretty nice
<pie_[bnc]>
i keep wanting to use type system fanciness even though it seems like preemptive foot shooting
<infinisil>
Good error messages, fast (with GHC 8.10), good type inference (with a plugin)
<pie_[bnc]>
you prevent yourself from having errors by preventing yourself from ever getting a compiling project because you cant write anything to begin with
<pie_[bnc]>
...but maybe thats just me
<jackdk>
I'm still comfy with mtl, waiting for a clear winner to emerge
<pie_[bnc]>
IIRC polysemy looked usable when i looked at it. theres a quite operatively-understandable blog post tutorial. but i didnt understand if you have to evaluate effects on loop or what
<infinisil>
polysemy even has an interaction layer to mtl
<elvishjerricco>
infinisil: For instance, trying to throw an error to the exception effect from within your interpreter is not going to be catchable by the user code
<elvishjerricco>
Iirc that's a fundamentally unsolvable problem
<infinisil>
Hm, that doesn't help very much for my understanding
<elvishjerricco>
infinisil: the gist is that you can make effects with operations that *look* like they take an action as an argument and augment its behavior, but it'll never be able to work correctly with the interpreter's behavior
neeasade has quit [Ping timeout: 272 seconds]
<infinisil>
Wouldn't that depend on the effect whether it can be implemented correctly?
<__monty__>
elvishjerricco: You stick to mtl because no other approach deals with that problem either and that would be the only reason for you to switch?
<{^_^}>
ElvishJerricco/fraxl#5 (by themoritz, 1 year ago, open): Catching errors thrown in the fetch functions
<elvishjerricco>
__monty__: I mean there’s a couple reasons, but that’s one of them
<infinisil>
I'll try to replicate an example from there in polysemy
<elvishjerricco>
infinisil: The fundamental issue is that you can’t actually do non-algebraic effects. Functions that look like non-algebraic effects are usually implemented by re-interpreting the effect within the application code, rather than using the intended interpreter. So errors thrown by the interpreter aren’t caught by this separate nested interpreter. Same thing should happen to `listen`
<elvishjerricco>
`local` could probably work though
<elvishjerricco>
The biggest thing is that there’s not really a point though. Mtl does the same thing faster and more idiomatically.
<elvishjerricco>
and gets non-algebraic effects correct
<elvishjerricco>
And I haven’t tested it, but I suspect polysemy’s perf claims are somewhat exaggerated.
<elvishjerricco>
It *should* be perfectly fast if the entire program inlines to one body and the optimizer likes you
<elvishjerricco>
But as soon as there’s any indirection, interpreters start being passed and invoked dynamically, which will start ruining the performance.
<infinisil>
Yeah I think the idea is to put INLINE's everywhere
<elvishjerricco>
Now MTL has a similar perf limitation where if functions don’t get specialized, you start passing dictionaries which is similarly bad.
<elvishjerricco>
But interpreters always also use a case statement, whereas mtl style just executes the right thing implicitly
<elvishjerricco>
But specialization is more likely than inlining
<elvishjerricco>
And probably easier on the code generator and optimizer in terms of compiler performance
<elvishjerricco>
TL;DR: I’d rather not use polysemy unless these concerns can be comprehensively destroyed :P
<infinisil>
elvishjerricco: Example of a non-algebraic effect with mtl?
<elvishjerricco>
infinisil: `catch` and `listen` are the easiest examples
<elvishjerricco>
infinisil: but `reflex-dom` has COUNTLESS non-algebraic effects
<infinisil>
What catch?
<elvishjerricco>
Attempting to implement `reflex-dom` with an effect system would either be disastrous or impossible
<elvishjerricco>
infinisil: I may be misremembering the name. The one in the `MonadError` class
<infinisil>
I'm not a fan of mtl because of how patchy and tedious it feels to use your own Monads
<elvishjerricco>
infinisil: Yea, it’s annoying but there’s nothing that pragmatically gets in the way, like with effects systems. Just feels a little gross.
<elvishjerricco>
Elegance vs pragmatism. The constant Haskell struggle :P
<elvishjerricco>
Mostly I just try to stay out of monadic code :P
<elvishjerricco>
It’s a problematic pattern anyway.
<infinisil>
Sometimes it's the right thing though
<infinisil>
Or often even
<infinisil>
The world is rather sequential after all
<gchristensen>
agreeing on the sequence, though, is a different matter
<elvishjerricco>
infinisil: Yea but sometimes I prefer stuff like `runZFSCommand (Get ...)` over a composable monadic approach. Much simpler to program. Mostly I prefer to look for Applicative solutions. That class is glorious
<elvishjerricco>
Like `runZFSCommand :: ZFSCommand a -> IO a` rather than `zfsGet :: ZFS m => Arg -> m Ret`
<elvishjerricco>
Maybe not in this case, but you get the idea
<elvishjerricco>
Arrow based interfaces would be amazing if anyone could figure out how to get them to work without just being monads :P