<cole-h>
infinisil: So basically the "Only expand, don't collapse" promise of nixpkgs-fmt is what swayed me.
<infinisil>
Hm I see
<infinisil>
I admit that I haven't intensively used either of them, so my opinion isn't very relevant
<cole-h>
Nor have I, so if that disqualifies... :P
<infinisil>
Heh
<cole-h>
infinisil: I also really hate that nixfmt collapses deps (`{ dep1, dep2, dep3 }:`) and inputs lists
<cole-h>
Again, mostly diff pollution, but also the fact that, to add a new input, I have to now go into the list itself, rather than just creating a new line and adding that new dep
<cole-h>
It's simpler (to me) to create a newline and type out the dep, rather than navigate to the beginning of the list and then insert the dep
<DigitalKiwi>
going to get my hairs cut. all three of them
<cransom>
i've got some spider content laying around. that was one of the things that we noticed first in NC, they grow'em bigger than the midwest down here.
<cole-h>
gchristensen: (finally watched that video) Dude has good taste in music
<gchristensen>
haha yeah
<gchristensen>
see? it is a good video
<cole-h>
colemickens: Any reason why you have `default-yk` in the mirage init commit? Seems unused
<cole-h>
Or is that the "needs cleanup" part
<cole-h>
of your comment
<colemickens>
That video makes me think of all of the various gaskets in my life that need replacing. Including the literal one for my mocha pot. Was that a smoke detector low battery beep too? I love it.
<colemickens>
cole-h: lots of cleanup is needed, that included yeah
<cole-h>
Got it
<gchristensen>
I was having a hard time with my pot not sealing after a replace gasket. I just needed to turn it harder.
<gchristensen>
(I couldn't turn it enough)
<c74d>
Hm... Is there an idiomatic way to exponentiate in Nix? I could "build" the result as a derivation, but that seems... overblown. :s
<gchristensen>
yikes, what for?
<c74d>
I'm trying to implement this formula: w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
<energizer>
someone should write a little math library for nix
<c74d>
I want to select a foreground color to put into a config file based on which of a small set of colors has the most contrast with a given (unknown) color
<c74d>
("unknown" is maybe poor word choice; it's entirely deterministic)
<c74d>
s/color$/background &/
<JJJollyjim>
simply implement exponentiation in terms of square roots
<JJJollyjim>
Oh wait... :P
<c74d>
I could implement exponentiation with recursion... but for that I'd need a way to check whether a float is actually an integer, and that doesn't seem to be available either.
<c74d>
I could implement that with `==` and a rounding function, but that doesn't seem to be available either.
<c74d>
joepie91: with my non-integer exponent, that would not terminate :)
<gchristensen>
infinisil: I don't suppose you know how to tell poetry to add a depndency and force it to ignore a transitive dependency?
<joepie91>
heh
<infinisil>
Nope
<c74d>
I suppose I could test whether a float is an integer by... running binary search over a space of "reasonably-sized" integers to see whether any equal the float....
<gchristensen>
tostring it and then match to find a .
<c74d>
... ... well that's much less bad
<c74d>
gchristensen: thanks for helping me out of my tunnel-vision :p
<JJJollyjim>
D:
<gchristensen>
:)
<lovesegfault>
I wish there were more books that focused on learning a new lang _without_ assuming you know almost no programming
<cole-h>
colemickens: Another q: why `pythonPackages` and not `python3Packages`? In fact, why not just `python3.pkgs.<pkg>`? I believe python3.pkgs is recommended, so python3 overrides affect the package set as well (could be wrong)
<cole-h>
lovesegfault: Which language are you learning? Haskell? :^)
<cole-h>
JJJollyjim++ DigitalKiwi++ I just learned something new. Learning Haskell syntax from a book? Whack. Learning Haskell syntax from a video on curried functions? Woke.
<{^_^}>
DigitalKiwi's karma got increased to 13
<{^_^}>
JJJollyjim's karma got increased to 2
<cole-h>
gchristensen: lol. I'll take a peek, thanks.
<c74d>
infinisil: thanks, I suppose that may be more efficient after all than using `toString` and `match`
<cole-h>
DigitalKiwi: I feel like once I can read function signatures, I'll be able to intuit a lot more Haskell. But something about `add :: Num a => a -> a -> a` completely boggles my brain.
<c74d>
the asymptotic complexity of bisection seems worse, but my inputs aren't large
<JJJollyjim>
The => syntax for typeclasses is definitely weird
<JJJollyjim>
maybe it All Makes Sense after years of category theory lol
<cole-h>
Does that signature basically mean `add is a function where a is any number that takes "a" and produces a function that takes another "a", which produces "a" as a result`?
<JJJollyjim>
Yep
<DigitalKiwi>
if you try to make the type add :: a -> a -> a it'll complain
<JJJollyjim>
So it could be Float->Float->Float or int->int->int etc
<cole-h>
`add :: Num -> Num -> Num` <- would that work?
<cole-h>
Right, it's kind of a "common sense" thing -- just wanted to make sure I was intuiting in the right direction
<cole-h>
Is there a way for a curried function to return nothing, i.e. just run logic on the input? How do you differentiate between `a -> a -> a`, which takes 3 arguments and produces no result, vs `a -> a -> a`, which takes 2 arguments and produces 1 result?
<cole-h>
(Might not be entirely accurate "signatures", but hopefully my meaning is clear)
<c74d>
cole-h: A function that returns "nothing" would return the unit type, or at least that would make sense
<infinisil>
c74d: Feel free to use them, but I really wouldn't do that if it were me
<DigitalKiwi>
<interactive>:1:1: error: Not in scope: ‘!’
<DigitalKiwi>
and !! is list indexing
waleee-cl has quit [Quit: Connection closed for inactivity]
<DigitalKiwi>
Prelude> (7!)
<DigitalKiwi>
5040
<DigitalKiwi>
cole-h: and i think when you think of haskell as a math language and think of functions in the math sense you'll have better intuition about your a->a->a->a question
<DigitalKiwi>
i don't know that thinking of it is a math language is a good/accurate thing but a lot of things do intuit that way
<evils>
cole-h: but they actually spend the last 2 days doing nothing but look for that so they could send it to you...
<cole-h>
:D
<DigitalKiwi>
i'll probably forget this whole interaction and tomorrow i'll be like oh cole-h asked what a monad is i should send them this video
<cole-h>
lmao
<cole-h>
What is the difference between "/" and "`div`", and why does "`div`" have backquotes around it
<DigitalKiwi>
Prelude> :t div
<DigitalKiwi>
div :: Integral a => a -> a -> a
<DigitalKiwi>
(/) :: Fractional a => a -> a -> a
<DigitalKiwi>
Prelude> :t (/)
<DigitalKiwi>
Prelude>
<DigitalKiwi>
Also, 11 `div` 8 is the same thing as div 11 8. Backticks around any function call will allow you to use it in infix style, as opposed to prefix. It’s just syntactic sugar for some functions that read better in infix style.
<cole-h>
Oh, do the backquotes just make it an infix operator?
<DigitalKiwi>
i can only assume you're all off learning haskell
<JJJollyjim>
in bed, being sleepy
<JJJollyjim>
it won't stop raining :<
drakonis has quit [Quit: WeeChat 2.8]
<c74d>
... okay I do not know how to implement exponentiation for rational exponents
cole-h has quit [Quit: Goodbye]
<c74d>
I was thinking to represent the exponent as a pair of an integer numerator and an integer denominator and use that base^(n*m) = (base^n)^m, but of course I need then to be able to take roots
parsley936 has joined #nixos-chat
FRidh has joined #nixos-chat
cransom has quit [Ping timeout: 240 seconds]
cransom has joined #nixos-chat
waleee-cl has joined #nixos-chat
<MichaelRaskin>
Well, roots require approximations, e.g. by Newton's method
waleee-cl has quit [Quit: Connection closed for inactivity]
LnL has joined #nixos-chat
LnL has joined #nixos-chat
LnL has quit [Changing host]
evanjs has quit [Read error: Connection reset by peer]
evanjs has joined #nixos-chat
<gchristensen>
woohoo google-chrome can start without a PATH now
lejonet has quit [Quit: WeeChat 2.4]
lejonet has joined #nixos-chat
<gchristensen>
haha vscode on the other hand does not appreciate having no PATH
<monsieurp>
I've been hearing a lot of horror stories about Zoom and their privacy policy
<monsieurp>
what's the actual issue with this service?
<drakonis>
servers go through china, the room id is visible to other people if you stream your screen
<drakonis>
you can bruteforce your entry into random rooms
<drakonis>
its extremely ba
<drakonis>
bad
<gchristensen>
monsieurp: some people find certain UX features not good
<gchristensen>
monsieurp: (though I find them critically useful) like being able to request anotherparticipant turn on the video and microphone
<gchristensen>
I like it
<monsieurp>
yeah
<samueldr>
impossible, didn't you know it's only $THING BAD these days?
<monsieurp>
sounds okay to me
<drakonis>
there's some pretty weird choices that could be avoided
<samueldr>
there is some doubtful stuff going on with the E2EE stuff with zoom
<samueldr>
they initially said it's E2EE, but it was only encrypted between users and zoom
<monsieurp>
I mean it's not as bad as owning a device that sits in my home and can record arbitrarily my private conversations without my consent
<samueldr>
not it's apparently E2EE for paying customers only
<gchristensen>
yeah some weird stuff there
<monsieurp>
right?
<samueldr>
now*
<monsieurp>
that would be really bad
<monsieurp>
worse than Zoom I guess
<samueldr>
but they said it would be available to everyone, I don't know what's the status now
<gchristensen>
monsieurp: especially if it were controlled by an advertisinig network
<monsieurp>
gchristensen: exactly
<cransom>
something about how they also use the encryption in such a way that it doesn't scramble white space, so if you fudge with the raw stream just a little bit, you do see what's going on.
<samueldr>
then the "china link" of zoom is a bit concerning, but you're better off searching for articles about it than hear from badly remembered bits from me
<monsieurp>
people go apeshit over Zoom but stay deaf silent when it comes to Alexa or Google Home
<monsieurp>
weird
<samueldr>
s/is a bit concerning/may be a bit concerning/
<monsieurp>
strange times
<drakonis>
alexa or google home are just as bad
<drakonis>
but its not ~china~
<gchristensen>
cransom: is that still a thing?
<samueldr>
I find it unwarranted to jump to another complete separate issue with those smart home assistant spy devices when talking about a specific service
<drakonis>
its the good ol' its evil but its evil i know
<monsieurp>
drakonis: what's different between a US version and a Chinese version of 1984?
<samueldr>
but eh, y'all do y'all
<cransom>
gchristensen: not sure if it still is, but it at least was.
<drakonis>
monsieurp: i'm quoting the typical excuse
<drakonis>
i think its all terrible
<gchristensen>
yeah, they've cleaned up their posture significantly in the last 2mo
<gchristensen>
samueldr: good point
<qyliss>
Wasn't it within the last couple of weeks that they were cancelling meetings about Tiannanmen Square memorials, including one with no participants in mainland China, on request of the Chinese government?
<gchristensen>
oofta
<monsieurp>
drakonis: thank you
<samueldr>
qyliss: part of "do your own research" I didn't want to come venturing with badly remembered factoids :)
<drakonis>
china is typically terrible next to the US though
<drakonis>
the US is pretty bad but china goes way harder on it
<drakonis>
they're ahead of the curve
<drakonis>
the US will eventually get there
<gchristensen>
ouch
<drakonis>
it only hasnt because it has gotten lazy
<monsieurp>
samueldr: what do you mean with complete separate issue? isn't the topic at hand about privacy violation? :)
<monsieurp>
it looks on-topic to me
<samueldr>
it seems extremely cherry-picked when the conversation was about video voip services
<samueldr>
cherry-picked to make an argument go in a specific $FAANG BAD
<drakonis>
rather, the US is a lot less obvious about it
<monsieurp>
samueldr: you are confused
<samueldr>
okay
<samueldr>
I am confused
<samueldr>
totally
<drakonis>
and the concentration of power in the US is focused largely on private entities rather than the government
<samueldr>
or maybe I am totally done with unfair and biased contructed arguments to veer straight into the memey $THING BAD dopamine train, rather than having a nuanced argument about a specific topic
<monsieurp>
drakonis: hmm
<monsieurp>
drakonis: what about the Patriot Act?
<drakonis>
yes well
<monsieurp>
right
<drakonis>
that's pretty terrible
<monsieurp>
:/
<drakonis>
sadly
<monsieurp>
thanks
<samueldr>
especially when it's trivial to consider you don't need to construct or add any bias to make any of those points... it just is grating
<drakonis>
the US is much less transparent regarding its attempts to do things
<drakonis>
do horrible things to people
<monsieurp>
drakonis: it's equally transparent imho, people are less informed about what the US gov is up to, that's it
<samueldr>
one could say that they are informed about the other governments doings through propaganda, too
<samueldr>
let's imagine subject X I bring in only the bad news, but subject Y I bring a torrent of all news, good, ordinary, bad
<drakonis>
most certainly
<samueldr>
it can be easier to construct a sentiment that X bad, while Y good, ordinary, bad
<samueldr>
so I would argue here that anyone external to a specific bubble is likely to be closer to observing an X than a Y
<monsieurp>
samueldr: why are you so upset man? FAANG business model revolves around data mass collection, extracting as much info about this data and selling that info for top dollar
<monsieurp>
whilst violating privacy in the process at every corner
<samueldr>
monsieurp: because there was no need to bring FAANG into a discussion about zoom
<samueldr>
it's not like it was an unknown factor that brings substance to the discussion
<samueldr>
but I seem to have touched a nerve with you since you're bringing it up again
<monsieurp>
sure
<monsieurp>
you have the last word my man
bkv has quit [Ping timeout: 260 seconds]
bkv has joined #nixos-chat
<colemickens>
Did you know you can tie your shoes "incorrectly" such taht they come undone more often? I think I broke a cycle in my family ;)
<samueldr>
colemickens: is that the one where it depends which hand you're starting with, but basically the "same" knot?
<colemickens>
Yeah, it's a pretty subtle difference when doing the knot itself.
<samueldr>
you can't come in, talk about that and not provide a complete bibliography about the subject!
<colemickens>
If you do it "wrong" the completed loops tend naturally want to twist and point up and down, versus done-right, they will want to lat perpendicular to the tongue.
<colemickens>
* If you do it "wrong" the completed loops tend naturally want to twist and point up and down, versus done-right, they will want to lay perpendicular to the tongue.
parsley936 has quit [Remote host closed the connection]
parsley936 has joined #nixos-chat
<pie_>
anyone have any idea why my vga port might not be showing up in arandr and such
<pie_>
trying to see if a giant CRT i looted works
<pie_>
for starters it turns on
<pie_>
but then turns off with no signal
ivan has joined #nixos-chat
tilpner has quit [Remote host closed the connection]
<joepie91>
colemickens: there's a way better solution
<joepie91>
someone at revspace taught me a way to do a 'double knot' that doesn't look like shit and that can be pulled apart again like a normal knot
<joepie91>
dunno what it's called though
<joepie91>
but it's fast :P
* colemickens
was expecting amputation/singularity uploads as a solution
<joepie91>
lol
<joepie91>
nah
<colemickens>
that sounds interesting! I spent many years always double-knotting them anyway as a result of the flawed initial kot.
<joepie91>
basically you 'mock' the loops without knotting anything yet, and then twist the loops directly around each other, twice, in opposite directions
<joepie91>
that is, you treat each loop like it's an end of the shoelace
<joepie91>
similar to that initial thing where you 'cross' the ends
<joepie91>
except after the initial crossing you just do the same thing twice with loops :P
<joepie91>
(this is difficult to describe!)
<MichaelRaskin>
The main part is that the second cross should be the opposite direction to the first one
<MichaelRaskin>
I think it works reasonably well even if you cross the ends then make and cross the loops once, as long as there is this direction switch.
<colemickens>
"It's also great for people who are very active on their feet, such as when playing serious sports, mountain climbing or even dancing, as well as for yachties whose boat shoes are constantly getting wet." Well, I'm sure it won't hurt anyway. Ha.
<colemickens>
Let's see how good my visual/instruction transfer skills are today, I've got shoes on..
<joepie91>
lol
<colemickens>
I wish these shoes were from the other side -_- wow I feel dumb when I try to do these sorts of htings.
parsley936 has quit [Remote host closed the connection]
<joepie91>
mirroring shoelace stuff is the classical cognitive issue :P
<joepie91>
that is, one of those things that turns out to be more complicated than it feels like it should be
<pie_>
protip, the lenovo thinkpad dock has a vga port. it seems to take precedence. doh.