00:04:56 @wn aegilops 00:04:57 *** "aegilops" wn "WordNet (r) 3.0 (2006)" 00:04:57 Aegilops 00:04:58 n 1: goat grass [syn: {Aegilops}, {genus Aegilops}] 00:05:05 Wordnet puts that in uppercase. 00:08:59 -!- Lord_of_Life_ has joined. 00:12:05 Opportunistically combining two topics in one, the longest in-order x86 opcodes are 5 letters; there are several (addps, addss, cmovz, cmpps, cmpss, cmpsw, kmovw, knotw, loopz). 00:12:08 -!- Lord_of_Life has quit (Ping timeout: 246 seconds). 00:12:09 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 00:14:28 (And in fact it's the same length for all the architectures I had in the opcode quiz, unless you also count MMIX's "16addu".) 00:15:10 opcode quiz? 00:15:27 We were talking about it yesterday, http://zem.fi/2014-04-05-opquiz 00:15:48 oh neat 00:17:07 I'm not good at this 00:17:26 I'm generally not much better than chance. 00:17:51 I'm worse than coin-flips 00:17:56 I'm not sure what this tells me 00:18:19 whoa, http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p0593r3.html 00:18:30 A lot more things are technically UB in C++ than I thought? 00:18:47 shachaf: oh yeah, basically everything 00:19:17 -!- Remavas has quit (Read error: Connection reset by peer). 00:19:25 -!- Remavas-Hex has joined. 00:20:25 I would've thought that struct T { int a, b; }; T *p = (T *)malloc(sizeof (T)); p->a = 5; ... would be OK. 00:23:21 C++, or as I like to call it, C plus UB 00:23:45 -!- Remavas-Hex has changed nick to Remavas-Hex[AFK]. 00:24:39 what is C++'s deal 00:53:36 -!- 7GHAAAWSQ has quit (Remote host closed the connection). 01:07:29 shachaf: because you didn't check the malloc for null 01:07:47 No, even when malloc succeeds. 01:07:53 shachaf: supposedly malloc is allowed to return null I think 01:08:06 http://wg21.link/p0593 01:10:15 shachaf: wait, so malloc-ing any complex type is UB in C++? I'm glad the g++ dev's aren't stupid enough to take advantage of that UB by removing the entire function when that is done 01:10:27 If you don't placement new it or something, apparently? 01:13:11 augh 01:13:29 maybe i'll just give up on c++ hth 01:13:37 huge amounts of technically undefined C++ code exist in my codebase 01:14:02 don't worry, only its behavior is undefined 01:16:00 because a lot of code relies on being able to mmap arrays of structs and then read them 01:23:03 shachaf: ironically that issue was raised, but apparently not addressed, in 2014... http://open-std.org/JTC1/SC22/WG21/docs/cwg_defects.html#1116 ("Additional note, February, 2014") 01:23:38 also... that page is huge. 01:24:49 int-e: so: scrap c++ and go back to c? 01:24:57 or a different language 01:25:00 please advise 01:25:36 try some avr assembly 01:25:59 * int-e could dust off his arduino... hmm... nah. 01:27:02 You can just give up the illusion of ever writing portable C++ code. 01:27:18 how about a language where the compiler+standard don't fight me 01:27:20 twh 01:30:34 -!- Phantom_Hoover has quit (Remote host closed the connection). 01:33:10 -!- tromp has joined. 01:38:08 -!- tromp has quit (Ping timeout: 255 seconds). 01:51:48 -!- tromp has joined. 01:52:15 -!- tromp has quit (Remote host closed the connection). 01:52:30 -!- tromp has joined. 01:53:56 -!- tromp has quit (Remote host closed the connection). 01:55:25 -!- tromp has joined. 01:56:36 -!- tromp has quit (Read error: Connection reset by peer). 01:57:03 -!- tromp has joined. 02:01:17 -!- tromp has quit (Ping timeout: 245 seconds). 02:10:50 -!- oerjan has joined. 02:15:21 -!- salpynx has joined. 02:20:33 You can try other assembly language too 02:20:45 zzo38: I'd like to write moderately portable programs, though. 02:20:54 I mean, I know you don't really need anything except MMIX. 02:21:37 Yes, then you can use C, or you can write a program for a portable VM (Z-machine, Glulx, NES/Famicom emulators, etc) 02:22:22 Oh, right. 02:22:33 I can just write all my programs for NES/Famicom 02:22:41 Do you like this? 02:22:48 -!- Remavas-Hex[AFK] has quit (Quit: Leaving). 02:23:09 Depend on the program. It is especially good for many kind of game programs, at least. 02:23:57 What about the kind of game programs that do 3D rendering at 1920x1080 at 60fps? 02:25:44 -!- danieljabailey has joined. 02:25:49 Then the resolution is too much for NES/Famicom. (Although also many game is having 3D rendering even without 3D game play geometry, which seems an unnecessary use of 3D rendering to me, in most cases) 02:26:17 That's true. 2D games are usually better. 02:26:35 I want a game that has two space dimensions and one time dimension, visualized as a third space dimension. 02:26:38 Do you like this? 02:27:49 You could try to make up some kind of game that does that if you want to do, and then see if it is good or isn't. 02:28:20 Yes. 02:31:53 shachaf: Let's make CDB == "C with Defined Behaviour". just enumerate all types of undefined behaviour in C, and define it 02:32:20 shachaf: I'd love to say that no sane compiler would ever optimize code based on that kind of undefined behavior... but I would have said the same thing about the x + y < x test for overflows (where y is known to be nonnegative) :-( 02:32:21 didn't someone do that 02:32:54 oerjan: gcc, quite infamously 02:33:05 int-e which is why both my company and the linux kernel use -fwrapv option 02:33:08 because the compiler writers didn't back down. 02:33:11 um my response was to orin 02:33:19 oerjan: ah sorry. 02:33:27 int-e: I think undefined signed overflow can be justified in some cases? 02:33:34 Probably not a great default, though. 02:33:37 oerjan: for once I believe this was not inferrable from context :) 02:34:00 shachaf: I mean the original justification was that some old computers used ones complement 02:34:37 There are other justifications. 02:34:40 int-e: it could be inferrable from the fact i don't type that fast hth htht 02:34:44 oopes 02:34:44 shachaf: I imagine it was meant to allow signaling overflows... 02:34:57 Like doing 64-bit arithmetic on a 32-bit integer or something? 02:35:00 Anyway, look, C is a mess. 02:35:04 Just gotta scrap it. 02:35:07 What can I use instead of C? 02:35:14 Maybe LLVM 02:35:24 oerjan: MAYBE 02:35:25 shachaf: fortran 2003? 02:35:40 shachaf: it's object oriented 02:36:08 and gcc supports it 02:36:58 shachaf: Java? 02:36:59 shachaf: also Ada I guess? 02:37:24 orin: object oriented automatically rules it out hth 02:37:29 * int-e runs . o O ( Over The Hills And Far Away ) 02:37:31 LLVM doesn't have macros though; one use of macros is to help writing portable programs, since otherwise the program might not be portable 02:38:05 shachaf: well fortran objects are optional 02:38:08 `wisdom abject 02:38:09 That's not wise. 02:38:15 `quote abject 02:38:16 No output. 02:38:18 hm 02:38:28 @google "abject lesson" 02:38:29 https://owlcation.com/humanities/abject-lesson-vs-object-lesson 02:39:14 ... that was much better than I hoped for. 02:39:40 shachaf: I think fortran is probably the smoothest drop-in replacement for C 02:39:50 `? eggcorn 02:39:51 eggcorn? ¯\(°​_o)/¯ 02:40:24 that was an unusually helpful cookie acceptance menu 02:41:41 shachaf: but fortran has UB too, just not as much 02:41:49 ... didn't enable Javascript. No menu. 02:43:03 [[Assembly language]] https://esolangs.org/w/index.php?diff=60050&oldid=60039 * A * (+30) 02:43:26 I guess there is rust, which prevents alot of runtime errors by creating lots of compile time errors 02:43:43 zzo38: I've tried to create a Truth-machine for Stoned Go (nice concept!): (+1[]?)+2[|+1()]-1()-2[]+2[]+2()-1+1()+0-4[]+0+2 then append [] black for input 0 , () white for input 1. Output to be read from the column below the last stone placed. I'm abusing / misunderstanding the loop | section, but I'm not sure how else to conditionally loop, unless I set up a naturally looping capture configuration, but then I believe there are Go 02:44:37 salpynx: It is meant there is no conditional loop; only the entire program can be looped (although the initialization part only runs the first time) 02:46:47 I was "innovating" and was hoping each code block inside brackets could have an init and loop portion [|] 02:47:06 (There are other esolangs too, where the entire program runs in a loop; it is same here) 02:48:32 `thanks ants 02:48:33 Thanks, ants. Thants. 02:49:25 I'll try to get the same effect another way, but wanted to suggest it in case you thought it was a good idea (code blocks being full programs too) 02:49:52 salpynx: i think your long message got cut off 02:50:01 salpynx: That could be a variant, I suppose 02:50:22 -!- tromp has joined. 02:51:05 * oerjan only knows how to fix that in irssi 02:51:23 oerjan: ah, yes, thanks! "I believe there are Go rules to prevent that." 02:52:17 The rules prohibiting repeated positions do not apply here. 02:52:22 (Perhaps I should mention) 02:52:30 "A stone may not be played so as to recreate a previous board position with the same player to play again". Not that stoned go has multiple players 02:53:12 Probably good to mention, I felt bound by it even though it was not mentioned as a restriction 02:54:40 -!- tromp has quit (Ping timeout: 246 seconds). 02:56:54 I seem to enjoy writing Truth-machines for IO limited esolangs. 02:57:13 [[Stoned-Go]] https://esolangs.org/w/index.php?diff=60051&oldid=60046 * Zzo38 * (+681) 02:59:29 zz038: thanks! Also for the / command. When I wrote my above code it didn't exist and I was using +0 for the same effect 03:02:52 I tried a while ago to write a truth-machine in Thue-Mirr but got frustrated making bigger and bigger layouts that didn't do what I wanted, then losing track of the positions. 03:04:00 I don't know what is even possible with Thue-Mirr; it seems to be chaotic to me 03:04:08 I'd need an interpreter to make more progress, paper and pencil didn't get me anywhere 03:04:58 yeah, I thought just trying semi-random input and see what happens would be a good way to get a feel for what is possible 03:19:00 [[Assembly language]] https://esolangs.org/w/index.php?diff=60052&oldid=60050 * A * (+372) 03:20:05 [[Assembly language]] https://esolangs.org/w/index.php?diff=60053&oldid=60052 * A * (+17) 03:21:30 [[Assembly language]] https://esolangs.org/w/index.php?diff=60054&oldid=60053 * A * (-17) /* Turing-completeness */ 03:21:52 [[Assembly language]] https://esolangs.org/w/index.php?diff=60055&oldid=60054 * A * (+29) 03:25:51 [[Assembly language]] https://esolangs.org/w/index.php?diff=60056&oldid=60055 * A * (-89) /* 99 bottles of beer program (currently incomplete) */ 03:26:07 [[Assembly language]] https://esolangs.org/w/index.php?diff=60057&oldid=60056 * A * (+0) 03:26:21 [[Assembly language]] https://esolangs.org/w/index.php?diff=60058&oldid=60057 * A * (-30) /* 99 bottles of beer program (currently incomplete) */ 03:35:00 -!- xkapastel has quit (Quit: Connection closed for inactivity). 03:35:02 [[Assembly language]] https://esolangs.org/w/index.php?diff=60059&oldid=60058 * A * (+261) /* 99 bottles of beer program (currently incomplete) */ 03:41:34 [[Assembly language]] https://esolangs.org/w/index.php?diff=60060&oldid=60059 * A * (+144) /* 99 bottles of beer program (currently incomplete) */ 03:44:58 [[Assembly language]] https://esolangs.org/w/index.php?diff=60061&oldid=60060 * A * (+49) /* 99 bottles of beer program (currently incomplete) */ 03:46:04 [[Assembly language]] https://esolangs.org/w/index.php?diff=60062&oldid=60061 * A * (+24) /* 99 bottles of beer program (currently incomplete) */ 03:53:48 [[Assembly language]] https://esolangs.org/w/index.php?diff=60063&oldid=60062 * A * (+274) 04:00:44 [[Assembly language]] https://esolangs.org/w/index.php?diff=60064&oldid=60063 * A * (+1) /* 99 bottles of beer program (currently incomplete) */ 04:04:14 [[Assembly language]] https://esolangs.org/w/index.php?diff=60065&oldid=60064 * A * (+85) /* 99 bottles of beer program (currently incomplete) */ 04:06:56 [[Assembly language]] https://esolangs.org/w/index.php?diff=60066&oldid=60065 * A * (+76) /* 99 bottles of beer program (currently incomplete) */ 04:07:20 [[Assembly language]] https://esolangs.org/w/index.php?diff=60067&oldid=60066 * A * (+4) /* 99 bottles of beer program (currently incomplete) */ 04:08:50 [[Lenguage]] https://esolangs.org/w/index.php?diff=60068&oldid=40885 * Cortex * (+91) 04:20:53 ^bf ,[.,]!`le/rn philosophical zombie//Philosophical zombies are everyone in this channel except me. 04:20:53 `le/rn philosophical zombie//Philosophical zombies are everyone in this channel except me. 04:20:56 Learned 'philosophical zombie': Philosophical zombies are everyone in this channel except me. 04:22:14 `` hoag | grep '^' 04:22:16 le/rn philosophical zombie//Philosophical zombies are everyone in this channel except me. \ list `list 04:22:40 `` hoag | grep '^' 04:22:42 list \ run echo 'lambdabot: @where hackegoloop' >lambdabotloop 04:23:48 `1 hoag | awk '{print substr($1,2,length($1)-2)}' | sort | uniq -c | sort -rn 04:23:51 1/10: 3359 oerjän \ 1362 shachäf \ 609 ellioẗt \ 426 b_jonäs \ 396 boil̈y \ 357 hppavilion[1̈] \ 335 int-̈e \ 314 fizzïe \ 226 Jafët \ 222 tsweẗt \ 203 ais52̈3 \ 177 GreyKnigḧt \ 175 wob_jonäs \ 165 km̈c \ 162 rdocöc \ 148 Tanëb \ 144 zgrëp \ 138 Rouj̈o \ 113 mromän \ 107 moon̈_ \ 102 mroman̈_ \ 98 Phantom_Hoovër \ 97 Bik̈e \ 04:23:55 10?! 04:23:57 `n 04:23:58 2/10: 92 nortẗi \ 90 noood̈l \ 88 izaber̈a \ 85 FireFl̈y \ 74 coppr̈o \ 71 olsnër \ 68 Sgëo \ 64 mrhmous̈e \ 54 hagb4r̈d \ 52 monq̈y \ 52 Gregör \ 50 c00kiemon5tër \ 49 itidus2̈1 \ 48 Zarutiän \ 48 ThatOtherPersön \ 45 \oren̈\ \ 44 moon_̈_ \ 43 Moon̈_ \ 40 zzo3̈8 \ 38 guestböt \ 37 ran̈c \ 37 iön \ 36 FreeFul̈l \ 04:24:10 `n 04:24:12 3/10: 33 Elronn̈d \ 32 quintopïa \ 31 xfïx \ 30 moonythedwar̈f \ 30 hppavilion̈1 \ 27 mnoq̈y \ 27 Hjull̈e \ 23 __kerbal__̈_ \ 22 orën \ 22 Moon_̈_ \ 22 blottër \ 22 alercäh \ 18 Sgeö_ \ 18 pikḧq \ 17 ZombieChenëy \ 16 Dongër \ 15 Kaynaẗo \ 15 gameman̈j \ 14 oren̈_ \ 13 moon̈y \ 12 zui438̈s \ 12 prooftechniqüe \ 12 04:28:14 `n 10 04:28:14 10/10: 1 a`a`a`a`jo8äs \ 1 a`a`a`a`jo7äs \ 1 a`a`a`a`jo6äs \ 1 a`a`a`a`jo5äs \ 1 a`a`a`a`jo4äs \ 1 a`a`a`a`jo2äs \ 1 a`a`a`a`jo1äs \ 1 a`a`a`̈a \ 1 04:28:22 obviously 04:28:39 `n 7 04:28:40 7/10:ybdën \ 2 tswetẗ_ \ 2 Taneb|Hovercraf̈t \ 2 spiriẗy \ 2 sleff̈y \ 2 singingbanan̈a \ 2 salpyn̈x \ 2 oklopöl \ 2 noog̈a \ 2 mushroöm \ 2 Moon__̈- \ 2 monoton̈e \ 2 lezsakdom̈i \ 2 lexand̈e \ 2 lambdaböt \ 2 hppavilion1̈_ \ 2 greyooz̈e \ 2 fungöt \ 2 fcraẅl \ 2 carad̈o \ 2 a`a`a`a`jo3äs \ 1 Warrigal 04:28:53 yikes, what happened to the encoding there? 04:28:59 `n 7 | xxd 04:29:00 shocking 04:29:00 7 | xxd/10:/bin/sed: -e expression #1, char 3: unknown command: `|' 04:29:03 `` n 7 | xxd 04:29:04 ​/hackenv/bin/`: line 5: xxd: command not found 04:29:25 I guess the obvious thing happened 04:29:55 It got cut off mid-code-unit and so my IRC client interpreted that as ISO-8859-1 or whatever encoding it uses when a thing isn't valid UTF-8 04:30:18 `thanks irc 04:30:19 Thanks, irc. Thirc. 04:30:43 oh right 04:31:00 (mine too) 04:31:19 That is the de facto standard for how IRC encoding works. 04:31:26 `` n 7 | hexdump 04:31:27 0000000 2f37 3031 793a 6462 cc65 6e88 5c20 2020 \ 0000010 2020 2020 3220 7420 7773 7465 cc74 5f88 \ 0000020 5c20 2020 2020 2020 3220 5420 6e61 6265 \ 0000030 487c 766f 7265 7263 6661 88cc 2074 205c \ 0000040 2020 2020 2020 2032 7073 7269 7469 88cc \ 0000050 2079 205c 2020 2020 2020 2032 6c73 6665 \ 0000060 cc66 7988 5c20 2020 2020 2020 3220 7320 \ 0000070 6e69 6967 676e 6162 616e cc6e 6188 5c20 \ 0000080 2020 2020 2020 3220 7320 6c61 7970 cc6e \ 0000090 78 04:31:29 -!- FreeFull has quit. 04:33:17 ...endianness, tdnh 04:33:29 When I'm emperor I'm going to ban big endian. 04:33:35 i vaguely recall handling this is a feature request i've previously refused 04:33:56 are you refusing feature requests on shaventions now 04:33:58 tdh 04:34:11 I guess you rewrote the thing that breaks lines up or something? I don't remember. 04:34:12 yw 04:34:17 yeah 04:34:51 Also on my list of things to ban: Long stack traces. 04:34:53 i made it break more accurately, but it doesn't care about utf-8 sequences 04:35:02 That'll take care of both Java and recursion. 04:35:11 sounds like a plan 04:35:33 fizzie: Can we send commits directly to HackEso instead of doing through IRC? 04:35:41 I'll just rewrite everything in C. It'll be great. 04:35:48 it 04:38:36 -!- tromp has joined. 04:43:12 -!- tromp has quit (Ping timeout: 250 seconds). 04:57:50 -!- arseniiv has joined. 05:16:43 [[Pyhton (sic)]] N https://esolangs.org/w/index.php?oldid=60069 * Something Fawful * (+7346) Added new Esolang that I created recently. 05:24:17 [[Language list]] https://esolangs.org/w/index.php?diff=60070&oldid=60048 * Something Fawful * (+32) /* P */ added Pyhton [sic] to the list. 05:30:54 I think small endian is generally better, but do not intend that big endian will be banned 05:33:27 (Knuth seems to prefer big endian, as far as I can tell) 05:36:29 Why? 05:37:42 Do you mean why Knuth prefer big endian? 05:38:44 Yes. 05:39:07 I don't know why 05:42:54 Glulx is also big endian, and Z-machine is big endian (although version 3 Z-code can be big endian or small endian, but small endian was never used), and OASYS does not define endianness (OAI requires the endianness and int size to match the computer it is running on, although my own implementation of OASYS doesn't care), and TAVERN has no run-time endianness but the story file is small-endian except lump sizes are PDP-endian. 05:45:44 Free Hero Mesh also has no runtime endianness, but binary files in a puzzle set use small endian (except lump sizes in a Hamster archive, which are PDP-endian) 05:46:09 Knuth's MIX seems to have no endianness, although MMIX uses big endian. 06:12:21 Sometimes if aplay is interrupted when the audio is almost finished playing, I get a error message that says: Assertion 'pthread_mutex_destroy(&m->mutex) == 0' failed at pulsecore/mutex-posix.c:81, function pa_mutex_free(). Aborting. 06:19:04 it's a feature hth 06:26:30 -!- tromp has joined. 06:31:05 -!- tromp has quit (Ping timeout: 255 seconds). 07:05:28 -!- oerjan has quit (Quit: Nite). 07:33:52 -!- xkapastel has joined. 07:38:42 -!- tromp has joined. 08:03:10 zzo38: no, I read 7.1.3 as not expecting a clear preference either way between little-endian and big-endian. 08:44:59 oh, an opcode quiz. let me try that. thanks, fizzie. 08:46:48 aeyxa, kmc: https://esolangs.org/logs/2019-02-18.html#ldi for list of words whose letters are sorted alphabetically 08:49:52 ooh, that's hard 09:27:53 -!- AnotherTest has joined. 09:40:26 -!- xkapastel has quit (Quit: Connection closed for inactivity). 09:52:26 -!- salpynx has quit (Quit: Page closed). 10:31:47 -!- Phantom_Hoover has joined. 10:31:48 -!- Phantom_Hoover has quit (Changing host). 10:31:48 -!- Phantom_Hoover has joined. 10:46:56 `? this page 10:46:57 This page is under construction. 10:49:40 There is a mastodon account that posts random screenshots of ZZT games, quite fun to see all sorts of random ones 10:49:57 https://botsin.space/@worldsofzzt 10:51:28 `? manometer 10:51:29 A manometer is a device for testing real men by putting them under pressure. 10:54:12 `learn o is a popular comedy fantasy webcomic. It's about a group called the Order of the Stick, as they go about their adventures with minimal competence, and eventually stumble into a plan by an undead sorcerer to conquer the world, and they're out to stop him and conquer their personal problems at the same time. Hopefully not in that order. 10:54:15 Relearned 'o': o is a popular comedy fantasy webcomic. It's about a group called the Order of the Stick, as they go about their adventures with minimal competence, and eventually stumble into a plan by an undead sorcerer to conquer the world, and they're out to stop him and conquer their personal problems at the same time. Hopefully not in that order. 11:43:34 -!- Essadon has joined. 11:44:10 -!- Essadon has quit (Max SendQ exceeded). 12:07:00 `? h4gb4rd 12:07:02 hagb4rd is one spacey fellow. Spaaaaaaaaaaaaaaace. 12:07:02 `? hagb4rd 12:07:04 hagb4rd is one spacey fellow. Spaaaaaaaaaaaaaaace. 12:07:06 hmm 12:07:42 just how many dups are there? 12:07:56 ``` sha256sum wisdom/* | sort | uniq -D 12:07:57 sha256sum: wisdom/8: Is a directory \ sha256sum: wisdom/le: Is a directory \ sha256sum: 'wisdom/'$'\302\257''\('$'\302\260''_o)': Is a directory \ sha256sum: 'wisdom/'$'\302\257''\('$'\302\260\342\200\213''_o)': Is a directory \ sha256sum: 'wisdom/'$'\302\257''\_('$'\343\203\204'')_': Is a directory 12:08:02 oh gtf 12:09:29 ``` ls -ld wisdom/h?gb?rd 12:09:30 lrwxrwxrwx 1 1000 1000 7 Jul 8 2017 wisdom/h4gb4rd -> hagb4rd \ -rw-r--r-- 1 1000 1000 51 Jul 8 2017 wisdom/hagb4rd 12:09:33 oh, it's a symlink! 12:11:34 -!- Lord_of_Life_ has joined. 12:13:02 ``` set -e; cd wisdom; find -type l -printf "%p -> %l\n" 12:13:03 ​./СССР -> ссср \ ./the usual suspect -> usual suspect \ ./perpetuum mobile -> perpetual motion machine \ ./r.i.p. -> rip \ ./☆ -> * \ ./h4gb4rd -> hagb4rd \ ./issue -> .doorstop \ ./the reals -> real \ ./off by two error -> off by two \ ./wolfram -> stephen wolfram 12:13:05 -!- Lord_of_Life has quit (Ping timeout: 255 seconds). 12:13:35 `? doorstop 12:13:36 doorstop? ¯\(°​_o)/¯ 12:13:38 `? issue 12:13:39 You do not have the clearance necessary to view this entry. 12:13:44 `? .doorstop 12:13:45 You do not have the clearance necessary to view this entry. 12:13:54 -!- Lord_of_Life_ has changed nick to Lord_of_Life. 12:40:09 shachaf: I'm not sure if that's in the spirit of the thing. 12:45:04 is it "resemblance" or "resemblence"? wisdom/ance is truncated too short, it's not in there 12:45:44 resistance, resilience, 12:46:09 repungance, resemblance. there it is 12:56:14 `? bent-bill knot-hatch 12:56:15 bent-bill knot-hatch? ¯\(°​_o)/¯ 13:15:14 `? associate degree 13:15:15 associate degree? ¯\(°​_o)/¯ 13:15:18 `? ass. phd 13:15:19 ass. phd? ¯\(°​_o)/¯ 13:15:20 hmm 13:18:57 -!- FreeFull has joined. 14:29:08 -!- Essadon has joined. 14:40:11 -!- Phantom_Hoover has quit (Remote host closed the connection). 14:43:05 `? canaima 14:43:07 Canaima is a secret Venezuelan project to overrun #esoteric with incomprehensible people who have no idea why they're here. 14:53:49 -!- Phantom_Hoover has joined. 15:17:31 rain1: It is look like they are not making invisible walls to be invisible. 16:49:59 Huh, how have I missed out on hg histedit for all this time? It's basically the same as git rebase --interactive... and I've been missing that a lot. 17:07:14 -!- Phantom_Hoover has quit (Read error: Connection reset by peer). 17:10:17 -!- Phantom_Hoover has joined. 17:27:44 fizzie: Can you figure out a way to make it in the spirit? 17:32:34 shachaf: I don't know, maybe I could make a built-in command like `fetch, except `patch (to pull in a diff to apply from a URL) or `pull (to pull a commit from a hg repo). I'd like it to have the usual safeguards, like the .hgignore handling and stuff. 17:36:46 you could just download the patch to tmp with a fetch, then apply it with a command. that's two lines, but that's not too big of a problem, right? 17:37:14 uses of fetch usually work like that 17:37:20 because you can't do much with just fetch 17:41:16 -!- xkapastel has joined. 17:41:50 All the uses of `fetch I've seen have basically just updated a single "binary" or a data file. 17:42:19 But it's true that you should be able to apply a patch via fetching to tmp. 17:42:35 what if there was a directory you could edit in real-time 17:43:00 -!- ais523_ has joined. 17:43:31 fizzie: I think I fetched a targz at least once 17:43:36 and I think we have a working xz 17:43:51 ``` xz --help 17:43:52 Usage: xz [OPTION]... [FILE]... \ Compress or decompress FILEs in the .xz format. \ \ -z, --compress force compression \ -d, --decompress force decompression \ -t, --test test compressed file integrity \ -l, --list list information about .xz files \ -k, --keep keep (don't delete) input files \ -f, --force force overwrite of output file and (de)compress links \ -c, --stdout write to standard o 17:43:59 so you could download a tarxz too 17:44:35 admittedly I also fetched single files, like M:tG comp rules texts or yawgatog oracle dumps, for clarity of the commands 17:44:58 I guess you do have to provide your own URL though. It's not as convenient as just pushing a commit. 17:45:47 well, you don't have to use fetch. you can also break up the patch in irc-line long chunks and tunnel it to hackeso 17:45:53 but that's not very convenient, and freenode might ban you 17:46:20 there was also a web interface that let you http upload text I think 17:46:23 you could use that 17:46:49 if there also a mail interface where you send commands and you receive the response? 17:46:53 Other way to do would be listen to one port on the server that you can write a filename and then upload all of the data and then close the connection, and then on the IRC you can move the file from the temporary "incoming" directory to where you want it and give it the filename you want. 17:50:41 https://twitter.com/x86instructions/status/1099115314766401536 "JTNJ - Jump To Next JTNJ" ← that's basically an ASM version of literate programming, isn't it? having a "toggle comment" marker is pretty much the hallmark of a literate programming language, and that's pretty much what JTNJ does in practice 17:51:42 ais523_: I think that if the instruction is encoded then, you might not know what is another instruction or just some other data, unless it is defined as a macro. 17:53:27 To be even marginally useful, the instruction should jump to the instruction *following* the next JTNJ. 17:54:40 ais523_: I don't think it's the hallmark of a literate programming language. C has a toggle comment, /*/ , and I don't think that makes it literate programming. 17:54:50 ais523: Were you the person who suggested something like, there should be a kind of struct in C that can only exist as an lvalue, not an rvalue? ← I don't remember saying that, but it's the sort of thing I'm interested in so maybe I did 17:55:13 b_jonas: hmm, that might be an interesting style for writing a C program in 17:55:28 really, a language being literate isn't a property of the language, but of how it's used 17:55:32 . o O ( "fault on first non-X-mapped page beyone RIP" ) 17:55:40 *beyond 17:56:03 does RIP here mean "64-bit instruction pointer" or "rest in peace"? 17:56:13 yes. 17:56:25 (the former was the intended meaning) 17:58:36 Is the new article I added on esolang wiki good yet? ← you've defined the two possible current directions as "vertical" and "horizontal", then you have commands for moving in the current direction or the opposite of the current direction, but it matters whether the current direction is left or right, or up or down, due to the tiebreak for when a large group is captured 17:59:33 also, the syntax for the inner loop variant is just weird, as | affects the whole block that contains it but the location of the | within the block doesn't seem to matter 18:00:35 `? sober space 18:00:36 Sober spaces are the dual of Stoned spaces. Taneb invented them. 18:00:38 `? stoned space 18:00:39 stoned space? ¯\(°​_o)/¯ 18:00:41 `? stone space 18:00:42 ais523_: Ah, yes, but, negative numbers are the top left (perhaps should mention) for if multiple trigger programs are executed. Also, the | in the inner loop variant is supposed to still have the initialization part and loop part, although maybe it is not clear 18:00:42 Stone spaces were invented by P. T. Barnum as a hoax. 18:01:12 ais523_: Or maybe just some some structs shouldn't be assignable by value or something. 18:01:39 oh right, I was definitely suggesting something that played around in that space 18:01:42 Anyway I think I thought it was kind of silly but now I'm more sympathetic to it. 18:02:41 shachaf: rust has structs that aren't assignable by value these days, non-Sized ones 18:03:46 you also notionally have them in C, where you technically can copy the struct, but it's not really meaningful, because it's not the full struct, just a struct describing the header, and you can only meaningfully manipulate it through passing a pointer to it to library functions 18:03:50 I think I wanted a very clear difference between things which act like value types but are immutable, things that are mutable but persist and can't easily be copied or deallocated, and temporaries which are mutable but can't be used as anything but local variables and fields of other temporaries 18:03:55 FILE is like that already 18:04:30 b_jonas: non-Sized things aren't copiable by value only because Rust doesn't have enough information to generate the code that copies them, though, I think 18:04:38 I said this the other day: "People talk about const a lot, but the const/non-const distinction seems less important to me than the distinction between values and memory locations (in C terms, rvalues and lvalues). Most languages really muddle this distinction (although even C does make it)." 18:04:45 it's not a philosophical objection to the by-value copy, that's what !Clone is for 18:05:26 ais523_: it's not really "only". you use structs that are neither sized nor unsized if you don't want rust to move them. 18:05:32 shachaf: I see this the opposite way round (which may be the contrapositive of your point of view?): if something is immutable, the distinction between value and memory location doesn't actually /matter/, and that's one of the big gains of immutability 18:05:43 that could be because they're ones that have a pointer to themselves, or for other reasons 18:05:49 whereas if something is mutable, it has an identity, and keeping track of that is very important 18:06:03 b_jonas: isn't that what Pin is for? 18:06:22 ais523_: Pin can help too... hmm 18:06:45 really I don't quite understand how Pin works 18:07:01 nor do I 18:07:13 @quote Ooooh! 18:07:14 cjs says: I have to explain this shit to people. I mean, I start out right, "Hey, you know how you always have these bugs because what you thought was in the variable is not there?" And I get all of 18:07:14 these nods of agreement. "Well, I've found a new language that solves that problem." Audience: "Ooooh! How?" Me: "There's no variables!" And then they all start moving away from me slowly.... 18:07:41 (no lvalues! bliss!) 18:07:49 un... 18:08:11 is "variable" there being used in the sense of "assignable variable" / "lvalue", or in the more general sense that also includes things like lambda bindings? 18:08:44 It's the assignable thing. 18:08:53 right 18:09:03 maybe intermediate, so that global constants are still allowed? 18:09:03 Ah mutable is the word. 18:09:10 ais523_: Well, "const T *x" in C doesn't even say that *x is immutable 18:09:23 b_jonas: their are defined, not assigned 18:09:27 ... they 18:09:48 I work in a CS department, "variable" has the second meaning by default here, so "assignable variable" is the phrase we came up with to unambiguously describe the sort of variable that most programmers mean 18:09:58 Anyway I'd still quite like a language that doesn't have lvalues at all, only pointers. 18:10:32 and then there's assign-once variables 18:10:34 (other hazards of terminology include "while" being considered to be tail-recursion) 18:10:35 It's really pretty odd that even pseudocode algorithms confuse a value with a memory location. 18:10:56 There's the implicit operation of "the value stored in this location at this time" and people don't even notice it 18:11:16 b_jonas: In the pure Haskell setting that's not part of the semantics; it's an implementation detail of lazy evaluation. 18:11:21 I was very impressed by Algol 68, which gets the terminology right for the distinction (and then, unfortunately, went and invented a shorthand that caught on and caused all the terminological problems) 18:11:34 int-e: I'm more thinking of the prolog version of assign-once variables 18:11:49 ais523_: I was also impressed by some parts of Algol 68 18:11:53 What's the shorthand? 18:11:59 the C code "int x; x = 6;" translates to Algol 68 "ref int x = loc x; x := 6;" 18:12:09 the shorthand for that would be "int x := that 18:12:19 **"ref int x = loc int; x := 6;" 18:12:29 Oh, that. Right. 18:12:33 there was shorthand like "ref int x := 6" 18:12:38 something like that 18:12:42 I think a shorthand is OK? 18:12:59 also the Algol 68 is still wrong, I added a trailing semicolon by mistake (semicolon in algol is a separator, not a terminator) 18:13:21 the shorthand's useful, at least 18:13:46 but I really liked the concept of "variables are never named, only constants have names" 18:14:13 I think I was going to have a thing like "x := var(6)" 18:14:20 whereas in Forte, constants are never named, because the constants are variable too 18:14:29 (for people reading this who don't already know, "ref int x = loc int" creates a new constant x which is the name of a stack slot, you can mutate the value within the stack slot) 18:14:48 b_jonas: well, Forte is a joke, but it's a thought-provoking joke 18:14:50 Where var is an alloca-style thing that allocates memory for the rest of the block and also assigns a value to that memory. 18:15:06 -!- ais523_ has quit (Quit: brb). 18:15:13 ais523_: right. it's thought provoking because the variable line numbers behave like a computed come from 18:16:15 ais523_: The thing I don't like is all the automatic coercions they needed to add to make code readable. It seems to make things very ambiguous. 18:17:47 what does often lead to interesting design is that if you have a resource that can be named, then you should also allow to allocate instances of it that aren't named but only referenced indirectly 18:27:04 but of course it can also lead to insane overuse and bad coding 18:27:30 -!- ais523_ has joined. 18:27:44 back 18:28:12 shachaf: I also think the coercions were a mistake 18:29:17 in my thesis I worked with Idealized Algol, which has no implicit coercions (it allows ! as an explicit ref x → x coercion, and is call by name so no explicit proc x → x coercion is needed) 18:29:39 actually, forcing a thunk in Idealized Algol is really difficult 18:30:03 you can force an integer by assigning it to a variable, and force a boolean using an if or while statement, and that's about it; most other types can't be forced at all 18:31:07 ais523_: is that like haskell without seq, where you can force an algebraic data using case, or force an integer using <, or force a function by calling it? 18:32:04 ais523_: But code without the coercions seems to have way too much dereferencing. 18:32:10 To the point of being hard to read. 18:33:21 fizzie: the opcode quiz gave me "FS" and I wasn't sure what to say because I was unclear about the definition of an opcode; "FS:" is a segment override prefix, but a) does the colon matter, b) do prefixes count as opcodes? it could do with some clarification 18:33:31 b_jonas: yes 18:33:54 shachaf: in Idealized Algol, incrementing an integer-holding variable x is "x := !x + 1" 18:34:04 Yes, that's simple enough. 18:34:07 it takes a bit of getting used to but it's not too bad to write in (and OCaml does it the same way) 18:34:18 https://en.wikipedia.org/wiki/BLISS does this too 18:34:28 ais523_: is that where SML got the names for the operators for mutable cell? 18:34:34 at least in the subset I implemented for my thesis, the only dereferencable things were integer-holding variables 18:34:39 But slightly more complicated code has a lot more dereferencing. 18:34:46 b_jonas: I have no idea who borrowed from who 18:34:57 I always thought it strange that ! is a reader in SML but a writer in forth 18:35:05 Say the array indexing operator, which presumably returns a pointer rather than a value (so it's morel ike + in C), right? 18:35:14 (we're implementing this in hardware, thus any assignable referenceable thing is a set of bits in memory somewhere, thus is an integer by definition) 18:35:58 shachaf: the newarray statement in Idealized Algol produces a function from integers to variables 18:36:07 eh, just because it's in hardware doesn't really make it an integer. except perhaps as much as it only has finitely many values. 18:36:36 I'm talking about the design of a language for programming computers, though. 18:36:41 Well, it is a sequence of bits which can be interpreted as and manipulated as a integer. 18:36:47 so writing an array element would be, e.g., a(6) := 7, reading an array element would be, e.g., !(a(6)), which can be written !a(6) due to careful choice of operator precedence 18:37:06 (the choice is harmless because (!a)(6) would necessarily be a type error, given that in the subset we were using, ! always returns an integer) 18:37:40 ais523_: hmm, and can you write multi-axis arrays? 18:38:11 b_jonas: there isn't a builtin for them, but you can create them using a curried wrapper function that linearizes the index 18:38:20 hmm 18:38:31 arr[!i, !j] = min(!arr[!i, !j-1], !arr[!i-1, !j], !arr[!i-1, !j-1]) + 1 18:38:51 It seems like worrying about where to dereference is a big part of the work of writing that line 18:39:02 something like let a = newarray a0(25) in \x.\y.a0(x+y*5) would work 18:39:45 ok 18:39:50 shachaf: it's fairly easy, every use of a variable name is dereferenced with either ! or := 18:40:01 the first use of arr is dereferenced with :=, thus you need ! everywhere else 18:40:27 I'm not saying it's conceptually difficult, only distracting 18:40:47 Switching between a.x and a->x in C is already annoying. 18:41:26 shachaf: come to the rust side. we have implicit dereferencing, and lots of other false exaggerations about how perfect the language is. 18:41:56 Rust just has lvalues and rvalues, like C 18:42:11 ais523_: Yes, it's a little unclear. The opcode list is from NASM, which allows "FS" as a standalone instruction, and as a rep-style prefix, in addition to the typical fs:... operand form: http://ix.io/1BWX 18:42:26 shachaf: oh, is this still about not wanting lvalues? come to rust or scheme then. 18:42:29 um 18:42:33 s/rust or/ruby or/ 18:42:35 fizzie: well, it considered IIRC it considered FS to be fake 18:42:57 but it's a surprisingly philosophical question for what you'd expect to be an objective quiz 18:42:59 b_jonas: This is about wanting a language to replace C. 18:43:22 shachaf: fwiw, my thoughts on lvalues and rvalues were more about wanting a language to replace Java than to replace C 18:43:56 C-like languages have a number of considerations of their own, e.g. abstracting away low-level details is not always desirable 18:44:22 I guess ALGOL 68 is garbage-collected. 18:44:36 But I don't think that has much to do with any of these features. 18:46:12 Oh. Right, the exact definition for "opcode" I've used there is really a NASM implementation detail, it's everything in the nasm_insn_names[] array. Apparently prefixes (even if they can be used as a standalone statement) are handled separately. 18:46:14 I think Algol 68 is GCed because people weren't sure there were alternative schemes to stack allocation and a GCed heap at the time 18:46:27 refcounting would have been considered a form of GC, but a broken one 18:47:04 hmm, this reminds me of the problem I'm stuck on at work 18:47:20 The alternative scheme of manual memory management was presumably known? 18:48:34 I'm trying to prove a GC algorithm correct; however, the way it deals with reference cycles is by delegating cases with suspected reference cyclesto a second GC algorithm, which means I need to somehow prove "this GC algorithm is correct given an oracle for breaking cycles" 18:49:05 shachaf: I'm not sure, manual deallocation feels like a more modern feature than GC/automatic deallocation 18:49:24 probably because memory leaks have become more survivable over time 18:49:45 (Rust does not consider memory leaks a correctness issue, for example) 18:49:59 maybe it was GCed because they wanted to compile it to a web scripting language that would be ran on client side in browsers, and they didn't want webpages to leak memory in the browser 18:50:05 hmm wait, did you say 68 18:50:31 they didn't want telex messages to leak memory in the receiving post office 18:50:42 ais523_: What, you're saying garbage collection predated malloc/free? 18:51:08 I'm not sure, but it wouldn't surprise me, at least in languages higher-level than assembly 18:51:21 Lisp is GC'ed, and a very old language 18:51:24 ais523_: it does feel more modern, yes, because lisp was traditionally garbage collected 18:51:28 exactly 18:51:33 and isn't smalltalk too? 18:51:34 and other languages of a comparable age were typically statically allocated 18:51:41 b_jonas: yes, Smalltalk is GC'ed 18:52:23 whereas some other languages just don't allow pointers, so everything is singly owned 18:52:49 But cons cells -- which I assumed were reference-counted in the original LISP for some reason, though I never checked -- are a much more specific thing than general GC 18:53:18 or every variable is allocated once in the program and never freed, like in BASIC or FORTRAN 18:53:37 shachaf: sure, the memory allocation and deallocation gets much simpler if every block is of the same size 18:53:41 the gc sweep itself not much 18:53:49 but the memory management does get much simpler 18:53:56 so it's easier to implement on small machines 18:55:07 I'm reading the paper which is the first description of garbage collection (1959); it also talks about stack allocation as though it were a new/interesting innovation for the paper (maybe it was) 18:55:44 apparently it used mark-and-sweep 18:55:56 (stop-the-world mark-and-sweep, that is) 18:56:21 ais523_: if I understand correctly, it was sort of a new thing to store local variables on a stack to implement lexical scoped variables (without closures), which makes sense because you don't need that if you don't have recursive structs 18:56:26 it does sort-of imply that malloc/free came earlier, or at least was considered to be obvious to people reading the paper 18:56:39 b_jonas: it was to implement recursive functions 18:56:40 if you only have non-recursive structs, then you can give every local variable a static address 18:57:05 but stack allocation is often more efficient than static allocation even in the absence of recursion 18:57:20 because it lets more variables share with each other and thus uses less memory 18:57:41 ais523_: exactly. I mean, look at the Knuth books, they don't take recursive functions granted, recursive functions are introduced in the future (not yet released) parts of vol 4, even though the normal MMIX calling convention puts locals on a stack 18:57:47 in most programs that don't use recursion, there's no execution which would end up with every function running at the same time in one big long call chain 18:58:03 unless the program is very simple 18:58:17 it does technically mention recursive functions earlier, but doesn't go (sorry) deep into them 18:58:27 hmm, now I'm starting to have an esolang idea 18:58:38 * ais523_ thinks about a language where all the functions being in one big call chain is an essential part of the design 18:58:45 presumably you do flow control by rearranging the call chain 18:59:06 ais523_: not really. if your call graph is known statically and acyclic (which is the most common case when you know there'll be no recursion) then you can maximally overlap variables so it's as efficient as a stack 18:59:17 overlap them with a static address that is 18:59:19 yes 18:59:28 or, hmm, I'm not sure 18:59:33 is the set of overlaps always solvable? 18:59:48 sure, just go either from inside to out, or from outside to in, in the graph 18:59:51 or in any partial order really 18:59:59 and assign variables to the lowest addres slot that wasn't used yet 19:00:10 stacks ware awful, they make it impossible to put the value of a variable into the immediate operand of an instruction ;-) 19:00:28 say you have three functions, a, b, c, a(false) calls b(true), b(false) calls c(true), c(false) calls a(true) 19:00:36 ais523_: no 19:00:51 ais523_: I said the call graph, as in, the graph of possible calls, is known at compile time, and is acyclic 19:00:58 as in, each function can only call functions defined earlier in the code 19:01:11 if you do have three functions like that, then yes, you can't allocate the variables statically 19:01:16 oh, a(false) calls b(true), a(false) calls c(true), b(false) calls c(true) 19:01:18 that's acyclic 19:01:58 but it's still more efficient with a stack, because b's locals and c's locals need to share when called from a, but not when b is called directly 19:03:26 I think the difference here is that a→b→c is approximately a possible call chain but the full chain never actually happens in practice, thus you can implement it with only two functions' worth of stack space 19:03:33 but the static analysis thinks it needs three 19:03:38 right 19:04:05 and that's the kind of design that ends up with deadlocks in the kernel between the file system driver and two other modules 19:04:10 we love it 19:04:53 fizzie: Also about the opcode quiz: "TETRA" is a assembler directive in MMIX, but is not itself a instruction. Other things can apply to other instruction sets (although sometimes, it depend what assembler is in use). Also with 6502, which instruction are possible can also depend what variant of 6502, such as NMOS or CMOS or whatever. 19:05:35 In Glulx, it is necessary to define the maximum amount of stack space needed, although the stack is not addressable in Glulx. 19:05:42 I kind-of assumed it wouldn't be using the unofficial instructions 19:05:56 though on the other hand, if a calls b and b calls c and c calls d, and b and d have 4 bytes of stack frame, and a and c have 8 bytes of stack frame that must be aligned to an 8 byte boundary, then you end up using 28 bytes of stack or 24 bytes of statically allocated variables 19:05:56 which don't even have consistent names 19:06:01 (I do not really know how to estimate though) 19:06:06 or even functionalities, in some case 19:06:28 ais523_: Even if you do not use unofficial instructions, still some instruction are difference from NMOS or CMOS 6502. 19:06:45 we could also have separate versions of the x86 quiz for the intel notation and the at&t notation 19:06:46 (there are stable instructions like LAX, and unstable instructions which are deterministic on some 6502s, deterministic with diferent behaviour on other 6502s, and nondeterministic on still other 6502s; their behaviour often doesn't make much sense even when it's stable) 19:06:49 -!- galaxie has joined. 19:07:30 Hi! My mind is blanking, I feel like I was on the esolang wiki or maybe WikiPedia but I think I remember another visual-based esolang that wasn't Piet or Piet++. Anyone have any idea what that might be? 19:07:35 With LAX, there is actually a bug (even the bugs have bugs in 6502) with immediate operands 19:07:39 but of course the x86 quiz is tricky because you would have to update it with new instruction names every year 19:07:48 galaxie: No, but you can try looking in the categories in esolang wiki 19:08:13 galaxie: do you mean https://esolangs.org/wiki/Piet%2B%2B 19:08:17 oh 19:08:20 you mean it wasn't Piet++ 19:08:31 yeah, what zzo38 says then, try https://esolangs.org/wiki/Category:Non-textual 19:08:35 galaxie: there are quite a few image-based esolangs; the massive polyglot on Stack Exchange implements many of them at once 19:09:19 hmm, the Turing Tumble is listed in that category 19:09:54 I'm suspicious of the claims that it's TC, given that a) it doesn't have infinite memory and b) the most obvious means of giving it infinite memory (putting an infinite number of identical boards side by side) isn't obviously TC; it might be subtly TC though 19:09:56 ais523_: that category isn't only for image-based esolangs of course. it contains object-based ones like https://esolangs.org/wiki/Efghij 19:10:07 yes, and music-based languages like Fugue 19:10:15 Non-texual, what didn't I see that.. 19:10:28 ugh, now my Fugue hello world has got stuck in my head again 19:10:31 aren't music-based in a different listing? 19:10:48 it's surprisingly catchy for generated music; perhaps being based on a specific BF program gives it a sort of structure that generated code normally lacks 19:10:51 (most of which are garbage incidentally, but then, which esolang category isn't) 19:11:28 I'm tempted to say "Category:Shameful", which is arguably supposed to be entirely garbage, but I have a soft spot for ESME 19:11:34 Braincopter, that was it! Thanks! 19:11:50 glad to help 19:11:54 lol 19:11:58 fwiw, my first thought was Brainloller 19:12:32 it's hard to define ESME as a terrible language because it's more performance art than language 19:12:55 it's like if TURKEY BOMB was defined by example rather than specification (I rather like TURKEY BOMB too) 19:13:01 *were defined by example 19:13:17 ais523_: the trick is that the first esolang with any schtick is often great, but it gets boring when a dozen other articles on the wiki copy it 19:13:37 eg. Ook! has a place in my heart, but it wouldn't if it were invented now 19:14:04 it is probably better than brainfuck for most of the things brainfuck is good at, except for code golf and the things where the two languages are identical 19:14:17 the language benefits from having an entirely meaningless syntax 19:14:58 I think there have been some uses of it in education, to help people understand what is and isn't important in a language 19:16:37 hmm... showing that the syntax isn't important? dunno, grown up to meet both the original and the horrible Hungarian syntax versions of LOGO and Excel sort of shows that syntax in theory isn't important, but bad syntax can make you really hate the language 19:17:13 there's a hungarian notation version of LOGO? 19:17:16 I'll keep the English FD BK LT RT PU PD thank you 19:17:45 b_jonas: Not only with x86 there will eventually adding new instructions, although you could perhaps specify a version number (does it even have version numbers?). Glulx has version numbers, although Glulx also has "push" and "pull" which are not themself opcodes but are abbreviations for other opcodes. There are also some extensions which are not part of the core specification. 19:17:53 fwiw, I wrote The Waterfall Model Online in Hungarian notation because JavaScript is untyped, and it helped me catch at least one error 19:18:06 but in general it's pointless doing it when the compiler does it for you 19:18:07 ais523_: I'm not sure how much ... there's definitely a library of function definitions that give hungarian abbreviation synonyms to common commands 19:18:18 oh, Hungarian the language, not the naming style 19:19:00 yes, the language. not the lpszFoo thing. 19:19:44 And then, Z-machine is even more difficult. There are two sets of names for instructions (Infocom and Inform), and then different instructions per version (ZIP, EZIP, XZIP, YZIP), features which are Inform extensions, and features which are precluded by Inform extensions. 19:20:04 "lpsz" seems broken as a type system, anyway; the zero-terminated string /is/ a pointer, under standard C conventions, thus a long pointer to it would be a char**, not a char* 19:20:35 Is it Microsoft who used "lpsz" for this purpose? 19:20:37 zzo38: and x86 instructions that existed in certain old AMD cpus but are no longer in the latest ones 19:20:43 because the intel extensions won out 19:20:46 zzo38: I'm not sure they invented it but they're the most famous users of it 19:20:48 b_jonas: OK, that too 19:21:01 zzo38: Microsoft is just the most popular ones who use it, they're not the first ones 19:21:16 b_jonas: haven't even some Intel instructions died out? 19:21:19 like into 19:21:48 ais523_: I think only some really strange ones that were never intended to be used in mainstream programs, but only to debug the processor or something 19:22:09 ais523_: there are a lot that are not allowed in 64-bit mode, but still allowed in 32-bit code 19:22:20 that's mostly done to free up some of the one-bit opcode space 19:22:31 I think x86 also has different instructions for 64-bits and 32-bits, and maybe also 16-bits I don't know 19:22:33 this reminds me, there was a bit of a row in some minor processor semi-recently (last several years), because it had an instruction to switch the processor into a mode with an entirely different set of opcodes 19:22:54 ais523_: Doesn't ARM do that? 19:22:56 and it used a different security model, which in practice meant the feature was usable as a hardware backdoor even though that doesn't appear to have been the original intention 19:23:37 zzo38: yes, ARM has like three different opcode modes, plus like two or three different vector extensions ... but then, x86 also has three vector extensions now 19:24:00 ais523_: also some instructions "died out" in the sense that the cpu still supports them but there isn't a good reason to use them 19:24:27 b_jonas: more interestingly, there are some duplicate instructions which fit into different naming schemes and have different encodings 19:24:43 the processor treats them identically, but you're supposed to use one for ints and one for floats in case future processors care about the distinction 19:24:45 ais523_: yes, but MMIX does that to an extreme 19:24:59 ais523_: oh yes, that was the vector instructions, that mattered for performance for a while 19:25:36 basically they had pseudo-register that were closer to integer vector execution units and ones that were closer to float vector execution units, and the cpu had to transfer between them if you used the wrong bitwise vector instrs 19:25:39 Yes, MMIX has separate instructions for signed or unsigned 64-bit load/store, even though the function is same. 19:25:53 also aligned and unaligned instructions that don't differ on new cpus unless you turn on some compatibility flag 19:25:57 or something 19:25:59 on wait 19:26:13 maybe they differ, but the unaligned ones no longer have a penalty, so you can always write them even for aligned operands 19:26:21 movaps versus movups really does matter, IIRC 19:26:40 ais523_: not in the latest cpu iirc, but let me look it up in the opt'n manuals 19:27:53 actually, let me look it up in Agner's manuals, that's simpler 19:28:09 some searches imply that movups is as fast as movaps at moving the data as of Nehalem if the data happens to be aligned 19:28:16 (I suppose one possible reason using LDO and LDOU even though is same is for profiling; I have used unofficial 6502 opcodes with same meaning as official ones for profiling in NES/Famicom emulators, before.) 19:28:20 but that the instruction decoder is apparently faster at decoding a movaps instruction 19:29:22 zzo38: did you use the duplicate NOPs, or are there duplicate instructions that have an actual effect? 19:30:19 ais523_: There are both. Mostly it is the duplicate NOPs I used, although the others can also be used. 19:30:47 (Although I have also used unofficial instructions that do not duplicate any official instructions, in places where those unofficial instructions are seeming like useful.) 19:31:34 LAX seems like it would be useful quite frequently; many of the others are rather specific but (if stable) would still help in places where their functionality happens to be needed 19:32:21 I only use the stable ones 19:32:24 chapter 13.9 of https://www.agner.org/optimize/optimizing_assembly.pdf seems to imply that on modern cpus the movdqa have no advantage over the movdqu anymore 19:32:50 ais523_: hmm wait, you ask about the single float load instructions instead? hmm 19:33:15 if the difference really is in the instruction decoder, I could believe that movdqa equals movdqu but movaps decodes faster than movups 19:33:29 because even instructions that are equivalent in effect will decode in different ways 19:33:29 I'm not sure then, maybe this is only for some instructions 19:34:02 ais523_: yes, they're really not the same, because movups is for four bytes, whereas movdqa is for a full 16 or 32 byte register 19:34:22 no, movups is the whole register I think 19:34:25 that's what the p means 19:35:00 oh 19:35:01 right 19:35:01 sorry 19:35:02 the difference in instruction naming is that movups is effectively treating the register as an array of scalars, whereas movdqu is treating it as one big number 19:35:05 they're full register 19:35:08 but for a copy that doesn't matter 19:35:19 ais523_: no, I think the difference is that integer vs float like above 19:35:35 they used to differ in older cpus, and you use the one that mathes the next instructions on that regiseter 19:35:56 if you do float ops then you use the movups, if you do integer ops next then you use movdqu 19:36:21 really, x86 is just a huge mess :-D 19:36:42 this is not really the messy part 19:36:47 Yes, especially the modern x86. The original 8088 was not so messy as the modern one. 19:36:53 There's a performance difference in some Core microarchitectures if you mix "domains" for SSE, the domains being integers vs. floats. 19:36:58 it would be considered messy, if not for the fact that it has the rest of x86 to compete with 19:37:23 oh, did you know that to compile 3 byte or longer nops for padding, you want to know which of the first eight integer registers have not been written for a while, because those nops have a false dependency? 19:37:31 so the compiler has to think even to just insert a fucking padding 19:37:54 You *can* use movdqa to move floats around, and movaps to move integers, but you should be using whatever matches the operations you're going to do with them next. 19:37:56 is that on Intel or AMD or both? 19:38:08 ais523_: intel, and possibly only some intel cpus 19:38:09 IIRC AMD's advice for long NOPs is to just keep stacking operand size modifiers on a NOP 19:38:24 so it goes NOP, WORD PTR NOP, WORD PTR WORD PTR NOP, etc. 19:38:25 ais523_: yes, that's also a sad part, you need different nop instructions for the different cpus 19:38:29 that is at least easy to remember 19:38:35 Intel's advice is a lot more complex 19:38:37 ais523_: amd's decoder handles that well, intel's decoder is slow in that 19:38:39 I did not know that, but yes it is a messy thing in x86, and x86 is also extremely messy in too many ways 19:38:44 MMIX is better. 19:38:49 b_jonas: presumably this is why AMD advises it :-D 19:38:56 yes, possibly 19:39:18 this is intel optimization manual chapter 3.5.1.10 19:39:31 6502 has an unofficial two-byte NOP which is basically just NOP with an immediate argument 19:39:46 And the "mixing SIMD data types" is right after, in 3.5.1.11. 19:39:47 is there a NOP version with a two-byte argument, making an unofficial three-byte NOP? 19:40:18 ais523_: Yes, and it is faster than just one byte NOP twice. There is NOP with two byte argument, although it isn't actually no operation; it reads from the specified address and then does nothing with the result. 19:40:40 oh, OK, so that might actually do something with some mappers 19:40:46 as they'll be able to observe the read even though the read value isn't used 19:40:54 ais523_: intel recommends LEA with a mod-m/r byte and a one-byte displacement 19:41:08 (Which might be used if some addresses have side effects for reading, such as some PPU registers, and some mappers) 19:41:16 the NES has some registers which have side effects when read 19:41:19 it's strange, because there _is_ a nop with a two-byte opcode and one byte of mod-m/r 19:41:23 b_jonas: where is the address being loaded? 19:41:24 but apparently that's slower or something 19:41:36 ais523_: back in the same register 19:41:50 ais523_: like, loads the address 0[EAX] to EAX 19:41:54 I'm not even conviced that's a /false/ dependency at this point 19:41:58 or 0[ESI] to ESI 19:42:07 in C, I wouldn't expect "x = x;" to be a NOP 19:42:19 like, I wouldn't be surprised if it did nothing, but I also wouldn't be surprised if it did something 19:42:34 ais523_: yes, but this isn't C, and the optimization manual explicitly says that it's a true nop 19:42:36 especially if x was being changed concurrently in another thread 19:42:51 but I guess that as we're talking about a register here, it can't be shared with anything 19:42:59 "The other NOPs have no special hardware support. Their input and output registers are interpreted by the hardware. Therefore, a code generator should arrange to use the register containing the oldest value as input, so that the NOP will dispatch and release RS resources at the earliest possible opportunity." 19:43:17 in this case I believe the optimization manual knows what it's talking about. I know it has typos, I've reported at least one, but usually it's right. 19:43:18 ("Other" meaning anything else than the "xchg eax, eax" one-byte NOP.) 19:43:37 do the other cases of xchg even have their same meanings? 19:43:57 ais523_: what do you mean "their same meanings"? 19:44:17 b_jonas: well, the code of xchg eax, eax was repurposed for nop 19:44:18 the statement talks about other nop instructions they recommend, not about other cases of xchg 19:44:24 as on a 32-bit processor it's a true nop and was commonly used for that purpose 19:44:41 but on a 64-bit processor, an actual xchg eax, eax instruction would clear the top 32 bits of rax 19:44:54 so xchg eax, eax would have had to be given a different encoding 19:45:19 I'm wondering if the xchg r, r instructions with different registers than eax twice still have the same encoding as on 32-bit x86, or whether those were also moved 19:45:34 the linux kernel has a header with n-byte nops for various n 19:45:40 on various microarchitectures 19:46:32 ais523_: hmm 19:46:33 -!- tromp has quit (Remote host closed the connection). 19:46:34 ais523_: The one-byte instruction has an implicit EAX as one operand. 19:46:40 ais523_: Yes, NES has some registers that have side effects when read. Some mappers also have, such as my Famizork mapper, where the bankswitching register doesn't care about read/write. It does care the value in the data bus though; the bankswitching register is mapped in many addresses including some over the mirrors of the console's RAM, so it switches to the bank specified by the value in RAM. 19:46:53 ais523_: It's 90+rd for "XCHG EAX, r32" (for the 32-bit size). 19:47:05 fizzie: so instructions like xchg eax, ebx still keep their encodings? 19:47:14 now I wonder what the canoncial way to clear the top 32 bits of rax are 19:47:33 movzx eax, rax, possibly 19:47:52 (I don't know of any other mapper that maps stuff over stuff internal to the console, except that MMC5 spies on some of the PPU registers.) 19:47:57 Yes, they use 87 /r for XCHG r/m32, r32. 19:48:23 ais523_: that is a good question, now I'm confused. lookging up how this works in the manual. you know by the way that XCHG EAX with a register has a special one-byte shortcut encoding, and that's the one byte nop, right? 19:48:41 yes 19:48:44 whereas eg. XCHG EDX, EDX is a different encoding with a normal mod-r/m byte 19:48:47 but that doesn't invalidate your question 19:50:14 sadly this is the kind of info that is really hard to find in the intel manual 19:50:46 (Famizork also uses the smallest bank size than all other mappers: A bank is only a single byte long.) 19:51:27 I assume "xchg eax, eax" encoded the long way (87 C0) would actually clear the top 32 bits, but I doubt that's the "canonical" way. 19:52:17 Fun fact: ndisasm decodes 90 to "nop" and 87 C0 to "xchg eax, eax", but assembles "xchg eax, eax" into a nop: http://ix.io/1BXb 19:52:25 reading around this subject, I discovered that apparently "xor r10d, r10d" is a more efficient way to zero r10 than "xor r10, r10" is, even though you need a rex prefix either way 19:53:08 because some processors only recognise the zero-extended 32-bit version as a special case (this is the case that matters for the first eight registers as those don't need the prefix) 19:54:24 what a mess 19:54:33 fizzie: Why does it do tat? 19:55:07 zzo38: I would guess they haven't specifically considered that case, and it just falls out of how it got implemented. 19:56:47 GNU as, on the other hand, assembles "xchg %eax, %eax" into 87 C0. 19:57:07 incidentally, one processor architecture idea I had was to make the registers one bit wider than the memory that's intended to be read/written with them 19:57:19 and then remove the flags, conditionals instead look at the values in a register 19:57:23 (...in 64-bit code. In 32-bit code it assembles it to a 90-nop.) 19:57:40 so, e.g., jump-if-carry would jump if the top bit of a register were set 19:57:41 So I guess for proper comparison I should've said bits 64 to nasm too. 19:57:51 fizzie: which makes a difference 19:57:58 Yes, it does. 19:58:03 Well, that's reasonable enough. 19:58:17 -!- arseniiv has quit (Ping timeout: 246 seconds). 19:58:28 ais523_: the AMD manual says that the 0x90 opcode, if it would exchange EAX with EAX (that isn't always the case because of REX prefix), has special handling to preserve the upper dword of RAX 19:59:03 that's a reasonable way to define the behaviour (although I think defining it as NOP would be even more reasonable!) 19:59:32 ais523_: it does say it's treated as a NOP 19:59:45 ais523_: also the intel manual also says that at the XCHG instruction's description 19:59:49 it's just harder to fine 19:59:51 find 19:59:55 Nevertheless that is strange 20:00:20 ais523_: the AMD manual actually uses the phrase "true NOP" 20:00:27 zzo38: NOP-e. 20:01:12 whereas the intel uses the phrase "alias for NOP" (as in, there's a set of NOP instructions documented separately) 20:01:47 They'd have to invent a new one byte nop otherwise. And one byte opcodes are a very scarce resource. 20:02:23 ais523_: as for zeroing the register, I think that also depends on the cpu and you'd best check what the optimization manual for the right processor series says or what agner's manual says 20:03:04 b_jonas: zeroing an entire register, the consensus is that if you don't care about the flags, 32-bit xor is the best option regardless of the register 20:03:18 Still it look like strange if 0x90 opcode does not normally do that, then why it should do then? 20:03:26 ais523_: yes, I also thought of putting the carry on top of the register in such a way that only a few instructions access it, the others that write the register write an unspecified value in that bit, and the ones that read the register usually ignore that bit, except for special ones that read the carry 20:03:32 What is strange in Glulx is the "copys" and "copyb" instructions, which work differently from all other instructions. 20:03:40 I'm more interested in partial zeroes of the high byes (e.g. rax %= 256) 20:03:47 -!- grumble has quit (Quit: grumble). 20:03:50 b_jonas: What happens if you put in a REX prefix that doesn't have REX.W set in front of 90? 20:04:15 -!- grumble has joined. 20:04:26 ais523_: I'm quite sure the opt manual says things about that, both for index registers and vector registers 20:04:36 (ndisasm -b 64 decodes both "40 90" and "42 90" as plain nop, but not sure if I'd trust that.) 20:05:03 anyway, I had better go home, I think 20:05:14 bye everyone (I typoed that as "byte", maybe I should have left it?) 20:05:31 -!- ais523_ has quit (Quit: quit). 20:08:24 fizzie: IIUC if you make it exchange EAX with R8L or R8L with R8L then it will clear the bits above bit 32 of all registers involved, but check the manuals before you want to depend on that 20:09:37 Sure, I was just wondering what happens if you still make it "XCHG EAX, EAX" but just put in REX prefix, either just plain 40 or with the SIB index register extension bit (which doesn't affect anything) set. 20:12:59 ais523: hmm, interesting. the intel opt'n manual does talk about zeroing reigsters, but doesn't seem to say that to clear one of the high eight index reigsters with XOR or SUB, you should use 32-bit instead of 64-bit operands 20:13:34 (or I'm looking at the wrong place) 20:14:42 fizzie: if you use the one-byte shortcut XCHG EAX,EAX with a REX prefix that does nothing, that will still be a nop 20:15:12 I'm not sure if you use the normal non-shortcut encoding that has the mod-r/m byte 20:15:40 -!- tromp has joined. 20:15:42 I think with the mod-r/m byte it will clear the top half of the registersso won't be a nop 20:16:21 b_jonas: the question is whether the REX prefix does something in this case... namely turn the nop into a "proper" xchg eax,eax. 20:18:29 (I guess it could also raise a #UD, wouldn't that be fun :) ) 20:19:57 int-e: no, I told you it doesn't 20:20:05 even with the REX prefix, it would be a NOP 20:20:09 or so I read the manual 20:20:23 it might be a less efficient NOP of course, but still a NOP 20:32:32 -!- tromp has quit (Remote host closed the connection). 20:33:13 experimentally you're right 20:44:50 -!- tromp has joined. 20:46:51 ``` set -e; cd tmp; >a.c echo $'#include \n#include \n''int main() { uint64_t x = 0xC69B455dd809C270; asm(".byte 0x90" /* one-byte NOP */: "+a"(x)); printf("x=%016lX,\n", x); return 0; }'; gcc -fdiagnostics-color=never -Wall -O a.c; ./a.out 20:46:52 x=C69B455DD809C270, 20:46:55 ``` set -e; cd tmp; >a.c echo $'#include \n#include \n''int main() { uint64_t x = 0xC69B455dd809C270; asm(".byte 0x87, 0xC0" /* ordinary XCHG EAX, EAX */: "+a"(x)); printf("x=%016lX,\n", x); return 0; }'; gcc -fdiagnostics-color=never -Wall -O a.c; ./a.out 20:46:56 x=00000000D809C270, 20:47:41 0x40 0x90 is what we were discussing 20:48:43 ``` set -e; cd tmp; >a.c echo $'#include \n#include \n''int main() { uint64_t x = 0xC69B455dd809C270; asm(".byte 0x40, 0x90" /* shortcut NOP with redundant REX prefix */: "+a"(x)); printf("x=%016lX,\n", x); return 0; }'; gcc -fdiagnostics-color=never -Wall -O a.c; ./a.out 20:48:44 x=C69B455DD809C270, 20:48:49 int-e: yep 20:51:10 how do I request specifically the R8 register in a gcc extended asm statement? 21:04:35 ``` set -e; cd tmp; >a.c echo $'#include \n#include \n''int main() { uint64_t x = 0x0912A80D0A994D81; uint64_t y = 0xC8162E5AEE063460; asm("mov %1, %%r8\n\t.byte 0x45, 0x87, 0xC0\n\tmov %%r8, %1" /* XCHG R8D, R8D */: "+a"(x),"+r"(y):: "cc","r8"); printf("x=%016lX, y=%016lX,\n", x, y); return 0; }'; gcc -fdiagnostics-color=never -Wall -O a.c; ./a.out 21:04:36 x=0912A80D0A994D81, y=00000000EE063460, 21:04:40 ``` set -e; cd tmp; >a.c echo $'#include \n#include \n''int main() { uint64_t x = 0x0912A80D0A994D81; uint64_t y = 0xC8162E5AEE063460; asm("mov %1, %%r8\n\t.byte 0x41, 0x90\n\tmov %%r8, %1" /* shortcut XCHG EAX, R8D */: "+a"(x),"+r"(y):: "cc","r8"); printf("x=%016lX, y=%016lX,\n", x, y); return 0; }'; gcc -fdiagnostics-color=never -Wall -O a.c; ./a.out 21:04:41 x=00000000EE063460, y=000000000A994D81, 21:33:05 ``` set -e; cd tmp; >a.c echo $'#include \n#include \n''int main() { uint64_t x = 0x0912A80D0A994D81, z; register uint64_t y asm("%r8") = 0xC8162E5AEE063460; asm(".byte 0x41, 0x90" /* shortcut XCHG RAX, R8D */: "+a"(x),"+r"(y):: "cc"); z = y; printf("x=%016lX, y=%016lX,\n", x, z); return 0; }'; gcc -fdiagnostics-color=never -Wall -O a.c; ./a.out 21:33:07 x=00000000EE063460, y=000000000A994D81, 21:33:33 ^ that's the official answer for how to get the value to the R8 register for the asm statement, per https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Local-Register-Variables.html#Local-Register-Variables 21:44:16 the required syntax is strange 21:51:03 -!- xkapastel has quit (Quit: Connection closed for inactivity). 21:57:13 [[Pyhton (sic)]] M https://esolangs.org/w/index.php?diff=60071&oldid=60069 * Something Fawful * (+2) /* Hello World */ fixed a typo in the second program that made it output "Hhllo World!" instead of "Hello World!" 21:58:29 I didn't know you could include the % in a local register variable, I've only seen it as `register uint64_t y asm("r8")`. 21:58:33 Both seem to work. 22:01:44 fizzie: the docs aren't specifically clear about this. I include the percent sign and hope that if I shouldn't include the percent then I'll get a warning or error. 22:03:22 the inline asm expects at&t notation, so I expect I should name registers the way at&t notation names them 22:05:01 That's reasonable, although so is the argument that % is just the sigil for a register in an assembly statement and not part of the register name. 22:05:32 You do get an error for invalid names, so since both %r8 and r8 don't error out, I'm guessing they're treated the same. 22:08:38 fizzie: I don't know any sense in which it's not part of the register name, unless you're using intel syntax, which we clearly aren't using. the rust people argue that the name of the macro is `print` rather than `print!` and the `!` is a sigil to _invoke_ the macro, which makes sense because if you want to _define_ a macro, you don't use the bang. 22:08:56 I don't know a context where you refer to the register without the percent sign 22:09:10 in C/C++ code with gcc or assembly code 22:12:41 Well, in a 'register' variable you can. :) 22:13:48 More seriously, the GNU as manual says "AT&T register operands are preceded by ‘%’", which you can definitely read as saying the % part is not part of the register, but part of the syntax for referring to a register. 22:14:25 you can do intel syntax inline asm these days 22:14:49 Also, the canonical excample at https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Extended-Asm.html#Extended-Asm puts "rdx" in the clobber list without a % prefix. 22:15:23 (Look for "rdtsc" on the page.) 22:15:39 [[Pyhton (sic)]] M https://esolangs.org/w/index.php?diff=60072&oldid=60071 * Something Fawful * (+1) /* Truth Machine */ Fixed some errors in the code here too. I probably shouldn't have tried to copy the code directly from another computer. 22:16:00 (I don't know what an "excample" is.) 22:16:03 fizzie: hmm 22:16:15 kmc: sure, by assembling with yasm 22:16:32 You can use Intel syntax with GCC as well. 22:16:48 fizzie: ok, good point about that example in the manual 22:17:11 By switching with -masm=intel globally, or by adding the right ".intel_syntax noprefix" directives around an inline asm segment. 22:17:49 (Though I don't think there is a "resume whatever the previous syntax was" directive, so you can't make an inline asm segment that works both with -masm=intel and not.) 22:17:52 mhm 22:18:29 (They should have a .pop_syntax.) 22:18:38 yeah 22:18:50 or like scoped to labels 22:19:05 .intel_syntax noprefix 1f; ... 1: 22:19:08 the numbered relative labels are tg 22:19:22 oh, there's popsection too 22:19:24 fizzie: youv'e seen the metadata table tricks that Linux does? 22:19:38 Probably not? 22:20:35 -!- MDude has quit (Ping timeout: 255 seconds). 22:21:13 here's an example https://github.com/torvalds/linux/blob/v4.20/arch/arm/include/asm/assembler.h#L246-L251 22:21:48 that macro inserts an instruction sequence x, and also writes an entry into a special section __ex_table. the linker is told with "a" to append all of these into that section 22:22:00 and the entry refers to the address of the instruction sequence 22:22:10 which is handled in object code using relocations in the usual way 22:22:16 Linux uses this trick for many things 22:22:31 this particular example, the goal is to annotate instructions which read from userspace memory 22:22:44 so that if they fault, the kernel can return -EFAULT or whatever, instead of panicing as with a usual kernel-mode fault 22:22:46 kmc: Linux used to have many dirty tricks back when gcc didn't have all the features they needed. these days less and less of them are needed. 22:23:03 they also use it for various sorts of self modifying code 22:23:16 for example, the kernel has a table of every single LOCK prefix in the code 22:23:27 what? 22:23:32 if a SMP-capable kernel is booted on single-core machine, it can overwrite those LOCKs with NOPs 22:23:44 there are many forms of smc in the linux kernel 22:23:47 wow that's scary 22:23:59 in order to do tracing, debugging, and to reoptimize the same binary kernel for different CPUs at boot time 22:24:02 b_jonas: what's even better 22:24:05 if you hot(un)plug a CPU 22:24:10 it will rewrite them /at runtime/ 22:24:13 -!- MDude has joined. 22:24:13 yeah, there was probably an intermediate time betweenm the time when everyone had non-SMP machines and when everyone had SMP machines 22:24:26 mhm 22:24:27 kmc: wait, seriously? 22:24:38 I know debian shipped a separate -smp kernel at one point, which would avoid the need for this 22:24:47 but it's useful in general to have a single kernel binary that works well on as many machines as possible 22:24:50 b_jonas: I believe so 22:24:50 there are machines with hotplugged cpus but only one core in a cpu? 22:24:54 I guess? 22:25:00 kmc: sure, the separate smp makes sense because there are differences other than lock prefixes 22:25:06 yeah 22:25:18 but that was back in x86_32 22:25:21 and of course ksplice uses self modifying code too 22:25:26 which is how I know about thi sstuff 22:25:33 because it also has to play nice with the OTHER forms of smc 22:25:44 most x86_64 cpus have more than one core, so the non-smp kernels became irrelevant 22:25:54 well 22:25:55 not quite 22:26:04 you might still want them in a virtualized environment 22:26:07 smc tricks use stop_machine() which essentially gives one kernel thread full control of the machine (ignoring SMM and the other stuff that goes on below the OS layer) 22:26:17 b_jonas: I think that's part of the justification, yeah 22:26:50 and some people do run linux on underpowered arm machines 22:26:55 those may still be single-cored 22:26:55 fun fact: the PowerBook Duo had a hot-plug FPU 22:27:02 in the dock 22:27:14 these things are scary 22:27:23 you could use it as a graphics workstation at your desk, then take it portable and run the same code, albeit slower, with soft FPU 22:27:27 really neat imo 22:27:37 I guess the modern version is having a GPU on Thunderbolt or something 22:27:42 features that are only ever used in servers in banking industry that have to be super-reliable 22:27:47 yeah 22:28:01 do they have a hot-plug motherboard too? 22:28:06 I don't know how that would work 22:28:32 the powerbook? 22:28:37 FPUs as discrete chips were common back then 22:28:50 you would need to run some bus lines from the internal mobo to the doct through the dock connector 22:28:56 but you'd probably need that for other things, anyway 22:29:19 "run the same code, albeit slower, with soft FPU" => that was done a lot without hotplug too, on machines with optional cpus, such as the 386 and 486, where programs overwrite float operations at load time 22:29:21 I think Lenovo has switched to Thunderbolt-based docks, and some of those do have external GPUs, like the https://www.lenovo.com/gb/en/accessories-and-monitors/docking/universal-cable-docks-thunderbolt/Thunderbolt3-Graphics-DockUK/p/G0A10170UK 22:29:21 the dock is a thing you slide the whole laptop into, like it's a huge tape cartridge or something :D 22:29:26 b_jonas: right 22:29:51 b_jonas: I think that was common on OS Classic because, even aside from this weird PowerBook, most macs didn't ship with a FPU, but many people would add one 22:29:52 so that the first one and half bytes of the operation were either WAIT; ESC or INT 22:30:29 unfortunately the 68LC040 has a hardware erratum which prevents kernel mode FPU emulation from working correctly :/ 22:30:39 it needn't even be a discrete chip or anything, as long as the same binary is distributed to clients with different machines 22:31:02 as I discovered when trying to install Debian on a LC 475 back... gosh, almost 20 years ago 22:31:09 smh, i'm old now 22:31:15 in fact I'm older than I've ever been 22:31:18 and now I'm older still 22:31:26 oh, and it needn't even overwrite the individual calls in load time, so it doesn't need a symbol table, it can just have the emulation routines overwrite their caller 22:32:29 the 68k mac linux bootloader is an ordinary OS Classic program which kexecs linux 22:32:52 it relies on macos to set up some of the hardware 22:33:03 and besides which the actual boot rom is only equipped to boot mac os 22:33:11 (and maaaaybe A/UX) 22:34:18 -!- SomethingFawful has joined. 22:34:36 The PPC Mac Linux I was using ran the kernel hosted on the Mach microkernel. 22:34:39 https://en.wikipedia.org/wiki/MkLinux 22:35:40 I think the bootloader was slightly odd too. 22:35:42 yeah 22:35:46 I tried that as well 22:36:20 kmc: I have no problem with that unless it slows down the boot process too much. doesn't windows do something like that too these days? 22:36:29 hm? 22:36:43 you know, I've noticed that every bootloader eventually grows to be an OS, which needs its own bootloader 22:36:56 as in, sometimes I suspect that it pre-loads some parts of the default windows during the boot menu, at least the parts it can safely discard if you choose to boot a different OS 22:37:00 (I think on the iBook I could run a more regular Linux? MkLinux was just on the Performa some-number-or-another.) 22:37:01 maybe 22:37:05 the windows bootloader that is 22:37:15 fizzie: yeah, the G3+ OpenFirmware macs are easier to do linux 22:37:21 I ran stock Debian on a toilet-seat iBook among others 22:37:32 OFW can load an ELF (or whatever) image kernel easily 22:37:38 Right, yes, they did the OpenFirmware thing. 22:37:43 "toilet-seat iBook"? what's that? 22:37:47 b_jonas: google it 22:37:56 [[Pyhton (sic)]] https://esolangs.org/w/index.php?diff=60073&oldid=60072 * Something Fawful * (+14) lowercased the title. 22:38:10 I don't know much about older apple hw, because they weren't too popular here 22:38:34 the modern apple are more popular these days 22:38:48 still not as popular as in the US, I believe 22:38:55 OpenFirmware has a Forth shell, it's the greatest thing. 22:40:04 yep 22:40:28 a friend of mine spent a while writing a QR code decoder in OFW forth, for OLPC 22:41:13 they have a supported way to root the machines, but they ship locked down in order to deter theft. the idea is that you get the lock key out of band. and the easiest / cheapest way would be a qr code 22:41:22 but I think in the end it didn't work :/ 22:41:34 I used loadlin on DOS to load linux. DOS is less of an operating system than the stuff they cram into boot loaders these days. 22:42:00 me too 22:42:07 or BIOSes 22:42:45 you could use loadlin and then you could use other hacks to run your Linux root filesystem on FAT16 so they could coexist without partitioning 22:42:54 okay uh, question, if I have a Python interpreter for the esolang I have recently made, would I be wanting to upload it on an external server somewhere or would I be uploading it to esolangs.org directly. 22:43:10 C:\LINUX 22:44:04 kmc: when i give up on all software should i write in c or should i make a new language first 22:44:06 twh 22:44:08 int-e: yes, those too 22:44:28 When I was making sure my SS5 was still at least somewhat working (before giving it away), it turned out the EEPROM chip had given up, and the only way I could make it boot was to say "1 0 mkp real-machine-type 1 mkp 8 2 mkp 0 3 mkp 20 4 mkp 87 5 mkp cc 6 mkp 1d 7 mkp c0 c mkp ff d mkp ee e mkp 0 f 0 do i idprom@ xor loop f mkp" in the OpenBoot prompt on every restart. 22:44:35 how large is grub2 these days? 22:44:49 I hope it still fits a floppy at least 22:44:54 hmm 22:44:57 that's quite a mouthful 22:45:07 b_jonas: probably not including every single module 22:45:15 but for a minimal boot yeah 22:45:15 cna loadlin append-load a kernel that's stored on more than one floppy disk? 22:45:20 heh 22:45:27 good question 22:45:33 because these days kernels don't fit floppies either 22:46:26 SomethingFawful: If it's of non-trivial size, it's probably a better bet to pick one of the code hosting sites (github, gitlab, bitbucket) and link to that. Or https://github.com/graue/esofiles if graue is actually still accepting pull requests. 22:46:43 kmc: huh, I never tried to have linux and dos coexist without partitioning, except in as much as storing the kernel on the DOS partition 22:47:04 I do know that you can use umsdos or whatever that thing is called to do that, but I don't think it's a particularly good idea 22:47:22 hey wait 22:47:27 someone came in with an on-topic question 22:47:37 yes, yes I did. 22:48:15 I want to say at less than 5 KiB it's size is currently qualifiable as Trivial, but we'll see when I get those last 2 functions done. 22:48:57 SomethingFawful: if the interpreter isn't too large and you can and want to allow distributing it without license constraints per https://esolangs.org/wiki/Esolang:Copyrights , then you can put it on the wiki 22:49:12 you can link from an externally hosted copy no matter what 22:49:34 okay thanks 22:50:42 I think somewhere between two and ten screenfuls of text is the boundary what's still reasonable to embed in a wiki article. 22:51:00 I don't know what you can do as a file upload, I think the existing ones are almost exclusively pictures. 22:51:38 To run DOS program and Linux on same computer I just use Linux, and then use a emulator to run the DOS programs. (There is still the use with DOS; it boots much faster than Linux or Windows, and if you use only DOS programs then it may work much better than other operating systems. Or if you want a sufficiently small operating system for some simple thing, DOS will do.) 22:51:39 Apparently not "almost" but "entirely", per https://esolangs.org/wiki/Special:MediaStatistics 22:52:29 zzo38: well sure, that is the reasonable thing to do _now_, when we have machines with tons of memory 22:52:31 (Why does Bitz hello world2.jpg have application/photoshop as its MIME type, and no links?) 22:52:39 and a powerful video card 22:53:23 fizzie: we're in esoteric-land. you could upload a polyglot that's both an image and an interpreter. 22:53:26 Yes, but still if you have a machine with less memory or other video card, is another thing you might use DOS for, perhaps. 22:53:55 b_jonas: In this case, looks like someone has uploaded a .psd file with a .jpg extension. 22:54:00 zzo38: yes, that's why back when I only had such machines, I dual-booted rather than used an emulator 22:54:08 also the emulator software was more buggy back then 22:54:40 psd? what's that? 22:54:51 Photoshop's native file format. 22:54:52 photoshop document 22:55:00 ah 22:55:09 (Gimp can open it, that's why I know what's inside.) 23:04:38 -!- xkapastel has joined. 23:28:15 [[Pyhton (sic)]] https://esolangs.org/w/index.php?diff=60074&oldid=60073 * Something Fawful * (+108) added a link to the offical implementation. 23:32:29 -!- AnotherTest has quit (Ping timeout: 246 seconds). 23:47:51 -!- oerjan has joined. 23:52:15 -!- Essadon has quit (Quit: Qutting).