IRCaBot 2.1.0
GPLv3 © acetone, 2021-2022
#saltr
/2022/03/31
wellicht oh well
itsjustme Hey wellicht
genka hey guys
dr|z3d hello, hello
dr|z3d itsjustme, wellicht, genka
itsjustme hey dr|z3d :D
dr|z3d all good ijm?
dr|z3d can we integrate something like this into cake, itsjustme? prettier.io
itsjustme so it organizes code for you?
dr|z3d optional code formatting
dr|z3d would integrate with pastebin, probably.
itsjustme hmmm. looks like like its a local thing
dr|z3d local?
dr|z3d oh, you mean client-side javascript..
itsjustme looks like it
dr|z3d yeah, it is. ajax based.
dr|z3d at least, that's the web front end. I think you can also process files from the command line for a non-interactive version.
itsjustme doesn't really work with the cake model... unless there is one client side. I suppose I could re write it
itsjustme oh, I could do that
itsjustme that gets dicy when it comes to security
itsjustme The files are encrypted so I'd have to have a temp dir loaded in ram so the cli could access it
dr|z3d yeah, well it's just the opening gambit re software, maybe we can find something that better fits the cake model.
itsjustme ram mounted as a file system
dr|z3d sure, tmpfs would do it.
itsjustme yeah, that solves one problem but the bigger one is the exec being poisoned
dr|z3d npm you mean?
itsjustme well php would exec to npm
dr|z3d to avoid that, you'd just grab the files from github instead of npm, perhaps.
itsjustme oh no thats not what I meant. I meant how php would execute the commend.
dr|z3d then I'm not sure what you mean by poisoning
dr|z3d I like prettier's output, looks pretty solid in the webui.
itsjustme Yeah it does look pretty nice
itsjustme I mean avoid users from putting something in the file or any mod to the file name that would cause arbitrary remote code execution
dr|z3d ah, right
dr|z3d it's extensible with plugins.. java, php etc.. prettier.io/docs/en/plugins.html
dr|z3d there's also unibeautify.com but I'm having problems getting their playground to load.
dr|z3d that looks like a superset of prettier.
genka is libreddit secure for the hoster of instance? i mean, if someone posts prohibited content, then what will happen to instance hoster?
dr|z3d all depends on your hosting provider and the party that's filing a DMCA or whatever.
dr|z3d if you're hosting on i2p, not a lot that can be done.
genka so, if i host libreddit in i2p from my home it's not safe, right?
dr|z3d perfectly safe on i2p.
genka i forgot
genka you cant post with libreddit, teddit
genka right?
dr|z3d right. read only.
genka haha nice
genka thanks
dr|z3d you'll be competing with teddit.i2p which is a pretty high bar :)
genka ))))
dr|z3d fast, image-optimizations, custom ui, and multi-network support.
genka nice
dr|z3d what you see there requires a fairly powerful server to keep running.
dr|z3d all the thumbnails and images are cached and processed (scaled, cropped and optimized as required) more or less in realtime.
dr|z3d without that, you're looking at poor performance over i2p, especially when someone thinks it's fine to upload a 4Kx2K image, for example, which is more often than you'd hope.
dr|z3d oof indeed.
dr|z3d not sure what goes away with https usage, mesh
dr|z3d purokishi isn't an adblock type offering, it can't block elements on the page, just the hosts that serve them.
dr|z3d http or https makes no difference here.
mesh how do I tell i2psnart to retry reloading and redownloading of torrents?
mesh second time my
mesh second time my browser went down hard
mesh turns out i2psnark really doesn't like it when you unplug your hard disk by mistake
mesh it's also interesting to note that i2p appears to perform better with MaxPauseGCMillis set smaller instead of too large
dr|z3d that's an advantage of ZGC, mesh. 1 millisecond pauses.
dr|z3d as for telling snark to retry downloading torrents, if you mean torrent files or magnets, that's a hard coded value.
dr|z3d and yes, if snark loses its storage, you need to restart snark from /configwebapps
mesh dr|z3d: when snark loses its storage it seems to kill the whole router :/
dr|z3d that shouldn't be the case, but if the storage is located in i2p's profile dir, then sure, it probably will.
mesh dr|z3d: I have storage on a big separate drive. twice now it's come undone (stupid loose usb plug) and i2psnark has made the router unusable as a result. Not sure why but everything goes crazy when this happens
dr|z3d maybe bring that to zzz's attention, then.
mesh dr|z3d: as for zgc yeah it's great I'm just not a fan of zgc's very high cpu usage. It seems that G1GC with a MaxPauseGCMillis of 500 actually performs significantly better than 2000. (What I set it to before on the mistake assumption
mesh that the router is a non-interactive process and long gc pauses are okay
dr|z3d packets are time sensitive, latency is king!
mesh dr|z3d: not even sure what I would tell zzz. There's nothing in the logs but when it happens the whole router becomes unusable. Nothing to do but kill it and restart
dr|z3d you'd tell him that.
dr|z3d "lost snark data dir ate my router"
mesh I may look into running i2psnark standalone. that way if i2psnark does crash the router would be okay and other services wouldn't be affected
dr|z3d yeah, or you can mention the issue to zzz and maybe he'll have some ideas for how to troubleshoot and provide logs.
dr|z3d and by doing so potentially help the project along :)
mesh I'll mention it though I hate to report a bug with so little data
mesh I do notice that when i2psnark loses its data dir and several (5) torrents are active the router's memory graph gets stuck in a nasty sawtooth pattern
dr|z3d garbage collection working hard.
mesh yeah. it's like the router is stuck in a loop of generating tons of garbage and then collecting it. no time to do anything else.
dr|z3d regarding retrying torrent downloads, i2p retries 3 times before giving up. i2p+ retries 20 times.
genka dr|z3d: soo, seems like libreddit is working but i dont figured yet how to crop images on-the-fly
genka do you know how to do this with nginx? it has special module for that but it cant crop by percentage, just specific values
itsjustme genka: nginx isn't going to crop images for you. you'd need some backend like php
genka itsjustme: yeah, i thought about that but found ngx_http_image_filter_module for nginx
itsjustme looks like you'd need to compile from source
itsjustme I see, I mean it looks like you could do that not 100% sure why though
genka itsjustme: yeah, i see, but i want to crop by percentage, not by specific values
itsjustme do you want to make an icon?
genka nah nah, just crop all images from libreddit on-the-fly
genka to serve through i2p
genka cuz seems like it serving original big images which is unacceptable while using i2p :)
itsjustme what about image_filter_jpeg_quality?
genka itsjustme: yeah, i thought about it but what about png
genka they're also present
itsjustme hmm, not sure if it does that
dr|z3d genka: I run all the images through various scripted processes, not least imagemagick to handle the rescaling.
dr|z3d cropping I reserve for thumbnails to ensure they're uniform width and height so they don't look squashed when presented as a square.
dr|z3d thumbnail pipeline is approx. scale up, crop, optimize (reduce bit depth, interlace etc).
dr|z3d I looked at thumbor.readthedocs.io/en/latest/index.html for another project.. that might be something to consider.