--- Log opened Sun May 17 00:00:16 2020 |
01:01 | <@celticminstrel> | ToxicFrog: IIRC that did not work well for me, tho I think it does produce a list so I probably could've wrangled it into some form that works. |
01:01 | <@celticminstrel> | What I ended up doing was some crazy thing involving tar. |
01:03 | <@celticminstrel> | Basically it was two folders full of images. Most images were duplicated in both folders, but some were unique to the newer folder. So I tarballed, them, used tar -d to get a list of common files, used a text editor to reduce that list to just the filename and nothing else, and finally used tar -xX to exclude those files when extracting the tarball of the newer directory. |
01:03 | <@celticminstrel> | It "works" but if there's a better way I'd sure like to hear it. |
01:03 | <@celticminstrel> | I guess if nothing else I could always write some script that does it. |
01:41 | <&ToxicFrog> | celticminstrel: `diff -qrs dir1/ dir2/ | sed -E 's,Files (.*) and (.*) are identical,\1\n\2'` will produce a list of all files that are in both folders and have the same names |
01:41 | <&ToxicFrog> | If it's possible some of them have been renamed you probably want a checksumming tool like `fdupes` instead |
02:14 | <@celticminstrel> | That wasn't a possibility in this case, but the key difference from what your command does is that I wanted the files themselves extracted to a separate directory… probably possible with just a little extra work mind you. |
02:14 | <@celticminstrel> | (Also I was on Windows, but I just ended up using git bash for it so that doesn't really matter.) |
02:19 | <&ToxicFrog> | Oh, yeah, that's easy |
02:19 | <&ToxicFrog> | celticminstrel: `diff -qrs dir1/ dir2/ | sed -E 's,Files (.*) and (.*) are identical,\1, | xargs -d\\n -I_F_ cp _F_ outdir/` |
02:20 | <&ToxicFrog> | Oh, actually, can make that much more efficient with: `... | xargs -d\\n cp -t outdir/` |
02:30 | <@celticminstrel> | Fun! I don't think I'm likely to remember that if I ever need it again tho… |
02:31 | <@celticminstrel> | Why -q and no -N on diff? |
02:34 | | Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
02:35 | | Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code |
02:35 | <@celticminstrel> | On an unrelated note, I can't seem to figure out how to make VSCode auto-complete JavaScript in a project that's not node-based or using any new-fangled web frameworks or anything. |
02:36 | <@celticminstrel> | It seems to assume that anything a file needs will be "imported" when in fact the scope of what exists is just defined by the index.html. |
02:47 | <&[R]> | import isn't a node.js thing |
02:48 | <&[R]> | Just FYI |
02:49 | <&[R]> | https://code.visualstudio.com/docs/languages/javascript <-- does this help any? |
02:57 | <@celticminstrel> | Sure but the point is it's not used in this. |
02:57 | <@celticminstrel> | That is the page I found, I haven't been able to figure it out from there. |
02:58 | <@celticminstrel> | The point is, there are no imports, the files should just be treated as if concatenated in a particular order, but I can't seem to find a way to get VSCode to do that. |
03:28 | <&ToxicFrog> | celticminstrel: -N only applies to empty files, which I didn't think were relevant here |
03:35 | <@celticminstrel> | Ah, right. Examples I saw used it but I didn't remember what it does. |
03:56 | | catalyst [catalyst@Nightstar-j00nqq.dab.02.net] has joined #code |
03:59 | | catalyst_ [catalyst@Nightstar-55g2mb.dab.02.net] has quit [Ping timeout: 121 seconds] |
04:19 | | Degi [Degi@Nightstar-h9lpfe.dyn.telefonica.de] has quit [Ping timeout: 121 seconds] |
04:28 | | Degi [Degi@Nightstar-hnckd3.dyn.telefonica.de] has joined #code |
04:49 | <@celticminstrel> | Hm, I don't suppose there's a way to get git (and git gui) to format (ie pretty-print) JSON files when displaying a diff… |
05:01 | <&McMartin> | That sounds like the kind of job that would be farmed out overall git-hosting systems like gitlab. |
05:33 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code |
05:33 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
05:43 | <@celticminstrel> | If such a thing was being used at all, sure, maybe. |
06:19 | <~Vorntastic> | Hooray, quotient rule |
06:21 | | celticminstrel [celticminst@Nightstar-nuu42v.dsl.bell.ca] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
06:22 | | celticminstrel [celticminst@Nightstar-nuu42v.dsl.bell.ca] has joined #code |
06:22 | | mode/#code [+o celticminstrel] by ChanServ |
06:25 | | celticminstrel [celticminst@Nightstar-nuu42v.dsl.bell.ca] has quit [Operation timed out] |
06:26 | | VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed] |
06:26 | | VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code |
06:26 | | mode/#code [+ao VirusJTG VirusJTG] by ChanServ |
09:33 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has joined #code |
10:26 | | catalyst_ [catalyst@Nightstar-6ohufr.dab.02.net] has joined #code |
10:27 | | catalyst [catalyst@Nightstar-j00nqq.dab.02.net] has quit [Ping timeout: 121 seconds] |
12:19 | | catalyst_ [catalyst@Nightstar-6ohufr.dab.02.net] has quit [[NS] Quit: -a- Connection Timed Out] |
12:20 | | catalyst [catalyst@Nightstar-6ohufr.dab.02.net] has joined #code |
15:58 | | celticminstrel [celticminst@Nightstar-nuu42v.dsl.bell.ca] has joined #code |
15:58 | | mode/#code [+o celticminstrel] by ChanServ |
16:32 | | Kindamoody is now known as Kindamoody|out |
16:58 | | catalyst [catalyst@Nightstar-6ohufr.dab.02.net] has quit [Ping timeout: 121 seconds] |
17:12 | | Pinkhair [user1@Nightstar-g7hdo5.dyn.optonline.net] has joined #code |
17:12 | | Pink [user1@Nightstar-g7hdo5.dyn.optonline.net] has quit [Ping timeout: 121 seconds] |
17:32 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
17:54 | | catalyst_ [catalyst@Nightstar-9q0ldp.dab.02.net] has joined #code |
19:54 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
19:54 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
20:34 | | catalyst_ [catalyst@Nightstar-9q0ldp.dab.02.net] has quit [Ping timeout: 121 seconds] |
21:28 | | Kindamoody|out is now known as Kindamoody |
22:34 | <@Alek> | hmm. |
22:34 | <@Alek> | Vorn |
22:37 | <@Alek> | given a sepia image and the formula by which each R, G, and B value was calculated by using all 3 of the original color values for each, is it possible to work out a formula to reverse it to recolorize the image? |
22:42 | <@Alek> | for example |
22:42 | <@Alek> | tr = 0.393R + 0.769G + 0.189B |
22:42 | <@Alek> | tg = 0.349R + 0.686G + 0.168B |
22:42 | <@Alek> | tb = 0.272R + 0.534G + 0.131B |
22:42 | <@Alek> | can this be solved for R, G, and B? |
22:43 | <@Alek> | or at least approximately, given that tr, tg, and tb may be capped to 255 if they end up higher |
22:46 | <@ErikMesoy> | Alek: Depends on the amount of significant figures in the sepia tone. |
22:48 | <@ErikMesoy> | In your example I think you'd need 5 significant figures do to the appropriate. The sepia image probably does not have 5 significant digits of tone gradation. |
22:49 | <@ErikMesoy> | So in practice, no, in theory, yes with a lot of matrix algebra. |
22:51 | <@Alek> | Erik: 0-255 int. |
22:51 | <~Vornicus> | checking |
22:51 | <@Alek> | and I did mention that approximation is probably good enough. |
22:52 | <~Vornicus> | ...well that's a pretty wild result, the inverse is ...huge |
22:57 | | * Alek is curious to see. |
22:57 | <@ErikMesoy> | Alek: The way you'd approach the problem.... well in PRACTICE there are matrix solvers for this. :P But a theoretical way to approach the problem is to note that most of the numbers in your example have no common factors. |
22:58 | <@ErikMesoy> | Moreover, tr cannot be expressed as tg*K for any single constant K, because tr is not a flat percentage increase on tg. |
22:58 | <@Alek> | yeah, I already figured it wouldn't be simple or easy. |
22:59 | <~Vornicus> | 1272.7272731545.454545-3818.181818 |
22:59 | <~Vornicus> | -190.0826446619.8347107-520.661157 |
22:59 | <~Vornicus> | -1867.768595-5735.5371910057.85124 |
23:00 | <@ErikMesoy> | So given tr,tg,tb of sufficient precision there's a unique solution; rounded to int there's a range of possible solutions, and I'd have to do math to figure out how large. |
23:00 | <@Alek> | just, is there a small, large, or infinite amount of possible answers? and if it's sufficiently small, how close would at least one answer be to the original? that was my basic thought. |
23:00 | <@Alek> | trying to figure out if this would be worth trying. |
23:00 | <@ErikMesoy> | Depends entirely on the formula! |
23:01 | <@Alek> | not just rounded to int, truncated to int. hope that helps. |
23:01 | <@Alek> | aka round down |
23:01 | <@ErikMesoy> | How concrete are the numbers in your example? |
23:01 | <~Vornicus> | Give me a minute goodness |
23:01 | <&[R]> | IF you have the formula, you could make a translation table |
23:01 | <@Alek> | those are supposedly the specific multipliers for sepia transformation, so fairly concrete. |
23:01 | <&[R]> | Like a rainbow table is for hashes |
23:02 | <@Alek> | eew, tables. oh well, might work. >_> |
23:04 | <&[R]> | TBH, I'd make the table (or at least a mostly filled out (eg: for 00 10 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 and F0 rather than every byte value)) then use that to compare a potential algorythm based solution |
23:05 | <@Alek> | hmm. I figure that'd be a good starter project, just making a table for all the possible values. |
23:05 | <@ErikMesoy> | The necessary code is more complicated than I can dash off in five minutes late at night. :| |
23:06 | <@Alek> | nah, I can do the table code myself, that should be easy. |
23:06 | <@Alek> | outputting it will be the hard part. >_> |
23:07 | <@Alek> | to see it, that is. |
23:07 | <@Alek> | just to make sure it works, and see how much of a mess it is. |
23:07 | <@Alek> | thanks tons, guys. |
23:08 | <@ErikMesoy> | I will note that Vorn's inverse table is 11ths in the first line and 121ths in the next two. |
23:12 | | Emmy [Emmy@Nightstar-9p7hb1.direct-adsl.nl] has quit [Connection closed] |
23:28 | <&[R]> | https://zvirtualdesktop.com/ <-- of potential interest to some of you |
--- Log closed Mon May 18 00:00:17 2020 |