00:10:36 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
00:26:50 -!- brandonson has quit (Ping timeout: 256 seconds).
00:28:36 -!- brandonson has joined.
00:29:46 -!- doesthiswork has joined.
01:26:49 -!- Phantom__Hoover has quit (Remote host closed the connection).
01:50:34 -!- LKoen_ has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”).
01:54:35 -!- variable has quit (Ping timeout: 276 seconds).
02:10:41 -!- sleffy has quit (Ping timeout: 248 seconds).
02:14:59 -!- HelloShitty972 has joined.
02:17:35 <zzo38> I can make up a Magic: the Gathering card: Target opponent draws X cards, and then you gain life equal to twice the number of cards in that opponent's hand.
02:25:36 -!- moei has quit (Read error: Connection reset by peer).
02:31:17 -!- HelloShitty972 has quit (Remote host closed the connection).
02:33:43 -!- moei has joined.
02:37:07 <zzo38> What should be the name and mana cost do you think?
03:33:27 -!- sleffy has joined.
06:09:14 <Cale> zzo38: heh, too bad there's no symbol for "X white phyrexian mana"
06:11:34 <Cale> (That seems like it would be super broken)
06:24:49 -!- doesthiswork has quit (Quit: Leaving.).
06:53:59 <Sgeo_> Isn't lifegain generally considered not good? And drawing cards to be very good? Maybe if you're about to lose this could buy a little time at a steep cost
06:55:45 <Cale> Sgeo_: Oh, I mean my variant of it which would use an arbitrary amount of phyrexian mana, so you could pay with all but one of your life and make your opponent draw a significant fraction of their deck, which they would lose to hand size restrictions.
06:56:07 -!- variable has joined.
06:56:49 <Cale> (and then you immediately gain more than that amount of life back after)
06:58:26 <zzo38> How good life gain is depends on the circumstances, like with other things. If you have many things that cost a lot of life points or that damage you or cause you to lose life, then is good to use them in a deck with a lot of life gain.
07:00:48 <zzo38> You don't win the game by gaining a lot of life points (unless you have a card that says you do), nor do you win the game by drawing a lot of cards (and if you run out because you draw too many, you lose), although depending what the card that you draw is it might help you to win. And if you are damaged by opponent's cards a lot, then having many life points may give you more time to set up what you need.
07:01:23 <zzo38> Regardless of how many cards you draw though, you can't use them if you do not have enough mana.
07:01:47 <zzo38> So, I think, lifegain is not always "not good" nor is drawing cards always "very good"; it depends on the circumstances.
07:02:05 <zzo38> (And, then, there are also triggers and replacement effects.)
07:05:25 <Cale> Actually, nevermind, that idea is not nearly as broken as I originally was thinking (for some reason when I wrote that I was thinking you'd make them draw as many cards as you were paying life, but it's half as much)
07:08:09 <zzo38> Yes, that is correct, it is half as much.
07:14:04 <zzo38> I thought the X cost should not be Phyrexian, although you may need more than one X in the cost possibly
07:15:24 <Sgeo_> WotC seems to be allergic to Y and Z costs
07:16:14 <Sgeo_> https://scryfall.com/card/btd/37 was printed with a Y cost. Errata'd to not have a Y cost.
07:16:57 <Sgeo_> Although I guess that's not the original printing. Maybe they reworded it just for that beatdown box thing?
07:17:37 <Sgeo_> Oh so they briefly changed it then changed it back https://magic.wizards.com/en/articles/archive/return-fireball-2004-01-26
07:19:40 <zzo38> OK, although this spell I proposed doesn't use Y and Z, only X
07:20:52 <Sgeo_> Sorry, that was a bit of a tangent on my part
07:22:40 <zzo38> (There are many things that WotC doesn't want to do that I still would want to do in custom cards, though.)
07:22:48 <zzo38> (That includes banding, too.)
07:29:20 -!- oerjan has quit (Quit: leaving).
07:31:31 <zzo38> They do have some article about if you make custom cards, and details about what they will do making the official ones, and some things I agree, such as that you shouldn't use the same name as an official card.
07:32:03 <zzo38> However, I do have two exceptions to that case, which are: [1] If the AST of the new card matches that of the official card with the same name. [2] If you are doing Un-cards.
07:33:02 <zzo38> (WotC seems to have the same two exceptions, sort of.)
07:38:49 -!- sleffy has quit (Ping timeout: 260 seconds).
07:42:51 -!- friendlyGoat has joined.
07:51:50 -!- Sgeo_ has quit (Read error: Connection reset by peer).
07:52:35 -!- friendlyGoat has quit (Quit: Leaving).
07:52:37 -!- Sgeo_ has joined.
08:32:09 -!- imode has quit (Ping timeout: 264 seconds).
08:57:58 -!- xkapastel has quit (Quit: Connection closed for inactivity).
09:18:35 -!- AnotherTest has joined.
10:04:28 -!- impomatic has joined.
11:05:02 -!- erkin has joined.
11:26:57 -!- erkin has quit (Quit: Ouch! Got SIGIRL, dying...).
11:40:31 -!- zseri has joined.
12:28:36 -!- zseri has quit (Quit: Leaving).
12:42:04 -!- SopaXorzTaker has joined.
13:00:32 -!- doesthiswork has joined.
13:47:25 -!- Melvar has quit (Quit: thunderstorm).
14:19:47 -!- xkapastel has joined.
14:34:41 -!- Melvar has joined.
14:39:51 -!- SopaXorzTaker has quit (Remote host closed the connection).
15:00:24 <esowiki> [[Joke language list]] https://esolangs.org/w/index.php?diff=54907&oldid=54887 * BoutonIA * (-60)
15:09:25 <esowiki> [[CopyPasta Language]] https://esolangs.org/w/index.php?diff=54908&oldid=54897 * BoutonIA * (-28)
15:59:27 -!- impomatic has quit (*.net *.split).
15:59:27 -!- ineiros has quit (*.net *.split).
15:59:27 -!- grumble has quit (*.net *.split).
15:59:27 -!- diginet has quit (*.net *.split).
15:59:27 -!- zzo38 has quit (*.net *.split).
15:59:27 -!- shachaf has quit (*.net *.split).
15:59:27 -!- Yurume_______ has quit (*.net *.split).
15:59:28 -!- moei has quit (*.net *.split).
15:59:28 -!- GeekDude has quit (*.net *.split).
15:59:28 -!- aloril has quit (*.net *.split).
15:59:28 -!- lambdabot has quit (*.net *.split).
15:59:28 -!- Bowserinator has quit (*.net *.split).
15:59:31 -!- Taneb has quit (*.net *.split).
15:59:31 -!- puckipedia has quit (*.net *.split).
15:59:31 -!- Lord_of_Life has quit (*.net *.split).
15:59:31 -!- erdic has quit (*.net *.split).
15:59:31 -!- clog has quit (*.net *.split).
15:59:31 -!- zemhill__ has quit (*.net *.split).
15:59:31 -!- danieljabailey has quit (*.net *.split).
15:59:31 -!- Cale has quit (*.net *.split).
15:59:31 -!- lynn has quit (*.net *.split).
15:59:31 -!- staffehn has quit (*.net *.split).
15:59:31 -!- dingbat has quit (*.net *.split).
15:59:31 -!- ^v has quit (*.net *.split).
15:59:31 -!- Lymia has quit (*.net *.split).
15:59:31 -!- pikhq has quit (*.net *.split).
15:59:31 -!- shikhin has quit (*.net *.split).
15:59:31 -!- xkapastel has quit (*.net *.split).
15:59:31 -!- sebbu has quit (*.net *.split).
15:59:32 -!- Deewiant_ has quit (*.net *.split).
15:59:32 -!- fizzie has quit (*.net *.split).
15:59:32 -!- optimus[m] has quit (*.net *.split).
15:59:33 -!- propumpkin has quit (*.net *.split).
15:59:34 -!- joast has quit (*.net *.split).
15:59:34 -!- moony1339 has quit (*.net *.split).
15:59:34 -!- \oren\_ has quit (*.net *.split).
15:59:35 -!- sprocklem has quit (*.net *.split).
15:59:35 -!- HackEso has quit (*.net *.split).
15:59:35 -!- FreeFull has quit (*.net *.split).
15:59:35 -!- j-bot has quit (*.net *.split).
15:59:35 -!- FireFly has quit (*.net *.split).
15:59:35 -!- digitalcold has quit (*.net *.split).
15:59:35 -!- Storkman has quit (*.net *.split).
15:59:36 -!- sparr has quit (*.net *.split).
15:59:36 -!- Sgeo_ has quit (*.net *.split).
15:59:37 -!- olsner has quit (*.net *.split).
15:59:37 -!- fractal has quit (*.net *.split).
15:59:37 -!- ocharles has quit (*.net *.split).
15:59:37 -!- jix has quit (*.net *.split).
15:59:37 -!- myname has quit (*.net *.split).
15:59:38 -!- fungot has quit (*.net *.split).
15:59:38 -!- zgrepc has quit (*.net *.split).
15:59:39 -!- alercah has quit (*.net *.split).
15:59:39 -!- lifthrasiir has quit (*.net *.split).
15:59:40 -!- mniip has quit (*.net *.split).
15:59:40 -!- AnotherTest has quit (*.net *.split).
15:59:41 -!- brandonson has quit (*.net *.split).
15:59:41 -!- int-e has quit (*.net *.split).
15:59:41 -!- MDude has quit (*.net *.split).
15:59:41 -!- variable has quit (*.net *.split).
15:59:41 -!- sftp has quit (*.net *.split).
15:59:41 -!- quintopia has quit (*.net *.split).
15:59:41 -!- vertrex has quit (*.net *.split).
15:59:41 -!- xa0 has quit (*.net *.split).
15:59:41 -!- heroux has quit (*.net *.split).
15:59:41 -!- izabera has quit (*.net *.split).
15:59:42 -!- doesthiswork has quit (*.net *.split).
15:59:42 -!- Gregor has quit (*.net *.split).
15:59:42 -!- uplime has quit (*.net *.split).
15:59:42 -!- ATMunn has quit (*.net *.split).
15:59:42 -!- newsham_ has quit (*.net *.split).
15:59:42 -!- copumpkin has quit (*.net *.split).
15:59:42 -!- Hooloovo0 has quit (*.net *.split).
15:59:42 -!- rdococ has quit (*.net *.split).
15:59:42 -!- Elronnd has quit (*.net *.split).
15:59:45 -!- Melvar has quit (*.net *.split).
15:59:45 -!- b_jonas has quit (*.net *.split).
15:59:45 -!- rodgort has quit (*.net *.split).
15:59:45 -!- relrod has quit (*.net *.split).
15:59:45 -!- catern has quit (*.net *.split).
15:59:45 -!- trn has quit (*.net *.split).
15:59:45 -!- APic has quit (*.net *.split).
15:59:45 -!- paul2520 has quit (*.net *.split).
15:59:45 -!- deltab has quit (*.net *.split).
16:25:51 -!- imode has joined.
16:25:51 -!- impomatic has joined.
16:25:51 -!- Melvar has joined.
16:25:51 -!- xkapastel has joined.
16:25:51 -!- doesthiswork has joined.
16:25:51 -!- AnotherTest has joined.
16:25:51 -!- Sgeo_ has joined.
16:25:51 -!- variable has joined.
16:25:51 -!- moei has joined.
16:25:51 -!- brandonson has joined.
16:25:51 -!- sprocklem has joined.
16:25:51 -!- propumpkin has joined.
16:25:51 -!- ocharles has joined.
16:25:51 -!- b_jonas has joined.
16:25:51 -!- int-e has joined.
16:25:51 -!- sebbu has joined.
16:25:51 -!- Storkman has joined.
16:25:51 -!- MDude has joined.
16:25:51 -!- rodgort has joined.
16:25:51 -!- sftp has joined.
16:25:52 -!- jix has joined.
16:25:52 -!- HackEso has joined.
16:25:52 -!- ineiros has joined.
16:25:52 -!- myname has joined.
16:25:52 -!- FreeFull has joined.
16:25:52 -!- optimus[m] has joined.
16:25:52 -!- copumpkin has joined.
16:25:52 -!- Deewiant_ has joined.
16:25:52 -!- zemhill__ has joined.
16:25:52 -!- danieljabailey has joined.
16:25:52 -!- Taneb has joined.
16:25:52 -!- Cale has joined.
16:25:52 -!- relrod has joined.
16:25:52 -!- grumble has joined.
16:25:52 -!- fractal has joined.
16:25:52 -!- j-bot has joined.
16:25:52 -!- catern has joined.
16:25:52 -!- lynn has joined.
16:25:52 -!- Gregor has joined.
16:25:52 -!- FireFly has joined.
16:25:52 -!- trn has joined.
16:25:52 -!- diginet has joined.
16:25:52 -!- staffehn has joined.
16:25:52 -!- zgrepc has joined.
16:25:52 -!- GeekDude has joined.
16:25:52 -!- mniip has joined.
16:25:52 -!- dingbat has joined.
16:25:52 -!- puckipedia has joined.
16:25:52 -!- ^v has joined.
16:25:52 -!- Elronnd has joined.
16:25:52 -!- aloril has joined.
16:25:52 -!- Lymia has joined.
16:25:52 -!- quintopia has joined.
16:25:52 -!- shachaf has joined.
16:25:52 -!- pikhq has joined.
16:25:52 -!- vertrex has joined.
16:25:52 -!- Yurume_______ has joined.
16:25:52 -!- xa0 has joined.
16:25:52 -!- lambdabot has joined.
16:25:52 -!- Bowserinator has joined.
16:25:52 -!- APic has joined.
16:25:52 -!- shikhin has joined.
16:25:52 -!- uplime has joined.
16:25:52 -!- Lord_of_Life has joined.
16:25:52 -!- paul2520 has joined.
16:25:52 -!- erdic has joined.
16:25:52 -!- clog has joined.
16:25:52 -!- heroux has joined.
16:25:52 -!- ATMunn has joined.
16:25:52 -!- joast has joined.
16:25:52 -!- fizzie has joined.
16:25:52 -!- digitalcold has joined.
16:25:52 -!- \oren\_ has joined.
16:25:52 -!- moony1339 has joined.
16:25:52 -!- sparr has joined.
16:25:52 -!- fungot has joined.
16:25:52 -!- Hooloovo0 has joined.
16:25:52 -!- newsham_ has joined.
16:25:52 -!- izabera has joined.
16:25:52 -!- rdococ has joined.
16:25:52 -!- alercah has joined.
16:25:52 -!- lifthrasiir has joined.
16:25:52 -!- deltab has joined.
16:28:49 -!- optimus[m] has quit (Ping timeout: 240 seconds).
16:30:14 -!- copumpkin has quit (Ping timeout: 276 seconds).
16:39:28 -!- Melvar has quit (Ping timeout: 268 seconds).
16:40:03 -!- Melvar has joined.
16:47:37 -!- Melvar has quit (Ping timeout: 260 seconds).
16:48:03 -!- Melvar has joined.
16:56:06 -!- SopaXorzTaker has joined.
17:00:34 -!- LKoen has joined.
17:13:12 -!- Melvar has quit (Ping timeout: 246 seconds).
17:13:36 -!- Melvar has joined.
17:17:21 -!- imode has quit (Ping timeout: 248 seconds).
17:35:40 -!- sleffy has joined.
17:44:51 -!- Melvar has quit (Ping timeout: 256 seconds).
17:45:18 -!- Melvar has joined.
17:58:37 -!- wob_jonas has joined.
18:04:27 -!- SopaXorzTaker has quit (Remote host closed the connection).
18:05:27 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
18:05:47 -!- wob_jonas has joined.
18:06:21 <wob_jonas> zzo38: you know how I asked for compositing modes where you choose both a Duff-Porter operator and an operator to combine the color values, which your ff-utils and svg can do? It seems that gimp-2.10 can now do some of that as operations between layers. It doesn't do all meaningful combinations, sadly, but still does some of the ones you couldn't h
18:08:47 -!- wob_jonas has quit (Client Quit).
18:12:38 -!- wob_jonas has joined.
18:12:44 <wob_jonas> Basically if you disable the compatibility layer composition setting, then you can open the layer properties menu to choose both the composite mode and, for the regular composite modes where it's meaningful, a duff-porter mode, the latter one called "composite mode".
18:14:29 <wob_jonas> As the duff-porter mode, you can choose Over, Atop, DstAtop, In; but you can't choose Out or DstOut or Xor even though sometimes it would be meaningful and different from the ones you can choose.
18:15:31 <wob_jonas> There's a special composition mode for doing the DstOut duff-porter composition, but you can't combine that with a value composition mode like multiply or screen. You need an extra layer if you want that.
18:16:28 <wob_jonas> Also, I learned of some useful value composition modes, most usefully the ones that gimp call "grain merge" and "grain extract", which add and subtract the color values respectively, but subtract or add 1/2 to the result.
18:17:02 <wob_jonas> Does SVG have that operation? I'd like to have it for fixing up some details in lossy compressed images.
18:22:20 <wob_jonas> In addition to the value composition mode and the duff-porter mode, there are two per-layer composition settings that tell which numeric color value model is used for the formula in the value composition operator and the mask/opacity/alpha composition operations.
18:24:24 <wob_jonas> fizzie: hmm, so the log webpage uses only ten different colors for highlighting nicks? that means I can brute-force it to find a nick that gives me the best color.
18:27:11 <wob_jonas> hmm, does this code determine the color solely from the nick, and it's case-sensitive? let me try to simulate that then
18:29:45 <fizzie> wob_jonas: Yes to both.
18:30:00 <wob_jonas> I want this green color with the class h3
18:30:53 <fizzie> It's the `h = 31 * h + c` hash function over the string, and then % 10.
18:32:13 <wob_jonas> fizzie: not quite, it's also truncated to 32-bit in each step
18:32:13 <wob_jonas> at least if I read the source correctly
18:32:26 <wob_jonas> that makes a difference for non-short nicks I think
18:35:12 <wob_jonas> yes, makes a difference for nicks as long as mine
18:36:49 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
18:38:19 -!- zzo38 has joined.
18:42:12 -!- wob_jonas has joined.
18:42:42 <wob_jonas> darn, there's a parity problem. I can only change to the five even-numbered colors by changing the case of the letters in my nick. I have to change something else.
18:42:52 <wob_jonas> zzo38: see the logs above about image composition
18:44:42 -!- wob_jonas has changed nick to lob_jonas.
18:45:00 <lob_jonas> let's see like this. now I should be .h3 saturated green
18:45:59 <lob_jonas> fizzie: is there a feature where users can explicitly override there color? is there already some standard for communicating this to other clients on irc?
18:46:52 -!- atslash has joined.
18:48:56 <fizzie> I don't think so, at least for the implementations of nick coloring I know of.
18:49:00 <zzo38> Can you show the equation of the composition modes you want? Currently I know neither whether SVG nor Farbfeld Utilities has it (I haven't checked), but I can add it.
18:49:17 <fizzie> There are avatars in IRCv3.
18:49:29 <lob_jonas> zzo38: I know that farbfeld utilities has it
18:49:53 <lob_jonas> oh wait, are you asking about the grain merge and grain extract?
18:49:58 <fizzie> https://ircv3.net/ "What We’re Working On" "Client avatars for display in graphical clients" I think it was that.
18:53:49 -!- augur has joined.
18:54:45 <lob_jonas> zzo38: the equations would be (s+d-32768) for grain merge; and (d-s+32768) for grain extract
18:54:52 <lob_jonas> see also https://docs.gimp.org/2.10/en/gimp-concepts-layer-modes.html
18:55:24 <lob_jonas> mind you, it might be possible to use other modes for a similar purpose
18:55:57 <lob_jonas> but these are at least simple to define and implement efficiently
18:58:00 -!- imode has joined.
18:58:13 <lob_jonas> fizzie: eww. I hate that project. but yes, that's the correct answer, thanks.
18:59:22 <lob_jonas> zzo38: I think ff-compose doesn't have grain merge and grain extract
18:59:52 <zzo38> OK, then I will add those modes.
19:01:00 -!- lob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
19:04:10 -!- lob_jonas has joined.
19:08:19 <lob_jonas> Another useful thing I learned about in gimp is the displace map filter. The inputs for this are a main image and two black-and-white images, and it moves the pixels of the main image such that each pixel is taken from close to the original location, with horz and vert displacements given by the values in the two masks at that pixel. This isn't new
19:08:19 <lob_jonas> in gimp 2.10, although the anti-aliasing settings for it are new.
19:09:09 -!- erkin has joined.
19:14:33 <lob_jonas> The hard light mode might be also usable for that svg composition thing, I think.
19:17:16 -!- imode has quit (Ping timeout: 245 seconds).
19:21:18 -!- AnotherTest has quit (Ping timeout: 256 seconds).
19:21:51 -!- erkin has quit (Quit: Ouch! Got SIGIRL, dying...).
19:23:45 -!- erkin has joined.
19:25:45 -!- variable has quit (Quit: /dev/null is full).
19:33:29 -!- optimus[m] has joined.
19:40:05 -!- variable has joined.
19:46:29 -!- copumpkin has joined.
19:48:08 -!- variable has quit (Ping timeout: 255 seconds).
19:51:44 <lob_jonas> zzo38: perhaps http://zzo38computer.org/fossil/farbfeld.ui/wiki?name=Frequently+Asked+Questions should tell how to create a new image with uniform color-alpha values of any size. this isn't trivial, because ff-chess will only create chessboards with square shaped fields, ff-gradient requires you to input the color twice (as two command-line argumen
19:52:04 <lob_jonas> Either that, or add a simple program/script that does this.
19:53:05 -!- variable has joined.
19:55:30 <lob_jonas> I know from practice that creating a solid image is a very common operation, because I keep doing that in gimp and ImageMagick.
19:59:23 <lob_jonas> like exec ff-gradient "$1" "$2" h "$3" "$3"
20:00:03 <lob_jonas> though as an alternative it might take the r g b a values as separate arguments
20:01:08 <zzo38> I could make up a separate program for that if you really need it, I suppose; then you can have them as separate arguments or as a single argument.
20:01:18 -!- augur has quit (Remote host closed the connection).
20:01:32 -!- variable has changed nick to function.
20:01:48 <lob_jonas> zzo38: that part is less important than not having to enter the color twice. even if gradient just had a mode for solid color taking only one color value, it would be better than now.
20:02:10 -!- augur has joined.
20:12:59 <zzo38> I decided to just add a separate program "ff-blank" to make a blank picture with a solid colour.
20:13:34 <lob_jonas> meanwhile I'm reading the ff-composite program, and will try to edit the wiki to describe it a bit better
20:16:50 -!- brandonson has quit (Ping timeout: 256 seconds).
20:17:41 <lob_jonas> The solid image is important because ff-compose starts with a background image, rather than a blank canvas of a specified size
20:18:09 -!- brandonson has joined.
20:20:36 <lob_jonas> Ah, apparently I also have to document ff-matrix
20:20:47 <zzo38> OK, do that too if you want to
20:21:06 <lob_jonas> But ff-composite first. That's more important because the program is complicated.
20:22:55 -!- fractal has changed nick to Guest15545.
20:25:53 -!- hppavilion[1] has joined.
20:28:34 -!- function has quit (Read error: Connection reset by peer).
20:31:00 <lob_jonas> nice, this ff-blank should work. and if you want a solid image the same size as another image, you can use (ff-blank $(ff-info <"$fname") "$color") . that is sometimes useful if you want to do a simple image color transformation with ff-composite.
20:31:49 <zzo38> I also have two comments about your external link webpages. My Farbfeld Utilities is listed on the green page even though it seem to me the brown page seems more appropriate (together with ImageMagick, GIMP, G'MIC, etc). Also, on the red page underneath "TV Tropes" you may wish to add All The Tropes too (at https://allthetropes.org/)
20:32:26 <zzo38> lob_jonas: Yes you can; I didn't think of that but of course you are correct; an example could be added if anyone wants that I suppose
20:33:24 <zzo38> (Also, GatheringMagic has a puzzle every week too; I look at them, and sometimes even manage to solve them.)
20:34:55 <zzo38> (O, and the forum for Magic: the Gathering is no longer available)
20:35:49 <lob_jonas> zzo38: yeah, I'm a bit behind maintaining that link collection
20:36:34 <lob_jonas> I recommend the GatheringMagic forum for M:tG instead, but I don't know if wizards employees read that
20:38:49 <lob_jonas> hmm, I wonder if you can cause undefined behavior in some of the ff-utils by putting a negative number in the width and height field of the images
20:39:10 <lob_jonas> or with an overflow in addition or subtraction of coordinates
20:40:21 -!- AnotherTest has joined.
20:40:31 <lob_jonas> in the process function of ff-composite.c in particular
20:40:39 <zzo38> I some cases it checks, but I do not remember about all of the cases
20:40:57 <lob_jonas> give very large or negative coordinates, then cause either an integer overflow, or indexing out of the array
20:42:05 <lob_jonas> heck, even simpler. in ff-composite.c:main, width*height can overflow an integer
20:45:00 -!- variable has joined.
20:51:36 -!- imode has joined.
20:52:18 <lob_jonas> zzo48: in ff-composite.c:process, even if all the sizes and coordinates are small, I don't understand how the code works when the source image is partly outside the dest image. it doesn't seem right.
20:52:58 <lob_jonas> in particular, I don't see a code path that discards some of the pixels of the source image.
20:53:25 <zzo38> If it is wrong, I can fix it. It is possible I made a mistake
20:54:10 <lob_jonas> you discard pixels in two separate short loops of fgetc
20:55:02 <lob_jonas> let me try to understand how those calculations work
21:04:21 -!- augur has quit (Ping timeout: 245 seconds).
21:06:44 -!- lob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
21:08:49 -!- hppavilion[1] has quit (Ping timeout: 248 seconds).
21:09:26 -!- lob_jonas has joined.
21:09:40 <lob_jonas> zzo38: ok, I think the calculations are correct
21:10:14 <lob_jonas> for small coordinates and small positive image sizes at least
21:15:21 -!- imode has quit (Ping timeout: 264 seconds).
21:16:17 -!- lob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
21:17:13 -!- lob_jonas has joined.
21:17:18 <lob_jonas> zzo38: in ff-composite:process, in the if (mode&64) branch, is it possible that you are using r,g,b,a uninitialized for some mode parameters?
21:18:06 -!- hppavilion[1] has joined.
21:19:50 <lob_jonas> if the big switch (mode&63) falls through that is
21:21:25 <lob_jonas> and isn't that something a compiler would notice?
21:22:06 <zzo38> I got no compiler warning
21:22:51 <lob_jonas> ok, but still, aren't you sometimes using them for comparison uninitialized, which would be undefined behavior in C?
21:23:00 <lob_jonas> or maybe it wouldn't be undefined behavior
21:23:12 <lob_jonas> still, it could at least cause ugly nondeterminism
21:23:57 <zzo38> Although, you aren't supposed to use numbers that aren't one of the choices. (I could add a check for that, although I think it unnecessary)
21:24:25 <lob_jonas> sure, but you could just zero-initialize the variables
21:24:33 <lob_jonas> would be simpler than to check anything
21:25:10 <lob_jonas> that would be my coding style, mind you
21:26:09 <lob_jonas> I initialize everything unless initializing would cost so much that not initializing is a useful optimization, since in most cases either the initialization is useful or the compiler can optimize it away because it can prove it unnecessary
21:27:26 <lob_jonas> But I do it the functional programming style, that is, I declare an initialize all the variables in the innermost block possible, unless declaring it in a larger scope is an optimization because reinitializing is expensive (which can happen for allocating large buffers)
21:27:54 <lob_jonas> This is useful for more determinism, even if not initializing wouldn't cause ub
21:28:02 <lob_jonas> but I do know that this isn't your programming style
21:29:19 <lob_jonas> in this case putting `default: ` at the start of the switch block would work, and would look more like your programming style
21:29:28 -!- xkapastel has quit (Quit: Connection closed for inactivity).
21:30:28 -!- lob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
21:30:52 -!- lob_jonas has joined.
21:32:45 <lob_jonas> so bit 6 of mode selects a regular composition, and then bits 8, 9, 10, 11 choose a Duff-Porter operation and bit 7 does some sort of magic
21:36:53 <lob_jonas> Nope, only bits 8,9,10 choose a Duff-Porter operation. Bit 11 is ignored I think.
21:37:12 <lob_jonas> which is strange because there's supposed to be 12 Duff-Porter modes
21:37:37 <lob_jonas> but I think that's only because some of them involve flipping the color composition mode, which you don't do here
21:37:57 <zzo38> Yes, I think you are correct.
21:42:09 -!- hppavilion[1] has quit (Quit: HRII'FHALMA MNAHN'K'YARNAK NGAH NILGH'RI'BTHNKNYTH).
21:56:27 -!- Phantom_Hoover has joined.
21:56:28 -!- Phantom_Hoover has quit (Changing host).
21:56:28 -!- Phantom_Hoover has joined.
21:58:23 -!- AnotherTest has quit (Ping timeout: 276 seconds).
21:59:13 -!- lob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
21:59:41 -!- lob_jonas has joined.
21:59:41 -!- lob_jonas has quit (Client Quit).
22:05:14 -!- wob_jonas has joined.
22:07:24 <wob_jonas> In ff-composite.c, the color values in data are supposed to contain ordinary color values, not ones premultiplied by alpha, right?
22:08:10 <zzo38> If there is confusing stuff, then that should be fixed by adding comments or whatever, I suppose
22:09:51 <wob_jonas> A=(long long)(z); A=((A>65535?65535:A<0?0:A)*data2.a*data[k].a+(mode&512?0:data2.a*(65535LL-data[k].a)*s)+(mode&1024?0:data[k].a*(65535LL-data2.a)*d))/4294836225;
22:10:09 <wob_jonas> and then the value of A is clamped and written into the color component of data[k]
22:11:39 <zzo38> If that is wrong, then perhaps I could fix it
22:14:33 <zzo38> The question is, if you try it, does it do what is expected?
22:16:58 <wob_jonas> shouldn't it be something like A=(long long)(z); A=A>65535?65535:A<0?0:A; A=(A*((long long)data2.a*data[k].a+(65535LL-data2.a)*(65535-data[k].a)) + (mode*512?A:s)*data2.a*(65535-data[k].a) + (mode*1024?A:s)*(65535-data2.a)*data[k].a)/4294836225;
22:17:26 <wob_jonas> so that the sum of the weights of the three color values used (A, s, d) is always 65535*65535
22:17:51 <wob_jonas> maybe that's not the right formula, but I can't see how the current one can be right
22:18:15 <wob_jonas> wouldn't the current one darken pixels when the source and destination are both partly transparent?
22:18:25 <zzo38> I can fix it if necessary. Did you test it?
22:19:02 <wob_jonas> no, that isn't the right formula either
22:19:24 <wob_jonas> the problem is that the right formula for non-premultiplied alpha is more expensive than any of those, because it involves a division by a variable
22:19:47 <wob_jonas> doesn't it? isn't that how general alpha-blending works?
22:23:16 <wob_jonas> look at https://www.cairographics.org/operators/ , it gives the formulas with non-premultiplied alpha (even though cairo actually uses premultiplied alpha), you can see the division by the resulting alpha value
22:24:59 <wob_jonas> you need the divison because if the source is 1/2 opaque and the destination is 1/2 opaque, then for a plain Over operator (alpha blending), the resulting pixel gets its color 1/3 part from the dest pixel's color, and 2/3 part from the src pixel's color, but the weights for the colors must add up to 1 so the colors aren't darkened
22:26:17 <wob_jonas> that division is there in the more common half of the Duff-Porter modes, although there are apparently also strange Duff-Porter modes that don't do alpha blending
22:27:36 <wob_jonas> That page doesn't tell how the combination of Duff-Porter modes with color composition modes work, but you definitely can't get away without the expensive division if the representation isn't pre-multiplied
22:27:48 <wob_jonas> The weights of the colors must add up
22:28:23 <wob_jonas> except in the case when both the source and destination are completely transparent
22:28:58 <wob_jonas> does that make sense? or am I just tired and stupid?
22:30:49 -!- shikhin has quit (Ping timeout: 265 seconds).
22:32:18 -!- shikhin has joined.
22:34:59 -!- sleffy has quit (Ping timeout: 256 seconds).
22:35:31 <zzo38> I don't know; sometimes I am just tired and stupid too; everyone will make mistakes.
22:36:08 <wob_jonas> let me try to write up how I think it's supposed to work
22:39:39 -!- erkin has quit (Quit: Ouch! Got SIGIRL, dying...).
22:55:38 -!- xkapastel has joined.
22:58:44 -!- LKoen has quit (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”).
23:00:02 -!- danieljabailey has quit (Quit: ZNC 1.6.5+deb2build2 - http://znc.in).
23:00:19 -!- danieljabailey has joined.
23:11:22 -!- Phantom_Hoover has quit (Remote host closed the connection).
23:14:58 -!- imode has joined.
23:29:03 -!- augur has joined.
23:47:28 -!- wob_jonas has quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client).
23:52:07 -!- wob_jonas has joined.
23:53:43 -!- wob_jonas has quit (Client Quit).
23:54:45 -!- wob_jonas has joined.
23:57:04 -!- brandonson has quit (Ping timeout: 260 seconds).
23:58:50 -!- brandonson has joined.