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: 248 seconds]
<infinisil> Lol, seen on reddit: OP gets some criticism for how their non-descriptive commit messages don't give off a professional look. Their answer?
<infinisil> Rewrites git history to remove all previous commits
<infinisil> ............
<infinisil> "Initial commit: Showing 1,006 changed files with 747,722 additions and 0 deletions." Yes, this looks much more professional now
<samueldr> :(
<joepie91> infinisil: ...
<infinisil> Although, that's weird: Looking at the exact times of that comment being posted and the commit being made. The commit happened 6 minutes *before* the comment
<infinisil> I'm just looking at the "commit" time displayed by github, which might not be the *actual* commit time
<infinisil> That's very bad, and if I catch anybody do that I'll punch them
* gchristensen changes history all the time
<gchristensen> sorry, suckers
<infinisil> gchristensen: Locally only I hope?
<gchristensen> only in repos people have no business depending upon stable history
tertle||eltret has quit [Quit: Connection closed for inactivity]
<joepie91> for the people who dislike Electron: https://twitter.com/joepie91/status/1024816676175536129
<joepie91> :P
<joepie91> (yes, that is a thing you can do)
<gchristensen> same but ncurses
<joepie91> (blessed is like a saner ncurses)
<gchristensen> :O
<samueldr> what I dislike of electron is how you have to use js... I'm not a fan, but not a hater; I would much prefer use a (my opinion) better language with all the DOM and features a browser has
<samueldr> one day, webassembly with the proper bindings may be an appropriate way to interface
<infinisil> samueldr: Is it not already today?
<samueldr> (when you need the huuuuuuuge amount of features the DOM and browser gives you for free)
<infinisil> Oh wait, it can't do direct DOM things yet I think
<samueldr> infinisil: not sure, probably missing the implementations of compilers
<samueldr> ah, and as long as the integration isn't done, it's DOA for my use cases :)
<samueldr> strip JS out of the equation, let me use whatever If fancy
<samueldr> VB.net in the browser
<samueldr> I'M JOKING
<infinisil> I think Rust has pretty good webassembly support last time i checked
<samueldr> oh, one killer feature that's probably not being worked on would be FFI cross languages
<samueldr> see, if I use whitespace to wasm, I'd like to use some libraries implemented in php compiled to wasm
* samueldr fears for even more separate ecosystems of tooling
<infinisil> Hmm, wouldn't you use whatever libraries you have in the source language?
<samueldr> depends
<samueldr> let's use a good example
<infinisil> Oh, but that would make websites include everything, when it currently is cached in a way
<samueldr> and assume js will, too, be affected from not having FFI
<infinisil> (deps i mean)
<samueldr> I want to use react, but in C
<samueldr> well, I have to find a re-implementation of react?
<samueldr> while there's the js react that already runs in WASM?
<samueldr> though, saying this, I long for the same feature at the system level
<infinisil> Hmm, am a bit confused, but yeah I get your point
<infinisil> Out of time for today though, I'll look at webassembly closer some time in the future
<infinisil> where future = poisson distribution with a mean of an estimated 4 years
<samueldr> :)
<samueldr> how's the studying going?
<infinisil> Decent, but now sleepy time ;)
tertle||eltret has joined #nixos-chat
<joepie91> ivan: unfortunately not the same thing
<joepie91> ivan: react-native introduces a lot of runtime limitations
<joepie91> (and general hassle in getting things going)
<gchristensen> my cubital tunnel surgery means my right pinky is weak and misses the s a lot, so I type nix-hell a bit more often than I'd wish
<ivan> I dislike Electron for not running in a sandboxed chromium tab. if people want to use web technologies, just ship a damn website.
<samueldr> as we've seen earlier, symlinking nix-shell to nix-hell wouldn't help ;)
<gchristensen> :P
<joepie91> ivan: I think you're about a decade too late calling HTML/CSS/JS "web technologies" :)
<joepie91> basically every major UI toolkit has some variant of CSS and HTML/XML now, JS is used widely in all sorts of absolutely non-web-y applications
Sonarpulse has quit [Ping timeout: 268 seconds]
Sonarpulse has joined #nixos-chat
Sonarpulse has quit [Ping timeout: 260 seconds]
lassulus_ has joined #nixos-chat
lassulus has quit [Ping timeout: 240 seconds]
lassulus_ is now known as lassulus
sir_guy_carleton has joined #nixos-chat
drakonis has joined #nixos-chat
drakonis has quit [Remote host closed the connection]
pie__ has joined #nixos-chat
pie___ has quit [Ping timeout: 240 seconds]
Sonarpulse has joined #nixos-chat
Sonarpulse has quit [Ping timeout: 265 seconds]
biopandemic has quit [Quit: Quit.]
Guanin has quit [Ping timeout: 256 seconds]
Guanin has joined #nixos-chat
pie___ has joined #nixos-chat
pie__ has quit [Ping timeout: 260 seconds]
makefu has quit [Ping timeout: 256 seconds]
LnL has quit [Ping timeout: 256 seconds]
LnL has joined #nixos-chat
makefu has joined #nixos-chat
sir_guy_carleton has quit [Quit: WeeChat 2.0]
makefu has quit [Quit: WeeChat 1.9.1]
makefu has joined #nixos-chat
pie___ has quit [Ping timeout: 264 seconds]
pie_ has joined #nixos-chat
vdemeester has quit [Remote host closed the connection]
pie_ has quit [Ping timeout: 265 seconds]
<infinisil> gchristensen: Oh, do you use dvorak as well then?
<gchristensen> yeah
<gchristensen> good catch ;)
<etu> dvorak \o/
* etu is on svorak though, one of the many swedish dvoraks
tertle||eltret has quit [Quit: Connection closed for inactivity]
<gchristensen> I don't know if it does anything special for me, but I do use it :P
Sonarpulse has joined #nixos-chat
<gchristensen> I just had the weirdest bug
<gchristensen> I pressed tab a bunch of times in firefox and it crashed
<gchristensen> and, if I open Slack and then touch the top left corner of my monitor, my desktop crashes and I get logged out
Sonarpulse has quit [Ping timeout: 276 seconds]
drakonis has joined #nixos-chat
Sonarpulse has joined #nixos-chat
sir_guy_carleton has joined #nixos-chat
Sonarpulse has quit [Ping timeout: 260 seconds]
Sonarpulse has joined #nixos-chat
__monty__ has joined #nixos-chat
pie_ has joined #nixos-chat
pie_ has quit [Read error: Connection reset by peer]
pie__ has joined #nixos-chat
sir_guy_carleton has quit [Quit: WeeChat 2.0]
Sonarpulse has quit [Ping timeout: 268 seconds]
<andi-> This heatwave.. I hope it's over soon.. Spent the last 2 days in Bed with many sheets & fever.. :/
<gchristensen> oh jeeze andi-
<gchristensen> do you need a dr?
<andi-> I am fine.. fever is gone since a few hours
<gchristensen> ok, good
<andi-> now I am just sweating "normally"
<gchristensen> would you like to proof-read a thing to distract you? :) :P
<andi-> SUre, I was watching twitch streams all day...
<gchristensen> PM'd
<andi-> k
<joepie91> andi-: you've checked that it isn't a dangerous infection of some sort, right? there's some noise about certain tropical bugs migrating to EU due to the ongoing high temps
<andi-> joepie91: thanks for making me worried!
<andi-> I doubt it.. will see in a few days.
<joepie91> andi-: that wasn't my goal :) it's just something to keep in mind
<joepie91> chances of it are still low, but better safe than sorry
<andi-> no worries ;-)
<joepie91> in a few years we might have to worry more...
Sonarpulse has joined #nixos-chat
<kalbasit> anyone here using a VPN service (such as ExpressVPN or VyprVPN) on NixOS?
drakonis has quit [Remote host closed the connection]
tertle||eltret has joined #nixos-chat
__monty__ has quit [Quit: leaving]
Sonarpulse has quit [Ping timeout: 268 seconds]
<infinisil> Problem: I want to extract part of the fortune database
<infinisil> Solution: Run fortune many many times, write the output to a file. Sort file, remove duplicates
<infinisil> When to stop? When the number of unique lines converges :)
<samueldr> this sounds like a bad idea
<infinisil> Bonus: I can stop the loop at any point, come back later to start it again and I won't lose any progress :)
<samueldr> this sounds like it shouldn't be a bonus?
<infinisil> Dare I try to parse the database
<samueldr> infinisil: there are 4 `bin/fortune`... I *really* wonder what are the chances that one of these has an export feature or something useful
<infinisil> Heh
<infinisil> Didn't know about there being 4
<infinisil> ,locate bin fortune
<{^_^}> Found in packages: fortune, bsdgames, netbsd.games
<samueldr> I see lcdproc which has fortune.pl
<samueldr> (it could be irrelevant)
<samueldr> [nix-shell:~]$ 9 fortune --help
<samueldr> Misfortune!
<infinisil> Well, the database is just a bunch of files, but they have % in them and I don't feel like assembling them right now
<infinisil> Convergence is near at just about 10000 quotes! (short ones)
<srk> infinisil: sounds like halting problem! :D
<infinisil> Definitely
<infinisil> I'm getting about 1 new quote every second lol, 100% CPU usage
<infinisil> Wait that's just 1 core though, I wonder how fast I'll go if I make it use all 8
<srk> :D
<joepie91> multithreaded fortune extraction, lol
<infinisil> Oh damnit, bashes >> doesn't seem to be threadsafe..
<clever> infinisil: can you paste ~3 lines from the short database?
<infinisil> the man page of fortune mentions the /nix/store dir where the database is
<clever> ah, i see the issue, long and short are mixed in the same file
<clever> and short are still multi-line
<clever> just write some haskell :P
<infinisil> Yeah just thought of that heh
<clever> you can even use runHaskell!
<clever> one min
<infinisil> Actually started writing haskell instead of bash recently, it's really nice
<infinisil> For such processing style stuff
<infinisil> Just in ghci, maybe a bit inefficient, but it worked for the amount of data i had
<clever> infinisil: this lets you write your derivations in haskell rather then bash
<clever> and you can use nix string interpolation to insert paths directly into the haskell code
<samueldr> :o
<infinisil> Yeah, I think I remember the time when you put it together actually, I think I asked for something like that or so
<infinisil> :)
<clever> if you change line 4 to instead use `ghc -o foo` and ./foo, it will run faster, at the cost of a slower startup
<clever> a -threaded will also allow forkOS to get threads
<infinisil> I wouldn't use nix for such stuff though..
<infinisil> building derivations to see the result is wayyy to slow of a dev cycle
<clever> i always use nix for large data processing things :P
<infinisil> It's so slow though!
<clever> it lets me ensure i dont have a stale file from not re-running a step
<clever> you can dev with nix-shell, and then switch to nix-build for the final run and occasional tests
<clever> and breaking the proccess up into stages like that also makes it simpler to work on
<samueldr> you're a mad one (that's a good thing)
<clever> samueldr: note, i have proccessed 3gigs worth of pdf tax records with the above method before :P
<samueldr> yeah, I recall something similar :)
<clever> the bastards had the multi-line records split between pages
<clever> and the pixel offset on each page was dependant on the previous page length
<samueldr> oh no!
<clever> and the whole thing was split into 3 pdf files, because of a 1000 page limit in each pdf
<clever> and the records split over the pdf file boundary too!
<samueldr> about data privacy, I guess you made it in an adequately separate machine so it wasn't an issue?
<clever> it was something like 2500 pages
<clever> the files are publicly downloadable on the source site :P
<samueldr> (thinking about if this could be done for generating things)
<samueldr> ah
<srk> I was suggesting we try nix for open data (storing/processing)
<clever> i first used pdf2xml, to turn the pdf file into an xml document, giving xy coords for every word
<infinisil> Um, how can it be that `cmd | wc` is different than `cmd > f; cat f | wc` ??
<infinisil> Oh lol, I'm stupid
<clever> infinisil: does cmd output different things each time its ran?
<srk> looks like a good fit, there is a similar system I can't remember the name of tho
<infinisil> I'm so so stupid: I had the process that appended to the file still running
<clever> first major problem i ran into, pdf2xml memory usage scales log(n) to the number of pages :P
<infinisil> and I used that in the command..
<clever> so a 1000 page pdf needs infinite ram
<samueldr> so, splitting pages is a necessity first?
<clever> yeah
<clever> i made a crazy nix expression to generate 1000's of derivations, each grabbing a 25 or 100 page sub-section
<clever> then using buildEnv to merge the dirs with the xml files
<clever> then used some php libs that i know use streaming ops to parse the xml, get rows out of the xml
<srk> I've converted few 1k+ lines datasheets from ST recently with pdftotext. gonna try to tables and some stuff with haskell :D
<srk> *try to parse
<clever> pdftotext doesnt preserve whitespace and the columns just meld into one
<srk> try with -layout : maintain original physical layout
<srk> there's also -table : similar to -layout, but optimized for tables
<srk> (pdftotext from xpdf)
<infinisil> Okay why does the fortunes database contain unprintable chars
<infinisil> ^G and ^H
<infinisil> E.g. in the "work" file, line 250
<infinisil> "At least they're ___________^H^H^H^H^H^H^H^H^H^HEXPERIENCED incompetents"
<clever> thats backspace
<infinisil> Yeah, but why is it there
<clever> when printed to your console, it will backspace things out and correct itself :P
<clever> if ran over a slow enough terminal, youll probably see it happening and get a neat effect :P
<samueldr> printed on teletext it would be underlined I guess
<samueldr> uh, teletypewriter*
<infinisil> Hmmm
<samueldr> (some parts of this could be old!)
<infinisil> > fortunes = import ./fortunes.nix
<{^_^}> fortunes defined
<infinisil> > fortune
<{^_^}> "No sooner said than done -- so acts your man of worth. -- Quintus Ennius"