gchristensen changed the topic of #nixos-chat to: NixOS but much less topical || https://logs.nix.samueldr.com/nixos-chat
matthewbauer has quit [Ping timeout: 256 seconds]
<gchristensen> it is kind of weird that people grok >> just fine but get all freaked out by >>=
<samueldr> weird, especially if they grok ++ and ++=
JasonGrossman has quit [Ping timeout: 240 seconds]
<gchristensen> yeah
<samueldr> (I'm assuming this is the C-like x >>= 1 :: x = x >> 1, and not some fancy FP weird thing)
<gchristensen> oh, no, I'm talking fp :P
<samueldr> oh, then educate me, which language / chapter?
<gchristensen> bit shifts are weird operations and require jumping around btwn abstractions to get it
<gchristensen> >>= as in Haskell's bind
<samueldr> when/if I ever get to haskell, I'll think about it ;)
<gchristensen> http://typeclasses.com/ hs been great
<jtojnar> well, >> is just *>
<jtojnar> what does ++= do?
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nixos-chat
pie__ has quit [Ping timeout: 245 seconds]
lassulus_ has joined #nixos-chat
lassulus has quit [Ping timeout: 255 seconds]
lassulus_ is now known as lassulus
Guanin has quit [Ping timeout: 248 seconds]
Guanin has joined #nixos-chat
Guanin_ has joined #nixos-chat
Guanin has quit [Ping timeout: 248 seconds]
Guanin_ has quit [Ping timeout: 240 seconds]
Guanin_ has joined #nixos-chat
pie__ has joined #nixos-chat
jD91mZM2 has joined #nixos-chat
sir_guy_carleton has quit [Quit: WeeChat 2.0]
Lisanna has joined #nixos-chat
jD91mZM2 has quit [Ping timeout: 264 seconds]
pie__ has quit [Ping timeout: 268 seconds]
pie__ has joined #nixos-chat
jD91mZM2 has joined #nixos-chat
MichaelRaskin has quit [Quit: MichaelRaskin]
<manveru> what does *> do?
pie__ has quit [Ping timeout: 256 seconds]
Guanin_ has quit [Remote host closed the connection]
JasonGrossman has joined #nixos-chat
sir_guy_carleton has joined #nixos-chat
<infinisil> manveru: http://hayoo.fh-wedel.de/?query=*%3E
<manveru> yeah... i don't think i understand that either :)
<manveru> any idea why none of those haskell docs have any examples?
<infinisil> E.g. With IO (IO is an Applicative): `putStrLn "hello" *> getLine` would first print hello, then read a line and return the line it got
<infinisil> The result of putStrLn ( () ) gets thrown away
<infinisil> Or `getLine *> getLine` would get 2 lines but only return the second one
<manveru> ok, thanks
<jD91mZM2> Is that short for `line <- getLine` `putStrLn line`?
<infinisil> Nah
<manveru> you don't output the line you get
<infinisil> jD91mZM2: getLine >>= putStrLn would be short for your example
<jD91mZM2> oh whoops
<infinisil> If I'm not mistaken
<jD91mZM2> Haskell is confusing :P
<manveru> the ruby version is `puts "hello"; gets` :)
<jD91mZM2> So *> is like "do this and if it works then do that"?
<manveru> i don't think it cares whether it works
<infinisil> Yeah
<infinisil> It's "do this, throw away its result and then do that"
<jD91mZM2> wwwwhhhyyyy
<jD91mZM2> haskell why
<infinisil> ??
<manveru> exactly :)
<jD91mZM2> ok but `>>=` is "do this and if it works pass it to that"?
<infinisil> >>= is "Do this, pass the result to that and execute that"
<infinisil> Well "execute" in a Monad sense, it's whatever the monad defines as this
<jD91mZM2> Ah, thanks!
<infinisil> Oh and also
<infinisil> Maybe is a monad too
<jD91mZM2> Yeah, Maybe and Either. That's the only two monads I know about and almost understand
<infinisil> Just "hi" >>= \x -> Just (x ++ "test")
<infinisil> This should return Just "hitest"
<infinisil> Nothing >>= \x -> Just (x ++ "test")
<infinisil> Should return Nothing
<jD91mZM2> Hmm, the docs describe *> as "Sequence actions, discarding the value of the first argument" and >> as "Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages".... so what's the difference?
<infinisil> There is none
<infinisil> I think >> is kept for backwards compatibility
<jD91mZM2> Ah
__monty__ has joined #nixos-chat
sir_guy_carleton has quit [Quit: WeeChat 2.0]
sir_guy_carleton has joined #nixos-chat
<infinisil> I just learned that in this day and age, there are still people who believe that the earth is flat..
matthewbauer has joined #nixos-chat
<gchristensen> ... just now?
<gchristensen> I'm impressed :)
<jD91mZM2> Well you see if you look at this game you can't fly higher than X meters and I bet that's because they modelled the game after earth and don't want you to see the whole earth to realize it's flat. Wake up, sheeple! /s
Lisanna has quit [Quit: Lisanna]
<manveru> guess they played too much minecraft
matthewbauer has quit [Read error: Connection reset by peer]
matthewbauer has joined #nixos-chat
<infinisil> Nooo, my zpool is full..
<LnL> no quota?
<infinisil> Why would I want that?
<infinisil> Ah, as a warning sign that I don't have much left?
<LnL> because you don't want a completely fragmented pool
<infinisil> It's not too badly fragmented actually, just full
<infinisil> 60% FRAG, 96% CAP
<LnL> and it's nice to give you some extra wiggle room when removing stuff
<__monty__> Zfs can't remove stuff when completely full?
<LnL> either way --gc --max-freed is your friend
<infinisil> My /nix makes up like 2% of the space
<infinisil> This is good motivation to finally build a machine with lots of storage
<LnL> wow, either you don't have much space or your store is _really_ small
<infinisil> 40GB /nix, 2TB capacity
<infinisil> What's your /nix?
<LnL> currently ~100G and this machine doesn't have 2TB disk space
<infinisil> Damn, what's taking up so much space there?
<manveru> ncdu is your friend
pie__ has joined #nixos-chat
pie__ has quit [Ping timeout: 240 seconds]
MichaelRaskin has joined #nixos-chat
<LnL> dunno, it's usually even bigger I don't run gc unless necessary
Lisanna has joined #nixos-chat
matthewbauer has quit [Read error: Connection reset by peer]
matthewbauer has joined #nixos-chat
matthewbauer has quit [Read error: Connection reset by peer]
matthewbauer has joined #nixos-chat
<infinisil> Hmm.. I wonder if a GC will clean up my nixops builds..
<gchristensen> just the other day, 400GB / 45GB
matthewbauer has quit [Ping timeout: 276 seconds]
matthewbauer has joined #nixos-chat
<jD91mZM2> Oh, not setting a cap on zfs causes fragmentation? How do you fix it?
<infinisil> Not directly
<infinisil> You can't unfragment zpools unfortunately, as of now at least
<LnL> using any filesystem at 90-100% causes fragmentation
<infinisil> Not necessarily, it depends on the types of files you use
<infinisil> E.g. if all you do is save 1KB big files, fragmentation doesn't happen
<gchristensen> sure, everything depends on context
<gchristensen> ok shutting down for going across border patrol........ wish me luck :P
<infinisil> :O
<samueldr> I wouldn't wish lock in that situation ;)
matthewbauer has quit [Read error: Connection reset by peer]
matthewbauer has joined #nixos-chat
matthewbauer has quit [Read error: Connection reset by peer]
pie__ has joined #nixos-chat
pie__ has quit [Remote host closed the connection]
matthewbauer has joined #nixos-chat
matthewbauer has quit [Read error: Connection reset by peer]
matthewbauer has joined #nixos-chat
<andi-> depends on the direction I suppose...
matthewbauer has quit [Read error: Connection reset by peer]
matthewbauer has joined #nixos-chat
matthewbauer has quit [Read error: Connection reset by peer]
matthewbauer has joined #nixos-chat
matthewbauer has quit [Ping timeout: 245 seconds]
<infinisil> A reasonable answer to the ultimate question of life, the universe and everything is "It depends"
matthewbauer has joined #nixos-chat
pie_ has joined #nixos-chat
<andi-> :D
jD91mZM2 has quit [Quit: WeeChat 2.0]
matthewbauer has quit [Ping timeout: 264 seconds]
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
infinisil has joined #nixos-chat
matthewbauer has joined #nixos-chat
matthewbauer has quit [Ping timeout: 260 seconds]
matthewbauer has joined #nixos-chat
matthewbauer has quit [Ping timeout: 248 seconds]
__monty__ has quit [Quit: leaving]
matthewbauer has joined #nixos-chat
matthewbauer has quit [Ping timeout: 264 seconds]