2023-01-28 00:00:10 You use small handles to dial bigger number such as 32345 and then shift the caret to add it starting from fourth counter, 2023-01-28 00:00:40 then you get 32345000 from first rotation and so on, then move one place to the right and do it again... 2023-01-28 00:00:53 or you could multiply starting from lower order digit 2023-01-28 00:05:49 Division is done the same way, first you dial the dividend, and rotate the handle once to put it onto the display, then dial the divisor and rotate the handle opposite way substracting it until you hear a bell, then you make one rotation other way around to undo the last substraction and move the caret one position to the left, and repeat until you get the quotient with required precision. There are movable decimal points in case if you want to 2023-01-28 00:05:49 with fractions 2023-01-28 00:06:19 after that you can rotate handles on the sides to clear the display 2023-01-28 00:18:36 https://raritetus.cdnvideo.ru/storage/blog/%D0%90%D1%80%D0%B8%D1%84%D0%BC%D0%BE%D0%BC%D0%B5%D1%82%D1%80%20%D0%A4%D0%B5%D0%BB%D0%B8%D0%BA%D1%81/15%D0%9A%D1%83%D1%80%D1%81%D0%BA%20%D0%A4%D0%B5%D0%BB%D0%B8%D0%BA%D1%81.jpg 2023-01-28 03:17:47 If ¢ was part of ASCII, what do you think it would be used for? 2023-01-28 05:23:50 KipIngram: But yeah, crc is correct, X (and win32) used to make you redraw windows when they were uncovered. The aim was to keep memory as low as possible, i.e. nothing extra is stored other than display buffer 2023-01-28 05:24:02 This was crucial in the 90's, and desirable in 2000's 2023-01-28 05:24:25 Nowadays it's considered unnecessary with more shared video RAM and GPU RAM 2023-01-28 05:25:14 But it makes sense to me: you need to draw extremely fast to be performant anyway, might as well redraw when window is displayed to reduce memory usage 2023-01-28 05:26:04 X I think doesn't do this with a "compositor" I think, and win32 likewise doesn't do this anymore because of dwm.exe or whatever it's called 2023-01-28 05:26:11 which does the same thing 2023-01-28 05:31:08 The advantage of this event-driven model on both is that with compositors we have been able to add more buffering automatically without changing any of the applications. The protocol/API remains the same. 2023-01-28 05:31:36 The disadvantage is modern apps are developed assuming everything's buffered, and they perform like garbage on systems where compositing is disabled 2023-01-28 05:32:48 There was actually a small buffer used for drawing over the screen, it was used to remember what the display buffer looked like behind the cursor, and also behind tooltip and menu sliding animations 2023-01-28 05:33:07 Which is why the cursor disappeared on Windows 98 when a sliding animation happened! 2023-01-28 05:33:45 I have always turned this animation crap off, I find it distracting and slow 2023-01-28 05:34:56 Stalevar: Beginning of line in regex, as $ is used for end 2023-01-28 05:35:13 Mind you ^ makes more visual sense as beginning of line, so maybe not. 2023-01-28 05:36:52 I find it interesting how currency symbols tend to be letters with a strike through 2023-01-28 05:37:50 Like £ is a cursive L with a line, named after 'libra' the latin word for 'pound' in weight 2023-01-28 05:38:03 Commonly used across europe as the name for currencies actually 2023-01-28 05:39:03 Same root as the word for justice, the concept of weight is tied to that of balance, which has been used to represent justice (and gods of justice), and then later freedom 2023-01-28 05:39:10 For which this IRC network is named 2023-01-28 05:42:17 The $ is an S with a line, apparently based on abbreviation of 'peso' written PS, the characters merged to become something like $ 2023-01-28 05:42:54 peso is from the spanish phrase 'peso de ocho', "pieces of eight", a name for the spanish dollar 2023-01-28 05:44:17 And that's so-named because the spanish dollar coin was worth eight reales, and could legally be cut into 8 pieces each worth one reale. 2023-01-28 05:46:29 I'm interested if anyone knows where the practice of $ marking the end of something started in computing history 2023-01-28 05:52:46 This is also where the american "quarter" comes from, they used to also cut dollars into quarter pieces (also called 'two bits', because a quarter was two 1/8th bits) 2023-01-28 10:36:15 veltas: Catching up; good morning and thanks for your time. 2023-01-28 10:37:23 Yes, I was thinking last night that for a flashing cursor I should have a small rectangle over on the GPU that I copy the screen char to before I paint the cursor, and then restore it when the cursor goes off. 2023-01-28 10:37:56 ... and then someone will want an underscore or a beam or a ... 2023-01-28 10:38:01 That raised some interesting issues, though - what if my app updates that part of the screen while the cursor is present. Not insurmountable or anything, but if I did it sloppily I could get some strange artifacts. 2023-01-28 10:39:54 My first thought was that characters don't actually touch each other, so there should be room for a slim (vertical or horizontal) cursor somewhere in the cell that I knew would be "background," but in fact there are some chars that touch the edges of the character box. 2023-01-28 10:40:47 Anyway, my reading yesterday indicated that the worst thing you could do would be to involve the CPU with saving the character pixels when you wanted to put a cursor over them. 2023-01-28 10:40:56 But it seems straightforward to keep it all on the GPU. 2023-01-28 10:41:31 And if my cursor is "relevant" it means I'm interacting with the application, and that means things aren't moving very fast anyway. 2023-01-28 10:43:49 until someone automates the interface (maybe for testing) and then it goes fasst 2023-01-28 10:45:51 :-) Sure - we can create any kind of situation we want. 2023-01-28 10:46:25 but uh you probably need it working, first 2023-01-28 10:46:31 Once this event loop exists, recording event streams for later playback becomes easy. 2023-01-28 10:46:47 Could record them time-stamped if I wanted to, so they played back in real time if that was desirable. 2023-01-28 10:47:51 I've already got microsecond resolution time available in my system. 2023-01-28 10:48:36 I got a little sidetracked from the "cursor thinking" last night; got off onto utf8 related issues instead. 2023-01-28 10:49:15 I suspect the "cleanest" way of dealing with those will be to select the characters I'm interested in and put them in the 128-255 range and use a single byte for everything. 2023-01-28 10:49:37 The keyboard input routine would map the incoming multi-byte streams and substitute whatever byte value I'd chosen. 2023-01-28 10:49:49 And the font map would cover displaying the right thing. 2023-01-28 10:50:00 The alternative would be some nasty "tree" of font images. 2023-01-28 10:50:34 And it would probably turn out that the utf8 chars I'm interested in will turn out to be all spread out such that that tree got big. 2023-01-28 10:50:49 Or at least I can't know in advance that that's NOT the case. 2023-01-28 10:51:38 The keyboard input, though, is inherently "slow," since I have to be sitting there hitting the keys. There's time there to search a list for the matching byte sequence. 2023-01-28 10:52:09 So that's one manageable table; I get the utf8 sequence the way I'm getting it now, search the list for that sequence, and there is the byte I want to replace it with. 2023-01-28 10:52:30 That covers utf8 and function keys, cursor keys, and so on. 2023-01-28 10:53:20 So it looks like I may be choosing my own custom character layout for those upper character codes after all. 2023-01-28 10:53:41 Which of course crushes portability in certain ways. 2023-01-28 10:53:54 But that's never been as big a deal to me as it has a lot of other people anyway. 2023-01-28 10:54:24 The "portability" I'm interested in is the portability of the system across hardware platforms - not portability across the populations of possible users. 2023-01-28 10:54:56 Anyway, such portability isn't "lost" - it would just require some sort of "export capability," where I put the orignal codes back into things. 2023-01-28 10:56:27 So what exactly do "shaders" do in the GPU? Would that perchance have to do with (this is me trying to be literal) adjusting the *shade* of rendered data? 2023-01-28 10:56:51 Like might I use a shader to adjust the color of displayed text, without having to send new specifically colored data over? 2023-01-28 10:57:34 I.e., can I have just one font table, white, and then adjust the displayed color by doing something on the GPU to that data as I copy it to the screen? 2023-01-28 10:58:16 Or will I have to have a font rectangle in every color I want to be able to display? 2023-01-28 11:02:34 veltas: Everything you said up there makes total sense. Saving memory seems like the obvious reason to require that the app be able to redraw portions of the screen. I still think it would be preferable to allow the app to draw *more* than the requested region, though - a "dumb" app might be able to draw only its full screen, and I'd like to think that would "work"; that it might just be less efficient. 2023-01-28 11:03:05 all my toy x11 apps redraw the whole thing 2023-01-28 11:03:17 Ok, so that is how it is, then - good. 2023-01-28 11:03:46 And I'm still sorely tempted to let the system do more of the saving for text work, since that involves much smaller amounts of RAM. 2023-01-28 11:04:33 Although, the application level certainly is going to have to be ABLE to redraw any part of the display. So, I really could go either way. 2023-01-28 11:05:54 Also, if I did implement these system-saved "text canvases," then an application could find out what was ON the screen at a given location; that would be easy information to come up with. 2023-01-28 11:06:52 I think I've just not thought about it all enough; more ponderin required. 2023-01-28 11:08:24 Somewhere in all of this I'm picturing a display as being an array of pointers; each pointer pointing to an array of characters along with information about where those characters begin in the canvas. 2023-01-28 11:09:22 Probably one character string per line, though if the canvas were really wide it might make sense to allow more than one, in various spots along the line. 2023-01-28 11:10:00 The display will be a "viewport" onto that canvas. 2023-01-28 11:11:17 veltas: This is the kind of thinking that makes wrapping look like a complicating factor. The easiest thing to do would be to just let that viewport show you whatever pieces of lines it happened to show you. 2023-01-28 11:16:12 Of course it would be simple to produce a "wrapped" viewport. 2023-01-28 11:16:50 KipIngram: The cursor stuff happens on a different level, it's transperant to applications 2023-01-28 11:17:06 Yes, I figured that would be the case. 2023-01-28 11:17:08 The buffer I was talking about was a system-wide thing on Windows 98, ye olde days 2023-01-28 11:17:17 I want as much "transparent to the application" as possible. 2023-01-28 11:17:34 One of my primary goals would be to reduce application programming to the simplest possible level. 2023-01-28 11:18:44 Much the way working with the standard console does. 2023-01-28 11:22:04 Exactly 2023-01-28 11:24:14 It just occurred to me that one way to handle mixed text and images (in a console type environment) would be to send an image over to the GPU as a surface, and in the app associate it with an otherwise unused character code. Then when you wrote that code at some location, the result would be for that image to be displayed, upper left corner anchored on that cell. 2023-01-28 11:24:25 Maybe you reserve several character values for that. 2023-01-28 11:25:05 the point being that what's going on here is an association of character codes to rectangular pixel blocks. Nothing says those blocks HAVE to just be one char wide and high. 2023-01-28 11:26:33 But it could also just be a separate call, not blended with character output. 2023-01-28 11:45:08 Ok, cursory reading seems to indicate that adjustments made to text to be displayed (color at least) might be done by applying a shader. 2023-01-28 11:45:38 But I'm not so sure about attributes. I suppose I could try to do some sort of transform to create italics, but I suspect that's normally done with a separate font table. 2023-01-28 11:46:19 So maybe I select a specific character table texture to get the desired attributes, and then a shader to adjust color. 2023-01-28 11:58:18 For color what it feels like I'd LIKE to do is to be able to set a mask word, and each pixel would have that mask applied before copying it to the screen. The problem, though is that will also apply to background pixels, and they might then wind up becoming non-transparent. 2023-01-28 11:59:04 I suppose I could also then change the transparent color, to the new masked value. But that's creeping complexity. 2023-01-28 12:32:55 Oh, hmmm. Looks like SDL2 doesn't directly support shaders. 2023-01-28 12:33:05 To get that you have to step into OpenGL. 2023-01-28 12:33:19 Which also brings native 3D transformation capability. 2023-01-28 13:11:06 Interesting information here: 2023-01-28 13:11:08 https://stackoverflow.com/questions/12506979/what-is-the-point-of-an-sdl2-texture 2023-01-28 13:17:22 This is all complicated by the fact that SDL capability has been extended a lot over the years, but the stuff I find is a mixture of recent stuff and quite old stuff. 2023-01-28 13:24:53 Ok, looks like this image of all the chars is known in the business as a "spritesheet." 2023-01-28 13:27:34 it's also how they do bmp font files 2023-01-28 14:03:07 Aha! 2023-01-28 14:03:20 Figured out how to control the color. SDL_SetTextureColorMod(). 2023-01-28 14:04:43 Couldn't be simpler - just pass the texture I've associated with the screen and the RGB components of the desired color. 2023-01-28 14:04:49 And it "just works." 2023-01-28 14:05:29 Good - I think I've got everything I need for setting up a console now. 2023-01-28 14:07:18 I want to work out a little process for capturing images for my own font files directly from a console window. I figure that'll just be a program that prints the 256 characters I want in a 16x16 block. I'll set terminator to give me whatever font size and attribute I'm interested in, then just screen copy that block, pull it into Gimp, and crop it down precisely. Save it as a bmp. 2023-01-28 14:08:02 Probably want to learn how to draw lines, so I can put borders around my windows. 2023-01-28 14:09:08 Oh, the little program will need to set the background to my "magic color" (transparent) using an appropriate escape sequence. 2023-01-28 14:45:47 I have kind of a transpiler, it's a bit rudimentary for now, but it's a start :D 2023-01-28 14:46:02 https://termbin.com/e8ti 2023-01-28 14:46:32 0 1 1000000 range '+ do.list now this takes 0.55 seconds 2023-01-28 14:46:41 but the transpiler sucks a bit 2023-01-28 14:47:27 words are defined with a string of code, from that I create a function so the interpreter holds both the code and the function 2023-01-28 14:47:41 word '+', 'push @stack, $one + $two', qw/one two/; 2023-01-28 14:47:57 for example, the last argument names the vars the word uses 2023-01-28 14:48:59 this creates a function with that code but also stores the code, the transpiler just reads a bunch of words and takes that code concatenating it with semicolons xD 2023-01-28 14:49:32 there are also macros, which are just immediate words that return code as a string 2023-01-28 14:50:30 still for now I don't have too clear how I want to do the stuff, but I hope I get a better transpiler with the time, I was always afraid of making one 2023-01-28 14:51:42 vms14: Nice. 2023-01-28 14:51:53 How long did that take before? Refresh my memory. 2023-01-28 14:52:21 3 seconds 2023-01-28 14:52:41 Ok, that's a nice improvement. I guess you're still interpreting Perl somewhere in there? 2023-01-28 14:53:01 I generate code then just use the perl eval function 2023-01-28 14:53:06 Yes. 2023-01-28 14:53:21 my $code = traverse_words { my ($word, $list) = @_; push @$list, compile_element ($word) . ';' } undef, []; 2023-01-28 14:53:21 eval def_args . "@$code" or print $@; 2023-01-28 14:53:28 So you took it as far as you could while still regarding perl as your "vm." 2023-01-28 14:53:44 well actually I was going to try with php xD 2023-01-28 14:53:56 but I don't know php so I wanted a prototype in perl 2023-01-28 14:54:12 and I have to stay playing with perl until it gets a better shape 2023-01-28 14:54:14 You won't find php too hard to learn. 2023-01-28 14:54:20 It's fairly straightforward. 2023-01-28 14:54:47 yeah, but I feel comfortable with perl so it makes more sense to try new stuff there instead 2023-01-28 14:54:56 Absolutely. 2023-01-28 14:55:16 still in php making interpreters don't make sense, so it's fine to have a transpiler 2023-01-28 14:55:33 I don't have real interest in php, but I'd like to get a job xD 2023-01-28 14:56:10 and to get a job as a junior programmer there's only java python javascript or php 2023-01-28 14:56:38 I already know js, but they want me to learn react so meh, still with php I have to learn laravel anyways 2023-01-28 14:57:02 but also a lot of free hostings only offer php, having a transpiler to php sounds like it could end being useful 2023-01-28 14:57:43 anyways once I get the idea clear it could transpile to any lang 2023-01-28 14:58:07 but it's a bit sad cause I have to put the stack on the target language 2023-01-28 14:58:40 not sure if I can avoid it easily 2023-01-28 15:03:13 for now I'll stay adding a stack on the host lang, but I'd like to avoid that in the end 2023-01-28 15:03:24 anyways now I have other stuff to focus on 2023-01-28 15:03:44 see you KipIngram, hope you're doing fine :D 2023-01-28 15:23:31 Well, that's annoying. When I pass SDL_WINDOW_BORDERLESS to SDL_CreateWindow(), it works - I get a borderless window with no title bar. 2023-01-28 15:23:47 But... it slams it up into the top left of the screen, regardless of where I tell it I want it. 2023-01-28 15:24:56 SDL_WINDOWPOS_CENTERED 2023-01-28 15:26:20 Yeah, that's what I'm doing. 2023-01-28 15:26:25 And it works, otherwise. 2023-01-28 15:26:32 I pass that to both row and column. 2023-01-28 15:27:21 Furthermore, if I remove the borderless flag, it creates the window centered. But if I then call SDL_SetWindowBordered(window, 0), it removes the titlebar and MOVES IT TO THE TOP LEFT. 2023-01-28 15:27:32 Even though it was initially where I wanted it. 2023-01-28 15:27:35 That strikes me as a bug. 2023-01-28 15:28:48 If I open it in the center and then call SetWindowBordered but with a true flag, it does nothing - leaves it in the center. 2023-01-28 15:29:20 I do not like tons of titlebars. 2023-01-28 15:29:28 Spoils the "console look." 2023-01-28 15:37:40 Anybody here use terminator? If so do you know how to change the thickness of the panel dividers? 2023-01-28 15:38:02 Mine seems to be several pixels, and I'd like to thin it down some if I can figure out how. 2023-01-28 15:38:15 I could swear that used to be a config option, but I can't find it anywhere now. 2023-01-28 15:38:55 Ah, I did find it. 2023-01-28 15:39:20 I like 2. 2023-01-28 15:44:56 KipIngram: Does SDL_SetWindowPosition() work? 2023-01-28 15:45:01 After creating the window 2023-01-28 15:58:41 veltas: do you have the link to the size comparison you showed before where Z80 was more compact than 6502? 2023-01-28 16:28:10 MrMobius: https://web.eece.maine.edu/~vweaver/papers/iccd09/iccd09_density.pdf 2023-01-28 16:28:34 Haven't tried that yet. 2023-01-28 16:33:04 No, it doesn't - it doesn't seem to do anything at all, even with the titlebar on. 2023-01-28 16:33:21 The window pops up where it pops up, which seems to be centered, regardless of what I tweak. 2023-01-28 16:34:26 Window size control works, though. 2023-01-28 16:34:40 KipIngram: Well it might be because the window manager is in charge of drawing the frame, as well as positioning. Could be a bug in the window manager? 2023-01-28 16:35:15 Could be, I guess, though are you talking about something that's used system-wide? I don't notice any general issues with the system. 2023-01-28 16:35:35 I can certainly resize windows and drag them around. 2023-01-28 16:35:50 But there definitely seems to be SOMETHING wrong. 2023-01-28 16:37:24 What window manager do you use? 2023-01-28 16:38:19 How do I check that? I'm using Gnome. 2023-01-28 16:38:30 So you're using the gnome window manager 2023-01-28 16:38:53 Ok. 2023-01-28 16:39:04 I would guess it's a bug in the version of SDL you have 2023-01-28 16:39:08 Or a bug in your code 2023-01-28 16:39:29 I don't see how I could have a bug in my code - it's about as simple as it gets. There's nothing fancy going on here. 2023-01-28 16:39:35 But... I guess you never know. 2023-01-28 16:39:40 Could try valgrind 2023-01-28 16:39:46 What OS/distro are you using? 2023-01-28 16:47:37 Fedora 36. 2023-01-28 16:47:53 Looks like the font I like and use in my console is 10 wide and 20 high. 2023-01-28 16:48:11 I use Go Mono 12. 2023-01-28 16:49:10 https://imgur.com/a/37WwQ6u 2023-01-28 16:57:34 So what I'll do is design my character set (upper half), and run off regular, bold, italic, and perhaps bold italic in a handful of sizes. 2023-01-28 16:57:47 Trim them properly with Gimp, and I'll be all set. 2023-01-28 16:58:12 I feel fairly confident there will be room to send them all over at startup. 2023-01-28 16:59:53 I'll allocate some of the high half characters to call out color and attribute changes, so that strings can be "self defining" for those things. 2023-01-28 17:00:24 The size selection will be global of course. 2023-01-28 17:32:20 veltas: thanks! 2023-01-28 21:10:27 https://i.imgur.com/FdKs0Pr.png haha 2023-01-28 21:11:03 I'm not checking for stack underflow :/ 2023-01-28 21:11:21 I wonder if I can keep track of the stack elements at compile time 2023-01-28 21:12:21 I have both immediate words and macros 2023-01-28 21:13:00 macros are of two types, the ones which generate a string of code and the ones which generate usually a list and it gets converted to code 2023-01-28 21:13:21 https://termbin.com/2f6l 2023-01-28 21:13:52 I'll also have the comma for trigger compile time execution, I guess in forth is [ and ] 2023-01-28 21:14:50 here [ will be a macro that generates code to build a perl arraay and push it on the stack and ( will be an immediate word that builds a list and pushes it directly 2023-01-28 21:16:48 same for ' and ` with strings 2023-01-28 21:17:22 'word pushes "word" on the stack and `word generates code instead 2023-01-28 22:12:36 maw dave0 2023-01-28 22:19:38 hi vms14 2023-01-28 22:39:00 I think now the lang is even harder to use 2023-01-28 22:39:12 as you have to be aware of compile time stuff 2023-01-28 22:40:26 for example do.list gets executed at compile time and needs the code at that time 2023-01-28 22:40:29 [ oh my cat ] ( . ) do.list 2023-01-28 22:40:41 ( ) is like [ ] but at compile time xD 2023-01-28 22:40:55 [ oh my cat ] [ . ] do.list will fail 2023-01-28 23:57:58 Most systems don't try to do compile time stack balance checks. 2023-01-28 23:58:16 Most just check it after each executed word, or after each executed line, for overflow or underflow. 2023-01-28 23:58:38 To do compile time checking you'd have to have information in your headers about the number of items each word needs and how much it leaves. 2023-01-28 23:58:51 Then the compiler would have to use that info during compilation to model the stack motion. 2023-01-28 23:58:56 Then you could detect problems.