00:04:07 -!- mtm has quit (Ping timeout: 265 seconds).
00:05:38 -!- mtm has joined.
00:12:38 <esolangs> [[SLet]] https://esolangs.org/w/index.php?diff=152656&oldid=152602 * I am islptng * (+69) /* Implementation */
00:17:10 <esolangs> [[SLet]] https://esolangs.org/w/index.php?diff=152657&oldid=152656 * I am islptng * (-68) /* Implementation */
00:22:19 <esolangs> [[SLet]] https://esolangs.org/w/index.php?diff=152658&oldid=152657 * I am islptng * (+245) /* Examples */
00:22:57 <esolangs> [[SLet]] https://esolangs.org/w/index.php?diff=152659&oldid=152658 * I am islptng * (-38) /* = Calculate Pi */
00:32:28 <esolangs> [[SLet]] https://esolangs.org/w/index.php?diff=152660&oldid=152659 * I am islptng * (-7729) /* Implementation */
00:39:27 -!- amby has quit (Quit: so long suckers! i rev up my motorcylce and create a huge cloud of smoke. when the cloud dissipates im lying completely dead on the pavement).
00:59:34 -!- m5zs7k has quit (Quit: m5zs7k).
01:03:29 -!- m5zs7k has joined.
01:33:38 -!- Lykaina has quit (Quit: Leaving).
02:51:02 <zzo38> If you have hands and tail like scorpion and long mouth like alligator, what kind of music will you play?
04:06:11 <esolangs> [[User:MihaiEso]] https://esolangs.org/w/index.php?diff=152661&oldid=152461 * MihaiEso * (+89) /* More data */
04:06:46 <esolangs> [[User:MihaiEso]] https://esolangs.org/w/index.php?diff=152662&oldid=152661 * MihaiEso * (+14) /* My targets */
04:45:07 <esolangs> [[MISATOeso]] https://esolangs.org/w/index.php?diff=152663&oldid=115053 * Marina * (-1056) Blanked the page
04:46:06 <esolangs> [[User:Marina]] https://esolangs.org/w/index.php?diff=152664&oldid=115155 * Marina * (-222)
05:37:28 <esolangs> [[SLet]] https://esolangs.org/w/index.php?diff=152665&oldid=152660 * I am islptng * (+190) /* Implementation */
07:00:48 <esolangs> [[MarkupLang]] N https://esolangs.org/w/index.php?oldid=152666 * MihaiEso * (+7647) Created page with "'''MarkupLang''' is made by Mihai Popa. == Overview == MarkupLang is a simple markup language. It's designed to be as simple as possible, while still having a lot of features. Syntax is somewhat similar to AsciiDoc and Markdown. == Syntax == === Basic Formatting
07:00:57 <esolangs> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=152667&oldid=152649 * SerialDesignationF * (+174)
07:01:42 <esolangs> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=152668&oldid=152667 * SerialDesignationF * (+3)
07:01:44 <esolangs> [[MarkupLang]] https://esolangs.org/w/index.php?diff=152669&oldid=152666 * MihaiEso * (+29) /* Syntax Highlight Languages */
07:02:45 <esolangs> [[User:MihaiEso]] https://esolangs.org/w/index.php?diff=152670&oldid=152662 * MihaiEso * (+35)
07:09:56 -!- Lord_of_Life has quit (Ping timeout: 244 seconds).
07:10:12 -!- Lord_of_Life_ has joined.
07:11:34 -!- Lord_of_Life_ has changed nick to Lord_of_Life.
07:21:01 -!- tromp has joined.
07:24:26 <esolangs> [[MarkupLang]] https://esolangs.org/w/index.php?diff=152671&oldid=152669 * MihaiEso * (+6)
07:33:31 <esolangs> [[MarkupLang]] https://esolangs.org/w/index.php?diff=152672&oldid=152671 * 47 * (+0) /* Code Blocks */
07:48:01 <esolangs> [[MarkupLang]] https://esolangs.org/w/index.php?diff=152673&oldid=152672 * MihaiEso * (+18) /* Syntax Highlighting Languages */
07:50:22 <esolangs> [[Project Euler/3]] https://esolangs.org/w/index.php?diff=152674&oldid=137143 * I am islptng * (+166) /* Python */
07:54:51 <esolangs> [[Project Euler/2]] https://esolangs.org/w/index.php?diff=152675&oldid=137140 * I am islptng * (+101) /* Python */
07:55:54 <esolangs> [[MarkupLang]] https://esolangs.org/w/index.php?diff=152676&oldid=152673 * MihaiEso * (+54) /* Syntax Highlighting Languages */
07:57:46 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
08:02:57 <esolangs> [[MarkupLang]] https://esolangs.org/w/index.php?diff=152677&oldid=152676 * MihaiEso * (+147) /* Extra Options */
08:43:37 -!- tromp has joined.
09:28:27 <esolangs> [[Compass]] https://esolangs.org/w/index.php?diff=152678&oldid=152611 * Ractangle * (+2)
09:28:40 <esolangs> [[Compass]] https://esolangs.org/w/index.php?diff=152679&oldid=152678 * Ractangle * (+1)
10:26:41 -!- Noisytoot has quit (Quit: ZNC 1.9.1 - https://znc.in).
10:27:08 -!- Noisytoot has joined.
10:28:15 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
10:38:02 -!- tromp has joined.
11:19:03 <esolangs> [[Pointing]] M https://esolangs.org/w/index.php?diff=152680&oldid=152625 * Calculus is fun * (+22) /* Linked list */
11:29:37 <esolangs> [[Pointing]] https://esolangs.org/w/index.php?diff=152681&oldid=152680 * Calculus is fun * (+2646) /* brainfuck interpreter */
11:59:53 <esolangs> [[Fish]] https://esolangs.org/w/index.php?diff=152682&oldid=152488 * BrainFuckGirl * (-40) /* Hello, world! */ Added and golfed examples
12:04:02 -!- mtm has quit (Ping timeout: 252 seconds).
12:05:25 -!- mtm has joined.
12:09:24 -!- MizMahem has quit (Ping timeout: 260 seconds).
12:10:37 -!- MizMahem has joined.
12:24:35 <esolangs> [[User talk:MihaiEso]] https://esolangs.org/w/index.php?diff=152683&oldid=151710 * Hotcrystal0 * (+140) /* UserEdited */ new section
12:58:23 -!- amby has joined.
13:05:37 <esolangs> [[Fish]] https://esolangs.org/w/index.php?diff=152684&oldid=152682 * BrainFuckGirl * (-7) /* Hello, world! */ Golfed an example
13:08:17 <esolangs> [[Fish]] https://esolangs.org/w/index.php?diff=152685&oldid=152684 * MihaiEso * (+3) /* Examples */
13:08:55 <esolangs> [[Fish]] https://esolangs.org/w/index.php?diff=152686&oldid=152685 * MihaiEso * (+84) /* Hello, world! */
13:09:05 <esolangs> [[Fish]] https://esolangs.org/w/index.php?diff=152687&oldid=152686 * MihaiEso * (+0) /* Hello, world! */
13:12:43 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152688&oldid=147378 * MihaiEso * (+50)
13:13:07 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152689&oldid=152688 * MihaiEso * (+290)
13:44:29 <esolangs> [[UserEdited]] https://esolangs.org/w/index.php?diff=152690&oldid=152184 * Hotcrystal0 * (+183)
13:53:24 <esolangs> [[Talk:HQ9-]] N https://esolangs.org/w/index.php?oldid=152691 * Win7HE * (+90) Created page with "thankzs --~~~~"
14:07:56 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152692&oldid=152689 * BrainFuckGirl * (+370)
14:08:48 <esolangs> [[Fish]] https://esolangs.org/w/index.php?diff=152693&oldid=152687 * BrainFuckGirl * (-84) /* Hello, world! */
14:09:52 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152694&oldid=152692 * MihaiEso * (+449)
14:10:10 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152695&oldid=152694 * MihaiEso * (+9)
14:17:27 <esolangs> [[User:Hotcrystal0]] https://esolangs.org/w/index.php?diff=152696&oldid=152019 * Hotcrystal0 * (+65)
14:17:47 <esolangs> [[User:Hotcrystal0]] https://esolangs.org/w/index.php?diff=152697&oldid=152696 * Hotcrystal0 * (+31)
14:18:08 <esolangs> [[Talk:ACHEQUEUENINETHOUSANDPLUS]] N https://esolangs.org/w/index.php?oldid=152698 * Win7HE * (+113) Created page with "13.8 billion year old esolang. --~~~~"
14:18:26 <esolangs> [[User:Hotcrystal0]] https://esolangs.org/w/index.php?diff=152699&oldid=152697 * Hotcrystal0 * (+32)
14:29:40 <esolangs> [[Special:Log/newusers]] create * GluonVelvet * New user account
14:32:04 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152700&oldid=152695 * BrainFuckGirl * (+557) /* Question */
14:36:12 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152701&oldid=152700 * MihaiEso * (+355)
14:36:39 <esolangs> [[Esolang:Introduce yourself]] https://esolangs.org/w/index.php?diff=152702&oldid=152668 * GluonVelvet * (+316) /* Introductions */
14:46:34 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152703&oldid=152701 * BrainFuckGirl * (+289) /* Question */
14:50:20 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152704&oldid=152703 * MihaiEso * (+403)
14:52:14 <esolangs> [[User:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152705&oldid=150443 * BrainFuckGirl * (+333) /* Fish */
14:52:40 <esolangs> [[User:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152706&oldid=152705 * BrainFuckGirl * (+8) /* Hello, world! */
15:03:12 <esolangs> [[User:BrainFuckGirl/Sandbox]] N https://esolangs.org/w/index.php?oldid=152707 * MihaiEso * (+533) Created page with "== Hello, world! Staircase in [[Fish]] == <pre> "Hello, world!"rv >ov \ov >ov \ov >ov \ov >ov
15:27:07 <esolangs> [[User:BrainFuckGirl/Sandbox]] https://esolangs.org/w/index.php?diff=152708&oldid=152707 * MihaiEso * (-533) Blanked the page
15:28:39 <esolangs> [[Esolang:Sandbox]] https://esolangs.org/w/index.php?diff=152709&oldid=150939 * MihaiEso * (+537)
15:44:55 <esolangs> [[User:Hotcrystal0/My esolang ideas]] https://esolangs.org/w/index.php?diff=152710&oldid=152021 * Hotcrystal0 * (+43)
15:46:10 <esolangs> [[User:Hotcrystal0]] https://esolangs.org/w/index.php?diff=152711&oldid=152699 * Hotcrystal0 * (+58)
15:48:10 <esolangs> [[Esolang:Sandbox]] https://esolangs.org/w/index.php?diff=152712&oldid=152709 * Hotcrystal0 * (+4) fixing name
15:51:39 <esolangs> [[User:Hotcrystal0/Unnamed esolang 1]] N https://esolangs.org/w/index.php?oldid=152713 * Hotcrystal0 * (+131) Created page with "[name here] is an [[esoteric programming language]] made by [[User:Hotcrystal0]]. It is based around the characteristics of people."
16:46:41 -!- craigo has quit (Ping timeout: 248 seconds).
18:38:58 -!- CanisCorvus has joined.
18:39:09 <esolangs> [[User talk:BrainFuckGirl]] https://esolangs.org/w/index.php?diff=152714&oldid=152704 * BrainFuckGirl * (+343) /* Question */
18:53:19 <CanisCorvus> Daft question. I'm looking for a "streaming" BF interpreter designed to work with extremely large programs. At a stretch I can handle 7GiB files with standard tools and a long start-up time but it would be nice to know if there's something that already exists that can stream programs that may be 30-50GiB or larger without pre-loading the whole
18:53:19 <CanisCorvus> thing into memory before execution starts.
18:57:51 <korvo> CanisCorvus: My recently-written interpreter with tagless-final encoding may be able to do that, incidentally, but it wasn't a design goal. As a starting point, are these programs inherently large or would they typically optimize to much smaller programs?
19:00:14 <korvo> Also, are these programs generated by concatenating fragments of smaller programs, or are they irreducible into simpler operations?
19:02:24 <korvo> FWIW anything over 4GiB of input text is not handled by the standard UNIX compiler lore; at 7GiB, you're definitely already working with unreasonably-large amounts of machine code, and it might be worth re-examining the original codegen strategy that led to this.
19:03:27 <CanisCorvus> The programs are inherently large, optimized, and are a deliberate misuse of bf.
19:04:18 <korvo> If you're willing to share the generator techniques, then I'm willing to experiment. You don't have to explain what you're computing but I'm quite interested.
19:07:54 <korvo> A dissection of my interpreter is available here: https://pypy.org/posts/2024/11/guest-post-final-encoding-in-rpython.html Paraphrasing the summary: a final encoding builds input programs on the stack, emitting optimized actions to the heap; execution proceeds by interpreting the heap structure and occasionally JIT'ing.
19:08:38 <korvo> If your program has pathologically deep loops, then the parser will fail; otherwise, the main modification I'd have to make is to stream the input program from a file on disk.
19:09:21 <korvo> Oh, I guess "deep" is contextual here; BF Joust thinks 3 is deep. My interpreter's parser thinks that like 2000 is deep, and I only hit that with a fuzzer.
19:13:57 <CanisCorvus> I don't have anything available online for the project yet so I'll have to get on that. Essentially it's an array initialisation followed by millions/billions of moves and outs. Though if I follow through on the dafter part of the plan there would be several blocks with some glue logic.
19:15:41 <korvo> Okay. Do you do any I/O? There are several interpreters that should be able to stream non-interactive programs and evaluate them at compile-time, although I don't know how well they would perform.
19:16:17 <korvo> ...That alone is actually pretty good motivation for me, since my interpreter is pretty fast. The GNU Lightning intepreter linked on-wiki would also be a good candidate for modification.
19:19:57 <CanisCorvus> Vast amounts of output. The standalone version is designed so that once the initial array initialisation is done, the rest of the program could be interpreted in chunks.
19:21:41 <korvo> Alright, yeah, that sounds like something I'd be interested in. Ping me when you're ready to share. No rush; I have a few
19:22:05 <korvo> *few more weeks of work for customers. (I really need to fix my SSH.)
19:22:52 <korvo> I'm not gonna ping anybody directly, but I think some folks highlight on "Brainfuck" in the logs, which neither of us said yet.
19:23:17 <korvo> u'i Good night everybody~
19:38:24 <zzo38> If a brainfuck program includes any commands that are outside of any loop, then they do not need to be kept in memory after they have been executed, since they are only executed once.
19:40:22 <korvo> Yep. As such, an interpreter could partially evaluate its input program up to the first request for interactive I/O. But, just like with the streaming input feature, it's a design requirement.
20:13:10 <b_jonas> wow, multi-gigabyte brainfuck programs. this sounds esoteric.
20:15:44 <b_jonas> so the homepage of Vodafone has this weird login form where I can log in as a client of their mobile phone service providing. and I have found earlier that many times when I tried to log in, the form doesn't work, but this was inconsistent. specifically this is one of these overengineered client-side script forms that has the login button disabled by default, and it wasn't obvious when it worked and
20:15:50 <b_jonas> when it didn't. anyway, yesterday I figured out one of the multiple factors about this, and it's so stupid that I have to share.
20:19:08 <b_jonas> apparently the form is trying to track whether I filled the login ID field with something syntactically valid, and whether I entered something nonempty into the password field. it doesn't enable the submit button until both of those are true. apparently when you type something into a field then it recalculates its idea about whether the data in that field is valid for just that field, but it does not
20:19:14 <b_jonas> recalculate its idea when I paste the X selection into a field with middle mouse click.
20:21:36 -!- ais523 has joined.
20:28:40 -!- Sgeo_ has joined.
20:31:52 -!- Sgeo has quit (Ping timeout: 252 seconds).
20:47:39 <esolangs> [[Talk:SLet]] https://esolangs.org/w/index.php?diff=152715&oldid=152593 * I am islptng * (+619) Removed redirect to [[Talk:SLet (Old 3)]]
20:57:51 <ais523> CanisCorvus: I think the only real issue with making a streaming BF interpreter would be matching the loop brackets – it'd be easy to write one which scans the program for the other end of the loop every time it encounters a loop, but also very slow
20:58:03 <esolangs> [[Snakel]] https://esolangs.org/w/index.php?diff=152716&oldid=152556 * Ractangle * (+6) /* Not specifying a type or specify a non-existent type to a variable (as long as it's not defined) */
20:58:33 <esolangs> [[Snakel]] https://esolangs.org/w/index.php?diff=152717&oldid=152716 * Ractangle * (+0) /* Not specifying a type or specify a non-existent type to a variable (as long as it's not defined) */
20:59:15 <ais523> if you can deal with some extra constraints on how the loop structure works (e.g. "the number of [ and ] instructions is small enough that all their locations can be fit into memory", or "[ and ] instructions can be annotated with comments showing the size of the loop") then you could work around that problem
21:00:01 <esolangs> [[Comment]] https://esolangs.org/w/index.php?diff=152718&oldid=151505 * Ractangle * (+3) /* MarkupL */
21:00:44 <ais523> another thing worth wondering is "can you fit the entire program into address space, even if it doesn't fit into memory?" – if you can, then you can make use of the OS page caching mechanisms more or less for free, which would give a nice performance boost without adding extra complexity
21:01:54 <esolangs> [[Comment]] https://esolangs.org/w/index.php?diff=152719&oldid=152718 * Ractangle * (+11) /* Gammaline languages */
21:02:20 <esolangs> [[Comment]] https://esolangs.org/w/index.php?diff=152720&oldid=152719 * Ractangle * (-10) /* Snakel */
21:12:15 <CanisCorvus> The interpreter would ideally need a step to create a loop lookup file. One of the goals is that it should work on machines that don't have enough memory to hold the whole file.
21:15:20 <esolangs> [[HQ9Sharp]] N https://esolangs.org/w/index.php?oldid=152721 * I am islptng * (+1180) Created page with "{{wrongtitle|title=HQ9#}} HQ9# is an esolang created by islptng. It is designed to be more usable than [[HQ9+]]. ==Commands== <pre> H prints Hello World Hw prints Hello world HW prints HELLO WORLD hw prints hello world H, prints Hello, World H! prints Hello World
21:18:28 <esolangs> [[HQ9Sharp]] https://esolangs.org/w/index.php?diff=152722&oldid=152721 * I am islptng * (+82) /* Commands */
21:19:32 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
21:25:34 <ais523> CanisCorvus: so modern computers have separate physical memory and address space – the address space is generally much larger
21:25:36 -!- tromp has joined.
21:26:42 <ais523> and I'd expect it to be bigger than the typical hard drive or SSD, although I'm not too tuned into just how big hard drives are getting nowadays
21:27:34 <ais523> having a file loaded into address space doesn't necessarily load the contents into physical memory, but you can mention a specific byte of the file and the processor and OS will cooperate to ensure it's loaded while you're accessing it (and will unload it again to save memory once it's no longer in use, if necessary)
21:28:05 <ais523> so it's an efficient way to handle very large files
21:33:33 <fizzie> I think spinning rust is 12, 16, maybe up to 20 terabytes these days.
21:34:25 <fizzie> (I looked into bumping my bulk storage drives from 4T to either 8T or 12T, but didn't do it yet.)
21:34:41 <b_jonas> and these days you can have file systems larger than a hard disk in at least three different levels (hardware raid, software raid, or ZFS file system level support for multi-volume file systems
21:36:51 <JAA> 24 TB drives are readily available, and 26 TB ones are just about accessible to mere mortals. The bigger ones are large-scale customer exclusives.
21:38:17 <JAA> The sweet spot for price per storage is around 18-20 TB currently, at least where I am.
21:38:55 <JAA> 24 TB are available from all manufacturers, I think. 26 TB not yet.
21:41:32 <zzo38> I have 500GB hard drive and only use 6%
21:43:13 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
21:44:41 -!- tromp has joined.
21:45:41 <ais523> I'm surprising that the step up from "generally available" to "hard to get hold of" is such a small amount – if you needed more storage, wouldn't you just get two 24TB drives at that point?
21:46:42 <b_jonas> I bought 4 TB hard disks in 2020-09. wow, that was four years ago already! it feels like it was so recent. I think 16 TB ones were already available back then, and indeed now they are selling 26 GB ones for mortals.
21:46:51 <fizzie> https://diskprices.com/?locale=uk is where I usually go look up the numbers.
21:47:17 <fizzie> On that page, cheapest price/TB numbers are in the 12, 14, 16 TB range, mostly.
21:49:39 <fizzie> (Also I never remember to toggle off the "Used" box.)
21:51:21 <b_jonas> I believe the prices are nontrivial to interpret because the different qualities of commercial hard disks come in different sizes, as in, the higher quality non-SMR drives are more likely to come in larger capacities and full size
21:51:44 <b_jonas> so the capacity isn't the only varaible
21:54:52 <b_jonas> also it's still weird how large capacity SSDs have grown to
22:04:07 <korvo> CanisCorvus: A good BF parser should be able to match all brackets at parse time, and so it shouldn't be a problem for the backend to only handle fully-formed loops. The main concern is that a single loop might be too large.
22:05:45 <b_jonas> hmm… brackets are probably well-nested so even for a large file you should be able to preprocess them into some helper table so that you can always find the matching one quickly by scanning only part of the source code, even if there are lots of brackets
22:06:29 <korvo> Maybe we should clarify assumptions. Is the assumption that the program text fits on disk but not in RAM, or is the assumption that the program text is streamed into the interpreter?
22:07:42 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
22:09:32 -!- tromp has joined.
22:12:44 <korvo> CanisCorvus: ^^? Does this make sense? It's a big deal e.g. for video files, where seeking backwards is different for files on disk vs a network stream.
22:21:06 -!- tromp has quit (Quit: My iMac has gone to sleep. ZZZzzz…).
22:22:43 <JAA> fizzie: Yeah, prices are wildly different by location. The Seagate Exos and Toshiba Enterprise Capacity models have been cheapest here for years now. I don't mind the 5 year warranty. :-)
22:24:20 <JAA> ais523: Most people would probably optimise for money/TB. If you absolutely need the density (e.g. limited connectors or tiny case), you'd go for the highest available capacity.
22:25:31 <ais523> or perhaps "cheapest disk that has the capacity I need"
22:25:40 <JAA> Well, yeah
22:26:14 <JAA> At some point, tape becomes the more efficient approach. I haven't done the maths recently, but it's somewhere between 100 and 200 TB of data, I think.
22:26:36 <JAA> But whether that's a viable path depends on whether you need hot access or cold storage.
22:32:11 <JAA> I'd like to play with host-managed SMR, but those drives never make it to plebs like me.
22:49:36 <esolangs> [[User:Aadenboy]] M https://esolangs.org/w/index.php?diff=152723&oldid=152572 * Aadenboy * (+238) help me out here!
23:02:45 <zzo38> I thought of a variant of semaphore locking, which will be instead of a single number, the value will be a sequence of integers, where the first nonzero number must be positive (but all zero is also allowed). The usual semaphore is the case where this is only a single number. There are two other features as well.
23:03:31 <zzo38> Firstly, you should be able to have atomic locking of multiple such sequences at once. Secondly, you may have multiple adjustments in sequence where the value has to be valid after each intermediate value as well.
23:09:10 <zzo38> (Allowing atomic locking of several objects at once is also sometimes helpful, I think, even if they are remote objects in some cases.)
23:11:54 <zzo38> Although there is a few ways to implement reading/writing lock, with this you would have initial value [1,0], reading lock [0,-1], and writing lock [-1,0].
23:18:54 <ais523> zzo38: part of the reason that this sort of primitive isn't generally provided, even though it would be useful, is that it's hard to implement in hardware
23:19:45 <ais523> although by using a compare-and-exchange loop you can generally produce arbitrary atomic operations on aligned memory up to a given number of bytes (e.g. 16 bytes on x84_64) which might be enough to fit in a sequence if you were using small integers
23:20:25 <ais523> I think standard libraries and operating systems generally prefer to keep their primitives specialised so that they can be optimised for the purpose – locking and unlocking is often a performance bottleneck
23:26:43 <zzo38> OK, although there are other considerations like I mentioned, and specialized locking might make it difficult to make the more general case to be atomic, I might think (unless they had considered that in the design, although that might make it more complicated). The arbitrary atomic operations that you describe might help, although then the convention of their use must be used.
23:32:13 <esolangs> [[SLet]] https://esolangs.org/w/index.php?diff=152724&oldid=152665 * I am islptng * (+302) /* Quine */
23:56:01 <esolangs> [[SLet]] https://esolangs.org/w/index.php?diff=152725&oldid=152724 * I am islptng * (+140) /* Implementation */