00:30:25 <fizzie> Bah. Tried to add the missing day 3 Burlesque versions, and it gives the correct value for the example, but it's off by 0.008% (532401 vs. 532445) for the actual puzzle input.
00:30:51 <fizzie> Which probably means there's some rare corner case that it's not doing right.
00:39:25 <fizzie> Well, it's a difference of 44, and the Go code finds five instances of 44 while the Burlesque code's list only contains four, so that's probably a good clue.
00:43:38 <fizzie> Oh, NB removes all duplicates, not just *consecutive* duplicates, that's the problem.
00:44:30 <fizzie> I think I can use =[)-] as a version that doesn't.
00:47:19 -!- tromp has joined.
00:48:10 -!- tromp has quit (Client Quit).
01:44:37 <esolangs> [[Funge-98]] https://esolangs.org/w/index.php?diff=120148&oldid=117825 * BoundedBeans * (+90) Added github backup of rcfunge
03:04:19 <esolangs> [[User:BoundedBeans/My Funge-98 fingerprints]] N https://esolangs.org/w/index.php?oldid=120149 * BoundedBeans * (+7841) Created page with "This is a list of custom [[Funge-98]] fingerprint specifications made by [[User:BoundedBeans]]. They are currently all unimplemented. ==FOEA== Bitstring: 0x464f4541 This fingerprint contains various for-each block constructs. T
03:05:13 <esolangs> [[User:BoundedBeans]] https://esolangs.org/w/index.php?diff=120150&oldid=120106 * BoundedBeans * (+87)
04:00:04 <esolangs> [[SOAP]] https://esolangs.org/w/index.php?diff=120151&oldid=119709 * BoundedBeans * (+166)
04:40:52 -!- sprout_ has changed nick to sprout.
05:40:11 -!- ais523 has quit (Quit: quit).
06:41:32 -!- Sgeo has quit (Ping timeout: 256 seconds).
07:01:17 -!- Sgeo has joined.
07:37:47 -!- tromp has joined.
08:16:24 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
08:35:01 -!- Koen_ has joined.
08:52:14 -!- tromp has joined.
09:07:20 -!- Sgeo has quit (Read error: Connection reset by peer).
09:41:58 -!- wib_jonas has joined.
09:45:29 <wib_jonas> hi, I have a question. suppose I am writing an interpreter for an esolang, and I'm writing it memory-safe. I want to add library functions so it can fopen, fread and fwrite files, but I want to keep this sandboxed so it can only access files in one directory that the user who runs the interpreter specifies, so the code can't just read or write
09:45:29 <wib_jonas> arbitrary files on the file system. is there a library or standard set of advice for this, ideally in a way that won't blow up in someone's face if they compile this on some weird system that pretends to be unix but isn't really (like one of the many unix-ish environments on windows)?
09:46:21 <wib_jonas> I can probably put together something that works fine on real unix and win32, but that's not really all platforms, and given that this is an esolang interpreter, people may try to compile it on esoteric systems. obviously that's their problem, not mine, but still if there's some best practice for this I'd like to know.
09:46:54 <wib_jonas> I'll make the file access optional, gated behind a command-line option, with the default being to just access the three standard handles.
09:56:12 -!- Koen_ has quit (Quit: Leaving...).
10:11:16 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
10:15:41 -!- Lord_of_Life has quit (Ping timeout: 256 seconds).
10:15:45 -!- Lord_of_Life_ has joined.
10:17:09 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
10:27:46 -!- Koen_ has joined.
10:54:55 <esolangs> [[Talk:Kipple]] N https://esolangs.org/w/index.php?oldid=120152 * None1 * (+151) Created page with "==Stack identifier== Where is the stack identifier in the program: (i>o) --~~~~"
11:21:24 -!- tromp has joined.
12:41:50 <esolangs> [[Special:Log/newusers]] create * Nebular * New user account
13:02:02 <esolangs> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=120153&oldid=120139 * Nebular * (+410) Introduction | Why is the signature breaking in the preview? Please don't be like that when I save this!
13:04:22 <esolangs> [[+/-]] M https://esolangs.org/w/index.php?diff=120154&oldid=120093 * None1 * (+12)
13:33:46 <esolangs> [[BracketOnly]] https://esolangs.org/w/index.php?diff=120155&oldid=120147 * None1 * (+1753)
13:35:01 <esolangs> [[BracketOnly]] https://esolangs.org/w/index.php?diff=120156&oldid=120155 * None1 * (+170) /* Functions */
13:35:29 <esolangs> [[BracketOnly]] M https://esolangs.org/w/index.php?diff=120157&oldid=120156 * None1 * (+35) /* Functions */
13:49:03 <esolangs> [[Esolang:Sandbox]] https://esolangs.org/w/index.php?diff=120158&oldid=120079 * Lilchiky * (+0) /* Neu Berlin */
13:56:00 <esolangs> [[BracketOnly]] M https://esolangs.org/w/index.php?diff=120159&oldid=120157 * None1 * (+0) /* Functions */
14:02:19 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
14:07:27 -!- tromp has joined.
14:35:42 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
14:57:31 -!- tromp has joined.
15:22:38 -!- __monty__ has joined.
15:29:12 <esolangs> [[Esolang:Sandbox]] M https://esolangs.org/w/index.php?diff=120160&oldid=120158 * NameGoesThere * (+69) /* Play Area (Don't clear after use!) */
16:04:57 -!- Koen_ has quit (Remote host closed the connection).
16:20:30 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
16:28:33 <esolangs> [[AGG]] https://esolangs.org/w/index.php?diff=120161&oldid=120146 * Mmph * (+89)
16:46:22 -!- Koen_ has joined.
16:50:05 -!- tromp has joined.
16:50:21 -!- wib_jonas has quit (Quit: Client closed).
16:58:11 * int-e wonders whether fizzie is collecting twistyness data again this year
17:23:03 <esolangs> [[AGG]] https://esolangs.org/w/index.php?diff=120162&oldid=120161 * Mmph * (+190)
17:29:16 <esolangs> [[AGG]] M https://esolangs.org/w/index.php?diff=120163&oldid=120162 * Mmph * (+2)
17:41:39 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
18:01:00 <fizzie> int-e: I moved the graphs to https://zem.fi/misc/aoc/ and wrote an index page for them, but yeah.
18:01:16 <fizzie> https://zem.fi/misc/aoc/twist.html -- days 1 and 5 have been unusually twisty so far.
18:03:18 <Taneb> I'm surprised a lot of people found part 2 of today so difficult
18:07:02 -!- tromp has joined.
18:26:07 <int-e> Taneb: there's plenty of room to make it difficult
18:26:44 <int-e> also the idea to work with intervals may not be as obvious as it seems
18:27:50 <esolangs> [[AGG]] https://esolangs.org/w/index.php?diff=120164&oldid=120163 * Mmph * (-192)
18:27:57 <fizzie> I think I'm counting today as this year's first instance of the traditional "you could technically use the part 1 solution directly to answer part 2, but it's computationally infeasible" pattern that's pretty typical in AoC.
18:28:02 <esolangs> [[AGG]] https://esolangs.org/w/index.php?diff=120165&oldid=120164 * Mmph * (+0)
18:28:49 <fizzie> Also I've only done part 1 in Burlesque so far because it's such a slog to deal with intervals in it.
18:28:50 <int-e> fizzie: yeah except that it's barely feasible. and much more feasible with a reversal of direction
18:29:20 <int-e> oh that's one or two orders of magnitude though, which changes what's feasible.
18:30:58 <fizzie> I thought briefly about doing it backwards, but what I wrote initially in Go (forwards, with a list of intervals) benchmarks at 0.14 milliseconds so didn't feel the need to spend more time on it.
18:31:10 <int-e> Taneb: an example of making it difficult is that I spent quite some time lost in the arithmetic when working with (start, length) intervals, before switching to (start, end).
18:31:28 <int-e> fizzie: I meant for part 2
18:32:19 <int-e> And brute force. The point being, the first seed you find gives you the right answer. Which from what I've seen happens in the tens of millions, while there are billions of seeds.
18:32:48 <int-e> I didn't think of that, some #haskell fellow did.
18:35:13 <fizzie> As for Burlesque, here's what I currently have for the "find the correct range for a single number and remap it": jJ{Jx/[-iT[-)++rm==}j+]x/jfe~]^p.-.+
18:36:12 <fizzie> Doing it for an interval is likely going to be annoying.
18:37:28 <fizzie> I have bad memories from doing that quadtree or octree (which is also kind of an interval thing) last year.
18:43:54 <Taneb> int-e: I worked out the (start, length) interval stuff on paper, but a lot of people seem to not have realised they can work directly with the intervals at all
18:44:31 <int-e> Taneb: the nice thing about [start,end) is that you get to use min/max when splitting intervals
18:44:59 <int-e> (it's helpful to make one end exclusive)
18:45:27 <int-e> Taneb: http://paste.debian.net/hidden/fb4ecd95/ lines 24-26 (link will be dead tomorrow)
18:45:48 <int-e> Or in 3 days, rather.
18:46:19 <Taneb> Oh, I agree, I just followed the path that needed the least thinking at each step for me. "figuring out how to do (start, length)" was shallower than "realising I could do (start, end)"
18:49:46 -!- Koen_ has quit (Remote host closed the connection).
18:51:54 -!- Koen_ has joined.
18:57:10 <fizzie> I did have the thought "hmm, [start, end) would probably be a little more pleasant", but had pretty much finished at that point already.
18:58:30 <int-e> I somehow got lost in case distinctions, and decided to reset with [start, end).
19:07:39 -!- Koen_ has quit (Remote host closed the connection).
19:10:33 <fizzie> There's two instances of `min` in my solution too, though, just for the sizes rather than points.
19:10:54 <fizzie> I basically had part 2 look up the start point of the "incoming" interval in the mappings (using the standard library's binary search function, same as in part 1) and ended up with three unique cases: either the start was inside a mapping, or it was not but there was some mapping starting after it, or there was not.
19:11:08 <fizzie> For the first case, I mapped the first `min(r.size, m.size-offset)` items using the mapping; for the second, I sliced off the first `min(r.size, next.src-r.start)` items as an unmapped interval; for the third, I just kept the original as-is. And then continued with what was left of the original (if any).
19:13:47 <Taneb> I did five cases, based on where the start and end of the input range were relative to the start and end of the program range
19:18:02 <int-e> Aren't there six cases?
19:19:05 <int-e> > do xs@(x:_) <- tails "LMR"; y <- xs; [[x,y]]
19:19:19 <Taneb> Depends if you separate the "does not intersect" into "Is before entirely" and "is after entirely" I think
19:19:43 <int-e> That would check out. (those would be LL and RR here)
19:21:12 <int-e> (L = to the left of the source interval; M = in the interval; R = to the right. We do this for two points, knowing that one is further to the left than the other one, so ML, RL, and RM are impossible)
19:25:16 -!- Europe2048 has joined.
19:25:39 <Taneb> `welcome Europe2048
19:25:43 <HackEso> Europe2048: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: <https://esolangs.org/>. (For the other kind of esoterica, try #esoteric on EFnet or DALnet.)
19:26:04 <HackEso> Taneb: Welcome to the international hub for esoteric programming language design and deployment! For more information, check out our wiki: <https://esolangs.org/>. (For the other kind of esoterica, try #esoteric on EFnet or DALnet.)
19:26:54 <int-e> Taneb: Maybe I should've reviewed my 2022 solutions before AoC this year... that did feature interval arithmetic at least once.
19:30:34 <fizzie> I guess an easier way to describe what I'm doing is: Check if the first item in the input interval should be mapped. If it should, make a mapped interval that extends to where either the interval or the mapping ends. Otherwise, make an unmapped interval that extends to where either the interval ends or the next mapping begins.
19:31:59 <int-e> "interval arithmetic" - I probably should've used a different phrase :)
19:33:01 <fizzie> I also had a version that kept both input intervals and the mappings in sorted order, and then iterated over both in sync, the same way that traditional "merge two sorted lists" operation works, making new intervals as it goes along.
19:33:11 <fizzie> But it looked more complicated.
19:33:36 <fizzie> (Worked fine, though.)
19:34:30 <int-e> oh right, the intervals stay disjoint
19:34:33 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
20:08:11 -!- tromp has joined.
20:55:40 <zzo38> About file access, the file handling is necessarily going to be different in different operating systems anyways for many reasons, although I think command-line switch to enable file access makes sense, which is what I have done in uxn38 (which also has a separate switch for read-only or read/write; if neither is specified then only stdin/stdout/stderr can be accessed, like you described).
20:58:02 -!- Europe2048 has quit (Quit: Client closed).
20:58:31 -!- wpa has joined.
21:05:44 -!- Koen_ has joined.
21:14:59 -!- ais523 has joined.
21:30:23 <b_jonas> zzo38: hmm yes, a mid-way option for read only could make sense and is easy to implement if I have the rest
22:22:16 -!- __monty__ has quit (Quit: leaving).
22:25:55 -!- iovoid has quit (Ping timeout: 260 seconds).
22:26:01 -!- [iovoid] has joined.
22:26:57 -!- [iovoid] has changed nick to iovoid.
22:29:45 <ais523> b_jonas: on Linux there's an API for reading files only below certain directories, and which can't be tricked by "../" or the like
22:29:47 <ais523> but I don't think it's standard
22:30:12 <fizzie> Ugh, finally part 2 done in Burlesque too, in a very brutish fashion.
22:30:14 <fizzie> Ended up turning the {dst src len} ranges into {start end offset}, then for each "layer" added synthetic {start end 0} ranges to fill all the gaps, and finally reduced the starting ranges with a step that did: 1. take the cross product of input ranges and layer mappings; 2. turn every {{start1 end1} {start2 end2 offset}} pair into {max(start1,start2) min(end1,end2) offset}; 3. filter to keep only
22:30:16 <fizzie> the max < min cases; 4. add offset.
22:30:21 <b_jonas> ais523: do you mean chroot?
22:30:26 <ais523> b_jonas: no, openat2(2)
22:30:50 <b_jonas> what? openat does let you get out with ..
22:30:57 <ais523> b_jonas: openat2 is not openat
22:31:16 <fizzie> "RESOLVE_BENEATH: Do not permit the path resolution to succeed if any component of the resolution is not a descendant of the directory indicated by dirfd."
22:33:30 <b_jonas> interesting, I hadn't known about this one, I might try that
22:35:21 <fizzie> ln{""};;g_-]WD[-)ri2co{iT[-)++}m[j)[-ps{{J[-iT[-)++j~]^p.-[+}m[}m[1rz9e9?*3.*tp{_+><J2CO{p^[--]0_+j-][]}m[_+}j+]m[j+]{cp{tp{>]<]++}z[\[e!Cl}m[{~]^p.<}{l_?+}FM}r[FL<]
22:35:27 <fizzie> And people call this a concise language.
22:35:49 <zzo38> I think the original design had some problems, so they are good to add such things to improve it but still it is a bit messy due to the result of the original design. Still, it helps a bit.
22:35:50 <ais523> Burlesque doesn't really compete with the top golfing languages
22:35:50 <fizzie> Okay, to be fair, it is concise for more reasonable operations, and/or after spending a lot of effort.
22:36:08 <zzo38> However, some systems might not have such function, possibly you can use #ifdef to check if it is available in your program?
22:36:58 <ais523> zzo38: that just checks whether the compiler knows about it, whereas what matters is the kernel on the system the executable runs on
22:37:26 <ais523> Linux does have consistent behaviour if you try to call a nonexistent system call, so there are safe ways to check whether the API in question exists
22:38:41 <zzo38> Yes, if you intend to use the same compiled binary file on a different system then you would check in a different way, although there might also be the consideration if you want to compile the program for a different system that is not Linux but emulates some of its functions.
22:39:22 <b_jonas> ais523: and that consistent behavior is that either libc emulates the call or you get an error and errno is set to ENOSYS?
22:39:42 <ais523> at least from userspace's point of view
22:39:52 <ais523> if you do the system call manually you just get a return value of -ENOSYS and nothing else happens
22:40:19 <zzo38> If it checks for unknown flags rather than only unknown system calls, then that will work
22:40:36 <ais523> zzo38: unknown flags often have a consistent behaviour too, depending on the system call
22:40:41 <b_jonas> zzo38: that depends on the specific syscall
22:40:47 <ais523> but it's defined individually for each system call
22:40:59 <ais523> I think EINVAL is a common response, although openat2 gives E2BIG
22:46:17 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
22:57:32 -!- Koen_ has quit (Quit: Leaving...).
23:06:32 <esolangs> [[AGG]] M https://esolangs.org/w/index.php?diff=120166&oldid=120165 * None1 * (+0) /* Programs */
23:11:52 -!- sprout has quit (Ping timeout: 255 seconds).
23:48:29 -!- Sgeo has joined.
23:56:05 -!- ais523 has quit (Quit: sorry about my connection).
23:56:20 -!- ais523 has joined.