00:10:30 [[Echidna]] https://esolangs.org/w/index.php?diff=66003&oldid=65993 * Lykaina * (+0) updating with newest interpreter link. 00:12:21 made changes to both interpreter and spec_notes file 00:12:54 Lykaina: too late today, but warn me later to look at them 00:13:06 s/warn/remind/ 00:13:12 k 00:15:14 -!- unlimiter has joined. 00:17:24 i hope page 3 of the pdf is helpful 00:18:30 it's also known as "Never ask me do to documentation for something that matters." 00:21:11 -!- xkapastel has quit (Quit: Connection closed for inactivity). 00:32:05 The TUTOR language has 150 variables, named v1 through v150, which can be assigned names. 00:32:12 I just... *blink* 00:32:43 hi Sgeo 00:32:50 That seems like enough? 00:33:01 You only needs two anyway. 00:33:21 Hi Lykaina 00:36:28 `` ls tmp 00:36:29 a.c \ a.out \ compiled_brachylog.pl \ input.brachylog \ jeval.whatis \ out \ OUT \ out.a \ out.a.hd \ out.a.xxd \ paste \ spline \ spout \ spout.raw \ tmp.txt 00:36:32 `` tmp/out.a 00:36:33 finally 00:36:39 tg 00:36:42 `` file tmp/out.a 00:36:43 tmp/out.a: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped 01:00:07 -!- tromp has joined. 01:02:16 -!- unlimiter has quit (Quit: WeeChat 2.5). 01:05:27 -!- tromp has quit (Ping timeout: 264 seconds). 01:29:30 -!- unlimiter has joined. 02:12:52 `url tmp/out.a.hd 02:12:53 https://hack.esolangs.org/tmp/out.a.hd 02:15:33 Someone over at ##c wanted `a || b` on pointer-typed operands to yield the first non-null value, instead of 0 or 1. 02:17:13 -!- unlimiter has quit (Quit: WeeChat 2.5). 02:17:31 Speaking of the amd64 System V ABI, I'm still kind of confused about %rdx. 02:18:54 You're supposed to register it with atexit, when you're using the ELF interpreter with dynamic linking. 02:19:21 But I seem to get 0 in that register even in that case? 02:20:49 I guess it might be that the system may or may not provide it? Though that's not what the spec says. 02:21:00 But how are you supposed to know? 02:21:14 Well, if it's null presumably you don't need to register it. 02:21:17 Maybe you just check for 0, but I don't like that. What if it's initialized to something else? 02:21:53 By "may or may not provide" I meant it'd always set it to 0 if it doesn't need you to register anything. 02:22:13 Well, it would be nice if any standard specified that. 02:22:16 But that's just something that could make sense, I don't have any proof for that. 02:22:22 What does BA_OS mean anyway? 02:22:40 Good question. 02:23:02 Base System 02:23:36 Yes, apparently they are sections of the System V Interface Definition. 02:23:39 See https://stackoverflow.com/questions/37419635/in-the-elf-spec-what-does-ba-os-and-ke-os-mean and the linked PDF. 02:23:43 Which presumably you already found. 02:26:43 Maybe I should just look at what crt.o does. 02:26:49 Unfortunately it's all such a mess. 02:28:15 That's what all software is. I'm always surprised it works as often as it does. 02:28:56 I've been writing Go recreationally lately. 02:29:07 `` echo >/tmp/test.s $'.text; .globl _start; _start: mov $60, %rax; mov $123, %rdi; syscall'; as -o /tmp/test.o /tmp/test.s && ld -dynamic-linker /lib64/ld-linx-x86-64.so.2 -o /tmp/test /tmp/test.o && /tmp/test; echo $?; file /tmp/test 02:29:08 123 \ /tmp/test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped 02:29:34 What's the flag to give to ld to make that dynamically linked? 02:30:33 I don't remember, ld is awkward to use directly. It's not -shared, because that's what creates shared objects. 02:30:48 -Bdynamic? 02:30:58 I tried that and it was still static. 02:31:12 I guess -lc works but that does rather a lot more than I want here. 02:31:46 Also this is pointless because I don't know how to output the value of %rdx in HackEso. 02:31:54 I'd use gdb locally. 02:32:38 I mean, you don't need all the bits just to see if it's zero or not. 02:32:45 You did just output the value 123 there. 02:32:45 That's true. That was my plan. 02:32:54 I think it'll be 0. 02:33:18 Maybe it needs to have a some NEEDED entries to not count as "statically linked" for file. 02:33:47 `` file /bin/ls 02:33:48 ​/bin/ls: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=3c233e12c466a83aa9b2094b07dbfaa5bd10eccd, stripped 02:34:01 If it was dynamically linked I think it'd say "shared object" instead of "executable". 02:34:46 It would at least name the interpreter. 02:36:59 Oh, right, execve can tell you ENOENT when the interpreter isn't found. 02:37:31 `` echo >/tmp/test.s $'.text; .globl _start; _start: mov $60, %rax; mov $123, %rdi; syscall'; as -o /tmp/test.o /tmp/test.s && ld -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /tmp/test /tmp/test.o -lc && /tmp/test; echo $?; file /tmp/test 02:37:32 123 \ /tmp/test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, not stripped 02:38:39 Right. I guess ld might just not be willing to make a dynamically linked thing without any libraries. 02:39:39 Probably something unknowable to mortals involving linker scripts. 02:40:23 `` echo >/tmp/test.s $'.text; .globl _start; _start: mov $100, %rdi; test %rdx, %rdx; jz e; mov $105, %rdi; e: mov $60, %rax; syscall'; as -o /tmp/test.o /tmp/test.s && ld -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /tmp/test /tmp/test.o -lc && /tmp/test; echo $? 02:40:25 105 02:40:48 Uh oh. Is that saying that rdx is nonzero? 02:40:56 That's what it sounded like. 02:41:01 Wait, I'm starting to remember this. There was something complicated here. 02:41:24 `` echo >/tmp/test.s $'.text; .globl _start; _start: call %rdx; mov $60, %rax; mov $123, %rdi; syscall'; as -o /tmp/test.o /tmp/test.s && ld -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /tmp/test /tmp/test.o -lc && /tmp/test; echo $? 02:41:25 ​/tmp/test.s: Assembler messages: \ /tmp/test.s:1: Warning: indirect call without `*' \ 123 02:41:35 Hmm. 02:41:43 So now I'm not sure what issue I ran into. 02:41:49 But there was definitely something. 02:43:26 -!- aloril_ has quit (Ping timeout: 258 seconds). 02:45:00 `` echo >/tmp/test.s $'.text; .globl _start; _start: push %rdx; mov $1, %edi; mov %rsp, %rsi; mov $8, %edx; mov $1, %eax; syscall; mov $60, %eax; syscall'; as -o /tmp/test.o /tmp/test.s && ld -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o /tmp/test /tmp/test.o -lc && /tmp/test | hd 02:45:02 000000 a0 fb 00 40 00 00 00 00 >...@....< \ 000008 02:45:04 OK, I was testing this with musl libc where it doesn't work so well. 02:45:06 Looks nonzero to me. 02:45:45 0x4000fba0 might be a plausible pointer as well, maybe? 02:45:48 `cat /proc/self/maps 02:45:48 00100000-00102000 r-xp 00000000 00:00 0 \ 40000000-40023000 r-xp 00000000 00:0f 1336451 /lib/x86_64-linux-gnu/ld-2.24.so \ 40023000-40025000 rw-p 00000000 00:00 0 \ 40025000-401c1000 r--p 00000000 00:0d 1440239 /usr/lib/locale/locale-archive \ 401c1000-401e3000 rw-p 00000000 00:00 0 \ 40223000-40224000 r--p 00023000 00:0f 1336451 /lib/x86_64-linux-gnu/ld-2.24.so \ 40224000- 02:46:33 I mean, I called it in the program above, so it's certainly a plausible function pointer. 02:48:16 -!- tromp has joined. 02:48:57 OK, this is interesting. I remember now. 02:49:21 musl's ELF interpreter is passing _start's address in %rdx. 02:50:54 And now I see I had a comment saying this in my ELF generator program. 02:52:16 `` echo >/tmp/test.s $'.global _start; _start: mov $1, %eax'; as -o /tmp/test.o /tmp/test.s && ld --oformat=binary -o /tmp/test /tmp/test.o && wc -c /tmp/test 02:52:18 5 /tmp/test 02:52:20 `` echo >/tmp/test.s $'.global _start; _start: mov $1, %rax'; as -o /tmp/test.o /tmp/test.s && ld --oformat=binary -o /tmp/test /tmp/test.o && wc -c /tmp/test 02:52:21 7 /tmp/test 02:52:31 Just as an aside. 02:52:51 -!- tromp has quit (Ping timeout: 264 seconds). 02:54:12 You're commenting on my "mov $60, %rax" and so on? 02:54:50 Well, not really "commenting on", but related to. 02:54:51 It's true that I almost ran up against HackEso's time and memory limits with those extra bytes. 02:54:56 But it's true. 02:55:17 I was going to use cmp %rdx, $0 but I thought people would make fun of me. 02:55:26 So I used test %rdx, %rdx instead. 02:55:56 Sadly it was too late. 02:59:32 I have a thing that does a thing every few hours or so. I'd like to know if it starts failing to do the thing. I added Prometheus counters for total things and failed things, but I'm a little afraid the natural timescale of Prometheus is not well suited to that. (I'm sure it *can* work, but still.) 02:59:35 -!- aloril has joined. 03:02:11 (I don't want to make it do the thing more often, because it does the thing to someone else's thing, and anyway it doesn't need to because usually it's just the same thing.) 03:04:00 Hmm, what's the issue here? 03:05:58 I thought there should be made Magic: the Gathering card named "Leper Window", but am unsure what it should be. 03:06:20 either a M:tG card or a band 03:06:39 hi kmc 03:06:58 are you in for scrapping all existing software 03:07:02 I guess it isn't really an issue, it just feels wrong to sample the thing every minute or every five minutes because it's almost never changing, and then there's a lot of samples. But from what I recall, Prometheus can't really do sparse sampling. 03:07:44 shachaf: meh 03:08:12 except for sdr of course 03:09:48 fungot: How do you feel about getting scrapped? 03:09:49 fizzie: know of any 03:10:18 fungot: Anyone who got scrapped? No, not really. 03:10:18 fizzie: my favourite fractal is still cantor's dust :) i was just requesting a heap of muck. but some. 03:12:02 kmc: how do you feel about scrapping all non-kittens 03:12:22 You can make up a band called that too, maybe. 03:12:27 i was telling the miri folks about how i want to make a kitten maximizer 03:12:41 some of them seem nervous about the idea 03:14:46 fixed the Echidna documentation 03:14:58 for now 03:15:22 clarified pg 3 03:21:16 shachaf: how about an everything minimizer 03:25:44 no hth 03:26:51 only things beginning with the letter n 03:27:06 or was that a maximizer? 03:27:49 https://english.lem.pl/works/novels/the-cyberiad/146-how-the-world-was-saved 03:49:39 -!- Spexty has joined. 03:54:03 -!- Spexty has quit (Ping timeout: 260 seconds). 04:03:45 The "arrow" command in TUTOR is weirdly named. It doesn't just drawn an arrow 04:29:28 What does the "arrow" command in TUTOR mean, then? 04:36:29 -!- adu has joined. 04:36:53 -!- tromp has joined. 04:41:05 -!- tromp has quit (Ping timeout: 250 seconds). 04:55:42 It prompts the student for input, and enters a judging mode for commands like answer or wrong to pattern match against the input. I think 04:56:14 "A judging block in TUTOR is a control structure that begins with an arrow command and ends with the next arrow, endarrow or unit command. The arrow command also prompts for input, with the special arrow character (resembling "▷") displayed as a prompt at the indicated screen coordinates. In effect, a judging block can be thought of as a backtracking control structure where the student may make multiple attempts to answer a question unti 04:56:14 l a correct answer allows forward progress." 04:56:31 https://en.wikipedia.org/wiki/TUTOR_(programming_language) 06:10:42 -!- tromp has joined. 06:12:22 -!- tromp_ has joined. 06:14:02 [[GolfJoke]] M https://esolangs.org/w/index.php?diff=66004&oldid=54460 * A * (+734) 06:15:55 -!- tromp has quit (Ping timeout: 276 seconds). 06:16:51 -!- tromp_ has quit (Ping timeout: 264 seconds). 06:19:08 [[GolfJoke]] M https://esolangs.org/w/index.php?diff=66005&oldid=66004 * A * (-735) 06:19:54 [[GolfJoke]] M https://esolangs.org/w/index.php?diff=66006&oldid=66005 * A * (+12) 06:31:34 fizzie: So here's the entry point call in musl: https://github.com/ifduyue/musl/blob/master/ldso/dynlink.c#L1742 06:31:59 Apparently it just uses an automatically-selecte register, so with one version I was getting the entry point in rdx and in another version I was getting it in rax (and rdx was 0). 06:32:21 So I feel like something is wrong here because it's obviously not passing something in in rdx. 06:32:41 (Also I mean entry point jump, not call, of course.) 06:39:17 -!- tromp has joined. 06:58:24 Should rodata be mapped -x? 06:58:36 I wonder how likely it is to contain ROP gadgets or that sort of thing. 07:02:48 ro ro ro your data 07:02:59 is there a good reason why it should be +x? 07:03:00 besides fun 07:05:58 -0.2 rounds to 0 in TUTOR's conditional statements that compare an expression and have different branches for negative, zero, and individual positive numbers 07:06:38 I don't think so? 07:06:53 You can load it in one segment rather than two. 07:07:13 The Go compiler generates three load segments, r, rx, rw 07:07:22 Whereas gcc/clang generate only rx and rw. 07:18:18 [[GolfSpace]] N https://esolangs.org/w/index.php?oldid=66007 * A * (+361) Created page with "[[GolfSpace]] is a joke esolang inspired by [[Golf Cheat]] and [[GolfJoke]]. It is essentially [[GolfJoke]], except the question number is encoded as backspaces and Deletes as..." 07:35:20 whoa whoa whoa 07:35:31 Apparently they expanded on "Assembled a contraption". 07:35:37 Maybe I knew about that? I don't remember. 07:36:45 -!- arseniiv has joined. 08:19:43 -!- adu has quit (Quit: adu). 08:23:47 [[Slindow]] N https://esolangs.org/w/index.php?oldid=66008 * A * (+174) Created page with "[[Slindow]] is an [[esoteric programming language]] that makes it easy to solve sliding-window challenges. [[Category:Languages]] [[Category:2019]] [[Category:Unimplemented]]" 08:26:21 [[Slindow]] M https://esolangs.org/w/index.php?diff=66009&oldid=66008 * A * (+386) 08:30:24 [[Slindow]] M https://esolangs.org/w/index.php?diff=66010&oldid=66009 * A * (+350) 08:31:10 thoughts on wget2? 08:44:45 What's that? 08:48:23 -!- Lord_of_Life has quit (Ping timeout: 245 seconds). 08:50:15 -!- Lord_of_Life has joined. 08:58:36 [[$]] https://esolangs.org/w/index.php?diff=66011&oldid=58729 * Rdebath * (+67) Turing 09:11:40 [[Slindow]] M https://esolangs.org/w/index.php?diff=66012&oldid=66010 * A * (+656) 09:17:29 [[Slindow]] M https://esolangs.org/w/index.php?diff=66013&oldid=66012 * A * (+14) /* Built-ins */ 09:35:17 had a dream jessie and james finally captured pikachu, but james was sucked into the pokball as well 09:39:55 jessie wasn't sure whether to keep pikachu or free her boyfriend james. 09:43:20 as pikachu would likely escape 10:07:54 shachaf: yes, but only in silver-bordered land. it's one of MaRo's worse ideas to give meaning to it. 10:21:01 hi b_jonas 10:21:30 working on an update to doc and code 10:21:52 i'll let you know when finished 10:57:02 [[Echidna]] https://esolangs.org/w/index.php?diff=66014&oldid=66003 * Lykaina * (+0) updating with newest interpreter link. 10:57:32 b_jonas: updated 12:36:10 -!- Spexty has joined. 12:55:27 -!- Frater_EST has joined. 12:55:32 -!- Frater_EST has left. 14:36:32 -!- xkapastel has joined. 14:40:15 what is the history of lenses (Haskell ones)? 14:40:38 -!- Sgeo_ has joined. 14:42:49 -!- Sgeo has quit (Ping timeout: 246 seconds). 14:49:54 updated documentation pdf for Echidna 14:57:37 [[Echidna]] https://esolangs.org/w/index.php?diff=66015&oldid=66014 * Lykaina * (-8) fixing first line 15:08:01 hi Sgeo_ 15:16:19 might as well move Echidna from Dropbox to Git 15:18:11 -!- ArthurStrong has joined. 15:18:36 -!- Melvar has quit (Ping timeout: 258 seconds). 15:22:46 so what do people wanna talk about lol 15:23:39 Echidna, mother of all monsters? 15:23:53 idk anything about echidna lol 15:24:12 should I check it out? 15:24:31 Echidna is my esolang 15:24:42 well should I check it out lol 15:25:31 sure. it's still a work in progress, though 15:25:51 ok 15:27:51 and i'm working on moving it to a bitbucket repo 15:28:30 to make it easier for me 15:28:48 currently hosted on my webserver 15:32:11 yeah 15:34:13 seems like a neat language 15:34:28 -!- Melvar has joined. 15:41:21 -!- ArthurStrong has quit (Remote host closed the connection). 16:15:34 Sgeo_: you active? 16:19:58 we might as well be the only "kind of active" people here lol 16:22:59 Spexty: fungot is always active, it’s usually just not noticeable 16:23:00 arseniiv: and i don't think it's true that it turns 110 into 111 and vice versa? 16:23:15 i need help from someone i already know i can trust. I knew Sgeo_ in rl, nobody else here qualifies for that as far as I know. 16:25:52 as for Echidna...did i do this right? https://bitbucket.org/lykaina/echidna/ 16:26:27 -!- sebbu has quit (Ping timeout: 258 seconds). 16:29:56 can someone tell me if i did the repo properly? 16:34:21 great... 16:34:38 idk anything about bitbucket sry 16:34:49 does it look good 16:35:09 what do you mean 16:35:13 is it missing anything on visual inspection 16:35:24 don't think so 16:35:56 bitbucket is a competitor to github 16:36:07 that's pretty much it 16:38:08 i don't like using microsoft products when i don't have to 16:42:41 and bitbucket is owned by atlassian, so i have the free version of jira as well 16:42:49 I think if you need a version control, there is Fossil 16:43:33 i've been using bitbucket for years 16:43:34 Atlassian is odd. 16:43:45 how so? 16:44:33 I've gone through the procedure of deleting my account once. Which is when I learned that I had *two* accounts, one bitbucket account and one general Atlassian account in the background that I was unaware of before... 16:46:05 And IIRC the process meant that I had a third account in their issue tracker. 16:46:21 This abundance of service specific accounts is what I found odd. 16:46:30 oh 16:46:39 yeah, that's weird 16:46:50 (all linked via the atlassian account, of course) 16:47:56 The best part was the final email that said that my account was not deleted... and that I please not reply to the email because that would re-create an issue tracking account. 16:48:28 does the repo i linked to look okay? 16:48:56 and does Fossil have issue tracking? 16:49:07 Yes, Fossil has issue tracking 16:49:14 link? 16:50:54 it's a git host, right? 16:51:21 No, it is a different system from git (and less confusing, in my opinion and some other people's opinion too) 16:51:37 Lykaina: well it wants me to log in with Atlassian, so nothing to be seen there 16:51:52 i pulled it off 16:52:07 i'll check out github in a minute 16:53:10 Lykaina: that may be a repo setting though 16:53:28 * int-e shrugs 17:02:58 Lykaina: BTW I’m always confused about my git repos so I can’t help, sorry 17:08:19 https://github.com/lykaina/echidna 17:11:28 -!- sebbu has joined. 17:21:18 int-e: like this one? 17:23:54 looks like a normal github repo to me 17:24:18 -!- grumble has quit (Quit: Martini. Gin, not vodka. Obviously. Stirred for 10 seconds while glancing at an unopened bottle of vermouth.). 17:24:20 is that good? 17:26:11 I was trying to be neutral. (I'm torn about github. I use it a lot, so I'm familiar with it. I dislike the fact that it was acquired by Microsoft, but not enough to actually switch to a different provider.) 17:27:01 is it good for hosting an esolang? 17:27:30 There are quite a few esolang related github repos. 17:28:14 It's servicable. 17:28:38 (To use a less controversial categorization than good vs. bad.) 17:29:08 yeah, if an esolang isn't on the esolangs wiki, it's probably on github 17:29:16 somewhere 17:29:17 lol 17:29:22 If they do not require you to change all of your accounts to Microsoft accounts, then I do not know why that would be the reason to avoid it. (I do not use GitHub for my own projects, although that has nothing to do with Microsoft, and is because I prefer Fossil and I think git is confusing) 17:29:26 -!- grumble has joined. 17:33:33 [[Echidna]] https://esolangs.org/w/index.php?diff=66016&oldid=66015 * Lykaina * (-59) linking to my github instead of my webhost. 17:51:03 b_jonas: I tried to figure out what you meant, since even in un-sets the lands aren't silver-bordered. 17:51:12 But then I reparsed it. 17:51:26 The basic lands anyways aren't silver border 17:56:30 Oh, that's true. Maybe there are unbasic lands. 17:57:07 Do you make up some more Magic: the Gathering cards today? 17:57:29 -!- polomukuyu has joined. 17:57:53 No. 17:58:04 OK 17:58:04 I tried to make up a different game but didn't get very far yet. 17:59:30 What different game is that? 18:00:09 oh-gi-yu? 18:00:57 (said it backwards as not to swear)\ 18:00:57 yu-gi-oh lol 18:01:06 you don't wanna swear? damn 18:02:05 everyone hates yu-gi-oh at my lgs 18:02:23 shachaf: I was talking about assembling contraptions, not about basic lands 18:02:28 oh 18:02:32 I know. 18:02:34 "silver-bordered land" right 18:02:44 yes, M:tG is full of ambiguous words 18:03:41 but yes, there are non-basic silver-bordered lands, including that one that makes one and a half mana of any color, which got way overpowered since mana burn got eliminated 18:04:01 I think it's called City of Ass 18:05:06 I think Contraptions do not have the same border as other cards 18:05:44 yes, they're stupid borderless cards 18:06:18 Germany has 16 states. The German name is "Land". 18:06:42 If you're playing a limited game with 40-card decks, 16 is a natural number of lands to put in it (though 17 is probably better in practice). 18:09:02 hi b_jonas 18:14:01 Mathematical Study {2U} Enchantment ;; {1}, {T}: Chose a number and then reveal the top card of target player's library. If it is a nonland card with converted mana cost equal to the chosen number, add one mana of any color to your mana pool and then you may cast that card. This ability can be used only during your own main phase. ;; Echo {1} 18:23:55 b_jonas: https://github.com/lykaina/echidna 18:24:18 i think you said to remind you 18:30:15 Noon Mark {1} Artifact ;; {T}, Sacrifice ~: Add one mana of any color. Can't be used during combat phase. ;; {2}, {T}, Sacrifice ~: Draw a card 18:30:26 What is your comment of these made up cards? 18:34:45 -!- polomukuyu has quit (Remote host closed the connection). 18:47:20 `card-by-name Mind Stone 18:47:21 Mind Stone \ 2 \ Artifact \ {T}: Add {C}. \ {1}, {T}, Sacrifice Mind Stone: Draw a card. \ WL-C, 10E-U, C14-U, C15-U, IMA-C, DD2-U, DDP-U 18:47:35 hmm 18:49:38 zzo38: Noon Mark => I can't judge that one, it needs an experienced M:tG developer to tell if it's overpowered, it's the so4rt that can be either broken or useless as far as I know 18:51:05 Mathematical Study => at least make it "Activate this ability only any time you could cast a sorcery." unless you have a good reason to want to allow it activated in the controller's main phase but with non-empty stack 18:52:02 but after that, I don't think I like the main function of allowing to cast a card from another player's library. it's something that probably has to exist but be so rare that I never meet them 18:52:26 and I don't know if it's even right to have it as blue rather than red 18:52:31 it'll be confusing if it's a creature 18:52:49 or other permanent 18:53:16 int-e: I don't think so. then you'll just control a creature owned by the opponent, which is normal as far as blue goes 18:53:43 but normal in red too, and I don't know which color this one has to be 18:53:57 I think it's more confusing while it's on the stack 18:54:31 because owning a different player's spell on stack can happen, but it's very rare 18:57:14 -!- imode has joined. 18:58:19 although I'm not sure why black doesn't get any creature stealing 18:58:26 or do they get some? 18:58:55 b_jonas: may i pm you? 18:58:58 `card-by-name Enslave 18:58:59 Enslave \ 4BB \ Enchantment -- Aura \ Enchant creature \ You control enchanted creature. \ At the beginning of your upkeep, enchanted creature deals 1 damage to its owner. \ PLC-U, NPH-U, DDD-U \ \ Enslaved Dwarf \ R \ Creature -- Dwarf \ 1/1 \ {R}, Sacrifice Enslaved Dwarf: Target black creature gets +1/+0 and gains first strike until end of turn. \ TOR-C \ \ Enslaved Horror \ 3B \ Creature -- Horror \ 4/4 \ When Enslaved Horror enters the battlefield, 18:59:11 Lykaina: you can pm, but it won't make me look at the interpreter faster 18:59:20 oh 18:59:24 `card-by-name Mark of the Oni 18:59:25 Mark of the Oni \ 2B \ Enchantment -- Aura \ Enchant creature \ You control enchanted creature. \ At the beginning of the end step, if you control no Demons, sacrifice Mark of the Oni. \ BOK-U 18:59:30 you weren't responding 18:59:33 sorry 18:59:45 I will look at the interpreter, I'm curious now 19:00:11 so black does get a few 19:03:24 in the current OotS story arc, if Durkon was broken while petrified, how difficult would it have been to fix it? could they have found a cleric that can fix him with a Make Whole spell? 19:03:47 I can't tell if the Make Whole spell works for that, and if not, how else you repair a broken statue before reanimating 19:06:49 -!- MDude has quit (Ping timeout: 276 seconds). 19:16:09 -!- Melvar has quit (Ping timeout: 244 seconds). 19:16:52 -!- xkapastel has quit (Quit: Connection closed for inactivity). 19:29:46 -!- Melvar has joined. 19:36:19 -!- xkapastel has joined. 19:43:53 Lykaina: how does the subroutine memory work? the documentation doesn't really explain it. 19:44:13 Lykaina: apparently the if/while blocks have labels. what happens when you don't nest them properly? is that allowed? 19:52:31 Lykaina: it probably doesn't matter while you only have one source file, but why do you define the global variables in the .h header file? 19:58:49 Land Competence {-} Conspiracy ;; At the beginning of your upkeep, you may change the text of target permanent you own by replacing all instances of one land type word with another until end of turn. 20:06:39 Lykaina: also I find it strange how you keep seeking the program source code at every instruction 20:10:12 -!- LBPHacker has changed nick to LBPHacker_. 20:19:54 -!- imode has quit (Ping timeout: 268 seconds). 20:24:37 Lykaina: also, I think srand((unsigned ing)(clock()%65536)); is sort of a bad idea, but that only matters if you use the random state later 20:27:30 Lykaina: whoa, the findand function is even worse. it will search for the function all around the program, and seek five times for every byte of the program until the start of the subroutine 20:27:39 that really seems excessive 20:33:03 -!- LBPHacker_ has changed nick to LBPHacker. 20:33:27 why don't you just read the whole program at the start, find all the subroutine labels, store them and their offsets in the program, sort them, and look up the label in the sorted table on subroutine calls? 20:33:52 and then read instructions from the copy of the program that is loaded in memory, rather than fseek before every instruction 20:37:58 Yes, I should think that would be better 20:44:14 oh yeah, good idea. Lykaina: ask zzo38, he writes C programs in a style that's alien to me but may be closer to the style that you wrote here 20:44:23 zzo38: look at the interpreteR? 20:44:46 it's in the git repository at https://github.com/lykaina/echidna 20:45:45 OK, I will look 20:47:38 -!- Lord_of_Life_ has joined. 20:47:38 -!- Lord_of_Life_ has quit (Max SendQ exceeded). 20:48:42 -!- Lord_of_Life_ has joined. 20:48:43 -!- Lord_of_Life_ has quit (Max SendQ exceeded). 20:49:13 Probably it would be better to instead read the file into memory and convert into a binary code while reading it, so that it can skip comments and so on. Many other things are also rather inefficient 20:49:19 -!- Lord_of_Life_ has joined. 20:49:20 -!- Lord_of_Life_ has quit (Max SendQ exceeded). 20:49:53 zzo38: perhaps, but the S instruction makes that a bit hard 20:50:02 -!- Lord_of_Life has quit (Ping timeout: 245 seconds). 20:50:16 -!- Lord_of_Life has joined. 20:50:17 -!- Lord_of_Life has quit (Max SendQ exceeded). 20:51:17 -!- imode has joined. 20:51:33 Reading it into memory without conversion would be another way. 20:55:23 -!- Lord_of_Life has joined. 20:55:24 -!- Lord_of_Life has quit (Max SendQ exceeded). 20:55:59 -!- Lord_of_Life has joined. 20:55:59 -!- Lord_of_Life has quit (Max SendQ exceeded). 20:57:29 -!- Lord_of_Life has joined. 20:57:29 -!- Lord_of_Life has quit (Max SendQ exceeded). 20:59:32 -!- Lord_of_Life has joined. 20:59:32 -!- Lord_of_Life has quit (Max SendQ exceeded). 21:00:07 -!- Lord_of_Life has joined. 21:00:08 -!- Lord_of_Life has quit (Max SendQ exceeded). 21:00:40 -!- Lord_of_Life has joined. 21:00:40 -!- Lord_of_Life has quit (Max SendQ exceeded). 21:01:09 -!- Lord_of_Life has joined. 21:01:09 -!- Lord_of_Life has quit (Max SendQ exceeded). 21:07:56 -!- Sgeo__ has joined. 21:10:58 -!- Sgeo_ has quit (Ping timeout: 246 seconds). 21:25:13 shachaf: do you know (without testing) what -1 ** infinity is in IEEE floating point? 21:26:54 kmc: my guess is that it's a NaN, inherited from log(-1) 21:27:05 oh wait, you asked shachaf 21:27:05 sorry 21:27:27 wait... 21:27:32 that's -(1 ** infinity) right? 21:27:35 then it's -1 21:27:49 i'm guessing they mean (-1) ** infinity 21:27:51 but idk 21:29:57 ok i tested both on node.js but i'm not gonna spoil anything lol 21:30:38 kmc: Is there a ** to begin with? I'd think exp(log(-1)*infinity), which becomes NaN? 21:30:54 hmm i tested them on python and i got different results lol 21:31:03 The C standard may have some odd ideas about this too 21:31:16 (they want things like pow(-1,3) = -1) 21:32:15 wtf the python result is weird lol 21:32:56 ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -x c - <<<$'#include\n#include\n''int main(void) { double r = -pow(1.0, INFINITY); printf("r = %g,\n", r); return 0; }'; tmp/a.out 21:32:58 r = -1, 21:33:37 see, -(1 ** infinity) is -1 21:33:44 interesting, js says NaN on that one lol 21:33:47 b_jonas: uhm we want the - inside the pow 21:34:04 > (-1) ** (1/0) 21:34:04 js says NaN on 1**infinity for some reason 21:34:05 1.0 21:34:06 int-e: no we don't. if we had wanted it, kmc would have said that. 21:34:11 int-e: it was a trick question. 21:34:28 b_jonas: I'd hope it wasn't 21:34:35 > (-1) ** (-1/0) 21:34:37 1.0 21:35:48 ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -lm -x c - <<<$'#include\n#include\n''int main(void) { double r = -pow(1.0, INFINITY); printf("-1**INFINITY = %e,\n", r); return 0; }'; tmp/a.out 21:35:50 ​-1**INFINITY = -1.000000e+00, 21:36:09 So, apparently, pow(1,x) is specified as 1. 21:36:35 In C, which will infect a ton of programming languages. 21:37:28 hi 21:37:37 fell asleep sorry 21:38:54 Lykaina: np, I waited a day to reply too after all, so you're not late 21:39:22 > -(1 ** (1/0)) 21:39:25 -1.0 21:39:42 ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -lm -x c - <<<$'#include\n#include\n''int main(void) { double r0 = atan2(-1.0, 1.0/INFINITY), r1 = atan2(-1.0, -1.0/INFINITY); printf("atan2(-1.0,0.0) = %e, r = %e\n", r0, r1); return 0; }'; tmp/a.out 21:39:43 atan2(-1.0,0.0) = -1.570796e+00, r = -1.570796e+00 21:39:51 ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -lm -x c - <<<$'#include\n#include\n''int main(void) { double r0 = atan2(-1.0, 1.0/INFINITY), r1 = atan2(-1.0, -1.0/INFINITY); printf("atan2(-1.0,0.0) = %e, atan2(-1.0,-0.0) = %e\n", r0, r1); return 0; }'; tmp/a.out 21:39:52 atan2(-1.0,0.0) = -1.570796e+00, atan2(-1.0,-0.0) = -1.570796e+00 21:40:08 lol 21:41:12 wait, that's not where the branch cut is 21:41:49 kmc: I don't. 21:42:00 ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -lm -x c - <<<$'#include\n#include\n''int main(void) { double r0 = atan2(1.0/INFINITY, -1.0), r1 = atan2(-1.0/INFINITY, -1.0); printf("atan2(0.0, -1.0) = %e, atan2(-0.0, -1.0) = %e\n", r0, r1); return 0; }'; tmp/a.out 21:42:05 atan2(0.0, -1.0) = 3.141593e+00, atan2(-0.0, -1.0) = -3.141593e+00 21:42:05 that's where the branch cut is 21:49:08 one of the main problems with my interpreter is that it only works when everything is formatted perfectly. 21:49:57 arranged, not formatted 21:50:15 Lykaina: do you mean like the labels for the loops and conditionals? 21:50:21 yes 21:55:02 another problem is that i am limited by my programmimg skill 21:57:05 the reason for main.h is that i reused a lot of code from an earlier attempt at this, one which foolishly used 4 .c files 21:57:25 and 4 .h files 21:57:54 Lykaina: it's not a problem to use multiple c files, I only said that you shouldn't define the global variables in the header, because if you include the header multiple times, you'll get multiple copies of those variables that way 21:58:01 that or an error 21:58:14 oops 21:58:24 only declare the global variables in the header file if you want to use it in multiple c files, and define each of them in a single c files 21:58:46 declare global variables by using the `extern` keyword, and without an initializer 21:59:26 define the global variable without the `extern` keyword or any other storage class modifier keyword 22:01:01 shouls i just move everything into main.c? 22:01:12 -!- imode has quit (Ping timeout: 265 seconds). 22:02:01 you can if you want in a small program like this, but you should probably know how multiple compilation units work in C in case you want to write more C programs in the future 22:02:22 note that the `extern` keyword works differently on variable declarations and on functions declarations 22:02:30 (on function declarations, it basically does nothing) 22:02:54 it's a bit confusing, but it's way too late to change that part of C 22:07:02 that IEEE talk above reminds me about how many languages know that x mod 0 is x 22:08:36 I forgot which ones again, even 22:11:26 -!- adu has joined. 22:12:57 back 22:13:19 check the repo again 22:14:21 -!- imode has joined. 22:16:26 Lykaina: now you have just one source file, no header, but no other changes. so no annoyance with the global variables now. 22:16:53 -!- GeekDude has quit (Quit: WeeChat 2.4). 22:20:22 -!- Melvar has quit (Ping timeout: 252 seconds). 22:22:09 i agree that findiw and findand are pretty badly done 22:25:27 crap 22:27:56 the S op, the one that allows the "Hello World" program i wrote to work...it may need to go. probably replace it with an external data file lookup 22:28:58 for readiw and readand to work, the program file can't contain extra data 22:29:28 Lykaina: maybe change it so that instead of being able to read from anywhere in the source file, it can only read from sections that are specially marked for that, and have a label, and for reading you specify the label and an offset into the data block after that label? 22:30:40 either that, or just allow to initialize parts of the memory with data in the program source code, and then just use ordinary memory reads 22:31:00 I'm still asking how the subroutine memory thing works by the way 22:31:43 what part do you want to know about? i lost the question 22:32:07 if I understand correctly, the top 4 kilobytes of the memory are for global variables, and mapped straigth to addresses 22:32:17 but for the memory before that, there's some special magic address translation or something 22:32:20 how does that work? 22:33:05 checking 22:34:04 -!- Melvar has joined. 22:34:29 is it like a data stack, with the memory reference automatically offset by the stack pointer or something? 22:37:12 -!- GeekDude has joined. 22:37:31 -!- unlimiter has joined. 22:38:13 well, I don't understand that address translation and why you're doing it that way 22:38:20 look at the ops '&','-','N' 22:38:43 and how they interact 22:38:46 it looks as if it allows you to look at only the current stack frame, not stack frames below it 22:39:15 are you supposed to pass arguments to function calls through globals then? 22:39:16 what stack? 22:39:17 it's weird 22:39:33 well, there's also no stack, but basically 22:39:46 it's my first working attempt 22:39:47 it looks like you can only use one fixed part of that memory within a subroutine 22:40:08 at least directly 22:40:14 luckily indirect addressing lets you bypass it 22:40:22 but I still don't understand why you do this address translation at all 22:41:04 did you look at doc/examples/rand_0-99.txt 22:41:06 ? 22:41:19 no 22:41:46 there's an example of subroutine usage there 22:44:26 it's an elaborate use of jumps 22:44:37 and labels 22:45:09 Lykaina: it looks like the RAND subroutine tries to make two formatted random digits, storing them to @F001 and @F000 or something 22:45:39 yes, from the same number 22:47:49 if i wanted to use the &RAND sub in another location, i'd use a different mask number 22:48:30 each sub invocation has to have a unique mask number, from 01 to ef 22:49:11 main uses 00 22:50:44 so you can only make a sub call 239 times max 22:51:03 is this making sense? 22:51:23 not to me 22:51:44 I understand that the subroutine call instruction sets a fixed base address, 22:52:41 and then the memory reads in the subroutine, except for indirect ones, will read only from the stack frame at that address or from the global memory area, and the 22:52:57 stack frames can't overlap because they're all 256 long and start at offsets that are multiples of 256-word pages 22:53:12 -!- imode has quit (Remote host closed the connection). 22:53:15 but I don't get why this is useful 22:53:20 oh 22:53:37 -!- imode has joined. 22:53:38 I do also understand that the memory in those stack frames is preserved 22:53:48 and that you can call subroutines at the same stack frame 22:53:54 but what's the point of the whole thing? 22:54:31 honestly, it seemed like a good idea at the time, but it's probably not 22:55:57 ok 22:56:07 -!- imode2 has joined. 22:56:47 i need to add the equivalent of a K op during a sub call, at the least 22:58:06 (clearing the memory) 22:58:43 -!- imode has quit (Ping timeout: 265 seconds). 22:59:32 and somehow have the ranges automatically assigned based on position on a stack 23:00:28 instead of having the code define the ranges 23:01:25 does that sound better? 23:02:23 I don't know. would you be able to choose the size of the stack frame, like in the subroutine defintion, and access the stack frames below from the subroutine? 23:03:01 what does "stack frame" mean? 23:03:29 the stack frame is the part of the memory that a subroutine uses for its own purposes 23:03:37 that's where it puts its local variables 23:04:41 always should be 512 bytes (256 addresses) 23:04:56 it may also contain a few other things that help for subroutine linkage, such as the size of the stack frame or a pointer to the previous stack frame to allow to reset the stack pointer when the subroutine exits, and a return address which points into the code for where the subroutine was called from, but you may store those separately in an interpreter like this 23:05:32 Lykaina: hmm. but even if it's always 256 words, you should probably allow accessing the stack frames below, to make it easier to pass function call parameters 23:05:39 and the other frames can only be accessed indirectly 23:06:12 so that a subroutine doesn't have to copy them from global memory area or access them with an indirect access (the latter would be hard unless you at least add a way to get the stack pointer) 23:06:43 i don't have call parameters at the moment 23:07:15 yes, I do understand 23:07:38 but you should consider to change them if you want to change how that memory accessworks 23:08:59 i'll try something tonight and push it if it works 23:13:22 -!- imode2 has quit (Ping timeout: 240 seconds). 23:15:35 should i move the srand to set the seed whenever a random number is requested? 23:15:52 I don't think that would help much 23:21:19 unsigned char submask[SUBMASKSIZE]; // i think that's a proto-stack 23:37:59 -!- unlimiter has quit (Quit: WeeChat 2.5). 23:39:43 -!- arseniiv has quit (Ping timeout: 246 seconds). 23:41:13 -!- tromp_ has joined. 23:44:39 -!- tromp has quit (Ping timeout: 250 seconds).