00:10:30 <esowiki> [[Echidna]] https://esolangs.org/w/index.php?diff=66003&oldid=65993 * Lykaina * (+0) updating with newest interpreter link.
00:12:21 <Lykaina> made changes to both interpreter and spec_notes file
00:12:54 <b_jonas> Lykaina: too late today, but warn me later to look at them
00:15:14 -!- unlimiter has joined.
00:17:24 <Lykaina> i hope page 3 of the pdf is helpful
00:18:30 <Lykaina> 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 <Sgeo> The TUTOR language has 150 variables, named v1 through v150, which can be assigned names.
00:32:12 <Sgeo> I just... *blink*
00:33:01 <shachaf> You only needs two anyway.
00:36:29 <HackEso> 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:43 <HackEso> 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:53 <HackEso> https://hack.esolangs.org/tmp/out.a.hd
02:15:33 <fizzie> 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 <shachaf> Speaking of the amd64 System V ABI, I'm still kind of confused about %rdx.
02:18:54 <shachaf> You're supposed to register it with atexit, when you're using the ELF interpreter with dynamic linking.
02:19:21 <shachaf> But I seem to get 0 in that register even in that case?
02:20:49 <fizzie> 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 <shachaf> But how are you supposed to know?
02:21:14 <fizzie> Well, if it's null presumably you don't need to register it.
02:21:17 <shachaf> Maybe you just check for 0, but I don't like that. What if it's initialized to something else?
02:21:53 <fizzie> 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 <shachaf> Well, it would be nice if any standard specified that.
02:22:16 <fizzie> But that's just something that could make sense, I don't have any proof for that.
02:22:22 <fizzie> What does BA_OS mean anyway?
02:23:36 <fizzie> Yes, apparently they are sections of the System V Interface Definition.
02:23:39 <shachaf> 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 <shachaf> Which presumably you already found.
02:26:43 <shachaf> Maybe I should just look at what crt.o does.
02:26:49 <shachaf> Unfortunately it's all such a mess.
02:28:15 <fizzie> That's what all software is. I'm always surprised it works as often as it does.
02:28:56 <fizzie> I've been writing Go recreationally lately.
02:29:07 <shachaf> `` 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 <HackEso> 123 \ /tmp/test: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped
02:29:34 <shachaf> What's the flag to give to ld to make that dynamically linked?
02:30:33 <fizzie> I don't remember, ld is awkward to use directly. It's not -shared, because that's what creates shared objects.
02:30:58 <shachaf> I tried that and it was still static.
02:31:12 <shachaf> I guess -lc works but that does rather a lot more than I want here.
02:31:46 <shachaf> Also this is pointless because I don't know how to output the value of %rdx in HackEso.
02:32:38 <fizzie> I mean, you don't need all the bits just to see if it's zero or not.
02:32:45 <fizzie> You did just output the value 123 there.
02:32:45 <shachaf> That's true. That was my plan.
02:33:18 <fizzie> Maybe it needs to have a some NEEDED entries to not count as "statically linked" for file.
02:33:48 <HackEso> /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 <shachaf> If it was dynamically linked I think it'd say "shared object" instead of "executable".
02:34:46 <shachaf> It would at least name the interpreter.
02:36:59 <shachaf> Oh, right, execve can tell you ENOENT when the interpreter isn't found.
02:37:31 <shachaf> `` 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 <HackEso> 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 <fizzie> Right. I guess ld might just not be willing to make a dynamically linked thing without any libraries.
02:39:39 <shachaf> Probably something unknowable to mortals involving linker scripts.
02:40:23 <shachaf> `` 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:48 <shachaf> Uh oh. Is that saying that rdx is nonzero?
02:40:56 <fizzie> That's what it sounded like.
02:41:01 <shachaf> Wait, I'm starting to remember this. There was something complicated here.
02:41:24 <shachaf> `` 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 <HackEso> /tmp/test.s: Assembler messages: \ /tmp/test.s:1: Warning: indirect call without `*' \ 123
02:41:43 <shachaf> So now I'm not sure what issue I ran into.
02:41:49 <shachaf> But there was definitely something.
02:43:26 -!- aloril_ has quit (Ping timeout: 258 seconds).
02:45:00 <fizzie> `` 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 <HackEso> 000000 a0 fb 00 40 00 00 00 00 >...@....< \ 000008
02:45:04 <shachaf> OK, I was testing this with musl libc where it doesn't work so well.
02:45:45 <fizzie> 0x4000fba0 might be a plausible pointer as well, maybe?
02:45:48 <HackEso> 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 <shachaf> 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 <shachaf> OK, this is interesting. I remember now.
02:49:21 <shachaf> musl's ELF interpreter is passing _start's address in %rdx.
02:50:54 <shachaf> And now I see I had a comment saying this in my ELF generator program.
02:52:16 <fizzie> `` 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:20 <fizzie> `` 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:51 -!- tromp has quit (Ping timeout: 264 seconds).
02:54:12 <shachaf> You're commenting on my "mov $60, %rax" and so on?
02:54:50 <fizzie> Well, not really "commenting on", but related to.
02:54:51 <shachaf> It's true that I almost ran up against HackEso's time and memory limits with those extra bytes.
02:55:17 <shachaf> I was going to use cmp %rdx, $0 but I thought people would make fun of me.
02:55:26 <shachaf> So I used test %rdx, %rdx instead.
02:59:32 <fizzie> 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 <fizzie> (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 <shachaf> Hmm, what's the issue here?
03:05:58 <zzo38> I thought there should be made Magic: the Gathering card named "Leper Window", but am unsure what it should be.
03:06:20 <kmc> either a M:tG card or a band
03:06:58 <shachaf> are you in for scrapping all existing software
03:07:02 <fizzie> 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 <kmc> shachaf: meh
03:09:48 <fizzie> fungot: How do you feel about getting scrapped?
03:10:18 <fizzie> fungot: Anyone who got scrapped? No, not really.
03:10:18 <fungot> fizzie: my favourite fractal is still cantor's dust :) i was just requesting a heap of muck. but some.
03:12:02 <shachaf> kmc: how do you feel about scrapping all non-kittens
03:12:22 <zzo38> You can make up a band called that too, maybe.
03:12:27 <shachaf> i was telling the miri folks about how i want to make a kitten maximizer
03:12:41 <shachaf> some of them seem nervous about the idea
03:14:46 <Lykaina> fixed the Echidna documentation
03:21:16 <kmc> shachaf: how about an everything minimizer
03:26:51 <shachaf> only things beginning with the letter n
03:27:49 <shachaf> 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 <Sgeo> The "arrow" command in TUTOR is weirdly named. It doesn't just drawn an arrow
04:29:28 <zzo38> 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 <Sgeo> 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 <Sgeo> "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 <Sgeo> l a correct answer allows forward progress."
04:56:31 <Sgeo> https://en.wikipedia.org/wiki/TUTOR_(programming_language)
06:10:42 -!- tromp has joined.
06:12:22 -!- tromp_ has joined.
06:14:02 <esowiki> [[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 <esowiki> [[GolfJoke]] M https://esolangs.org/w/index.php?diff=66005&oldid=66004 * A * (-735)
06:19:54 <esowiki> [[GolfJoke]] M https://esolangs.org/w/index.php?diff=66006&oldid=66005 * A * (+12)
06:31:34 <shachaf> fizzie: So here's the entry point call in musl: https://github.com/ifduyue/musl/blob/master/ldso/dynlink.c#L1742
06:31:59 <shachaf> 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 <shachaf> So I feel like something is wrong here because it's obviously not passing something in in rdx.
06:32:41 <shachaf> (Also I mean entry point jump, not call, of course.)
06:39:17 -!- tromp has joined.
06:58:24 <shachaf> Should rodata be mapped -x?
06:58:36 <shachaf> I wonder how likely it is to contain ROP gadgets or that sort of thing.
07:02:48 <kmc> ro ro ro your data
07:02:59 <kmc> is there a good reason why it should be +x?
07:03:00 <kmc> besides fun
07:05:58 <Sgeo> -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:53 <shachaf> You can load it in one segment rather than two.
07:07:13 <shachaf> The Go compiler generates three load segments, r, rx, rw
07:07:22 <shachaf> Whereas gcc/clang generate only rx and rw.
07:18:18 <esowiki> [[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:31 <shachaf> Apparently they expanded on "Assembled a contraption".
07:35:37 <shachaf> 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 <esowiki> [[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 <esowiki> [[Slindow]] M https://esolangs.org/w/index.php?diff=66009&oldid=66008 * A * (+386)
08:30:24 <esowiki> [[Slindow]] M https://esolangs.org/w/index.php?diff=66010&oldid=66009 * A * (+350)
08:31:10 <rain1> thoughts on wget2?
08:48:23 -!- Lord_of_Life has quit (Ping timeout: 245 seconds).
08:50:15 -!- Lord_of_Life has joined.
08:58:36 <esowiki> [[$]] https://esolangs.org/w/index.php?diff=66011&oldid=58729 * Rdebath * (+67) Turing
09:11:40 <esowiki> [[Slindow]] M https://esolangs.org/w/index.php?diff=66012&oldid=66010 * A * (+656)
09:17:29 <esowiki> [[Slindow]] M https://esolangs.org/w/index.php?diff=66013&oldid=66012 * A * (+14) /* Built-ins */
09:35:17 <Lykaina> had a dream jessie and james finally captured pikachu, but james was sucked into the pokball as well
09:39:55 <Lykaina> jessie wasn't sure whether to keep pikachu or free her boyfriend james.
09:43:20 <Lykaina> as pikachu would likely escape
10:07:54 <b_jonas> shachaf: yes, but only in silver-bordered land. it's one of MaRo's worse ideas to give meaning to it.
10:21:30 <Lykaina> working on an update to doc and code
10:21:52 <Lykaina> i'll let you know when finished
10:57:02 <esowiki> [[Echidna]] https://esolangs.org/w/index.php?diff=66014&oldid=66003 * Lykaina * (+0) updating with newest interpreter link.
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 <arseniiv> 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 <Lykaina> updated documentation pdf for Echidna
14:57:37 <esowiki> [[Echidna]] https://esolangs.org/w/index.php?diff=66015&oldid=66014 * Lykaina * (-8) fixing first line
15:16:19 <Lykaina> 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 <Spexty> so what do people wanna talk about lol
15:23:39 <Lykaina> Echidna, mother of all monsters?
15:23:53 <Spexty> idk anything about echidna lol
15:24:12 <Spexty> should I check it out?
15:24:42 <Spexty> well should I check it out lol
15:25:31 <Lykaina> sure. it's still a work in progress, though
15:27:51 <Lykaina> and i'm working on moving it to a bitbucket repo
15:28:48 <Lykaina> currently hosted on my webserver
15:34:13 <Spexty> seems like a neat language
15:34:28 -!- Melvar has joined.
15:41:21 -!- ArthurStrong has quit (Remote host closed the connection).
16:19:58 <Spexty> we might as well be the only "kind of active" people here lol
16:22:59 <arseniiv> Spexty: fungot is always active, it’s usually just not noticeable
16:23:00 <fungot> arseniiv: and i don't think it's true that it turns 110 into 111 and vice versa?
16:23:15 <Lykaina> 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 <Lykaina> 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 <Lykaina> can someone tell me if i did the repo properly?
16:34:38 <Spexty> idk anything about bitbucket sry
16:35:13 <Lykaina> is it missing anything on visual inspection
16:35:56 <Lykaina> bitbucket is a competitor to github
16:38:08 <Lykaina> i don't like using microsoft products when i don't have to
16:42:41 <Lykaina> and bitbucket is owned by atlassian, so i have the free version of jira as well
16:42:49 <zzo38> I think if you need a version control, there is Fossil
16:43:33 <Lykaina> i've been using bitbucket for years
16:44:33 <int-e> 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 <int-e> And IIRC the process meant that I had a third account in their issue tracker.
16:46:21 <int-e> This abundance of service specific accounts is what I found odd.
16:46:50 <int-e> (all linked via the atlassian account, of course)
16:47:56 <int-e> 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 <Lykaina> does the repo i linked to look okay?
16:48:56 <Lykaina> and does Fossil have issue tracking?
16:49:07 <zzo38> Yes, Fossil has issue tracking
16:51:21 <zzo38> No, it is a different system from git (and less confusing, in my opinion and some other people's opinion too)
16:51:37 <int-e> Lykaina: well it wants me to log in with Atlassian, so nothing to be seen there
16:52:07 <Lykaina> i'll check out github in a minute
16:53:10 <int-e> Lykaina: that may be a repo setting though
17:02:58 <arseniiv> Lykaina: BTW I’m always confused about my git repos so I can’t help, sorry
17:08:19 <Lykaina> https://github.com/lykaina/echidna
17:11:28 -!- sebbu has joined.
17:23:54 <int-e> 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:26:11 <int-e> 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 <Lykaina> is it good for hosting an esolang?
17:27:30 <int-e> There are quite a few esolang related github repos.
17:28:38 <int-e> (To use a less controversial categorization than good vs. bad.)
17:29:08 <Spexty> yeah, if an esolang isn't on the esolangs wiki, it's probably on github
17:29:22 <zzo38> 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 <esowiki> [[Echidna]] https://esolangs.org/w/index.php?diff=66016&oldid=66015 * Lykaina * (-59) linking to my github instead of my webhost.
17:51:03 <shachaf> b_jonas: I tried to figure out what you meant, since even in un-sets the lands aren't silver-bordered.
17:51:26 <zzo38> The basic lands anyways aren't silver border
17:56:30 <shachaf> Oh, that's true. Maybe there are unbasic lands.
17:57:07 <zzo38> Do you make up some more Magic: the Gathering cards today?
17:57:29 -!- polomukuyu has joined.
17:58:04 <shachaf> I tried to make up a different game but didn't get very far yet.
17:59:30 <zzo38> What different game is that?
18:00:57 <Lykaina> (said it backwards as not to swear)\
18:01:06 <Spexty> you don't wanna swear? damn
18:02:05 <Lykaina> everyone hates yu-gi-oh at my lgs
18:02:23 <b_jonas> shachaf: I was talking about assembling contraptions, not about basic lands
18:02:34 <b_jonas> "silver-bordered land" right
18:02:44 <b_jonas> yes, M:tG is full of ambiguous words
18:03:41 <b_jonas> 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 <b_jonas> I think it's called City of Ass
18:05:06 <zzo38> I think Contraptions do not have the same border as other cards
18:05:44 <b_jonas> yes, they're stupid borderless cards
18:06:18 <shachaf> Germany has 16 states. The German name is "Land".
18:06:42 <shachaf> 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:14:01 <zzo38> 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 <Lykaina> b_jonas: https://github.com/lykaina/echidna
18:24:18 <Lykaina> i think you said to remind you
18:30:15 <zzo38> 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 <zzo38> What is your comment of these made up cards?
18:34:45 -!- polomukuyu has quit (Remote host closed the connection).
18:47:21 <HackEso> 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:49:38 <b_jonas> 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 <b_jonas> 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 <b_jonas> 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 <b_jonas> and I don't know if it's even right to have it as blue rather than red
18:52:31 <int-e> it'll be confusing if it's a creature
18:52:49 <int-e> or other permanent
18:53:16 <b_jonas> 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 <b_jonas> but normal in red too, and I don't know which color this one has to be
18:53:57 <b_jonas> I think it's more confusing while it's on the stack
18:54:31 <b_jonas> 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 <b_jonas> although I'm not sure why black doesn't get any creature stealing
18:58:59 <HackEso> 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 <b_jonas> Lykaina: you can pm, but it won't make me look at the interpreter faster
18:59:24 <b_jonas> `card-by-name Mark of the Oni
18:59:25 <HackEso> 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:45 <b_jonas> I will look at the interpreter, I'm curious now
19:03:24 <b_jonas> 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 <b_jonas> 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 <b_jonas> Lykaina: how does the subroutine memory work? the documentation doesn't really explain it.
19:44:13 <b_jonas> Lykaina: apparently the if/while blocks have labels. what happens when you don't nest them properly? is that allowed?
19:52:31 <b_jonas> 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 <zzo38> 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 <b_jonas> 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 <b_jonas> 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 <b_jonas> 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 <b_jonas> that really seems excessive
20:33:03 -!- LBPHacker_ has changed nick to LBPHacker.
20:33:27 <b_jonas> 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 <b_jonas> and then read instructions from the copy of the program that is loaded in memory, rather than fseek before every instruction
20:37:58 <zzo38> Yes, I should think that would be better
20:44:14 <b_jonas> 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 <b_jonas> zzo38: look at the interpreteR?
20:44:46 <b_jonas> it's in the git repository at https://github.com/lykaina/echidna
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 <zzo38> 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 <b_jonas> 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 <zzo38> 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 <kmc> shachaf: do you know (without testing) what -1 ** infinity is in IEEE floating point?
21:26:54 <b_jonas> kmc: my guess is that it's a NaN, inherited from log(-1)
21:27:05 <b_jonas> oh wait, you asked shachaf
21:27:32 <b_jonas> that's -(1 ** infinity) right?
21:27:49 <Spexty> i'm guessing they mean (-1) ** infinity
21:29:57 <Spexty> ok i tested both on node.js but i'm not gonna spoil anything lol
21:30:38 <int-e> kmc: Is there a ** to begin with? I'd think exp(log(-1)*infinity), which becomes NaN?
21:30:54 <Spexty> hmm i tested them on python and i got different results lol
21:31:03 <int-e> The C standard may have some odd ideas about this too
21:31:16 <int-e> (they want things like pow(-1,3) = -1)
21:32:15 <Spexty> wtf the python result is weird lol
21:32:56 <b_jonas> ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -x c - <<<$'#include<stdio.h>\n#include<math.h>\n''int main(void) { double r = -pow(1.0, INFINITY); printf("r = %g,\n", r); return 0; }'; tmp/a.out
21:33:37 <b_jonas> see, -(1 ** infinity) is -1
21:33:44 <Spexty> interesting, js says NaN on that one lol
21:33:47 <int-e> b_jonas: uhm we want the - inside the pow
21:34:04 <Spexty> js says NaN on 1**infinity for some reason
21:34:06 <b_jonas> int-e: no we don't. if we had wanted it, kmc would have said that.
21:34:11 <b_jonas> int-e: it was a trick question.
21:34:28 <int-e> b_jonas: I'd hope it wasn't
21:35:48 <b_jonas> ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -lm -x c - <<<$'#include<stdio.h>\n#include<math.h>\n''int main(void) { double r = -pow(1.0, INFINITY); printf("-1**INFINITY = %e,\n", r); return 0; }'; tmp/a.out
21:35:50 <HackEso> -1**INFINITY = -1.000000e+00,
21:36:09 <int-e> So, apparently, pow(1,x) is specified as 1.
21:36:35 <int-e> In C, which will infect a ton of programming languages.
21:38:54 <b_jonas> Lykaina: np, I waited a day to reply too after all, so you're not late
21:39:42 <b_jonas> ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -lm -x c - <<<$'#include<stdio.h>\n#include<math.h>\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 <HackEso> atan2(-1.0,0.0) = -1.570796e+00, r = -1.570796e+00
21:39:51 <b_jonas> ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -lm -x c - <<<$'#include<stdio.h>\n#include<math.h>\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 <HackEso> atan2(-1.0,0.0) = -1.570796e+00, atan2(-1.0,-0.0) = -1.570796e+00
21:41:12 <b_jonas> wait, that's not where the branch cut is
21:42:00 <b_jonas> ``` set -e; gcc -Wall -O -fno-math-errno -std=c11 -o tmp/a.out -lm -x c - <<<$'#include<stdio.h>\n#include<math.h>\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 <HackEso> atan2(0.0, -1.0) = 3.141593e+00, atan2(-0.0, -1.0) = -3.141593e+00
21:42:05 <b_jonas> that's where the branch cut is
21:49:08 <Lykaina> one of the main problems with my interpreter is that it only works when everything is formatted perfectly.
21:50:15 <b_jonas> Lykaina: do you mean like the labels for the loops and conditionals?
21:55:02 <Lykaina> another problem is that i am limited by my programmimg skill
21:57:05 <Lykaina> 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:54 <b_jonas> 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:24 <b_jonas> 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 <b_jonas> declare global variables by using the `extern` keyword, and without an initializer
21:59:26 <b_jonas> define the global variable without the `extern` keyword or any other storage class modifier keyword
22:01:01 <Lykaina> shouls i just move everything into main.c?
22:01:12 -!- imode has quit (Ping timeout: 265 seconds).
22:02:01 <b_jonas> 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 <b_jonas> note that the `extern` keyword works differently on variable declarations and on functions declarations
22:02:30 <b_jonas> (on function declarations, it basically does nothing)
22:02:54 <b_jonas> it's a bit confusing, but it's way too late to change that part of C
22:07:02 <arseniiv> that IEEE talk above reminds me about how many languages know that x mod 0 is x
22:08:36 <arseniiv> I forgot which ones again, even
22:11:26 -!- adu has joined.
22:14:21 -!- imode has joined.
22:16:26 <b_jonas> 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 <Lykaina> i agree that findiw and findand are pretty badly done
22:27:56 <Lykaina> 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 <Lykaina> for readiw and readand to work, the program file can't contain extra data
22:29:28 <b_jonas> 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 <b_jonas> 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 <b_jonas> I'm still asking how the subroutine memory thing works by the way
22:31:43 <Lykaina> what part do you want to know about? i lost the question
22:32:07 <b_jonas> if I understand correctly, the top 4 kilobytes of the memory are for global variables, and mapped straigth to addresses
22:32:17 <b_jonas> but for the memory before that, there's some special magic address translation or something
22:34:04 -!- Melvar has joined.
22:34:29 <b_jonas> 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 <b_jonas> well, I don't understand that address translation and why you're doing it that way
22:38:20 <Lykaina> look at the ops '&','-','N'
22:38:46 <b_jonas> it looks as if it allows you to look at only the current stack frame, not stack frames below it
22:39:15 <b_jonas> are you supposed to pass arguments to function calls through globals then?
22:39:33 <b_jonas> well, there's also no stack, but basically
22:39:46 <Lykaina> it's my first working attempt
22:39:47 <b_jonas> it looks like you can only use one fixed part of that memory within a subroutine
22:40:14 <b_jonas> luckily indirect addressing lets you bypass it
22:40:22 <b_jonas> but I still don't understand why you do this address translation at all
22:41:04 <Lykaina> did you look at doc/examples/rand_0-99.txt
22:41:46 <Lykaina> there's an example of subroutine usage there
22:44:26 <Lykaina> it's an elaborate use of jumps
22:45:09 <b_jonas> Lykaina: it looks like the RAND subroutine tries to make two formatted random digits, storing them to @F001 and @F000 or something
22:47:49 <Lykaina> if i wanted to use the &RAND sub in another location, i'd use a different mask number
22:48:30 <Lykaina> each sub invocation has to have a unique mask number, from 01 to ef
22:50:44 <Lykaina> so you can only make a sub call 239 times max
22:51:44 <b_jonas> I understand that the subroutine call instruction sets a fixed base address,
22:52:41 <b_jonas> 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 <b_jonas> 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 <b_jonas> but I don't get why this is useful
22:53:37 -!- imode has joined.
22:53:38 <b_jonas> I do also understand that the memory in those stack frames is preserved
22:53:48 <b_jonas> and that you can call subroutines at the same stack frame
22:53:54 <b_jonas> but what's the point of the whole thing?
22:54:31 <Lykaina> honestly, it seemed like a good idea at the time, but it's probably not
22:56:07 -!- imode2 has joined.
22:56:47 <Lykaina> i need to add the equivalent of a K op during a sub call, at the least
22:58:43 -!- imode has quit (Ping timeout: 265 seconds).
22:59:32 <Lykaina> and somehow have the ranges automatically assigned based on position on a stack
23:00:28 <Lykaina> instead of having the code define the ranges
23:02:23 <b_jonas> 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 <Lykaina> what does "stack frame" mean?
23:03:29 <b_jonas> the stack frame is the part of the memory that a subroutine uses for its own purposes
23:03:37 <b_jonas> that's where it puts its local variables
23:04:41 <Lykaina> always should be 512 bytes (256 addresses)
23:04:56 <b_jonas> 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 <b_jonas> 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 <Lykaina> and the other frames can only be accessed indirectly
23:06:12 <b_jonas> 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 <Lykaina> i don't have call parameters at the moment
23:07:38 <b_jonas> but you should consider to change them if you want to change how that memory accessworks
23:08:59 <Lykaina> i'll try something tonight and push it if it works
23:13:22 -!- imode2 has quit (Ping timeout: 240 seconds).
23:15:35 <Lykaina> should i move the srand to set the seed whenever a random number is requested?
23:15:52 <b_jonas> I don't think that would help much
23:21:19 <Lykaina> 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).