Post AsanZCPuSBVwpacCbg by foone@digipres.club
(DIR) More posts by foone@digipres.club
(DIR) Post #AsakJXIqjRnr729WFc by foone@digipres.club
2025-03-30T20:44:21Z
0 likes, 0 repeats
ewww. I'm hacking the model format from µLathe, and when you set the number of sides to 24, it saves 11 to the file.Why? because 24 is the 11th option in the "number of sides" dropdown.BAD FILE DESIGN. JUST WRITE THE DAMN NUMBER
(DIR) Post #AsakMnJBgG69cZrdp2 by foone@digipres.club
2025-03-30T20:44:58Z
0 likes, 0 repeats
22 years ago I worked on a system which handled all database serialization by just saving the GUI state and I still have the scars from it
(DIR) Post #AsakgQ4Nn8NNL5IVCy by foone@digipres.club
2025-03-30T20:48:27Z
0 likes, 0 repeats
it also uses a 16-bit integer to save which option in the render-mode dropdown is selected. You know, just in case the program ever expands to support more than 255 different ways to render surfaces.(the version I'm using supports 4)
(DIR) Post #AsalIAS2JDgRu4MQwy by womble@infosec.exchange
2025-03-30T20:55:03Z
0 likes, 0 repeats
@foone there are only two sizes of integer: ludicrously too big, and face-palmingly too small.
(DIR) Post #AsanM9chWs3KOzNUjA by foone@digipres.club
2025-03-30T21:08:41Z
0 likes, 0 repeats
this program also replaces the mouse cursor with a single pixel when you're moving points around, which is definitely a decision made by someone who didn't know what a 4k monitor would be in some terrible future
(DIR) Post #AsanMAAjULH66XIflw by foone@digipres.club
2025-03-30T21:18:26Z
0 likes, 0 repeats
okay, fun facts about points:1. it maxes out at 128 of them. 2. It always saves 128 of them, however, meaning µLathe 3D models are constant size. No matter how complex your model, it'll be 634 bytes, the same size as an empty model3. they're saved as screen pixels4. this means the max value for a point is 869x589, because that's the size of the (unresizable) client area in pixels
(DIR) Post #AsanZCPuSBVwpacCbg by foone@digipres.club
2025-03-30T21:20:48Z
0 likes, 0 repeats
I have discovered a security vulnerability in µLathe: The way it saves datafiles accidentally leaks what file the editor was working on before the current one, if the current file has fewer dots
(DIR) Post #AsanjkvkzHaIlkXs2q by foone@digipres.club
2025-03-30T21:22:43Z
0 likes, 0 repeats
the way this works is that it doesn't ever memset() the dots array, and it always saves the full array.So if you make a complex design in file 1, save it, and then do file->new then immediately file->save, file 2 will be written out with all the points of file 1 in the file, just marked as not used.
(DIR) Post #AsannYqbqzh6S7x5mq by foone@digipres.club
2025-03-30T21:23:25Z
0 likes, 0 repeats
an elaborate scenario where this time of accidental information disclosure actually matters in the slightest to anyone is left as an exercise to the reader
(DIR) Post #Asano3tsOtj8lEidgO by foone@digipres.club
2025-03-30T21:12:10Z
0 likes, 0 repeats
@frang I try not to, but unfortunately I'm stuck on a 4k laptop at the moment. my eyes hurt :(
(DIR) Post #AsanulLtlBjBGK1NTc by foone@digipres.club
2025-03-30T21:24:43Z
0 likes, 0 repeats
side note: the leaked dots in file 2 will be upside down. I'm not sure why this is the case, but I have some guesses.
(DIR) Post #AsaoEOas5LpCTBO1HE by foone@digipres.club
2025-03-30T21:28:18Z
0 likes, 0 repeats
making them upsidedown kinda turns the models inside out? For example, here's LAMP.LAT and my hacked BLANK.LAT
(DIR) Post #AsaoIInfZFr1exEep6 by foone@digipres.club
2025-03-30T21:04:33Z
0 likes, 0 repeats
@imsop ouch
(DIR) Post #AsaoMxVw8UO95eA4o4 by foone@digipres.club
2025-03-30T21:29:48Z
0 likes, 0 repeats
you can always leak your file back to yourself to re-invert (and thus de-invert) it. of course.
(DIR) Post #AsaoRpSVVr5XYSsbOC by foone@digipres.club
2025-03-30T21:30:42Z
0 likes, 0 repeats
origin is in the bottom-left of the window.
(DIR) Post #AsaoZ28QmVd2tdvNei by darkling@mstdn.social
2025-03-30T21:31:57Z
0 likes, 0 repeats
@foone And quite right too. (Why, yes, I *was* a mathematician, why do you ask?)
(DIR) Post #Asaoijmbrts6sILSDo by foone@digipres.club
2025-03-30T21:33:46Z
0 likes, 0 repeats
pixel coordinates are signed, which is A Choice. (fun fact: this is how Windows coordinates work anyway! this sometimes surprises developers more used to X, but negative positions are possible and valid on windows)
(DIR) Post #Asap36Ghyfo2P68JLU by foone@digipres.club
2025-03-30T21:37:24Z
0 likes, 0 repeats
negative coordinates confuse the lighting engine a little.
(DIR) Post #AsapMoOQ9G4Akt8j1U by developing_agent@mastodon.social
2025-03-30T21:40:56Z
0 likes, 0 repeats
@foone wait, then how does X represent locations outside the current viewable area? or does it just....not?
(DIR) Post #AsapUFK6Q7WwIzfHnM by foone@digipres.club
2025-03-30T21:42:20Z
0 likes, 0 repeats
@developing_agent it doesn't! the viewport for the design mode is fixed.
(DIR) Post #AsaqI3ifpw1KnQuVof by foone@digipres.club
2025-03-30T21:47:10Z
0 likes, 0 repeats
okay I understand the file enough for now ( https://gist.github.com/foone/ff2ddb567562c369fcee236d36dccc58 ) I can write an exporter/importer.but I don't think I can manage to actually do that right now. I'm amusingly at the functionality level where I can reverse engineer but not forwards engineer!
(DIR) Post #Asb0ZnGSknQkW3oIN6 by curtmack@floss.social
2025-03-30T23:46:30Z
0 likes, 0 repeats
@foone I have worked on a web app that, under the hood, has to pretend to be a 3270 terminal to connect to an AS/400 mainframe, then pretend to be a user pressing the down arrow key a certain number of times to select the correct option from a dropdown.
(DIR) Post #AsbFo2tevf0gMhOjlw by cks@mastodon.social
2025-03-31T02:37:10Z
0 likes, 0 repeats
@foone @developing_agent The position of windows on the X desktop (root window) can be negative or in general outside the root window area, but I don't know if this is possible for (widget) windows inside 'top level' windows that are on the root window.(Some window managers use this to store windows off-screen when you're flipping between virtual screens or desktops, and some apps create little 1x1 offscreen windows for Reasons. X is a peculiar place.)
(DIR) Post #AsbVLGoZhZWQOqJw3s by ppxl@social.tchncs.de
2025-03-31T05:31:10Z
0 likes, 0 repeats
@foone nice. Reminds me of the one time I worked at a company that issued SQL statements from the browser
(DIR) Post #AscaaSHA491rDaiBO4 by filmroellchen@chaos.social
2025-03-31T18:04:45Z
0 likes, 0 repeats
@foone funniest part for me so far is that μLathe 1.5.1 runs under Wine + Wayland perfectly fine. call that portability